After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657187 - failure to select correct format
failure to select correct format
Status: RESOLVED FIXED
Product: libgoffice
Classification: Other
Component: Gtk+
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2011-08-23 18:04 UTC by Andreas J. Guelzow
Modified: 2011-08-23 20:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andreas J. Guelzow 2011-08-23 18:04:44 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.
Comment 1 Andreas J. Guelzow 2011-08-23 18:19:15 UTC
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
Comment 2 Andreas J. Guelzow 2011-08-23 20:18:14 UTC
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.
Comment 3 Andreas J. Guelzow 2011-08-23 20:33:13 UTC
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.