[Libreoffice-commits] core.git: compilerplugins/clang framework/inc framework/source include/vcl vcl/source
Maxim Monastirsky
momonasmon at gmail.com
Thu Sep 1 09:40:19 UTC 2016
compilerplugins/clang/store/constantfunction.cxx | 4 ----
framework/inc/uielement/menubarmanager.hxx | 1 -
framework/source/uielement/menubarmanager.cxx | 6 ------
include/vcl/menu.hxx | 9 +--------
vcl/source/window/menu.cxx | 16 ----------------
5 files changed, 1 insertion(+), 35 deletions(-)
New commits:
commit 671ac3a9221598febdc6304fceabbb2ade86f41e
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Thu Sep 1 10:19:04 2016 +0300
Looks like the menu highlight handler is now unused
Change-Id: I75ff4bce35e7940e07b760f672e08ffe0dd208f8
Reviewed-on: https://gerrit.libreoffice.org/28580
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
diff --git a/compilerplugins/clang/store/constantfunction.cxx b/compilerplugins/clang/store/constantfunction.cxx
index 5381915..fd429ac 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 6e9920d..0fe3db5 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 6379451..af030ff 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 989d852..efb55d5 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 c82ecf5..ee20cec 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)
More information about the Libreoffice-commits
mailing list