diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-17 11:38:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-17 11:38:18 +0100 |
commit | ad1390b8c278ee43430296b35d748cb8cdd4625b (patch) | |
tree | 6b09452d9f7225a0cf305645f2a28a749d5e79bb /basctl | |
parent | b33c7476e6975ecd7cfb233a7a0e8b417870bea5 (diff) |
Remove use of deprecated css::document::XEventBroadcaster/Listener
Change-Id: I178ae590fec87f53e90db5aa6e560cd146c0676b
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/doceventnotifier.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/basctl/source/basicide/doceventnotifier.cxx b/basctl/source/basicide/doceventnotifier.cxx index 9aa94f0ca3e0..95ed06fa12e2 100644 --- a/basctl/source/basicide/doceventnotifier.cxx +++ b/basctl/source/basicide/doceventnotifier.cxx @@ -22,7 +22,7 @@ #include "scriptdocument.hxx" #include <com/sun/star/frame/theGlobalEventBroadcaster.hpp> -#include <com/sun/star/document/XEventBroadcaster.hpp> +#include <com/sun/star/document/XDocumentEventBroadcaster.hpp> #include <vcl/svapp.hxx> @@ -41,9 +41,9 @@ namespace basctl { //........................................................................ - using ::com::sun::star::document::XEventBroadcaster; - using ::com::sun::star::document::XEventListener; - using ::com::sun::star::document::EventObject; + using ::com::sun::star::document::XDocumentEventBroadcaster; + using ::com::sun::star::document::XDocumentEventListener; + using ::com::sun::star::document::DocumentEvent; using ::com::sun::star::uno::XComponentContext; using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::uno::Reference; @@ -58,7 +58,7 @@ namespace basctl //==================================================================== //= DocumentEventNotifier::Impl //==================================================================== - typedef ::cppu::WeakComponentImplHelper1 < XEventListener + typedef ::cppu::WeakComponentImplHelper1 < XDocumentEventListener > DocumentEventNotifier_Impl_Base; enum ListenerAction @@ -77,10 +77,10 @@ namespace basctl Impl (DocumentEventListener&, Reference<XModel> const& rxDocument); ~Impl (); - // document::XEventListener - virtual void SAL_CALL notifyEvent( const EventObject& Event ) throw (RuntimeException); + // XDocumentEventListener + virtual void SAL_CALL documentEventOccured( const DocumentEvent& Event ) throw (RuntimeException); - // lang::XEventListener + // XEventListener virtual void SAL_CALL disposing( const csslang::EventObject& Event ) throw (RuntimeException); // ComponentHelper @@ -123,7 +123,7 @@ namespace basctl } //-------------------------------------------------------------------- - void SAL_CALL DocumentEventNotifier::Impl::notifyEvent( const EventObject& _rEvent ) throw (RuntimeException) + void SAL_CALL DocumentEventNotifier::Impl::documentEventOccured( const DocumentEvent& _rEvent ) throw (RuntimeException) { ::osl::ClearableMutexGuard aGuard( m_aMutex ); @@ -205,18 +205,18 @@ namespace basctl { try { - Reference< XEventBroadcaster > xBroadcaster; + Reference< XDocumentEventBroadcaster > xBroadcaster; if ( m_xModel.is() ) xBroadcaster.set( m_xModel, UNO_QUERY_THROW ); else { Reference< com::sun::star::uno::XComponentContext > aContext( comphelper::getProcessComponentContext() ); - xBroadcaster.set( theGlobalEventBroadcaster::get(aContext), UNO_QUERY_THROW ); + xBroadcaster = theGlobalEventBroadcaster::get(aContext); } - void ( SAL_CALL XEventBroadcaster::*listenerAction )( const Reference< XEventListener >& ) = - ( _eAction == RegisterListener ) ? &XEventBroadcaster::addEventListener : &XEventBroadcaster::removeEventListener; + void ( SAL_CALL XDocumentEventBroadcaster::*listenerAction )( const Reference< XDocumentEventListener >& ) = + ( _eAction == RegisterListener ) ? &XDocumentEventBroadcaster::addDocumentEventListener : &XDocumentEventBroadcaster::removeDocumentEventListener; (xBroadcaster.get()->*listenerAction)( this ); } catch( const Exception& ) |