diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-14 15:28:57 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-15 10:05:02 +0200 |
commit | d93915b2aeabbde90b7eb539116b9be49e0d1a5c (patch) | |
tree | 0d28a83b9c4633b979c46d8ce6b6054748fa8d13 /vcl | |
parent | 4f4cff08aac32db6fa580423b5fde661c8b0743a (diff) |
conver MENU_FLAG_ constants to scoped enum
Change-Id: I969d99fa8881cc89601696a2d8621905a82b147b
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/edit.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 18 | ||||
-rw-r--r-- | vcl/source/window/menuitemlist.hxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 3ff87466a41f..227c7fe63cb4 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -2848,9 +2848,9 @@ PopupMenu* Edit::CreatePopupMenu() PopupMenu* pPopup = new PopupMenu( ResId( SV_RESID_MENU_EDIT, *pResMgr ) ); const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); if ( rStyleSettings.GetHideDisabledMenuItems() ) - pPopup->SetMenuFlags( MENU_FLAG_HIDEDISABLEDENTRIES ); + pPopup->SetMenuFlags( MenuFlags::HideDisabledEntries ); else - pPopup->SetMenuFlags ( MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES ); + pPopup->SetMenuFlags ( MenuFlags::AlwaysShowDisabledEntries ); if ( rStyleSettings.GetAcceleratorsInContextMenus() ) { pPopup->SetAccelKey( SV_MENU_EDIT_UNDO, vcl::KeyCode( KeyFuncType::UNDO ) ); diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index d2d45d7b9d8d..1f563b69f4f7 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -122,7 +122,7 @@ Menu::Menu() nTitleHeight(0), nEventId(0), mnHighlightedItemPos(ITEMPOS_INVALID), - nMenuFlags(0), + nMenuFlags(MenuFlags::NONE), nDefaultItem(0), nSelectedId(0), nImgOrChkPos(0), @@ -1324,8 +1324,8 @@ bool Menu::ImplIsVisible( sal_uInt16 nPos ) const // not allowed for menubar, as I do not know // whether a menu-entry will disappear or will appear - if (bVisible && !IsMenuBar() && (nMenuFlags & MENU_FLAG_HIDEDISABLEDENTRIES) && - !(nMenuFlags & MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES)) + if (bVisible && !IsMenuBar() && (nMenuFlags & MenuFlags::HideDisabledEntries) && + !(nMenuFlags & MenuFlags::AlwaysShowDisabledEntries)) { if( !pData ) // e.g. nPos == ITEMPOS_INVALID bVisible = false; @@ -2953,17 +2953,17 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa if ( !GetItemCount() ) return 0; - // The flag MENU_FLAG_HIDEDISABLEDENTRIES is inherited. + // The flag MenuFlags::HideDisabledEntries is inherited. if ( pSFrom ) { - if ( pSFrom->nMenuFlags & MENU_FLAG_HIDEDISABLEDENTRIES ) - nMenuFlags |= MENU_FLAG_HIDEDISABLEDENTRIES; + if ( pSFrom->nMenuFlags & MenuFlags::HideDisabledEntries ) + nMenuFlags |= MenuFlags::HideDisabledEntries; else - nMenuFlags &= ~MENU_FLAG_HIDEDISABLEDENTRIES; + nMenuFlags &= ~MenuFlags::HideDisabledEntries; } else // #102790# context menus shall never show disabled entries - nMenuFlags |= MENU_FLAG_HIDEDISABLEDENTRIES; + nMenuFlags |= MenuFlags::HideDisabledEntries; sal_uInt16 nVisibleEntries = ImplGetVisibleItemCount(); if ( !nVisibleEntries ) @@ -2984,7 +2984,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa ImplCallEventListeners(VCLEVENT_MENU_SUBMENUCHANGED, nPos); } } - else if ( Application::GetSettings().GetStyleSettings().GetAutoMnemonic() && !( nMenuFlags & MENU_FLAG_NOAUTOMNEMONICS ) ) + else if ( Application::GetSettings().GetStyleSettings().GetAutoMnemonic() && !( nMenuFlags & MenuFlags::NoAutoMnemonics ) ) { CreateAutoMnemonics(); } diff --git a/vcl/source/window/menuitemlist.hxx b/vcl/source/window/menuitemlist.hxx index 699ece3e646c..6f2b2631bdef 100644 --- a/vcl/source/window/menuitemlist.hxx +++ b/vcl/source/window/menuitemlist.hxx @@ -48,7 +48,7 @@ struct MenuItemData vcl::KeyCode aAccelKey; // Accelerator-Key bool bChecked; // Checked bool bEnabled; // Enabled - bool bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true) + bool bVisible; // Visible (note: this flag will not override MenuFlags::HideDisabledEntries when true) bool bIsTemporary; // Temporary inserted ('No selection possible') bool bMirrorMode; long nItemImageAngle; diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index f6f3dab8790f..00445e64cec9 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1889,7 +1889,7 @@ void ToolBox::ImplExecuteCustomMenu() // make sure all disabled entries will be shown GetMenu()->SetMenuFlags( - GetMenu()->GetMenuFlags() | MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES ); + GetMenu()->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries ); // toolbox might be destroyed during execute ImplDelData aDelData; |