summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-10 10:14:16 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-10 09:57:14 +0000
commit57f84e5b1f27a442981602bc428270a5ecb95959 (patch)
treefcb7b5881b50bf3fd97bfa2b7521d43d0f06fdb4 /vcl/source
parenteffde80f670c60986a92ca0f1c5c9922eb17908d (diff)
Convert TOOLBOX_MENUTYPE_ to scoped enum
Change-Id: I8eb25fc274b45b8add04dfc03e4b52f130ad04de Reviewed-on: https://gerrit.libreoffice.org/24827 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/toolbox.cxx2
-rw-r--r--vcl/source/window/toolbox2.cxx12
2 files changed, 7 insertions, 7 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 09d35239204f..4fa7ecaefff0 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -881,7 +881,7 @@ void ToolBox::ImplSetMinMaxFloatSize( ToolBox *pThis )
{
pWrapper->SetMinOutputSizePixel( aMinSize );
pWrapper->SetMaxOutputSizePixel( aMaxSize );
- pWrapper->ShowTitleButton( TitleButton::Menu, ( pThis->GetMenuType() & TOOLBOX_MENUTYPE_CUSTOMIZE) != 0 );
+ pWrapper->ShowTitleButton( TitleButton::Menu, bool( pThis->GetMenuType() & ToolBoxMenuType::Customize) );
}
else
{
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 83a517618b9f..7a93e507f185 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -53,7 +53,7 @@ ImplToolBoxPrivateData::ImplToolBoxPrivateData() :
mpMenu = new PopupMenu();
mnEventId = nullptr;
- maMenuType = TOOLBOX_MENUTYPE_NONE;
+ maMenuType = ToolBoxMenuType::NONE;
maMenubuttonItem.maItemSize = Size( TB_MENUBUTTON_SIZE+TB_MENUBUTTON_OFFSET, TB_MENUBUTTON_SIZE+TB_MENUBUTTON_OFFSET );
maMenubuttonItem.meState = TRISTATE_FALSE;
mnMenuButtonWidth = TB_MENUBUTTON_SIZE;
@@ -1737,7 +1737,7 @@ void ToolBox::SetDropdownClickHdl( const Link<ToolBox *, void>& rLink )
}
}
-void ToolBox::SetMenuType( sal_uInt16 aType )
+void ToolBox::SetMenuType( ToolBoxMenuType aType )
{
if( aType != mpData->maMenuType )
{
@@ -1747,7 +1747,7 @@ void ToolBox::SetMenuType( sal_uInt16 aType )
// the menu button may have to be moved into the decoration which changes the layout
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
if( pWrapper )
- pWrapper->ShowTitleButton( TitleButton::Menu, ( aType & TOOLBOX_MENUTYPE_CUSTOMIZE) != 0 );
+ pWrapper->ShowTitleButton( TitleButton::Menu, bool( aType & ToolBoxMenuType::Customize) );
mbFormat = true;
ImplFormat();
@@ -1762,14 +1762,14 @@ void ToolBox::SetMenuType( sal_uInt16 aType )
}
}
-sal_uInt16 ToolBox::GetMenuType() const
+ToolBoxMenuType ToolBox::GetMenuType() const
{
return mpData->maMenuType;
}
bool ToolBox::IsMenuEnabled() const
{
- return mpData->maMenuType != TOOLBOX_MENUTYPE_NONE;
+ return mpData->maMenuType != ToolBoxMenuType::NONE;
}
PopupMenu* ToolBox::GetMenu() const
@@ -1894,7 +1894,7 @@ void ToolBox::ImplExecuteCustomMenu()
{
if( IsMenuEnabled() )
{
- if( GetMenuType() & TOOLBOX_MENUTYPE_CUSTOMIZE )
+ if( GetMenuType() & ToolBoxMenuType::Customize )
// call button handler to allow for menu customization
mpData->maMenuButtonHdl.Call( this );