summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-06 11:41:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-19 07:11:36 +0100
commitcc0be9f9616b732955ff21850fb69142ee46507e (patch)
treeb55540babb24aba890a72a086e43117042cc843e /svx
parent0fd3e7beeb20b1c6406b1c3dca2aac09baba7ff2 (diff)
loplugin:useuniqueptr in NavigatorTreeModel
Change-Id: I53e7e4ab0a1533266ce97d5a093a1742808b6215 Reviewed-on: https://gerrit.libreoffice.org/49930 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/navigatortreemodel.cxx4
-rw-r--r--svx/source/inc/fmexpl.hxx5
2 files changed, 5 insertions, 4 deletions
diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx
index 2c7c717b39de..95a38b4f75a1 100644
--- a/svx/source/form/navigatortreemodel.cxx
+++ b/svx/source/form/navigatortreemodel.cxx
@@ -191,7 +191,7 @@ namespace svxform
,m_pFormModel(nullptr)
{
m_pPropChangeList = new OFormComponentObserver(this);
- m_pRootList = new FmEntryDataList();
+ m_pRootList.reset( new FmEntryDataList() );
}
NavigatorTreeModel::~NavigatorTreeModel()
@@ -209,7 +209,7 @@ namespace svxform
}
Clear();
- delete m_pRootList;
+ m_pRootList.reset();
m_pPropChangeList->ReleaseModel();
}
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index 76142653fe7a..0d01abb9e2e9 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -316,7 +316,8 @@ namespace svxform
friend class NavigatorTree;
friend class OFormComponentObserver;
- FmEntryDataList* m_pRootList;
+ std::unique_ptr<FmEntryDataList>
+ m_pRootList;
FmFormShell* m_pFormShell;
FmFormPage* m_pFormPage;
FmFormModel* m_pFormModel;
@@ -361,7 +362,7 @@ namespace svxform
FmFormPage* GetFormPage() const { return m_pFormPage; }
FmEntryData* FindData( const css::uno::Reference< css::uno::XInterface >& xElement, FmEntryDataList* pDataList, bool bRecurs=true );
FmEntryData* FindData( const OUString& rText, FmFormData const * pParentData, bool bRecurs );
- FmEntryDataList* GetRootList() const { return m_pRootList; }
+ FmEntryDataList* GetRootList() const { return m_pRootList.get(); }
static css::uno::Reference< css::container::XIndexContainer > GetFormComponents( FmFormData const * pParentFormData );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;