Issue 77280 - ODFF: ISERROR(undefinedname) results in #NAME! error, should be TRUE instead.
Summary: ODFF: ISERROR(undefinedname) results in #NAME! error, should be TRUE instead.
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: ui (show other issues)
Version: OOo 2.2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
URL:
Keywords: ms_interoperability
Depends on:
Blocks:
 
Reported: 2007-05-12 16:47 UTC by mikelo
Modified: 2013-08-07 15:15 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Function example (7.00 KB, application/vnd.sun.xml.calc)
2007-05-12 16:48 UTC, mikelo
no flags Details
TestCaseSpecification (6.60 KB, text/html)
2008-02-27 08:40 UTC, oc
no flags Details
suggested extra test cases for issue 77280 (10.66 KB, text/plain)
2008-02-28 16:06 UTC, drking
no flags Details
TestCaseSpecification (enhanced) (18.20 KB, text/html)
2008-02-28 17:19 UTC, oc
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mikelo 2007-05-12 16:47:27 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 ?
Comment 1 mikelo 2007-05-12 16:48:49 UTC
Created attachment 45076 [details]
Function example
Comment 2 kpalagin 2007-06-09 16:41:31 UTC
Confirming with 2.3m211 on WinXP - as described.
Comment 3 frank 2007-07-06 14:18:42 UTC
Hi Eike,

as discussed on the Phone as task to you.

Frank
Comment 4 ooo 2007-07-06 16:30:38 UTC
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.
Comment 5 ooo 2007-07-31 16:10:43 UTC
OASIS ODFF subcommittee agreed to recommend this behavior. Targeting to OOo3.0
Comment 6 ooo 2008-02-04 16:25:33 UTC
Started working on this in cws odff.
Comment 7 ooo 2008-02-06 11:28:30 UTC
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
Comment 8 drking 2008-02-12 07:51:10 UTC
Does this also solve:
=ISERROR(CHOOSE(0;"Apple";"Orange"))
which in OOo2.3 returns Err:502 rather than TRUE?

Many thanks
Comment 9 ooo 2008-02-12 11:22:51 UTC
Well, it does now ;-)  Thanks for the hint.
Comment 10 ooo 2008-02-19 18:42:28 UTC
Reassigning to QA for verification.
Comment 11 oc 2008-02-27 08:40:52 UTC
Created attachment 51746 [details]
TestCaseSpecification
Comment 12 drking 2008-02-27 09:19:27 UTC
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

Comment 13 oc 2008-02-28 14:25:04 UTC
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.
Comment 14 drking 2008-02-28 16:06:37 UTC
Created attachment 51791 [details]
suggested extra test cases for issue 77280
Comment 15 drking 2008-02-28 16:24:33 UTC
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.
Comment 16 oc 2008-02-28 17:19:21 UTC
Created attachment 51796 [details]
TestCaseSpecification (enhanced)
Comment 17 oc 2008-10-17 14:20:21 UTC
closed because fix available in builds OOO300_m9 and DEV300_m33