[gnumeric] Fix ODF style import of secondary plots. [#744930]



commit 7bb15a6517c10900968a937a32471f113ed1cb66
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Sat Feb 21 23:37:03 2015 -0700

    Fix ODF style import of secondary plots. [#744930]
    
    2015-02-21  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-read.c (od_style_prop_chart): without a stroke style and
        chart:lines set, assume that there are no lines.
        (oo_plot_series): set the style for overridden plots from the series style.

 NEWS                                 |    1 +
 plugins/openoffice/ChangeLog         |    6 ++++++
 plugins/openoffice/openoffice-read.c |    7 +++++--
 3 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index e356366..b74d6e2 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ Andreas:
        * ODF import/export additional axislines.
        * Fix ODF import/export of fonts in charts. [#744632]
        * ODF import/export additional axes. [#743787]
+       * Fix ODF style import of secondary plots. [#744930]
 
 Morten:
        * Initial xlsx import of sheet widgets.
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 9f4446a..0f2fc88 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,11 @@
 2015-02-21  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+       * openoffice-read.c (od_style_prop_chart): without a stroke style and
+       chart:lines set, assume that there are no lines.
+       (oo_plot_series): set the style for overridden plots from the series style.
+
+2015-02-21  Andreas J. Guelzow <aguelzow pyrshep ca>
+
        * openoffice-read.c (oo_chart_axis): read and use gnm:id
        (opendoc_content_dtd): attach gnm:axis
        (opendoc_content_preparse_dtd): ditto
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 4c48813..9859f2e 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -7510,10 +7510,10 @@ od_style_prop_chart (GsfXMLIn *xin, xmlChar const **attrs)
                style->plot_props = g_slist_prepend (style->plot_props,
                                                     oo_prop_new_int ("overlap-percentage", 100));
 
-       if (draw_stroke_set && !default_style_has_lines_set)
+       if (!default_style_has_lines_set)
                style->plot_props = g_slist_prepend
                        (style->plot_props,
-                        oo_prop_new_bool ("default-style-has-lines", draw_stroke));
+                        oo_prop_new_bool ("default-style-has-lines", draw_stroke_set && draw_stroke)); 
 
        if (state->chart.cur_graph_style == NULL && state->default_style.cells != NULL) {
                /* odf_apply_style_props (xin, style->style_props, state->default_style.cells, TRUE);*/
@@ -9255,6 +9255,9 @@ oo_plot_series (GsfXMLIn *xin, xmlChar const **attrs)
                                                             (state->pos.sheet, texpr)),
                                             NULL);
        }
+       if (plot_type_set && state->chart.i_plot_styles[OO_CHART_STYLE_SERIES] != NULL)
+               oo_prop_list_apply (state->chart.i_plot_styles[OO_CHART_STYLE_SERIES]->
+                                   plot_props, G_OBJECT (plot));
        oo_chart_style_to_series (xin, state->chart.i_plot_styles[OO_CHART_STYLE_PLOTAREA],
                                  G_OBJECT (state->chart.series));
        oo_chart_style_to_series (xin, state->chart.i_plot_styles[OO_CHART_STYLE_SERIES],


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