diff options
author | Daniel Sikeler <d.sikeler94@gmail.com> | 2014-09-02 09:12:44 +0000 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-09-10 11:48:43 +0000 |
commit | db9cfa672c5944f22ca82a28ed150a5fbae6f5b5 (patch) | |
tree | cd5ad9a28206694e39390a16b92ad88ceaf98eaf | |
parent | 50df87ceddc5f4dbebe9552c07e6c899dc17717c (diff) |
fdo#55380 replaced use of obsolete interfaces
Change-Id: I94fed6a9361f21457b3e631efffc0db833068aef
Reviewed-on: https://gerrit.libreoffice.org/11256
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | desktop/source/app/app.cxx | 16 | ||||
-rw-r--r-- | extensions/source/update/ui/updatecheckui.cxx | 16 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertestdialog.cxx | 12 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertestdialog.hxx | 6 | ||||
-rw-r--r-- | sfx2/source/appl/appinit.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_docmgr.cxx | 24 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_docmgr.hxx | 12 |
7 files changed, 46 insertions, 46 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 3155d68f2ee5..3313d03292b5 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -67,7 +67,7 @@ #include <com/sun/star/task/theJobExecutor.hpp> #include <com/sun/star/task/OfficeRestartManager.hpp> #include <com/sun/star/task/XRestartManager.hpp> -#include <com/sun/star/document/XEventListener.hpp> +#include <com/sun/star/document/XDocumentEventListener.hpp> #include <com/sun/star/frame/theUICommandDescription.hpp> #include <com/sun/star/ui/theUIElementFactoryManager.hpp> #include <com/sun/star/ui/theWindowStateConfiguration.hpp> @@ -1323,7 +1323,7 @@ void Desktop::AppEvent( const ApplicationEvent& rAppEvent ) struct ExecuteGlobals { - Reference < css::document::XEventListener > xGlobalBroadcaster; + Reference < css::document::XDocumentEventListener > xGlobalBroadcaster; bool bRestartRequested; bool bUseSystemFileDialog; std::auto_ptr<SvtLanguageOptions> pLanguageOptions; @@ -1485,8 +1485,8 @@ int Desktop::Main() xDesktop = css::frame::Desktop::create( xContext ); // create service for loadin SFX (still needed in startup) - pExecGlobals->xGlobalBroadcaster = Reference < css::document::XEventListener > - ( css::frame::theGlobalEventBroadcaster::get(xContext), UNO_QUERY_THROW ); + pExecGlobals->xGlobalBroadcaster = Reference < css::document::XDocumentEventListener > + ( css::frame::theGlobalEventBroadcaster::get(xContext), UNO_SET_THROW ); /* ensure existence of a default window that messages can be dispatched to This is for the benefit of testtool which uses PostUserEvent extensively @@ -1513,9 +1513,9 @@ int Desktop::Main() // keep a language options instance... pExecGlobals->pLanguageOptions.reset( new SvtLanguageOptions(true)); - css::document::EventObject aEvent; + css::document::DocumentEvent aEvent; aEvent.EventName = "OnStartApp"; - pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent); + pExecGlobals->xGlobalBroadcaster->documentEventOccured(aEvent); SetSplashScreenProgress(50); @@ -1731,9 +1731,9 @@ int Desktop::doShutdown() if (pExecGlobals->xGlobalBroadcaster.is()) { - css::document::EventObject aEvent; + css::document::DocumentEvent aEvent; aEvent.EventName = "OnCloseApp"; - pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent); + pExecGlobals->xGlobalBroadcaster->documentEventOccured(aEvent); } delete pResMgr, pResMgr = NULL; diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 5f15da37ab6a..2e2ea0b9c44f 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -25,8 +25,8 @@ #include <cppuhelper/supportsservice.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XComponent.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/beans/XPropertySet.hpp> #include <com/sun/star/frame/theGlobalEventBroadcaster.hpp> #include <com/sun/star/graphic/GraphicProvider.hpp> @@ -119,7 +119,7 @@ public: class UpdateCheckUI : public ::cppu::WeakImplHelper3 - < lang::XServiceInfo, document::XEventListener, beans::XPropertySet > + < lang::XServiceInfo, document::XDocumentEventListener, beans::XPropertySet > { uno::Reference< uno::XComponentContext > m_xContext; uno::Reference< task::XJob > mrJob; @@ -168,8 +168,8 @@ public: virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; - // XEventListener - virtual void SAL_CALL notifyEvent(const document::EventObject& Event) + // XDocumentEventListener + virtual void SAL_CALL documentEventOccured(const document::DocumentEvent& Event) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL disposing(const lang::EventObject& Event) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -218,8 +218,8 @@ UpdateCheckUI::UpdateCheckUI(const uno::Reference<uno::XComponentContext>& xCont maTimeoutTimer.SetTimeout( 10000 ); maTimeoutTimer.SetTimeoutHdl( LINK( this, UpdateCheckUI, TimeOutHdl ) ); - uno::Reference< document::XEventBroadcaster > xBroadcaster( frame::theGlobalEventBroadcaster::get(m_xContext) ); - xBroadcaster->addEventListener( this ); + uno::Reference< document::XDocumentEventBroadcaster > xBroadcaster( frame::theGlobalEventBroadcaster::get(m_xContext) ); + xBroadcaster->addDocumentEventListener( this ); maWindowEventHdl = LINK( this, UpdateCheckUI, WindowEventHdl ); maApplicationEventHdl = LINK( this, UpdateCheckUI, ApplicationEventHdl ); @@ -365,7 +365,7 @@ void UpdateCheckUI::AddMenuBarIcon( SystemWindow *pSysWin, bool bAddEventHdl ) } -void SAL_CALL UpdateCheckUI::notifyEvent(const document::EventObject& rEvent) +void SAL_CALL UpdateCheckUI::documentEventOccured(const document::DocumentEvent& rEvent) throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index 4358071b34cb..de7761009e52 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -68,13 +68,13 @@ using namespace com::sun::star::xml; using namespace com::sun::star::xml::sax; -class GlobalEventListenerImpl : public ::cppu::WeakImplHelper1< com::sun::star::document::XEventListener > +class GlobalEventListenerImpl : public ::cppu::WeakImplHelper1< com::sun::star::document::XDocumentEventListener > { public: GlobalEventListenerImpl( XMLFilterTestDialog* pDialog ); - // XEventListener - virtual void SAL_CALL notifyEvent( const com::sun::star::document::EventObject& Event ) throw (RuntimeException, std::exception) SAL_OVERRIDE; + // XDocumentEventListener + virtual void SAL_CALL documentEventOccured( const com::sun::star::document::DocumentEvent& Event ) throw (RuntimeException, std::exception) SAL_OVERRIDE; // lang::XEventListener virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw (RuntimeException, std::exception) SAL_OVERRIDE; @@ -87,7 +87,7 @@ GlobalEventListenerImpl::GlobalEventListenerImpl( XMLFilterTestDialog* pDialog ) { } -void SAL_CALL GlobalEventListenerImpl::notifyEvent( const com::sun::star::document::EventObject& Event ) throw (RuntimeException, std::exception) +void SAL_CALL GlobalEventListenerImpl::documentEventOccured( const com::sun::star::document::DocumentEvent& Event ) throw (RuntimeException, std::exception) { ::SolarMutexGuard aGuard; if( Event.EventName == "OnFocus" || Event.EventName == "OnUnload" ) @@ -168,7 +168,7 @@ XMLFilterTestDialog::XMLFilterTestDialog(Window* pParent, { mxGlobalBroadcaster = theGlobalEventBroadcaster::get(mxContext); mxGlobalEventListener = new GlobalEventListenerImpl( this ); - mxGlobalBroadcaster->addEventListener( mxGlobalEventListener ); + mxGlobalBroadcaster->addDocumentEventListener( mxGlobalEventListener ); } catch( const Exception& ) { @@ -181,7 +181,7 @@ XMLFilterTestDialog::~XMLFilterTestDialog() try { if( mxGlobalBroadcaster.is() ) - mxGlobalBroadcaster->removeEventListener( mxGlobalEventListener ); + mxGlobalBroadcaster->removeDocumentEventListener( mxGlobalEventListener ); } catch( const Exception& ) { diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.hxx b/filter/source/xsltdialog/xmlfiltertestdialog.hxx index 5b5613a0cc8a..6bdb429c81ca 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.hxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.hxx @@ -21,7 +21,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XComponent.hpp> -#include <com/sun/star/document/XEventBroadcaster.hpp> +#include <com/sun/star/document/XDocumentEventBroadcaster.hpp> #include <vcl/button.hxx> #include <vcl/dialog.hxx> @@ -58,8 +58,8 @@ private: private: com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext; - com::sun::star::uno::Reference< com::sun::star::document::XEventBroadcaster > mxGlobalBroadcaster; - com::sun::star::uno::Reference< com::sun::star::document::XEventListener > mxGlobalEventListener; + com::sun::star::uno::Reference< com::sun::star::document::XDocumentEventBroadcaster > mxGlobalBroadcaster; + com::sun::star::uno::Reference< com::sun::star::document::XDocumentEventListener > mxGlobalEventListener; com::sun::star::uno::WeakReference< com::sun::star::lang::XComponent > mxLastFocusModel; OUString m_sImportRecentFile; diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index 7ee6c22afe51..80eaf8395a97 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -117,11 +117,11 @@ void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& a pApp->Get_Impl()->pAppDispatch->release(); css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); - css::uno::Reference< css::document::XEventListener > xGlobalBroadcaster(css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::document::XDocumentEventListener > xGlobalBroadcaster(css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_QUERY_THROW); - css::document::EventObject aEvent2; + css::document::DocumentEvent aEvent2; aEvent2.EventName = "OnCloseApp"; - xGlobalBroadcaster->notifyEvent(aEvent2); + xGlobalBroadcaster->documentEventOccured(aEvent2); delete pApp; Application::Quit(); diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx index 52f49b2cfd89..f6da87a35421 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx @@ -33,7 +33,7 @@ #include "com/sun/star/awt/XTopWindow.hpp" #include "com/sun/star/beans/XPropertySet.hpp" -#include "com/sun/star/document/XEventBroadcaster.hpp" +#include "com/sun/star/document/XDocumentEventBroadcaster.hpp" #include "com/sun/star/document/XStorageBasedDocument.hpp" #include "com/sun/star/frame/theGlobalEventBroadcaster.hpp" #include "com/sun/star/frame/XStorable.hpp" @@ -74,15 +74,15 @@ void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::notifyClosin const lang::EventObject& Source ) throw ( uno::RuntimeException, std::exception ) { - document::EventObject aDocEvent; + document::DocumentEvent aDocEvent; aDocEvent.Source = Source.Source; aDocEvent.EventName = "OfficeDocumentsListener::notifyClosing"; - m_pManager->notifyEvent( aDocEvent ); + m_pManager->documentEventOccured( aDocEvent ); } -// lang::XEventListener (base of util::XCloseListener) +// lang::XDocumentEventListener (base of util::XCloseListener) @@ -110,8 +110,8 @@ OfficeDocumentsManager::OfficeDocumentsManager( m_xDocCloseListener( new OfficeDocumentsCloseListener( this ) ) { // Order is important (multithreaded environment) - uno::Reference< document::XEventBroadcaster >( - m_xDocEvtNotifier, uno::UNO_QUERY_THROW )->addEventListener( this ); + uno::Reference< document::XDocumentEventBroadcaster >( + m_xDocEvtNotifier, uno::UNO_QUERY_THROW )->addDocumentEventListener( this ); buildDocumentsList(); } @@ -129,8 +129,8 @@ OfficeDocumentsManager::~OfficeDocumentsManager() void OfficeDocumentsManager::destroy() { - uno::Reference< document::XEventBroadcaster >( - m_xDocEvtNotifier, uno::UNO_QUERY_THROW )->removeEventListener( this ); + uno::Reference< document::XDocumentEventBroadcaster >( + m_xDocEvtNotifier, uno::UNO_QUERY_THROW )->removeDocumentEventListener( this ); } @@ -176,13 +176,13 @@ getDocumentId( const uno::Reference< uno::XInterface > & xDoc ) -// document::XEventListener +// document::XDocumentEventListener // virtual -void SAL_CALL OfficeDocumentsManager::notifyEvent( - const document::EventObject & Event ) +void SAL_CALL OfficeDocumentsManager::documentEventOccured( + const document::DocumentEvent & Event ) throw ( uno::RuntimeException, std::exception ) { /* @@ -427,7 +427,7 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( -// lang::XEventListener (base of document::XEventListener) +// lang::XDocumentEventListener (base of document::XDocumentEventListener) diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx index 36c5756a5016..003e78476995 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx @@ -26,7 +26,7 @@ #include "cppuhelper/implbase1.hxx" -#include "com/sun/star/document/XEventListener.hpp" +#include "com/sun/star/document/XDocumentEventListener.hpp" #include "com/sun/star/embed/XStorage.hpp" #include "com/sun/star/frame/XModel.hpp" #include "com/sun/star/frame/XModuleManager2.hpp" @@ -82,7 +82,7 @@ namespace tdoc_ucp { class OfficeDocumentsManager : - public cppu::WeakImplHelper1< com::sun::star::document::XEventListener > + public cppu::WeakImplHelper1< com::sun::star::document::XDocumentEventListener > { class OfficeDocumentsCloseListener : public cppu::WeakImplHelper1< com::sun::star::util::XCloseListener > @@ -120,12 +120,12 @@ namespace tdoc_ucp { void destroy(); - // document::XEventListener - virtual void SAL_CALL notifyEvent( - const com::sun::star::document::EventObject & Event ) + // document::XDocumentEventListener + virtual void SAL_CALL documentEventOccured( + const com::sun::star::document::DocumentEvent & Event ) throw ( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; - // lang::XEventListener (base of document::XEventListener) + // lang::XEventListener (base of document::XDocumentEventListener) virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject & Source ) throw ( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; |