From e085eb10a95a0e37d66cf1ac0f76862efec51843 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Wed, 13 Dec 2006 14:10:07 +0000 Subject: INTEGRATION: CWS fwk54 (1.17.14); FILE MERGED 2006/11/10 12:56:40 cd 1.17.14.1: #i65187# Extended base class and adapt popup menu controllers to be testtool compliant --- framework/source/uielement/toolbarsmenucontroller.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'framework/source/uielement/toolbarsmenucontroller.cxx') diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index c058c5a532ce..52623d50bb38 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -4,9 +4,9 @@ * * $RCSfile: toolbarsmenucontroller.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: obo $ $Date: 2006-09-16 14:26:06 $ + * last change: $Author: kz $ $Date: 2006-12-13 15:10:07 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -625,6 +625,7 @@ void SAL_CALL ToolbarsMenuController::disposing( const EventObject& ) throw ( Ru m_xDispatch.clear(); m_xDocCfgMgr.clear(); m_xModuleCfgMgr.clear(); + m_xServiceManager.clear(); if ( m_xPopupMenu.is() ) m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(( OWeakObject *)this, UNO_QUERY )); @@ -893,6 +894,10 @@ void SAL_CALL ToolbarsMenuController::deactivate( const css::awt::MenuEvent& ) t void SAL_CALL ToolbarsMenuController::setPopupMenu( const Reference< css::awt::XPopupMenu >& xPopupMenu ) throw ( RuntimeException ) { ResetableGuard aLock( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + if ( m_xFrame.is() && !m_xPopupMenu.is() ) { // Create popup menu on demand @@ -934,7 +939,9 @@ void SAL_CALL ToolbarsMenuController::initialize( const Sequence< Any >& aArgume { m_xFrame = xFrame; m_aCommandURL = aCommandURL; - m_bInitialized = sal_True; + m_bInitialized = true; + + m_aBaseURL = determineBaseURL( aCommandURL ); Reference< XModuleManager > xModuleManager( m_xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), -- cgit