diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-14 15:38:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-15 17:39:42 +0200 |
commit | 3fc713a8e53d7882089ec4b9240bf78bb99f8275 (patch) | |
tree | cb29bde77f1894c4a015dc5f85897bf961db3e5b /sc/source | |
parent | 662c6a43a4826fc88cd6a86bb57ab7fd513a4762 (diff) |
ScAreaNameIterator always dereferences its ScDocument* argument
Change-Id: Ibdeeb634561a4bdd437e04bece77315b392b020e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102746
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/rangeutl.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/dbgui/PivotLayoutDialog.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/consdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/foptmgr.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/tpsort.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/linkarea.cxx | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index a2996f13b81b..a9e8399e351a 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -934,9 +934,9 @@ bool ScArea::operator==( const ScArea& r ) const && (nRowEnd == r.nRowEnd) ); } -ScAreaNameIterator::ScAreaNameIterator( const ScDocument* pDoc ) : - pRangeName(pDoc->GetRangeName()), - pDBCollection(pDoc->GetDBCollection()), +ScAreaNameIterator::ScAreaNameIterator( const ScDocument& rDoc ) : + pRangeName(rDoc.GetRangeName()), + pDBCollection(rDoc.GetDBCollection()), bFirstPass(true) { if (pRangeName) diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index fa4be02ab400..73e5a820178e 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -225,7 +225,7 @@ void ScPivotLayoutDialog::SetupSource() // Setup Named Ranges bool bIsNamedRange = false; - ScAreaNameIterator aIterator(&mrDocument); + ScAreaNameIterator aIterator(mrDocument); OUString aEachName; ScRange aEachRange; @@ -265,7 +265,7 @@ void ScPivotLayoutDialog::SetupDestination() mxDestinationListBox->clear(); // Fill up named ranges - ScAreaNameIterator aIterator(&mrDocument); + ScAreaNameIterator aIterator(mrDocument); OUString aName; ScRange aRange; diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index db9f53681a18..e0609a493386 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -188,7 +188,7 @@ void ScConsolidateDlg::Init() OUString aStrName; sal_uInt16 nAt = 0; ScRange aRange; - ScAreaNameIterator aIter( pDoc ); + ScAreaNameIterator aIter( *pDoc ); while ( aIter.Next( aStrName, aRange ) ) { OUString aStrArea(aRange.Format(*pDoc, ScRefFlags::ADDR_ABS_3D, eConv)); diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index af13177bda8c..31cb7efa245a 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -105,7 +105,7 @@ void ScFilterOptionsMgr::Init() pLbCopyArea->clear(); pLbCopyArea->append_text(rStrUndefined); - ScAreaNameIterator aIter( pDoc ); + ScAreaNameIterator aIter( *pDoc ); OUString aName; ScRange aRange; while ( aIter.Next( aName, aRange ) ) diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 5ad843793a37..6fc4d45655af 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -544,7 +544,7 @@ void ScTabPageSortOptions::Init() m_xLbOutPos->append_text(aStrUndefined); m_xLbOutPos->set_sensitive(false); - ScAreaNameIterator aIter( pDoc ); + ScAreaNameIterator aIter( *pDoc ); OUString aName; ScRange aRange; while ( aIter.Next( aName, aRange ) ) diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index a5e683e5dcbf..c4c23b1ba369 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -250,7 +250,7 @@ void ScLinkedAreaDlg::UpdateSourceRanges() m_xLbRanges->append_text("CSV_all"); } - ScAreaNameIterator aIter(&m_pSourceShell->GetDocument()); + ScAreaNameIterator aIter(m_pSourceShell->GetDocument()); ScRange aDummy; OUString aName; while ( aIter.Next( aName, aDummy ) ) |