Bug 122098 - FILEOPEN XLSX, Function with logic answer gives back 1 or 0 in LO
Summary: FILEOPEN XLSX, Function with logic answer gives back 1 or 0 in LO
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:xlsx, regression
Depends on:
Blocks: Calc-Function XLSX
  Show dependency treegraph
 
Reported: 2018-12-14 11:59 UTC by NISZ LibreOffice Team
Modified: 2018-12-21 18:30 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
The original document. (16.48 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-12-14 12:00 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Excel and Calc. (376.64 KB, image/png)
2018-12-14 12:01 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2018-12-14 11:59:52 UTC
Description:
Function in xlsx with logic answer gives 0 or 1 in LO while in MSO it gives TRUE or FALSE this can lead to differences when using conditional formatting.

Steps to Reproduce:
    1. Create a new xlsx in Excel.
    2. Create a function which gives back TRUE or FALSE.
    3. Save it and open it in LO.
    4. Notice the difference.

Actual Results:
The function gives back 1 or 0.

Expected Results:
It should give back TRUE OR FALSE just as it does in MSO.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2018-12-14 12:00:58 UTC
Created attachment 147531 [details]
The original document.
Comment 2 NISZ LibreOffice Team 2018-12-14 12:01:22 UTC
Created attachment 147532 [details]
Screenshot of the original document side by side in Excel and Calc.
Comment 3 Roman Kuznetsov 2018-12-15 09:22:10 UTC
confirm in

Version: 6.3.0.0.alpha0+
Build ID: 3c964980da07892a02d5ac721d80558c459532d0
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-12-12_02:07:45
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded

from scratch for ODS Calc shows in cells True or False
Comment 4 Xisco Faulí 2018-12-18 13:52:49 UTC
Also reproduced in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.15; Render: default; 

but not in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 5 himajin100000 2018-12-18 18:08:38 UTC
I still haven't checked if the following lines are the culprit, but I suspect so.

https://opengrok.libreoffice.org/xref/core/sc/source/filter/oox/sheetdatacontext.cxx?r=76fbe494#119
https://opengrok.libreoffice.org/xref/core/sc/source/filter/oox/sheetdatacontext.cxx?r=76fbe494#145

Logicfunction/xl/worksheets/sheet1.xml
<sheetData>
<row r="1" spans="1:2" x14ac:dyDescent="0.25">
<c r="A1" t="b">
<f>EXACT(B1,C1)</f>
<v>1</v>
</c>
</row>
<row r="2" spans="1:2" x14ac:dyDescent="0.25">
<c r="A2" t="b">
<f>EXACT(B2,C2)</f>
<v>0</v>
</c>
<c r="B2" t="s">
<v>0</v>
</c>
</row>
</sheetData>
Comment 6 raal 2018-12-21 18:30:20 UTC
This seems to have begun at the below commit.
Adding Cc: to Kohei Yoshida ; Could you possibly take a look at this one?
Thanks

b24c5c64280698417f54375715aa07370f0d47d0 is the first bad commit
commit b24c5c64280698417f54375715aa07370f0d47d0
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sat Sep 5 22:39:37 2015 +0800

    source-hash-07b66cd3ac1a9f6c7b61a1d7da6e9d266e6de92d
    
    commit 07b66cd3ac1a9f6c7b61a1d7da6e9d266e6de92d
    Author:     Kohei Yoshida <kohei.yoshida@collabora.com>
    AuthorDate: Thu Oct 31 17:53:02 2013 -0400
    Commit:     Kohei Yoshida <kohei.yoshida@collabora.com>
    CommitDate: Mon Nov 4 13:59:17 2013 -0500
    
        Insert matrix formula vis ScDocumentImport, and more formula imorts.
    
        Now SetGroupFormulaCell() is no longer used.
    
        Change-Id: I10a387da04724794974eaf491a8efa4cda09d82a