[gnumeric] xls: export chart legends with style.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xls: export chart legends with style.
- Date: Mon, 12 Mar 2012 20:07:23 +0000 (UTC)
commit 08c9566c2e99c880393f314291a68cbdd1bb5841
Author: Morten Welinder <terra gnome org>
Date: Mon Mar 12 16:06:56 2012 -0400
xls: export chart legends with style.
NEWS | 1 +
plugins/excel/ChangeLog | 5 +++++
plugins/excel/ms-chart.c | 9 +++++----
plugins/excel/ms-excel-read.c | 5 +++++
4 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/NEWS b/NEWS
index 93e37c9..fea755c 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,7 @@ Morten:
* Fix export of colours to .gnumeric.
* Fix row height xls export rounding issue. [Part of #671513]
* Export paper size to xls.
+ * Improve xls export of chart legends. [Part of #671845]
--------------------------------------------------------------------------
Gnumeric 1.11.2
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 4686671..4ee1f0f 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-12 Morten Welinder <terra gnome org>
+
+ * ms-chart.c (chart_write_LEGEND): Include the style when writing
+ text.
+
2012-03-11 Morten Welinder <terra gnome org>
* ms-excel-write.c (excel_write_SETUP): Export paper size.
diff --git a/plugins/excel/ms-chart.c b/plugins/excel/ms-chart.c
index 32ca50c..ea6e56c 100644
--- a/plugins/excel/ms-chart.c
+++ b/plugins/excel/ms-chart.c
@@ -1025,10 +1025,11 @@ BC_R(fontx)(XLChartHandler const *handle,
{
ExcelFont const *font;
GOFont const *gfont;
+ guint16 fno;
XL_CHECK_CONDITION_VAL (q->length >= 2, FALSE);
- font = excel_font_get (s->container.importer,
- GSF_LE_GET_GUINT16 (q->data));
+ fno = GSF_LE_GET_GUINT16 (q->data);
+ font = excel_font_get (s->container.importer, fno);
if (!font)
return FALSE;
@@ -1036,7 +1037,7 @@ BC_R(fontx)(XLChartHandler const *handle,
go_font_ref (gfont);
BC_R(get_style) (s);
go_style_set_font (s->style, gfont);
- d (2, g_printerr ("apply font %s;", go_font_as_str (gfont)););
+ d (2, g_printerr ("apply font %u %s;", fno, go_font_as_str (gfont)););
return FALSE;
}
@@ -5257,7 +5258,7 @@ chart_write_LEGEND (XLChartWriteState *s, GogObject const *legend)
chart_write_BEGIN (s);
/* BIFF_CHART_pos, optional we use auto positioning */
- chart_write_text (s, NULL, NULL, 0);
+ chart_write_text (s, NULL, GO_STYLED_OBJECT (legend), 0);
chart_write_END (s);
}
GNM_END_KILL_SWITCH_WARNING
diff --git a/plugins/excel/ms-excel-read.c b/plugins/excel/ms-excel-read.c
index 6eb04ca..dac2825 100644
--- a/plugins/excel/ms-excel-read.c
+++ b/plugins/excel/ms-excel-read.c
@@ -1964,6 +1964,11 @@ excel_font_get_gofont (ExcelFont const *efont)
if (NULL == efont->go_font) {
PangoFontDescription *desc = pango_font_description_new ();
+ d (1, { g_printerr ("EFONT: %s %d %d %d\n",
+ efont->fontname,
+ efont->boldness,
+ efont->italic,
+ efont->height); });
#warning FINISH when GOFont is smarter
pango_font_description_set_family (desc, efont->fontname);
pango_font_description_set_weight (desc, efont->boldness);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]