summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-12-13 14:08:23 +0000
committerKurt Zenker <kz@openoffice.org>2006-12-13 14:08:23 +0000
commite27509e48a4d1b252c9e17d627ae5d5becf8101d (patch)
tree53a1903491b4c1a36c22217c5f9bb49252c7d745 /framework
parentf1e21c23d6d7fe3b5817259ed4f5dcdbb1252a42 (diff)
INTEGRATION: CWS fwk54 (1.9.14); FILE MERGED
2006/11/10 12:56:39 cd 1.9.14.1: #i65187# Extended base class and adapt popup menu controllers to be testtool compliant
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx42
1 files changed, 9 insertions, 33 deletions
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index 75c037358f7c..ae42ce15feba 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: macrosmenucontroller.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: obo $ $Date: 2006-09-16 14:21:47 $
+ * last change: $Author: kz $ $Date: 2006-12-13 15:08:23 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -89,8 +89,8 @@ MacrosMenuController::~MacrosMenuController()
// private function
void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopupMenu )
{
- VCLXPopupMenu* pVCLPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( rPopupMenu );
- PopupMenu* pPopupMenu = 0;
+ VCLXPopupMenu* pVCLPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( rPopupMenu );
+ PopupMenu* pPopupMenu = 0;
vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
@@ -119,6 +119,7 @@ void SAL_CALL MacrosMenuController::disposing( const EventObject& ) throw ( Runt
OSL_TRACE("disposing");
m_xFrame.clear();
m_xDispatch.clear();
+ m_xServiceManager.clear();
if ( m_xPopupMenu.is() )
{
@@ -224,6 +225,9 @@ void SAL_CALL MacrosMenuController::setPopupMenu( const Reference< css::awt::XPo
{
ResetableGuard aLock( m_aLock );
+ if ( m_bDisposed )
+ throw DisposedException();
+
if ( m_xFrame.is() && !m_xPopupMenu.is() )
{
// Create popup menu on demand
@@ -250,35 +254,7 @@ void SAL_CALL MacrosMenuController::setPopupMenu( const Reference< css::awt::XPo
// XInitialization
void SAL_CALL MacrosMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
{
- const rtl::OUString aFrameName( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
- const rtl::OUString aCommandURLName( RTL_CONSTASCII_USTRINGPARAM( "CommandURL" ));
-
- ResetableGuard aLock( m_aLock );
-
- sal_Bool bInitalized( m_bInitialized );
- if ( !bInitalized )
- {
- PropertyValue aPropValue;
- rtl::OUString aCommandURL;
- Reference< XFrame > xFrame;
-
- for ( int i = 0; i < aArguments.getLength(); i++ )
- {
- if ( aArguments[i] >>= aPropValue )
- {
- if ( aPropValue.Name.equalsAscii( "Frame" ))
- aPropValue.Value >>= xFrame;
- else if ( aPropValue.Name.equalsAscii( "CommandURL" ))
- aPropValue.Value >>= aCommandURL;
- }
- }
- if ( xFrame.is() && aCommandURL.getLength() )
- {
- m_xFrame = xFrame;
- m_aCommandURL = aCommandURL;
- m_bInitialized = sal_True;
- }
- }
+ PopupMenuControllerBase::initialize( aArguments );
}
String MacrosMenuController::RetrieveLabelFromCommand( const String& aCmdURL )