From 810e664de088721b6452016d83fb3ef3e6ca5eb1 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Wed, 5 Oct 2016 15:26:43 +0200 Subject: use initializer list ... ... for default pool item arrays and item infos Change-Id: I79db1b4e4a78471d81409dd976a912eeccf1065b Reviewed-on: https://gerrit.libreoffice.org/29540 Tested-by: Jenkins Reviewed-by: Markus Mohrhard --- svx/source/xoutdev/xpool.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'svx') diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx index d427aa07e164..a0bab6876ed8 100644 --- a/svx/source/xoutdev/xpool.cxx +++ b/svx/source/xoutdev/xpool.cxx @@ -24,10 +24,10 @@ #include #include -XOutdevItemPool::XOutdevItemPool( - SfxItemPool* _pMaster, - bool bLoadRefCounts) -: SfxItemPool("XOutdevItemPool", SDRATTR_START, SDRATTR_END, nullptr, nullptr, bLoadRefCounts) +XOutdevItemPool::XOutdevItemPool(SfxItemPool* _pMaster, bool bLoadRefCounts) + : SfxItemPool("XOutdevItemPool", SDRATTR_START, SDRATTR_END, nullptr, nullptr, bLoadRefCounts) + , mppLocalPoolDefaults(new SfxPoolItem*[SDRATTR_END - SDRATTR_START + 1]) + , mpLocalItemInfos(new SfxItemInfo[SDRATTR_END - SDRATTR_START + 1]) { // prepare some defaults const OUString aNullStr; @@ -58,8 +58,6 @@ XOutdevItemPool::XOutdevItemPool( } // prepare PoolDefaults - mppLocalPoolDefaults = new SfxPoolItem*[GetLastWhich() - GetFirstWhich() + 1]; - mppLocalPoolDefaults[XATTR_LINESTYLE -XATTR_START] = new XLineStyleItem; mppLocalPoolDefaults[XATTR_LINEDASH -XATTR_START] = new XLineDashItem(this,aNullDash); mppLocalPoolDefaults[XATTR_LINEWIDTH -XATTR_START] = new XLineWidthItem; @@ -113,7 +111,6 @@ XOutdevItemPool::XOutdevItemPool( mppLocalPoolDefaults[XATTRSET_FILL - XATTR_START] = new XFillAttrSetItem(pSet); // create ItemInfos - mpLocalItemInfos = new SfxItemInfo[GetLastWhich() - GetFirstWhich() + 1]; for(sal_uInt16 i(GetFirstWhich()); i <= GetLastWhich(); i++) { mpLocalItemInfos[i - XATTR_START]._nSID = 0; -- cgit