[gnumeric] xslx: fix rainbow effect in XL.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xslx: fix rainbow effect in XL.
- Date: Wed, 21 Jan 2015 15:54:46 +0000 (UTC)
commit dc1cba475cc551616436f2c0004696c883928d13
Author: Morten Welinder <terra gnome org>
Date: Wed Jan 21 10:54:18 2015 -0500
xslx: fix rainbow effect in XL.
plugins/excel/ChangeLog | 5 +++++
plugins/excel/xlsx-write-drawing.c | 9 ++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index c7c2514..e4f339b 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-21 Morten Welinder <terra gnome org>
+
+ * xlsx-write-drawing.c (xlsx_write_one_plot): varyColor defaults
+ to TRUE, so be sure to output it for line plots etc.
+
2015-01-20 Morten Welinder <terra gnome org>
* xlsx-write-drawing.c (xlsx_write_one_plot): Initial export of
diff --git a/plugins/excel/xlsx-write-drawing.c b/plugins/excel/xlsx-write-drawing.c
index 1d67558..455ca8b 100644
--- a/plugins/excel/xlsx-write-drawing.c
+++ b/plugins/excel/xlsx-write-drawing.c
@@ -425,6 +425,7 @@ xlsx_write_one_plot (XLSXWriteState *state, GsfXMLOut *xml, GogObject const *cha
case XLSX_PT_GOGAREAPLOT:
gsf_xml_out_start_element (xml, "c:areaChart");
xlsx_write_plot_1_5_type (xml, plot, FALSE);
+ xlsx_write_chart_bool (xml, "c:varyColors", vary_by_element);
break;
case XLSX_PT_GOGBARCOLPLOT: {
@@ -441,18 +442,20 @@ xlsx_write_one_plot (XLSXWriteState *state, GsfXMLOut *xml, GogObject const *cha
horizontal ? "bar" : "col");
xlsx_write_plot_1_5_type (xml, plot, TRUE);
+ xlsx_write_chart_bool (xml, "c:varyColors", vary_by_element);
break;
}
case XLSX_PT_GOGLINEPLOT:
gsf_xml_out_start_element (xml, "c:lineChart");
xlsx_write_plot_1_5_type (xml, plot, FALSE);
+ xlsx_write_chart_bool (xml, "c:varyColors", vary_by_element);
break;
case XLSX_PT_GOGPIEPLOT:
- case XLSX_PT_GOGRINGPLOT: {
- gint16 center = 0;
+ case XLSX_PT_GOGRINGPLOT:
if (plot_type == XLSX_PT_GOGRINGPLOT) {
+ gint16 center;
double center_size;
gsf_xml_out_start_element (xml, "c:doughnutChart");
g_object_get (G_OBJECT (plot), "center-size", ¢er_size, NULL);
@@ -472,7 +475,6 @@ xlsx_write_one_plot (XLSXWriteState *state, GsfXMLOut *xml, GogObject const *cha
axis_type[0] = axis_type[1] = GOG_AXIS_UNKNOWN;
g_object_get (G_OBJECT (plot), "default-separation", &explosion, NULL);
break;
- }
case XLSX_PT_GOGRADARPLOT:
case XLSX_PT_GOGRADARAREAPLOT:
@@ -504,6 +506,7 @@ xlsx_write_one_plot (XLSXWriteState *state, GsfXMLOut *xml, GogObject const *cha
use_xy = TRUE;
gsf_xml_out_start_element (xml, "c:scatterChart");
xlsx_write_chart_cstr_unchecked (xml, "c:scatterStyle", style);
+ xlsx_write_chart_bool (xml, "c:varyColors", vary_by_element);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]