diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-30 10:29:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-05 07:55:44 +0100 |
commit | 9d6e774f51998deadae429061715f92a7af1b0b0 (patch) | |
tree | 36bf773d27d6a66f70b2933784baa63bd11da015 /include | |
parent | 748167da4e5a7f406d3fec93c9e61a534ec64037 (diff) |
loplugin:useuniqueptr in Gallery
Change-Id: Ia12805bff0403fe260786360233be677ef91f710
Reviewed-on: https://gerrit.libreoffice.org/49208
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/gallery1.hxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx index 932e7c4dc8d5..66474d17180b 100644 --- a/include/svx/gallery1.hxx +++ b/include/svx/gallery1.hxx @@ -26,6 +26,7 @@ #include <tools/urlobj.hxx> #include <cstdio> +#include <memory> #include <vector> class SvStream; @@ -78,8 +79,6 @@ public: void SetId( sal_uInt32 nNewId, bool bResetThemeName ); }; -typedef ::std::vector< GalleryThemeEntry* > GalleryThemeList; - class SfxListener; class GalleryTheme; class GalleryThemeCacheEntry; @@ -95,7 +94,7 @@ class SVX_DLLPUBLIC Gallery : public SfxBroadcaster private: - GalleryThemeList aThemeList; + std::vector< std::unique_ptr<GalleryThemeEntry> > aThemeList; GalleryCacheThemeList aThemeCache; INetURLObject aRelURL; INetURLObject aUserURL; @@ -111,6 +110,8 @@ private: Gallery( const OUString& rMultiPath ); virtual ~Gallery() override; + Gallery& operator=( Gallery const & ) = delete; // MSVC2015 workaround + Gallery( Gallery const & ) = delete; // MSVC2015 workaround public: @@ -118,7 +119,7 @@ public: SAL_DLLPRIVATE size_t GetThemeCount() const { return aThemeList.size(); } SAL_DLLPRIVATE const GalleryThemeEntry* GetThemeInfo( size_t nPos ) - { return nPos < aThemeList.size() ? aThemeList[ nPos ] : nullptr; } + { return nPos < aThemeList.size() ? aThemeList[ nPos ].get() : nullptr; } SAL_DLLPRIVATE const GalleryThemeEntry* GetThemeInfo( const OUString& rThemeName ) { return ImplGetThemeEntry( rThemeName ); } bool HasTheme( const OUString& rThemeName ); |