diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-16 16:06:33 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-16 18:40:05 +0100 |
commit | 62951cdd17530f6218232f3d482bfd4ddd8a95ec (patch) | |
tree | 98376b3704c388143eefcb6abce624a48236eb74 /extensions/source/update | |
parent | 997d21183322a0a94b96868073808841d2773902 (diff) |
Introduce com.sun.star.frame.theGlobalEventBroadcaster singleton
...to supersede com.sun.star.frame.GlobalEventBroadcaster single-instance
service.
Change-Id: I74ecaadadb4c600d39979aa7c13b6389bed38fd7
Diffstat (limited to 'extensions/source/update')
-rw-r--r-- | extensions/source/update/ui/updatecheckui.cxx | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 9d1e53517836..f52f5c53929a 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -28,7 +28,7 @@ #include <com/sun/star/document/XEventListener.hpp> #include <com/sun/star/document/XEventBroadcaster.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/frame/GlobalEventBroadcaster.hpp> +#include <com/sun/star/frame/theGlobalEventBroadcaster.hpp> #include <com/sun/star/graphic/GraphicProvider.hpp> #include <com/sun/star/graphic/XGraphicProvider.hpp> #include <com/sun/star/task/XJob.hpp> @@ -155,9 +155,6 @@ private: void AddMenuBarIcon( SystemWindow* pSysWin, bool bAddEventHdl ); Image GetBubbleImage( OUString &rURL ); - uno::Reference< document::XEventBroadcaster > getGlobalEventBroadcaster() const - throw (uno::RuntimeException); - public: UpdateCheckUI(const uno::Reference<uno::XComponentContext>&); virtual ~UpdateCheckUI(); @@ -220,7 +217,7 @@ UpdateCheckUI::UpdateCheckUI(const uno::Reference<uno::XComponentContext>& xCont maTimeoutTimer.SetTimeout( 10000 ); maTimeoutTimer.SetTimeoutHdl( LINK( this, UpdateCheckUI, TimeOutHdl ) ); - uno::Reference< document::XEventBroadcaster > xBroadcaster( getGlobalEventBroadcaster() ); + uno::Reference< document::XEventBroadcaster > xBroadcaster( frame::theGlobalEventBroadcaster::get(m_xContext) ); xBroadcaster->addEventListener( this ); maWindowEventHdl = LINK( this, UpdateCheckUI, WindowEventHdl ); @@ -238,20 +235,6 @@ UpdateCheckUI::~UpdateCheckUI() } //------------------------------------------------------------------------------ -uno::Reference<document::XEventBroadcaster> -UpdateCheckUI::getGlobalEventBroadcaster() const throw (uno::RuntimeException) -{ - if( !m_xContext.is() ) - throw uno::RuntimeException( - "UpdateCheckUI: empty component context", - uno::Reference< uno::XInterface >() ); - - return uno::Reference<document::XEventBroadcaster> ( - frame::GlobalEventBroadcaster::create(m_xContext), - uno::UNO_QUERY_THROW); -} - -//------------------------------------------------------------------------------ OUString SAL_CALL UpdateCheckUI::getImplementationName() throw (uno::RuntimeException) { |