[goffice] Fix recognition of formats with SI prefix by format selector. [#665303]



commit d8dd17e988feb005e4e6f83b61ffe4cdfdc5124f
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Thu Dec 1 12:10:42 2011 -0700

    Fix recognition of formats with SI prefix by format selector. [#665303]
    
    2011-12-01  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* goffice/utils/go-format.c (go_format_get_details): When
    	looking for the exponent skip the whole EESI/ESI/EE/E marker

 ChangeLog                 |    5 +++++
 NEWS                      |    2 ++
 goffice/utils/go-format.c |    4 ++++
 3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 551a4c0..87b398d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-12-01  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* goffice/utils/go-format.c (go_format_get_details): When
+	looking for the exponent skip the whole EESI/ESI/EE/E marker
+
+2011-12-01  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* goffice/utils/go-format.c (go_format_get_details): do not
 	mistake the scale symbol as mantissa
 
diff --git a/NEWS b/NEWS
index 3b9b25e..b718dfb 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ goffice 0.9.2:
 Andreas:
 	* Improve sensitivity handling of SI related widgets in format selector.
 	* Fix scientific format with SI prefix selection. [#665301]
+	* Fix recognition of formats with SI prefix by format selector. 
+	[#665303]
 
 --------------------------------------------------------------------------
 goffice 0.9.1:
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index e8fef85..a76fc58 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -6180,6 +6180,10 @@ go_format_get_details (GOFormat const *fmt,
 			dst->exponent_digits = 0;
 			if (dst->use_markup) epos++;
 			epos++;
+			if (dst->use_markup)
+				epos++;
+			if (dst->append_SI)
+				epos += 2;
 			if (epos[0] == '+' || epos[0] == '-')
 				epos++;
 			while (epos[0] == '0' || epos[0] == '#' || epos[0] == '?') {



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