[gnumeric] odf: fix critical.



commit 150ecbd9662d2149b2422f0fc7c4bba5e2801c5a
Author: Morten Welinder <terra gnome org>
Date:   Thu Mar 27 09:29:27 2014 -0400

    odf: fix critical.

 plugins/openoffice/ChangeLog          |    5 +++++
 plugins/openoffice/openoffice-write.c |    5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index f928afe..4c49d0a 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-27  Morten Welinder  <terra gnome org>
+
+       * openoffice-write.c (odf_write_style_cell_properties): Don't
+       assume pattern colour is set.  Fixes #727152.
+
 2014-03-25  Morten Welinder  <terra gnome org>
 
        * openoffice-write.c: Don't handle conditional number formats (of
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index f0395e4..c988f89 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -1148,8 +1148,9 @@ odf_write_style_cell_properties (GnmOOExport *state, GnmStyle const *style)
                        /* We save this to retain as much state as possible. */
                        gnm_xml_out_add_hex_color (state->xml, GNMSTYLE "background-colour",
                                                   gnm_style_get_back_color (style), 1);
-                       gnm_xml_out_add_hex_color (state->xml, GNMSTYLE "pattern-colour",
-                                                  gnm_style_get_pattern_color (style), 1);
+                       if (gnm_style_is_element_set (style, MSTYLE_COLOR_PATTERN))
+                               gnm_xml_out_add_hex_color (state->xml, GNMSTYLE "pattern-colour",
+                                                          gnm_style_get_pattern_color (style), 1);
                        gsf_xml_out_add_int (state->xml, GNMSTYLE "pattern", pattern);
                }
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]