summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-09-07 15:14:55 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-27 10:30:42 +0200
commitcd693ff598bbabba66d8ca353a32bcbd81a5b12b (patch)
tree525e9fe8fdd44e6ccba4f61e999aeb1332d2b896 /extensions
parent526e007bb6340e2c4a2cb96f5612ba268fcd5583 (diff)
fdo#46808, Adapt frame::GlobalEventBroadcaster UNO service to new style
Create a merged XGlobalEventBroadcaster interface for this service to implement. Which is backwards-compatible, but does not require creating a new service. Also add two interfaces to the IDL, which the service already implemented, and existing client code already used. Change-Id: Ib7a9a30c0e50146ef621f3fe5227f8aad3190516
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index a6ce20f64a78..75143fa018d9 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -36,6 +36,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/graphic/GraphicProvider.hpp>
#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <com/sun/star/task/XJob.hpp>
@@ -255,17 +256,8 @@ UpdateCheckUI::getGlobalEventBroadcaster() const throw (uno::RuntimeException)
UNISTRING( "UpdateCheckUI: empty component context" ),
uno::Reference< uno::XInterface >() );
- uno::Reference< lang::XMultiComponentFactory > xServiceManager(m_xContext->getServiceManager());
-
- if( !xServiceManager.is() )
- throw uno::RuntimeException(
- UNISTRING( "UpdateCheckUI: unable to obtain service manager from component context" ),
- uno::Reference< uno::XInterface >() );
-
return uno::Reference<document::XEventBroadcaster> (
- xServiceManager->createInstanceWithContext(
- UNISTRING( "com.sun.star.frame.GlobalEventBroadcaster" ),
- m_xContext),
+ frame::GlobalEventBroadcaster::create(m_xContext),
uno::UNO_QUERY_THROW);
}