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

Resolves: tdf#123477 let array/matrix formula act as ForceArray on calls

... so the inheritance and checks introduced with
ParamClass::ReferenceOrRefArray work for those as well.

Change-Id: Ieb87f6a3df5a388f859eae4c5558cf282cd0cde3
Reviewed-on: https://gerrit.libreoffice.org/68236Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: Jenkins
üst 6e65d918
......@@ -2700,11 +2700,20 @@ void FormulaCompiler::ForceArrayOperator( FormulaTokenRef const & rCurr )
// CheckSetForceArrayParameter() and later PutCode().
return;
if (!pCurrentFactorToken || (pCurrentFactorToken.get() == rCurr.get()))
if (!(rCurr->GetOpCode() != ocPush && (rCurr->GetType() == svByte || rCurr->GetType() == svJump)))
return;
if (!(rCurr->GetOpCode() != ocPush && (rCurr->GetType() == svByte || rCurr->GetType() == svJump)))
if (!pCurrentFactorToken || (pCurrentFactorToken.get() == rCurr.get()))
{
if (!pCurrentFactorToken && mbMatrixFlag)
{
// An array/matrix formula acts as ForceArray on all top level
// operators and function calls, so that can be inherited properly
// below.
rCurr->SetInForceArray( ParamClass::ForceArray);
}
return;
}
// Inherited parameter class.
const formula::ParamClass eForceType = pCurrentFactorToken->GetInForceArray();
......
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