summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-16 10:20:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-18 14:22:13 +0200
commit30bb3657ee78b7d3b0a7d26f80bf1ff94b16f51c (patch)
treee2f96cc04c33f3e62c422505a4cdd5e0740ea9f6 /sc/source
parent897bd0517d835ba00458279311e5d8ff11079dd7 (diff)
ScAddress::Parse never passed a null ScDocument*
Change-Id: I8832f2cc4311b30b9a15883e831260a19d089a57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/conditio.cxx2
-rw-r--r--sc/source/core/tool/address.cxx8
-rw-r--r--sc/source/core/tool/compiler.cxx4
-rw-r--r--sc/source/core/tool/rangenam.cxx4
-rw-r--r--sc/source/core/tool/rangeutl.cxx28
-rw-r--r--sc/source/core/tool/reffind.cxx4
-rw-r--r--sc/source/filter/oox/revisionfragment.cxx2
-rw-r--r--sc/source/filter/orcus/interface.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx14
-rw-r--r--sc/source/filter/xml/xmlcondformat.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/dbgui/PivotLayoutDialog.cxx2
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/foptmgr.cxx4
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx4
-rw-r--r--sc/source/ui/dialogs/searchresults.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx4
-rw-r--r--sc/source/ui/docshell/impex.cxx2
-rw-r--r--sc/source/ui/docshell/servobj.cxx2
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx4
-rw-r--r--sc/source/ui/navipi/navcitem.cxx2
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx2
-rw-r--r--sc/source/ui/unoobj/addruno.cxx2
-rw-r--r--sc/source/ui/unoobj/docuno.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx2
-rw-r--r--sc/source/ui/view/drawvie4.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx8
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx2
30 files changed, 62 insertions, 62 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index ee70b5d70a03..698ab22a05d5 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -439,7 +439,7 @@ void ScConditionEntry::CompileXML()
ScAddress aNew;
/* XML is always in OOo:A1 format, although R1C1 would be more amenable
* to compression */
- if ( aNew.Parse( aSrcString, mpDoc ) & ScRefFlags::VALID )
+ if ( aNew.Parse( aSrcString, *mpDoc ) & ScRefFlags::VALID )
aSrcPos = aNew;
// if the position is invalid, there isn't much we can do at this time
aSrcString.clear();
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 39e950aa0418..a9bf2125ae5b 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1502,7 +1502,7 @@ bool ConvertSingleRef( const ScDocument& rDoc, const OUString& rRefString,
if (pExtInfo || (ScGlobal::FindUnquoted( rRefString, SC_COMPILER_FILE_TAB_SEP) == -1))
{
ScAddress aAddr( 0, 0, nDefTab );
- ScRefFlags nRes = aAddr.Parse( rRefString, &rDoc, rDetails, pExtInfo);
+ ScRefFlags nRes = aAddr.Parse( rRefString, rDoc, rDetails, pExtInfo);
if ( nRes & ScRefFlags::VALID )
{
rRefAddress.Set( aAddr,
@@ -1541,14 +1541,14 @@ bool ConvertDoubleRef( const ScDocument& rDoc, const OUString& rRefString, SCTAB
return bRet;
}
-ScRefFlags ScAddress::Parse( const OUString& r, const ScDocument* pDoc,
+ScRefFlags ScAddress::Parse( const OUString& r, const ScDocument& rDoc,
const Details& rDetails,
ExternalInfo* pExtInfo,
const uno::Sequence<sheet::ExternalLinkInfo>* pExternalLinks,
sal_Int32* pSheetEndPos,
const OUString* pErrRef )
{
- return lcl_ScAddress_Parse( r.getStr(), pDoc, *this, rDetails, pExtInfo, pExternalLinks, pSheetEndPos, pErrRef);
+ return lcl_ScAddress_Parse( r.getStr(), &rDoc, *this, rDetails, pExtInfo, pExternalLinks, pSheetEndPos, pErrRef);
}
bool ScRange::Intersects( const ScRange& rRange ) const
@@ -1777,7 +1777,7 @@ ScRefFlags ScRange::ParseAny( const OUString& rString, const ScDocument& rDoc,
if ( (nRet & nValid) != nValid )
{
ScAddress aAdr(aStart);//initialize with currentPos as fallback for table number
- nRet = aAdr.Parse( rString, &rDoc, rDetails );
+ nRet = aAdr.Parse( rString, rDoc, rDetails );
if ( nRet & ScRefFlags::VALID )
aStart = aEnd = aAdr;
}
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index d9ceab95ea8f..c5c8c5d28ced 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3232,7 +3232,7 @@ bool ScCompiler::IsSingleReference( const OUString& rName, const OUString* pErrR
ScAddress aAddr( aPos );
const ScAddress::Details aDetails( pConv->meConv, aPos );
ScAddress::ExternalInfo aExtInfo;
- ScRefFlags nFlags = aAddr.Parse( rName, &rDoc, aDetails,
+ ScRefFlags nFlags = aAddr.Parse( rName, rDoc, aDetails,
&aExtInfo, &maExternalLinks, &mnCurrentSheetEndPos, pErrRef);
// Something must be valid in order to recognize Sheet1.blah or blah.a1
// as a (wrong) reference.
@@ -4154,7 +4154,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
{
bChanged = true;
ScAddress aAdr;
- bOk &= ((aAdr.Parse( aRef[j], &rDoc, aDetails ) & nMask) == nMask);
+ bOk &= ((aAdr.Parse( aRef[j], rDoc, aDetails ) & nMask) == nMask);
}
}
if ( bChanged && bOk )
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index 5fa5cf59c3db..314a899098fc 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -452,7 +452,7 @@ void ScRangeData::MakeValidName( const ScDocument& rDoc, OUString& rName )
// Don't check Parse on VALID, any partial only VALID may result in
// #REF! during compile later!
while (aRange.Parse(rName, rDoc, details) != ScRefFlags::ZERO ||
- aAddr.Parse(rName, &rDoc, details) != ScRefFlags::ZERO)
+ aAddr.Parse(rName, rDoc, details) != ScRefFlags::ZERO)
{
// Range Parse is partially valid also with invalid sheet name,
// Address Parse ditto, during compile name would generate a #REF!
@@ -488,7 +488,7 @@ ScRangeData::IsNameValidType ScRangeData::IsNameValid( const OUString& rName, co
// Don't check Parse on VALID, any partial only VALID may result in
// #REF! during compile later!
if (aRange.Parse(rName, rDoc, details) != ScRefFlags::ZERO ||
- aAddr.Parse(rName, &rDoc, details) != ScRefFlags::ZERO )
+ aAddr.Parse(rName, rDoc, details) != ScRefFlags::ZERO )
{
return NAME_INVALID_CELL_REF;
}
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 7582479dc05d..d069c63280a8 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -447,11 +447,11 @@ bool ScRangeStringConverter::GetAddressFromString(
GetTokenByOffset( sToken, rAddressStr, nOffset, cSeparator, cQuote );
if( nOffset >= 0 )
{
- if ((rAddress.Parse( sToken, &rDocument, eConv ) & ScRefFlags::VALID) == ScRefFlags::VALID)
+ if ((rAddress.Parse( sToken, rDocument, eConv ) & ScRefFlags::VALID) == ScRefFlags::VALID)
return true;
::formula::FormulaGrammar::AddressConvention eConvUI = rDocument.GetAddressConvention();
if (eConv != eConvUI)
- return ((rAddress.Parse(sToken, &rDocument, eConvUI) & ScRefFlags::VALID) == ScRefFlags::VALID);
+ return ((rAddress.Parse(sToken, rDocument, eConvUI) & ScRefFlags::VALID) == ScRefFlags::VALID);
}
return false;
}
@@ -477,11 +477,11 @@ bool ScRangeStringConverter::GetRangeFromString(
{
if ( aUIString[0] == '.' )
aUIString = aUIString.copy( 1 );
- bResult = (rRange.aStart.Parse( aUIString, &rDocument, eConv) & ScRefFlags::VALID) ==
+ bResult = (rRange.aStart.Parse( aUIString, rDocument, eConv) & ScRefFlags::VALID) ==
ScRefFlags::VALID;
::formula::FormulaGrammar::AddressConvention eConvUI = rDocument.GetAddressConvention();
if (!bResult && eConv != eConvUI)
- bResult = (rRange.aStart.Parse(aUIString, &rDocument, eConvUI) & ScRefFlags::VALID) ==
+ bResult = (rRange.aStart.Parse(aUIString, rDocument, eConvUI) & ScRefFlags::VALID) ==
ScRefFlags::VALID;
rRange.aEnd = rRange.aStart;
}
@@ -504,19 +504,19 @@ bool ScRangeStringConverter::GetRangeFromString(
// This isn't parsed by ScRange, so try to parse the two Addresses then.
if (!bResult)
{
- bResult = ((rRange.aStart.Parse( aUIString.copy(0, nIndex), &rDocument, eConv)
+ bResult = ((rRange.aStart.Parse( aUIString.copy(0, nIndex), rDocument, eConv)
& ScRefFlags::VALID) == ScRefFlags::VALID)
&&
- ((rRange.aEnd.Parse( aUIString.copy(nIndex+1), &rDocument, eConv)
+ ((rRange.aEnd.Parse( aUIString.copy(nIndex+1), rDocument, eConv)
& ScRefFlags::VALID) == ScRefFlags::VALID);
::formula::FormulaGrammar::AddressConvention eConvUI = rDocument.GetAddressConvention();
if (!bResult && eConv != eConvUI)
{
- bResult = ((rRange.aStart.Parse( aUIString.copy(0, nIndex), &rDocument, eConvUI)
+ bResult = ((rRange.aStart.Parse( aUIString.copy(0, nIndex), rDocument, eConvUI)
& ScRefFlags::VALID) == ScRefFlags::VALID)
&&
- ((rRange.aEnd.Parse( aUIString.copy(nIndex+1), &rDocument, eConvUI)
+ ((rRange.aEnd.Parse( aUIString.copy(nIndex+1), rDocument, eConvUI)
& ScRefFlags::VALID) == ScRefFlags::VALID);
}
}
@@ -830,27 +830,27 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con
ScAddress::ExternalInfo aExtInfo1, aExtInfo2;
ScAddress aCell1, aCell2;
- ScRefFlags nRet = aCell1.Parse(aBeginCell, &rDoc, FormulaGrammar::CONV_OOO, &aExtInfo1);
+ ScRefFlags nRet = aCell1.Parse(aBeginCell, rDoc, FormulaGrammar::CONV_OOO, &aExtInfo1);
if ((nRet & ScRefFlags::VALID) == ScRefFlags::ZERO)
{
// first cell is invalid.
if (eConv == FormulaGrammar::CONV_OOO)
continue;
- nRet = aCell1.Parse(aBeginCell, &rDoc, eConv, &aExtInfo1);
+ nRet = aCell1.Parse(aBeginCell, rDoc, eConv, &aExtInfo1);
if ((nRet & ScRefFlags::VALID) == ScRefFlags::ZERO)
// first cell is really invalid.
continue;
}
- nRet = aCell2.Parse(aEndCell, &rDoc, FormulaGrammar::CONV_OOO, &aExtInfo2);
+ nRet = aCell2.Parse(aEndCell, rDoc, FormulaGrammar::CONV_OOO, &aExtInfo2);
if ((nRet & ScRefFlags::VALID) == ScRefFlags::ZERO)
{
// second cell is invalid.
if (eConv == FormulaGrammar::CONV_OOO)
continue;
- nRet = aCell2.Parse(aEndCell, &rDoc, eConv, &aExtInfo2);
+ nRet = aCell2.Parse(aEndCell, rDoc, eConv, &aExtInfo2);
if ((nRet & ScRefFlags::VALID) == ScRefFlags::ZERO)
// second cell is really invalid.
continue;
@@ -874,10 +874,10 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con
// Chart always saves ranges using CONV_OOO convention.
ScAddress::ExternalInfo aExtInfo;
ScAddress aCell;
- ScRefFlags nRet = aCell.Parse(aToken, &rDoc, ::formula::FormulaGrammar::CONV_OOO, &aExtInfo);
+ ScRefFlags nRet = aCell.Parse(aToken, rDoc, ::formula::FormulaGrammar::CONV_OOO, &aExtInfo);
if ((nRet & ScRefFlags::VALID) == ScRefFlags::ZERO )
{
- nRet = aCell.Parse(aToken, &rDoc, eConv, &aExtInfo);
+ nRet = aCell.Parse(aToken, rDoc, eConv, &aExtInfo);
if ((nRet & ScRefFlags::VALID) == ScRefFlags::ZERO)
continue;
}
diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx
index b4e7ea49eddf..9702da631d47 100644
--- a/sc/source/core/tool/reffind.cxx
+++ b/sc/source/core/tool/reffind.cxx
@@ -269,7 +269,7 @@ void ScRefFinder::ToggleRel( sal_Int32 nStartPos, sal_Int32 nEndPos )
// Check the validity of the expression, and toggle the relative flag.
ScAddress::Details aDetails(meConv, maPos.Row(), maPos.Col());
ScAddress::ExternalInfo aExtInfo;
- ScRefFlags nResult = aAddr.Parse(aExpr, &mrDoc, aDetails, &aExtInfo);
+ ScRefFlags nResult = aAddr.Parse(aExpr, mrDoc, aDetails, &aExtInfo);
if ( nResult & ScRefFlags::VALID )
{
ScRefFlags nFlags;
@@ -292,7 +292,7 @@ void ScRefFinder::ToggleRel( sal_Int32 nStartPos, sal_Int32 nEndPos )
{
OUString aRef = aExpr.copy(nSep+1);
OUString aExtDocNameTabName = aExpr.copy(0, nSep+1);
- nResult = aAddr.Parse(aRef, &mrDoc, aDetails);
+ nResult = aAddr.Parse(aRef, mrDoc, aDetails);
aAddr.SetTab(0); // force to first tab to avoid error on checking
nFlags = lcl_NextFlags( nResult );
aExpr = aExtDocNameTabName + aAddr.Format(nFlags, &mrDoc, aDetails);
diff --git a/sc/source/filter/oox/revisionfragment.cxx b/sc/source/filter/oox/revisionfragment.cxx
index 69d5786fe0ec..f6fee91c4051 100644
--- a/sc/source/filter/oox/revisionfragment.cxx
+++ b/sc/source/filter/oox/revisionfragment.cxx
@@ -164,7 +164,7 @@ private:
OUString aRefStr = rAttribs.getString(XML_r, OUString());
if (!aRefStr.isEmpty())
{
- mrPos.Parse(aRefStr, &getScDocument(), formula::FormulaGrammar::CONV_XL_OOX);
+ mrPos.Parse(aRefStr, getScDocument(), formula::FormulaGrammar::CONV_XL_OOX);
if (mnSheetIndex != -1)
mrPos.SetTab(mnSheetIndex-1);
}
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 142f78a5205b..ee426a17b223 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -164,7 +164,7 @@ os::src_address_t ScOrcusRefResolver::resolve_address(const char* p, size_t n)
OUString aStr(p, n, mrGlobalSettings.getTextEncoding());
ScAddress aAddr;
- aAddr.Parse(aStr, &mrGlobalSettings.getDoc().getDoc(),
+ aAddr.Parse(aStr, mrGlobalSettings.getDoc().getDoc(),
formula::FormulaGrammar::extractRefConvention(
mrGlobalSettings.getCalcGrammar()));
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 59073a9b3516..0f8afceceb8f 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1193,26 +1193,26 @@ ScRefFlags parseRange(const OUString& rString, ScRange& rRange, const ScDocument
return rRange.Parse(rString, rDoc, formula::FormulaGrammar::CONV_XL_R1C1);
}
-ScRefFlags parseAddress(const OUString& rString, ScAddress& rAddress, const ScDocument* pDoc)
+ScRefFlags parseAddress(const OUString& rString, ScAddress& rAddress, const ScDocument& rDoc)
{
// start with the address convention set in the document
- formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
- ScRefFlags nResult = rAddress.Parse(rString, pDoc, eConv);
+ formula::FormulaGrammar::AddressConvention eConv = rDoc.GetAddressConvention();
+ ScRefFlags nResult = rAddress.Parse(rString, rDoc, eConv);
if ( nResult & ScRefFlags::VALID )
return nResult;
// try the default calc address convention
- nResult = rAddress.Parse(rString, pDoc);
+ nResult = rAddress.Parse(rString, rDoc);
if ( nResult & ScRefFlags::VALID )
return nResult;
// try excel a1
- nResult = rAddress.Parse(rString, pDoc, formula::FormulaGrammar::CONV_XL_A1);
+ nResult = rAddress.Parse(rString, rDoc, formula::FormulaGrammar::CONV_XL_A1);
if ( nResult & ScRefFlags::VALID )
return nResult;
// try r1c1
- return rAddress.Parse(rString, pDoc, formula::FormulaGrammar::CONV_XL_R1C1);
+ return rAddress.Parse(rString, rDoc, formula::FormulaGrammar::CONV_XL_R1C1);
}
void transformURL(const OUString& rOldURL, OUString& rNewURL, const ScDocument& rDoc)
@@ -1235,7 +1235,7 @@ void transformURL(const OUString& rOldURL, OUString& rNewURL, const ScDocument&
}
else
{
- nResult = parseAddress(aAddressString, aAddress, &rDoc);
+ nResult = parseAddress(aAddressString, aAddress, rDoc);
if( nResult & ScRefFlags::VALID )
{
OUString aString = aAddress.Format(nResult, &rDoc, formula::FormulaGrammar::CONV_XL_OOX);
diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx
index 944672bf0def..9c3ca0904b6c 100644
--- a/sc/source/filter/xml/xmlcondformat.cxx
+++ b/sc/source/filter/xml/xmlcondformat.cxx
@@ -258,7 +258,7 @@ void SAL_CALL ScXMLConditionalFormatContext::endFastElement( sal_Int32 /*nElemen
ScAddress aSrcPos;
OUString aSrcString = pCondFormatEntry->GetSrcString();
if ( !aSrcString.isEmpty() )
- aSrcPos.Parse( aSrcString, pDoc );
+ aSrcPos.Parse( aSrcString, *pDoc );
ScCompiler aComp( *pDoc, aSrcPos );
aComp.SetGrammar( formula::FormulaGrammar::GRAM_ODFF );
pTokens = aComp.CompileString( pCondFormatEntry->GetExpression(aSrcPos, 0), "" );
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index f2e36c577f40..d746b464ab78 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2328,7 +2328,7 @@ static ScNameInputType lcl_GetInputType( const OUString& rText )
eRet = SC_MANAGE_NAMES;
else if ( aRange.Parse( rText, rDoc, eConv ) & ScRefFlags::VALID )
eRet = SC_NAME_INPUT_RANGE;
- else if ( aAddress.Parse( rText, &rDoc, eConv ) & ScRefFlags::VALID )
+ else if ( aAddress.Parse( rText, rDoc, eConv ) & ScRefFlags::VALID )
eRet = SC_NAME_INPUT_CELL;
else if ( ScRangeUtil::MakeRangeFromName( rText, rDoc, nTab, aRange, RUTL_NAMES, eConv ) )
eRet = SC_NAME_INPUT_NAMEDRANGE;
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 2b1ab6abc576..a813a427f93e 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -590,7 +590,7 @@ bool ScPivotLayoutDialog::GetDestination(ScRange& aDestinationRange, bool& bToNe
else if (mxDestinationRadioSelection->get_active())
{
ScAddress aAddress;
- aAddress.Parse(mxDestinationEdit->GetText(), &mrDocument, maAddressDetails);
+ aAddress.Parse(mxDestinationEdit->GetText(), mrDocument, maAddressDetails);
aDestinationRange = ScRange(aAddress);
}
else
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 46f32bf78fd6..ff4653f8d971 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -579,7 +579,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem()
if ( m_xBtnCopyResult->get_active() )
{
ScRefFlags nResult = theCopyPos.Parse(
- m_xEdCopyArea->GetText(), pDoc, pDoc->GetAddressConvention());
+ m_xEdCopyArea->GetText(), *pDoc, pDoc->GetAddressConvention());
bCopyPosOk = (nResult & ScRefFlags::VALID) == ScRefFlags::VALID;
}
diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index cecf9be64afc..da323ed2f8bb 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -192,7 +192,7 @@ bool ScFilterOptionsMgr::VerifyPosStr( const OUString& rPosStr ) const
if ( -1 != nColonPos )
aPosStr = aPosStr.copy( 0, nColonPos );
- ScRefFlags nResult = ScAddress().Parse( aPosStr, pDoc, pDoc->GetAddressConvention() );
+ ScRefFlags nResult = ScAddress().Parse( aPosStr, *pDoc, pDoc->GetAddressConvention() );
return (nResult & ScRefFlags::VALID) == ScRefFlags::VALID;
}
@@ -219,7 +219,7 @@ IMPL_LINK( ScFilterOptionsMgr, EdAreaModifyHdl, formula::RefEdit&, rEd, void )
return;
OUString theCurPosStr = rEd.GetText();
- ScRefFlags nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
+ ScRefFlags nResult = ScAddress().Parse( theCurPosStr, *pDoc, pDoc->GetAddressConvention() );
if ( (nResult & ScRefFlags::VALID) == ScRefFlags::VALID)
{
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index cd2c84a5b885..836767891b08 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -272,7 +272,7 @@ IMPL_LINK(ScSpecialFilterDlg, EndDlgHdl, weld::Button&, rBtn, void)
if ( -1 != nColonPos )
theCopyStr = theCopyStr.copy( 0, nColonPos );
- ScRefFlags nResult = theAdrCopy.Parse( theCopyStr, pDoc, eConv );
+ ScRefFlags nResult = theAdrCopy.Parse( theCopyStr, *pDoc, eConv );
if ( (nResult & ScRefFlags::VALID) == ScRefFlags::ZERO )
{
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index a0f7c14a923c..462d60efd623 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -746,7 +746,7 @@ DeactivateRC ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP )
thePos.SetTab( pViewData->GetTabNo() );
}
- ScRefFlags nResult = thePos.Parse( thePosStr, pDoc, pDoc->GetAddressConvention() );
+ ScRefFlags nResult = thePos.Parse( thePosStr, *pDoc, pDoc->GetAddressConvention() );
bPosInputOk = (nResult & ScRefFlags::VALID) == ScRefFlags::VALID;
@@ -848,7 +848,7 @@ IMPL_LINK_NOARG(ScTabPageSortOptions, SortDirHdl, weld::ToggleButton&, void)
void ScTabPageSortOptions::EdOutPosModHdl()
{
OUString theCurPosStr = m_xEdOutPos->get_text();
- ScRefFlags nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
+ ScRefFlags nResult = ScAddress().Parse( theCurPosStr, *pDoc, pDoc->GetAddressConvention() );
if ( (nResult & ScRefFlags::VALID) != ScRefFlags::VALID )
return;
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx
index 0f94c64f32e7..c855b7db87d7 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -224,7 +224,7 @@ IMPL_LINK_NOARG( SearchResultsDlg, ListSelectHdl, weld::TreeView&, void )
return;
ScAddress aPos;
- ScRefFlags nRes = aPos.Parse(aPosStr, mpDoc, mpDoc->GetAddressConvention());
+ ScRefFlags nRes = aPos.Parse(aPosStr, *mpDoc, mpDoc->GetAddressConvention());
if (!(nRes & ScRefFlags::VALID))
// Invalid address string.
return;
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 8b752a0f5411..ecce1c5da91f 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -265,7 +265,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if ( !pDBColl || !pDBColl->getNamedDBs().findByUpperName(ScGlobal::getCharClassPtr()->uppercase(sTarget)) )
{
ScAddress aPos;
- if ( aPos.Parse( sTarget, &m_aDocument, m_aDocument.GetAddressConvention() ) & ScRefFlags::VALID )
+ if ( aPos.Parse( sTarget, m_aDocument, m_aDocument.GetAddressConvention() ) & ScRefFlags::VALID )
{
bMakeArea = true;
if (bUndo)
@@ -2460,7 +2460,7 @@ bool ScDocShell::DdeSetData( const OUString& rItem,
// into ODF.
ScRange aRange;
bool bValid = ( (aRange.Parse(aPos, m_aDocument, formula::FormulaGrammar::CONV_OOO ) & ScRefFlags::VALID) ||
- (aRange.aStart.Parse(aPos, &m_aDocument, formula::FormulaGrammar::CONV_OOO) & ScRefFlags::VALID) );
+ (aRange.aStart.Parse(aPos, m_aDocument, formula::FormulaGrammar::CONV_OOO) & ScRefFlags::VALID) );
ScServerObject* pObj = nullptr; // NULL = error
if ( bValid )
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 68df1169a93f..4162f6869bc9 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -186,7 +186,7 @@ ScImportExport::ScImportExport( ScDocument& r, const OUString& rPos )
if (aRange.Parse(aPos, rDoc, eConv) & ScRefFlags::VALID)
bSingle = false;
// Cell?
- else if (aRange.aStart.Parse(aPos, &rDoc, eConv) & ScRefFlags::VALID)
+ else if (aRange.aStart.Parse(aPos, rDoc, eConv) & ScRefFlags::VALID)
aRange.aEnd = aRange.aStart;
else
bAll = true;
diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx
index 84287b3f93d1..abec7bf8eb15 100644
--- a/sc/source/ui/docshell/servobj.cxx
+++ b/sc/source/ui/docshell/servobj.cxx
@@ -91,7 +91,7 @@ ScServerObject::ScServerObject( ScDocShell* pShell, const OUString& rItem ) :
{
// area reference
}
- else if ( aRange.aStart.Parse( rItem, &rDoc, FormulaGrammar::CONV_OOO ) & ScRefFlags::VALID )
+ else if ( aRange.aStart.Parse( rItem, rDoc, FormulaGrammar::CONV_OOO ) & ScRefFlags::VALID )
{
// cell reference
aRange.aEnd = aRange.aStart;
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx
index e28d8625ab37..b6ffca11ea75 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -198,8 +198,8 @@ IMPL_LINK(ScSolverDlg, BtnHdl, weld::Button&, rBtn, void)
// 3. has a valid target value been entered?
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
- ScRefFlags nRes1 = theFormulaCell .Parse( m_xEdFormulaCell->GetText(), pDoc, eConv );
- ScRefFlags nRes2 = theVariableCell.Parse( m_xEdVariableCell->GetText(), pDoc, eConv );
+ ScRefFlags nRes1 = theFormulaCell .Parse( m_xEdFormulaCell->GetText(), *pDoc, eConv );
+ ScRefFlags nRes2 = theVariableCell.Parse( m_xEdVariableCell->GetText(), *pDoc, eConv );
if ( (nRes1 & ScRefFlags::VALID) == ScRefFlags::VALID )
{
diff --git a/sc/source/ui/navipi/navcitem.cxx b/sc/source/ui/navipi/navcitem.cxx
index 8e11edfca0a8..ba996ce1df79 100644
--- a/sc/source/ui/navipi/navcitem.cxx
+++ b/sc/source/ui/navipi/navcitem.cxx
@@ -51,7 +51,7 @@ void ScNavigatorControllerItem::StateChanged( sal_uInt16 /* nSID */, SfxItemStat
{
const OUString& aAddress( pCellPosItem->GetValue() );
ScAddress aScAddress;
- aScAddress.Parse(aAddress, &pViewData->GetDocument());
+ aScAddress.Parse(aAddress, pViewData->GetDocument());
SCCOL nCol = aScAddress.Col()+1;
SCROW nRow = aScAddress.Row()+1;
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 42223748f0f9..1a3a34cfc9f9 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -335,7 +335,7 @@ bool ScPrintAreasDlg::Impl_CheckRefStrings()
ScRefFlags nResult = aRange.Parse( aOne, *pDoc, eConv );
if ((nResult & nValidRange) != nValidRange)
{
- ScRefFlags nAddrResult = aAddr.Parse( aOne, pDoc, eConv );
+ ScRefFlags nAddrResult = aAddr.Parse( aOne, *pDoc, eConv );
if ((nAddrResult & nValidAddr) != nValidAddr)
{
bPrintAreaOk = false;
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index 4a7410b89281..0e307071d9ef 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -79,7 +79,7 @@ bool ScAddressConversionObj::ParseUIString( const OUString& rUIString, ::formula
}
else
{
- ScRefFlags nResult = aRange.aStart.Parse( rUIString, &rDoc, eConv );
+ ScRefFlags nResult = aRange.aStart.Parse( rUIString, rDoc, eConv );
if ( nResult & ScRefFlags::VALID )
{
if ( ( nResult & ScRefFlags::TAB_3D ) == ScRefFlags::ZERO )
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 237441bffef2..7799a28254ed 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1401,7 +1401,7 @@ static bool lcl_ParseTarget( const OUString& rTarget, ScRange& rTargetRange, too
{
bRangeValid = true; // range reference
}
- else if ( aAddress.Parse( rTarget, &rDoc ) & ScRefFlags::VALID )
+ else if ( aAddress.Parse( rTarget, rDoc ) & ScRefFlags::VALID )
{
rTargetRange = aAddress;
bRangeValid = true; // cell reference
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index f9c1ab975e35..8492d8d4e227 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -818,7 +818,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAddress aScAddress;
OUString aArg = static_cast<const SfxStringItem*>(pItem)->GetValue();
- if( aScAddress.Parse( aArg, &rDoc, rDoc.GetAddressConvention() ) & ScRefFlags::VALID )
+ if( aScAddress.Parse( aArg, rDoc, rDoc.GetAddressConvention() ) & ScRefFlags::VALID )
{
nFillRow = aScAddress.Row();
nFillCol = aScAddress.Col();
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index e4f12a36626a..3066fe253ba9 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -252,7 +252,7 @@ void getOleSourceRanges(const SdrMarkList& rMarkList, bool& rAnyOle, bool& rOneO
for(size_t i = 0; i < aRange.size(); ++i)
pRanges->push_back(aRange[i]);
}
- else if (aAddr.Parse(rRangeRep, pDoc, pDoc->GetAddressConvention()) & ScRefFlags::VALID)
+ else if (aAddr.Parse(rRangeRep, *pDoc, pDoc->GetAddressConvention()) & ScRefFlags::VALID)
pRanges->push_back(aAddr);
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index e858a9337041..dad20101c4fc 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2284,7 +2284,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
{
ScAddress aTempAddr;
ScAddress::ExternalInfo aExtInfo;
- ScRefFlags nRes = aTempAddr.Parse(aUrl, &rDoc, rDoc.GetAddressConvention(), &aExtInfo);
+ ScRefFlags nRes = aTempAddr.Parse(aUrl, rDoc, rDoc.GetAddressConvention(), &aExtInfo);
if (!(nRes & ScRefFlags::VALID))
{
// Not a reference string. Pass it through unmodified.
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 5d94edb3ba99..cb607ed841f1 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -99,7 +99,7 @@ namespace
return aRet;
}
- aRet.nResult = rScAddress.Parse(aAddress, &rDoc, eConv);
+ aRet.nResult = rScAddress.Parse(aAddress, rDoc, eConv);
if (aRet.nResult & ScRefFlags::VALID)
{
aRet.eDetected = DetectFlags::ADDRESS;
@@ -114,7 +114,7 @@ namespace
return aRet;
}
- aRet.nResult = rScAddress.Parse(aAddress, &rDoc);
+ aRet.nResult = rScAddress.Parse(aAddress, rDoc);
if (aRet.nResult & ScRefFlags::VALID)
{
aRet.eDetected = DetectFlags::ADDRESS;
@@ -130,7 +130,7 @@ namespace
}
// try the Excel A1 address convention
- aRet.nResult = rScAddress.Parse(aAddress, &rDoc, formula::FormulaGrammar::CONV_XL_A1);
+ aRet.nResult = rScAddress.Parse(aAddress, rDoc, formula::FormulaGrammar::CONV_XL_A1);
if (aRet.nResult & ScRefFlags::VALID)
{
aRet.eDetected = DetectFlags::ADDRESS;
@@ -145,7 +145,7 @@ namespace
return aRet;
}
- aRet.nResult = rScAddress.Parse(aAddress, &rDoc, formula::FormulaGrammar::CONV_XL_R1C1);
+ aRet.nResult = rScAddress.Parse(aAddress, rDoc, formula::FormulaGrammar::CONV_XL_R1C1);
if (aRet.nResult & ScRefFlags::VALID)
{
aRet.eDetected = DetectFlags::ADDRESS;
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 167ecae315ae..edc8ca3d5dcb 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -559,7 +559,7 @@ void ScXMLSourceDlg::RefEditModified()
// Check if the address is valid.
ScAddress aLinkedPos;
- ScRefFlags nRes = aLinkedPos.Parse(aRefStr, mpDoc, mpDoc->GetAddressConvention());
+ ScRefFlags nRes = aLinkedPos.Parse(aRefStr, *mpDoc, mpDoc->GetAddressConvention());
bool bValid = ( (nRes & ScRefFlags::VALID) == ScRefFlags::VALID );
// TODO: For some unknown reason, setting the ref invalid will hide the text altogether.