diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-09-02 11:22:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-03 09:56:03 +0200 |
commit | e0883b6f6a1018d6d7538fc9ddeca3f623918b48 (patch) | |
tree | 3a532c1fc7a894f4d6ef42688fc6d44ac48d0a12 /svl | |
parent | 77dbcb5620c1d233d09f6374927ef0c149fc8210 (diff) |
SfxItemPool_Impl::nInitRefCount is always 1
since removal of serialisation code
Change-Id: I8cbd7ecd3d4bb61a8d9e6bc098f09f43c02a8f4c
Reviewed-on: https://gerrit.libreoffice.org/41850
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/inc/poolio.hxx | 2 | ||||
-rw-r--r-- | svl/source/items/itempool.cxx | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx index 8318ff52fa8b..a6596e6bd989 100644 --- a/svl/source/inc/poolio.hxx +++ b/svl/source/inc/poolio.hxx @@ -83,7 +83,6 @@ struct SfxItemPool_Impl sal_uInt16* mpPoolRanges; sal_uInt16 mnStart; sal_uInt16 mnEnd; - sal_uInt16 nInitRefCount; // 1, during load, may be 2 MapUnit eDefMetric; SfxItemPool_Impl( SfxItemPool* pMaster, const OUString& rName, sal_uInt16 nStart, sal_uInt16 nEnd ) @@ -96,7 +95,6 @@ struct SfxItemPool_Impl , mpPoolRanges(nullptr) , mnStart(nStart) , mnEnd(nEnd) - , nInitRefCount(0) , eDefMetric(MapUnit::MapCM) { DBG_ASSERT(mnStart, "Start-Which-Id must be greater 0" ); diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 3f78b19f2e8c..10a8761eb3bb 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -176,7 +176,6 @@ SfxItemPool::SfxItemPool pImpl( new SfxItemPool_Impl( this, rName, nStartWhich, nEndWhich ) ) { pImpl->eDefMetric = MapUnit::MapTwip; - pImpl->nInitRefCount = 1; if ( pDefaults ) SetDefaults(pDefaults); @@ -201,7 +200,6 @@ SfxItemPool::SfxItemPool pImpl( new SfxItemPool_Impl( this, rPool.pImpl->aName, rPool.pImpl->mnStart, rPool.pImpl->mnEnd ) ) { pImpl->eDefMetric = rPool.pImpl->eDefMetric; - pImpl->nInitRefCount = 1; // Take over static Defaults if ( bCloneStaticDefaults ) @@ -695,7 +693,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich assert((!IsItemPoolable(*pNewItem) || *pNewItem == rItem) && "SfxItemPool::Put(): unequal items: no operator== override?"); } - AddRef( *pNewItem, pImpl->nInitRefCount ); + AddRef( *pNewItem ); // 4. finally insert into the pointer array assert( pItemArr->maPtrToIndex.find(pNewItem) == pItemArr->maPtrToIndex.end() ); |