summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-30 15:57:26 +0200
committerNoel Grandin <noel@peralex.com>2013-06-03 10:00:01 +0200
commit1f79707438d84ba639a2c601ae9d25c4647d37f6 (patch)
treea52374a4ce43de7d0814325bf72074f3998e3598 /extensions
parentd7fa9ca787ee0ec5d0b9f2989f547ff37791afc6 (diff)
fdo#46808, Convert office::Quickstart service to new style
Service already existed, just needed an IDL file. Change-Id: Ief5563e53c7331b65dd429079180c4eed2f2c071
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/update/check/updatecheck.cxx30
-rw-r--r--extensions/source/update/check/updatecheck.hxx8
2 files changed, 3 insertions, 35 deletions
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 <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/DispatchResultEvent.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
+#include <com/sun/star/office/Quickstart.hpp>
#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/task/XJob.hpp>
@@ -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<uno::XComponentContext>& 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<com::sun::star::beans::NamedValue>& rValues,
const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& 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<com::sun::star::uno::XComponentContext>& xContext);
-
// Update internal update info member
void setUpdateInfo(const UpdateInfo& aInfo);