[goffice] Fix rendering of fraction formats in locales with ' ' as thousand separator. [#686471]



commit c037e6b8be57b37d0d8e4ab94d23e5d6e0e66675
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Thu Nov 15 15:13:46 2012 -0700

    Fix rendering of fraction formats in locales with ' ' as thousand separator. [#686471]
    
    2012-11-15 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* goffice/utils/go-format.c (go_format_str_delocalize): delocalize
    	"\ " to " "

 ChangeLog                 |    5 +++++
 NEWS                      |    4 +++-
 goffice/utils/go-format.c |    6 ++++++
 3 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 71adf5a..5e7fb9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-15 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* goffice/utils/go-format.c (go_format_str_delocalize): delocalize
+	"\ " to " "
+
 2012-11-14  Jean Brefort  <jean brefort normalesup org>
 
 	* goffice/graph/gog-renderer.c (gog_renderer_get_pixbuf),
diff --git a/NEWS b/NEWS
index 66c0242..b4fc8d1 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,9 @@ Andreas:
 	* Fix some magic date handling. [#686575]
 	* Fix placement of minus sign. [#686575]
 	* Add 'force exponent sign' checkbox to format selector. [#686481]
-	* Fix export of scientific number format to ODF. 
+	* Fix export of scientific number format to ODF.
+	* Fix rendering of fraction formats in locales with ' ' as thousand
+	  separator. [#686471]
 
 Chris Leonard:
 	* Updated locales. [#682749]
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index cbbd85f..1b48b2f 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -5408,6 +5408,12 @@ go_format_str_delocalize (char const *str)
 				g_string_append_c (res, ',');
 				break;
 
+			case TOK_ESCAPED_CHAR:
+				if (ti->tstr[1] == ' ') {
+					g_string_append_c (res, ' ');
+					break;
+				}
+				/* no break */
 			default:
 				if (*tstr == '.' &&
 				    (state.is_number || (state.is_date && *str == '0')))



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