Issue 102980

Summary: Multiple Operations problem with OFFSET() function
Product: Calc Reporter: bhut_ooto <bhut_ooto>
Component: uiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, rb.henschel
Version: OOo 3.1Keywords: oooqa
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Test case
none
E11 and E12 should show the same result as B11 and B12 show the same result. none

Description bhut_ooto 2009-06-21 13:23:15 UTC
Attached is a spreadsheet that shows the following issue:

* B11 := -(B7 - 0*OFFSET(B3;0;0;1))
* B15 := MULTIPLE.OPERATIONS(B11; $B$1; $C$1)
* F11 := B11
* F15 := MULTIPLE.OPERATIONS(F11; $B$1; $C$1)

One would expect that both B15 and F15 should have exactly the same value, but 
they don't.  The value F15 matches F11, as if the MULTIPLE.OPERATIONS() 
function gave up.  If you replace the value of B11 with the following:

* B11 := -(B7 - 0)

then the values of B15 and F15 will match again.  One wouldn't expect there to 
be a difference because 0*OFFSET(...) should still resolve to 0.  It appears 
that the presence of the OFFSET() function confuses MULTIPLE.OPERATIONS().

[This testcase may seem rather brain-dead, but it is a very stripped-down 
version of a real-case that is stopping my forward progress.  In my version, I 
don't multiply OFFSET() by 0.]

Although this was found on a PC under Vista, there is no reason to believe this 
bug will be restricted to that platform.
Comment 1 bhut_ooto 2009-06-21 13:24:58 UTC
Created attachment 63112 [details]
Test case
Comment 2 Regina Henschel 2009-06-21 15:19:12 UTC
I see the bug in DEV300m50 too. I'll attach another small example.

Reading "MULTIPLE.OPERATIONS executes the formula expression pointed to by
FormulaCell and all formula expressions it depends on while replacing all
references to RowCell with references to RowReplacement respectively all
references to ColumnCell with references to ColumnReplacement." in ODF1.2 draft
spec, I think that it is an error, when adding a level of reference gives
different results.
Comment 3 Regina Henschel 2009-06-21 15:26:00 UTC
Created attachment 63115 [details]
E11 and E12 should show the same result as B11 and B12 show the same result.
Comment 4 rpadmanabhan 2009-09-18 04:08:26 UTC
Raji Padmanabhan , 091709
Comment 5 rpadmanabhan 2009-09-18 04:11:26 UTC
Raji Padmanabhan, 091709
Could reproduce the bug as mentioned in the attachment 63112 [details] and 63115. The
multiple operations does not work with the offset function. The offset function
has to be removed for the multiple operations to be active as presented in the 2
attachment. 

Fixing this bug will be crucial, since the whole calculations can wrong, like a
chain effect if the offset function produces incorrect results. 
Comment 6 rpadmanabhan 2009-09-18 12:27:24 UTC
Raji Padmanabhan, 091709
Could reproduce the bug as mentioned in the attachment 63112 [details] and 63115 on 
Windows Vista in build 3.1 The multiple operations does not work with the 
offset function. The offset function has to be removed for the multiple 
operations to be active as presented in the 2 attachment. 

Fixing this bug will be crucial, since the whole calculations can wrong, like a 
chain effect if the offset function produces incorrect results.