sc/source/core/tool/interpr1.cxx |    8 ++++----
 sc/source/core/tool/interpr4.cxx |    4 ++--
 sc/source/core/tool/interpr6.cxx |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 69bf8f5e6dc43adde087403531641f2bd064a22c
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Fri Mar 11 21:28:19 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Mar 14 14:20:02 2022 +0100

    Related: tdf#111675 Replace Pop() with PopError() where relevant
    
    ... to propagate the original (previous) error instead of
    overriding it with a new error. Pop() may only be used if the
    stack type is already known to be not svError, or to explicitly
    ignore a current error.
    
    Change-Id: I5a980c29f2d2679c0e2f2fc7e53c458dc147911f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131404
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    Tested-by: Jenkins
    (cherry picked from commit 84720c09ef30e79c56936026c3992240b4ae010b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131362
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 131f76cca889..d40e93608d6e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2828,7 +2828,7 @@ void ScInterpreter::ScFormula()
         }
         break;
         default:
-            Pop();
+            PopError();
             SetError( FormulaError::NotAvailable );
     }
     PushString( aFormula );
@@ -3727,7 +3727,7 @@ void ScInterpreter::ScMin( bool bTextAsZero )
             }
             break;
             default :
-                Pop();
+                PopError();
                 SetError(FormulaError::IllegalParameter);
         }
     }
@@ -3885,7 +3885,7 @@ void ScInterpreter::ScMax( bool bTextAsZero )
             }
             break;
             default :
-                Pop();
+                PopError();
                 SetError(FormulaError::IllegalParameter);
         }
     }
@@ -4096,7 +4096,7 @@ void ScInterpreter::GetStVarParams( bool bTextAsZero, 
double(*VarResult)( double
             }
             break;
             default :
-                Pop();
+                PopError();
                 SetError(FormulaError::IllegalParameter);
         }
     }
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 929844886b66..bc99592a15a8 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -2701,7 +2701,7 @@ void ScInterpreter::ScExternal()
         else
         {
             while( nParamCount-- > 0)
-                Pop();
+                PopError();
             PushIllegalParameter();
         }
     }
@@ -3077,7 +3077,7 @@ void ScInterpreter::ScExternal()
     {
         while( nParamCount-- > 0)
         {
-            Pop();
+            PopError();
         }
         PushError( FormulaError::NoAddin );
     }
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index dbeab67fe35c..9dd442624884 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -515,7 +515,7 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, 
bool bTextAsZero )
                             else
                             {
                                 while (nParamCount-- > 0)
-                                    Pop();
+                                    PopError();
                                 SetError( FormulaError::NoValue );
                             }
                         }

Reply via email to