diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-04 14:33:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-11 08:26:05 +0200 |
commit | 32604a3da226a4e340d6e7844153e7d854fb7f2e (patch) | |
tree | a5dd19f6b2386967a3e8f8c722868a77e1f26e68 /svx | |
parent | e23678f58113b4bb6624a2c0cf3170bcd2d7577e (diff) |
loplugin:useuniqueptr in FmFilterNavigator
Change-Id: I9a674cc87dc6aae4419389a7309304815ceb22ef
Reviewed-on: https://gerrit.libreoffice.org/55518
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/filtnav.cxx | 4 | ||||
-rw-r--r-- | svx/source/inc/filtnav.hxx | 4 |
2 files changed, 4 insertions, 4 deletions
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<FmFilterModel> 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: |