summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-04-06 16:18:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-04-06 16:18:41 +0100
commit95b720f6d7ba2639c06ba07c3f70aca871a45950 (patch)
tree97654e80487679996736354f9dcbb6baf62ee460 /framework
parentd02a015593fc129d55e03e2b6d4caacd4e6d3787 (diff)
revert to fix tdf#98783 missing menubar
Change-Id: Ia322149a7ed461f528af856d9907fe4620f9e97f
Diffstat (limited to 'framework')
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx4
-rw-r--r--framework/source/uielement/menubarwrapper.cxx28
-rw-r--r--framework/source/uifactory/menubarfactory.cxx11
3 files changed, 15 insertions, 28 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index e7bbd0fdd566..e67617016cc9 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -726,13 +726,11 @@ Reference< XUIElement > LayoutManager::implts_createElement( const OUString& aNa
Reference< ui::XUIElement > xUIElement;
SolarMutexGuard g;
- Sequence< PropertyValue > aPropSeq( 3 );
+ Sequence< PropertyValue > aPropSeq( 2 );
aPropSeq[0].Name = "Frame";
aPropSeq[0].Value <<= m_xFrame;
aPropSeq[1].Name = "Persistent";
aPropSeq[1].Value <<= sal_True;
- aPropSeq[2].Name = "Container";
- aPropSeq[2].Value <<= m_xContainerWindow;
try
{
diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx
index 4cd67300060f..cc5820c8d59a 100644
--- a/framework/source/uielement/menubarwrapper.cxx
+++ b/framework/source/uielement/menubarwrapper.cxx
@@ -34,7 +34,6 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <vcl/svapp.hxx>
-#include "../layoutmanager/helpers.hxx"
using namespace com::sun::star;
using namespace com::sun::star::uno;
@@ -123,20 +122,6 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th
OUString aModuleIdentifier;
UIConfigElementWrapperBase::initialize( aArguments );
- bool bMenuOnly( false );
- Reference< XWindow > xContainerWindow;
- for ( sal_Int32 n = 0; n < aArguments.getLength(); n++ )
- {
- PropertyValue aPropValue;
- if ( aArguments[n] >>= aPropValue )
- {
- if ( aPropValue.Name == "MenuOnly" )
- aPropValue.Value >>= bMenuOnly;
- else if ( aPropValue.Name == "Container" )
- aPropValue.Value >>= xContainerWindow;
- }
- }
-
Reference< XFrame > xFrame( m_xWeakFrame );
if ( xFrame.is() && m_xConfigSource.is() )
{
@@ -145,7 +130,7 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th
VCLXMenuBar* pAwtMenuBar = nullptr;
{
SolarMutexGuard aSolarMutexGuard;
- pVCLMenuBar = new MenuBar(getTopSystemWindow(xContainerWindow));
+ pVCLMenuBar = new MenuBar();
}
Reference< XModuleManager2 > xModuleManager = ModuleManager::create( m_xContext );
@@ -174,6 +159,17 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th
{
}
+ bool bMenuOnly( false );
+ for ( sal_Int32 n = 0; n < aArguments.getLength(); n++ )
+ {
+ PropertyValue aPropValue;
+ if ( aArguments[n] >>= aPropValue )
+ {
+ if ( aPropValue.Name == "MenuOnly" )
+ aPropValue.Value >>= bMenuOnly;
+ }
+ }
+
if ( !bMenuOnly )
{
// Initialize menubar manager with our vcl menu bar. There are some situations where we only want to get the menu without any
diff --git a/framework/source/uifactory/menubarfactory.cxx b/framework/source/uifactory/menubarfactory.cxx
index 13025adcfff7..e9d9f79ce5ab 100644
--- a/framework/source/uifactory/menubarfactory.cxx
+++ b/framework/source/uifactory/menubarfactory.cxx
@@ -34,7 +34,6 @@
#include <rtl/ustrbuf.hxx>
using namespace com::sun::star::uno;
-using namespace com::sun::star::awt;
using namespace com::sun::star::lang;
using namespace com::sun::star::frame;
using namespace com::sun::star::beans;
@@ -75,7 +74,6 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
Reference< XUIConfigurationManager > xCfgMgr;
Reference< XUIConfigurationManager > xConfigSource;
Reference< XFrame > xFrame;
- Reference< XWindow > xContainerWindow;
OUString aResourceURL( ResourceURL );
bool bPersistent( true );
bool bExtraMode( false );
@@ -86,8 +84,6 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
Args[n].Value >>= xConfigSource;
else if ( Args[n].Name == "Frame" )
Args[n].Value >>= xFrame;
- else if ( Args[n].Name == "Container" )
- Args[n].Value >>= xContainerWindow;
else if ( Args[n].Name == "ResourceURL" )
Args[n].Value >>= aResourceURL;
else if ( Args[n].Name == "Persistent" )
@@ -133,7 +129,7 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
}
PropertyValue aPropValue;
- Sequence< Any > aPropSeq( _pExtraMode ? 6 : 5);
+ Sequence< Any > aPropSeq( _pExtraMode ? 5 : 4);
aPropValue.Name = "Frame";
aPropValue.Value <<= xFrame;
aPropSeq[0] <<= aPropValue;
@@ -146,14 +142,11 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
aPropValue.Name = "Persistent";
aPropValue.Value <<= bPersistent;
aPropSeq[3] <<= aPropValue;
- aPropValue.Name = "Container";
- aPropValue.Value <<= xContainerWindow;
- aPropSeq[4] <<= aPropValue;
if ( _pExtraMode )
{
aPropValue.Name = OUString::createFromAscii(_pExtraMode);
aPropValue.Value <<= bExtraMode;
- aPropSeq[5] <<= aPropValue;
+ aPropSeq[4] <<= aPropValue;
}
SolarMutexGuard aGuard;