summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-12-13 14:09:18 +0000
committerKurt Zenker <kz@openoffice.org>2006-12-13 14:09:18 +0000
commit6b1777244707aef3ca03ff1d58ba0a131341e42c (patch)
tree42429297595fbe5502caf75e72522db36fefafa8 /framework
parent4f600c3535b7411ad22bdb2353b3a8f0d4d347ac (diff)
INTEGRATION: CWS fwk54 (1.8.14); FILE MERGED
2006/11/10 14:11:24 cd 1.8.14.2: RESYNC: (1.8-1.9); FILE MERGED 2006/11/10 12:56:40 cd 1.8.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/newmenucontroller.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 9625d2a810c8..2223327d8906 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: newmenucontroller.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: obo $ $Date: 2006-10-12 10:43:32 $
+ * last change: $Author: kz $ $Date: 2006-12-13 15:09:18 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -161,7 +161,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage
for ( USHORT i = 0; i < nItemCount; i++ )
{
- USHORT nItemId = pPopupMenu->GetItemId( i );
+ USHORT nItemId = pPopupMenu->GetItemId( sal::static_int_cast<USHORT>( i ));
if ( nItemId != 0 )
{
if ( bSetImages )
@@ -433,7 +433,7 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopup
// store it in a hash_map.
for ( USHORT i = 0; i < pSubMenu->GetItemCount(); i++ )
{
- USHORT nItemId = pSubMenu->GetItemId( i );
+ USHORT nItemId = pSubMenu->GetItemId( sal::static_int_cast<USHORT>( i ) );
if (( nItemId != 0 ) &&
( pSubMenu->GetItemType( nItemId ) != MENUITEM_SEPARATOR ))
{
@@ -463,6 +463,7 @@ void SAL_CALL NewMenuController::disposing( const EventObject& ) throw ( Runtime
ResetableGuard aLock( m_aLock );
m_xFrame.clear();
m_xDispatch.clear();
+ m_xServiceManager.clear();
if ( m_xPopupMenu.is() )
m_xPopupMenu->removeMenuListener( Reference< css::awt::XMenuListener >(( OWeakObject *)this, UNO_QUERY ));
@@ -572,6 +573,9 @@ void SAL_CALL NewMenuController::setPopupMenu( const Reference< css::awt::XPopup
{
ResetableGuard aLock( m_aLock );
+ if ( m_bDisposed )
+ throw DisposedException();
+
if ( m_xFrame.is() && !m_xPopupMenu.is() )
{
// Create popup menu on demand
@@ -631,6 +635,9 @@ void SAL_CALL NewMenuController::setPopupMenu( const Reference< css::awt::XPopup
void SAL_CALL NewMenuController::updatePopupMenu() throw (RuntimeException)
{
+ ResetableGuard aLock( m_aLock );
+ if ( m_bDisposed )
+ throw DisposedException();
}
// XInitialization