From e00a86699b89913a80b15eeea33dd0fac64299d0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 8 Sep 2022 10:32:42 +0100 Subject: GetCurNumFmtInfo is always called with the same context as given in ctor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic3aefaa5ddd26b5cb44bfc299f7ae7188f205d17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139638 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sc/inc/dociter.hxx | 2 +- sc/source/core/data/dociter.cxx | 6 +++--- sc/source/core/tool/interpr1.cxx | 4 ++-- sc/source/core/tool/interpr6.cxx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'sc') diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx index 55a2040f1d1b..c8b51b9e24ff 100644 --- a/sc/inc/dociter.hxx +++ b/sc/inc/dociter.hxx @@ -87,7 +87,7 @@ public: ScDocument& rDocument, const ScRange& rRange, SubtotalFlags nSubTotalFlags = SubtotalFlags::NONE, bool bTextAsZero = false ); - void GetCurNumFmtInfo( const ScInterpreterContext& rContext, SvNumFormatType& nType, sal_uInt32& nIndex ); + void GetCurNumFmtInfo( SvNumFormatType& nType, sal_uInt32& nIndex ); /// Does NOT reset rValue if no value found! bool GetFirst( double& rValue, FormulaError& rErr ); diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 97d40d82fd98..0fb2fec32673 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -252,14 +252,14 @@ bool ScValueIterator::GetThis(double& rValue, FormulaError& rErr) } } -void ScValueIterator::GetCurNumFmtInfo( const ScInterpreterContext& rContext, SvNumFormatType& nType, sal_uInt32& nIndex ) +void ScValueIterator::GetCurNumFmtInfo( SvNumFormatType& nType, sal_uInt32& nIndex ) { if (!bNumValid && mnTab < mrDoc.GetTableCount()) { SCROW nCurRow = GetRow(); const ScColumn* pCol = &(mrDoc.maTabs[mnTab])->aCol[mnCol]; - nNumFmtIndex = pCol->GetNumberFormat(rContext, nCurRow); - nNumFmtType = rContext.GetNumberFormatType( nNumFmtIndex ); + nNumFmtIndex = pCol->GetNumberFormat(mrContext, nCurRow); + nNumFmtType = mrContext.GetNumberFormatType( nNumFmtIndex ); bNumValid = true; } diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 8a7a0ac0093b..279d33f29cae 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -3697,7 +3697,7 @@ void ScInterpreter::ScMin( bool bTextAsZero ) { if (nMin > nVal) nMin = nVal; - aValIter.GetCurNumFmtInfo( mrContext, nFuncFmtType, nFuncFmtIndex ); + aValIter.GetCurNumFmtInfo( nFuncFmtType, nFuncFmtIndex ); while ((nErr == FormulaError::NONE) && aValIter.GetNext(nVal, nErr)) { if (nMin > nVal) @@ -3854,7 +3854,7 @@ void ScInterpreter::ScMax( bool bTextAsZero ) { if (nMax < nVal) nMax = nVal; - aValIter.GetCurNumFmtInfo( mrContext, nFuncFmtType, nFuncFmtIndex ); + aValIter.GetCurNumFmtInfo( nFuncFmtType, nFuncFmtIndex ); while ((nErr == FormulaError::NONE) && aValIter.GetNext(nVal, nErr)) { if (nMax < nVal) diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx index 9f8fcb6a9661..13f19895e00a 100644 --- a/sc/source/core/tool/interpr6.cxx +++ b/sc/source/core/tool/interpr6.cxx @@ -788,7 +788,7 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero ) if (aValIter.GetFirst(fVal, nErr)) { // placed the loop on the inside for performance reasons: - aValIter.GetCurNumFmtInfo( mrContext, nFuncFmtType, nFuncFmtIndex ); + aValIter.GetCurNumFmtInfo( nFuncFmtType, nFuncFmtIndex ); switch( eFunc ) { case ifAVERAGE: -- cgit