From bc00717bb7a2b48885ca356fb0a966acbe72dca9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 29 Aug 2012 07:45:05 +0200 Subject: fdo#46808, Adapt system::SystemShellExecute UNO service to new style Change-Id: Ib298b3219c3e89dd35bce0974846ed4888ed941e --- uui/source/newerverwarn.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'uui') 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 #include -#include +#include #include #include #include @@ -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 ); -- cgit