diff options
author | Noel Grandin <noel@peralex.com> | 2012-10-17 13:54:31 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-24 17:59:29 +0200 |
commit | d26f3acf2874f64fd89c8197163651443d4b1733 (patch) | |
tree | c8207bc122afeffced45e8b530610c19278cafe9 /extensions | |
parent | e0c4e1f8b7258a3a6e38e4115c03e4315541a8de (diff) |
fdo#46808, use service constructor for system::SystemShellExecute
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/update/check/updatecheck.cxx | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index c6fb071fd1ed..fcd2d8221ad0 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -913,9 +913,7 @@ UpdateCheck::install() { osl::MutexGuard aGuard(m_aMutex); - const uno::Reference< c3s::XSystemShellExecute > xShellExecute( - createService( UNISTRING( "com.sun.star.system.SystemShellExecute" ), m_xContext ), - uno::UNO_QUERY ); + const uno::Reference< c3s::XSystemShellExecute > xShellExecute = c3s::SystemShellExecute::create( m_xContext ); try { // Construct install command ?? @@ -927,29 +925,26 @@ UpdateCheck::install() aURL = getReleaseNote(m_aUpdateInfo, 4); storeReleaseNote(2, aURL); - if( xShellExecute.is() ) - { - rtl::OUString aInstallImage(m_aImageName); - osl::FileBase::getSystemPathFromFileURL(aInstallImage, aInstallImage); + rtl::OUString aInstallImage(m_aImageName); + osl::FileBase::getSystemPathFromFileURL(aInstallImage, aInstallImage); - rtl::OUString aParameter; - sal_Int32 nFlags = c3s::SystemShellExecuteFlags::DEFAULTS; + rtl::OUString aParameter; + sal_Int32 nFlags = c3s::SystemShellExecuteFlags::DEFAULTS; #if ( defined LINUX || defined SOLARIS ) - nFlags = 42; - aParameter = getBaseInstallation(); - if( !aParameter.isEmpty() ) - osl::FileBase::getSystemPathFromFileURL(aParameter, aParameter); + nFlags = 42; + aParameter = getBaseInstallation(); + if( !aParameter.isEmpty() ) + osl::FileBase::getSystemPathFromFileURL(aParameter, aParameter); - aParameter += UNISTRING(" &"); + aParameter += UNISTRING(" &"); #endif - rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get( m_xContext ); - rModel->clearLocalFileName(); + rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get( m_xContext ); + rModel->clearLocalFileName(); - xShellExecute->execute(aInstallImage, aParameter, nFlags); - ShutdownThread *pShutdownThread = new ShutdownThread( m_xContext ); - (void) pShutdownThread; - } + xShellExecute->execute(aInstallImage, aParameter, nFlags); + ShutdownThread *pShutdownThread = new ShutdownThread( m_xContext ); + (void) pShutdownThread; } catch(const uno::Exception&) { m_aUpdateHandler->setErrorMessage( m_aUpdateHandler->getDefaultInstErrMsg() ); } |