GNOME Bugzilla – Bug 657187
failure to select correct format
Last modified: 2011-08-23 20:33:13 UTC
In Gnumeric I have enabled the markup selector for scientific formats by calling go_format_sel_new_full with argument TRUE. This seems to work just fine except when opening the format selector with a scientific format selected that uses markup, ie. 0EE+00 or so. In this case the custom page is shown rather than the more desirable scientific format page.
The problem seems to lie with go_format_get_details. When called with #E+00 it returns (gdb) p *details $6 = {family = GO_FORMAT_SCIENTIFIC, magic = GO_FORMAT_MAGIC_NONE, min_digits = 0, num_decimals = 0, thousands_sep = 0, negative_red = 0, negative_paren = 0, currency = 0x0, force_quoted = 0, exponent_step = 1, exponent_digits = 0, use_markup = 0, simplify_mantissa = 1, expansion = {0 <repeats 30 times>}} and sets exact to FALSE. I would think that: exponent_digits should be 2 use_markup should be 1 and exact should be true
Note that #E+00 should in fact bring up the custom format page since the minimum integer digits of the mantissa are not 1, but 0EE+00 should bring up the scientific formatting page.
Since the scientific format selector has a "Don't show 1xs" checkbox my comment #2 was incorrect. 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.