GNOME Bugzilla – Bug 686575
Regression in go-format for formats.xls (4 failures)
Last modified: 2012-11-10 01:21:23 UTC
This change from commit 49e69749a1e8553d62b1eb52528246ae679fb713 - magic_fmt_str = go_format_magic_fmt_str (state.locale.locale); + magic_fmt_str = go_format_magic_fmt_str (state.locale.locale & 0xffff); causes the DateTime!H203 test from formats.xls to fail. ommit 49e69749a1e8553d62b1eb52528246ae679fb713 Author: Andreas J Guelzow <aguelzow@pyrshep.ca> Date: Fri Dec 23 16:25:16 2011 -0700 Change the shape of signs as requested 2011-12-23 Andreas J. Guelzow <aguelzow@pyrshep.ca> * goffice/utils/go-format.c (go_format_parse_locale): allow for 33 bit locale (handle_common_token): handle shape-flags (go_format_parse_number_new_1): write sign after common tokens (go_format_parse): just look at the locale part for the magic (go_format_dump_program): separate shape flags from shape (plus_shapes): new (convert_minus): change into convert_sign (INSERT_PLUS): new (INSERT_MINUS): look at the right part of the flag (go_format_execute): consider shape_flags, use shapes for non-markup scientific format
> (go_format_parse_number_new_1): write sign after common tokens And that one sure is a suspect in the remaining five failures in formats.xls
The dd-mmmm-yyyy[$-100f800] issue is fixed. There are four failures remaining in formats.xls.
Those remaining failures clearly come from the changes mentioned in comment #1: @@ -1711,12 +1718,13 @@ go_format_parse_number_new_1 (GString *prg, GOFormatParseState *pstate, if (thousands && !inhibit_thousands) ADD_OP (OP_NUM_ENABLE_THOUSANDS); } - ADD_OP (OP_NUM_SIGN); for (i = tno_start; i < tno_numstart; i++) { const GOFormatParseItem *ti = &GET_TOKEN(i); handle_common_token (ti->tstr, ti->token, prg); } + /* OP_NUM_SIGN requires that we already know the shape and shape-flags */ + ADD_OP (OP_NUM_SIGN); if (E_part == 1) { #ifdef ALLOW_EE_MARKUP But as the comment indicates we need to know the shape of characters before we can set the sign. So this may be non-trivial to fix correctly.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.