summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-10 11:14:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-12 08:57:29 +0200
commitfb310c42746c5f2452a7e8d9b0893640bf7b2019 (patch)
treeff56f874baccb34f89847a540339aa274103c787 /sd
parentloplugin:useuniqueptr in DrawDocShell::GetPagePreviewBitmap (diff)
downloadcore-fb310c42746c5f2452a7e8d9b0893640bf7b2019.tar.gz
core-fb310c42746c5f2452a7e8d9b0893640bf7b2019.zip
loplugin:useuniqueptr in DrawDocShell::Load
Change-Id: I0d8b8c5c592b689bae33dd73f99cdf4ceb5f6c2d Reviewed-on: https://gerrit.libreoffice.org/60339 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/docshell/docshel4.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index d2b9693deeec..fca227e683c7 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -358,9 +358,9 @@ bool DrawDocShell::Load( SfxMedium& rMedium )
*/
bool DrawDocShell::LoadFrom( SfxMedium& rMedium )
{
- WaitObject* pWait = nullptr;
+ std::unique_ptr<WaitObject> pWait;
if( mpViewShell )
- pWait = new WaitObject( static_cast<vcl::Window*>(mpViewShell->GetActiveWindow()) );
+ pWait.reset(new WaitObject( static_cast<vcl::Window*>(mpViewShell->GetActiveWindow()) ));
mpDoc->NewOrLoadCompleted( NEW_DOC );
mpDoc->CreateFirstPages();
@@ -379,8 +379,6 @@ bool DrawDocShell::LoadFrom( SfxMedium& rMedium )
pSet->Put( SfxUInt16Item( SID_VIEW_ID, 5 ) );
}
- delete pWait;
-
return bRet;
}