summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-20 16:21:21 +0200
committerNoel Grandin <noel@peralex.com>2015-01-06 10:59:40 +0200
commitbae855e667993ea6cddd551452c6e2fa60bdc2f3 (patch)
tree6ddf4f5d003ce53e9855cbe260851ef00ffa69ca /vcl
parent9b45157ab20c9b158a1ef8f4f364d7a46d9c276b (diff)
fdo#84938: replace BUTTONTYPE_ constants with 'enum class'
Change-Id: I54f9019297913683605b5aea9f79b3defc1dcc13
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/toolbox.cxx12
-rw-r--r--vcl/source/window/toolbox2.cxx6
2 files changed, 9 insertions, 9 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 490feac7f767..5816fe333970 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -169,11 +169,11 @@ ButtonType determineButtonType( ImplToolItem* pItem, ButtonType defaultType )
ButtonType tmpButtonType = defaultType;
if ( pItem->mnBits & (ToolBoxItemBits::TEXT_ONLY | ToolBoxItemBits::ICON_ONLY) ) // item has custom setting
{
- tmpButtonType = BUTTON_SYMBOLTEXT;
+ tmpButtonType = ButtonType::SYMBOLTEXT;
if ( pItem->mnBits & ToolBoxItemBits::TEXT_ONLY )
- tmpButtonType = BUTTON_TEXT;
+ tmpButtonType = ButtonType::TEXT;
else if ( pItem->mnBits & ToolBoxItemBits::ICON_ONLY )
- tmpButtonType = BUTTON_SYMBOL;
+ tmpButtonType = ButtonType::SYMBOLONLY;
}
return tmpButtonType;
}
@@ -1398,7 +1398,7 @@ void ToolBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
mbIsShift = false;
mbIsKeyEvent = false;
mbChangingHighlight = false;
- meButtonType = BUTTON_SYMBOL;
+ meButtonType = ButtonType::SYMBOLONLY;
meAlign = WINDOWALIGN_TOP;
meLastStyle = POINTER_ARROW;
mnWinStyle = nStyle;
@@ -1755,7 +1755,7 @@ bool ToolBox::ImplCalcItem()
it->mbEmptyBtn = false;
- if ( tmpButtonType == BUTTON_SYMBOL )
+ if ( tmpButtonType == ButtonType::SYMBOLONLY )
{
// we're drawing images only
if ( bImage || !bText )
@@ -1769,7 +1769,7 @@ bool ToolBox::ImplCalcItem()
it->mbVisibleText = true;
}
}
- else if ( tmpButtonType == BUTTON_TEXT )
+ else if ( tmpButtonType == ButtonType::TEXT )
{
// we're drawing text only
if ( bText || !bImage )
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 938a93223025..c1f4e0581b3d 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -282,7 +282,7 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbIma
// prefer images if symbolonly buttons are drawn
// prefer texts if textonly buttons are dreawn
- if ( eButtonType == BUTTON_SYMBOL ) // drawing icons only
+ if ( eButtonType == ButtonType::SYMBOLONLY ) // drawing icons only
{
if( bHasImage || !bHasText )
{
@@ -295,7 +295,7 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbIma
rbText = true;
}
}
- else if ( eButtonType == BUTTON_TEXT ) // drawing text only
+ else if ( eButtonType == ButtonType::TEXT ) // drawing text only
{
if( bHasText || !bHasImage )
{
@@ -1270,7 +1270,7 @@ void ToolBox::SetItemText( sal_uInt16 nItemId, const OUString& rText )
ImplToolItem* pItem = &mpData->m_aItems[nPos];
// only once all is calculated, do extra work
if ( !mbCalc &&
- ((meButtonType != BUTTON_SYMBOL) || !pItem->maImage) )
+ ((meButtonType != ButtonType::SYMBOLONLY) || !pItem->maImage) )
{
long nOldWidth = GetCtrlTextWidth( pItem->maText );
pItem->maText = ImplConvertMenuString( rText );