summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-29 07:45:05 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-03 15:55:05 +0200
commitbc00717bb7a2b48885ca356fb0a966acbe72dca9 (patch)
tree3eacf7bb54893d7380789d1a2e9ffbb759da16ba /uui
parent7dd6c0a8372810f48e6bee35a11ac4ad0432640b (diff)
fdo#46808, Adapt system::SystemShellExecute UNO service to new style
Change-Id: Ib298b3219c3e89dd35bce0974846ed4888ed941e
Diffstat (limited to 'uui')
-rw-r--r--uui/source/newerverwarn.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/uui/source/newerverwarn.cxx b/uui/source/newerverwarn.cxx
index b1f955c620cf..a16478272d72 100644
--- a/uui/source/newerverwarn.cxx
+++ b/uui/source/newerverwarn.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
@@ -95,14 +95,10 @@ IMPL_LINK_NOARG(NewerVersionWarningDialog, UpdateHdl)
{
if ( !sNotifyURL.isEmpty() && !m_sVersion.isEmpty() )
{
- uno::Reference< lang::XMultiServiceFactory > xSMGR =
- ::comphelper::getProcessServiceFactory();
- uno::Reference< XSystemShellExecute > xSystemShell(
- xSMGR->createInstance( ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),
- uno::UNO_QUERY_THROW );
+ uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ uno::Reference< XSystemShellExecute > xSystemShell( SystemShellExecute::create(xContext) );
sNotifyURL += m_sVersion;
- if ( xSystemShell.is() && !sNotifyURL.isEmpty() )
+ if ( !sNotifyURL.isEmpty() )
{
xSystemShell->execute(
sNotifyURL, ::rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );