[Libreoffice-commits] core.git: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 29 11:55:26 UTC 2018


 sc/source/core/data/formulacell.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 1a9bde76620449f2e718bc02a954ebcfd3426f18
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Nov 7 15:36:27 2018 +0100
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Thu Nov 29 12:54:49 2018 +0100

    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: Dennis Francis <dennis.francis at collabora.com>
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index bdc832c55d39..bad0192822b8 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -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;
     }


More information about the Libreoffice-commits mailing list