diff options
Diffstat (limited to 'sd/source/ui/dlg/headerfooterdlg.cxx')
-rw-r--r-- | sd/source/ui/dlg/headerfooterdlg.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index 3fa82c9f2f9e..1be962aa96e4 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -303,7 +303,7 @@ void HeaderFooterDialog::Apply() void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides ) { - SdUndoGroup* pUndoGroup = new SdUndoGroup(mpDoc); + std::unique_ptr<SdUndoGroup> pUndoGroup(new SdUndoGroup(mpDoc)); OUString aComment( GetText() ); pUndoGroup->SetComment( aComment ); @@ -326,7 +326,7 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides ) for( nPage = 0; nPage < nPageCount; nPage++ ) { SdPage* pPage = mpDoc->GetSdPage( static_cast<sal_uInt16>(nPage), PageKind::Standard ); - change( pUndoGroup, pPage, aNewSettings ); + change( pUndoGroup.get(), pPage, aNewSettings ); } } else @@ -335,7 +335,7 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides ) DBG_ASSERT( mpCurrentPage && mpCurrentPage->GetPageKind() == PageKind::Standard, "no current page to apply to!" ); if( mpCurrentPage && (mpCurrentPage->GetPageKind() == PageKind::Standard) ) { - change( pUndoGroup, mpCurrentPage, aNewSettings ); + change( pUndoGroup.get(), mpCurrentPage, aNewSettings ); } } } @@ -350,7 +350,7 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides ) aTempSettings.mbSlideNumberVisible = false; aTempSettings.mbDateTimeVisible = false; - change( pUndoGroup, mpDoc->GetSdPage( 0, PageKind::Standard ), aTempSettings ); + change( pUndoGroup.get(), mpDoc->GetSdPage( 0, PageKind::Standard ), aTempSettings ); } // now notes settings @@ -368,15 +368,15 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides ) { SdPage* pPage = mpDoc->GetSdPage( static_cast<sal_uInt16>(nPage), PageKind::Notes ); - change( pUndoGroup, pPage, aNewSettings ); + change( pUndoGroup.get(), pPage, aNewSettings ); } // and last but not least to the handout page - change( pUndoGroup, mpDoc->GetMasterSdPage( 0, PageKind::Handout ), aNewSettings ); + change( pUndoGroup.get(), mpDoc->GetMasterSdPage( 0, PageKind::Handout ), aNewSettings ); } // give the undo group to the undo manager - mpViewShell->GetViewFrame()->GetObjectShell()->GetUndoManager()->AddUndoAction(pUndoGroup); + mpViewShell->GetViewFrame()->GetObjectShell()->GetUndoManager()->AddUndoAction(std::move(pUndoGroup)); } void HeaderFooterDialog::change( SdUndoGroup* pUndoGroup, SdPage* pPage, const HeaderFooterSettings& rNewSettings ) |