Bug 59730

Summary: FILEOPEN particular .xlsx: "IF" condition not calculated
Product: LibreOffice Reporter: Rainer Bielefeld Retired <LibreOffice>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: CLOSED NOTABUG    
Severity: normal CC: LibreOffice, mike.hall
Priority: medium    
Version: 3.6.0.4 release   
Hardware: Other   
OS: Windows (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: SampleDocument.xlsx
Sample Saved from 3.4.5

Description Rainer Bielefeld Retired 2013-01-22 19:00:45 UTC
Created attachment 73469 [details]
SampleDocument.xlsx

Steps how to reproduce with server installation of  "4.1.0.0.alpha0 (Build ID: 0ff470cff6ecc436e723af6a60986c8eefaba7b) TinderBox: Win-x86@6, Branch:master, Time: 2013-01-19 22:38:36  - ENGLISH UI / German Locale  on German WIN7 Home Premium (64bit) with LO41 Masters User Profile:

Open attached sampple.
Expected: D3 shows "123"
Actual:   D3 shows "1"

And here also the trick "find & replace all '=' by '='" does the job and forces calculation.

This one sounds very similar to "Bug 58863 - FILEOPEN particular .xlsx: "IF" condition not calculated", but that bug is fixed for a.m Version

@Mike:
Can you reproduce my results here?
Comment 1 Rainer Bielefeld Retired 2013-01-22 19:11:32 UTC
Definitively FILEOPEN problem. 3.6.5.2 opens sample with correct calculation.

Already [Reproducible] with 
* Server-installation of Master "3.7.0.alpha0+  – ENGLISH UI [Build ID: f2e622]" {tinderbox: Win-x86@16, pull time 2012-10-06 09:31:39} on German WIN7 Home Premium (64bit) UserInstallation=$SYSUSERCONFIG/LOdev/3.
* Server Installation of  "LibreOffice 3.6.3.0+  English UI/ German Locale [Build-ID: 1e73405],{tinderbox: Win-x86@9 pull time 2012-10-05 15:31:15}  on German WIN7 Home Premium (64bit), Strange, this version does not show problem
of Bug 59724 
*  Server Installation of  "LibreOffice 3.6.0.4  German UI/Locale [Build-ID:  932b512] on German WIN7 Home Premium (64bit) 
* May be more early

We really have a nest of vipers here ...
Comment 2 mike.hall 2013-01-22 20:51:24 UTC
In 4.0 RC1 on Vista, I can confirm that your attachment works as described (1 in D3 on opening) corrected by Ctrl+Shift F9

However, oddly, if I exactly reconstruct the sheet with the =IF(C3<>0;C3;$Sheet2.A1) formula, it works correctly for me when saved as .xslx  ie 123 is displayed in D3 on open after closing.
Comment 3 Rainer Bielefeld Retired 2013-01-22 21:08:30 UTC
Created attachment 73478 [details]
Sample Saved from 3.4.5

I am not sure whether I really understood what is happening here, even MS Excel Viewer fails to open the sample document with correctly calculated  D3
Also Problem wth 3.5.7.2, 

But correctly calculated with AOOo 3.4.1, LibO 3.4.5, LibO 3.3.3

When I save the original sample document from LibO 3.4.5 (others not tested), that new (attached), that will be opened correctly from LibO 4.1 and also MS Excel Viewer.

So it seems we have 2 bugs here. But I can't find out what#s happening here.
Comment 4 Eike Rathke 2013-01-29 19:15:59 UTC
Already the IfNotCalculatedCorrectly.xlsx OOXML file for D3 contains the result 1 instead of 123, we display the cached value until recalculated, either by the import option (Tools->Options->Calc->Formula "Recalculation on file load") or Shift+Ctrl+F9 or triggered by dependency chains of changes. There's nothing else we can do.

Looks related to bug 58863 that is fixed for 4-0-0 but is not a duplicate due to the erroneous data.