From 32604a3da226a4e340d6e7844153e7d854fb7f2e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 4 Jun 2018 14:33:06 +0200 Subject: loplugin:useuniqueptr in FmFilterNavigator Change-Id: I9a674cc87dc6aae4419389a7309304815ceb22ef Reviewed-on: https://gerrit.libreoffice.org/55518 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/form/filtnav.cxx | 4 ++-- svx/source/inc/filtnav.hxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'svx') diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 293dbc28c81c..b447531ebd77 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1084,7 +1084,7 @@ FmFilterNavigator::FmFilterNavigator( vcl::Window* pParent ) Image(BitmapEx(RID_SVXBMP_EXPANDEDNODE)) ); - m_pModel = new FmFilterModel(); + m_pModel.reset( new FmFilterModel() ); StartListening( *m_pModel ); EnableInplaceEditing( true ); @@ -1104,7 +1104,7 @@ FmFilterNavigator::~FmFilterNavigator() void FmFilterNavigator::dispose() { EndListening( *m_pModel ); - delete m_pModel; + m_pModel.reset(); SvTreeListBox::dispose(); } diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx index 60f5095adf4d..0910a68b350d 100644 --- a/svx/source/inc/filtnav.hxx +++ b/svx/source/inc/filtnav.hxx @@ -231,7 +231,7 @@ class FmFilterNavigator final : public SvTreeListBox, public SfxListener { enum DROP_ACTION{ DA_SCROLLUP, DA_SCROLLDOWN, DA_EXPANDNODE }; - FmFilterModel* m_pModel; + std::unique_ptr m_pModel; SvTreeListEntry* m_pEditingCurrently; OFilterExchangeHelper m_aControlExchange; @@ -250,7 +250,7 @@ public: const css::uno::Reference< css::container::XIndexAccess > & xControllers, const css::uno::Reference< css::form::runtime::XFormController > & xCurrent ); - const FmFilterModel* GetFilterModel() const {return m_pModel;} + const FmFilterModel* GetFilterModel() const {return m_pModel.get();} private: -- cgit v1.2.3