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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 14 08:02:21 UTC 2020


 sc/source/core/data/formulaiter.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 3b76f996997b91a19885a443d94a2a0d56dce557
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 13 20:21:55 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 14 10:01:38 2020 +0200

    lcl_ScDetectiveRefIter_SkipRef always dereferences its ScDocument* arg
    
    Change-Id: I4c8ccf6c5c629bfe4b9ece9199f1aa38f4e7f97e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102616
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/core/data/formulaiter.cxx b/sc/source/core/data/formulaiter.cxx
index 386803372756..f05eea9e2d99 100644
--- a/sc/source/core/data/formulaiter.cxx
+++ b/sc/source/core/data/formulaiter.cxx
@@ -33,17 +33,17 @@ ScDetectiveRefIter::ScDetectiveRefIter( const ScDocument* pDoc, ScFormulaCell* p
 {
 }
 
-static bool lcl_ScDetectiveRefIter_SkipRef( const ScDocument* pDoc, formula::FormulaToken* p, const ScAddress& rPos )
+static bool lcl_ScDetectiveRefIter_SkipRef( const ScDocument& rDoc, formula::FormulaToken* p, const ScAddress& rPos )
 {
     ScSingleRefData& rRef1 = *p->GetSingleRef();
-    ScAddress aAbs1 = rRef1.toAbs(*pDoc, rPos);
-    if (!pDoc->ValidAddress(aAbs1))
+    ScAddress aAbs1 = rRef1.toAbs(rDoc, rPos);
+    if (!rDoc.ValidAddress(aAbs1))
         return true;
     if ( p->GetType() == svDoubleRef || p->GetType() == svExternalDoubleRef )
     {
         ScSingleRefData& rRef2 = p->GetDoubleRef()->Ref2;
-        ScAddress aAbs2 = rRef2.toAbs(*pDoc, rPos);
-        if (!pDoc->ValidAddress(aAbs2))
+        ScAddress aAbs2 = rRef2.toAbs(rDoc, rPos);
+        if (!rDoc.ValidAddress(aAbs2))
             return true;
     }
     return false;
@@ -67,7 +67,7 @@ bool ScDetectiveRefIter::GetNextRef( ScRange& rRange )
 formula::FormulaToken* ScDetectiveRefIter::GetNextRefToken()
 {
     formula::FormulaToken* p = maIter.GetNextReferenceRPN();
-    while (p && lcl_ScDetectiveRefIter_SkipRef(mpDoc, p, aPos))
+    while (p && lcl_ScDetectiveRefIter_SkipRef(*mpDoc, p, aPos))
     {
         p = maIter.GetNextReferenceRPN();
     }


More information about the Libreoffice-commits mailing list