[Libreoffice-commits] core.git: framework/source
Caolán McNamara
caolanm at redhat.com
Mon Feb 29 09:40:28 UTC 2016
framework/source/uielement/menubarmanager.cxx | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
New commits:
commit 85071c6c7b120935b03926228916393a94aa5ef0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 28 20:27:43 2016 +0000
language submenu from tools->language->for selection->"languages"...
is always disabled/empty since...
commit a6e8910a3c5d33e671a13559438b7228596b8bca
Date: Wed Feb 17 12:07:59 2016 +0100
allow disabling file/new, wizards, recent documents menu entries
disabling the dispatches '.uno:AutoPilotMenu' and '.uno:AddDirect' and
.uno:RecentFileList via UNO API now results in disabled
menu entries as expected
Change-Id: Id99be9374306ff8c0cea919ea94ed96f715a8058
Reviewed-on: https://gerrit.libreoffice.org/22422
reverting this hunk restores them again
Change-Id: I029c9c3f25fb593127ee8371b278cee102c65882
Reviewed-on: https://gerrit.libreoffice.org/22749
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index e81b580..a5ebea7 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -860,21 +860,18 @@ IMPL_LINK_TYPED( MenuBarManager, Activate, Menu *, pMenu, bool )
xMenuItemDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
bool bPopupMenu( false );
- if(xMenuItemDispatch != nullptr)
+ if ( !pMenuItemHandler->xPopupMenuController.is() &&
+ m_xPopupMenuControllerFactory->hasController( pMenuItemHandler->aMenuItemURL, m_aModuleIdentifier ) )
{
- if ( !pMenuItemHandler->xPopupMenuController.is() &&
- m_xPopupMenuControllerFactory->hasController( pMenuItemHandler->aMenuItemURL, m_aModuleIdentifier ) )
- {
- bPopupMenu = CreatePopupMenuController( pMenuItemHandler );
- }
- else if ( pMenuItemHandler->xPopupMenuController.is() )
- {
- // Force update of popup menu
- pMenuItemHandler->xPopupMenuController->updatePopupMenu();
- bPopupMenu = true;
- if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( pMenuItemHandler->nItemId ))
- pMenu->EnableItem( pMenuItemHandler->nItemId, pThisPopup->GetItemCount() != 0 );
- }
+ bPopupMenu = CreatePopupMenuController( pMenuItemHandler );
+ }
+ else if ( pMenuItemHandler->xPopupMenuController.is() )
+ {
+ // Force update of popup menu
+ pMenuItemHandler->xPopupMenuController->updatePopupMenu();
+ bPopupMenu = true;
+ if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( pMenuItemHandler->nItemId ))
+ pMenu->EnableItem( pMenuItemHandler->nItemId, pThisPopup->GetItemCount() != 0 );
}
lcl_CheckForChildren(pMenu, pMenuItemHandler->nItemId);
More information about the Libreoffice-commits
mailing list