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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/appl/appinit.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/config/evntconf.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 4 | ||||
-rw-r--r-- | sfx2/util/sfx.component | 1 |
4 files changed, 7 insertions, 6 deletions
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index 5256a588a584..a5f1fde1b7fc 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -21,7 +21,7 @@ #include <sfx2/app.hxx> #include <com/sun/star/frame/XTerminateListener.hpp> #include <com/sun/star/uno/Reference.hxx> -#include <com/sun/star/frame/GlobalEventBroadcaster.hpp> +#include <com/sun/star/frame/theGlobalEventBroadcaster.hpp> #include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -112,7 +112,7 @@ 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::GlobalEventBroadcaster::create(xContext), css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::document::XEventListener > xGlobalBroadcaster(css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_QUERY_THROW); css::document::EventObject aEvent2; aEvent2.EventName = "OnCloseApp"; diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx index 6b5c3e710fe2..06f056d28483 100644 --- a/sfx2/source/config/evntconf.cxx +++ b/sfx2/source/config/evntconf.cxx @@ -44,7 +44,7 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/container/XNameReplace.hpp> #include <com/sun/star/document/XEventsSupplier.hpp> -#include <com/sun/star/frame/GlobalEventBroadcaster.hpp> +#include <com/sun/star/frame/theGlobalEventBroadcaster.hpp> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/uno/Reference.hxx> @@ -232,7 +232,7 @@ void PropagateEvent_Impl( SfxObjectShell *pDoc, OUString aEventName, const SvxMa else { xSupplier = uno::Reference < document::XEventsSupplier > - ( frame::GlobalEventBroadcaster::create(::comphelper::getProcessComponentContext()), + ( frame::theGlobalEventBroadcaster::get(::comphelper::getProcessComponentContext()), uno::UNO_QUERY ); } diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 2fa26fc42e8d..311eedcd92fc 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -27,7 +27,7 @@ #include <svl/eitem.hxx> #include <svl/stritem.hxx> #include <svl/intitem.hxx> -#include <com/sun/star/frame/GlobalEventBroadcaster.hpp> +#include <com/sun/star/frame/theGlobalEventBroadcaster.hpp> #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/frame/XFrame.hpp> @@ -150,7 +150,7 @@ void impl_addToModelCollection(const css::uno::Reference< css::frame::XModel >& css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); css::uno::Reference< css::frame::XGlobalEventBroadcaster > xModelCollection = - css::frame::GlobalEventBroadcaster::create(xContext); + css::frame::theGlobalEventBroadcaster::get(xContext); try { xModelCollection->insert(css::uno::makeAny(xModel)); diff --git a/sfx2/util/sfx.component b/sfx2/util/sfx.component index a66335e0fc69..30cd3fc698bb 100644 --- a/sfx2/util/sfx.component +++ b/sfx2/util/sfx.component @@ -70,6 +70,7 @@ </implementation> <implementation name="com.sun.star.comp.sfx2.GlobalEventBroadcaster"> <service name="com.sun.star.frame.GlobalEventBroadcaster"/> + <singleton name="com.sun.star.frame.theGlobalEventBroadcaster"/> </implementation> <implementation name="com.sun.star.comp.sfx2.IFrameObject" constructor="com_sun_star_comp_sfx2_IFrameObject_get_implementation"> |