Kaydet (Commit) 678f8ab7 authored tarafından Eike Rathke's avatar Eike Rathke

Resolves: tdf#117049 do not re-interpret a single circular self-reference

... to not execute the calculation twice, which added an implicit
iteration step.

Change-Id: I943f770d32ebe84a8359f2f94c1f0bf5731b6f88
Reviewed-on: https://gerrit.libreoffice.org/56170Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: Jenkins
üst f53a5dfa
...@@ -1610,11 +1610,16 @@ void ScFormulaCell::Interpret() ...@@ -1610,11 +1610,16 @@ void ScFormulaCell::Interpret()
else else
{ {
bResumeIteration = false; bResumeIteration = false;
// Close circle once. // Close circle once. If 'this' is self-referencing only
pDocument->IncInterpretLevel(); // (e.g. counter or self-adder) then it is already
rRecursionHelper.GetList().back().pCell->InterpretTail( pDocument->GetNonThreadedContext(), // implicitly closed.
SCITP_CLOSE_ITERATION_CIRCLE); if (rRecursionHelper.GetList().size() > 1)
pDocument->DecInterpretLevel(); {
pDocument->IncInterpretLevel();
rRecursionHelper.GetList().back().pCell->InterpretTail(
pDocument->GetNonThreadedContext(), SCITP_CLOSE_ITERATION_CIRCLE);
pDocument->DecInterpretLevel();
}
// Start at 1, init things. // Start at 1, init things.
rRecursionHelper.StartIteration(); rRecursionHelper.StartIteration();
// Mark all cells being in iteration. // Mark all cells being in iteration.
......
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