Issue 105244 - writer overwrites file without warning when saving graphics with manually entered file name
Summary: writer overwrites file without warning when saving graphics with manually ent...
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: DEV300m84
Hardware: All All
: P3 Trivial (vote)
Target Milestone: 3.4.0
Assignee: michael.ruess
QA Contact: issues@framework
URL:
Keywords: data_loss
Depends on:
Blocks:
 
Reported: 2009-09-21 16:41 UTC by aoo-bugs
Modified: 2017-05-20 10:30 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description aoo-bugs 2009-09-21 16:41:56 UTC
OOo overwrites an existing image file without warning, if the file name is
entered manually. 

Steps to reproduce:
1. Select a graphics in an ODT (e.g. using Navigator)
2. Right click & "Save Graphics" under deliberative name without extension
(which is added automatically) - e.g. "x" for x.jpg - and press "Save"
3. Select a different graphics and repeat the same steps. Choose the same file
name - here: "x"
4. Clicking button "Save" saves the image file and overwrites the existing file
without warning.

In contrast, choosing the file name by picking an existing file (by clicking or
double cklicking) leads to the expected warning "File already exists. Overwrite?" 

OOo 3.1.1 / OOO310m19 (Build 9420) / Suse Linux 10.3 / KDE
Comment 1 andreschnabel 2009-09-21 16:54:19 UTC
confirmed

same happens on DEV300m57, linux build, OOo file dialogs

The issue only exists for writer - impress and draw give a warning, that the
file already exists. (btw.: in contrast to writer, impress and draw have a
checkbox "automatic file extension" in the save dialog).

Comment 2 merschmann 2009-09-21 17:40:33 UTC
Also true for 3.1.0 on WinXP with systemdialogs.
Comment 3 aoo-bugs 2009-09-21 17:51:22 UTC
made Summary text more comprehensible
Comment 4 merschmann 2009-09-21 18:57:20 UTC
CCing me and sba, as requested
Comment 5 merschmann 2009-09-22 14:07:17 UTC
This was imho a new feature in 3.0.0 (2.4.3 does not have it)

I found it broken in OOo 3.0.0 (OOO300m9) on Kubuntu, so maybe the bug was there
from the first implementation.
Comment 6 michael.ruess 2009-09-22 15:35:10 UTC
MRU->OS: can confirm this on WinXP. Insert a graphic into Writer document.
Choose to "Save graphic..." end enter the name of an existing graphic WITHOUT
the file suffix, the file will be overwritten without warning. This is not the
case e.g. in Draw.
Comment 7 aoo-bugs 2009-10-29 16:10:12 UTC
I think this is an example for the data_loss keyword. 
Comment 8 wangyongchun 2010-01-26 20:55:07 UTC
This issue is reproducible with 3.1.1 (build OOO310_m19)
OS: windows vista home edition


Comment 9 wangyongchun 2010-01-26 20:56:06 UTC
This issue is reproducible with 3.1.1 (build OOO310_m19)
OS: windows vista home edition


Comment 10 merschmann 2010-07-13 15:37:46 UTC
Still there in DEV300m84...
Comment 11 stefan.baltzer 2011-01-14 11:12:14 UTC
SBA->OS: As discussed, set target to OOo 3.4
Comment 12 Oliver Specht 2011-03-23 06:37:59 UTC
The problem is that the filter (XOutBitmap::WriteGraphic()) always writes the file with extension. 

Fixed in cws os151 in
http://hg.services.openoffice.org/cws/os151/rev/a777f22c1d4c

Additionally the automatic extension flag has been added to the dialog.

->od: Please review
Comment 13 Oliver Specht 2011-03-23 11:52:31 UTC
Changed to Resolved/Fixed
Comment 14 Oliver Specht 2011-03-28 12:25:37 UTC
reassigned to mru for verification
Comment 15 michael.ruess 2011-03-30 08:38:04 UTC
Verified fix in CWS os151.