[gnumeric] Fix export of help messages to ODF.



commit 4868fabd843e6f3242bf4c3b16d4814624a5030c
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Wed Mar 5 23:26:04 2014 -0700

    Fix export of help messages to ODF.
    
    2014-03-05  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-write.c (odf_print_spreadsheet_content_validations):
        fix order of elements

 NEWS                                  |    1 +
 plugins/openoffice/ChangeLog          |    5 +++
 plugins/openoffice/openoffice-write.c |   60 +++++++++++++++++----------------
 3 files changed, 37 insertions(+), 29 deletions(-)
---
diff --git a/NEWS b/NEWS
index 08731dc..b7c2805 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Gnumeric 1.12.13
 
 Andreas:
        * Fix export of comboboxes to ODF.
+       * Fix export of help messages to ODF.
 
 Morten:
        * Support volatile functions.  [#305798]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 7618b7c..05ac584 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,10 @@
 2014-03-05  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+       * openoffice-write.c (odf_print_spreadsheet_content_validations):
+       fix order of elements
+
+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.
 
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 3626350..b8fef25 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -4544,7 +4544,38 @@ odf_print_spreadsheet_content_validations (GnmOOExport *state)
                                        odf_validation_custom (state, val, sheet, sr, &pp);
                                        break;
                                }
+                       }
+
+                       /* writing help message */
+                       if (msg) {
+                               char const  * msg_content = gnm_input_msg_get_msg (msg);
+                               char const  * msg_title = gnm_input_msg_get_title (msg);
                                
+                               if (msg_content != NULL || msg_title != NULL) {
+                                       gsf_xml_out_start_element (state->xml,
+                                                                  TABLE "help-message");
+                                       odf_add_bool (state->xml, TABLE "display", TRUE);
+                                       if (msg_title != NULL)
+                                               gsf_xml_out_add_cstr (state->xml, TABLE "title", msg_title);
+
+                                       if (msg_content != NULL && strlen (msg_content) > 0) {
+                                               gboolean white_written = TRUE;
+                                               gboolean pp = TRUE;
+                                               g_object_get (G_OBJECT (state->xml), "pretty-print", &pp, 
NULL);
+                                               g_object_set (G_OBJECT (state->xml), "pretty-print", FALSE, 
NULL);
+                                               gsf_xml_out_start_element (state->xml, TEXT "p");
+                                               odf_add_chars (state, msg_content, strlen (msg_content), 
+                                                              &white_written);
+                                               gsf_xml_out_end_element (state->xml);   /* p */
+                                               g_object_set (G_OBJECT (state->xml), "pretty-print", pp, 
NULL);
+                                       }
+                                       
+                                       gsf_xml_out_end_element (state->xml);
+                                       /* help message written */
+                               }
+                       }
+
+                       if (val) {      
                                /* writing error message */
                                gsf_xml_out_start_element (state->xml,
                                                           TABLE "error-message");
@@ -4581,35 +4612,6 @@ odf_print_spreadsheet_content_validations (GnmOOExport *state)
                                /* error message written */
                        }
 
-                       /* writing help message */
-                       if (msg) {
-                               char const  * msg_content = gnm_input_msg_get_msg (msg);
-                               char const  * msg_title = gnm_input_msg_get_title (msg);
-                               
-                               if (msg_content != NULL || msg_title != NULL) {
-                                       gsf_xml_out_start_element (state->xml,
-                                                                  TABLE "help-message");
-                                       odf_add_bool (state->xml, TABLE "display", TRUE);
-                                       if (msg_title != NULL)
-                                               gsf_xml_out_add_cstr (state->xml, TABLE "title", msg_title);
-
-                                       if (msg_content != NULL && strlen (msg_content) > 0) {
-                                               gboolean white_written = TRUE;
-                                               gboolean pp = TRUE;
-                                               g_object_get (G_OBJECT (state->xml), "pretty-print", &pp, 
NULL);
-                                               g_object_set (G_OBJECT (state->xml), "pretty-print", FALSE, 
NULL);
-                                               gsf_xml_out_start_element (state->xml, TEXT "p");
-                                               odf_add_chars (state, msg_content, strlen (msg_content), 
-                                                              &white_written);
-                                               gsf_xml_out_end_element (state->xml);   /* p */
-                                               g_object_set (G_OBJECT (state->xml), "pretty-print", pp, 
NULL);
-                                       }
-                                       
-                                       gsf_xml_out_end_element (state->xml);
-                                       /* help message written */
-                               }
-                       }
-
                        gsf_xml_out_end_element (state->xml);
                        /* </table:content-validation> */
                }


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