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 726202 - Conditional format roundtrip problem [Excel]
Conditional format roundtrip problem [Excel]
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export MS Excel (tm)
git master
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2014-03-12 20:16 UTC by Morten Welinder
Modified: 2014-03-20 01:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Tentative patch (7.96 KB, patch)
2014-03-15 02:10 UTC, Morten Welinder
none Details | Review

Description Morten Welinder 2014-03-12 20:16:05 UTC
New test t6515:


t6515-cond-format.pl: Check conditional format xls/BIFF7 roundtrip.
| ** (/home/welinder/gnome-src/gnumeric/src/.libs/ssconvert:2782): CRITICAL **: gnm_style_conditions_insert: assertion `gnm_style_cond_is_valid (cond_)' failed


Ditto biff8.


xlsx doesn't even look like it's trying.
Comment 1 Morten Welinder 2014-03-13 00:27:51 UTC
the xls situation is much improved.
Comment 2 Morten Welinder 2014-03-14 17:30:40 UTC
             <gnm:Condition Operator="2">
               <gnm:Expression0>10</gnm:Expression0>
-              <gnm:Style Format="0.00"/>
+              <gnm:Style/>
             </gnm:Condition>


             <gnm:Condition Operator="2">
               <gnm:Expression0>10</gnm:Expression0>
-              <gnm:Style HAlign="GNM_HALIGN_CENTER" VAlign="GNM_VALIGN_BOTTOM" WrapText="0" ShrinkToFit="0" Rotation="0" Indent="0"/>
+              <gnm:Style/>
             </gnm:Condition>
Comment 3 Morten Welinder 2014-03-14 20:12:32 UTC
"Format" is not in xls.  Hidden in test.
Alignment stuff fixed.

New: we change the font name somewhere.


-                <gnm:Font Unit="20" Bold="0" Italic="0" Underline="0" StrikeThrough="0" Script="0">Sans</gnm:Font>
+                <gnm:Font Unit="20" Bold="0" Italic="0" Underline="0" StrikeThrough="0" Script="0">Helvetica</gnm:Font>
Comment 4 Morten Welinder 2014-03-15 02:10:27 UTC
Created attachment 271983 [details] [review]
Tentative patch

This patch adds number format and font name to the items we store
for conditional formats.

It follows the documentation in MS-XLS

However, applying it makes LO unusable for checking stuff:

welinder@toshiba ~/gnome/gnumeric/test $ ../src/ssconvert ../samples/cond-format-tests.gnumeric ~/ccc.xls
welinder@toshiba ~/gnome/gnumeric/test $ localc ~/ccc.xls 
terminate called after throwing an instance of 'boost::bad_index'
  what():  'at()' out of bounds
Comment 5 Morten Welinder 2014-03-15 16:51:08 UTC
Ok, I was wrong.  That patch is not the cause of LO's trouble.  It's the 
conditional right alignment that causes the exception.

https://bugs.freedesktop.org/show_bug.cgi?id=76209
Comment 6 Morten Welinder 2014-03-18 01:18:55 UTC
xls is done.
Comment 7 Morten Welinder 2014-03-20 01:43:57 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.