summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-23 17:09:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-29 07:21:40 +0100
commit177f92a90aa6cc73064ae52bba58c03c7bf34699 (patch)
tree5fd501fc020fb5a9b7c4f7c7a1b621a0ee2287d7 /sfx2/source
parent53d21a31435c6fc781fe34400e18abb34a6b04d8 (diff)
loplugin:useuniqueptr in SfxChildWindow
Change-Id: I6c9db4cd4f46790295f37c620e2efea4f61870bf Reviewed-on: https://gerrit.libreoffice.org/48741 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/childwin.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 9257197af101..aec56687d3d7 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -193,8 +193,7 @@ void SfxChildWindow::ClearWorkwin()
SfxChildWindow::~SfxChildWindow()
{
- delete pContext;
- pContext = nullptr;
+ pContext.reset();
ClearWorkwin();
pWindow.disposeAndClear();
}
@@ -495,8 +494,7 @@ void SfxChildWindow::CreateContext( sal_uInt16 nContextId, SfxBindings& rBinding
return;
}
- delete pContext;
- pContext = pCon;
+ pContext.reset(pCon);
pContext->GetWindow()->SetSizePixel( pWindow->GetOutputSizePixel() );
pContext->GetWindow()->Show();
}