[gnumeric] Fix export of non-ODF interpolation types to ODF.
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix export of non-ODF interpolation types to ODF.
- Date: Mon, 19 May 2014 19:38:06 +0000 (UTC)
commit bc3c81a2e466794a1ded3387ec4639a23e79eb97
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Mon May 19 12:47:47 2014 -0600
Fix export of non-ODF interpolation types to ODF.
2014-05-19 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (od_style_prop_chart): use gnm:interpolation rather
than using an invalid attirbute value with chart:interpolation
* openoffice-read.c (od_style_prop_chart): handle gnm:interpolation
NEWS | 1 +
plugins/openoffice/ChangeLog | 6 ++++++
plugins/openoffice/openoffice-read.c | 11 +++++++----
plugins/openoffice/openoffice-write.c | 2 +-
4 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/NEWS b/NEWS
index bdc8ab2..061f4e7 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Gnumeric 1.12.16
Andreas:
* Fix database-range import from ODF. [#730197]
* Improve chart roundtrip through ODF. [#728197]
+ * Fix export of non-ODF interpolation types to ODF.
Morten:
* Start moving off GtkUIManager.
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index c33dbf1..91baa81 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,9 @@
+2014-05-19 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-write.c (od_style_prop_chart): use gnm:interpolation rather
+ than using an invalid attirbute value with chart:interpolation
+ * openoffice-read.c (od_style_prop_chart): handle gnm:interpolation
+
2014-05-18 Morten Welinder <terra gnome org>
* openoffice-read.c (odf_apply_style_props): For markers, map only
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 53e2841..3557212 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -6865,6 +6865,8 @@ od_style_prop_chart (GsfXMLIn *xin, xmlChar const **attrs)
gboolean stacked_unset = FALSE;
gboolean overlap_set = FALSE;
gboolean percentage_set = FALSE;
+ char const *interpolation = NULL;
+
g_return_if_fail (style != NULL ||
state->default_style.cells != NULL);
@@ -7007,10 +7009,11 @@ od_style_prop_chart (GsfXMLIn *xin, xmlChar const **attrs)
style->style_props = g_slist_prepend
(style->style_props,
oo_prop_new_double ("symbol-height", ftmp));
- } else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]),
- OO_NS_CHART, "interpolation")) {
- char const *interpolation = NULL;
-
+ } else if ((interpolation == NULL) &&
+ (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]),
+ OO_NS_CHART, "interpolation") ||
+ gsf_xml_in_namecmp (xin, CXML2C (attrs[0]),
+ OO_GNUM_NS_EXT, "interpolation"))) {
if (attr_eq (attrs[1], "none"))
interpolation = "linear";
else if (attr_eq (attrs[1], "b-spline")) {
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 6049ffc..ebb88a6 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -6487,7 +6487,7 @@ odf_write_interpolation_attribute (GnmOOExport *state,
else if (state->with_extension) {
char *tag = g_strdup_printf ("gnm:%s", interpolation);
gsf_xml_out_add_cstr
- (state->xml, CHART "interpolation", tag);
+ (state->xml, GNMSTYLE "interpolation", tag);
g_free (tag);
} else
gsf_xml_out_add_cstr
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]