diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-10 11:06:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-12 08:57:15 +0200 |
commit | 7df81f27974a640de3dae54b48f0b71281bffd4a (patch) | |
tree | 505376261faf69937a7e90dc3b4a4eb91cef7f9b /sd/source/ui/docshell | |
parent | ce47f6dade0802d61b298e9490605894d94f6762 (diff) |
loplugin:useuniqueptr in DrawDocShell::GetPagePreviewBitmap
Change-Id: Ib301f361d9d9598bcb79865c62200bce081c77ef
Reviewed-on: https://gerrit.libreoffice.org/60338
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/docshel2.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index 6e22f84315d8..120c3c426889 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -204,7 +204,7 @@ BitmapEx DrawDocShell::GetPagePreviewBitmap(SdPage* pPage) aMapMode.SetScaleY( aFrac ); pVDev->SetMapMode( aMapMode ); - ClientView* pView = new ClientView( this, pVDev ); + std::unique_ptr<ClientView> pView(new ClientView( this, pVDev )); FrameView* pFrameView = GetFrameView(); pView->ShowSdrPage( pPage ); @@ -258,7 +258,7 @@ BitmapEx DrawDocShell::GetPagePreviewBitmap(SdPage* pPage) pView->CompleteRedraw( pVDev, vcl::Region(::tools::Rectangle(aNullPt, aSize)) ); // IsRedrawReady() always gives sal_True while ( !pView->IsRedrawReady() ) {} - delete pView; + pView.reset(); pVDev->SetMapMode( MapMode() ); |