summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-13 14:37:24 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-13 17:57:09 +0200
commitd4ceea4ca9d9abb47a6f84da138c2918bc7100e0 (patch)
treee3d96e197b17e5b2e78f401150156abfb0f2e828
parent3d7e089a3def73d45d60de4db4b3fe4a3bbeb453 (diff)
ParseRows never passed a null ScDocument*
Change-Id: Id9eb2c87ebe583f2024d5b8d8d6fd496dc90c7c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102582 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/inc/address.hxx2
-rw-r--r--sc/source/core/tool/address.cxx10
-rw-r--r--sc/source/ui/vba/vbarange.cxx2
3 files changed, 7 insertions, 7 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 19077f4653bf..772cd7112cff 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -562,7 +562,7 @@ public:
SC_DLLPUBLIC ScRefFlags ParseCols( const ScDocument* pDoc,
const OUString&,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 );
- SC_DLLPUBLIC void ParseRows( const ScDocument* pDoc,
+ SC_DLLPUBLIC void ParseRows( const ScDocument& rDoc,
const OUString&,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 );
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 39bae2ea485c..0d432a795305 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1844,7 +1844,7 @@ ScRefFlags ScRange::ParseCols( const ScDocument* pDoc,
}
// Parse only full row references
-void ScRange::ParseRows( const ScDocument* pDoc,
+void ScRange::ParseRows( const ScDocument& rDoc,
const OUString& rStr,
const ScAddress::Details& rDetails )
{
@@ -1860,11 +1860,11 @@ void ScRange::ParseRows( const ScDocument* pDoc,
case formula::FormulaGrammar::CONV_OOO: // No full row refs in OOO yet, assume XL notation
case formula::FormulaGrammar::CONV_XL_A1:
case formula::FormulaGrammar::CONV_XL_OOX:
- if (nullptr != (p = lcl_a1_get_row( pDoc, p, &aStart, &ignored, nullptr) ) )
+ if (nullptr != (p = lcl_a1_get_row( &rDoc, p, &aStart, &ignored, nullptr) ) )
{
if( p[0] == ':')
{
- lcl_a1_get_row( pDoc, p+1, &aEnd, &ignored, nullptr);
+ lcl_a1_get_row( &rDoc, p+1, &aEnd, &ignored, nullptr);
}
else
{
@@ -1875,13 +1875,13 @@ void ScRange::ParseRows( const ScDocument* pDoc,
case formula::FormulaGrammar::CONV_XL_R1C1:
if ((p[0] == 'R' || p[0] == 'r') &&
- nullptr != (p = lcl_r1c1_get_row( pDoc->GetSheetLimits(), p, rDetails, &aStart, &ignored )))
+ nullptr != (p = lcl_r1c1_get_row( rDoc.GetSheetLimits(), p, rDetails, &aStart, &ignored )))
{
if( p[0] == ':')
{
if( p[1] == 'R' || p[1] == 'r' )
{
- lcl_r1c1_get_row( pDoc->GetSheetLimits(), p+1, rDetails, &aEnd, &ignored );
+ lcl_r1c1_get_row( rDoc.GetSheetLimits(), p+1, rDetails, &aEnd, &ignored );
}
}
else
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 37c40d7f5c13..e646b60c681f 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2361,7 +2361,7 @@ ScVbaRange::Rows(const uno::Any& aIndex )
{
ScAddress::Details dDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
ScRange tmpRange;
- tmpRange.ParseRows( &getScDocument(), sAddress, dDetails );
+ tmpRange.ParseRows( getScDocument(), sAddress, dDetails );
SCROW nStartRow = tmpRange.aStart.Row();
SCROW nEndRow = tmpRange.aEnd.Row();