diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-10 11:14:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-12 08:57:29 +0200 |
commit | fb310c42746c5f2452a7e8d9b0893640bf7b2019 (patch) | |
tree | ff56f874baccb34f89847a540339aa274103c787 /sd/source/ui/docshell | |
parent | 7df81f27974a640de3dae54b48f0b71281bffd4a (diff) |
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/source/ui/docshell')
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 6 |
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; } |