Hi Eike
To finally find out what goes wrong, I copied the contents of SCIfJump() into
ScIfError(), made ocIfError do the same as ocIf (except in lotus/excel filter
files) and gave IFERROR() 3 arguments (just as IF()).
It still doesn't work: IFERROR(X;Y;Z) always returns Y, regardless of the value
of X. That is, if X produces an error (or Y, or Z), the error is returned.
Could it be that you didn't implement the special handling in the
compiler and tokens? ...
I did an opengrok search for ocIf and changed all files, including sxfunc.src (to give iferror 3
parameters).
The only differences that I know of between IF() and IFERROR() are the function names and the group
to which the functions belong.
When in the switch statement in ScIfError()/ScIfJump() (in /core/sc/source/core/tool/interpr1.cxx)
default:
{
if ( GetBool() ) <<-- here
{ // TRUE
if( nJumpCount >= 2 )
I replace GetBool() with getDouble() and look at its value, it is 3 in case of IFERROR() and 0 in
case of IF().
(in calc I entered IFERROR(0;2;3), result 2 and IF(0;2;3), result 3).
Winfried
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.