[gnumeric] Don't include foreign attribute values when saving in ODF without foreign elements



commit 5816d0a87d7ce8ada589d34fdabee3f490f57872
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Mon Apr 4 20:31:45 2011 -0600

    Don't include foreign attribute values when saving in ODF without foreign elements
    
    2011-04-04  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-write.c (odf_write_interpolation_attribute):
    	only include foreign attribute values if asked to do
    	(odf_write_axis_style): ditto

 plugins/openoffice/ChangeLog          |    6 ++++++
 plugins/openoffice/openoffice-write.c |   32 +++++++++++++++++++-------------
 2 files changed, 25 insertions(+), 13 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 1e71c95..579537a 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-04  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* openoffice-write.c (odf_write_interpolation_attribute):
+	only include foreign attribute values if asked to do
+	(odf_write_axis_style): ditto
+
 2011-03-24  Morten Welinder <terra gnome org>
 
 	* Release 1.10.14
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index d5b7c73..f419a4a 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -5067,12 +5067,14 @@ odf_write_interpolation_attribute (GnmOOExport *state, GOStyle const *style, Gog
 			gsf_xml_out_add_cstr
 				(state->xml, CHART "interpolation",
 				 "cubic-spline");
-		else {
+		else if (state->with_extension) {
 			char *tag = g_strdup_printf ("gnm:%s", interpolation);
 			gsf_xml_out_add_cstr
 				(state->xml, CHART "interpolation", tag);
 			g_free (tag);
-		}
+		} else
+			gsf_xml_out_add_cstr
+				(state->xml, CHART "interpolation", "none");
 	}
 
 	g_free (interpolation);
@@ -5158,18 +5160,22 @@ odf_write_plot_style (GnmOOExport *state, GogObject const *plot)
 
 	if (state->with_extension) {
 		if (0 == strcmp ( "XLSurfacePlot", plot_type))
-			odf_add_bool (state->xml, GNMSTYLE "multi-series", TRUE);
+			odf_add_bool (state->xml, GNMSTYLE "multi-series", 
+				      TRUE);
 		odf_write_plot_style_bool (state->xml, plot, klass,
-				   "outliers", GNMSTYLE "outliers");
-
-	odf_write_plot_style_double (state->xml, plot, klass,
-				     "radius-ratio", GNMSTYLE "radius-ratio");
-
-	odf_write_plot_style_bool (state->xml, plot, klass,
-				   "vary-style-by-element", GNMSTYLE "vary-style-by-element");
+					   "outliers", GNMSTYLE "outliers");
 
-	odf_write_plot_style_bool (state->xml, plot, klass,
-				   "show-negatives", GNMSTYLE "show-negatives");
+		odf_write_plot_style_double (state->xml, plot, klass,
+					     "radius-ratio", GNMSTYLE 
+					     "radius-ratio");
+		
+		odf_write_plot_style_bool (state->xml, plot, klass,
+					   "vary-style-by-element", 
+					   GNMSTYLE "vary-style-by-element");
+		
+		odf_write_plot_style_bool (state->xml, plot, klass,
+				   "show-negatives", 
+					   GNMSTYLE "show-negatives");
 	}
 
 
@@ -5236,7 +5242,7 @@ odf_write_axis_style (GnmOOExport *state, GOStyle const *style, GogObject const
 		odf_write_plot_style_bool
 			(state->xml, axis, klass,
 			 "invert-axis", CHART "reverse-direction");
-	else
+	else if (state->with_extension)
 		odf_write_plot_style_bool
 			(state->xml, axis, klass,
 			 "invert-axis", GNMSTYLE "reverse-direction");



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