[gnumeric] Fix import of some ODF 1.0 charts. [#626632]



commit e4a9ae7077efee2ed111ef0c4e5d255c45934f3d
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Aug 11 11:03:43 2010 -0600

    Fix import of some ODF 1.0 charts. [#626632]
    
    2010-08-11  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-read.c (oo_plot_area_end): fall back to
    	  chart:plot-area table:cell-range-address if no series were
    	  directly specified.

 NEWS                                 |    1 +
 plugins/openoffice/ChangeLog         |    6 ++++++
 plugins/openoffice/openoffice-read.c |   10 +++++++---
 3 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index 12a5b9f..253a4d3 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Andreas:
 	* Make the tooltips theme-independent. [#625966]
 	* Adjust and fix WORKDAY and NETWORKDAY.
 	* Fix crash on certain handcrafted ODF files. [#626632]
+	* Fix import of some ODF 1.0 charts. [#626632]
 
 Jean:
 	* Import Guppi graphs from gnumeric-1.0.x files. [#567953]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 50a5e35..fe30238 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,11 @@
 2010-08-11  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* openoffice-read.c (oo_plot_area_end): fall back to 
+	  chart:plot-area table:cell-range-address if no series were 
+	  directly specified.
+
+2010-08-11  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* openoffice-read.c (oo_chart_axis): check for NULL style_name
 
 2010-07-30  Morten Welinder <terra gnome org>
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index e87e96b..89ebb9d 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -3803,9 +3803,13 @@ oo_plot_area_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
 		odf_create_stock_plot (xin);
 		go_slist_free_custom (state->chart.list, g_free);
 		state->chart.list = NULL;
-	} else if (state->chart.series != NULL) {
-		oo_plot_assign_dim (xin, NULL, GOG_MS_DIM_VALUES, NULL);
-		state->chart.series = NULL;
+	} else {
+		if (state->chart.series_count == 0 && state->chart.series == NULL)
+			state->chart.series = gog_plot_new_series (state->chart.plot);
+		if (state->chart.series != NULL) {
+			oo_plot_assign_dim (xin, NULL, GOG_MS_DIM_VALUES, NULL);
+			state->chart.series = NULL;
+		}
 	}
 	state->chart.plot = NULL;
 	g_slist_free (state->chart.these_plot_styles);



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