diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-08 11:22:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-09 12:09:55 +0200 |
commit | f7ce839c7844f029c0a1ac83a5638e83356b4c4b (patch) | |
tree | c93a342a577133b384a3ccc088d7d0675d4fb9e3 /sd/source/ui/animations | |
parent | 4ba06560e33f17ca1ed72ad722c80eae5ffd4277 (diff) |
use unique_ptr in SfxUndoManager::AddUndoAction
Change-Id: I11483e3cece12a7373f4276972b4c899edf1ce15
Reviewed-on: https://gerrit.libreoffice.org/61566
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/animations')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/animations/SlideTransitionPane.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 418e006f3ff7..a1837725974c 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -296,7 +296,7 @@ void CustomAnimationPane::addUndo() { SdPage* pPage = SdPage::getImplementation( mxCurrentPage ); if( pPage ) - pManager->AddUndoAction( new UndoAnimation( mrBase.GetDocShell()->GetDoc(), pPage ) ); + pManager->AddUndoAction( o3tl::make_unique<UndoAnimation>( mrBase.GetDocShell()->GetDoc(), pPage ) ); } } @@ -2527,7 +2527,7 @@ void CustomAnimationPane::updatePathFromMotionPathTag( const rtl::Reference< Mot { SdPage* pPage = SdPage::getImplementation( mxCurrentPage ); if( pPage ) - pManager->AddUndoAction( new UndoAnimationPath( mrBase.GetDocShell()->GetDoc(), pPage, pEffect->getNode() ) ); + pManager->AddUndoAction( o3tl::make_unique<UndoAnimationPath>( mrBase.GetDocShell()->GetDoc(), pPage, pEffect->getNode() ) ); } pEffect->updatePathFromSdrPathObj( *pPathObj ); diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index a1be17fa8449..58e6781dd5b1 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -250,7 +250,7 @@ void lcl_CreateUndoForPages( OUString aComment( SdResId(STR_UNDO_SLIDE_PARAMS) ); pManager->EnterListAction(aComment, aComment, 0, rBase.GetViewShellId()); - SdUndoGroup* pUndoGroup = new SdUndoGroup( pDoc ); + std::unique_ptr<SdUndoGroup> pUndoGroup(new SdUndoGroup( pDoc )); pUndoGroup->SetComment( aComment ); ::std::vector< SdPage * >::const_iterator aIt( rpPages->begin()); @@ -260,7 +260,7 @@ void lcl_CreateUndoForPages( pUndoGroup->AddAction( new sd::UndoTransition( pDoc, (*aIt) ) ); } - pManager->AddUndoAction( pUndoGroup ); + pManager->AddUndoAction( std::move(pUndoGroup) ); pManager->LeaveListAction(); } |