[Libreoffice-commits] core.git: basctl/source

Stephan Bergmann sbergman at redhat.com
Fri Jan 17 02:38:51 PST 2014


 basctl/source/basicide/doceventnotifier.cxx |   26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

New commits:
commit ad1390b8c278ee43430296b35d748cb8cdd4625b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jan 17 11:38:06 2014 +0100

    Remove use of deprecated css::document::XEventBroadcaster/Listener
    
    Change-Id: I178ae590fec87f53e90db5aa6e560cd146c0676b

diff --git a/basctl/source/basicide/doceventnotifier.cxx b/basctl/source/basicide/doceventnotifier.cxx
index 9aa94f0..95ed06f 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& )


More information about the Libreoffice-commits mailing list