Kaydet (Commit) 86d02e1f authored tarafından Eike Rathke's avatar Eike Rathke

Close circle once in iterations only if not 'this'

... as 'this' was just appended hence calculated.
Question remains if there's any situation where the last cell
would not be 'this'.

Change-Id: I9cc1a7e38bdd6aca0e36a4cf1ef1b827003e72a9
Reviewed-on: https://gerrit.libreoffice.org/56412Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: Jenkins
üst 79c0327b
......@@ -1613,10 +1613,15 @@ void ScFormulaCell::Interpret()
// Close circle once. If 'this' is self-referencing only
// (e.g. counter or self-adder) then it is already
// implicitly closed.
if (rRecursionHelper.GetList().size() > 1)
/* TODO: does this even make sense anymore? The last cell
* added above with rRecursionHelper.Insert() should always
* be 'this', shouldn't it? */
ScFormulaCell* pLastCell = nullptr;
if (rRecursionHelper.GetList().size() > 1 &&
((pLastCell = rRecursionHelper.GetList().back().pCell) != this))
{
pDocument->IncInterpretLevel();
rRecursionHelper.GetList().back().pCell->InterpretTail(
pLastCell->InterpretTail(
pDocument->GetNonThreadedContext(), SCITP_CLOSE_ITERATION_CIRCLE);
pDocument->DecInterpretLevel();
}
......
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