diff options
Diffstat (limited to 'svl/source/items/poolcach.cxx')
-rw-r--r-- | svl/source/items/poolcach.cxx | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx index b918add10f0f..ab2bdfb91c84 100644 --- a/svl/source/items/poolcach.cxx +++ b/svl/source/items/poolcach.cxx @@ -35,24 +35,12 @@ #include <svl/itempool.hxx> #include <svl/itemset.hxx> -#include "poolcach.hxx" +#include <svl/poolcach.hxx> // STATIC DATA ----------------------------------------------------------- DBG_NAME(SfxItemPoolCache) - -//------------------------------------------------------------------------ - -struct SfxItemModifyImpl -{ - const SfxSetItem *pOrigItem; - SfxSetItem *pPoolItem; -}; - -SV_DECL_VARARR( SfxItemModifyArr_Impl, SfxItemModifyImpl, 8, 8 ) -SV_IMPL_VARARR( SfxItemModifyArr_Impl, SfxItemModifyImpl); - //------------------------------------------------------------------------ SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool, @@ -84,7 +72,7 @@ SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool, SfxItemPoolCache::~SfxItemPoolCache() { DBG_DTOR(SfxItemPoolCache, 0); - for ( USHORT nPos = 0; nPos < pCache->Count(); ++nPos ) { + for ( size_t nPos = 0; nPos < pCache->size(); ++nPos ) { pPool->Remove( *(*pCache)[nPos].pPoolItem ); pPool->Remove( *(*pCache)[nPos].pOrigItem ); } @@ -103,8 +91,8 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, BOOL b DBG_ASSERT( IsDefaultItem( &rOrigItem ) || IsPooledItem( &rOrigItem ), "original not in pool" ); - // Suchen, ob diese Transformations schon einmal vorkam - for ( USHORT nPos = 0; nPos < pCache->Count(); ++nPos ) + // Find whether this Transformations ever occurred + for ( size_t nPos = 0; nPos < pCache->size(); ++nPos ) { SfxItemModifyImpl &rMapEntry = (*pCache)[nPos]; if ( rMapEntry.pOrigItem == &rOrigItem ) @@ -143,7 +131,7 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, BOOL b SfxItemModifyImpl aModify; aModify.pOrigItem = &rOrigItem; aModify.pPoolItem = (SfxSetItem*) pNewPoolItem; - pCache->Insert( aModify, pCache->Count() ); + pCache->push_back( aModify ); DBG_ASSERT( !pItemToPut || &pNewPoolItem->GetItemSet().Get( pItemToPut->Which() ) == pItemToPut, |