Bug 89935 - FILESAVE "save as" always saves as .fods not as .ods
Summary: FILESAVE "save as" always saves as .fods not as .ods
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.6.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-10 15:42 UTC by Nigel Arnot
Modified: 2015-03-14 13:45 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Small ods file that will "save as" .fods if not explicitly forced to .ods (58.27 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-03-10 17:53 UTC, Nigel Arnot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nigel Arnot 2015-03-10 15:42:26 UTC
When one opens a .ods spreadsheet and then does File menu "Save as" into another directory, one gets a .fods (flat ODS) file regardless of Options (Tools menu, Options, Load/Save, General, Default File Format and ODF settings, set to "Always save as" = "ODF Spreadsheet" (ie NOT to "Flat XML ODF Spreadsheet") 

This confuses the heck out of non-technical users because the default action when one double-clicks a .fods file on one's desktop (Fedora 21, Cinnamon ) is to open it with Gedit, or Google Chrome if installed, not with Libreoffice! It's also undesirable because these files are larger, and of course because it is ignoring the user's defined Options choice.

It's possible to change the pull-down list in the "Save as" window from "All Formats" to "ODF Spreadsheet (.ods)", but surely this should not be necessary when the existing file type is .ods and the requested default in Options is also .ods? 


Versions:
Fedora 21, Cinnamon desktop (also happens with XFCE), LibreOffice 4.3.6.2-3.fc21. I have also tried uninstalling the Fedora packages and installing  LibreOffice 4.4.1.2 downloaded from Libreofice.org, which then misbehaves the same way.
Comment 1 Nigel Arnot 2015-03-10 15:52:29 UTC
Further information: if the "Save as" screen "Name" (filename) field is, say, "Test.ods", then an ods file is saved. If the extension is omitted. i.e. "Test", then one gets the unwanted conversion of the opened file's type to .fods
Comment 2 raal 2015-03-10 16:19:06 UTC
I can not confirm wih Version: 4.4.2.0.0+
Build ID: 3e3f0f5c3051ea982f8f753e0f3e51441e8f9496
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:libreoffice-4-4, Time: 2015-02-22_10:24:01

To be certain the reported issue is not related to corruption in the user profile, could you rename this LibreOffice user directory ( see https://wiki.documentfoundation.org/UserProfile#Default_location or http://ask.libreoffice.org/en/question/903/where-are-the-libreoffice-data-profile-files/ ) and re-test?
Comment 3 Nigel Arnot 2015-03-10 17:15:54 UTC
(In reply to raal from comment #2)
> I can not confirm wih Version: 4.4.2.0.0+
> Build ID: 3e3f0f5c3051ea982f8f753e0f3e51441e8f9496
> TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:libreoffice-4-4, Time:
> 2015-02-22_10:24:01
> 
> To be certain the reported issue is not related to corruption in the user
> profile, could you rename this LibreOffice user directory ( see
> https://wiki.documentfoundation.org/UserProfile#Default_location or
> http://ask.libreoffice.org/en/question/903/where-are-the-libreoffice-data-
> profile-files/ ) and re-test?

Confirmed, using 4.4.1.2, problem still present if user profile removed

close Libreoffice
remove profile  rm ~/.config/LibreOffice/4/user/ -rf
Log out and in again
Browse to a .ods file from desktop Home icon and doubleclick it to open it
File / Save as
Leave name field unchanged (no trailing ".ods")
Click "Desktop" in Left-hand panel
Leave "All Formats" pull-down unchanged
Click Save

get .fods on the desktop

I have also tried the same with added step prior to "Save as", do
Tools / Options , Load/Save, General
Check ODF FOrmat version = 1.2 Extended (Recommended)
Pull down Document Type = Spreadsheet
Check "Always save as" = "ODF Spreadsheet"
Click Reset
Click OK

no change - still get .fods


Where does Libreoffice get its defaults from, if ~/.config/LibreOffice/4/user is missing? Might the problem be something bad shipped by Fedora 21 with its LibreOffice 4.3.6.2-3.fc21 packages?
Comment 4 Nigel Arnot 2015-03-10 17:40:22 UTC
More information, which changes the nature of the bug.

It happens only if the spreadsheet which is opened and then made the subject of "Save as", was created using earlier versions of the software. 

It does not happen if one creates a new .ods file using 4.4.1.2, saves that, closes LibreOffice, and then uses that file as the subject of testing.

I will try to find a spreadsheet to upload, which exhibits this behaviour, which does not contain anything commercially sensitive. (I'm presuming that anything which I attach, is then visible to the whole world). 

If I take an old sheet, modify it, save it explicitly as something.ods, then that removes the source of the trouble from the sheet.
Comment 5 Nigel Arnot 2015-03-10 17:53:00 UTC
Created attachment 114024 [details]
Small ods file that will "save as" .fods if not explicitly forced to .ods

This file ought to exhibit the behaviour described above - if opened and then made subject to "save as" with all defaults, I get a .fods not the expected .ods
Comment 6 raal 2015-03-10 19:32:34 UTC
Hello,
it's because your file IS fods file. try file -i

file -i bugdemo.ods 
bugdemo.ods: application/xml; charset=utf-8


for example ods file looks like this:
 file -i odsfile.ods 
odsfile.ods: application/vnd.oasis.opendocument.spreadsheet; charset=binary
Comment 7 Nigel Arnot 2015-03-11 09:23:41 UTC
Thanks for fast responses.

For the record - these files are the result of converting old .sxc files to (I thought) ods format using

libreoffice --headless --convert-to ods 

Yes - I now realize that it says "Using OpenDocument Spreadsheet Flat XML", but it generates a file of type .ods not one of type .fods