Apache OpenOffice (AOO) Bugzilla – Issue 105161
ODFF: reference operators ~ and ! have wrong precedence
Last modified: 2017-05-20 11:42:00 UTC
According to spec ODF1.2 chapter 5.5 the intersection has a higher precedence than union. Therefore an expression like a~b!c should be calculated as a~(b!c) but it is calculated as (a~b)!c. According to chapter 6.3.12 the latter equals (a!c)~(b!c). The attached spreadsheet uses the INDEX function in array context to show which ranges are contained in the final multiple range result. _a, _b, _c are named ranges.
Created attachment 64821 [details] precedence testcase with intersection and union reference operators
oops.. how embarrassing, it was even documented wrong in the testcase document http://www.openoffice.org/nonav/issues/showattachment.cgi/51411/i32341_ocunion_2.ods of feature issue 32341, see cells B15 and B18. The online help has it correct. Nominating as 3.2 stopper.
In cws calc32stopper3: revision 276686 formula/source/core/api/FormulaCompiler.cxx
Created attachment 65143 [details] Adapted test cases from issue 32341; if exported to .xls Excel shows identical values for the cases it can handle, others are #VALUE! errors.
Reassigning to QA for verification.
verified in internal build cws_calc32stopper3