diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-06-07 16:43:43 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2017-06-07 21:34:04 +0300 |
commit | 8f68e19356bfbc20f52e70a2b88ce77e01304b30 (patch) | |
tree | 968baf231b3f5c83f9aeb77ea2b9bf82bec1b7aa /sc/source | |
parent | 1bb184b064fbd679152f503c0c997be24c21ce32 (diff) |
Take new FormulaTokenArrayPlainIterator into use in a couple more places
Change-Id: Iaccbc7927943948136a56ba17f6bcff3a6971f31
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/document10.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx index 2dc37a90c937..fddc029dc815 100644 --- a/sc/source/core/data/document10.cxx +++ b/sc/source/core/data/document10.cxx @@ -564,7 +564,8 @@ bool ScDocument::FindRangeNamesReferencingSheet( sc::UpdatedRangeNames& rIndexes bool bRef = !bSameDoc; // include every name used when copying to other doc if (nRecursion < 126) // whatever.. 42*3 { - for (const formula::FormulaToken* p = pCode->First(); p; p = pCode->Next()) + formula::FormulaTokenArrayPlainIterator aIter(*pCode); + for (const formula::FormulaToken* p = aIter.First(); p; p = aIter.Next()) { if (p->GetOpCode() == ocName) { @@ -603,7 +604,8 @@ MightReferenceSheet mightRangeNameReferenceSheet( ScRangeData* pData, SCTAB nRef if (!pCode) return MightReferenceSheet::NONE; - for (const formula::FormulaToken* p = pCode->First(); p; p = pCode->Next()) + formula::FormulaTokenArrayPlainIterator aIter(*pCode); + for (const formula::FormulaToken* p = aIter.First(); p; p = aIter.Next()) { if (p->GetOpCode() == ocName) return MightReferenceSheet::NAME; @@ -850,7 +852,8 @@ bool ScDocument::CopyAdjustRangeName( SCTAB& rSheet, sal_uInt16& rIndex, ScRange ScTokenArray* pCode = iRD->GetCode(); if (pCode) { - for (formula::FormulaToken* p = pCode->First(); p; p = pCode->Next()) + formula::FormulaTokenArrayPlainIterator aIter(*pCode); + for (formula::FormulaToken* p = aIter.First(); p; p = aIter.Next()) { if (p->GetOpCode() == ocName) { |