formula/source/core/api/FormulaCompiler.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a15ce15709acee3b46fb9f7d6836c57f6e1ef9a7
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Fri Jun 3 14:18:30 2022 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Fri Jun 3 15:34:54 2022 +0200

    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 <er...@redhat.com>
    Tested-by: Jenkins

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);

Reply via email to