diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-04-09 21:40:08 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-04-09 21:45:58 -0400 |
commit | 4be657d53281680ebfa72e96b93705599f4178e1 (patch) | |
tree | d951b69131ebfb2747dc11ac4435d84a42c8600a | |
parent | 8b2fb88b124acd8fc7fa3443dafb3f955b47390d (diff) |
Removed duplicated methods.
-rw-r--r-- | sc/inc/recursionhelper.hxx | 12 | ||||
-rw-r--r-- | sc/source/core/data/cell.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/recursionhelper.cxx | 14 |
3 files changed, 17 insertions, 15 deletions
diff --git a/sc/inc/recursionhelper.hxx b/sc/inc/recursionhelper.hxx index 176a93d61501..f2a258d153b9 100644 --- a/sc/inc/recursionhelper.hxx +++ b/sc/inc/recursionhelper.hxx @@ -83,14 +83,6 @@ public: void Insert( ScFormulaCell* p, bool bOldRunning, const ScFormulaResult & rRes ); - ScFormulaRecursionList::iterator GetStart() - { - return aRecursionFormulas.begin(); - } - ScFormulaRecursionList::iterator GetEnd() - { - return aRecursionFormulas.end(); - } bool IsInIterationReturn() const { return bInIterationReturn; } void SetInIterationReturn( bool b ); bool IsDoingIteration() const { return nIteration > 0; } @@ -102,8 +94,8 @@ public: void EndIteration(); ScFormulaRecursionList::iterator GetLastIterationStart() { return aLastIterationStart; } - ScFormulaRecursionList::iterator GetIterationStart() { return GetStart(); } - ScFormulaRecursionList::iterator GetIterationEnd() { return GetEnd(); } + ScFormulaRecursionList::iterator GetIterationStart(); + ScFormulaRecursionList::iterator GetIterationEnd(); /** Any return, recursion or iteration, iteration is always coupled with recursion. */ bool IsInReturn() const { return bInRecursionReturn; } diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index f191c5db6adf..9ccaddedf2cd 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -1390,9 +1390,9 @@ void ScFormulaCell::Interpret() { rRecursionHelper.SetInRecursionReturn( false); for (ScFormulaRecursionList::const_iterator aIter( - rRecursionHelper.GetStart()); + rRecursionHelper.GetIterationStart()); !rRecursionHelper.IsInReturn() && aIter != - rRecursionHelper.GetEnd(); ++aIter) + rRecursionHelper.GetIterationEnd(); ++aIter) { ScFormulaCell* pCell = (*aIter).pCell; if (pCell->IsDirtyOrInTableOpDirty()) @@ -1412,7 +1412,7 @@ void ScFormulaCell::Interpret() else if (bResumeIteration || rRecursionHelper.IsDoingIteration()) rRecursionHelper.GetList().erase( - rRecursionHelper.GetStart(), + rRecursionHelper.GetIterationStart(), rRecursionHelper.GetLastIterationStart()); else rRecursionHelper.Clear(); diff --git a/sc/source/core/tool/recursionhelper.cxx b/sc/source/core/tool/recursionhelper.cxx index 98e6c2899b61..b98484b1fb0a 100644 --- a/sc/source/core/tool/recursionhelper.cxx +++ b/sc/source/core/tool/recursionhelper.cxx @@ -32,13 +32,13 @@ void ScRecursionHelper::Init() { nRecursionCount = 0; bInRecursionReturn = bDoingRecursion = bInIterationReturn = false; - aInsertPos = GetEnd(); + aInsertPos = GetIterationEnd(); ResetIteration(); } void ScRecursionHelper::ResetIteration() { - aLastIterationStart = GetEnd(); + aLastIterationStart = GetIterationEnd(); nIteration = 0; bConverging = false; } @@ -90,6 +90,16 @@ void ScRecursionHelper::EndIteration() ResetIteration(); } +ScFormulaRecursionList::iterator ScRecursionHelper::GetIterationStart() +{ + return aRecursionFormulas.begin(); +} + +ScFormulaRecursionList::iterator ScRecursionHelper::GetIterationEnd() +{ + return aRecursionFormulas.end(); +} + void ScRecursionHelper::Clear() { aRecursionFormulas.clear(); |