From 1f79707438d84ba639a2c601ae9d25c4647d37f6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 30 May 2013 15:57:26 +0200 Subject: fdo#46808, Convert office::Quickstart service to new style Service already existed, just needed an IDL file. Change-Id: Ief5563e53c7331b65dd429079180c4eed2f2c071 --- extensions/source/update/check/updatecheck.cxx | 30 +++----------------------- extensions/source/update/check/updatecheck.hxx | 8 ------- 2 files changed, 3 insertions(+), 35 deletions(-) (limited to 'extensions') diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 380217ca19ed..52e0e628d998 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -710,13 +711,9 @@ ShutdownThread::run() m_aCondition.wait(&tv); // Tell QuickStarter not to veto .. - uno::Reference< beans::XFastPropertySet > xQuickStarter( - UpdateCheck::createService("com.sun.star.office.Quickstart", m_xContext), - uno::UNO_QUERY - ); + uno::Reference< css::beans::XFastPropertySet > xQuickStarter = css::office::Quickstart::createDefault(m_xContext); - if (xQuickStarter.is()) - xQuickStarter->setFastPropertyValue(0, uno::makeAny(false)); + xQuickStarter->setFastPropertyValue(0, uno::makeAny(false)); // Shutdown the office uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(m_xContext); @@ -1570,27 +1567,6 @@ UpdateCheck::getInteractionHandler() const //------------------------------------------------------------------------------ -uno::Reference< uno::XInterface > -UpdateCheck::createService(const OUString& rServiceName, - const uno::Reference& xContext) -{ - if( !xContext.is() ) - throw uno::RuntimeException( - "UpdateCheckConfig: empty component context", - uno::Reference< uno::XInterface >() ); - - const uno::Reference< lang::XMultiComponentFactory > xServiceManager(xContext->getServiceManager()); - - if( !xServiceManager.is() ) - throw uno::RuntimeException( - "UpdateCheckConfig: unable to obtain service manager from component context", - uno::Reference< uno::XInterface >() ); - - return xServiceManager->createInstanceWithContext(rServiceName, xContext); -} - -//------------------------------------------------------------------------------ - bool UpdateCheck::isDialogShowing() const { diff --git a/extensions/source/update/check/updatecheck.hxx b/extensions/source/update/check/updatecheck.hxx index 9ae38d8132d3..8d40c32f85dc 100644 --- a/extensions/source/update/check/updatecheck.hxx +++ b/extensions/source/update/check/updatecheck.hxx @@ -66,14 +66,6 @@ public: void initialize(const com::sun::star::uno::Sequence& rValues, const com::sun::star::uno::Reference& xContext); - /* Returns an instance of the specified service obtained from the specified - * component context - */ - - static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > createService( - const OUString& aServiceName, - const com::sun::star::uno::Reference& xContext); - // Update internal update info member void setUpdateInfo(const UpdateInfo& aInfo); -- cgit