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 683739 - Some conditional formats don't survive odf import/export
Some conditional formats don't survive odf import/export
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export OOo / OASIS
1.11.x
Other Linux
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2012-09-10 18:50 UTC by Jean Bréfort
Modified: 2012-09-11 14:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the missing sample (13.79 KB, application/x-gnumeric)
2012-09-10 18:52 UTC, Jean Bréfort
Details

Description Jean Bréfort 2012-09-10 18:50:31 UTC
Try exporting attached file to ODF and then reopen.
Comment 1 Jean Bréfort 2012-09-10 18:52:44 UTC
Created attachment 223942 [details]
the missing sample
Comment 2 Andreas J. Guelzow 2012-09-10 19:05:26 UTC
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!
Comment 3 Andreas J. Guelzow 2012-09-11 05:11:26 UTC
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);
...
Comment 4 Andreas J. Guelzow 2012-09-11 14:39:15 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.

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.