framework/source/uielement/menubarmanager.cxx | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-)
New commits: commit 85071c6c7b120935b03926228916393a94aa5ef0 Author: Caolán McNamara <caol...@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 <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@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);
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits