summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorAntonio Fernandez <antonio.fernandez@aentos.es>2012-07-19 17:40:17 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-11-14 13:52:39 +0100
commita09c7f8e2b4d717bb488040ca096ee79c3e07609 (patch)
tree62e2f655db4f0e38b87576e5425088ed18a17acc /framework
parent8dfd4a3a342dcd4ccc1cd8cdf874cf322422962f (diff)
Added a "freeze" method to Menu. Menus are now displayed on console.
Change-Id: I71bfc2c0272154b9ff5c2dabe7508a98950e199c
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/menubarmanager.cxx5
-rw-r--r--framework/source/uielement/menubarwrapper.cxx4
2 files changed, 8 insertions, 1 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 5afca6a5d874..66a34671fae3 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1047,6 +1047,9 @@ IMPL_LINK( MenuBarManager, Deactivate, AbstractMenu *, pMenu )
}
}
+// pMenu->Freeze();
+ m_pVCLMenu->Freeze();
+
return 1;
}
@@ -1726,7 +1729,7 @@ void MenuBarManager::FillMenu(
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::FillMenu" );
// Fill menu bar with container contents
- for ( sal_Int32 n = 0; n < rItemContainer->getCount(); n++ )
+ for ( sal_Int32 n = 0; n < rItemContainer->getCount(); n++ )
{
Sequence< PropertyValue > aProp;
rtl::OUString aCommandURL;
diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx
index cc7032a37bec..302ab7200412 100644
--- a/framework/source/uielement/menubarwrapper.cxx
+++ b/framework/source/uielement/menubarwrapper.cxx
@@ -167,6 +167,7 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th
// Fill menubar with container contents
sal_uInt16 nId = 1;
MenuBarManager::FillMenuWithConfiguration( nId, pVCLMenuBar, aModuleIdentifier, m_xConfigData, xTrans );
+// pVCLMenuBar->Freeze();
}
}
catch ( const NoSuchElementException& )
@@ -208,6 +209,9 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th
// Don't use this toolkit menu bar or one of its functions. It is only used as a data container!
pAwtMenuBar = new VCLXMenuBar( pVCLMenuBar );
m_xMenuBar = Reference< XMenuBar >( static_cast< OWeakObject *>( pAwtMenuBar ), UNO_QUERY );
+
+ // Freeze the menubar
+ pVCLMenuBar->Freeze();
}
}
}