diff options
author | Noel Grandin <noel@peralex.com> | 2014-07-23 10:48:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-07-23 13:26:19 +0200 |
commit | 88a874fcb3a3735634c638f34dcb0cc7bd2260ac (patch) | |
tree | 9d4d00f5c29ed08db69b0ff7aa334045cb879b82 /cui | |
parent | 11e66edd0e60d55fe5b6d285b919c012ae7500ce (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 'cui')
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/paragrph.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 554d977725fd..98a0e17078a0 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -812,6 +812,8 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp pLangBox->SelectLanguage( eLangType ); break; } + case SFX_ITEM_DONTCARE: + break; } OUString sMapText(pFontList->GetFontMapText( diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 3b059ed069a4..bbeb896549c0 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -2187,7 +2187,7 @@ static void lcl_SetBox(const SfxItemSet& rSet, sal_uInt16 nSlotId, CheckBox& rBo { sal_uInt16 _nWhich = rSet.GetPool()->GetWhich(nSlotId); SfxItemState eState = rSet.GetItemState(_nWhich, true); - if(!eState || eState == SFX_ITEM_DISABLED ) + if( eState == SFX_ITEM_UNKNOWN || eState == SFX_ITEM_DISABLED ) rBox.Enable(false); else if(eState >= SFX_ITEM_AVAILABLE) { diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 2e016dfdcdb6..9a1218a266ef 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -594,7 +594,7 @@ void SvxColorTabPage::UpdateModified() void SvxColorTabPage::Reset( const SfxItemSet* rSet ) { - sal_uInt16 nState = rSet->GetItemState( XATTR_FILLCOLOR ); + SfxItemState nState = rSet->GetItemState( XATTR_FILLCOLOR ); Color aNewColor; |