Bug 86024 - FORMATTING: Erroneous formatting of certain numbers
Summary: FORMATTING: Erroneous formatting of certain numbers
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.6.3 release
Hardware: All All
: high major
Assignee: Eike Rathke
URL:
Whiteboard: target:5.1.0 target:5.0.2 target:4.4....
Keywords: bibisected, bisected, regression
: 93107 93260 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-07 21:58 UTC by Alexander Lars Robinson
Modified: 2016-10-25 19:20 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file showing the bug. (11.81 KB, application/vnd.oasis.opendocument.text)
2014-11-08 11:18 UTC, m_a_riosv
Details
Broken formattting (108.49 KB, image/png)
2014-11-11 11:16 UTC, Klaus Halfmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Lars Robinson 2014-11-07 21:58:27 UTC
In a cell with default (automatic) formatting, using a column width of 0.90" and Calibri size-12 font, the number 5385137647.06696 is displaying as 37647, regardless of whether the cell produces the value from function or has the value written to it directly.

The actual value is not lost, and manually choosing scientific notation corrects the display problem.  Changing the cell width a sufficient amount in either direction also corrects the problem, triggering automatic scientific notation for the correct value when narrower, and the full length value when wider.

Creating a new spreadsheet, adjusting the font of any cell to the above specifications, and placing 5385137647.06696 in that cell reproduces the effect (the default column width of 0.89" is within the necessary range).
Comment 1 m_a_riosv 2014-11-08 11:18:48 UTC
Created attachment 109130 [details]
Sample file showing the bug.

Hi @Alexander, thanks for reporting.

Reproducible.

Win7x64Ult.
Version: 4.2.7.2
Build ID: 933c0aa564ec4f8883ed5732c866db48dca4dac5
+
Version: 4.4.0.0.alpha1+
Build ID: 8b21b5cbe78945b27525b4ce78ae3d981f90590f
TinderBox: Win-x86@39, Branch:master, Time: 2014-11-06_03:55:51
Comment 2 A (Andy) 2014-11-08 12:21:16 UTC
Also reproducible with LO 4.3.3.2, Win 8.1.
Comment 3 Klaus Halfmann 2014-11-11 11:15:04 UTC
I found the same on OSX 10.10 in LibreOffice  4.2.6.3
Build-ID: 3fd416d4c6db7d3204c17ce57a1d70f6e531ee21

Ill try to add another Attachement.
Comment 4 Klaus Halfmann 2014-11-11 11:16:28 UTC
Created attachment 109265 [details]
Broken formattting
Comment 5 Klaus Halfmann 2014-11-11 11:18:07 UTC
Prio high as this may lead to completly wrong numbers
Comment 6 Matthew Francis 2015-04-22 15:32:14 UTC
Bibisect results from 43all point to
# first bad commit: [0acca754077bf74469c3e1a3c7eabbc3da795266] source-hash-5e651d4084df7662b56ea980934c0428ba31b062

Which is ~certain to be the below commit:

commit 087a79db1272858f107656c5ca3c6efb45680986
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Tue Apr 15 20:47:37 2014 -0400

    fdo#75665: Truncate string when clipped on screen.
    
    This improves performance of text layouting by HarfBuzz for very long strings.
    HarfBuzz's layout algorithm appears to be more expensive than ICU's.
    
    Change-Id: Ic9738b7b8f0f1a29c51c83b147763118939b90ef



Bug 82377 is related to the same commit and has previously been patched, but I still see this issue on current 5.0 master
Comment 7 Philip 2015-06-29 18:22:50 UTC
I have observed the same behavior on OS X 10.10.13 and LibreOffice 4.3.7.2.
Comment 8 Alex Thurgood 2015-08-04 14:07:40 UTC
*** Bug 93107 has been marked as a duplicate of this bug. ***
Comment 9 Alex Thurgood 2015-08-08 07:44:04 UTC
*** Bug 93260 has been marked as a duplicate of this bug. ***
Comment 10 Eike Rathke 2015-08-10 18:50:14 UTC
Taking.
Comment 11 Commit Notification 2015-08-10 19:09:14 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2a06a052b920f696a794c2fb847fce63038220e9

Resolves: tdf#86024 do not attempt to shorten numeric value output

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 12 Eike Rathke 2015-08-10 19:52:38 UTC
Pending review
https://gerrit.libreoffice.org/17636 for 5-0
https://gerrit.libreoffice.org/17637 for 4-4
https://gerrit.libreoffice.org/17638 for 5-0-1
Comment 13 Commit Notification 2015-08-11 13:28:36 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

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

Resolves: tdf#86024 do not attempt to shorten numeric value output

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.
Comment 14 Commit Notification 2015-08-11 13:30:20 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

Resolves: tdf#86024 do not attempt to shorten numeric value output

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 15 Commit Notification 2015-08-17 12:30:53 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-0-1":

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

Resolves: tdf#86024 do not attempt to shorten numeric value output

It will be available in 5.0.1.

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 16 Robinson Tryon (qubit) 2015-12-17 08:39:05 UTC Comment hidden (obsolete)