diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-10 17:53:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-12 06:08:32 +0000 |
commit | ea733ab5b632109d28bb8f1dc37116340b26229b (patch) | |
tree | 78a5c4d6cad5d6f2c58a89745ba0af130ef0e188 /editeng/source/rtf/svxrtf.cxx | |
parent | cc3294e127a6aedb8f6da5741ac9063da1cc2135 (diff) |
Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState")
Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'editeng/source/rtf/svxrtf.cxx')
-rw-r--r-- | editeng/source/rtf/svxrtf.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 19ae8a8c451d..625028e0c721 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -865,7 +865,7 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType ) for( sal_uInt16 nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() ) { if( SFX_WHICH_MAX > nWhich && - SFX_ITEM_SET == rSet.GetItemState( nWhich, false, &pItem ) && + SfxItemState::SET == rSet.GetItemState( nWhich, false, &pItem ) && rPool.GetDefaultItem( nWhich ) == *pItem ) rSet.ClearItem( nWhich ); // delete } @@ -879,14 +879,14 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType ) const SfxPoolItem* pSItem; for( sal_uInt16 nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() ) { - if( SFX_ITEM_SET == rStyleSet.GetItemState( nWhich, true, &pSItem )) + if( SfxItemState::SET == rStyleSet.GetItemState( nWhich, true, &pSItem )) { - if( SFX_ITEM_SET == rSet.GetItemState( nWhich, false, &pItem ) + if( SfxItemState::SET == rSet.GetItemState( nWhich, false, &pItem ) && *pItem == *pSItem ) rSet.ClearItem( nWhich ); // delete } else if( SFX_WHICH_MAX > nWhich && - SFX_ITEM_SET == rSet.GetItemState( nWhich, false, &pItem ) && + SfxItemState::SET == rSet.GetItemState( nWhich, false, &pItem ) && rPool.GetDefaultItem( nWhich ) == *pItem ) rSet.ClearItem( nWhich ); // delete } @@ -916,7 +916,7 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack const SfxPoolItem* pItem = aIter.GetCurItem(), *pGet; while( true ) { - if( SFX_ITEM_SET == pAkt->aAttrSet.GetItemState( + if( SfxItemState::SET == pAkt->aAttrSet.GetItemState( pItem->Which(), false, &pGet ) && *pItem == *pGet ) pOld->aAttrSet.ClearItem( pItem->Which() ); @@ -1290,7 +1290,7 @@ void SvxRTFItemStackType::Compress( const SvxRTFParser& rParser ) const SfxPoolItem* pItem; do { sal_uInt16 nWhich = aIter.GetCurItem()->Which(); - if( SFX_ITEM_SET != pTmp->aAttrSet.GetItemState( nWhich, + if( SfxItemState::SET != pTmp->aAttrSet.GetItemState( nWhich, false, &pItem ) || *pItem != *aIter.GetCurItem() ) aMrgSet.ClearItem( nWhich ); @@ -1337,7 +1337,7 @@ void SvxRTFItemStackType::SetRTFDefaults( const SfxItemSet& rDefaults ) SfxItemIter aIter( rDefaults ); do { sal_uInt16 nWhich = aIter.GetCurItem()->Which(); - if( SFX_ITEM_SET != aAttrSet.GetItemState( nWhich, false )) + if( SfxItemState::SET != aAttrSet.GetItemState( nWhich, false )) aAttrSet.Put( *aIter.GetCurItem() ); if( aIter.IsAtEnd() ) |