[gnumeric] xls: merge charts properly into object list
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xls: merge charts properly into object list
- Date: Sun, 11 Mar 2012 19:28:41 +0000 (UTC)
commit 977bca8ef107f962a1f7061b0f4c0d7375a2d8d7
Author: Morten Welinder <terra gnome org>
Date: Sun Mar 11 15:28:07 2012 -0400
xls: merge charts properly into object list
plugins/excel/ChangeLog | 5 +++++
plugins/excel/ms-excel-write.c | 14 ++++++--------
2 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 8097eab..939180b 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-11 Morten Welinder <terra gnome org>
+
+ * ms-excel-write.c (excel_write_obj_v8): Handle graphs here too.
+ (excel_sheet_new): Put graphs into the regular object queue too.
+
2012-03-10 Morten Welinder <terra gnome org>
* ms-excel-write.c (excel_write_DEFAULT_ROW_HEIGHT)
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index ce59bd1..d1b43ad 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -4724,13 +4724,13 @@ excel_write_line_v8 (ExcelWriteSheet *esheet, SheetObject *so)
}
static gsize
-excel_write_obj_v8 (ExcelWriteSheet *esheet,
- SheetObject *so)
+excel_write_obj_v8 (ExcelWriteSheet *esheet, SheetObject *so)
{
+ if (IS_SHEET_OBJECT_GRAPH (so))
+ return excel_write_chart_v8 (esheet, so);
if (IS_GNM_SO_LINE (so))
return excel_write_line_v8 (esheet, so);
- else
- return excel_write_other_v8 (esheet, so);
+ return excel_write_other_v8 (esheet, so);
}
static void
@@ -5304,10 +5304,6 @@ excel_write_objs_v8 (ExcelWriteSheet *esheet)
/* First object commits. */
}
-#warning "handle multiple charts in a graph by creating multiple objects"
- for (ptr = esheet->graphs; ptr != NULL ; ptr = ptr->next)
- len += excel_write_chart_v8 (esheet, ptr->data);
-
for (ptr = esheet->objects; ptr != NULL ; ptr = ptr->next)
len += excel_write_obj_v8 (esheet, ptr->data);
@@ -5520,6 +5516,8 @@ excel_sheet_new (ExcelWriteState *ewb, Sheet *sheet,
if (IS_SHEET_OBJECT_GRAPH (so)) {
/* No derivation for now. */
esheet->graphs = g_slist_prepend (esheet->graphs, so);
+ esheet->objects =
+ g_slist_prepend (esheet->objects, so);
handled = TRUE;
} else if (IS_SHEET_OBJECT_IMAGE (so)) {
SheetObjectImage *soi = SHEET_OBJECT_IMAGE (l->data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]