[gnumeric] ODF import/export series fill types. [#743613]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] ODF import/export series fill types. [#743613]
- Date: Wed, 28 Jan 2015 19:13:27 +0000 (UTC)
commit 6c62d43af7cb9149e9de3c4dba7bd93df9115c5a
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Wed Jan 28 12:11:25 2015 -0700
ODF import/export series fill types. [#743613]
2015-01-28 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_write_fill_type): new
(odf_write_gog_style_chart): connect odf_write_fill_type
* openoffice-read.c (od_style_prop_chart): read gnm:fill-type
NEWS | 1 +
plugins/openoffice/ChangeLog | 6 ++++++
plugins/openoffice/openoffice-read.c | 6 ++++++
plugins/openoffice/openoffice-write.c | 14 ++++++++++++++
4 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index b368bc5..c5f2255 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Andreas:
* ODF import/export major & minor chart axis tick marks.
* ODF import/export chart axis min and max formulae.
* Fix ODF export of single cell ranges in graphs. [#743619]
+ * ODF import/export series fill types. [#743613]
Morten:
* xlsx chart import: fix font family name.
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 1b7d141..3461cbf 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,11 @@
2015-01-28 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * openoffice-write.c (odf_write_fill_type): new
+ (odf_write_gog_style_chart): connect odf_write_fill_type
+ * openoffice-read.c (od_style_prop_chart): read gnm:fill-type
+
+2015-01-28 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* openoffice-write.c (odf_write_data_element_range): correctly write single cell
references
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index c544851..1f573fb 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -7101,6 +7101,12 @@ od_style_prop_chart (GsfXMLIn *xin, xmlChar const **attrs)
(style->plot_props,
oo_prop_new_bool ("interpolation-skip-invalid", btmp));
else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]),
+ OO_GNUM_NS_EXT, "fill-type"))
+ style->plot_props = g_slist_prepend
+ (style->plot_props,
+ oo_prop_new_string ("fill-type",
+ CXML2C(attrs[1])));
+ else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]),
OO_NS_DRAW, "stroke")) {
draw_stroke = !attr_eq (attrs[1], "none");
draw_stroke_set = TRUE;
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index f59342b..dfcef51 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -6611,6 +6611,18 @@ odf_write_min_max_series (GnmOOExport *state, GSList const *orig_series)
static void
+odf_write_fill_type (GnmOOExport *state,
+ GogObject const *series)
+{
+ gchar *type_str = NULL;
+
+ if (gnm_object_has_readable_prop (series, "fill-type", G_TYPE_STRING, &type_str)) {
+ gsf_xml_out_add_cstr (state->xml, GNMSTYLE "fill-type", type_str);
+ g_free (type_str);
+ }
+}
+
+static void
odf_write_interpolation_attribute (GnmOOExport *state,
G_GNUC_UNUSED GOStyle const *style,
GogObject const *series)
@@ -7436,6 +7448,8 @@ odf_write_gog_style_chart (GnmOOExport *state, GOStyle const *style, GogObject c
odf_add_bool (state->xml, CHART "link-data-style-to-source", fmt == NULL);
}
+ odf_write_fill_type (state, obj);
+
func = g_hash_table_lookup (state->chart_props_hash, type);
if (func != NULL)
func (state, style, obj);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]