summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/unoshape.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/unodraw/unoshape.cxx')
-rw-r--r--svx/source/unodraw/unoshape.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index b7790cd1a25d..315503fa547b 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1578,14 +1578,10 @@ bool SvxShape::SetFillAttribute( sal_uInt16 nWID, const OUString& rName, SfxItem
return false;
}
- const SfxItemPool* pPool = rSet.GetPool();
-
- const sal_uInt32 nCount = pPool->GetItemCount2(nWID);
-
- for( sal_uInt32 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ for (const SfxPoolItem* p : rSet.GetPool()->GetItemSurrogates(nWID))
{
- const NameOrIndex* pItem = static_cast<const NameOrIndex*>(pPool->GetItem2(nWID, nSurrogate));
- if( pItem && ( pItem->GetName() == aName ) )
+ const NameOrIndex* pItem = static_cast<const NameOrIndex*>(p);
+ if( pItem->GetName() == aName )
{
rSet.Put( *pItem );
return true;