Bug 93071

Summary: UI: General format: useless trailing zeroes for scientific notation
Product: LibreOffice Reporter: Laurent Balland <jumbo4444>
Component: CalcAssignee: Laurent Balland <jumbo4444>
Status: RESOLVED FIXED    
Severity: normal CC: h3734236
Priority: medium    
Version: Inherited From OOo   
Hardware: Other   
OS: All   
Whiteboard: target:5.1.0 target:4.4.6 target:5.0.2
Crash report or crash signature: Regression By:
Attachments: Comparison of display for positive and negative exponent

Description Laurent Balland 2015-08-01 20:14:01 UTC
Created attachment 117592 [details]
Comparison of display for positive and negative exponent

Description: some value  with General format are displayed in scientific notation if they are too big to fit in column width. In this case, trailing zeroes remain, which is not the case with very small values (most of the time)

Steps to reproduce:
1. Enter a calculation such as =10^30

Actual behaviour:
With General format, display looks like 1.00000E+30 (or 1.0000E+030 with version previous to LibO 5)

Expected behaviour:
Display should be 1E+30 (or 1E+030 with previous versions).
There is no bug for negative power: =10^-30 gives as expected 1E-30

Attached file shows some comparison between positive and negative exponent. There are also trailing zeroes for 10^-9
Comment 1 Commit Notification 2015-08-03 14:17:06 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=a6fbbfd2f42f5361d53bd4b330a507d94d636923

tdf#93071 Remove trailing zeroes of scientific in General format

It will be available in 5.1.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 2 Commit Notification 2015-08-17 10:08:08 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0016a42db657ccd6597e2d559e269d6232654afb&h=libreoffice-4-4

tdf#93071 Remove trailing zeroes of scientific in General format

It will be available in 4.4.6.

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 2015-08-17 10:11:33 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0deb80469574d5a1090eb9c17f9a85ecd0fd34be&h=libreoffice-5-0

tdf#93071 Remove trailing zeroes of scientific in General format

It will be available in 5.0.2.

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.