[gnumeric] more pie odf export/import improvements
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] more pie odf export/import improvements
- Date: Mon, 16 Aug 2010 03:45:45 +0000 (UTC)
commit c035b101c679e87ad59b9a2269956584c22c3ed1
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Sun Aug 15 21:45:04 2010 -0600
more pie odf export/import improvements
2010-08-15 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (od_style_prop_chart): add chart:pie-offset
* openoffice-write.c (odf_write_pie_plot_style): use chart:pie-offset
plugins/openoffice/ChangeLog | 5 +++++
plugins/openoffice/openoffice-read.c | 3 +++
plugins/openoffice/openoffice-write.c | 6 +++---
3 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 607617f..b08b5ba 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,10 @@
2010-08-15 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * openoffice-read.c (od_style_prop_chart): add chart:pie-offset
+ * openoffice-write.c (odf_write_pie_plot_style): use chart:pie-offset
+
+2010-08-15 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* openoffice-read.c (oo_attr_percent): new
(od_style_prop_chart): add more attributes
* openoffice-write.c (odf_write_pie_plot_style): new
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 819114d..5258293 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -3053,6 +3053,9 @@ od_style_prop_chart (GsfXMLIn *xin, xmlChar const **attrs)
} else if (oo_attr_percent (xin, attrs, OO_GNUM_NS_EXT, "default-separation", &ftmp)) {
style->plot_props = g_slist_prepend (style->plot_props,
oo_prop_new_float ("default-separation", ftmp));
+ } else if (oo_attr_int (xin, attrs, OO_NS_CHART, "pie-offset", &tmp)) {
+ style->plot_props = g_slist_prepend (style->plot_props,
+ oo_prop_new_float ("default-separation", tmp/100.));
} else if (oo_attr_percent (xin, attrs, OO_NS_CHART, "hole-size", &ftmp)) {
style->plot_props = g_slist_prepend (style->plot_props,
oo_prop_new_float ("center-size", ftmp));
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 73f24a5..e475417 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -3587,9 +3587,9 @@ odf_write_pie_plot_style (GnmOOExport *state, G_GNUC_UNUSED GogObject const *cha
g_object_get (G_OBJECT (plot),
"default-separation", &default_separation,
NULL);
- if (state->with_extension)
- odf_add_percent (state->xml, GNMSTYLE "default-separation",
- default_separation);
+ gsf_xml_out_add_int (state->xml,
+ CHART "pie-offset",
+ (default_separation * 100. + 0.5));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]