GNOME Bugzilla – Bug 683739
Some conditional formats don't survive odf import/export
Last modified: 2012-09-11 14:39:15 UTC
Try exporting attached file to ODF and then reopen.
Created attachment 223942 [details] the missing sample
We seem to save the conditional style: <style:map style:apply-style-name="Gnumeric-1" style:condition="of:cell-content()=1" style:base-cell-address="$'Feuille1'.$A$1"/> correctly referring to: <style:style style:name="Gnumeric-1" style:family="table-cell" style:data-style-name="ND.0"> <style:table-cell-properties style:print-content="true" style:decimal-places="13" style:repeat-content="false"/> <style:paragraph-properties/> <style:text-properties/> </style:style> but we are missing the data style ND.0!
It looks like we are using any data style that is only used within a conditional style. The reason for this is that we write the conditional styles after we have already written the data styles: odf_write_office_styles (GnmOOExport *state) { gsf_xml_out_start_element (state->xml, OFFICE "styles"); g_hash_table_foreach (state->xl_styles, (GHFunc) odf_write_this_xl_style, state); g_hash_table_foreach (state->xl_styles_neg, (GHFunc) odf_write_this_xl_style_neg, state); g_hash_table_foreach (state->xl_styles_zero, (GHFunc) odf_write_this_xl_style_zero, state); g_hash_table_foreach (state->xl_styles_conditional, (GHFunc) odf_write_this_conditional_xl_style, state); g_hash_table_foreach (state->named_cell_style_regions, (GHFunc) odf_save_this_style_with_name, state); ...
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. To be specific: the data formats are now saved. For the file attached to this bug no change is visible because of bug # 683801. We do not save the custom format "" correctly. This is unrelated to the use of conditional formats.