[goffice] export negative red to ODF



commit f8d3ebf8001563b120f3348b930d6dac09d4b366
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Tue Jun 2 02:07:11 2009 -0600

    export negative red to ODF
    
    2009-06-02  Andreas J. Guelzow  <aguelzow pyrshep ca>
    
    	* goffice/utils/go-format.c (go_format_output_number_to_odf): set
    	  text properties for red text
    	(go_format_output_currency_to_odf): ditto
---
 ChangeLog                 |    6 ++++++
 goffice/utils/go-format.c |   10 ++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c233b9f..3d6aa37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-02  Andreas J. Guelzow  <aguelzow pyrshep ca>
+
+	* goffice/utils/go-format.c (go_format_output_number_to_odf): set
+	  text properties for red text
+	(go_format_output_currency_to_odf): ditto
+
 2009-06-01  Andreas J. Guelzow  <aguelzow pyrshep ca>
 
 	* goffice/utils/go-format.h (go_format_output_to_odf): add argument
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index 596e4d7..c1f3208 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -6061,6 +6061,11 @@ go_format_output_number_to_odf (GsfXMLOut *xout, GOFormat const *fmt, char const
 	else 
 		gsf_xml_out_start_element (xout, NUMBER "number-style");
 	gsf_xml_out_add_cstr (xout, STYLE "name", name);
+	if ((cond_part == 1) && dst->negative_red) {
+		gsf_xml_out_start_element (xout, STYLE "text-properties");
+		gsf_xml_out_add_cstr_unchecked (xout, FOSTYLE "color", "#FF0000");
+		gsf_xml_out_end_element (xout); /*<style:text-properties>*/
+	}
 	if (parentheses)
 		gsf_xml_out_simple_element(xout, NUMBER "text", "(");
 	gsf_xml_out_start_element (xout, NUMBER "number");
@@ -6088,6 +6093,11 @@ go_format_output_currency_to_odf (GsfXMLOut *xout, GOFormat const *fmt, char con
 
 	gsf_xml_out_start_element (xout, NUMBER "currency-style");
 	gsf_xml_out_add_cstr (xout, STYLE "name", name);
+	if ((cond_part == 1) && dst->negative_red) {
+		gsf_xml_out_start_element (xout, STYLE "text-properties");
+		gsf_xml_out_add_cstr_unchecked (xout, FOSTYLE "color", "#FF0000");
+		gsf_xml_out_end_element (xout); /*<style:text-properties>*/
+	}
 	if (parentheses)
 		gsf_xml_out_simple_element(xout, NUMBER "text", "(");
 	if (dst->currency->precedes) {



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