GNOME Bugzilla – Bug 747211
[ODS] Changes for docs-samples.gnumeric
Last modified: 2015-04-03 01:48:57 UTC
I am not overly surprised by the formula changed below -- we probably translated on the save side. But why do we have the formatting changes? ./ssconvert ../samples/docs-samples.gnumeric ~/d.ods ./ssdiff --xml ../samples/docs-samples.gnumeric ~/d.ods <?xml version="1.0" encoding="UTF-8"?> <ssdiff:Diff> <ssdiff:Sheet Name="samples.csv" Old="0" New="0"> <ssdiff:Cells> <ssdiff:Cell Row="250" Col="2" Old="=false()" New="=FALSE"/> <ssdiff:Cell Row="261" Col="2" Old="=true()" New="=TRUE"/> <ssdiff:Cell Row="345" Col="2" Old="=floor(0.5)" New="=floor(0.5,sign(0.5))"/> <ssdiff:Cell Row="401" Col="2" Old="=sec(0.5)" New="=(1/cos(0.5))"/> <ssdiff:Cell Row="402" Col="2" Old="=sech(0.5)" New="=(1/cosh(0.5))"/> </ssdiff:Cells> <ssdiff:Styles> <ssdiff:StyleRegion startCol="2" startRow="56" endCol="2" endRow="62"> <Format Old="General" New="[$-f8f2]m/d/yy"/> </ssdiff:StyleRegion> <ssdiff:StyleRegion startCol="2" startRow="80" endCol="2" endRow="85"> <Format Old="General" New="[$-f8f2]m/d/yy"/> </ssdiff:StyleRegion> <ssdiff:StyleRegion startCol="2" startRow="109" endCol="2" endRow="110"> <Format Old="General" New="[$-f8fa]m/d/yy h:mm"/> </ssdiff:StyleRegion> <ssdiff:StyleRegion startCol="2" startRow="111" endCol="2" endRow="112"> <Format Old="General" New="[$-f8f2]m/d/yy"/> </ssdiff:StyleRegion> <ssdiff:StyleRegion startCol="2" startRow="114" endCol="2" endRow="115"> <Format Old="General" New="[$-f8fa]m/d/yy h:mm"/> </ssdiff:StyleRegion> <ssdiff:StyleRegion startCol="2" startRow="117" endCol="2" endRow="117"> <Format Old="General" New="[$-f8f2]m/d/yy"/> </ssdiff:StyleRegion> <ssdiff:StyleRegion startCol="2" startRow="118" endCol="2" endRow="118"> <Format Old="General" New="[$-f8fa]m/d/yy h:mm"/> </ssdiff:StyleRegion> <ssdiff:StyleRegion startCol="2" startRow="122" endCol="2" endRow="123"> <Format Old="General" New="[$-f8f2]m/d/yy"/> </ssdiff:StyleRegion> <ssdiff:StyleRegion startCol="2" startRow="175" endCol="2" endRow="176"> <Format Old="General" New="[$-f8f2]m/d/yy"/> </ssdiff:StyleRegion> <ssdiff:StyleRegion startCol="2" startRow="179" endCol="2" endRow="180"> <Format Old="General" New="[$-f8f2]m/d/yy"/> </ssdiff:StyleRegion> </ssdiff:Styles> </ssdiff:Sheet> </ssdiff:Diff>
YOu may notice that all the format changes come from the use of "General". THer eis no such style directly specifiable in ODF. (For round trip purposes we could use an extension element to remember teh true format code, but I chose not to do that.) So we save the effective format. The formula changees are not surprising: ODF does not have constants FALSE and RUE so we translate as false() and true() and then back. In this case the original is translated to teh more likly constants. floor in ODF behaves differently so we need to specify a second argument. We could be intelligent enough to get rid of it again on reading. sec and sech are part of the "large group" in ODF so one could argue that we should keep that or at least convert back on reading.
Right. Value formats. Same thing occurs in xlsx land. I don't even know why we have value formats to begin with. Note, that "csc" is handled and somehow roundtrips. Did they really make a difference in the treatment of secant and cosecant? Feel free to dispose of this report any which way makes sense to you.
Hmm, some more code documentation would help here. I cannot figure out why we don't save sec and sech as those ODF functions. So I will be changing that. This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.