[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 22 17:05:31 UTC 2018
sw/source/core/inc/UndoDraw.hxx | 2 +-
sw/source/core/undo/undraw.cxx | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 5dd5890522ea39f75b5a42e9daf5892ed24da007
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Aug 22 14:23:03 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Aug 22 19:05:03 2018 +0200
loplugin:useuniqueptr in SwSdrUndo
Change-Id: I848f889f34dd7d3ffd83ff0cf209de8e69bbfeae
Reviewed-on: https://gerrit.libreoffice.org/59447
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/core/inc/UndoDraw.hxx b/sw/source/core/inc/UndoDraw.hxx
index 892016e476db..557dba678825 100644
--- a/sw/source/core/inc/UndoDraw.hxx
+++ b/sw/source/core/inc/UndoDraw.hxx
@@ -40,7 +40,7 @@ class SwSdrUndo : public SwUndo
std::unique_ptr<SdrMarkList> pMarkList; // MarkList for all selected SdrObjects
public:
- SwSdrUndo( SdrUndoAction* , const SdrMarkList* pMarkList, const SwDoc* pDoc );
+ SwSdrUndo( std::unique_ptr<SdrUndoAction> , const SdrMarkList* pMarkList, const SwDoc* pDoc );
virtual ~SwSdrUndo() override;
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index 0572877b62b7..2b1a8c442f15 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -65,14 +65,14 @@ IMPL_LINK( SwDoc, AddDrawUndo, SdrUndoAction *, pUndo, void )
if( pSh && pSh->HasDrawView() )
pMarkList = &pSh->GetDrawView()->GetMarkedObjectList();
- GetIDocumentUndoRedo().AppendUndo( new SwSdrUndo(pUndo, pMarkList, this) );
+ GetIDocumentUndoRedo().AppendUndo( new SwSdrUndo(std::unique_ptr<SdrUndoAction>(pUndo), pMarkList, this) );
}
else
delete pUndo;
}
-SwSdrUndo::SwSdrUndo( SdrUndoAction* pUndo, const SdrMarkList* pMrkLst, const SwDoc* pDoc )
- : SwUndo( SwUndoId::DRAWUNDO, pDoc ), pSdrUndo( pUndo )
+SwSdrUndo::SwSdrUndo( std::unique_ptr<SdrUndoAction> pUndo, const SdrMarkList* pMrkLst, const SwDoc* pDoc )
+ : SwUndo( SwUndoId::DRAWUNDO, pDoc ), pSdrUndo( std::move(pUndo) )
{
if( pMrkLst && pMrkLst->GetMarkCount() )
pMarkList.reset( new SdrMarkList( *pMrkLst ) );
More information about the Libreoffice-commits
mailing list