[gnumeric] xlsx: write more sheet widgets.



commit 1ba8659d871d0231e9f6595f0a8beeecfc7a0ab1
Author: Morten Welinder <terra gnome org>
Date:   Sat Feb 7 10:07:34 2015 -0500

    xlsx: write more sheet widgets.

 plugins/excel/xlsx-write-drawing.c |   17 ++++++++++++++++-
 plugins/excel/xlsx-write.c         |    6 +++++-
 2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/plugins/excel/xlsx-write-drawing.c b/plugins/excel/xlsx-write-drawing.c
index ecef44b..d453f69 100644
--- a/plugins/excel/xlsx-write-drawing.c
+++ b/plugins/excel/xlsx-write-drawing.c
@@ -1130,10 +1130,25 @@ xlsx_write_legacy_drawing_objects (XLSXWriteState *state, GsfOutput *sheet_part,
                }
 
                gsf_xml_out_start_element (xml, "x:ClientData");
-               if (GNM_IS_SOW_SCROLLBAR (so)) {
+               if (GNM_IS_SOW_SCROLLBAR (so) || GNM_IS_SOW_SLIDER (so)) {
                        otype = "Scroll";
                        tlink = sheet_widget_adjustment_get_link (so);
                        adj = sheet_widget_adjustment_get_adjustment (so);
+               } else if (GNM_IS_SOW_SPINBUTTON (so)) {
+                       otype = "Spin";
+                       tlink = sheet_widget_adjustment_get_link (so);
+                       adj = sheet_widget_adjustment_get_adjustment (so);
+               } else if (GNM_IS_SOW_BUTTON (so)) {
+                       otype = "Button";
+                       tlink = sheet_widget_button_get_link (so);
+               } else if (GNM_IS_SOW_RADIO_BUTTON (so)) {
+                       otype = "Radio";
+                       tlink = sheet_widget_radio_button_get_link (so);
+               } else if (GNM_IS_SOW_CHECKBOX (so)) {
+                       otype = "Checkbox";
+                       tlink = sheet_widget_checkbox_get_link (so);
+               } else {
+                       g_assert_not_reached ();
                }
                gsf_xml_out_add_cstr_unchecked (xml, "ObjectType", otype);
                gsf_xml_out_start_element (xml, "x:Anchor");
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index 4e87b8c..68b4047 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -2710,7 +2710,11 @@ xlsx_write_sheet (XLSXWriteState *state, GsfOutfile *dir, GsfOutfile *wb_part, u
                        comments = g_slist_prepend (comments, so);
                else if (IS_SHEET_OBJECT_GRAPH (so))
                        drawing_objs = g_slist_prepend (drawing_objs, so);
-               else if (GNM_IS_SOW_SCROLLBAR (so))
+               else if (GNM_IS_SOW_SCROLLBAR (so) || GNM_IS_SOW_SLIDER (so) ||
+                        GNM_IS_SOW_SPINBUTTON (so) ||
+                        GNM_IS_SOW_BUTTON (so) ||
+                        GNM_IS_SOW_RADIO_BUTTON (so) ||
+                        GNM_IS_SOW_CHECKBOX (so))
                        legacy_drawing_objs = g_slist_prepend (legacy_drawing_objs, so);
                else if (IS_GNM_FILTER_COMBO (so))
                        ; /* Nothing here */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]