Bug 64827 - FILESAVE: Changing file extension (filter) also changes file name
Summary: FILESAVE: Changing file extension (filter) also changes file name
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: Other Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: BSA needsKDE
Keywords:
Depends on: 92517
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-21 14:05 UTC by Torsten
Modified: 2015-09-01 10:49 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
KDE4 save as dialog with checkbox (118.46 KB, image/png)
2015-09-01 10:49 UTC, Jan-Marek Glogowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten 2013-05-21 14:05:25 UTC
Problem description: 
In the "Save as..." dialog, when changing the file extension via the "Filter" dropdown from i.e. .ods to .xls, not only the extension of the file changes, but also the file name to the name of some other existing file. This is unexpected and confusing.

Steps to reproduce:
1. Open a .ods file from a directory that contains some other .ods and .xls files
2. "Save as ..." and select .xls from the "Filter" dropdown
3. File name changes along with the extension

Current behavior:
File name changes when only the extension should be changed

Expected behavior:
Only the extension changes, from i.e. Document.ods to Document.xls

              
Operating System: Ubuntu
Version: 4.0.2.2 release
Comment 1 Joel Madero 2013-05-24 16:31:21 UTC
I don't see this behavior at all. Name remains constant no matter what extension I choose.

Bodhi Linux
Version 4.0.3.3

Adding Bjoern just to confirm it's not a Ubuntu issue.


@Bjoern - sorry for the ping, I think it's very unlikely it's a Ubuntu specific bug but wanted to confirm that you're not seeing this behavior so we can mark as WFM.


Thanks!
Comment 2 Torsten 2013-05-24 19:03:27 UTC
Maybe it is a KDE (L&F?) bug. I think there was a KDE specific bug with the file save dialog in the past.

I can always reproduce this behaviour.
Comment 3 Julien Nabet 2013-05-31 13:05:50 UTC
Torsten: do you reproduce this on KOffice too?
Comment 4 Torsten 2013-06-07 09:49:09 UTC
Yes, it happens also with Calligra Sheets. It seems to happen only with LibreOffice Calc/Calligra Sheets, or at least not with Writer/Words.

I played a bit more with the issue:

- Create a new LO Calc document in an empty folder called i.e. "Calc.ods"
- Open the document
- Save as, select i.e. .xls as filter
=> Name field becomes blank while I would expect "Calc.xls"

In my specific case, where I have several .ods and .xls documents in the same folder, the "Save as" dialog picks some other existing .xls documents name when I change the filter to .xls.
Comment 5 Julien Nabet 2013-06-07 10:13:00 UTC
Lubos: Perhaps I'm wrong but I would put NOTOURBUG, any idea?
Comment 6 Joel Madero 2013-06-07 13:42:19 UTC
Hm to me this is most certainly not our bug if it happens with Calligra also ....
Comment 7 Torsten 2013-06-07 17:43:11 UTC
Thanks for all the quick replies. Please let me know who to address (KDE?) with this issue, so I will create a bug there.
Comment 8 Joel Madero 2013-06-07 17:47:19 UTC
Does Calligra and LibreOffice share any code at all? If not - I don't think it's KDE to be honest (unless it happens with every software that you can change extensions)....Lubos might have an idea :)
Comment 9 QA Administrators 2014-02-02 02:06:46 UTC
Dear Bug Submitter,

Please read the entire message before proceeding.

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team
Comment 10 Torsten 2014-02-02 17:24:47 UTC
I don't know what info I should provide. The issue as described in comment #4 is still there.

I'll be happy to report this issue elsewhere if someone can tell me where. Then I suppose the bug can be closed.
Comment 11 Robinson Tryon (qubit) 2014-02-03 17:20:18 UTC
(In reply to comment #10)
> I don't know what info I should provide. The issue as described in comment
> #4 is still there.
> 
> I'll be happy to report this issue elsewhere if someone can tell me where.
> Then I suppose the bug can be closed.

As the bug affects both LibreOffice and Calligra, it does sound like it's not our bug (although it could be that both programs have the same/similar bug...).

I tried testing LO 4.2.0.4 with KDE (plasma-desktop) 4.8.5 on Ubuntu 12.04.3, but was unable to reproduce either the name-switching or the name-blanking problems described.

Torsten - What version of KDE and Ubuntu are you using for testing?  Could you please try again with the 4.2.0 final build and see if that fixes your problems?

Thanks!
Comment 12 QA Administrators 2014-09-03 21:32:56 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team
Comment 13 QA Administrators 2014-10-05 23:00:00 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided):

a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. 
Please do not:
a) respond via email 
b) update the version field in the bug or any of the other details on the top section of FDO
Comment 14 Gauthier 2015-07-07 13:21:55 UTC
I can reproduce this bug every time.

Currently running Kubuntu 15.04 Plasma 5.3.1 and LibreOffice 4.4.4.3 but the bug was also there in 4.4.3. 

To reproduce the bug.

Open an existing document (.odt or .ods) in a folder containing other document with the same file extension. Go to file > Save As and change the filter to anything (.doc ; .ott ; .docx ; .txt) and the file name will change to the file name of a random document present in the folder.

This DOES NOT occur if: 
a) You start from creating a new document inside libreoffice and then press Save As (default name Untitled 1)
b) You are in a folder that contain no other document of the same type (i.e. no other .odt or .ods). 
c) If you start from a non libreoffice format e.g. .doc.

If you start from an existing .odt or .ods in an empty folder (i.e. in which the file you open is the only content in the folder) and go to file > Save and change the filter the name goes blank.
Comment 15 Torsten 2015-07-07 16:58:00 UTC
I also just tried again with kubuntu 15.04 and 4.4.2.2 and managed to reproduce this issue.
Comment 16 Joel Madero 2015-07-07 17:49:59 UTC
Please don't change things without knowing what they stand for.

1) It's not high just because it affects you - reverting to medium;

2) REOPENED is incorrect - pushing back to UNCONFIRMED so someone from QA team attempts to reproduce.
Comment 17 Gauthier 2015-07-08 14:48:56 UTC
Indeed I wasn't sure what the different 'importance' sections stands for and sorry if I made a mistake.

I put it high because this bug can lead to loss of data (not because it affects me like you assumed). If people don't pay attention and realise the name file has changed and press Save they will overwrite one of their file.
Comment 18 Gauthier 2015-07-16 10:15:59 UTC
(In reply to Joel Madero from comment #16)
> Please don't change things without knowing what they stand for.
> 
> 1) It's not high just because it affects you - reverting to medium;
> 
> 2) REOPENED is incorrect - pushing back to UNCONFIRMED so someone from QA
> team attempts to reproduce.
Comment 19 Buovjaga 2015-07-30 12:15:26 UTC
(In reply to Gauthier from comment #14)
> Open an existing document (.odt or .ods) in a folder containing other
> document with the same file extension. Go to file > Save As and change the
> filter to anything (.doc ; .ott ; .docx ; .txt) and the file name will
> change to the file name of a random document present in the folder.

Reproduced. Had a bunch of .ods documents with different names and an .xls file. Opened one of the .ods files, Save as, change type to .xls - BOOM - it changed the name to match the .xls file already existing in the folder.

Kubuntu 15.04 64-bit Plasma 5, Breeze
LibO 5.0 RC3
Comment 20 Gauthier 2015-08-02 16:58:28 UTC
Would be good to see whether this is a LO or a Kubuntu/Plasma/Qt problem. Will try to test on a lubuntu machine and report.
Comment 21 Gauthier 2015-08-13 11:02:05 UTC
Still the same problem with LO 5.0.0.5. 

Haven't yet had opportunity to try on a non-KDE platform.
Comment 22 Jan-Marek Glogowski 2015-09-01 10:42:00 UTC
This is handled in VCL by the FILESAVE_AUTOEXTENSION control.

I've done my tests on LO 5.0. You can test it on Linux by starting with env set to SAL_USE_VCLPLUGIN=gen/gtk/kde4, if the backend is installed / compiled.

Test case is to open a file and the select "save as":

- gen: has a "Automatic file name extension" checkbox (LO native)
- gtk: has *no* checkbox
- kde4: has a checkbox

AFAIK gtk handles FILESAVE_AUTOEXTENSION - I didn't check, what is wrong here. There definitely is code:

vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx:1673:        case FILESAVE_AUTOEXTENSION:

Now KDE4 is special in an other way, as it has a native handling of extensions in the save dialog, which also was broken for some time. There is no way to disable it!

From the KDE4 backend source:

    if (CHECKBOX_AUTOEXTENSION == controlId)
        // We ignore this one and rely on KFileDialog to provide the function.
        // Always return false, to pretend we do not support this, otherwise
        // LO core would try to be smart and cut the extension in some places,
        // interfering with KFileDialog's handling of it. KFileDialog also
        // saves the value of the setting, so LO core is not needed for that either.
        return uno::Any( false );

So for KDE4 the LO feature becomes native, the config is handled in KDE4 and this is the reason why the checkbox looks misplaced in the dialog in the lower left corner.

BTW bug 92517 is somewhat related and is fixed in 5.0 too.

And FWIW: the extension handling feature in the KDE4 file save dialog wasn't present in earlier KDE4 releases - not sure when it was added.
Comment 23 Jan-Marek Glogowski 2015-09-01 10:49:51 UTC
Created attachment 118309 [details]
KDE4 save as dialog with checkbox