summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-15 20:40:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-17 15:34:22 +0200
commit9a31b606d39f90c72dd674b0f4f6a37c44fac5ef (patch)
treea379c0dbec5c137de62ca1376f90f20b9439fd33 /sc/source
parente738683f98559af330a1cc36d8d0a1be11abb355 (diff)
GetRangeFromString, etc. never passed a null ScDocument*
for the xml case this isn't immediately obvious, but pDoc should only be null between Init and Destroy. Change-Id: I7def8df4a4144964e3ec10964819451eb8316836 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102915 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/rangeutl.cxx32
-rw-r--r--sc/source/filter/oox/extlstcontext.cxx2
-rw-r--r--sc/source/filter/xml/XMLConsolidationContext.cxx4
-rw-r--r--sc/source/filter/xml/XMLDetectiveContext.cxx4
-rw-r--r--sc/source/filter/xml/datastreamimport.cxx3
-rw-r--r--sc/source/filter/xml/xmlcondformat.cxx6
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx7
-rw-r--r--sc/source/filter/xml/xmldrani.cxx3
-rw-r--r--sc/source/filter/xml/xmlfilti.cxx5
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx7
-rw-r--r--sc/source/filter/xml/xmlsceni.cxx6
-rw-r--r--sc/source/filter/xml/xmlsorti.cxx4
-rw-r--r--sc/source/filter/xml/xmltabi.cxx2
-rw-r--r--sc/source/ui/uitest/uiobject.cxx2
-rw-r--r--sc/source/ui/unoobj/docuno.cxx2
-rw-r--r--sc/source/ui/view/tabview3.cxx2
16 files changed, 55 insertions, 36 deletions
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index a9e8399e351a..49a5d227614b 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -459,7 +459,7 @@ bool ScRangeStringConverter::GetAddressFromString(
bool ScRangeStringConverter::GetRangeFromString(
ScRange& rRange,
const OUString& rRangeStr,
- const ScDocument* pDocument,
+ const ScDocument& rDocument,
FormulaGrammar::AddressConvention eConv,
sal_Int32& nOffset,
sal_Unicode cSeparator,
@@ -477,11 +477,11 @@ bool ScRangeStringConverter::GetRangeFromString(
{
if ( aUIString[0] == '.' )
aUIString = aUIString.copy( 1 );
- bResult = (rRange.aStart.Parse( aUIString, pDocument, eConv) & ScRefFlags::VALID) ==
+ bResult = (rRange.aStart.Parse( aUIString, &rDocument, eConv) & ScRefFlags::VALID) ==
ScRefFlags::VALID;
- ::formula::FormulaGrammar::AddressConvention eConvUI = pDocument->GetAddressConvention();
+ ::formula::FormulaGrammar::AddressConvention eConvUI = rDocument.GetAddressConvention();
if (!bResult && eConv != eConvUI)
- bResult = (rRange.aStart.Parse(aUIString, pDocument, eConvUI) & ScRefFlags::VALID) ==
+ bResult = (rRange.aStart.Parse(aUIString, &rDocument, eConvUI) & ScRefFlags::VALID) ==
ScRefFlags::VALID;
rRange.aEnd = rRange.aStart;
}
@@ -497,26 +497,26 @@ bool ScRangeStringConverter::GetRangeFromString(
aUIString[ nIndex + 1 ] == '.' )
aUIString = aUIString.replaceAt( nIndex + 1, 1, "" );
- bResult = ((rRange.Parse(aUIString, pDocument, eConv) & ScRefFlags::VALID) ==
+ bResult = ((rRange.Parse(aUIString, &rDocument, eConv) & ScRefFlags::VALID) ==
ScRefFlags::VALID);
// #i77703# chart ranges in the file format contain both sheet names, even for an external reference sheet.
// This isn't parsed by ScRange, so try to parse the two Addresses then.
if (!bResult)
{
- bResult = ((rRange.aStart.Parse( aUIString.copy(0, nIndex), pDocument, eConv)
+ bResult = ((rRange.aStart.Parse( aUIString.copy(0, nIndex), &rDocument, eConv)
& ScRefFlags::VALID) == ScRefFlags::VALID)
&&
- ((rRange.aEnd.Parse( aUIString.copy(nIndex+1), pDocument, eConv)
+ ((rRange.aEnd.Parse( aUIString.copy(nIndex+1), &rDocument, eConv)
& ScRefFlags::VALID) == ScRefFlags::VALID);
- ::formula::FormulaGrammar::AddressConvention eConvUI = pDocument->GetAddressConvention();
+ ::formula::FormulaGrammar::AddressConvention eConvUI = rDocument.GetAddressConvention();
if (!bResult && eConv != eConvUI)
{
- bResult = ((rRange.aStart.Parse( aUIString.copy(0, nIndex), pDocument, eConvUI)
+ bResult = ((rRange.aStart.Parse( aUIString.copy(0, nIndex), &rDocument, eConvUI)
& ScRefFlags::VALID) == ScRefFlags::VALID)
&&
- ((rRange.aEnd.Parse( aUIString.copy(nIndex+1), pDocument, eConvUI)
+ ((rRange.aEnd.Parse( aUIString.copy(nIndex+1), &rDocument, eConvUI)
& ScRefFlags::VALID) == ScRefFlags::VALID);
}
}
@@ -528,7 +528,7 @@ bool ScRangeStringConverter::GetRangeFromString(
bool ScRangeStringConverter::GetRangeListFromString(
ScRangeList& rRangeList,
const OUString& rRangeListStr,
- const ScDocument* pDocument,
+ const ScDocument& rDocument,
FormulaGrammar::AddressConvention eConv,
sal_Unicode cSeparator,
sal_Unicode cQuote )
@@ -540,7 +540,7 @@ bool ScRangeStringConverter::GetRangeListFromString(
{
ScRange aRange;
if (
- GetRangeFromString( aRange, rRangeListStr, pDocument, eConv, nOffset, cSeparator, cQuote ) &&
+ GetRangeFromString( aRange, rRangeListStr, rDocument, eConv, nOffset, cSeparator, cQuote ) &&
(nOffset >= 0)
)
{
@@ -555,14 +555,14 @@ bool ScRangeStringConverter::GetRangeListFromString(
bool ScRangeStringConverter::GetAreaFromString(
ScArea& rArea,
const OUString& rRangeStr,
- const ScDocument* pDocument,
+ const ScDocument& rDocument,
FormulaGrammar::AddressConvention eConv,
sal_Int32& nOffset,
sal_Unicode cSeparator )
{
ScRange aScRange;
bool bResult(false);
- if( GetRangeFromString( aScRange, rRangeStr, pDocument, eConv, nOffset, cSeparator ) && (nOffset >= 0) )
+ if( GetRangeFromString( aScRange, rRangeStr, rDocument, eConv, nOffset, cSeparator ) && (nOffset >= 0) )
{
rArea.nTab = aScRange.aStart.Tab();
rArea.nColStart = aScRange.aStart.Col();
@@ -577,14 +577,14 @@ bool ScRangeStringConverter::GetAreaFromString(
bool ScRangeStringConverter::GetRangeFromString(
table::CellRangeAddress& rRange,
const OUString& rRangeStr,
- const ScDocument* pDocument,
+ const ScDocument& rDocument,
FormulaGrammar::AddressConvention eConv,
sal_Int32& nOffset,
sal_Unicode cSeparator )
{
ScRange aScRange;
bool bResult(false);
- if( GetRangeFromString( aScRange, rRangeStr, pDocument, eConv, nOffset, cSeparator ) && (nOffset >= 0) )
+ if( GetRangeFromString( aScRange, rRangeStr, rDocument, eConv, nOffset, cSeparator ) && (nOffset >= 0) )
{
ScUnoConversion::FillApiRange( rRange, aScRange );
bResult = true;
diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx
index 50191a94717c..fadb4365265b 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -193,7 +193,7 @@ void ExtConditionalFormattingContext::onEndElement()
{
ScRangeList aRange;
ScDocument& rDoc = getScDocument();
- bool bSuccess = ScRangeStringConverter::GetRangeListFromString(aRange, aChars, &rDoc, formula::FormulaGrammar::CONV_XL_OOX);
+ bool bSuccess = ScRangeStringConverter::GetRangeListFromString(aRange, aChars, rDoc, formula::FormulaGrammar::CONV_XL_OOX);
if (!bSuccess || aRange.empty())
break;
diff --git a/sc/source/filter/xml/XMLConsolidationContext.cxx b/sc/source/filter/xml/XMLConsolidationContext.cxx
index 5461fa4a71b6..18d5c49a5718 100644
--- a/sc/source/filter/xml/XMLConsolidationContext.cxx
+++ b/sc/source/filter/xml/XMLConsolidationContext.cxx
@@ -89,10 +89,12 @@ void SAL_CALL ScXMLConsolidationContext::endFastElement( sal_Int32 /*nElement*/
std::unique_ptr<ScArea[]> ppAreas(new ScArea[ nCount ]);
sal_Int32 nOffset = 0;
sal_uInt16 nIndex;
+ ScDocument* pDoc = GetScImport().GetDocument();
+ assert(pDoc);
for( nIndex = 0; nIndex < nCount; ++nIndex )
{
if ( !ScRangeStringConverter::GetAreaFromString(
- ppAreas[ nIndex ], sSourceList, GetScImport().GetDocument(), ::formula::FormulaGrammar::CONV_OOO, nOffset ) )
+ ppAreas[ nIndex ], sSourceList, *pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset ) )
{
//! handle error
}
diff --git a/sc/source/filter/xml/XMLDetectiveContext.cxx b/sc/source/filter/xml/XMLDetectiveContext.cxx
index 3f53c56d9812..65ba610ccf5e 100644
--- a/sc/source/filter/xml/XMLDetectiveContext.cxx
+++ b/sc/source/filter/xml/XMLDetectiveContext.cxx
@@ -108,7 +108,9 @@ ScXMLDetectiveHighlightedContext::ScXMLDetectiveHighlightedContext(
{
sal_Int32 nOffset(0);
ScXMLImport::MutexGuard aGuard(GetScImport());
- bValid = ScRangeStringConverter::GetRangeFromString( aDetectiveObj.aSourceRange, aIter.toString(), GetScImport().GetDocument(), ::formula::FormulaGrammar::CONV_OOO, nOffset );
+ ScDocument* pDoc = GetScImport().GetDocument();
+ assert(pDoc);
+ bValid = ScRangeStringConverter::GetRangeFromString( aDetectiveObj.aSourceRange, aIter.toString(), *pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset );
}
break;
case XML_ELEMENT( TABLE, XML_DIRECTION ):
diff --git a/sc/source/filter/xml/datastreamimport.cxx b/sc/source/filter/xml/datastreamimport.cxx
index ce55782114c4..f749e6178f83 100644
--- a/sc/source/filter/xml/datastreamimport.cxx
+++ b/sc/source/filter/xml/datastreamimport.cxx
@@ -39,9 +39,10 @@ ScXMLDataStreamContext::ScXMLDataStreamContext(
case XML_ELEMENT( TABLE, XML_TARGET_RANGE_ADDRESS ):
{
ScDocument* pDoc = GetScImport().GetDocument();
+ assert(pDoc);
sal_Int32 nOffset = 0;
if (!ScRangeStringConverter::GetRangeFromString(
- maRange, aIter.toString(), pDoc, formula::FormulaGrammar::CONV_OOO, nOffset))
+ maRange, aIter.toString(), *pDoc, formula::FormulaGrammar::CONV_OOO, nOffset))
maRange.SetInvalid();
}
break;
diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx
index 6344714fff3a..944672bf0def 100644
--- a/sc/source/filter/xml/xmlcondformat.cxx
+++ b/sc/source/filter/xml/xmlcondformat.cxx
@@ -98,10 +98,12 @@ ScXMLConditionalFormatContext::ScXMLConditionalFormatContext( ScXMLImport& rImpo
}
ScRangeList aRangeList;
- ScRangeStringConverter::GetRangeListFromString(aRangeList, sRange, GetScImport().GetDocument(),
+ ScDocument* pDoc = GetScImport().GetDocument();
+ assert(pDoc);
+ ScRangeStringConverter::GetRangeListFromString(aRangeList, sRange, *pDoc,
formula::FormulaGrammar::CONV_ODF);
- mxFormat.reset(new ScConditionalFormat(0, GetScImport().GetDocument()));
+ mxFormat.reset(new ScConditionalFormat(0, pDoc));
mxFormat->SetRange(aRangeList);
}
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index f3dfdead64c0..29ffd5efb4e3 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -158,7 +158,8 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport,
case XML_ELEMENT( TABLE, XML_TARGET_RANGE_ADDRESS ):
{
sal_Int32 nOffset(0);
- bTargetRangeAddress = ScRangeStringConverter::GetRangeFromString( aTargetRangeAddress, aIter.toString(), pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset );
+ assert(pDoc);
+ bTargetRangeAddress = ScRangeStringConverter::GetRangeFromString( aTargetRangeAddress, aIter.toString(), *pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset );
}
break;
case XML_ELEMENT( TABLE, XML_BUTTONS ):
@@ -746,7 +747,9 @@ ScXMLSourceCellRangeContext::ScXMLSourceCellRangeContext( ScXMLImport& rImport,
{
ScRange aSourceRangeAddress;
sal_Int32 nOffset(0);
- if (ScRangeStringConverter::GetRangeFromString( aSourceRangeAddress, aIter.toString(), GetScImport().GetDocument(), ::formula::FormulaGrammar::CONV_OOO, nOffset ))
+ ScDocument* pDoc = GetScImport().GetDocument();
+ assert(pDoc);
+ if (ScRangeStringConverter::GetRangeFromString( aSourceRangeAddress, aIter.toString(), *pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset ))
pDataPilotTable->SetSourceCellRangeAddress(aSourceRangeAddress);
}
break;
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index 2271fba9ba5a..422ea7f30421 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -158,9 +158,10 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport,
case XML_ELEMENT( TABLE, XML_TARGET_RANGE_ADDRESS ):
{
ScDocument* pDoc = GetScImport().GetDocument();
+ assert(pDoc);
sal_Int32 nOffset = 0;
if (!ScRangeStringConverter::GetRangeFromString(
- maRange, aIter.toString(), pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset))
+ maRange, aIter.toString(), *pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset))
mbValidRange = false;
}
break;
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index 044bb7374ed5..9b811176faaf 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -49,6 +49,7 @@ ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport,
bConditionSourceRange(false)
{
ScDocument* pDoc(GetScImport().GetDocument());
+ assert(pDoc);
if ( !rAttrList.is() )
return;
@@ -61,7 +62,7 @@ ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport,
{
ScRange aScRange;
sal_Int32 nOffset(0);
- if (ScRangeStringConverter::GetRangeFromString( aScRange, aIter.toString(), pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset ))
+ if (ScRangeStringConverter::GetRangeFromString( aScRange, aIter.toString(), *pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset ))
{
aOutputPosition = aScRange.aStart;
bCopyOutputData = true;
@@ -71,7 +72,7 @@ ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport,
case XML_ELEMENT( TABLE, XML_CONDITION_SOURCE_RANGE_ADDRESS ):
{
sal_Int32 nOffset(0);
- if (ScRangeStringConverter::GetRangeFromString( aConditionSourceRangeAddress, aIter.toString(), pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset ) )
+ if (ScRangeStringConverter::GetRangeFromString( aConditionSourceRangeAddress, aIter.toString(), *pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset ) )
bConditionSourceRange = true;
}
break;
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index f4c90522d324..12ebb66b2c0c 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -907,7 +907,7 @@ void ScXMLImport::SetChangeTrackingViewSettings(const css::uno::Sequence<css::be
{
ScRangeList aRangeList;
ScRangeStringConverter::GetRangeListFromString(
- aRangeList, sRanges, GetDocument(), FormulaGrammar::CONV_OOO);
+ aRangeList, sRanges, *pDoc, FormulaGrammar::CONV_OOO);
pViewSettings->SetTheRangeList(aRangeList);
}
}
@@ -1458,8 +1458,9 @@ void ScXMLImport::SetLabelRanges()
sal_Int32 nOffset2(0);
FormulaGrammar::AddressConvention eConv = FormulaGrammar::CONV_OOO;
- if (ScRangeStringConverter::GetRangeFromString( aLabelRange, rxLabelRange->sLabelRangeStr, GetDocument(), eConv, nOffset1 ) &&
- ScRangeStringConverter::GetRangeFromString( aDataRange, rxLabelRange->sDataRangeStr, GetDocument(), eConv, nOffset2 ))
+ assert(pDoc);
+ if (ScRangeStringConverter::GetRangeFromString( aLabelRange, rxLabelRange->sLabelRangeStr, *pDoc, eConv, nOffset1 ) &&
+ ScRangeStringConverter::GetRangeFromString( aDataRange, rxLabelRange->sDataRangeStr, *pDoc, eConv, nOffset2 ))
{
if ( rxLabelRange->bColumnOrientation )
xColRanges->addNew( aLabelRange, aDataRange );
diff --git a/sc/source/filter/xml/xmlsceni.cxx b/sc/source/filter/xml/xmlsceni.cxx
index 3905d98a89b6..353cd9012ae2 100644
--- a/sc/source/filter/xml/xmlsceni.cxx
+++ b/sc/source/filter/xml/xmlsceni.cxx
@@ -71,9 +71,13 @@ ScXMLTableScenarioContext::ScXMLTableScenarioContext(
bIsActive = IsXMLToken(aIter, XML_TRUE);
break;
case XML_ELEMENT( TABLE, XML_SCENARIO_RANGES ):
+ {
+ ScDocument* pDoc = GetScImport().GetDocument();
+ assert(pDoc);
ScRangeStringConverter::GetRangeListFromString(
- aScenarioRanges, aIter.toString(), GetScImport().GetDocument(), ::formula::FormulaGrammar::CONV_OOO );
+ aScenarioRanges, aIter.toString(), *pDoc, ::formula::FormulaGrammar::CONV_OOO );
break;
+ }
case XML_ELEMENT( TABLE, XML_COMMENT ):
sComment = aIter.toString();
break;
diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx
index 4a0589064073..0744e3d85997 100644
--- a/sc/source/filter/xml/xmlsorti.cxx
+++ b/sc/source/filter/xml/xmlsorti.cxx
@@ -60,7 +60,9 @@ ScXMLSortContext::ScXMLSortContext( ScXMLImport& rImport,
{
ScRange aScRange;
sal_Int32 nOffset(0);
- if (ScRangeStringConverter::GetRangeFromString( aScRange, aIter.toString(), GetScImport().GetDocument(), ::formula::FormulaGrammar::CONV_OOO, nOffset ))
+ ScDocument* pDoc = GetScImport().GetDocument();
+ assert(pDoc);
+ if (ScRangeStringConverter::GetRangeFromString( aScRange, aIter.toString(), *pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset ))
{
ScUnoConversion::FillApiAddress( aOutputPosition, aScRange.aStart );
bCopyOutputData = true;
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index 6e1ea536cf8d..f27ab0ca238d 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -356,7 +356,7 @@ void SAL_CALL ScXMLTableContext::endFastElement(sal_Int32 /*nElement*/)
if (!sPrintRanges.isEmpty())
{
ScRangeList aRangeList;
- ScRangeStringConverter::GetRangeListFromString( aRangeList, sPrintRanges, pDoc, ::formula::FormulaGrammar::CONV_OOO );
+ ScRangeStringConverter::GetRangeListFromString( aRangeList, sPrintRanges, *pDoc, ::formula::FormulaGrammar::CONV_OOO );
size_t nCount = aRangeList.size();
for (size_t i=0; i< nCount; i++ )
{
diff --git a/sc/source/ui/uitest/uiobject.cxx b/sc/source/ui/uitest/uiobject.cxx
index 21b101b5bf46..f408ce7328bf 100644
--- a/sc/source/ui/uitest/uiobject.cxx
+++ b/sc/source/ui/uitest/uiobject.cxx
@@ -46,7 +46,7 @@ ScRange get_range_from_string(const ScDocument& rDoc, const OUString& rStr)
{
ScRange aRange;
sal_Int32 nOffset = 0;
- ScRangeStringConverter::GetRangeFromString(aRange, rStr, &rDoc, formula::FormulaGrammar::CONV_OOO, nOffset);
+ ScRangeStringConverter::GetRangeFromString(aRange, rStr, rDoc, formula::FormulaGrammar::CONV_OOO, nOffset);
return aRange;
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index acb75f463952..948cef3aa6ee 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -3817,7 +3817,7 @@ uno::Sequence < uno::Reference< table::XCellRange > > SAL_CALL ScTableSheetsObj:
ScRangeList aRangeList;
ScDocument& rDoc = pDocShell->GetDocument();
- if (!ScRangeStringConverter::GetRangeListFromString( aRangeList, aRange, &rDoc, ::formula::FormulaGrammar::CONV_OOO, ';' ))
+ if (!ScRangeStringConverter::GetRangeListFromString( aRangeList, aRange, rDoc, ::formula::FormulaGrammar::CONV_OOO, ';' ))
throw lang::IllegalArgumentException();
size_t nCount = aRangeList.size();
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 430321186193..30986e02d044 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2551,7 +2551,7 @@ void ScTabView::DoChartSelection(
ScRangeList aRangeList;
ScDocument& rDoc = aViewData.GetDocShell()->GetDocument();
if( ScRangeStringConverter::GetRangeListFromString(
- aRangeList, rHighlightedRange.RangeRepresentation, &rDoc, rDoc.GetAddressConvention(), sep ))
+ aRangeList, rHighlightedRange.RangeRepresentation, rDoc, rDoc.GetAddressConvention(), sep ))
{
size_t nListSize = aRangeList.size();
nSize += nListSize;