[gnumeric] ODS: Fix style problem.



commit 80d6f5fc638dbe3a696c771a8d9010155765377b
Author: Morten Welinder <terra gnome org>
Date:   Thu Feb 26 07:46:28 2015 -0500

    ODS: Fix style problem.

 plugins/openoffice/ChangeLog         |    5 +++++
 plugins/openoffice/openoffice-read.c |    9 ++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 6adf05e..84b7b63 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-26  Morten Welinder  <terra gnome org>
+
+       * openoffice-read.c (oo_series_pt): Don't change the style of an
+       object.  Copy, change, and reset it.
+
 2015-02-25  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * openoffice-write.c (odf_write_gog_style_graphic): write colours also
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 9859f2e..f2fe2d0 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -9353,16 +9353,19 @@ oo_series_pt (GsfXMLIn *xin, xmlChar const **attrs)
                                oo_prop_list_apply (style->plot_props, G_OBJECT (element));
                                g_object_get (G_OBJECT (element), "style", &gostyle, NULL);
                                if (gostyle != NULL) {
+                                       GOStyle *nstyle = go_style_dup (gostyle);
                                        OOChartStyle *astyle = 
state->chart.i_plot_styles[OO_CHART_STYLE_PLOTAREA];
                                        if (astyle != NULL)
                                                odf_apply_style_props
-                                                       (xin, astyle->style_props, gostyle, TRUE);
+                                                       (xin, astyle->style_props, nstyle, TRUE);
                                        astyle = state->chart.i_plot_styles[OO_CHART_STYLE_SERIES];
                                        if (astyle != NULL)
                                                odf_apply_style_props
-                                                       (xin, astyle->style_props, gostyle, TRUE);
-                                       odf_apply_style_props (xin, style->style_props, gostyle, TRUE);
+                                                       (xin, astyle->style_props, nstyle, TRUE);
+                                       odf_apply_style_props (xin, style->style_props, nstyle, TRUE);
+                                       g_object_set (element, "style", nstyle, NULL);
                                        g_object_unref (gostyle);
+                                       g_object_unref (nstyle);
                                }
                        }
                }


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