diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-09-08 10:32:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-09-09 20:56:07 +0200 |
commit | e00a86699b89913a80b15eeea33dd0fac64299d0 (patch) | |
tree | bb69f61cabcf63ddd55a2c7c5a3c834f87c60f56 /sc | |
parent | 3be1cdce9d92cbadca1b276b3193c727032ea717 (diff) |
GetCurNumFmtInfo is always called with the same context as given in ctor
Change-Id: Ic3aefaa5ddd26b5cb44bfc299f7ae7188f205d17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139638
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/dociter.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dociter.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/interpr6.cxx | 2 |
4 files changed, 7 insertions, 7 deletions
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: |