summaryrefslogtreecommitdiff
path: root/sc/source/core/data/documen2.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-23 08:54:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-23 22:25:34 +0200
commit428d17a2ed068dcbb21eb66338ee7fcf2cfa8929 (patch)
treef84f14c91fa8661b89413db29bfbfe01cf2580f9 /sc/source/core/data/documen2.cxx
parentdf7abb6981546aebebe69dc944f2a6555a7b669c (diff)
some places where ScDocument* is never passed a nullptr
and so some nullptr checks can be removed Change-Id: I7dedc2c6d054d9749db9766eaa3a5681842b2b69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103239 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/core/data/documen2.cxx')
-rw-r--r--sc/source/core/data/documen2.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 18c55028f082..a21837999732 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -193,14 +193,14 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
mxPoolHelper = new ScPoolHelper( this );
pBASM.reset( new ScBroadcastAreaSlotMachine( this ) );
- pChartListenerCollection.reset( new ScChartListenerCollection( this ) );
+ pChartListenerCollection.reset( new ScChartListenerCollection( *this ) );
pRefreshTimerControl.reset( new ScRefreshTimerControl );
}
else
{
pChartListenerCollection = nullptr;
}
- pDBCollection.reset( new ScDBCollection(this) );
+ pDBCollection.reset( new ScDBCollection(*this) );
pSelectionAttr = nullptr;
apTemporaryChartLock.reset( new ScTemporaryChartLock(this) );
xColNameRanges = new ScRangePairList;
@@ -407,7 +407,7 @@ void ScDocument::InitClipPtrs( ScDocument* pSourceDoc )
{
OSL_ENSURE(bIsClip, "InitClipPtrs and not bIsClip");
- ScMutationGuard aGuard(this, ScMutationGuardFlags::CORE);
+ ScMutationGuard aGuard(*this, ScMutationGuardFlags::CORE);
pValidationList.reset();
@@ -419,7 +419,7 @@ void ScDocument::InitClipPtrs( ScDocument* pSourceDoc )
// TODO: Copy Templates?
const ScValidationDataList* pSourceValid = pSourceDoc->pValidationList.get();
if ( pSourceValid )
- pValidationList.reset(new ScValidationDataList(this, *pSourceValid));
+ pValidationList.reset(new ScValidationDataList(*this, *pSourceValid));
// store Links in Stream
pClipData.reset();
@@ -468,7 +468,7 @@ ScNoteEditEngine& ScDocument::GetNoteEngine()
{
if ( !mpNoteEngine )
{
- ScMutationGuard aGuard(this, ScMutationGuardFlags::CORE);
+ ScMutationGuard aGuard(*this, ScMutationGuardFlags::CORE);
mpNoteEngine.reset( new ScNoteEditEngine( GetEnginePool(), GetEditPool() ) );
mpNoteEngine->SetUpdateMode( false );
mpNoteEngine->EnableUndo( false );
@@ -958,7 +958,7 @@ sal_uLong ScDocument::TransferTab( ScDocument& rSrcDoc, SCTAB nSrcPos,
}
{
- NumFmtMergeHandler aNumFmtMergeHdl(this, &rSrcDoc);
+ NumFmtMergeHandler aNumFmtMergeHdl(*this, rSrcDoc);
sc::CopyToDocContext aCxt(*this);
nDestPos = std::min(nDestPos, static_cast<SCTAB>(GetTableCount() - 1));