summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-12 16:36:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-13 15:16:55 +0200
commit0dcebd1b6e2e6f03d83bc46cab7be42a8905df3c (patch)
treecf7b285ca3499839ce9b7aa195e68e0688463f2d
parentbc908eb37e4cb1a37a1123ed141a6999760a6343 (diff)
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@redhat.com>
-rw-r--r--sc/inc/rangeutl.hxx2
-rw-r--r--sc/source/core/tool/interpr1.cxx2
-rw-r--r--sc/source/core/tool/rangeutl.cxx6
3 files changed, 5 insertions, 5 deletions
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);