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 726237 - invalid number:currency-style in generated ods file
invalid number:currency-style in generated ods file
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-03-13 12:59 UTC by Morten Welinder
Modified: 2014-03-16 14:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2014-03-13 12:59:42 UTC
./t6150-ods-syntax.pl --verbose
[...]

# ../src/ssconvert -T Gnumeric_OpenCalc:openoffice ../samples/excel/infofuns.xls infofuns.ods
# /usr/bin/unzip -p infofuns.ods content.xml | /usr/bin/xmllint --noout --relaxng /home/welinder/Download/OpenDocument-v1.2-os-schema.rng -
# /usr/bin/unzip -p infofuns.ods styles.xml | /usr/bin/xmllint --noout --relaxng /home/welinder/Download/OpenDocument-v1.2-os-schema.rng -
While checking styles.xml from infofuns.ods:
| -:3: element text: Relax-NG validity error : Expecting element map, got text
| -:3: element text: Relax-NG validity error : Element currency-style has extra content: text
| Relax-NG validity error : Extra element currency-style in interleave
| -:3: element styles: Relax-NG validity error : Invalid sequence in interleave
| -:3: element styles: Relax-NG validity error : Element styles failed to validate content
| - fails to validate
Comment 1 Andreas J. Guelzow 2014-03-13 14:43:12 UTC
The online validator tends to be more helpful:
 
infofuns.ods/styles.xml[3,1021]: Error: tag name "number:text" is not allowed. Possible tag names are: <currencyinfofuns.ods/styles.xml[3,1021]: Error: tag name "number:text" is not allowed. Possible tag names are: <currency-symbol>,<map>,<number>-symbol>,<map>,<number>

Our problem are the currency-styles we create:
<number:currency-style style:name="ND.2"><number:text>$</number:text><number:text>)</number:text><number:number number:decimal-places="0" number:display-factor="1" number:grouping="true" number:min-integer-digits="1"/></number:currency-style>

<number:currency-style style:name="ND-0"><style:text-properties fo:color="#FF0000"/><number:text>($</number:text><number:number number:decimal-places="0" number:display-factor="-1" number:grouping="true" number:min-integer-digits="1"/><number:text>)</number:text></number:currency-style>
Comment 2 Andreas J. Guelzow 2014-03-13 14:45:33 UTC
The obvious solution would be to always use number-style, I cannot see any drawbacks.
Comment 3 Morten Welinder 2014-03-14 21:55:00 UTC
What does LO create for this?  Presumably that defines "right".
Comment 4 Andreas J. Guelzow 2014-03-14 23:27:49 UTC
Gnumeric 1.12.6 with libgoffice-0.10-10 exports a correct file. So apparently I broke something since then.
Comment 5 Andreas J. Guelzow 2014-03-14 23:37:19 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.

The fix is in goffice.
Comment 6 Andreas J. Guelzow 2014-03-14 23:59:20 UTC
Apparently there are other problems:

Checking ../samples/excel12/cellstyle.xlsx
Unexpected element 'a:contourClr' in state : 
	theme -> themeElements -> fmtScheme -> effectStyleLst -> effectStyle -> sp3d
Unexpected element 'a:reflection' in state : 
	theme -> themeElements -> fmtScheme -> effectStyleLst -> effectStyle -> effectLst
Unexpected element 'a:contourClr' in state : 
	theme -> themeElements -> fmtScheme -> effectStyleLst -> effectStyle -> sp3d


Checking ../samples/style-tests.gnumeric
While checking content.xml from style-tests.ods:
| -:428: element table-cell-properties: Relax-NG validity error : Expecting element map, got table-cell-properties
| -:428: element table-cell-properties: Relax-NG validity error : Element style has extra content: table-cell-properties
| Relax-NG validity error : Extra element style in interleave
| -:6: element automatic-styles: Relax-NG validity error : Invalid sequence in interleave
| -:6: element automatic-styles: Relax-NG validity error : Element automatic-styles failed to validate content
| - fails to validate
Comment 7 Morten Welinder 2014-03-15 02:13:30 UTC
This one is not new and is in the xlsx parser:

Checking ../samples/excel12/cellstyle.xlsx
Unexpected element 'a:contourClr' in state : 
    theme -> themeElements -> fmtScheme -> effectStyleLst -> effectStyle ->
sp3d
Comment 8 Andreas J. Guelzow 2014-03-15 23:45:42 UTC
The "../samples/style-tests.gnumeric" issue has been fixed.
Comment 9 Morten Welinder 2014-03-16 14:53:04 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.

Ignore the xlsx issue for now.