summaryrefslogtreecommitdiff
path: root/svl/source/items/poolcach.cxx
diff options
context:
space:
mode:
authorMatthias Huetsch [mhu] <matthias.huetsch@oracle.com>2011-01-27 18:16:28 +0100
committerMatthias Huetsch [mhu] <matthias.huetsch@oracle.com>2011-01-27 18:16:28 +0100
commit45893f9a2740eb9c291476df4eaa3700003f0efd (patch)
treea7e2381af1a4136eb18b89b55af639306c9fc2c0 /svl/source/items/poolcach.cxx
parente3f92103a5a14baf81c7f4fca6bc8fb4f3741e1d (diff)
parentffd600e777970df0908125da66b280e1b00dbec9 (diff)
Update from master repository (DEV300_m98).
Diffstat (limited to 'svl/source/items/poolcach.cxx')
-rw-r--r--svl/source/items/poolcach.cxx22
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,