[gnumeric] ODF: minor style adjustment



commit e3de0caaa26c89fb18649c1657ac6c8d784452fc
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Mon Sep 13 01:44:02 2010 -0600

    ODF: minor style adjustment
    
    2010-09-13  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-read.c (od_style_prop_chart): this can be called
    	  by default cell styles

 plugins/openoffice/ChangeLog         |    5 +++++
 plugins/openoffice/openoffice-read.c |   13 ++++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 2358002..4a957fb 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,4 +1,9 @@
 2010-09-13  Andreas J. Guelzow <aguelzow pyrshep ca>
+	
+	* openoffice-read.c (od_style_prop_chart): this can be called
+	  by default cell styles
+	
+2010-09-13  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* openoffice-read.c (od_style_prop_chart): add attributes
 	(odf_get_arrow_marker): new
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 70ae7e7..615be17 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -4082,9 +4082,10 @@ od_style_prop_chart (GsfXMLIn *xin, xmlChar const **attrs)
 	gboolean draw_stroke_set = FALSE;
 	gboolean draw_stroke;
 
-	if (style == NULL)
-		return;
-	/* FIXME: we just ignored a default style of family graphic */
+	if (style == NULL && state->default_style.cells != NULL) {
+		style = g_new (OOChartStyle, 1);
+	}
+		
 
 	style->grid = FALSE;
 	style->src_in_rows = FALSE;
@@ -4387,6 +4388,12 @@ od_style_prop_chart (GsfXMLIn *xin, xmlChar const **attrs)
 		style->plot_props = g_slist_prepend
 			(style->plot_props,
 			 oo_prop_new_bool ("default-style-has-lines", 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);*/
+		/* We should apply the styles to this GnmStyle */
+		oo_chart_style_free (style);
+	}
 }
 
 static void



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