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 /starmath | |
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 'starmath')
-rw-r--r-- | starmath/source/accessibility.cxx | 10 | ||||
-rw-r--r-- | starmath/source/accessibility.hxx | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index a037861ea704..835b009af840 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -1112,7 +1112,7 @@ void SmTextForwarder::FieldClicked(const SvxFieldItem&, sal_Int32, sal_Int32) { } -static sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich ) +static SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich ) { std::vector<EECharAttrib> aAttribs; @@ -1204,18 +1204,18 @@ static sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESel return eState; } -sal_uInt16 SmTextForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const +SfxItemState SmTextForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const { - sal_uInt16 nState = SFX_ITEM_DISABLED; + SfxItemState nState = SFX_ITEM_DISABLED; EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) nState = GetSvxEditEngineItemState( *pEditEngine, rSel, nWhich ); return nState; } -sal_uInt16 SmTextForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const +SfxItemState SmTextForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const { - sal_uInt16 nState = SFX_ITEM_DISABLED; + SfxItemState nState = SFX_ITEM_DISABLED; EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) { diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx index 1b8f4da2a8db..1414b5353be9 100644 --- a/starmath/source/accessibility.hxx +++ b/starmath/source/accessibility.hxx @@ -210,8 +210,8 @@ public: virtual void RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) SAL_OVERRIDE; virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const SAL_OVERRIDE; - virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE; - virtual sal_uInt16 GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE; + virtual SfxItemState GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE; + virtual SfxItemState GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE; virtual void QuickInsertText( const OUString& rText, const ESelection& rSel ) SAL_OVERRIDE; virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) SAL_OVERRIDE; |