Bug 126766 - FORMATTING -10000 sometimes shows up as .0000
Summary: FORMATTING -10000 sometimes shows up as .0000
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.7.2 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.4.0 target:6.3.1 target:6.2.7
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-08 12:09 UTC by Jason Bell
Modified: 2019-08-13 10:32 UTC (History)
2 users (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 Jason Bell 2019-08-08 12:09:35 UTC
Description:
When entering a formula such as "=(50000-50000/0.3)*0.3+25000" instead of -10000 it shows .0000 in the cell.

This only appears to happen with 'General' or 'Text' format - others show the correct value.

Steps to Reproduce:
1. Open new spreadsheet
2. Enter the formula "=(50000-50000/0.3)*0.3+25000" in a cell
3. Observe the text shown in the cell

Actual Results:
Shows .0000 in the cell

Expected Results:
Should be showing -10000


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.8
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-GB (en_GB.UTF-8); Calc: group
Comment 1 Eike Rathke 2019-08-08 13:01:58 UTC
Confirmed. Already in earlier versions, earliest here 5.3.7. Odd.
Comment 2 Jason Bell 2019-08-08 15:49:57 UTC
I also noticed that when the cell is selected it shows "Average: .0000; Sum: .0000" in the status bar (both of those should be -10000).
Comment 3 Eike Rathke 2019-08-09 11:25:45 UTC
The status bar shows values in the same format the cell cursor is on, so that's logical.
Comment 4 Eike Rathke 2019-08-09 12:00:11 UTC
Investigating.
Comment 5 Commit Notification 2019-08-09 15:11:15 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/be8da97976658ff19b4dd010bff328cd3f424c1b%5E%21

Resolves: tdf#126766 fix rounding correction at start of negative values

It will be available in 6.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 6 Eike Rathke 2019-08-09 15:15:14 UTC
Pending review
https://gerrit.libreoffice.org/77215 for 6-3
https://gerrit.libreoffice.org/77216 for 6-2
Comment 7 Commit Notification 2019-08-13 10:30:41 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/7565f05affa2dd668de769a2ae259d2e8d2808e7%5E%21

Resolves: tdf#126766 fix rounding correction at start of negative values

It will be available in 6.3.1.

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

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2019-08-13 10:32:08 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/05b79e965481893ef7ffdbf4c6a77d90aeb68b20%5E%21

Resolves: tdf#126766 fix rounding correction at start of negative values

It will be available in 6.2.7.

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

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