[gnumeric] Import cubic splines from ODF using the compatible splines.



commit 0616064b0daadcf90543ef6c7f85a1f8b28427d2
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sun Feb 5 17:33:36 2012 +0100

    Import cubic splines from ODF using the compatible splines.

 plugins/openoffice/ChangeLog          |    6 ++++++
 plugins/openoffice/openoffice-read.c  |    2 +-
 plugins/openoffice/openoffice-write.c |    5 +++++
 3 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index f7dee6e..da5d787 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-05  Jean Brefort  <jean brefort normalesup org>
+
+	* openoffice-read.c (od_style_prop_chart): implrt cubic splies as the new
+	odf compatible spline.
+	* openoffice-write.c (odf_write_interpolation_attribute): export odf-spline.
+
 2011-11-27  Morten Welinder <terra gnome org>
 
 	* Release 1.11.1
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index c959c22..6d962f0 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -6109,7 +6109,7 @@ od_style_prop_chart (GsfXMLIn *xin, xmlChar const **attrs)
 						"Bezier cubic spline instead."),
 					 CXML2C(attrs[1]));
 			} else if (attr_eq (attrs[1], "cubic-spline"))
-				interpolation = "spline";
+				interpolation = "odf-spline";
 			else if (g_str_has_prefix (CXML2C(attrs[1]), "gnm:"))
 				interpolation = CXML2C(attrs[1]) + 4;
 			else oo_warning
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 682e1a8..57040b1 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -6085,6 +6085,11 @@ odf_write_interpolation_attribute (GnmOOExport *state,
 			gsf_xml_out_add_cstr
 				(state->xml, CHART "interpolation",
 				 "cubic-spline");
+		else if (0 == strcmp (interpolation, "odf-spline"))
+			/* this one is really compatible with ODF */
+			gsf_xml_out_add_cstr
+				(state->xml, CHART "interpolation",
+				 "cubic-spline");
 		else if (state->with_extension) {
 			char *tag = g_strdup_printf ("gnm:%s", interpolation);
 			gsf_xml_out_add_cstr



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