summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-13 15:31:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-15 14:31:57 +0200
commit95fe8fa97a62ae90b6d092c52d2fc6fae198e011 (patch)
treeb2bed821a48e70f3ea6f75466b77a4070a89aa61 /include
parent5779b4966954d845f3c526c340bdee8c6a92ef95 (diff)
loplugin:useuniqueptr in GalleryTheme
Change-Id: I6c709b9c38f24af37b355f85e5957790eb20a326 Reviewed-on: https://gerrit.libreoffice.org/59022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/svx/galtheme.hxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index 98bf45876bc0..c83ba9609565 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -53,8 +53,6 @@ struct GalleryObject
};
-typedef ::std::vector< GalleryObject* > GalleryObjectList;
-
class GalleryThemeEntry;
class SgaObject;
class FmFormModel;
@@ -78,7 +76,7 @@ class SVX_DLLPUBLIC GalleryTheme : public SfxBroadcaster
private:
- GalleryObjectList aObjectList;
+ ::std::vector< std::unique_ptr<GalleryObject> > aObjectList;
OUString m_aDestDir;
bool m_bDestDirRelative;
tools::SvRef<SotStorage> aSvDrawStorageRef;
@@ -95,13 +93,13 @@ private:
SAL_DLLPRIVATE bool ImplWriteSgaObject(const SgaObject& rObj, sal_uInt32 nPos, GalleryObject* pExistentEntry);
SAL_DLLPRIVATE void ImplWrite();
SAL_DLLPRIVATE const GalleryObject* ImplGetGalleryObject(sal_uInt32 nPos) const
- { return ( nPos < aObjectList.size() ) ? aObjectList[ nPos ] : nullptr; }
+ { return aObjectList[ nPos ].get(); }
const GalleryObject* ImplGetGalleryObject( const INetURLObject& rURL );
SAL_DLLPRIVATE sal_uInt32 ImplGetGalleryObjectPos( const GalleryObject* pObj ) const
{
for (sal_uInt32 i = 0, n = aObjectList.size(); i < n; ++i)
- if ( pObj == aObjectList[ i ] )
+ if ( pObj == aObjectList[ i ].get() )
return i;
return SAL_MAX_UINT32;
}