diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-29 07:45:05 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-03 15:55:05 +0200 |
commit | bc00717bb7a2b48885ca356fb0a966acbe72dca9 (patch) | |
tree | 3eacf7bb54893d7380789d1a2e9ffbb759da16ba /svtools | |
parent | 7dd6c0a8372810f48e6bee35a11ac4ad0432640b (diff) |
fdo#46808, Adapt system::SystemShellExecute UNO service to new style
Change-Id: Ib298b3219c3e89dd35bce0974846ed4888ed941e
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/templwin.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 5266ab941d54..3f8df8aa2a64 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -69,7 +69,7 @@ #include <com/sun/star/io/IOException.hpp> #include <com/sun/star/util/DateTime.hpp> #include <com/sun/star/script/XTypeConverter.hpp> -#include <com/sun/star/system/XSystemShellExecute.hpp> +#include <com/sun/star/system/SystemShellExecute.hpp> #include <com/sun/star/system/SystemShellExecuteFlags.hpp> #include <unotools/localedatawrapper.hxx> #include <com/sun/star/container/XNameContainer.hpp> @@ -1680,14 +1680,12 @@ IMPL_LINK_NOARG(SvtDocumentTemplateDialog, OpenLinkHdl_Impl) localizeWebserviceURI(sURL); try { - uno::Reference< lang::XMultiServiceFactory > xSMGR = - ::comphelper::getProcessServiceFactory(); - uno::Reference< com::sun::star::system::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< system::XSystemShellExecute > xSystemShell( + system::SystemShellExecute::create(xContext) ); if ( xSystemShell.is() ) - xSystemShell->execute( sURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY ); + xSystemShell->execute( sURL, ::rtl::OUString(), system::SystemShellExecuteFlags::URIS_ONLY ); EndDialog( RET_CANCEL ); } catch( const uno::Exception& e ) |