Bug 106253 - 'Precision as shown' does not work with thousands division
Summary: 'Precision as shown' does not work with thousands division
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Laurent Balland
URL:
Whiteboard: target:5.4.0 target:5.3.3
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-01 11:07 UTC by Laurent Balland
Modified: 2017-04-10 13:55 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Balland 2017-03-01 11:07:52 UTC
Description:
When 'Precision as shown' option is checked, Number format using thousands division, such "0,", is rounded to integer, not thousand.

Steps to Reproduce:
1. Activate 'Precision as shown' option: Tools > Options > LibreOffice Calc > Calculate
2. Enter in A1 a formula such as =4e8/7
With General format, result is displayed as 57142857.14
3. Enter in B1 formula "=A1/10"
With General format, result is displayed as 5714285.714
4. Change Number format of A1 with thousands divisions ("0,," to divide par 1 million)

Actual Results:  
A1 displays 57 (correct)
B1 displays 57142865.7 (not correct)

Expected Results:
B1 should display 5700000


Reproducible: Always

User Profile Reset: No

Additional Info:
RoundValueAsShown reads only "precision" in number format, which is set to 0 in this case
http://opengrok.libreoffice.org/xref/core/sc/source/core/data/documen4.cxx#653


User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 Jacques Guilleron 2017-03-02 08:43:03 UTC
Hi Laurent,

I reproduce with
LO 5.4.0.0.alpha0+ Build ID: f0c7cbe1d8505d3c1f5a2b2253efda35542c898b
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-02-22_04:35:00
Locale: fr-FR (fr_FR); Calc: CL
and also with:
LO 3.5.3.2 
Version ID : 235ab8a-3802056-4a8fed3-2d66ea8-e241b80
So, probably inherited from Ooo.

Jacques
Comment 2 Commit Notification 2017-03-14 23:35:12 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=60d7644a46970e6eaee882e0c5d65692da206c24

tdf#106253 Precision as shown for thousand dividor

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2017-03-15 01:23:19 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=152e9869f8c32fb2c353bfae22db214eba342507

tdf#106253 Test Precision as shown for thousand separators

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Jacques Guilleron 2017-03-20 09:19:07 UTC
Hi Laurent,

Works as expected with:

LO  5.4.0.0.alpha0+ Build ID: 96a9b38db5fd9c21bffe4274fa7d5083d4bc2ee9
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-03-18_23:07:25
Locale: fr-FR (fr_FR); Calc: CL

Jacques
Comment 5 Commit Notification 2017-04-10 13:55:48 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=506b228992ccb5a12486e2a8607ee3c81e3467a1&h=libreoffice-5-3

tdf#106253 Precision as shown for thousand dividor

It will be available in 5.3.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.