Apache OpenOffice (AOO) Bugzilla – Issue 104320
[ODF] Calc fails to load number format which has three conditions, produced by Gnumeric
Last modified: 2017-05-20 11:35:10 UTC
This has been observed in OOO310m11 but this version does not exist in the "Found in version" selection. I will be attaching an ODF file that contains 2 cells (A1,A2) with conditional data formatting. Calc fails to read that conditional format.
Created attachment 64240 [details] sample file
I do not find any conditional formatting in the source. Is your issue about a custom number format?
I am talking about the conditional number style <number:number-style style:name="NDC-0"> <style:map style:condition="value()>0.000000" style:apply-style-name="ND.0"/> <style:map style:condition="value()<0.000000" style:apply-style-name="ND-0"/> <style:map style:condition="value()=0.000000" style:apply-style-name="ND00"/> </number:number-style> which is applied to A1 and A2 and should show positive numbers green and negative ones red.
I have adapted the summary. I can reproduce the error with OOO310m18 on WinXP with the attached document or any other document produced in Gnumeric. The structure of the file looks the same as those saved by OOo, so I guess, that it is a valid file.
Note: in DEV300_m82 when opening the document a dialog pops up that the document is corrupted and offers to repair the file. Attempting to modify the zip using Info-ZIP Zip 2.32 gave zip warning: local and central headers differ for (null) zip warning: offset 2--local = 00, central = 08 zip error: Zip file structure invalid (ooo-test-gnm.ods) Actually the number format in question is <number:number-style style:name='NDC-0'> <style:map style:condition='value()>0.000000' style:apply-style-name='ND.0' /> <style:map style:condition='value()<0.000000' style:apply-style-name='ND-0' /> <style:map style:condition='value()=0.000000' style:apply-style-name='ND00' /> </number:number-style> that is three conditions, with the third being superfluous, anything not <0 and not >0 is 0 (or text). Calc internally does not support more than 2 conditions, Excel doesn't either. OOo stores such a format as <number:number-style style:name='N116'> <number:number number:min-integer-digits='2' number:decimal-places='0' number:grouping='true' /> <style:map style:condition='value()>0' style:apply-style-name='N116P0' /> <style:map style:condition='value()<0' style:apply-style-name='N116P1' /> </number:number-style> Note the <number:number> format augmented by <style:map style:condition=...> I tried with Gnumeric 1.8.4 to use number format [>0][Green]#,#00;[<0][Red]-#,#00;[=0]#,#00 The format is accepted, but values don't display at all, neither positive, nor negative nor zero. Removing the third condition leaving [>0][Green]#,#00;[<0][Red]-#,#00;#,#00 it works. Certainly not a P2 issue.
Reset assigne to the default "issues@openoffice.apache.org".