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 442657 - Problem setting the number of decimals
Problem setting the number of decimals
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
1.7.x
Other All
: High critical
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2007-05-31 18:37 UTC by mambro
Modified: 2007-06-01 14:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix (1.18 KB, patch)
2007-06-01 13:31 UTC, Morten Welinder
committed Details | Review

Description mambro 2007-05-31 18:37:16 UTC
1. Create a new document
2. write 1,23456 in one cell
3. Select the cell and go to proprieties of the cell
4. Select number of decimals = 2

I get "001" in the cell.
I expect 1,23 

I have 1.7.10 version on gentoo
Comment 1 Morten Welinder 2007-05-31 19:13:44 UTC
I cannot reproduce.

1. What do you see in the cell after you write 1,23456 into it?
   (I am assuming that you are in a locale that uses a decimal comma.)

2. What gcc options were used to compile goffice and gnumeric?
Comment 2 Jody Goldberg 2007-05-31 19:21:31 UTC
What is the output of 'locale'
Comment 3 Andreas J. Guelzow 2007-06-01 01:11:58 UTC
I can replicate in de_DE locale:


Note that when I select Number/2 decimals in the format dialog the preview shows correctly 1,23. When I click 'ok' the cell changes to 001. When I reopen the format dialog, it shows a custom format of 0.00  (That's a period between the zeros!) If I change to custom format 0,00 (comma)  then the preview changes correctly but the cell is unaffected.

My command:
 LC_ALL=de_DE LANG=de_DE bin/jhbuild run gnumeric

My locale:
aguelzow@opteron:~$ LC_ALL=de_DE LANG=de_DE locale                  
LANG=de_DE
LANGUAGE=en_CA:en_US:en_GB:en
LC_CTYPE="de_DE"
LC_NUMERIC="de_DE"
LC_TIME="de_DE"
LC_COLLATE="de_DE"
LC_MONETARY="de_DE"
LC_MESSAGES="de_DE"
LC_PAPER="de_DE"
LC_NAME="de_DE"
LC_ADDRESS="de_DE"
LC_TELEPHONE="de_DE"
LC_MEASUREMENT="de_DE"
LC_IDENTIFICATION="de_DE"
LC_ALL=de_DE
Comment 4 mambro 2007-06-01 11:25:37 UTC
mambro@terra ~ $ locale
LANG=it_IT.UTF-8
LC_CTYPE="it_IT.UTF-8"
LC_NUMERIC="it_IT.UTF-8"
LC_TIME="it_IT.UTF-8"
LC_COLLATE="it_IT.UTF-8"
LC_MONETARY="it_IT.UTF-8"
LC_MESSAGES="it_IT.UTF-8"
LC_PAPER="it_IT.UTF-8"
LC_NAME="it_IT.UTF-8"
LC_ADDRESS="it_IT.UTF-8"
LC_TELEPHONE="it_IT.UTF-8"
LC_MEASUREMENT="it_IT.UTF-8"
LC_IDENTIFICATION="it_IT.UTF-8"
LC_ALL=it_IT.UTF-8

>1. What do you see in the cell after you write 1,23456 into it?
>   (I am assuming that you are in a locale that uses a decimal comma.)
I see "1,12345".. the problem is when i change the cell proprieties and selecting the number of decimals

2. What gcc options were used to compile goffice and gnumeric?
I compiled them on gentoo with these ebuild http://bugs.gentoo.org/show_bug.cgi?id=156984  (adapted for the 1.7.10 version changing the dipendence from goffice-0.3.7 to goffice 0.4.0)
My CLFAGS are
CFLAGS="-march=athlon -O2 -pipe -fomit-frame-pointer"
Comment 5 Morten Welinder 2007-06-01 13:04:41 UTC
Somethings are clearly up here.  Most likely in goffice, but I'll keep
the bug for Gnumeric for now.
Comment 6 Morten Welinder 2007-06-01 13:31:51 UTC
Created attachment 89179 [details] [review]
Fix
Comment 7 Morten Welinder 2007-06-01 13:32:11 UTC
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.
Comment 8 mambro 2007-06-01 14:45:30 UTC
You're too fast! Your patch works. Thank you :-)