Kaydet (Commit) a5b9bb7b authored tarafından Eike Rathke's avatar Eike Rathke

Resolves: tdf#118561 handle external references as jump matrix result

Change-Id: I0381179347960293f5d470ed231d626cb6707b5a
Reviewed-on: https://gerrit.libreoffice.org/57144Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: Jenkins
üst dda14afa
......@@ -713,10 +713,44 @@ bool ScInterpreter::JumpMatrix( short nStackLevel )
}
}
break;
case svExternalSingleRef:
{
ScExternalRefCache::TokenRef pToken;
PopExternalSingleRef(pToken);
if (nGlobalError != FormulaError::NONE)
{
pJumpMatrix->PutResultDouble( CreateDoubleError( nGlobalError), nC, nR );
nGlobalError = FormulaError::NONE;
}
else
{
switch (pToken->GetType())
{
case svDouble:
pJumpMatrix->PutResultDouble( pToken->GetDouble(), nC, nR );
break;
case svString:
pJumpMatrix->PutResultString( pToken->GetString(), nC, nR );
break;
case svEmptyCell:
pJumpMatrix->PutResultEmpty( nC, nR );
break;
default:
// svError was already handled (set by
// PopExternalSingleRef()) with nGlobalError
// above.
assert(!"unhandled svExternalSingleRef case");
pJumpMatrix->PutResultDouble( CreateDoubleError(
FormulaError::UnknownStackVariable), nC, nR );
}
}
}
break;
case svExternalDoubleRef:
case svMatrix:
{ // match matrix offsets
double fVal;
ScMatrixRef pMat = PopMatrix();
ScMatrixRef pMat = GetMatrix();
if ( nGlobalError != FormulaError::NONE )
{
fVal = CreateDoubleError( nGlobalError );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment