[gnumeric] temporarily fix key-value confusion [#628762]



commit be07567e3a38ed2afac4302b2e58e54941f48c04
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Sat Sep 4 10:05:44 2010 -0600

    temporarily fix key-value confusion [#628762]
    
    2010-09-04  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-write.c (odf_get_gradient_name): create a new name for each
    	item
    	(odf_get_image_name): ditto
    	(odf_get_pattern_name): ditto

 plugins/openoffice/ChangeLog          |    7 +++
 plugins/openoffice/openoffice-write.c |   80 ++++++++++++++++----------------
 2 files changed, 47 insertions(+), 40 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 4f3d95e..75b7757 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,12 @@
 2010-09-04  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* openoffice-write.c (odf_get_gradient_name): create a new name for each 
+	item
+	(odf_get_image_name): ditto
+	(odf_get_pattern_name): ditto
+
+2010-09-04  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* openoffice-write.c (odf_write_ooo_settings): new
 	(odf_write_settings): call odf_write_ooo_settings
 
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index af880b1..a3a0c9e 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -4604,32 +4604,32 @@ odf_write_label (GnmOOExport *state, GogObject const *axis)
 
 }
 
-static gboolean
-odf_match_gradient (gchar const *key, GOStyle const *old, GOStyle const *new)
-{
-	gboolean result;
+/* static gboolean */
+/* odf_match_gradient (gchar const *key, GOStyle const *old, GOStyle const *new) */
+/* { */
+/* 	gboolean result; */
 
-	if (old->fill.gradient.brightness != new->fill.gradient.brightness)
-		return FALSE;
+/* 	if (old->fill.gradient.brightness != new->fill.gradient.brightness) */
+/* 		return FALSE; */
 
-	if (old->fill.gradient.brightness >= 0.)
-		result = (old->fill.gradient.brightness == new->fill.gradient.brightness);
-	else
-		result = (old->fill.pattern.fore == new->fill.pattern.fore);
+/* 	if (old->fill.gradient.brightness >= 0.) */
+/* 		result = (old->fill.gradient.brightness == new->fill.gradient.brightness); */
+/* 	else */
+/* 		result = (old->fill.pattern.fore == new->fill.pattern.fore); */
 
-	return (result && (old->fill.gradient.dir == new->fill.gradient.dir) &&
-		(old->fill.pattern.back == new->fill.pattern.back));
-}
+/* 	return (result && (old->fill.gradient.dir == new->fill.gradient.dir) && */
+/* 		(old->fill.pattern.back == new->fill.pattern.back)); */
+/* } */
 
 static gchar *
 odf_get_gradient_name (GnmOOExport *state, GOStyle const* style)
 {
-	gchar const *grad = g_hash_table_find (state->graph_gradients, 
-						(GHRFunc) odf_match_gradient,
-						(gpointer) style);
+/* 	gchar const *grad = g_hash_table_find (state->graph_gradients,  */
+/* 						(GHRFunc) odf_match_gradient, */
+/* 						(gpointer) style); */
 	gchar *new_name;
-	if (grad != NULL)
-		return g_strdup (grad);
+/* 	if (grad != NULL) */
+/* 		return g_strdup (grad); */
 	
 	new_name =  g_strdup_printf ("Gradient-%i", g_hash_table_size (state->graph_gradients));
 	g_hash_table_insert (state->graph_gradients, g_strdup (new_name), 
@@ -4637,22 +4637,22 @@ odf_get_gradient_name (GnmOOExport *state, GOStyle const* style)
 	return new_name;	
 }
 
-static gboolean
-odf_match_image (gchar const *key, GOImage *old, GOImage *new)
-{
-	return go_image_same_pixbuf (old, new);
-}
+/* static gboolean */
+/* odf_match_image (gchar const *key, GOImage *old, GOImage *new) */
+/* { */
+/* 	return go_image_same_pixbuf (old, new); */
+/* } */
 
 
 static gchar *
 odf_get_image_name (GnmOOExport *state, GOStyle const* style)
 {
-	gchar const *image = g_hash_table_find (state->graph_fill_images, 
-						(GHRFunc) odf_match_image,
-						(gpointer) style->fill.image.image);
+/* 	gchar const *image = g_hash_table_find (state->graph_fill_images,  */
+/* 						(GHRFunc) odf_match_image, */
+/* 						(gpointer) style->fill.image.image); */
 	gchar *new_name;
-	if (image != NULL)
-		return g_strdup (image);
+/* 	if (image != NULL) */
+/* 		return g_strdup (image); */
 
 	new_name =  g_strdup_printf ("Fill-Image-%i",
 				     g_hash_table_size (state->graph_fill_images));
@@ -4661,23 +4661,23 @@ odf_get_image_name (GnmOOExport *state, GOStyle const* style)
 	return new_name;
 }
 
-static gboolean
-odf_match_pattern (gchar const *key, GOPattern const *old, GOPattern const *new)
-{
-	return (old->pattern == new->pattern &&
-		old->back == new->back &&
-		old->fore == new->fore);
-}
+/* static gboolean */
+/* odf_match_pattern (gchar const *key, GOPattern const *old, GOPattern const *new) */
+/* { */
+/* 	return (old->pattern == new->pattern && */
+/* 		old->back == new->back && */
+/* 		old->fore == new->fore); */
+/* } */
 
 static gchar *
 odf_get_pattern_name (GnmOOExport *state, GOStyle const* style)
 {
-	gchar const *hatch = g_hash_table_find (state->graph_hatches, 
-						(GHRFunc) odf_match_pattern,
-						(gpointer) &style->fill.pattern);
+/* 	gchar const *hatch = g_hash_table_find (state->graph_hatches,  */
+/* 						(GHRFunc) odf_match_pattern, */
+/* 						(gpointer) &style->fill.pattern); */
 	gchar *new_name;
-	if (hatch != NULL)
-		return g_strdup (hatch);
+/* 	if (hatch != NULL) */
+/* 		return g_strdup (hatch); */
 	
 	new_name =  g_strdup_printf ("Pattern-%i-%i", style->fill.pattern.pattern, 
 				     g_hash_table_size (state->graph_hatches));



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