diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-18 12:46:20 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-18 12:46:35 +0200 |
commit | c91b103930f4f441ab333d6f3026d6c19d4b4d0f (patch) | |
tree | b3bb0edd19ebf20bdca3c9b3605cec986d2e650f /svx | |
parent | 1c73135493e844c04446f58e7001920381787317 (diff) |
convert SvButtonState to scoped enum
Change-Id: I601f9e2fe33e85cf3f7dc52ee20d68202bd2b09d
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/checklbx.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx index 653d8f207fbb..11e4bda87eb8 100644 --- a/svx/source/dialog/checklbx.cxx +++ b/svx/source/dialog/checklbx.cxx @@ -122,16 +122,14 @@ sal_uLong SvxCheckListBox::GetCheckedEntryCount() const void SvxCheckListBox::CheckEntryPos( sal_uLong nPos, bool bCheck ) { if ( nPos < GetEntryCount() ) - SetCheckButtonState( - GetEntry( nPos ), bCheck ? SvButtonState( SV_BUTTON_CHECKED ) : - SvButtonState( SV_BUTTON_UNCHECKED ) ); + SetCheckButtonState( GetEntry( nPos ), bCheck ? SvButtonState::Checked : SvButtonState::Unchecked ); } bool SvxCheckListBox::IsChecked( sal_uLong nPos ) const { if ( nPos < GetEntryCount() ) - return (GetCheckButtonState( GetEntry( nPos ) ) == SV_BUTTON_CHECKED); + return GetCheckButtonState( GetEntry( nPos ) ) == SvButtonState::Checked; else return false; } @@ -180,7 +178,7 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt ) if ( pEntry ) { - bool bCheck = ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ); + bool bCheck = GetCheckButtonState( pEntry ) == SvButtonState::Checked; SvLBoxItem* pItem = GetItem( pEntry, aPnt.X() ); if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) @@ -200,7 +198,7 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt ) if ( pNewEntry != pEntry ) return; - if ( bCheck != ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) ) + if ( bCheck != ( GetCheckButtonState( pEntry ) == SvButtonState::Checked ) ) CheckButtonHdl(); return; } @@ -220,9 +218,9 @@ void SvxCheckListBox::KeyInput( const KeyEvent& rKEvt ) if ( pEntry ) { - bool bCheck = ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ); + bool bCheck = GetCheckButtonState( pEntry ) == SvButtonState::Checked; ToggleCheckButton( pEntry ); - if ( bCheck != ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) ) + if ( bCheck != ( GetCheckButtonState( pEntry ) == SvButtonState::Checked ) ) CheckButtonHdl(); } } |