diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-22 15:05:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-22 15:38:44 +0200 |
commit | 79e0e713f798718902fed9740f147ce143bf7b76 (patch) | |
tree | 044eab4ff7f2b90ecc4f7f18e523b52024377e74 /framework | |
parent | ba150afb07c942d6d87a3b4d7e6535229d9b2013 (diff) |
Update to XDocumentEventBroadcaster et al
Change-Id: I11633dc1629eac6a1ba79e4b45972a1e4f5fc833
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/helper/mischelper.hxx | 16 | ||||
-rw-r--r-- | framework/source/services/autorecovery.cxx | 20 |
2 files changed, 18 insertions, 18 deletions
diff --git a/framework/inc/helper/mischelper.hxx b/framework/inc/helper/mischelper.hxx index 6868237e9fc4..6aa0015ade49 100644 --- a/framework/inc/helper/mischelper.hxx +++ b/framework/inc/helper/mischelper.hxx @@ -22,7 +22,7 @@ #include <com/sun/star/linguistic2/XLanguageGuessing.hpp> #include <com/sun/star/container/XNameAccess.hpp> -#include <com/sun/star/document/XEventListener.hpp> +#include <com/sun/star/document/XDocumentEventListener.hpp> #include <com/sun/star/lang/XEventListener.hpp> #include <com/sun/star/util/XChangesListener.hpp> #include <com/sun/star/container/XContainerListener.hpp> @@ -267,13 +267,13 @@ class WeakEventListener : public ::cppu::WeakImplHelper1<com::sun::star::lang::X } }; -class WeakDocumentEventListener : public ::cppu::WeakImplHelper1<com::sun::star::document::XEventListener> +class WeakDocumentEventListener : public ::cppu::WeakImplHelper1<com::sun::star::document::XDocumentEventListener> { private: - com::sun::star::uno::WeakReference<com::sun::star::document::XEventListener> mxOwner; + com::sun::star::uno::WeakReference<com::sun::star::document::XDocumentEventListener> mxOwner; public: - WeakDocumentEventListener(com::sun::star::uno::Reference<com::sun::star::document::XEventListener> xOwner) + WeakDocumentEventListener(com::sun::star::uno::Reference<com::sun::star::document::XDocumentEventListener> xOwner) : mxOwner(xOwner) { } @@ -282,13 +282,13 @@ class WeakDocumentEventListener : public ::cppu::WeakImplHelper1<com::sun::star: { } - virtual void SAL_CALL notifyEvent(const com::sun::star::document::EventObject& rEvent) + virtual void SAL_CALL documentEventOccured(const com::sun::star::document::DocumentEvent& rEvent) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { - com::sun::star::uno::Reference<com::sun::star::document::XEventListener> xOwner(mxOwner.get(), + com::sun::star::uno::Reference<com::sun::star::document::XDocumentEventListener> xOwner(mxOwner.get(), com::sun::star::uno::UNO_QUERY); if (xOwner.is()) - xOwner->notifyEvent(rEvent); + xOwner->documentEventOccured(rEvent); } @@ -296,7 +296,7 @@ class WeakDocumentEventListener : public ::cppu::WeakImplHelper1<com::sun::star: virtual void SAL_CALL disposing(const com::sun::star::lang::EventObject& rEvent) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { - com::sun::star::uno::Reference<com::sun::star::document::XEventListener> xOwner(mxOwner.get(), + com::sun::star::uno::Reference<com::sun::star::document::XDocumentEventListener> xOwner(mxOwner.get(), com::sun::star::uno::UNO_QUERY); if (xOwner.is()) xOwner->disposing(rEvent); diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index c2e899429fba..31051e57598b 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -62,8 +62,8 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/frame/XDispatch.hpp> -#include <com/sun/star/document/XEventListener.hpp> -#include <com/sun/star/document/XEventBroadcaster.hpp> +#include <com/sun/star/document/XDocumentEventListener.hpp> +#include <com/sun/star/document/XDocumentEventBroadcaster.hpp> #include <com/sun/star/util/XChangesListener.hpp> #include <com/sun/star/task/XStatusIndicator.hpp> #include <com/sun/star/util/XModifyListener.hpp> @@ -162,7 +162,7 @@ public: typedef ::cppu::WeakComponentImplHelper5< css::lang::XServiceInfo, css::frame::XDispatch, - css::document::XEventListener, // => css.lang.XEventListener + css::document::XDocumentEventListener, // => css.lang.XEventListener css::util::XChangesListener, // => css.lang.XEventListener css::util::XModifyListener > // => css.lang.XEventListener AutoRecovery_BASE; @@ -363,7 +363,7 @@ private: /** @short proxy weak binding to forward Events to ourself without an ownership cycle */ - css::uno::Reference< css::document::XEventListener > m_xNewDocBroadcasterListener; + css::uno::Reference< css::document::XDocumentEventListener > m_xNewDocBroadcasterListener; /** @short because we stop/restart listening sometimes, it's a good idea to know if we already registered as listener .-) @@ -499,7 +499,7 @@ public: const css::util::URL& aURL ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - // css.document.XEventListener + // css.document.XDocumentEventListener /** @short informs about created/opened documents. @descr Every new opened/created document will be saved internally @@ -509,7 +509,7 @@ public: @param aEvent points to the new created/opened document. */ - virtual void SAL_CALL notifyEvent(const css::document::EventObject& aEvent) + virtual void SAL_CALL documentEventOccured(const css::document::DocumentEvent& aEvent) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // css.util.XChangesListener @@ -1589,7 +1589,7 @@ void SAL_CALL AutoRecovery::removeStatusListener(const css::uno::Reference< css: m_lListener.removeInterface(aURL.Complete, xListener); } -void SAL_CALL AutoRecovery::notifyEvent(const css::document::EventObject& aEvent) +void SAL_CALL AutoRecovery::documentEventOccured(const css::document::DocumentEvent& aEvent) throw(css::uno::RuntimeException, std::exception) { css::uno::Reference< css::frame::XModel > xDocument(aEvent.Source, css::uno::UNO_QUERY); @@ -2210,7 +2210,7 @@ void AutoRecovery::implts_startListening() ) { m_xNewDocBroadcasterListener = new WeakDocumentEventListener(this); - xBroadcaster->addEventListener(m_xNewDocBroadcasterListener); + xBroadcaster->addDocumentEventListener(m_xNewDocBroadcasterListener); /* SAFE */ { osl::MutexGuard g2(cppu::WeakComponentImplHelperBase::rBHelper.rMutex); m_bListenForDocEvents = true; @@ -2221,7 +2221,7 @@ void AutoRecovery::implts_startListening() void AutoRecovery::implts_stopListening() { css::uno::Reference< css::util::XChangesNotifier > xCFG; - css::uno::Reference< css::document::XEventBroadcaster > xGlobalEventBroadcaster; + css::uno::Reference< css::document::XDocumentEventBroadcaster > xGlobalEventBroadcaster; /* SAFE */ { osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex); // Attention: Dont reset our internal members here too. @@ -2236,7 +2236,7 @@ void AutoRecovery::implts_stopListening() (m_bListenForDocEvents ) ) { - xGlobalEventBroadcaster->removeEventListener(m_xNewDocBroadcasterListener); + xGlobalEventBroadcaster->removeDocumentEventListener(m_xNewDocBroadcasterListener); m_bListenForDocEvents = false; } |