gnumeric r16454 - trunk/plugins/excel



Author: jbrefort
Date: Fri Mar  7 16:29:27 2008
New Revision: 16454
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16454&view=rev

Log:
2008-03-07  Jean Brefort  <jean brefort normalesup org>

	* xlsx-read.c: (xlsx_chart_text): create GnmGOData instead
	of GOData, (xlsx_axis_cleanup): do not unref a non deletable axis.



Modified:
   trunk/plugins/excel/ChangeLog
   trunk/plugins/excel/xlsx-read.c

Modified: trunk/plugins/excel/xlsx-read.c
==============================================================================
--- trunk/plugins/excel/xlsx-read.c	(original)
+++ trunk/plugins/excel/xlsx-read.c	Fri Mar  7 16:29:27 2008
@@ -1528,14 +1528,17 @@
 		GogObject *label = gog_object_add_by_name (state->cur_obj,
 			(state->cur_obj == (GogObject *)state->chart) ? "Title" : "Label", NULL);
 		if (NULL != label) {
+			GnmValue *value = value_new_string_nocopy (state->chart_tx);
+			GnmExprTop const *texpr = gnm_expr_top_new_constant (value);
 			gog_dataset_set_dim (GOG_DATASET (label), 0,
-				go_data_scalar_str_new (state->chart_tx, TRUE), NULL);
+				gnm_go_data_scalar_new_expr (state->sheet, texpr), NULL);
 			state->chart_tx = NULL;
 		}
 	}
 	g_free (state->chart_tx);
 	state->chart_tx = NULL;
 }
+
 static void
 xlsx_chart_text_content (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
 {
@@ -1917,8 +1920,10 @@
 	for (ptr = list; ptr != NULL ; ptr = ptr->next)
 		if (IS_GOG_AXIS (ptr->data) &&
 		    NULL == g_hash_table_lookup (state->axis.by_obj, ptr->data)) {
-			gog_object_clear_parent	(GOG_OBJECT (ptr->data));
-			g_object_unref (G_OBJECT (ptr->data));
+			if (gog_object_is_deletable (GOG_OBJECT (ptr->data))) {
+				gog_object_clear_parent	(GOG_OBJECT (ptr->data));
+				g_object_unref (G_OBJECT (ptr->data));
+			}
 		}
 	g_slist_free (list);
 



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