diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-09-01 10:19:04 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-09-01 09:39:52 +0000 |
commit | 671ac3a9221598febdc6304fceabbb2ade86f41e (patch) | |
tree | f9561e28ab36d4c9813698d233c02e7e4b62075a | |
parent | 662f5a5a16339ecda071ea6b95afefeea63c4fe9 (diff) |
Looks like the menu highlight handler is now unused
Change-Id: I75ff4bce35e7940e07b760f672e08ffe0dd208f8
Reviewed-on: https://gerrit.libreoffice.org/28580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
-rw-r--r-- | compilerplugins/clang/store/constantfunction.cxx | 4 | ||||
-rw-r--r-- | framework/inc/uielement/menubarmanager.hxx | 1 | ||||
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 6 | ||||
-rw-r--r-- | include/vcl/menu.hxx | 9 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 16 |
5 files changed, 1 insertions, 35 deletions
diff --git a/compilerplugins/clang/store/constantfunction.cxx b/compilerplugins/clang/store/constantfunction.cxx index 538191544f80..fd429ac686fc 100644 --- a/compilerplugins/clang/store/constantfunction.cxx +++ b/compilerplugins/clang/store/constantfunction.cxx @@ -427,10 +427,6 @@ bool ConstantFunction::VisitFunctionDecl(const FunctionDecl * pFunctionDecl) { { return true; } - // LINK callback which supplies a return value which means something - if (aFunctionName == "framework::MenuBarManager::Highlight") { - return true; - } if (aFunctionName == "sc::AlignedAllocator::operator!=") { return true; } diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx index 6e9920d231c0..0fe3db5b185c 100644 --- a/framework/inc/uielement/menubarmanager.hxx +++ b/framework/inc/uielement/menubarmanager.hxx @@ -152,7 +152,6 @@ class MenuBarManager : public css::frame::XStatusListener , void GetPopupController( PopupControllerCache& rPopupController ); protected: - DECL_LINK_TYPED(Highlight, Menu *, bool); DECL_LINK_TYPED( Activate, Menu *, bool ); DECL_LINK_TYPED( Deactivate, Menu *, bool ); DECL_LINK_TYPED( AsyncSettingsHdl, Timer *, void ); diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 6379451cfc84..af030ff3fc0a 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1033,11 +1033,6 @@ IMPL_LINK_TYPED( MenuBarManager, Select, Menu *, pMenu, bool ) return true; } -IMPL_LINK_NOARG_TYPED(MenuBarManager, Highlight, Menu *, bool) -{ - return false; -} - bool MenuBarManager::MustBeHidden( PopupMenu* pPopupMenu, const Reference< XURLTransformer >& rTransformer ) { if ( pPopupMenu ) @@ -1973,7 +1968,6 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,Menu* pAddonMenu,boo void MenuBarManager::SetHdl() { - m_pVCLMenu->SetHighlightHdl( LINK( this, MenuBarManager, Highlight )); m_pVCLMenu->SetActivateHdl( LINK( this, MenuBarManager, Activate )); m_pVCLMenu->SetDeactivateHdl( LINK( this, MenuBarManager, Deactivate )); m_pVCLMenu->SetSelectHdl( LINK( this, MenuBarManager, Select )); diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 989d852f0a6f..efb55d52b65a 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -140,8 +140,7 @@ private: Link<Menu*, bool> aActivateHdl; // Active-Handler Link<Menu*, bool> aDeactivateHdl; // Deactivate-Handler - Link<Menu*, bool> aHighlightHdl; // Highlight-Handler - Link<Menu*, bool> aSelectHdl; // Highlight-Handler + Link<Menu*, bool> aSelectHdl; // Select-Handler std::list<Link<VclMenuEvent&,void> > maEventListeners; @@ -235,7 +234,6 @@ public: void Activate(); void Deactivate(); - virtual void Highlight(); virtual void Select(); void InsertItem(sal_uInt16 nItemId, const OUString& rStr, @@ -344,11 +342,6 @@ public: aDeactivateHdl = rLink; } - void SetHighlightHdl( const Link<Menu *, bool>& rLink ) - { - aHighlightHdl = rLink; - } - void SetSelectHdl( const Link<Menu*,bool>& rLink ) { aSelectHdl = rLink; diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index c82ecf55ef0e..ee20cecb62c1 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -271,18 +271,6 @@ void Menu::Deactivate() } } -void Menu::Highlight() -{ - ImplMenuDelData aDelData( this ); - - Menu* pStartMenu = ImplGetStartMenu(); - if ( !aHighlightHdl.Call( this ) && !aDelData.isDeleted() ) - { - if ( pStartMenu && ( pStartMenu != this ) ) - pStartMenu->aHighlightHdl.Call( this ); - } -} - void Menu::ImplSelect() { MenuItemData* pData = GetItemList()->GetData( nSelectedId ); @@ -1229,7 +1217,6 @@ Menu& Menu::operator=( const Menu& rMenu ) nDefaultItem = rMenu.nDefaultItem; aActivateHdl = rMenu.aActivateHdl; aDeactivateHdl = rMenu.aDeactivateHdl; - aHighlightHdl = rMenu.aHighlightHdl; aSelectHdl = rMenu.aSelectHdl; aTitleText = rMenu.aTitleText; nTitleHeight = rMenu.nTitleHeight; @@ -2166,10 +2153,7 @@ void Menu::ImplCallHighlight(sal_uInt16 nItem) ImplCallEventListeners( VCLEVENT_MENU_HIGHLIGHT, GetItemPos( GetCurItemId() ) ); if( !aDelData.isDeleted() ) - { - Highlight(); nSelectedId = 0; - } } IMPL_LINK_NOARG_TYPED(Menu, ImplCallSelect, void*, void) |