diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-02-02 19:43:27 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-02-02 19:43:27 +0000 |
commit | ac9fcaaa9d637c9edcbf946ac0ff3251fcfa11b1 (patch) | |
tree | 19b3a4d67f428f5b8dc6aaa74dd229a0c80b25f6 /dtrans/source/win32/clipb/WinClipboard.cxx | |
parent | 786dce418f2eb0a8f95e501cdc17b0f186b30c17 (diff) |
INTEGRATION: CWS geordi2q14 (1.11.12); FILE MERGED
2004/02/02 14:44:27 hr 1.11.12.1: #111934#: merge CWS trapp2
Diffstat (limited to 'dtrans/source/win32/clipb/WinClipboard.cxx')
-rw-r--r-- | dtrans/source/win32/clipb/WinClipboard.cxx | 47 |
1 files changed, 27 insertions, 20 deletions
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<XTransferable> rXTransf(m_pImpl->getContents()); + ClipboardEvent aClipbEvent(static_cast<XClipboard*>(this), rXTransf); + + while(iter.hasMoreElements()) { - OSL_ENSURE( false, "Exception during event dispatching" ); + try + { + Reference<XClipboardListener> 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 |