diff options
-rw-r--r-- | compilerplugins/clang/constantparam.numbers.results | 8 | ||||
-rw-r--r-- | sc/inc/tokenarray.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 35 | ||||
-rw-r--r-- | sc/source/filter/excel/excform.cxx | 9 |
4 files changed, 2 insertions, 51 deletions
diff --git a/compilerplugins/clang/constantparam.numbers.results b/compilerplugins/clang/constantparam.numbers.results index faa5ad0485a6..34a32601044d 100644 --- a/compilerplugins/clang/constantparam.numbers.results +++ b/compilerplugins/clang/constantparam.numbers.results @@ -1946,14 +1946,6 @@ sc/inc/tokenarray.hxx:261 void ScTokenArray::WrapReference(const class ScAddress &,short,int) int nMaxRow 65535 -sc/inc/tokenarray.hxx:262 - _Bool ScTokenArray::NeedsWrapReference(const class ScAddress &,short,int) const - short nMaxCol - 255 -sc/inc/tokenarray.hxx:262 - _Bool ScTokenArray::NeedsWrapReference(const class ScAddress &,short,int) const - int nMaxRow - 65535 sc/inc/zforauto.hxx:38 void ScNumFormatAbbrev::Save(class SvStream &,unsigned short) const unsigned short eByteStrSet diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx index 0592521901b3..997aa0e9d8f7 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -262,7 +262,6 @@ public: OUString CreateString( sc::TokenStringContext& rCxt, const ScAddress& rPos ) const; void WrapReference( const ScAddress& rPos, SCCOL nMaxCol, SCROW nMaxRow ); - bool NeedsWrapReference( const ScAddress& rPos, SCCOL nMaxCol, SCROW nMaxRow ) const; sal_Int32 GetWeight() const; diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 9fc32499731d..114bf4107609 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -5321,41 +5321,6 @@ void ScTokenArray::WrapReference( const ScAddress& rPos, SCCOL nMaxCol, SCROW nM } } -bool ScTokenArray::NeedsWrapReference( const ScAddress& rPos, SCCOL nMaxCol, SCROW nMaxRow ) const -{ - FormulaToken** p = pCode.get(); - FormulaToken** pEnd = p + static_cast<size_t>(nLen); - for (; p != pEnd; ++p) - { - switch ((*p)->GetType()) - { - case svSingleRef: - { - formula::FormulaToken* pToken = *p; - ScSingleRefData& rRef = *pToken->GetSingleRef(); - ScAddress aAbs = rRef.toAbs(*mxSheetLimits, rPos); - if (aAbs.Col() > nMaxCol || aAbs.Row() > nMaxRow) - return true; - } - break; - case svDoubleRef: - { - formula::FormulaToken* pToken = *p; - ScComplexRefData& rRef = *pToken->GetDoubleRef(); - ScRange aAbs = rRef.toAbs(*mxSheetLimits, rPos); - // Entire columns/rows are sticky. - if ( (!rRef.IsEntireCol() && (aAbs.aStart.Row() > nMaxRow || aAbs.aEnd.Row() > nMaxRow)) || - (!rRef.IsEntireRow() && (aAbs.aStart.Col() > nMaxCol || aAbs.aEnd.Col() > nMaxCol))) - return true; - } - break; - default: - ; - } - } - return false; -} - sal_Int32 ScTokenArray::GetWeight() const { sal_Int32 nResult = 0; diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx index f1374e2d5c12..d217c9622e06 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -121,13 +121,8 @@ void ImportExcel::Formula( if (pSharedCode) { ScFormulaCell* pCell; - if (pSharedCode->NeedsWrapReference(aScPos, EXC_MAXCOL8, EXC_MAXROW8)) - { - pCell = new ScFormulaCell(rD, aScPos, pSharedCode->Clone()); - pCell->GetCode()->WrapReference(aScPos, EXC_MAXCOL8, EXC_MAXROW8); - } - else - pCell = new ScFormulaCell(rD, aScPos, *pSharedCode); + pCell = new ScFormulaCell(rD, aScPos, pSharedCode->Clone()); + pCell->GetCode()->WrapReference(aScPos, EXC_MAXCOL8, EXC_MAXROW8); rDoc.getDoc().EnsureTable(aScPos.Tab()); rDoc.setFormulaCell(aScPos, pCell); pCell->SetNeedNumberFormat(false); |