From ac9fcaaa9d637c9edcbf946ac0ff3251fcfa11b1 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Mon, 2 Feb 2004 19:43:27 +0000 Subject: INTEGRATION: CWS geordi2q14 (1.11.12); FILE MERGED 2004/02/02 14:44:27 hr 1.11.12.1: #111934#: merge CWS trapp2 --- dtrans/source/win32/clipb/WinClipboard.cxx | 47 +++++++++++++++++------------- 1 file changed, 27 insertions(+), 20 deletions(-) (limited to 'dtrans') diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx index e1e50a3df006..45630c02139f 100644 --- a/dtrans/source/win32/clipb/WinClipboard.cxx +++ b/dtrans/source/win32/clipb/WinClipboard.cxx @@ -2,9 +2,9 @@ * * $RCSfile: WinClipboard.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: rt $ $Date: 2003-10-06 14:37:52 $ + * last change: $Author: hr $ $Date: 2004-02-02 20:43:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -287,27 +287,34 @@ void SAL_CALL CWinClipboard::notifyAllClipboardListener( ) if ( pICHelper ) { - OInterfaceIteratorHelper iter( *pICHelper ); - Reference< XTransferable > rXTransf = m_pImpl->getContents( ); - ClipboardEvent aClipbEvent( static_cast< XClipboard* >( this ), rXTransf ); - - while( iter.hasMoreElements( ) ) + try { - try - { - Reference< XClipboardListener > xCBListener( iter.next( ), UNO_QUERY ); - if ( xCBListener.is( ) ) - xCBListener->changedContents( aClipbEvent ); - } - catch( RuntimeException& ) - { - OSL_ENSURE( false, "RuntimeException caught" ); - } - catch( ... ) + OInterfaceIteratorHelper iter(*pICHelper); + Reference rXTransf(m_pImpl->getContents()); + ClipboardEvent aClipbEvent(static_cast(this), rXTransf); + + while(iter.hasMoreElements()) { - OSL_ENSURE( false, "Exception during event dispatching" ); + try + { + Reference xCBListener(iter.next(), UNO_QUERY); + if (xCBListener.is()) + xCBListener->changedContents(aClipbEvent); + } + catch(RuntimeException&) + { + OSL_ENSURE( false, "RuntimeException caught" ); + } } - } // while + } + catch(const ::com::sun::star::lang::DisposedException&) + { + OSL_ENSURE(false, "Service Manager disposed"); + + // no further clipboard changed notifications + m_pImpl->unregisterClipboardViewer(); + } + } // end if } // end if } // end if -- cgit