Bug 89404 - Empty cells have non-zero value when used in formula(hard recalc needed)
Summary: Empty cells have non-zero value when used in formula(hard recalc needed)
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-16 00:17 UTC by Gunther Lenz
Modified: 2017-05-24 15:24 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
calculated value at cursor should be zero (1.32 KB, image/png)
2015-02-16 00:17 UTC, Gunther Lenz
Details
the formula with reference to the empty cell (2.03 KB, image/png)
2015-02-16 00:18 UTC, Gunther Lenz
Details
Screenshot of testfile (99.50 KB, image/png)
2015-02-17 12:15 UTC, Gunther Lenz
Details
testfile (26.25 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2015-02-17 12:16 UTC, Gunther Lenz
Details
Testfile2 for nonzer-cell bug (31.23 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2015-04-04 12:18 UTC, pekka.virta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gunther Lenz 2015-02-16 00:17:29 UTC
Created attachment 113412 [details]
calculated value at cursor should be zero

I'm having a big table with payments and a formula adding VAT percentage values.
Prior to 4.4.0.3 this worked flawlessly, but now something strange happens.

As you can see in the screenshot at the cursor position it yields a value of 2000 although it should simply be zero, because the cell to left ist empty.

In the second screenshot you see the formula.

When I enter a 0 into the empty cell, the calculation is correct.

Deleting the 0 gives again the wrong value.
Comment 1 Gunther Lenz 2015-02-16 00:18:14 UTC
Created attachment 113413 [details]
the formula with reference to the empty cell
Comment 2 m_a_riosv 2015-02-16 00:26:51 UTC
Hi @Gunther, thanks for reporting.

Have you tried with a hard recalc?. [Shift+Ctrl+F9]

If it doesn't work, please can you attach a minimal sample file where to verify the issue.

Please reset the bug to unconfirmed after answer.
Comment 3 Gunther Lenz 2015-02-17 12:15:00 UTC
Yes, it survives [Shift+Ctrl+F9].

I've added a a file that exhibits the behaviour.
Comment 4 Gunther Lenz 2015-02-17 12:15:44 UTC
Created attachment 113450 [details]
Screenshot of testfile
Comment 5 Gunther Lenz 2015-02-17 12:16:13 UTC
Created attachment 113451 [details]
testfile
Comment 6 raal 2015-02-17 16:27:22 UTC
I can confirm with LO 4.4.0.3 and Version: 4.5.0.0.alpha0+
Build ID: 7f126fc8570da5c7275a4d4efe019b9ea3b5b073
TinderBox: Win-x86@42, Branch:master, Time: 2015-02-14_23:15:54
also on linux

After hard recalc (ctrl+shift+F9)is calculation correct.
Comment 7 pekka.virta 2015-04-04 12:18:05 UTC
I confirm the bug with LO 4.4.2.2 (x86-64 Win7) and also confirm that Gunther's testfile returns to normal after _two_ times pressing [Shift+Ctrl+F9]. 

I found the bug also on my own spreadsheet and it survives hard recalc. However there's a clue in my file about the bug: when you empty any green cell above or below the cells displaying incorrect calculations (red) and do a hard recalc after that, the calculation is correct in that column. However emptying any cell doesn't fix it, as marked with yellow color. 

Testfile2 attached, colours added for emphasis.

Hope this helps.
Comment 8 pekka.virta 2015-04-04 12:18:56 UTC
Created attachment 114613 [details]
Testfile2 for nonzer-cell bug
Comment 9 m_a_riosv 2015-04-04 12:55:41 UTC
Doing only ONE hard recalc both files works fine for me with Version: 4.4.2.2
Build ID: c4c7d32d0d49397cad38d62472b0bc8acff48dd6.
And saving and reopening after hard recalc keep the right values.

There was several bug report for 4.4.0, fixed now. 
IMO this must be resolved as 'worksforme'.
Comment 10 tommy27 2016-04-16 07:23:25 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2017-05-22 13:23:20 UTC Comment hidden (obsolete)
Comment 12 m_a_riosv 2017-05-22 22:38:26 UTC
Works for me after hard recalc.
Version: 5.3.3.2 (x64)
Build ID: 3d9a8b4b4e538a85e0782bd6c2d430bafe583448
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
Locale: es-ES (es_ES); Calc: group
Comment 13 Gunther Lenz 2017-05-23 10:18:06 UTC
After loading loo-empty-cell-bug.ods contains the worng values.

Neither F9 nor Ctrl-F9 work for me. :(

Tried it on 

Version: 5.2.6.2
Build-ID: a3100ed2409ebf1c212f5048fbe377c281438fdc
CPU-Threads: 4; BS-Version: Windows 6.2; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group

and also on

Version: 5.3.3.2
Build-ID: 3d9a8b4b4e538a85e0782bd6c2d430bafe583448
CPU-Threads: 4; BS-Version: Windows 6.2; UI-Render: Standard; Layout-Engine: neu; 
Gebietsschema: de-DE (de_DE); Calc: group

----

But this works:
As soon as I enter a Value in ONE of the cells in column B ALL cells in column E are updated correctly.
Comment 14 Gunther Lenz 2017-05-23 11:55:48 UTC
Ctrl-Shift F9 works in both LO versions! :)
Comment 15 pekka.virta 2017-05-24 15:24:44 UTC
Testfile survives F9, but after hard recalc (shift+ctrl+F9) worksforme.

Testfile2 works after F9.

Version: 5.3.3.2 (x64), Win7 x64