Download it now!
Bug 76294 - Other: IF EXACT function - TRUE clause not selected
Summary: Other: IF EXACT function - TRUE clause not selected
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.1.1 release
Hardware: Other Windows (All)
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: BSA target:4.3.0 target:4.2.4
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-03-17 21:46 UTC by Ed Kapusniak
Modified: 2014-04-22 21:59 UTC (History)
1 user (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 Ed Kapusniak 2014-03-17 21:46:26 UTC
Problem description: 

Steps to reproduce:
1. Enter =IF(EXACT(D20,"No");B6;0)in a cell
2. LibreOffice changes the semi-colons to commas.  Help says to use semi-colons!
3. Put 'No' in cell D20
4. Put a non-zero number in cell B6
5. Cell with formula equals number in cell B6.
6. Close file
7. Open file
8. Cell with formula equals zero.
9. Change one of the commas in the formula to a semi-colon.
10. Cell with formula equals number in cell B6.

Current behavior:
IF function doesn't return value in TRUE clause.

Expected behavior:
IF function should return value in TRUE clause.
              
Operating System: Windows 7
Version: 4.2.1.1 release
Comment 1 m.a.riosv 2014-03-18 00:48:30 UTC
Hi Ed, thanks for reporting.
Separator for parameters depends on your locale and how is set up in:
Menu/Tools/LibreOffice calc/Formulas/Separators

I can reproduce saving as xls file.
Win7x64
From:
Version: 4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
To:
Version: 4.3.0.0.alpha0+ Build ID: 12ae7672f285da1d4c730315e8db23b3396b71cc
   TinderBox: Win-x86@39, Branch:master, Time: 2014-03-14_00:18:00


Last working:
Version: 4.1.6.0.0+ Build ID: 0b772a163b2536fc55aa3b4de925119e33af769

Seems https://bugs.freedesktop.org/show_bug.cgi?id=74747 have not been solved this one.
Comment 2 Kohei Yoshida 2014-04-14 19:13:25 UTC
Likewise, I can only reproduce it when saving to xls.  Saving to ods and xlsx work as expected, so I'll only focus on the xls format case.
Comment 3 Kohei Yoshida 2014-04-14 19:15:01 UTC
Inspecting the file format reveals that the formula result cache is stored correctly.  Indeed, when opening it in Excel the cell shows 2, which is correct.
Comment 4 Kohei Yoshida 2014-04-14 19:24:29 UTC
Building a similar file directly in Excel, saving it and opening it in Calc causes the same problem.  So the problem is in the xls import filter code.
Comment 5 Commit Notification 2014-04-14 21:00:44 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#76294: Write import test for this.



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 6 Commit Notification 2014-04-14 21:00:59 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#76294: Properly intern string literals in formula on xls import.



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 7 Commit Notification 2014-04-14 22:34:21 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=625c595fc30d2e6153735dc2ed2359ff4f8a1e3a

fdo#76294: Intern strings in AddFormulaToken() as well.



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 8 Commit Notification 2014-04-14 22:56:52 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6bb7fa8df523d3ae7b9945009fb1034f28cb0a0a

fdo#76294: Fix the build.



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 9 Kohei Yoshida 2014-04-14 22:59:25 UTC
4.2: https://gerrit.libreoffice.org/9008
Comment 10 Kohei Yoshida 2014-04-15 00:02:32 UTC
This ended up being a humongous change, but the core of the change is very small.  The rest is just an adjustment due to the change in the signatures of some virtual functions that happen to be used in many places.
Comment 11 Commit Notification 2014-04-15 15:46:21 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1f87e2e837b4e35b909bf68ccdd3cefd84253940&h=libreoffice-4-2

fdo#76294: Properly intern string literals in formula on xls import.


It will be available in LibreOffice 4.2.4.

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 Kohei Yoshida 2014-04-15 15:49:05 UTC
Fixed.
Comment 13 m.a.riosv 2014-04-22 21:59:48 UTC
Thanks Kohei.

Verified:
Win7x64Ultimate
Version: 4.2.4.1 Build ID: d4c441391e20647b3d2e8dde4d20aa868e77e515
Version: 4.3.0.0.alpha0+ Build ID: 0ce6d9bcea7c37a7cb2c42e8393e2e20780bd171
   TinderBox: Win-x86@39, Branch:master, Time: 2014-04-17_00:11:33