diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-09-27 19:42:10 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2017-09-27 21:14:12 +0300 |
commit | 05b3614cac57abc414955f8b1047cf5ca168580e (patch) | |
tree | 0d0b16f3023d477e12edf885e8a945e729dd5b02 /sc | |
parent | 86910087fa41956aad6a22943bfbeb158e205dcd (diff) |
If we are going to avoid repeated calls to pDocument->GetRecursionHelper(),
do it from the start of the function then.
Change-Id: I4699fbd9c70f6ec0110d202062631e8861095aa0
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 22ef81ca2495..d75a93582b15 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -1464,6 +1464,8 @@ public: void ScFormulaCell::Interpret() { + ScRecursionHelper& rRecursionHelper = pDocument->GetRecursionHelper(); + #if DEBUG_CALCULATION static bool bDebugCalculationInit = true; if (bDebugCalculationInit) @@ -1475,7 +1477,7 @@ void ScFormulaCell::Interpret() DebugCalculationStacker aDebugEntry( aPos, pDocument); #endif - if (!IsDirtyOrInTableOpDirty() || pDocument->GetRecursionHelper().IsInReturn()) + if (!IsDirtyOrInTableOpDirty() || rRecursionHelper.IsInReturn()) return; // no double/triple processing //FIXME: @@ -1496,20 +1498,19 @@ void ScFormulaCell::Interpret() aResult.SetResultError( FormulaError::NONE ); // Start or add to iteration list. - if (!pDocument->GetRecursionHelper().IsDoingIteration() || - !pDocument->GetRecursionHelper().GetRecursionInIterationStack().top()->bIsIterCell) - pDocument->GetRecursionHelper().SetInIterationReturn( true); + if (!rRecursionHelper.IsDoingIteration() || + !rRecursionHelper.GetRecursionInIterationStack().top()->bIsIterCell) + rRecursionHelper.SetInIterationReturn( true); return; } // no multiple interprets for GetErrCode, IsValue, GetValue and // different entry point recursions. Would also lead to premature // convergence in iterations. - if (pDocument->GetRecursionHelper().GetIteration() && nSeenInIteration == - pDocument->GetRecursionHelper().GetIteration()) + if (rRecursionHelper.GetIteration() && nSeenInIteration == + rRecursionHelper.GetIteration()) return ; - ScRecursionHelper& rRecursionHelper = pDocument->GetRecursionHelper(); bool bOldRunning = bRunning; if (rRecursionHelper.GetRecursionCount() > MAXRECURSION) { |