GNOME Bugzilla – Bug 726237
invalid number:currency-style in generated ods file
Last modified: 2014-03-16 14:53:04 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
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>
The obvious solution would be to always use number-style, I cannot see any drawbacks.
What does LO create for this? Presumably that defines "right".
Gnumeric 1.12.6 with libgoffice-0.10-10 exports a correct file. So apparently I broke something since then.
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.
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
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
The "../samples/style-tests.gnumeric" issue has been fixed.
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.