[goffice] Support new foreign element in ODF export of time styles



commit 4e129950f701d6a6ccd266c7fe5fd1f2be68d488
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Fri Jan 1 17:06:56 2016 -0700

    Support new foreign element in ODF export of time styles
    
    2016-01-01 Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * utils/go-format.c (go_format_output_date_to_odf): write
        gnm:style attribute of number:style

 ChangeLog                 |    5 +++++
 NEWS                      |    3 +++
 goffice/utils/go-format.c |   10 ++++++++++
 3 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 986e64f..efd6b23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-01 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * utils/go-format.c (go_format_output_date_to_odf): write
+       gnm:style attribute of number:style
+
 2015-12-28  Morten Welinder <terra gnome org>
 
        * configure.ac: Post-release bump.
diff --git a/NEWS b/NEWS
index 5435a1a..5e95849 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 goffice 0.10.27:
 
+Andreas:
+       * Support new foreign element in ODF export of time styles
+
 --------------------------------------------------------------------------
 goffice 0.10.26:
 
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index e32ef02..e9cbf73 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -7918,6 +7918,16 @@ go_format_output_date_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
                }
 
                case TOK_AMPM3:
+                       if (seen_elapsed || seen_ampm) break;
+                       seen_ampm = TRUE;
+                       ODF_CLOSE_STRING;
+                       element_written = TRUE;
+                       gsf_xml_out_start_element (xout, NUMBER "am-pm");
+                       if (with_extension)
+                               gsf_xml_out_add_cstr (xout, GNMSTYLE "style", "short");                 
+                       gsf_xml_out_end_element (xout); /* </number:am-pm> */
+                       break;
+
                case TOK_AMPM5:
                        if (seen_elapsed || seen_ampm) break;
                        seen_ampm = TRUE;


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