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 725321 - Validation round trip errors
Validation round trip errors
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export OOo / OASIS
git master
Other All
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2014-02-27 14:01 UTC by Morten Welinder
Modified: 2014-03-02 03:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2014-02-27 14:01:30 UTC
New t6509:

-            <gnm:Validation Style="GNM_VALIDATION_STYLE_NONE" Type="GNM_VALIDATION_TYPE_AS_NUMBER" Operator="GNM_VALIDATION_OP_BETWEEN" AllowBlank="0" UseDropdown="0">
+            <gnm:Validation Style="GNM_VALIDATION_STYLE_INFO" Type="GNM_VALIDATION_TYPE_AS_NUMBER" Operator="GNM_VALIDATION_OP_BETWEEN" AllowBlank="0" UseDropdown="0">

LO has a checkbox for whether to issue an error message.  I am guessing that
having that "off" means the same as our _NONE.
Comment 1 Morten Welinder 2014-02-27 14:42:46 UTC
Biff7 fails with, among other things, this:

+  <gnm:Names>
+    <gnm:Name>
+      <gnm:name>dec</gnm:name>
+      <gnm:value>#NAME?</gnm:value>
+      <gnm:position>A1</gnm:position>
+    </gnm:Name>
+    <gnm:Name>
+      <gnm:name>Jan</gnm:name>
+      <gnm:value>#NAME?</gnm:value>
+      <gnm:position>A1</gnm:position>
+    </gnm:Name>
+  </gnm:Names>

xml-sax-read seems to have created these while reading a condition:
              <gnm:Expression0>2000-Jan-1</gnm:Expression0>
              <gnm:Expression1>2020-dec-31</gnm:Expression1>

1. I don't think we should create those.  2. If created, biff7 shouldn't
save them.  3. Note the case difference "dec" vs. "Jan".  I *hope* that
is not a sign that a string is reinterpreted at the time we load the file
because that would mean the interpretation could change depending on locale!
Comment 2 Morten Welinder 2014-02-27 15:15:20 UTC
Comment 1 was mistaken, but we have a GUI problem.  When DATE is selected,
the gui should allow the entry of dates.  And the dates should be stored as
expression date(2000,2,3).

The would-be date "2000-Jan-1" was interpreted as a double subtraction with
an placeholder name in the middle.
Comment 3 Morten Welinder 2014-02-27 23:52:58 UTC
It looks like xlsx cannot handle the "none" style.  Since it is not
particularly interesting -- it's a no-op -- I will change the test to
avoid those.
Comment 4 Morten Welinder 2014-02-27 23:56:08 UTC
With that, the only problem for ods is:

-              <gnm:Expression0>$F$37</gnm:Expression0>
+              <gnm:Expression0>(Sheet1!$F$37)</gnm:Expression0>
Comment 5 Andreas J. Guelzow 2014-03-01 19:39:23 UTC
In the ODF file we have these two candidates:

<table:content-validation table:name="VAL-0x232bed0" table:allow-empty-cell="false" table:display-list="none" table:base-cell-address="$'Sheet1'.G37" table:condition="of:cell-content-is-whole-number() and cell-content() &gt;= 111">
          <table:error-message table:display="true" table:message-type="stop"/>
        </table:content-validation>


<table:content-validation table:name="VAL-0x233b280" table:allow-empty-cell="false" table:display-list="none" table:base-cell-address="$'Sheet1'.G73" table:condition="of:is-true-formula([.$F$37])">
          <table:error-message table:display="true" table:message-type="stop"/>
        </table:content-validation>
Comment 6 Andreas J. Guelzow 2014-03-01 19:42:15 UTC
IT is obviously the second. So we seem to read it incorrectly by adding the sheet name to [.$F$37].
Comment 7 Andreas J. Guelzow 2014-03-01 19:50:24 UTC
We seem to be doing this intentionally:

texpr = oo_expr_parse_str (xin, start, &pp, GNM_EXPR_PARSE_FORCE_EXPLICIT_SHEET_REFERENCES, val->f_type);
Comment 8 Andreas J. Guelzow 2014-03-02 03:11:09 UTC
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.