Kaydet (Commit) 4be657d5 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Removed duplicated methods.

üst 8b2fb88b
...@@ -83,14 +83,6 @@ public: ...@@ -83,14 +83,6 @@ public:
void Insert( ScFormulaCell* p, bool bOldRunning, const ScFormulaResult & rRes ); 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; } bool IsInIterationReturn() const { return bInIterationReturn; }
void SetInIterationReturn( bool b ); void SetInIterationReturn( bool b );
bool IsDoingIteration() const { return nIteration > 0; } bool IsDoingIteration() const { return nIteration > 0; }
...@@ -102,8 +94,8 @@ public: ...@@ -102,8 +94,8 @@ public:
void EndIteration(); void EndIteration();
ScFormulaRecursionList::iterator GetLastIterationStart() { return aLastIterationStart; } ScFormulaRecursionList::iterator GetLastIterationStart() { return aLastIterationStart; }
ScFormulaRecursionList::iterator GetIterationStart() { return GetStart(); } ScFormulaRecursionList::iterator GetIterationStart();
ScFormulaRecursionList::iterator GetIterationEnd() { return GetEnd(); } ScFormulaRecursionList::iterator GetIterationEnd();
/** Any return, recursion or iteration, iteration is always coupled with /** Any return, recursion or iteration, iteration is always coupled with
recursion. */ recursion. */
bool IsInReturn() const { return bInRecursionReturn; } bool IsInReturn() const { return bInRecursionReturn; }
......
...@@ -1390,9 +1390,9 @@ void ScFormulaCell::Interpret() ...@@ -1390,9 +1390,9 @@ void ScFormulaCell::Interpret()
{ {
rRecursionHelper.SetInRecursionReturn( false); rRecursionHelper.SetInRecursionReturn( false);
for (ScFormulaRecursionList::const_iterator aIter( for (ScFormulaRecursionList::const_iterator aIter(
rRecursionHelper.GetStart()); rRecursionHelper.GetIterationStart());
!rRecursionHelper.IsInReturn() && aIter != !rRecursionHelper.IsInReturn() && aIter !=
rRecursionHelper.GetEnd(); ++aIter) rRecursionHelper.GetIterationEnd(); ++aIter)
{ {
ScFormulaCell* pCell = (*aIter).pCell; ScFormulaCell* pCell = (*aIter).pCell;
if (pCell->IsDirtyOrInTableOpDirty()) if (pCell->IsDirtyOrInTableOpDirty())
...@@ -1412,7 +1412,7 @@ void ScFormulaCell::Interpret() ...@@ -1412,7 +1412,7 @@ void ScFormulaCell::Interpret()
else if (bResumeIteration || else if (bResumeIteration ||
rRecursionHelper.IsDoingIteration()) rRecursionHelper.IsDoingIteration())
rRecursionHelper.GetList().erase( rRecursionHelper.GetList().erase(
rRecursionHelper.GetStart(), rRecursionHelper.GetIterationStart(),
rRecursionHelper.GetLastIterationStart()); rRecursionHelper.GetLastIterationStart());
else else
rRecursionHelper.Clear(); rRecursionHelper.Clear();
......
...@@ -32,13 +32,13 @@ void ScRecursionHelper::Init() ...@@ -32,13 +32,13 @@ void ScRecursionHelper::Init()
{ {
nRecursionCount = 0; nRecursionCount = 0;
bInRecursionReturn = bDoingRecursion = bInIterationReturn = false; bInRecursionReturn = bDoingRecursion = bInIterationReturn = false;
aInsertPos = GetEnd(); aInsertPos = GetIterationEnd();
ResetIteration(); ResetIteration();
} }
void ScRecursionHelper::ResetIteration() void ScRecursionHelper::ResetIteration()
{ {
aLastIterationStart = GetEnd(); aLastIterationStart = GetIterationEnd();
nIteration = 0; nIteration = 0;
bConverging = false; bConverging = false;
} }
...@@ -90,6 +90,16 @@ void ScRecursionHelper::EndIteration() ...@@ -90,6 +90,16 @@ void ScRecursionHelper::EndIteration()
ResetIteration(); ResetIteration();
} }
ScFormulaRecursionList::iterator ScRecursionHelper::GetIterationStart()
{
return aRecursionFormulas.begin();
}
ScFormulaRecursionList::iterator ScRecursionHelper::GetIterationEnd()
{
return aRecursionFormulas.end();
}
void ScRecursionHelper::Clear() void ScRecursionHelper::Clear()
{ {
aRecursionFormulas.clear(); aRecursionFormulas.clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment