Bug 58863 - FILEOPEN particular .xlsx: "IF" condition not calculated
Summary: FILEOPEN particular .xlsx: "IF" condition not calculated
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha0+ Master
Hardware: x86 (IA32) Windows (All)
: medium major
Assignee: Markus Mohrhard
URL:
Whiteboard: target:4.1.0 target:4.0.0.1
Keywords: regression
Depends on:
Blocks: mab4.0
  Show dependency treegraph
 
Reported: 2012-12-29 15:25 UTC by Stephen Brindle
Modified: 2013-01-22 18:56 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
spreadsheet in .xlsx format (171.80 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-12-29 15:32 UTC, Stephen Brindle
Details
simple sample (7.95 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2012-12-29 19:05 UTC, Rainer Bielefeld Retired
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Brindle 2012-12-29 15:25:01 UTC

    
Comment 1 Stephen Brindle 2012-12-29 15:32:02 UTC
Created attachment 72257 [details]
spreadsheet in .xlsx format

The main spreadsheet WSSI just wont't calculate at all when loaded in .xlsx format and it looks quite different from when it is loaded in 3.4
Comment 2 Rainer Bielefeld Retired 2012-12-29 19:04:06 UTC
[Reproducible] with server  installation of  "4.1.0.0.alpha0+ (Build ID: e90807267808eb062b93d762c50c02113ca40db) TinderBox: Win-x86@6, Branch:master, Time: 2012-12-26_22:00:49 - ENGLISH UI / German Locale  on German WIN7 Home Premium (64bit) with own separate User Profile:

0- Make sure that Calc menu 'Tools -> Cell contents - Auto Calculate = checked'
1. Open document, check WSSI.W47 with "=IF((V47<>0);V47;$wssi_1.F31)"
   It shows "140" (content of $wssi_1.F31), seems ok
2. Now insert several Values (0 ... 5) to V47
   Expected: W47 always should show value in  V47 except V47=0
   Actual: Always shows "141", does not matter whether you modify  contents of
           $wssi_1.F31 (with WSSI.W47=0) or V47<>0

You can heal that problem by 
a)saving document as .ods, close and reopen
b) find & replace all ")" by ")"

You also can reproduce with the much more simple new attachment "sample1.ods"
11. open document and save as  "sample1.xlsx" OOXML
12. close, reopen
13. Modify Sheet1.C3 due to Step2:
    Bug: No reaction

.xls and .ods are not affected

Definitively a FILEOPEN problem, "sample1.xlsx" works fine with LibO 3.6.4.3
and with 
server-installation of Master "3.7.0alpha0+  – WIN7 Home Premium (64bit) ENGLISH UI [Build ID: b255de8]" (tinderbox: Win-x86@6-fast, pull time 2012-06-05 23:16:58)

so Regresion

Already [Reproducible] with parallel installation of  "LOdev  4.0.0.0.beta2   -  GERMAN UI / German Locale  [Build ID: 4104d660979c57e1160b5135634f732918460a0)]"  {tinderbox: @6, pull time 2012-12-20} on German WIN7 Home Premium (64bit) with separate /4 User Profile for Master Branch, so I think it's a MAB

@Stephen Brindle:
"Looks different" is not an appropriate description. May be in looked wrong in old version?
Please be much more specific in bug reports as requested on <http://wiki.documentfoundation.org/BugReport_Details>
If you want to report additonal problems related to your sample document please submit nes Bugs and refer the your att. here due to <https://wiki.documentfoundation.org/QA-FAQ#How_to_use_attached_sample_documents_for_multiple_Bug_Reports>
Comment 3 Rainer Bielefeld Retired 2012-12-29 19:04:28 UTC
Comment on attachment 72257 [details]
spreadsheet in .xlsx format

More simple sample available
Comment 4 Rainer Bielefeld Retired 2012-12-29 19:05:27 UTC
Created attachment 72272 [details]
simple sample

See Comment 2 hoe to use!
Comment 5 Markus Mohrhard 2012-12-29 19:51:36 UTC
A cached value import problem.

The cells are not correctly added to the dependency tree.
Comment 6 Markus Mohrhard 2013-01-04 19:08:12 UTC
*** Bug 58943 has been marked as a duplicate of this bug. ***
Comment 7 Not Assigned 2013-01-04 19:14:40 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

don't forget the dependency tree during OOXML import, fdo#58863



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 Not Assigned 2013-01-04 19:20:29 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7b1ab8f2cf8b07e713c8511984c55e30d70c12d0&h=libreoffice-4-0

don't forget the dependency tree during OOXML import, fdo#58863


It will be available in LibreOffice 4.0.

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 mike.hall 2013-01-22 11:52:45 UTC
This is not fully working for number formatting in 4.0 RC1. 

For example, opened a spreadsheet originally from LO 3.nn and earlier but saved several times from LO 4.0 versions, including RC1. 

Create a new cell with formula =cell where cell is formatted as currency. All is OK (currency inheritance appears)

Created a new sum of cells all formatted as currency.  All is OK (currency inheritance appears).

Save sheet. Close.

Reopen sheet (it was on a different PC but also with RC1). Both cells have lost the inherited format - appear just as numbers.

Therefore reopening.
Comment 10 Rainer Bielefeld Retired 2013-01-22 12:23:34 UTC
I haven't a clue what mike.hall's problem might have to do with this one ...
I tested original problem, works fine 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.

So closed again.

@mike.hall@onepoyle.net
<https://wiki.documentfoundation.org/BugReport_Details#How_to_reopen_Bugs>
Please open a new bug report for you problem with sample document and all other info required due to <http://wiki.documentfoundation.org/BugReport> and add me to CC
Comment 11 Rainer Bielefeld Retired 2013-01-22 18:53:54 UTC
VERIFIED with tests with original sample documents for Comment 10 and later

But this one is very tricky, I have a different .xls what still reproduces the Problem, I will open a new Bug for that.
Comment 12 Markus Mohrhard 2013-01-22 18:56:55 UTC
(In reply to comment #11)
> VERIFIED with tests with original sample documents for Comment 10 and later
> 
> But this one is very tricky, I have a different .xls what still reproduces
> the Problem, I will open a new Bug for that.

XLS must be a totally different problem. We did not change anything in this direction for XLS. All cached value import changes are restricted to XLSX and ODS.