Apache OpenOffice (AOO) Bugzilla – Issue 120942
Cell Number format style is changed after saving to ods by AOO
Last modified: 2015-12-11 17:20:03 UTC
Created attachment 79467 [details] sample file build: AOO trunk r1381968 steps: 1)open sample file 2)check number format style in D65531 3)save to ods file 4)check number format style in D65531 too defect: number format style is changed, from ¥0300.000 to ¥300.000
I see several obscurities here, so back to UNCONFIRMED a) Summary tells something concerning a save-export problem, but Component selction is "open-import"? b) is this really a new 4.0.0 problem? I doubt c) Because I did not understand all details here I submitted "Bug 123149 - "Add leading digits" formatting feature supported, but lost after save as .ods", what might describe the real roots of the observations here.
step 2) [BLUE]"¥"0#,##0.000;[RED]"¥"-0#,##0.000 step 4) [BLUE]"¥"#,#00.000;[RED]"¥-"#,#00.000 AOO410m1(Build:9750) - Rev. 1548193 2013-12-07_04:10:48 - Rev. 1548790 Debian
Here are parts of stored styles in ods file that has the cell formatted with the format code in Comment 2. From content.xml: <table:table table:name="Sheet1" table:style-name="ta1" table:print="false"> <table:table-column table:style-name="co1" table:default-cell-style-name="ce1"/> <table:table-row table:style-name="ro3"> <table:table-cell office:value-type="float" office:value="100"> <text:p>¥0100.000</text:p> </table:table-cell> </table:table-row> </table:table> The cell formatted by "ce1" cell style and its this: <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N111"/> "N111" style is stored as follows: <number:number-style style:name="N111P0" style:volatile="true"> <style:text-properties fo:color="#0000ff"/> <number:text>¥</number:text> <number:number number:decimal-places="3" number:min-integer-digits="2" number:grouping="true"/> </number:number-style> <number:number-style style:name="N111"> <style:text-properties fo:color="#ff0000"/> <number:text>¥-</number:text> <number:number number:decimal-places="3" number:min-integer-digits="2" number:grouping="true"/> <style:map style:condition="value()>=0" style:apply-style-name="N111P0"/> </number:number-style> The above style can reproduce [BLUE]"¥"#,#00.000;[RED]"¥-"#,#00.000 style but it can not be the original formatting. From [BLUE]"¥"0#,##0.000;[RED]"¥"-0#,##0.000 style, "min-integer-digits" is compacted to sequential two zero. It seems number:number element could not represent the original number format. See 16.27.2 <number:number-style> section of ODF 1.2 specification for the element.