From a36d67240c303101fb6a56e40ff46aa1023089f3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 4 May 2018 13:37:40 +0200 Subject: loplugin:useuniqueptr in SfxDocumentInfoItem and CustomPropertiesWindow Change-Id: I535200a5b26725cdefc3e6e3ce5e1e925e7a7bfd Reviewed-on: https://gerrit.libreoffice.org/53876 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/sfx2/dinfdlg.hxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include/sfx2/dinfdlg.hxx') diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index 9516b74868d8..2e61a28583ee 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -46,6 +46,7 @@ #include #include +#include namespace com { namespace sun { namespace star { namespace document { @@ -81,7 +82,7 @@ private: bool m_bDeleteUserData; bool m_bUseUserData; bool m_bUseThumbnailSave; - std::vector< CustomProperty* > m_aCustomProperties; + std::vector< std::unique_ptr > m_aCustomProperties; css::uno::Sequence< css::document::CmisProperty > m_aCmisProperties; public: @@ -150,7 +151,7 @@ public: bool IsUseThumbnailSave() const { return m_bUseThumbnailSave;} - std::vector< CustomProperty* > GetCustomProperties() const; + std::vector< std::unique_ptr > GetCustomProperties() const; void ClearCustomProperties(); void AddCustomProperty( const OUString& sName, const css::uno::Any& rValue ); @@ -402,7 +403,7 @@ private: sal_Int32 m_nTypeBoxWidth; sal_Int32 m_nLineHeight; sal_Int32 m_nScrollPos; - std::vector m_aCustomProperties; + std::vector> m_aCustomProperties; std::vector m_aCustomPropertiesLines; CustomPropertyLine* m_pCurrentLine; SvNumberFormatter m_aNumberFormatter; @@ -455,7 +456,7 @@ public: css::uno::Sequence< css::beans::PropertyValue > GetCustomProperties(); - void SetCustomProperties(const std::vector& rProperties); + void SetCustomProperties(std::vector< std::unique_ptr >&& rProperties); void SetRemovedHdl( const Link& rLink ) { m_aRemovedHdl = rLink; } }; @@ -488,7 +489,7 @@ public: css::uno::Sequence GetCustomProperties() const { return m_pPropertiesWin->GetCustomProperties(); } - void SetCustomProperties(const std::vector& rProperties); + void SetCustomProperties(std::vector< std::unique_ptr >&& rProperties); void Init(VclBuilderContainer& rParent); virtual void Resize() override; -- cgit