summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-10-05 11:31:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-10-05 21:24:03 +0200
commit7f94c09b8bad0d8d31e126a95ede4fa937a8981a (patch)
treea28ecefe06a21671d1f7eddb8895c6fce4428286 /sw
parentdf5c984fa2e1687603e9e1b63a69b43591f19143 (diff)
SwUndoTableMerge::MoveBoxContent always dereferences its SwDoc* arg
Change-Id: I38472e475c6cb7f96b414d107301a04bbb73c0fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103958 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/frmedt/tblsel.cxx2
-rw-r--r--sw/source/core/inc/UndoTable.hxx2
-rw-r--r--sw/source/core/table/swnewtable.cxx2
-rw-r--r--sw/source/core/undo/untbl.cxx8
4 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index cc4e546d4306..81ab48f4accd 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -1381,7 +1381,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwNodeRange aRg( aSttNdIdx, aPam.GetPoint()->nNode );
++rInsPosNd;
if( pUndo )
- pUndo->MoveBoxContent( pDoc, aRg, rInsPosNd );
+ pUndo->MoveBoxContent( *pDoc, aRg, rInsPosNd );
else
{
pDoc->getIDocumentContentOperations().MoveNodeRange( aRg, rInsPosNd,
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index 88c3b10dbb31..331786b4e933 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -224,7 +224,7 @@ public:
virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
- void MoveBoxContent( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& rPos );
+ void MoveBoxContent( SwDoc& rDoc, SwNodeRange& rRg, SwNodeIndex& rPos );
void SetSelBoxes( const SwSelBoxes& rBoxes );
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index 48a97ff0eac4..ecd3bee01d1d 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -905,7 +905,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
}
SwNodeRange aRg( aSttNdIdx, aPam.GetPoint()->nNode );
if( pUndo )
- pUndo->MoveBoxContent( pDoc, aRg, rInsPosNd );
+ pUndo->MoveBoxContent( *pDoc, aRg, rInsPosNd );
else
{
pDoc->getIDocumentContentOperations().MoveNodeRange( aRg, rInsPosNd,
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 0df50f847820..59f4a0e3cff8 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2002,12 +2002,12 @@ void SwUndoTableMerge::RedoImpl(::sw::UndoRedoContext & rContext)
rDoc.MergeTable(rPam);
}
-void SwUndoTableMerge::MoveBoxContent( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& rPos )
+void SwUndoTableMerge::MoveBoxContent( SwDoc& rDoc, SwNodeRange& rRg, SwNodeIndex& rPos )
{
SwNodeIndex aTmp( rRg.aStart, -1 ), aTmp2( rPos, -1 );
- std::unique_ptr<SwUndoMove> pUndo(new SwUndoMove( pDoc, rRg, rPos ));
- ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
- pDoc->getIDocumentContentOperations().MoveNodeRange( rRg, rPos, m_pSaveTable->IsNewModel() ?
+ std::unique_ptr<SwUndoMove> pUndo(new SwUndoMove( &rDoc, rRg, rPos ));
+ ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
+ rDoc.getIDocumentContentOperations().MoveNodeRange( rRg, rPos, m_pSaveTable->IsNewModel() ?
SwMoveFlags::NO_DELFRMS :
SwMoveFlags::DEFAULT );
++aTmp;