summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-05 15:21:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-06 08:32:41 +0200
commit37d93222377d7b1df05bbcbc5f56fdc0732f1413 (patch)
tree849b640fdba0615cc42a8a2e4d242fe4ae8678cc /framework/source
parent7c94581151c6427d143bb63fe51fa4b229e0b7e7 (diff)
loplugin:useuniqueptr in framework::Frame
Change-Id: Ic1350d5bff80d4a88d3949a412ee9bf02ad969ba Reviewed-on: https://gerrit.libreoffice.org/60050 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/services/frame.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index a7f60298aeb9..be0f828cdf5d 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -418,7 +418,7 @@ private:
css::uno::Reference< css::frame::XDispatchInformationProvider > m_xDispatchInfoHelper;
css::uno::Reference< css::frame::XTitle > m_xTitleHelper;
- WindowCommandDispatch* m_pWindowCommandDispatch;
+ std::unique_ptr<WindowCommandDispatch> m_pWindowCommandDispatch;
typedef std::unordered_map<OUString, css::beans::Property> TPropInfoHash;
TPropInfoHash m_lProps;
@@ -810,7 +810,7 @@ void SAL_CALL Frame::initialize( const css::uno::Reference< css::awt::XWindow >&
// So superfluous messages are filtered to NULL :-)
implts_startWindowListening();
- m_pWindowCommandDispatch = new WindowCommandDispatch(m_xContext, this);
+ m_pWindowCommandDispatch.reset(new WindowCommandDispatch(m_xContext, this));
// Initialize title functionality
TitleHelper* pTitleHelper = new TitleHelper( m_xContext );
@@ -2084,12 +2084,12 @@ void SAL_CALL Frame::disposing()
disableLayoutManager(layoutMgr);
}
- WindowCommandDispatch * disp = nullptr;
+ std::unique_ptr<WindowCommandDispatch> disp;
{
SolarMutexGuard g;
std::swap(disp, m_pWindowCommandDispatch);
}
- delete disp;
+ disp.reset();
// Send message to all listener and forget her references.
css::lang::EventObject aEvent( xThis );