Apache OpenOffice (AOO) Bugzilla – Issue 107151
formula - if() construct not parsed correctly
Last modified: 2013-08-07 15:14:30 UTC
Hello In attached testcase document three varieties of a formula are presented employing the following schema: ={:numeric_value_a:} - IF({:test:};{:then numeric_value_b:};{:else numeric_value_c}) namely ={:value_a:}-IF(HLOOKUP($cell;$range;$position;$sorted)="";{:then numeric_value_b:};{:else numeric_value_c}) and ={:value_a:}-IF(ISBLANK(HLOOKUP($cell;$range;$position;$sorted));{:then numeric_value_b:};{:else numeric_value_c}) The former wording is not giving correct results under OOO310m9 (verified with HLOOKUP & VLOOKUP cases) although it was used in OOo 2.x without problems. Please see the highlighted cells in the attached testcase for further explanation. Regards Vladimir
Created attachment 66299 [details] TESTCASE
I can confirm it for OOo3.2 m5 on WinXP. I have reduced the problem in the attached file. There in cell C14 the term HLOOKUP(C6;B1:C4;4;1)="" evaluates to TRUE and therefore in cell C15 the term =IF(HLOOKUP(C6;B1:C4;4;1)="";999;555) evaluates to 999 But in cell c16 the term =10-IF(HLOOKUP(C6;B1:C4;4;1)="";999;555) does not evaluate to -989. You get the same error for all operators + - * / ^ In all cases the number 10 is treated as zero. The error occurs only in the structure "number - IF" but not in "IF - number".
Created attachment 66300 [details] testcase with fewer terms
taking over
Created attachment 66317 [details] pop used ScEmptyCellToken in Compare()
dtardon, CompareMat needs the same. Otherwise, yes, that was the problem. It's fixed in CWS "calc32stopper6", svn rev. 277610.
reassigning to QA for verification
I take it for verification.
Verified by using reginas sample. Thx for it.
integrated in OOO320_m8/DEV300_m68