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 /svx | |
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 'svx')
-rw-r--r-- | svx/source/accessibility/AccessibleEmptyEditSource.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdibrow.cxx | 1 | ||||
-rw-r--r-- | svx/source/tbxctrls/formatpaintbrushctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 3 |
4 files changed, 7 insertions, 3 deletions
diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx index 776e9643ec3d..d2d0ac252d42 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx @@ -107,8 +107,8 @@ namespace accessibility void RemoveAttribs( const ESelection& /*rSelection*/, bool /*bRemoveParaAttribs*/, sal_uInt16 /*nWhich*/ ) SAL_OVERRIDE {} void GetPortions( sal_Int32 /*nPara*/, std::vector<sal_Int32>& /*rList*/ ) const SAL_OVERRIDE {} - sal_uInt16 GetItemState( const ESelection& /*rSel*/, sal_uInt16 /*nWhich*/ ) const SAL_OVERRIDE { return 0; } - sal_uInt16 GetItemState( sal_Int32 /*nPara*/, sal_uInt16 /*nWhich*/ ) const SAL_OVERRIDE { return 0; } + SfxItemState GetItemState( const ESelection& /*rSel*/, sal_uInt16 /*nWhich*/ ) const SAL_OVERRIDE { return SFX_ITEM_UNKNOWN; } + SfxItemState GetItemState( sal_Int32 /*nPara*/, sal_uInt16 /*nWhich*/ ) const SAL_OVERRIDE { return SFX_ITEM_UNKNOWN; } SfxItemPool* GetPool() const SAL_OVERRIDE { return NULL; } diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 9f1322c98781..40ca0d9f212a 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -325,6 +325,7 @@ OUString _SdrItemBrowserControl::GetCellText(long _nRow, sal_uInt16 _nColId) con case SFX_ITEM_DONTCARE: sRet = "DontCare"; break; case SFX_ITEM_SET : sRet = "Set"; break; case SFX_ITEM_DEFAULT : sRet = "Default"; break; + case SFX_ITEM_READONLY: sRet = "ReadOnly"; break; } // switch } break; case ITEMBROWSER_TYPECOL_ID: sRet = pEntry->GetItemTypeStr(); break; diff --git a/svx/source/tbxctrls/formatpaintbrushctrl.cxx b/svx/source/tbxctrls/formatpaintbrushctrl.cxx index 0c977e6c5318..27c6c8aa8067 100644 --- a/svx/source/tbxctrls/formatpaintbrushctrl.cxx +++ b/svx/source/tbxctrls/formatpaintbrushctrl.cxx @@ -96,7 +96,7 @@ void FormatPaintBrushToolBoxControl::Select(sal_uInt16 /*nSelectModifier*/) void FormatPaintBrushToolBoxControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - if( ( eState & SFX_ITEM_SET ) == 0 ) + if( eState != SFX_ITEM_SET ) m_bPersistentCopy = false; SfxToolBoxControl::StateChanged( nSID, eState, pState ); } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index e0e8eb3abe80..816afbe16709 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2078,6 +2078,9 @@ void SvxStyleToolBoxControl::StateChanged( case SFX_ITEM_DONTCARE: eTri = TRISTATE_INDET; break; + + default: + break; } rTbx.SetItemState( nId, eTri ); |