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 84720c09ef30e79c56936026c3992240b4ae010b Author: Eike Rathke <er...@redhat.com> AuthorDate: Fri Mar 11 21:28:19 2022 +0100 Commit: Eike Rathke <er...@redhat.com> CommitDate: Sat Mar 12 11:33:58 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 diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index f85c2190150d..f80deb14e221 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 ); @@ -3733,7 +3733,7 @@ void ScInterpreter::ScMin( bool bTextAsZero ) } break; default : - Pop(); + PopError(); SetError(FormulaError::IllegalParameter); } } @@ -3891,7 +3891,7 @@ void ScInterpreter::ScMax( bool bTextAsZero ) } break; default : - Pop(); + PopError(); SetError(FormulaError::IllegalParameter); } } @@ -4102,7 +4102,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 185ad830f057..11353a6e447a 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -2702,7 +2702,7 @@ void ScInterpreter::ScExternal() else { while( nParamCount-- > 0) - Pop(); + PopError(); PushIllegalParameter(); } } @@ -3078,7 +3078,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 ); } }