diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-26 17:23:38 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-27 11:05:38 +0300 |
commit | 853c9efd00f38fd9f2da0fe50a866bf1592e3451 (patch) | |
tree | 9440f5dce3f48db6d5643740fd177e043939a58a /framework | |
parent | 729c2cd35133eeef78ff0fed063094088809b211 (diff) |
MenuBarManager should pass the menubar flag down
... to popup menu controllers it creates, similar to what
is does for child MenuBarManager instances. That way a
child ResourceMenuController placed inside a popup menu
won't mistakenly think it's inside the main menu.
Change-Id: I75eea28eeb38f16bfaaa5526752a957859ef0d32
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 9817197e77dd..b167d71a04e3 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -53,6 +53,7 @@ #include <com/sun/star/util/URLTransformer.hpp> #include <comphelper/processfactory.hxx> +#include <comphelper/propertyvalue.hxx> #include <comphelper/extract.hxx> #include <svtools/menuoptions.hxx> #include <svtools/javainteractionhandler.hxx> @@ -1103,15 +1104,10 @@ bool MenuBarManager::CreatePopupMenuController( MenuItemHandler* pMenuItemHandle if ( !m_xPopupMenuControllerFactory.is() ) return false; - Sequence< Any > aSeq( 2 ); - PropertyValue aPropValue; - - aPropValue.Name = "ModuleIdentifier"; - aPropValue.Value <<= m_aModuleIdentifier; - aSeq[0] <<= aPropValue; - aPropValue.Name = "Frame"; - aPropValue.Value <<= m_xFrame; - aSeq[1] <<= aPropValue; + Sequence< Any > aSeq( 3 ); + aSeq[0] <<= comphelper::makePropertyValue( "ModuleIdentifier", m_aModuleIdentifier ); + aSeq[1] <<= comphelper::makePropertyValue( "Frame", m_xFrame ); + aSeq[2] <<= comphelper::makePropertyValue( "InToolbar", !m_bHasMenuBar ); Reference< XPopupMenuController > xPopupMenuController( m_xPopupMenuControllerFactory->createInstanceWithArgumentsAndContext( |