Kaydet (Commit) 1a9bde76 authored tarafından Luboš Luňák's avatar Luboš Luňák

calc threads cycle detection should not break computing a value

If ScFormulaCell::Interpret() is called to actually compute the cell's
value (bRunning==true), do not bail out on a detected cycle, it
needs to be detected as an actual cyclic reference. Happens with
testCopyPasteMixedReferenceFormula when during computing dependencies
cell C1 actually has a cyclic dependency on itself. Without this
change, it would simply use its previously computed value.

Change-Id: Ibf90b118b87d3536f5014004ea4a1dbad93ab270
Reviewed-on: https://gerrit.libreoffice.org/63183
Tested-by: Jenkins
Reviewed-by: 's avatarDennis Francis <dennis.francis@collabora.com>
Reviewed-by: 's avatarLuboš Luňák <l.lunak@collabora.com>
üst f73cdd56
......@@ -1523,8 +1523,10 @@ void ScFormulaCell::Interpret()
ScFormulaCell* pTopCell = mxGroup ? mxGroup->mpTopCell : this;
if (pTopCell->mbSeenInPath && rRecursionHelper.GetDepComputeLevel())
if (pTopCell->mbSeenInPath && rRecursionHelper.GetDepComputeLevel() && !bRunning)
{
// This call arose from a dependency calculation and we just found a cycle.
// This will mark all elements in the cycle as parts-of-cycle.
ScFormulaGroupCycleCheckGuard aCycleCheckGuard(rRecursionHelper, pTopCell);
return;
}
......
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