[Libreoffice-commits] core.git: svl/source

Jochen Nitschke j.nitschke+logerrit at ok.de
Sun Sep 3 07:56:24 UTC 2017


 svl/source/inc/poolio.hxx     |    2 --
 svl/source/items/itempool.cxx |    4 +---
 2 files changed, 1 insertion(+), 5 deletions(-)

New commits:
commit e0883b6f6a1018d6d7538fc9ddeca3f623918b48
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Sat Sep 2 11:22:04 2017 +0200

    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 at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

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() );


More information about the Libreoffice-commits mailing list