[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sc/source

Eike Rathke (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 15 07:56:32 UTC 2020


 sc/source/core/data/column4.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 701008631ee257b4c7714ac9e2689c5ecc45bff8
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Tue Oct 13 23:56:28 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Oct 15 09:55:59 2020 +0200

    Resolves: tdf#137248 Fix wrong condition breaking non-group interpret
    
    Regression from
    
        commit 4f36f2ccab6286ec09480caea602c0fa19195736
        CommitDate: Thu Sep 10 11:15:47 2020 +0200
    
            detect if a cell still needs interpreting after Interpret()
    
    The bool return from ScFormulaCell::Interpret() does not indicate
    if it was succesful but whether a group interpret was done. As
    both calls here happen in a non-group context bailing out on that
    if false (no group interpret) is wrong. Instead, ask the cell if
    it still needs to be interpreted after having been interpreted.
    
    Change-Id: I40eeeef65e1da3d729cb3fef550620b1ea0a5741
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104261
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 59f86333f3fce091177d1cfb9363aa81686aa497)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104289
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 73adaf72dd71..950b38766c44 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -1690,14 +1690,14 @@ static bool lcl_InterpretSpan(sc::formula_block::const_iterator& rSpanIter, SCRO
                 ++itSpanStart;
                 for (SCROW nIdx = nSpanStart+1; nIdx <= nSpanEnd; ++nIdx, ++itSpanStart)
                 {
-                    if( !(*itSpanStart)->Interpret()) // We know for sure that this cell is dirty so directly call Interpret().
+                    (*itSpanStart)->Interpret(); // We know for sure that this cell is dirty so directly call Interpret().
+                    if ((*itSpanStart)->NeedsInterpret())
                     {
                         SAL_WARN("sc.core.formulagroup", "Internal error, cell " << (*itSpanStart)->aPos
                             << " failed running Interpret(), not allowing threading");
                         bAllowThreading = false;
                         return bAnyDirty;
                     }
-                    assert(!(*itSpanStart)->NeedsInterpret());
 
                     // Allow early exit like above.
                     if ((mxParentGroup && mxParentGroup->mbPartOfCycle) || !rRecursionHelper.AreGroupsIndependent())
@@ -1804,14 +1804,14 @@ static void lcl_EvalDirty(sc::CellStoreType& rCells, SCROW nRow1, SCROW nRow2, S
                         if( (*itCell)->NeedsInterpret())
                         {
                             bDirtyFlag = true;
-                            if(!(*itCell)->Interpret())
+                            (*itCell)->Interpret();
+                            if ((*itCell)->NeedsInterpret())
                             {
                                 SAL_WARN("sc.core.formulagroup", "Internal error, cell " << (*itCell)->aPos
                                     << " failed running Interpret(), not allowing threading");
                                 bAllowThreading = false;
                                 return;
                             }
-                            assert(!(*itCell)->NeedsInterpret());
                         }
                         bIsDirty = bIsDirty || bDirtyFlag;
 


More information about the Libreoffice-commits mailing list