GNOME Bugzilla – Bug 629962
[PATCH] Set default saveinfo for ODF and openoffice workbooks
Last modified: 2010-09-18 08:44:06 UTC
Created attachment 170517 [details] Add saveinfo for an opened odf workbook Currently when one opens an openoffice workbook in gnumeric, makes changes and saves it, the save dialog pops up with the default file format to save to set as .gnumeric. Attached patch sets workbook saveinfo so that editing and saving an existing file simply saves the changes in the right format rather than popping up a dialog.
There is no way that ODF is ever the "right" format. It might be the desired one. This seem a strange patch: Its mimetype is application/octet-stream?!
I can perhaps see setting the "ODF with foreign elements" as a default saver, but using the "ODF without foreign elements" is very dangerous. In fact the patch assumes that if the file wasn't created by Gnuemric thenthe users does not want to use foreign elements. This would have the consequence that if we encounter a file that claims to be ODF1.2 with lots of OpenOffice config options then on save lots of information will be lost. I don't think this is an acceptable patch, but perhaps Morten disagrees with me.
I also should have added that we cannot write Openoffice.org workbooks. Neither its old (pre-ODF) nor its current workbook format is sufficiently documented. While the current one claims to be ODF1.2 there is no such format yet and even if we would use ODF 1.2 committee draft 5 there are significant differences and large extensions to that.
Thanks for your feedback. My primary intention was to get rid of the save file dialog that pops up the first time I save my modifications on an odf file. Perhaps simply keeping "ODF with foreign elements" as a default saver is acceptable as you mention? I originally thought of submitting a patch with just that, but I assumed that being able to write a document without foreign elements whenever possible was probably a necessary feature.
The "without foreign elements" version is really only useful for users who want to see what information is guaranteed to be preserved, ie. save without foreign elements and reopen again in Gnumeric (but even then Gnumerics default settings may hide that certain info wasn't saved.) OOo has a similar "ODF without extensions" format available but doesn't even show in in their save dialog. One can find it in their options and enable it from there. Under normal circumstances one always wants the richest export. I just checked and noticed that we set the saveinfo even for xlsx files, and their export is currently much weaker than export as odf files, so we can probably set it for odf files.
The longer I think about this the more I get persuaded that we should: a) if an odf file was created by Gnumeric and does not contain foreign elements we should set the filesave info to be odf without foreign elements. b) for all other odf files the file save info should be odf with foreign elements.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.