Hi Regina,

On Thursday, 2010-08-05 15:26:07 +0200, Regina Henschel wrote:

> >The interpreter allows these cases because in Excel the missing
> >parameter is allowed at most places and that's needed for imported
> >documents.
> 
> I think, that the interpreter should not allow invalid (in respect
> to ODF) formulas, but complain about wrong syntax. Instead the
> import filter should add the missing parameter.

Well, yes, of course you're right, in theory ;-)  However, with 2 or
3 import filters just for the different Excel file formats this would be
even more work than keeping the interpreter flexible and assuring
correct syntax for ODFF storage.

Or, Daniel, in case you're reading this, what is your opinion?

It would be an easier step to default missing parameters during formula
compilation, but that would work only for UI, PODF and hopefully OOXML
imports, not for binary file formats.

> The third parameter has an ODF default value "true" and Excel
> calculates with this missing parameter as if it is "true". Therefore
> the Excel import filter should add a "true". Issue 106118 is about the
> fact, that our interpreter does not default to "true" but to "false".
> From a technical view it is no problem to set it to "true" in the
> LINEST method, but I think it would be the wrong way.

We already do that in some places, see usage of
ScInterpreter::GetDoubleWithDefault(), here it would be
::rtl::math::approxFloor( GetDoubleWithDefault( 1.0))
We should actually introduce a ScInterpreter::GetBoolWithDefault() for
these cases..


> >ConvertMatrixParameters() isn't prepared for missings.. at line 1442
> >change
> >
> >         if ( p->GetOpCode() != ocPush )
> >
> >to
> >
> >         if ( p->GetOpCode() != ocPush&&  p->GetOpCode() != ocMissing )
> >
> >that should do (untested).
> 
> I have changed it and it works for the LINEST method. Is this a
> valid solution or might it breaks something in other places?

This is a valid general solution. A missing parameter doesn't have to be
converted, which is handled in the switch case svMissing that follows.

  Eike

-- 
 OOo Calc core developer. Number formatter stricken i18n transpositionizer.
 Signature key 0x87F8D412 : 2F58 5236 DB02 F335 8304  7D6C 65C9 F9B5 87F8 D412
 OpenOffice.org Engineering at Oracle: http://blogs.sun.com/GullFOSS
 --
 Please don't send mail to the old e...@sun.com account that I used for mailing
 lists, it will phase out shortly. Use eike.rat...@oracle.com instead. Thanks.

Attachment: pgpt0ZWkzO7GL.pgp
Description: PGP signature

Reply via email to