summaryrefslogtreecommitdiff
path: root/svl/source/inc
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-09-01 21:49:59 +0200
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2016-09-02 14:44:17 +0000
commitbffce5c5c12deaa15bbd6484f30631f766ba2ee7 (patch)
treec9620aeafa901845d0ba1056eaeba96f7d55fe3b /svl/source/inc
parent85cf08c19f3ba3ca9dc7b5320c0bdab90242b94a (diff)
convert ppPoolDefaults to std::vector
Change-Id: I13ba5b66f3ea70bae28181f580579c73a4353f68 Reviewed-on: https://gerrit.libreoffice.org/28599 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'svl/source/inc')
-rw-r--r--svl/source/inc/poolio.hxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx
index 4a3219663935..c33a494076b6 100644
--- a/svl/source/inc/poolio.hxx
+++ b/svl/source/inc/poolio.hxx
@@ -91,7 +91,7 @@ struct SfxItemPool_Impl
std::vector<SfxPoolItemArray_Impl*> maPoolItems;
std::vector<SfxItemPoolUser*> maSfxItemPoolUsers; /// ObjectUser section
OUString aName;
- SfxPoolItem** ppPoolDefaults;
+ std::vector<SfxPoolItem*> maPoolDefaults;
SfxPoolItem** ppStaticDefaults;
SfxItemPool* mpMaster;
SfxItemPool* mpSecondary;
@@ -114,7 +114,7 @@ struct SfxItemPool_Impl
SfxItemPool_Impl( SfxItemPool* pMaster, const OUString& rName, sal_uInt16 nStart, sal_uInt16 nEnd )
: maPoolItems(nEnd - nStart + 1, static_cast<SfxPoolItemArray_Impl*>(nullptr))
, aName(rName)
- , ppPoolDefaults(new SfxPoolItem* [nEnd - nStart + 1])
+ , maPoolDefaults(nEnd - nStart + 1)
, ppStaticDefaults(nullptr)
, mpMaster(pMaster)
, mpSecondary(nullptr)
@@ -137,7 +137,6 @@ struct SfxItemPool_Impl
, mbPersistentRefCounts(false)
{
DBG_ASSERT(mnStart, "Start-Which-Id must be greater 0" );
- memset( ppPoolDefaults, 0, sizeof( SfxPoolItem* ) * (nEnd - nStart + 1));
}
~SfxItemPool_Impl()
@@ -151,11 +150,10 @@ struct SfxItemPool_Impl
for (; itr != itrEnd; ++itr)
delete *itr;
maPoolItems.clear();
+ maPoolDefaults.clear();
delete[] mpPoolRanges;
mpPoolRanges = nullptr;
- delete[] ppPoolDefaults;
- ppPoolDefaults = nullptr;
}
void readTheItems(SvStream & rStream, sal_uInt32 nCount, sal_uInt16 nVersion,