Hi all,
the draft ODF1.2 spec defines the syntax
LINEST( Array knownY [ ; [ Array knownX ] [ ; Logical Const = TRUE() [ ;
Logical Stats = FALSE() ] ] ] )
With this syntax the formula
=LINEST(B2:B6;A2:A6;;TRUE())
is not allowed, but currently it gives no error (That is issue106118).
And the formula
=LINEST(B2:B6;;TRUE();TRUE())
is allowed, but currently gives an error.
I have tried to detect this cases using the method IsMissing():
In interpr5.cxx
void ScInterpreter::CalulateRGPRKP(BOOL _bRKP)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er",
"ScInterpreter::CheckMatrix" );
BYTE nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 1, 4 ) )
return;
BOOL bConstant, bStats;
if (nParamCount == 4)
bStats = GetBool();
else
bStats = FALSE;
if (nParamCount >= 3)
{
if (IsMissing()) // empty third parameter is not allowed
{
PushIllegalParameter();
return;
}
else
bConstant = GetBool();
}
else
bConstant = TRUE;
ScMatrixRef pMatX;
ScMatrixRef pMatY;
if (nParamCount >= 2)
{// In ODF1.2 empty second parameter is allowed
if (IsMissing())
{
Pop();
pMatX = NULL;
}
else
pMatX = GetMatrix();
}
The method IsMissing() works so far, that the then-case is reached. But
I get an error popup
ConvertMatrixParameters: not a push
From File C:/DEV300m84my/sc/source/core/tool/interpr4.cxx at Line 1444
If I insert a DBG_ERRORFILE() as first statement in the then-case, then
I notice that first the popup "not a push" comes and after it, when I
ignore it, my own message comes up.
If I ignore the messages, the calculation finishes correctly.
Can you please teach me what to do?
Kind regards
Regina
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org
For additional commands, e-mail: dev-h...@sc.openoffice.org