diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-18 20:16:11 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-10-20 07:16:46 +0000 |
commit | 67c9d054517fc3b5cbc203c330eedef4b50f0e57 (patch) | |
tree | 1fad773f770e4ee4265bb05ba77d7f3084aedd3b /vcl/source/window/toolbox2.cxx | |
parent | 8091cf383a122f2348d6e25df90fc26579fe6ef7 (diff) |
fdo#84938: replace TIB_ constants with enum
Change-Id: I435ce2331fb49e7ce9fe97bdfddfaef706759a84
Reviewed-on: https://gerrit.libreoffice.org/12023
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source/window/toolbox2.cxx')
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 2f8e1fdf663c..9517f07a56ad 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -109,7 +109,7 @@ void ImplToolItem::init(sal_uInt16 nItemId, ToolBoxItemBits nItemBits, ImplToolItem::ImplToolItem() { - init(0, 0, true); + init(0, ToolBoxItemBits::NONE, true); } ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, @@ -318,7 +318,7 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbIma Rectangle ImplToolItem::GetDropDownRect( bool bHorz ) const { Rectangle aRect; - if( (mnBits & TIB_DROPDOWN) && !maRect.IsEmpty() ) + if( (mnBits & ToolBoxItemBits::DROPDOWN) && !maRect.IsEmpty() ) { aRect = maRect; if( mbVisibleText && !bHorz ) @@ -1069,10 +1069,10 @@ void ToolBox::SetItemBits( sal_uInt16 nItemId, ToolBoxItemBits nBits ) { ToolBoxItemBits nOldBits = mpData->m_aItems[nPos].mnBits; mpData->m_aItems[nPos].mnBits = nBits; - nBits &= TIB_LEFT | TIB_AUTOSIZE | TIB_DROPDOWN; - nOldBits &= TIB_LEFT | TIB_AUTOSIZE | TIB_DROPDOWN; + nBits &= ToolBoxItemBits::LEFT | ToolBoxItemBits::AUTOSIZE | ToolBoxItemBits::DROPDOWN; + nOldBits &= ToolBoxItemBits::LEFT | ToolBoxItemBits::AUTOSIZE | ToolBoxItemBits::DROPDOWN; // trigger reformat when the item width has changed (dropdown arrow) - bool bFormat = (nBits & TIB_DROPDOWN) != (nOldBits & TIB_DROPDOWN); + bool bFormat = (nBits & ToolBoxItemBits::DROPDOWN) != (nOldBits & ToolBoxItemBits::DROPDOWN); if ( nBits != nOldBits ) ImplInvalidate( true, bFormat ); } @@ -1085,7 +1085,7 @@ ToolBoxItemBits ToolBox::GetItemBits( sal_uInt16 nItemId ) const if ( pItem ) return pItem->mnBits; else - return 0; + return ToolBoxItemBits::NONE; } void ToolBox::SetItemExpand( sal_uInt16 nItemId, bool bExpand ) @@ -1419,8 +1419,8 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState ) if ( pItem->meState != eState ) { // if RadioCheck, un-check the previous - if ( (eState == TRISTATE_TRUE) && (pItem->mnBits & TIB_AUTOCHECK) && - (pItem->mnBits & TIB_RADIOCHECK) ) + if ( (eState == TRISTATE_TRUE) && (pItem->mnBits & ToolBoxItemBits::AUTOCHECK) && + (pItem->mnBits & ToolBoxItemBits::RADIOCHECK) ) { ImplToolItem* pGroupItem; sal_uInt16 nGroupPos; @@ -1430,7 +1430,7 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState ) while ( nGroupPos ) { pGroupItem = &mpData->m_aItems[nGroupPos-1]; - if ( pGroupItem->mnBits & TIB_RADIOCHECK ) + if ( pGroupItem->mnBits & ToolBoxItemBits::RADIOCHECK ) { if ( pGroupItem->meState != TRISTATE_FALSE ) SetItemState( pGroupItem->mnId, TRISTATE_FALSE ); @@ -1444,7 +1444,7 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState ) while ( nGroupPos < nItemCount ) { pGroupItem = &mpData->m_aItems[nGroupPos]; - if ( pGroupItem->mnBits & TIB_RADIOCHECK ) + if ( pGroupItem->mnBits & ToolBoxItemBits::RADIOCHECK ) { if ( pGroupItem->meState != TRISTATE_FALSE ) SetItemState( pGroupItem->mnId, TRISTATE_FALSE ); |