[gnumeric] Fix export of comboboxes to ODF.



commit c81052a9e9c5349534e65a92184993117efdf23a
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Wed Mar 5 22:28:54 2014 -0700

    Fix export of comboboxes to ODF.
    
    2014-03-05  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-write.c (odf_write_sheet_control_list): add argument
        to diffferentiate list-boxes and change all callers.

 NEWS                                  |    3 +++
 plugins/excel/xlsx-write.c            |    2 +-
 plugins/openoffice/ChangeLog          |    5 +++++
 plugins/openoffice/openoffice-write.c |   16 ++++++++--------
 4 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/NEWS b/NEWS
index e166d8e..08731dc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 Gnumeric 1.12.13
 
+Andreas:
+       * Fix export of comboboxes to ODF.
+
 Morten:
        * Support volatile functions.  [#305798]
 
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index 104f607..1c52bc3 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -10,7 +10,7 @@
  * License, or (at your option) version 3.
  *
  * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * but WITHOUT ANY WARRANTY; without even the implied warranty ofis_collapsed
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 6a76e24..7618b7c 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-05  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * openoffice-write.c (odf_write_sheet_control_list): add argument
+       to diffferentiate list-boxes and change all callers.
+
 2014-03-03  Morten Welinder <terra gnome org>
 
        * Release 1.12.12
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 39d1f6c..3626350 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -4014,7 +4014,7 @@ odf_write_sheet_control_frame (GnmOOExport *state, SheetObject *so)
 
 static void
 odf_write_sheet_control_list (GnmOOExport *state, SheetObject *so,
-                             char const *element)
+                             char const *element, gboolean is_listbox)
 {
        GnmExprTop const *texpr = sheet_widget_list_base_get_result_link (so);
        gboolean as_index = sheet_widget_list_base_result_type_is_index (so);
@@ -4026,17 +4026,17 @@ odf_write_sheet_control_list (GnmOOExport *state, SheetObject *so,
        texpr = sheet_widget_list_base_get_content_link (so);
        odf_write_sheet_control_content (state, texpr);
 
-       if (state->odf_version > 101)
+       if (state->odf_version > 101 && is_listbox)
                gsf_xml_out_add_cstr_unchecked
                        (state->xml, FORM "list-linkage-type",
-                        as_index ? "selection-indexes" : "selection");
+                        as_index ? "selection-indices" : "selection");
        else if (state->with_extension)
                gsf_xml_out_add_cstr_unchecked
                        (state->xml, GNMSTYLE "list-linkage-type",
                         as_index ? "selection-indices" : "selection");
-
-       gsf_xml_out_add_int (state->xml, FORM "bound-column", 1);
-       gsf_xml_out_end_element (state->xml); /* form:checkbox */
+       if (is_listbox)
+               gsf_xml_out_add_int (state->xml, FORM "bound-column", 1);
+       gsf_xml_out_end_element (state->xml); 
 }
 
 static void
@@ -4182,10 +4182,10 @@ odf_write_sheet_controls (GnmOOExport *state)
                        odf_write_sheet_control_radio_button (state, so);
                else if (GNM_IS_SOW_LIST (so))
                        odf_write_sheet_control_list (state, so,
-                                                     FORM "listbox");
+                                                     FORM "listbox", TRUE);
                else if (GNM_IS_SOW_COMBO (so))
                        odf_write_sheet_control_list (state, so,
-                                                     FORM "combobox");
+                                                     FORM "combobox", FALSE);
                else if (GNM_IS_SOW_BUTTON (so))
                        odf_write_sheet_control_button (state, so);
                else if (GNM_IS_SOW_FRAME (so))


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