[goffice] GOFormat: be consistent about multiple [color] for odf.



commit 9ef40ebfc7399e9e7f0a7da0b214e7155fcd92a3
Author: Morten Welinder <terra gnome org>
Date:   Wed Mar 26 12:45:08 2014 -0400

    GOFormat: be consistent about multiple [color] for odf.

 goffice/utils/go-format.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index 54591c7..3d302a0 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -8338,6 +8338,7 @@ go_format_output_text_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
 {
        char const *xl = go_format_as_XL (fmt);
        GString *accum = g_string_new (NULL);
+       gboolean color_completed = FALSE;
 
        gboolean string_is_open = FALSE;
 
@@ -8359,9 +8360,12 @@ go_format_output_text_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
 
                case TOK_COLOR: {
                        GOColor color;
+                       if (color_completed)
+                               break;
                        if (go_format_parse_color (token, &color, NULL, NULL, FALSE)) {
                                ODF_CLOSE_STRING;
                                odf_output_color (xout, color);
+                               color_completed = TRUE;
                        }
                } break;
 


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