Kaydet (Commit) 8b7c82bc authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky Kaydeden (comit) Andras Timar

tdf#76197 Make OfficeMenuBar work again in the start center

Regression of 46666a77.
The code in MenuBarManager::FillMenuManager merges the
addon menu before .uno:WindowList, which doesn't exist
in the start center since that commit.

As a last resort, let's also check for .uno:HelpMenu
(assuming that it's never placed before the Window menu).

Change-Id: If45eebe4351c40d8ed69daba527844ffc02e8458
Reviewed-on: https://gerrit.libreoffice.org/18729Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarJan Holesovsky <kendy@collabora.com>
(cherry picked from commit f30206f6)
üst ca49de59
...@@ -1138,7 +1138,8 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF ...@@ -1138,7 +1138,8 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
{ {
sal_uInt16 nItemId = pMenu->GetItemId( nPos ); sal_uInt16 nItemId = pMenu->GetItemId( nPos );
OUString aCommand = pMenu->GetItemCommand( nItemId ); OUString aCommand = pMenu->GetItemCommand( nItemId );
if ( nItemId == SID_MDIWINDOWLIST || aCommand == aSpecialWindowCommand) if ( nItemId == SID_MDIWINDOWLIST || aCommand == aSpecialWindowCommand ||
nItemId == SID_HELPMENU || aCommand == aCmdHelpMenu )
{ {
// Retrieve addon popup menus and add them to our menu bar // Retrieve addon popup menus and add them to our menu bar
framework::AddonMenuManager::MergeAddonPopupMenus( rFrame, nPos, static_cast<MenuBar *>(pMenu), m_xContext ); framework::AddonMenuManager::MergeAddonPopupMenus( rFrame, nPos, static_cast<MenuBar *>(pMenu), m_xContext );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment