• Dennis Francis's avatar
    Calc threading : Check for "self" references... · 25cc0ab3
    Dennis Francis yazdı
    ...on indirect dependencies too.
    
    Here a self reference to any formula-group
    means if there are any references in a formula
    (of the formula-group itself or any of its dependencies)
    that points to any element inside the formula-group.
    If there are any self-references, then that formula-group
    can't be computed in parallel.
    
    For example, with this patch we can detect the following case:-
      Suppose the formula-group that we want to check is:
      "=(F2+G2-10)*10.0" spanning A2:A100. Let the formula-group
      starting at F2 be "=A1*0.1-10". The indirect dependency
      formula-group starting at F2, references back the elements of
      our original formula-group at A2. This makes the F.G at
      A2 unsafe for parallel computation.
    
    Concretly, this patch fixes a recalc crash on tdf#63638/1
    
    Change-Id: I7b999a34571b191d2f70da6a3831f78b24a6b0a7
    Reviewed-on: https://gerrit.libreoffice.org/54433Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
    Tested-by: 's avatarJenkins <ci@libreoffice.org>
    25cc0ab3
formulacell.cxx 169 KB