After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671513 - xls round trip issues with 11_1040.xls
xls round trip issues with 11_1040.xls
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export other
git master
Other All
: Normal major
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2012-03-07 01:15 UTC by Morten Welinder
Modified: 2012-03-27 19:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Smaller test case for rich text problem (13.50 KB, application/vnd.ms-excel)
2012-03-07 20:45 UTC, Morten Welinder
Details

Description Morten Welinder 2012-03-07 01:15:50 UTC
With file from Bug 671267, do...

./ssconvert ~/Download/11_1040.xls /tmp/iii.gnumeric
./ssconvert /tmp/iii.xls /tmp/iii2.gnumeric
gunzip < /tmp/iii.gnumeric >/tmp/iii.xml
gunzip < /tmp/iii2.gnumeric >/tmp/iii2.xml
diff -u /tmp/iii.xml /tmp/iii2.xml | less

and notice a number of issues:


[1] For conditional style we appear to output a strike-though attribute
that isn't in the source:

-                <gnm:Font Bold="1" Italic="0">Helvetica</gnm:Font>
+                <gnm:Font Bold="1" Italic="0" StrikeThrough="0">Helvetica</gnm:Font>



[2] We might have an one-by-one issue relating to selection rows:

-      <gnm:Selections CursorCol="0" CursorRow="0">
-        <gnm:Selection startCol="0" startRow="0" endCol="0" endRow="0"/>
+      <gnm:Selections CursorCol="0" CursorRow="1">
+        <gnm:Selection startCol="0" startRow="1" endCol="0" endRow="1"/>



[3] Something kills rich text.  (And I hate to see 2147483647 in there.
Can we keep that blank to mean "infinite"?)

-        <gnm:Cell Row="1" Col="1" ValueType="60" ValueFormat="@[family=Arial:8:2147483647][size=12288:8:17][bold=1.003:8:2147483647][italic=0:8:2147483647][strikethrough=0:8:2147483647][underline=none:8:2147483647][subscript=0:8:2147483647][superscript=0:8:2147483647][color=00x00x00:8:2147483647][size=10240:17:2147483647]">&lt; Enter Your Name Here &gt;</gnm:Cell>
+        <gnm:Cell Row="1" Col="1" ValueType="60">&lt; Enter Your Name Here &gt;</gnm:Cell>



[4] Something kills pagebreaks:

-        <gnm:hPageBreaks count="1">
-          <gnm:break pos="71" type="manual"/>
-        </gnm:hPageBreaks>



[5] Variant of [1] with more attributes:

-              <gnm:Style Fore="FFFF:0:0"/>
+              <gnm:Style Fore="FFFF:0:0">
+                <gnm:Font Bold="0" Italic="0" StrikeThrough="0">Helvetica</gnm:Font>
+              </gnm:Style>



[6] Rowinfo rounding issue:
-        <gnm:RowInfo No="92" Unit="8.1" HardSize="1"/>
+        <gnm:RowInfo No="92" Unit="8.05" HardSize="1"/>
Comment 1 Morten Welinder 2012-03-07 02:46:25 UTC
Missed a step (and misinterpreted myself).  Full recipe:

./ssconvert ~/Download/11_1040.xls /tmp/iii.gnumeric
./ssconvert ~/Download/11_1040.xls /tmp/iii.xls
./ssconvert /tmp/iii.xls /tmp/iii2.gnumeric
gunzip < /tmp/iii.gnumeric >/tmp/iii.xml
gunzip < /tmp/iii2.gnumeric >/tmp/iii2.xml
diff -u /tmp/iii.xml /tmp/iii2.xml | less
Comment 2 Morten Welinder 2012-03-07 03:02:28 UTC
[4] fixed -- we now properly export page breaks.
Comment 3 Morten Welinder 2012-03-07 14:32:31 UTC
[1] and [5] fixed.  Same thing: font flags for conditional formats we dropped
on the floor.
Comment 4 Morten Welinder 2012-03-07 20:45:36 UTC
Created attachment 209214 [details]
Smaller test case for rich text problem

This xls file also produces mangled rich text when we write it.
Comment 5 Morten Welinder 2012-03-07 22:01:21 UTC
The situation for [3] has improved, but there is still work to do.
Comment 6 Morten Welinder 2012-03-08 00:32:08 UTC
[3] is fixed.


[7] Conditional style issue:  We might not save shading right.

-              <gnm:Style Shade="1" Fore="FFFF:0:0" Back="FFFF:FFFF:FFFF"/>
+              <gnm:Style Fore="FFFF:0:0" Back="FFFF:FFFF:FFFF"/>




[8] We lose image names:

-        <gnm:SheetObjectImage Name="Picture 1" ObjectBound="F15:F16" ObjectOffset="0.0293 0.102 0.375 0.727" Direction="17" Print="1" crop-top="0" crop-bottom="0" crop-left="0" crop-right="0">
+        <gnm:SheetObjectImage ObjectBound="F15:F16" ObjectOffset="0.0293 0.102 0.375 0.727" Direction="17" Print="1" crop-top="0" crop-bottom="0" crop-left="0" crop-right="0">
Comment 7 Morten Welinder 2012-03-08 01:02:22 UTC
[7] Fixed.  The code checked the wrong mstyle bit.

Still open: [2], [6], and [8].
Comment 8 Morten Welinder 2012-03-08 21:50:11 UTC
[8] fixed.  Also fixed ordering of sheet objects.
Comment 9 Morten Welinder 2012-03-10 19:52:44 UTC
A few further issues fixed:

[9] Export of italic in conditional formats.
[10] Hard-size-set for columns on import.


Still open:

[2] Not an off-by-one but related to frozen panes.

[6] Rowinfo rounding.
Comment 10 Morten Welinder 2012-03-10 23:16:03 UTC
[6] Fixed.
Comment 11 Morten Welinder 2012-03-27 19:00:34 UTC
[2] Fixed.

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.