[goffice] Improve ODF 1.2 output of fraction format.



commit 9b5a22ded5fc0a886cfa2db983618fb5b17520d1
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Jun 8 23:04:06 2011 -0600

    Improve ODF 1.2 output of fraction format.
    
    2011-06-08  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* goffice/utils/go-format.c (go_format_output_fraction_to_odf): in
    	ODF 1.2 we do not need to use gnm:no-integer-part any more

 ChangeLog                 |    5 +++++
 NEWS                      |    3 +++
 goffice/utils/go-format.c |    8 ++------
 3 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 225492f..6424398 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-08  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* goffice/utils/go-format.c (go_format_output_fraction_to_odf): in 
+	ODF 1.2 we do not need to use gnm:no-integer-part any more
+
 2011-05-24  Morten Welinder  <terra gnome org>
 
 	* goffice/utils/go-format.c (go_format_execute): Remove "-" from
diff --git a/NEWS b/NEWS
index c4190fb..4216266 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 goffice 0.8.16:
 
+Andreas:
+	* Improve ODF 1.2 output of fraction format.
+
 Morten:
 	* Fix long-double compilation issue.
 	* Improve accuracy of complex power.
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index 6c62419..5bddbd4 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -6067,12 +6067,8 @@ go_format_output_fraction_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
 
 			if (int_digits >= 0)
 				gsf_xml_out_add_int (xout, NUMBER "min-integer-digits", int_digits);
-			else {
-				gsf_xml_out_add_int (xout, NUMBER "min-integer-digits", 0);
-				if (with_extension)
-					gsf_xml_out_add_cstr_unchecked
-						(xout, GNMSTYLE "no-integer-part", "true");
-			}
+			/* In ODF1.2, absence of NUMBER "min-integer-digits" means not to show an       */
+			/* integer part. In ODF 1.1 we used a foreign element: gnm:no-integer-part=true */
 			gsf_xml_out_add_int (xout, NUMBER "min-numerator-digits",
 					     min_numerator_digits);
 			gsf_xml_out_end_element (xout); /* </number:fraction> */



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