diff options
author | Tino Rachui <tra@openoffice.org> | 2001-07-24 06:53:23 +0000 |
---|---|---|
committer | Tino Rachui <tra@openoffice.org> | 2001-07-24 06:53:23 +0000 |
commit | ee9f84599b0315f6cebbc9022a246786cf37d7c9 (patch) | |
tree | 746c84834eb5d3482b0e0854eca1ead8b88242ed /dtrans | |
parent | e29cd64b27dcd2f90304d6b73ac5a60b55fc1743 (diff) |
#90097#cross reference in add/removeClipboardListener removed, no queryInterface anymore in this methods
Diffstat (limited to 'dtrans')
-rw-r--r-- | dtrans/source/win32/clipb/WinClipboard.cxx | 33 | ||||
-rw-r--r-- | dtrans/source/win32/clipb/WinClipboard.hxx | 18 |
2 files changed, 9 insertions, 42 deletions
diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx index 052191f6a499..004ccaffc470 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.9 $ + * $Revision: 1.10 $ * - * last change: $Author: tra $ $Date: 2001-03-19 09:10:17 $ + * last change: $Author: tra $ $Date: 2001-07-24 07:53:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -124,9 +124,9 @@ namespace //------------------------------------------------------------------------ // ctor //------------------------------------------------------------------------ - +/*XEventListener,*/ CWinClipboard::CWinClipboard( const Reference< XMultiServiceFactory >& rServiceManager, const OUString& aClipboardName ) : - WeakComponentImplHelper5< XClipboardEx, XFlushableClipboard, XClipboardNotifier, XEventListener, XServiceInfo >( m_aCbListenerMutex ), + WeakComponentImplHelper4< XClipboardEx, XFlushableClipboard, XClipboardNotifier, XServiceInfo >( m_aCbListenerMutex ), m_SrvMgr( rServiceManager ) { m_pImpl.reset( new CWinClipbImpl( aClipboardName, this ) ); @@ -246,13 +246,6 @@ void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardLi static_cast< XClipboardEx* >( this ), 1 ); - // if the listener supports XComponent then we will register - // as a listener so that we can remove the listener from our - // list in case of disposing if not already done - Reference< XComponent > xComponent( listener, UNO_QUERY ); - if ( xComponent.is( ) ) - xComponent->addEventListener( static_cast< XEventListener* >(this) ); - rBHelper.aLC.addInterface( getCppuType( &listener ), listener ); } @@ -273,12 +266,6 @@ void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboar static_cast< XClipboardEx* >( this ), 1 ); - // remove ourself as an eventlistener from this component if - // it supports XComponent - Reference< XComponent > xComponent( listener, UNO_QUERY ); - if ( xComponent.is( ) ) - xComponent->removeEventListener( static_cast< XEventListener* >(this) ); - rBHelper.aLC.removeInterface( getCppuType( &listener ), listener ); } @@ -341,18 +328,6 @@ void SAL_CALL CWinClipboard::disposing() } // ------------------------------------------------- -// XEventListener -// ------------------------------------------------- - -void SAL_CALL CWinClipboard::disposing( const EventObject& aEvent ) throw(RuntimeException) -{ - Reference< XClipboardListener > xClipboardListener( aEvent.Source, UNO_QUERY ); - - if ( xClipboardListener.is( ) ) - removeClipboardListener( xClipboardListener ); -} - -// ------------------------------------------------- // XServiceInfo // ------------------------------------------------- diff --git a/dtrans/source/win32/clipb/WinClipboard.hxx b/dtrans/source/win32/clipb/WinClipboard.hxx index a412312c94e0..2a7acfa0e1eb 100644 --- a/dtrans/source/win32/clipb/WinClipboard.hxx +++ b/dtrans/source/win32/clipb/WinClipboard.hxx @@ -2,9 +2,9 @@ * * $RCSfile: WinClipboard.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: tra $ $Date: 2001-03-19 09:10:17 $ + * last change: $Author: tra $ $Date: 2001-07-24 07:53:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,8 +76,8 @@ #include <sal/types.h> #endif -#ifndef _CPPUHELPER_COMPBASE5_HXX_ -#include <cppuhelper/compbase5.hxx> +#ifndef _CPPUHELPER_COMPBASE4_HXX_ +#include <cppuhelper/compbase4.hxx> #endif #ifndef _COM_SUN_STAR_DATATRANSFER_XTRANSFERABLE_HPP_ @@ -140,11 +140,10 @@ protected: class CWinClipboard : public CWinClipboardDummy, - public cppu::WeakComponentImplHelper5< + public cppu::WeakComponentImplHelper4< ::com::sun::star::datatransfer::clipboard::XClipboardEx, \ ::com::sun::star::datatransfer::clipboard::XFlushableClipboard, ::com::sun::star::datatransfer::clipboard::XClipboardNotifier, - ::com::sun::star::lang::XEventListener, ::com::sun::star::lang::XServiceInfo > { public: @@ -198,13 +197,6 @@ public: virtual void SAL_CALL disposing(); //------------------------------------------------ - // XEventListener - //------------------------------------------------ - - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) - throw(::com::sun::star::uno::RuntimeException); - - //------------------------------------------------ // XServiceInfo //------------------------------------------------ |