[gnumeric] 2009-05-02 Jean Brefort <jean brefort normalesup org>



commit 140f1b18f6d956dc7fd57f0b2a3257edec4f7b2d
Author: Jean Brefort <jean acer fbx proxad net>
Date:   Sat May 2 22:57:42 2009 +0200

    2009-05-02  Jean Brefort  <jean brefort normalesup org>
    
    	* src/graph.c (render_val): don't crash with a NULL value. [#581120]
    	* ms-chart.c (get_style), (ms_excel_chart_read): use reimplemented
    	gog_style_new().
---
 ChangeLog                |    4 ++++
 NEWS                     |    3 +++
 plugins/excel/ChangeLog  |    5 +++++
 plugins/excel/ms-chart.c |    4 ++--
 src/graph.c              |    8 ++++++--
 5 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7ddb6f8..0c035ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-02  Jean Brefort  <jean brefort normalesup org>
+
+	* src/graph.c (render_val): don't crash with a NULL value. [#581120]
+
 2009-05-01  Morten Welinder  <terra gnome org>
 
 	* src/parse-util.c (r1c1_rangeref_parse): Fix sheet size handling.
diff --git a/NEWS b/NEWS
index ca08cc7..c10af12 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ Andreas:
 	  dialog and the label itself.
 	* Add interface to format cell comments
 
+Jean:
+	* Do not crash in rendr_value for NULL values. [#581120]
+
 Jody:
 	* XLSX start reading external refs.
 	* XL2003-XML enable the use of builtin formats, and drop '.sml' kludge.
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 2e373d8..03dedf8 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-02  Jean Brefort  <jean brefort normalesup org>
+
+	* ms-chart.c (get_style), (ms_excel_chart_read): use reimplemented
+	gog_style_new().
+
 2009-04-28  Jody Goldberg <jody gnome org>
 
 	* xlsx-read.c : initial work on reading external refs.   Still broken
diff --git a/plugins/excel/ms-chart.c b/plugins/excel/ms-chart.c
index dd82524..5e448ef 100644
--- a/plugins/excel/ms-chart.c
+++ b/plugins/excel/ms-chart.c
@@ -202,7 +202,7 @@ static void
 BC_R(get_style) (XLChartReadState *s)
 {
 	if (s->style == NULL)
-		s->style = g_object_new (g_type_from_name ("GogStyle"), NULL);
+		s->style = gog_style_new ();
 }
 
 static int
@@ -3516,7 +3516,7 @@ ms_excel_chart_read (BiffQuery *q, MSContainer *container,
 		state.chart = GOG_CHART (gog_object_add_by_name (GOG_OBJECT (state.graph), "Chart", NULL));
 
 		if (NULL != full_page) {
-			GOStyle *style = go_style_new ();
+			GOStyle *style = gog_style_new ();
 			style->outline.width = 0;
 			style->outline.dash_type = GO_LINE_NONE;
 			style->fill.type = GO_STYLE_FILL_NONE;
diff --git a/src/graph.c b/src/graph.c
index 185f00c..b1523c7 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -76,8 +76,12 @@ static char *
 render_val (GnmValue const *v, int i, int j,
 	    GOFormat const *fmt, GnmEvalPos const *ep)
 {
-	GODateConventions const *date_conv =
-		ep->sheet ? workbook_date_conv (ep->sheet->workbook) : NULL;
+	GODateConventions const *date_conv;
+
+	if (!v)
+		return NULL;
+	
+	date_conv = ep->sheet ? workbook_date_conv (ep->sheet->workbook) : NULL;
 
 #if 0
 	g_printerr ("Rendering %s with fmt=%s\n",



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