summaryrefslogtreecommitdiff
path: root/svl/source/items
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-07-23 10:48:58 +0200
committerNoel Grandin <noel@peralex.com>2014-07-23 13:26:19 +0200
commit88a874fcb3a3735634c638f34dcb0cc7bd2260ac (patch)
tree9d4d00f5c29ed08db69b0ff7aa334045cb879b82 /svl/source/items
parent11e66edd0e60d55fe5b6d285b919c012ae7500ce (diff)
convert SfxItemState constants to a proper enum
and while we're at it - use the enum type all over the place instead of passing around sal_uInt16 - don't use bitwise logic on enum values - use enum values instead of numeric constants Change-Id: I7f24cb4d242e1c00703e7bbcf1a00c18ef1e9fd4
Diffstat (limited to 'svl/source/items')
-rw-r--r--svl/source/items/itemset.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index cf15b267b5a9..33ed2d49b03e 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -737,7 +737,8 @@ void SfxItemSet::MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo )
{
// special case: exactly one sal_uInt16 which is already included?
- if ( nFrom == nTo && SFX_ITEM_AVAILABLE <= GetItemState(nFrom, false) )
+ SfxItemState eItemState = GetItemState(nFrom, false);
+ if ( nFrom == nTo && ( eItemState == SFX_ITEM_DEFAULT || eItemState == SFX_ITEM_SET ) )
return;
// merge new range
@@ -1096,7 +1097,7 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
sal_uInt16 nWhich = IsInvalidItem( pItem )
? GetWhichByPos( aIter.GetCurPos() )
: pItem->Which();
- if( 0 == rSet.GetItemState( nWhich, false ) )
+ if( SFX_ITEM_UNKNOWN == rSet.GetItemState( nWhich, false ) )
ClearItem( nWhich ); // loeschen
if( aIter.IsAtEnd() )
break;