[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - framework/source
Caolán McNamara
caolanm at redhat.com
Tue Mar 1 11:35:23 UTC 2016
framework/source/uielement/menubarmanager.cxx | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
New commits:
commit 42ac7f9cdbf66414cf03657470c2f684836184f4
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/22750
Reviewed-by: Oliver Specht <oliver.specht at cib.de>
Tested-by: Oliver Specht <oliver.specht at cib.de>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit d7955212492009976764d701bf789e76f5fdfa4a)
Reviewed-on: https://gerrit.libreoffice.org/22760
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index d66f20b..13e145f 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -872,22 +872,20 @@ 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( aItemCommand, m_aModuleIdentifier ) )
{
- if ( !pMenuItemHandler->xPopupMenuController.is() &&
- m_xPopupMenuControllerFactory->hasController( aItemCommand, 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);
if ( xMenuItemDispatch.is() )
More information about the Libreoffice-commits
mailing list