From 833e6ca9d284bca536d09f6a30b1a8cfbb1c86d8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 23 Dec 2016 16:03:53 +0200 Subject: use std::vector instead of naked array in SfxItemPool Change-Id: I2d4ac010ff5818e673567cee05700872588918e4 Reviewed-on: https://gerrit.libreoffice.org/32384 Tested-by: Jenkins Reviewed-by: Jochen Nitschke --- include/svl/itempool.hxx | 7 ++++--- include/svx/xpool.hxx | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx index 7255bc7f1206..33449286c7da 100644 --- a/include/svl/itempool.hxx +++ b/include/svl/itempool.hxx @@ -25,6 +25,7 @@ #include #include #include +#include class SvStream; class SfxBroadcaster; @@ -90,7 +91,7 @@ public: SfxItemPool( const OUString &rName, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxItemInfo *pItemInfos, - SfxPoolItem **pDefaults = nullptr, + std::vector *pDefaults = nullptr, bool bLoadRefCounts = true ); protected: @@ -105,9 +106,9 @@ public: const SfxPoolItem* GetPoolDefaultItem( sal_uInt16 nWhich ) const; void ResetPoolDefaultItem( sal_uInt16 nWhich ); - void SetDefaults( SfxPoolItem **pDefaults ); + void SetDefaults( std::vector* pDefaults ); void ReleaseDefaults( bool bDelete = false ); - static void ReleaseDefaults( SfxPoolItem **pDefaults, sal_uInt16 nCount, bool bDelete = false ); + static void ReleaseDefaults( std::vector *pDefaults, bool bDelete = false ); virtual MapUnit GetMetric( sal_uInt16 nWhich ) const; void SetDefaultMetric( MapUnit eNewMetric ); diff --git a/include/svx/xpool.hxx b/include/svx/xpool.hxx index 364b91db3e4c..5e6dd21efab3 100644 --- a/include/svx/xpool.hxx +++ b/include/svx/xpool.hxx @@ -33,8 +33,8 @@ class SVX_DLLPUBLIC XOutdevItemPool : public SfxItemPool { protected: - SfxPoolItem** mppLocalPoolDefaults; - SfxItemInfo* mpLocalItemInfos; + std::vector* mpLocalPoolDefaults; + SfxItemInfo* mpLocalItemInfos; public: XOutdevItemPool( SfxItemPool* pMaster, bool bLoadRefCounts = true); -- cgit