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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Sep 13 13:17:37 UTC 2020


 sc/inc/rangeutl.hxx              |    2 +-
 sc/source/core/tool/interpr1.cxx |    2 +-
 sc/source/core/tool/rangeutl.cxx |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 0dcebd1b6e2e6f03d83bc46cab7be42a8905df3c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Sep 12 16:36:32 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Sep 13 15:16:55 2020 +0200

    GetRangeDataFromString is never passed a null ScDocument
    
    Change-Id: Iaaba1ce57831bc484849b6df2ec4f864de469936
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102528
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx
index 7833f7ed4dd2..f5468ad2728f 100644
--- a/sc/inc/rangeutl.hxx
+++ b/sc/inc/rangeutl.hxx
@@ -221,7 +221,7 @@ public:
                             const ScDocument* pDoc );
 
 /// String to RangeData core
-    static ScRangeData* GetRangeDataFromString(const OUString& rString, const SCTAB nTab, const ScDocument* pDoc);
+    static ScRangeData* GetRangeDataFromString(const OUString& rString, const SCTAB nTab, const ScDocument& rDoc);
 };
 
 class ScArea
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index b4c66860c3ea..1493b56d241d 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8122,7 +8122,7 @@ void ScInterpreter::ScIndirect()
     {
         do
         {
-            ScRangeData* pData = ScRangeStringConverter::GetRangeDataFromString(sRefStr, nTab, &mrDoc);
+            ScRangeData* pData = ScRangeStringConverter::GetRangeDataFromString(sRefStr, nTab, mrDoc);
             if (!pData)
                 break;
 
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index b09c0e18dd32..6faacbaaf6cf 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -896,9 +896,9 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con
     rString = aRetStr.makeStringAndClear();
 }
 
-ScRangeData* ScRangeStringConverter::GetRangeDataFromString(const OUString& rString, const SCTAB nTab, const ScDocument* pDoc)
+ScRangeData* ScRangeStringConverter::GetRangeDataFromString(const OUString& rString, const SCTAB nTab, const ScDocument& rDoc)
 {
-    ScRangeName* pLocalRangeName = pDoc->GetRangeName(nTab);
+    ScRangeName* pLocalRangeName = rDoc.GetRangeName(nTab);
     ScRangeData* pData = nullptr;
     OUString aUpperName = ScGlobal::getCharClassPtr()->uppercase(rString);
     if(pLocalRangeName)
@@ -907,7 +907,7 @@ ScRangeData* ScRangeStringConverter::GetRangeDataFromString(const OUString& rStr
     }
     if (!pData)
     {
-        ScRangeName* pGlobalRangeName = pDoc->GetRangeName();
+        ScRangeName* pGlobalRangeName = rDoc.GetRangeName();
         if (pGlobalRangeName)
         {
             pData = pGlobalRangeName->findByUpperName(aUpperName);


More information about the Libreoffice-commits mailing list