[gnumeric] Fix chart size in ODF import. [#728197]



commit d2e62b8d432f8f5c07523af1b57b63b4bf7dd964
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Wed Apr 16 21:15:15 2014 -0600

    Fix chart size in ODF import. [#728197]
    
    2014-04-16  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-read.c (oo_plot_area): default to manual size
        if a manual size is given

 NEWS                                 |    3 +++
 plugins/openoffice/ChangeLog         |    5 +++++
 plugins/openoffice/openoffice-read.c |    9 +++++----
 3 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/NEWS b/NEWS
index 06df652..fe3abc5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 Gnumeric 1.12.15
 
+Andreas:
+       * Fix chart size in ODF import. [#728197]
+
 Morten:
        * For xlsx, don't complain over "ext" elements.
 
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index b2e54f3..00e28d0 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-16  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * openoffice-read.c (oo_plot_area): default to manual size
+       if a manual size is given
+
 2014-04-15  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * openoffice-read.c (odf_parse_float): delete
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index c732566..b3d9caa 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -8567,12 +8567,9 @@ oo_plot_area (GsfXMLIn *xin, xmlChar const **attrs)
        gog_object_add_by_name (GOG_OBJECT (state->chart.chart),
                "Plot", GOG_OBJECT (state->chart.plot));
 
-       oo_prop_list_apply (prop_list, G_OBJECT (state->chart.chart));
-       oo_prop_list_free (prop_list);
-
        if (state->chart.i_plot_styles[OO_CHART_STYLE_PLOTAREA] != NULL)
                oo_prop_list_apply (state->chart.i_plot_styles[OO_CHART_STYLE_PLOTAREA]->
-                                   plot_props, G_OBJECT (state->chart.plot));
+                                   plot_props, G_OBJECT (state->chart.plot));  
 
        if (go_finite (x) && go_finite (y) &&
            go_finite (width) && go_finite (height) &&
@@ -8586,6 +8583,7 @@ oo_plot_area (GsfXMLIn *xin, xmlChar const **attrs)
                        gog_object_set_position_flags (GOG_OBJECT (state->chart.chart),
                                                       GOG_POSITION_MANUAL, GOG_POSITION_ANY_MANUAL);
                        gog_object_set_manual_position (GOG_OBJECT (state->chart.chart), &alloc);
+                       g_object_set (G_OBJECT (state->chart.chart), "manual-size", "size", NULL);
 
                        state->chart.plot_area_x = x;
                        state->chart.plot_area_y = y;
@@ -8596,6 +8594,9 @@ oo_plot_area (GsfXMLIn *xin, xmlChar const **attrs)
                        oo_legend_set_position (state);
                }
 
+       oo_prop_list_apply (prop_list, G_OBJECT (state->chart.chart));
+       oo_prop_list_free (prop_list);
+
        if (state->chart.plot_type == OO_PLOT_GANTT) {
                GogObject *yaxis = gog_object_get_child_by_name (GOG_OBJECT (state->chart.chart),
                                                                 "Y-Axis");


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