Bug 87524 - FILEOPEN: Calc shows 0 when it should show nothing, i.e. ""
Summary: FILEOPEN: Calc shows 0 when it should show nothing, i.e. ""
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-20 09:44 UTC by Óvári
Modified: 2017-03-07 02:40 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
File which has what is discussed in the description (14.48 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-12-20 09:44 UTC, Óvári
Details
screenshot 4.2.7 vs 4.3.0 (45.92 KB, image/png)
2014-12-20 10:25 UTC, tommy27
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Óvári 2014-12-20 09:44:52 UTC
Created attachment 111074 [details]
File which has what is discussed in the description

Opening the attached file has fields incorrectly show with '0' instead of showing nothing "":

ID                    : cash
Name                  : Cash Sale
Address               : 0
Delivery Instructions : 0
Phone                 : 0
Phone                 : 0
Email                 : 0
Email                 : 0


If you delete the 'cash', press Enter, enter 'cash' (without the apostrophes) it then shows correctly as:

ID                    : cash
Name                  : Cash Sale
Address               : 
Delivery Instructions : 
Phone                 : 
Phone                 : 
Email                 : 
Email                 : 

It would be appreciated if LibreOffice Calc would once again show fields with "" instead of '0'.

If I remember correctly, the versions of LibreOffice Calc prior to 4.2 or 4.1 showed the correct "" on opening.
Comment 1 tommy27 2014-12-20 10:25:16 UTC
Created attachment 111078 [details]
screenshot 4.2.7 vs 4.3.0

I confirm issue under Win8.1 64bit using LibO 4.3.0 and 4.3.4
compare screenshot versus LibO 4.2.7
Comment 2 tommy27 2014-12-20 10:26:29 UTC
CC'ing Markus.
is that change intended?
Comment 3 GerardF 2014-12-20 14:55:44 UTC
0 result is due to the IF function. VLOOKUP alone returns empty string.
Comment 4 tommy27 2014-12-20 18:31:07 UTC
ok, but why a different file display between 4.2.x and 4.3.x?
which one is right?
Comment 5 Óvári 2014-12-21 00:47:23 UTC
(In reply to GerardF from comment #3)
> 0 result is due to the IF function. VLOOKUP alone returns empty string.

If you delete 'cash' and re-type 'cash' then the result is a blank (different to when the file was opened). The output value of the function is different even though the input values are the same.

The value a function outputs should be the same for given input values; however, the output of the function is different based on if the file is opened or if it is entered once the file is opened.
Comment 6 Markus Mohrhard 2014-12-21 11:22:09 UTC
The problem is in the file:

            <table:table-cell table:style-name="ce17" table:formula="of:=IF(ISNA(VLOOKUP([.B$1];[People.$A$2:.$H$65200];[People.$F$1];0));&quot;&quot;;VLOOKUP([.B$1];[People.$A$2:.$H$65200];[People.$F$1];0))" office:value-type="float" office:value="0" calcext:value-type="float">
              <text:p/>
            </table:table-cell>

Without checking our import code, reading the spec and some thinking I can currently not decide if this is an import or an export bug. I think you can workaround the problem by switching to Always recalculate for the ODF import.
Comment 7 Óvári 2017-03-07 01:41:21 UTC
It seems that this bug has been fixed with LibreOffice 5.3 on Windows 8.1 64-bit; however, the bug is still present on Linux Mint 18.1 Cinnamon 64-bit.

Can someone reproduce that the bug is fixed with LibreOffice 5.3 on Windows, yet the bug is still present in Linux? If so, is there a way to implement the Windows fix on Linux?

Thank you
Comment 8 Óvári 2017-03-07 02:40:57 UTC
(In reply to Óvári from comment #7)
> Can someone reproduce that the bug is fixed with LibreOffice 5.3 on Windows,
> yet the bug is still present in Linux? If so, is there a way to implement
> the Windows fix on Linux?

If have retested, and it does work correctly with:

LibreOffice Version: 5.3.0.3
Build ID: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; VCL: gtk2; Layout Engine: new

Operating system: Linux Mint 18.1 Cinnamon 64-bit

Thank you