diff options
author | Varun Dhall <varun.dhall@studentpartner.com> | 2017-08-17 01:23:47 +0530 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-08-16 22:38:04 +0200 |
commit | 75933b220d48bceff25b07cfc4b55c70a2e24917 (patch) | |
tree | 457351625e24bf221e40510addae48cd63ae4382 /svl | |
parent | bc11bee358a3bcdf49ef60ee0449bcd053c00d74 (diff) |
Rename SfxItemPool GetSurrogate to CheckItemInPool
Change-Id: Ife08e05a9fcbadea86c005a2e9defb7cef9b5acc
Reviewed-on: https://gerrit.libreoffice.org/41231
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/itemset.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/poolio.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 3b7efdc3348f..fc1ac104a652 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -1429,7 +1429,7 @@ void SfxItemSet::PutDirect(const SfxPoolItem &rItem) const sal_uInt16* pPtr = m_pWhichRanges; const sal_uInt16 nWhich = rItem.Which(); #ifdef DBG_UTIL - IsPoolDefaultItem(&rItem) || m_pPool->GetSurrogate(&rItem); + IsPoolDefaultItem(&rItem) || m_pPool->CheckItemInPool(&rItem); // Only cause assertion in the callees #endif while( *pPtr ) diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index ff490ed1a535..6c4e64381f80 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -88,7 +88,7 @@ sal_uInt16 SfxItemPool::GetSize_Impl() const } -sal_uInt32 SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const +bool SfxItemPool::CheckItemInPool(const SfxPoolItem *pItem) const { DBG_ASSERT( pItem, "no 0-Pointer Surrogate" ); DBG_ASSERT( !IsInvalidItem(pItem), "no Invalid-Item Surrogate" ); @@ -97,13 +97,13 @@ sal_uInt32 SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const if ( !IsInRange(pItem->Which()) ) { if ( pImpl->mpSecondary ) - return pImpl->mpSecondary->GetSurrogate( pItem ); + return pImpl->mpSecondary->CheckItemInPool( pItem ); SAL_WARN( "svl.items", "unknown Which-Id - don't ask me for surrogates, with ID/pos " << pItem->Which()); } // Pointer on static or pool-default attribute? if( IsStaticDefaultItem(pItem) || IsPoolDefaultItem(pItem) ) - return SFX_ITEMS_DEFAULT; + return true; SfxPoolItemArray_Impl* pItemArr = pImpl->maPoolItems[GetIndex_Impl(pItem->Which())]; DBG_ASSERT(pItemArr, "ItemArr is not available"); @@ -112,10 +112,10 @@ sal_uInt32 SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const { const SfxPoolItem *p = (*pItemArr)[i]; if ( p == pItem ) - return i; + return true; } SAL_WARN( "svl.items", "Item not in the pool, with ID/pos " << pItem->Which()); - return SFX_ITEMS_NULL; + return false; } OUString readByteString(SvStream& rStream) |