Apache OpenOffice (AOO) Bugzilla – Issue 77280
ODFF: ISERROR(undefinedname) results in #NAME! error, should be TRUE instead.
Last modified: 2013-08-07 15:15:24 UTC
The function ISERROR does not evaluate error condition in nested functions, ej. Introducting this function =ISERROR(VLOOKUP(A2;xx;2;0)) in cell B2 returns #NAME because the RANGE xx is not defined. If you introduce this function =ISERROR(B2)on cell B3 returns TRUE. Way it does not works properly on cell B2 returning TRUE ?
Created attachment 45076 [details] Function example
Confirming with 2.3m211 on WinXP - as described.
Hi Eike, as discussed on the Phone as task to you. Frank
Just a short explanation: This is a special case and not a general problem with nested functions in ISERROR. As soon as the formula is compiled the compiler recognizes the xx not being a defined name and stops compilation. The formula isn't even interpreted anymore if already the interim compiled formula has an error and usually wouldn't make sense anyway. In the case of an ISERROR(B2) simply the formula result of B2 is used when interpreted. I'll first clarify with the OASIS ODF formula subcommittee if we do want to require the behavior "the other application" exposes.
OASIS ODFF subcommittee agreed to recommend this behavior. Targeting to OOo3.0
Started working on this in cws odff.
In cws odff: sc/inc/token.hxx 1.13.60.14 sc/source/core/inc/interpre.hxx 1.31.38.10 sc/source/core/tool/compiler.cxx 1.70.56.19 sc/source/core/tool/compiler.cxx 1.70.56.20 sc/source/core/tool/interpr3.cxx 1.20.30.5 sc/source/core/tool/interpr4.cxx 1.51.56.18 sc/source/core/tool/token.cxx 1.29.30.19
Does this also solve: =ISERROR(CHOOSE(0;"Apple";"Orange")) which in OOo2.3 returns Err:502 rather than TRUE? Many thanks
Well, it does now ;-) Thanks for the hint.
Reassigning to QA for verification.
Created attachment 51746 [details] TestCaseSpecification
I wonder if it would be useful if the qa test was a little more rigorous? For instance: *the OP's attachment shows an undefined name nested within a function *my own comment about ISERROR(CHOOSE(0;"Apple";"Orange")) It might be useful to try to break the thing rather than prove it works
verified in internal build cws_odff @drking: Normally the test case specification is made out of the featuremail. Therefor it is not always a complete testing description with all possible cases. If you are the opinion that the TCS is incomplete please feel free to enhance it. FYI: The change from the former functions to the new OASIS ODF formulars will be made in several steps. When it is done completely I will announce a testing session within the community and I hope that there are a lot of volunteers who will help to avoid regressions in OOo's ability to do some maths.
Created attachment 51791 [details] suggested extra test cases for issue 77280
oc>If you are the opinion that the TCS is incomplete please feel free to enhance it. This arises because in the course of rewriting the Calc Function help I have come across issues that should have been caught by qa. I don't like raising new issues :( - there are too many already. My suggestions include the core examples already mentioned in this issue, plus some more complex ones. Hope that's useful.
Created attachment 51796 [details] TestCaseSpecification (enhanced)
closed because fix available in builds OOO300_m9 and DEV300_m33