diff options
author | Eike Rathke <erack@redhat.com> | 2022-06-03 14:18:30 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2022-06-03 15:34:54 +0200 |
commit | a15ce15709acee3b46fb9f7d6836c57f6e1ef9a7 (patch) | |
tree | 0a2a4cbcbbee3b41471334d996e84ae5507da3b5 /formula | |
parent | ae5b06e346ca01bfbc0370632750e5a7c6154e46 (diff) |
Propagate ForceArrayReturn only for Value parameters, tdf#149378 follow-up
So in SUM(MUNIT(3)) the SUM does not get ForceArrayReturn.
Same as in
commit bac202275b1bf1abe4277daf35f74ff973c23483
CommitDate: Fri Jun 3 13:08:11 2022 +0200
Propagate inline array only for Value parameters, tdf#149378 follow-up
Change-Id: I60b17352c6e2f4fe608070c07f538456ed863156
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135358
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index cf2cc01b4584..e74284ae89f2 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -2885,8 +2885,8 @@ void FormulaCompiler::ForceArrayOperator( FormulaTokenRef const & rCurr ) // Propagate a ForceArrayReturn to caller if the called function // returns one and the caller so far does not have a stronger array - // mode set. - if (pCurrentFactorToken->GetInForceArray() == ParamClass::Unknown) + // mode set and expects a scalar value for this parameter. + if (eParamType == ParamClass::Value && pCurrentFactorToken->GetInForceArray() == ParamClass::Unknown) { if (IsMatrixFunction( eOp)) pCurrentFactorToken->SetInForceArray( eArrayReturn); |