diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-28 13:59:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-02 08:48:02 +0200 |
commit | dc1c424acfb4b3504a19be52417d23f1c5c30ee8 (patch) | |
tree | 26ce4e21f0f387300c8fdd8c9229342083c1fcb7 /svx/source/inc/filtnav.hxx | |
parent | 81f713802ea6d1def41a29a83d7122e8bb0e4dde (diff) |
loplugin:useuniqueptr in FmParentData
Change-Id: Ie6c2c3f10e2ca4037c0607f1faac8f6235ed2eed
Reviewed-on: https://gerrit.libreoffice.org/61121
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/inc/filtnav.hxx')
-rw-r--r-- | svx/source/inc/filtnav.hxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx index 0910a68b350d..826bd07223dc 100644 --- a/svx/source/inc/filtnav.hxx +++ b/svx/source/inc/filtnav.hxx @@ -79,7 +79,7 @@ public: class FmParentData : public FmFilterData { protected: - ::std::vector< FmFilterData* > m_aChildren; + ::std::vector< std::unique_ptr<FmFilterData> > m_aChildren; public: FmParentData(FmParentData* pParent, const OUString& rText) @@ -87,7 +87,7 @@ public: {} virtual ~FmParentData() override; - ::std::vector< FmFilterData* >& GetChildren() { return m_aChildren; } + ::std::vector< std::unique_ptr<FmFilterData> >& GetChildren() { return m_aChildren; } }; @@ -166,7 +166,7 @@ public: void Update(const css::uno::Reference< css::container::XIndexAccess > & xControllers, const css::uno::Reference< css::form::runtime::XFormController > & xCurrent); void Clear(); bool ValidateText(FmFilterItem const * pItem, OUString& rText, OUString& rErrorMsg) const; - void Append(FmFilterItems* pItems, FmFilterItem* pFilterItem); + void Append(FmFilterItems* pItems, std::unique_ptr<FmFilterItem> pFilterItem); void SetTextForItem(FmFilterItem* pItem, const OUString& rText); FmFormItem* GetCurrentForm() const {return m_pCurrentItems ? static_cast<FmFormItem*>(m_pCurrentItems->GetParent()) : nullptr;} @@ -181,10 +181,10 @@ public: void EnsureEmptyFilterRows( FmParentData& _rItem ); private: - void Insert(const ::std::vector<FmFilterData*>::iterator& rPos, FmFilterData* pFilterItem); - void Remove( const ::std::vector<FmFilterData*>::iterator& rPos ); - FmFormItem* Find(const ::std::vector<FmFilterData*>& rItems, const css::uno::Reference< css::form::runtime::XFormController > & xController) const; - FmFormItem* Find(const ::std::vector<FmFilterData*>& rItems, const css::uno::Reference< css::form::XForm >& xForm) const; + void Insert(const ::std::vector<std::unique_ptr<FmFilterData>>::iterator& rPos, std::unique_ptr<FmFilterData> pFilterItem); + void Remove( const ::std::vector<std::unique_ptr<FmFilterData>>::iterator& rPos ); + FmFormItem* Find(const ::std::vector<std::unique_ptr<FmFilterData>>& rItems, const css::uno::Reference< css::form::runtime::XFormController > & xController) const; + FmFormItem* Find(const ::std::vector<std::unique_ptr<FmFilterData>>& rItems, const css::uno::Reference< css::form::XForm >& xForm) const; void Update(const css::uno::Reference< css::container::XIndexAccess > & xControllers, FmParentData* pParent); }; |