[Libreoffice-commits] core.git: sc/inc sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 15 15:40:27 UTC 2020
sc/inc/rangeutl.hxx | 2 +-
sc/source/core/tool/rangeutl.cxx | 6 +++---
sc/source/ui/dbgui/PivotLayoutDialog.cxx | 4 ++--
sc/source/ui/dbgui/consdlg.cxx | 2 +-
sc/source/ui/dbgui/foptmgr.cxx | 2 +-
sc/source/ui/dbgui/tpsort.cxx | 2 +-
sc/source/ui/miscdlgs/linkarea.cxx | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 3fc713a8e53d7882089ec4b9240bf78bb99f8275
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Sep 14 15:38:14 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Sep 15 17:39:42 2020 +0200
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 at redhat.com>
diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx
index 286eb01421da..a09cded44e51 100644
--- a/sc/inc/rangeutl.hxx
+++ b/sc/inc/rangeutl.hxx
@@ -257,7 +257,7 @@ private:
bool bFirstPass;
public:
- ScAreaNameIterator( const ScDocument* pDoc );
+ ScAreaNameIterator( const ScDocument& rDoc );
bool Next( OUString& rName, ScRange& rRange );
bool WasDBName() const { return !bFirstPass; }
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 ) )
More information about the Libreoffice-commits
mailing list