summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/text/atrstck.cxx20
1 files changed, 5 insertions, 15 deletions
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index 2747f26077fa..a7dac25a531d 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -419,26 +419,16 @@ void SwAttrHandler::Init( const SfxPoolItem** pPoolItem, const SwAttrSet* pAS,
// do we have to apply additional paragraph attributes?
bVertLayout = bVL;
- if ( pAS && pAS->Count() )
- {
- SfxItemIter aIter( *pAS );
- sal_uInt16 nWhich;
- const SfxPoolItem* pItem = aIter.GetCurItem();
- while( true )
+ if( pAS )
+ for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++ )
{
- nWhich = pItem->Which();
- if (isCHRATR(nWhich))
+ const SfxPoolItem* pItem = 0;
+ if( SFX_ITEM_SET == pAS->GetItemState( i, sal_True, &pItem ) )
{
- pDefaultArray[ StackPos[ nWhich ] ] = pItem;
+ pDefaultArray[ StackPos[ i ] ] = pItem;
FontChg( *pItem, rFnt, sal_True );
}
-
- if( aIter.IsAtEnd() )
- break;
-
- pItem = aIter.NextItem();
}
- }
// It is possible, that Init is called more than once, e.g., in a
// SwTxtFrm::FormatOnceMore situation.