diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2013-01-04 18:58:16 +0000 |
---|---|---|
committer | Ariel Constenla-Haile <arielch@apache.org> | 2013-01-04 18:58:16 +0000 |
commit | be44a7a90ab5428ccdc924684dad463b36a8be48 (patch) | |
tree | 3e698350e79d4ea9252649f224d43c8177c01ad3 /cui | |
parent | ace4202dfa5f352ec24841c90c7affddd1cbb21c (diff) |
i121578 - Convert css.system.SystemShellExectue to new-style
Adapt the office code to use the new-style service constructor
Notes
Notes:
prefer: d26f3acf2874f64fd89c8197163651443d4b1733
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/about.cxx | 10 | ||||
-rw-r--r-- | cui/source/options/optimprove.cxx | 9 | ||||
-rw-r--r-- | cui/source/options/optimprove2.cxx | 9 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 9 |
4 files changed, 12 insertions, 25 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 71bec7a8cd75..b76deb2633cb 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -46,7 +46,7 @@ #include <vcl/tabpage.hxx> #include <com/sun/star/system/SystemShellExecuteFlags.hpp> -#include <com/sun/star/system/XSystemShellExecute.hpp> +#include <com/sun/star/system/SystemShellExecute.hpp> #include <com/sun/star/uno/Any.h> #include "about.hxx" @@ -532,13 +532,9 @@ IMPL_LINK ( AboutDialog, OpenLinkHdl_Impl, svt::FixedHyperlink*, EMPTYARG ) { try { - uno::Reference< uno::XComponentContext > xContext = - ::comphelper::getProcessComponentContext(); uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShell( - xContext->getServiceManager()->createInstanceWithContext( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ), - xContext ), - uno::UNO_QUERY_THROW ); + com::sun::star::system::SystemShellExecute::create( + ::comphelper::getProcessComponentContext() ) ); if ( xSystemShell.is() ) xSystemShell->execute( sURL, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS ); } diff --git a/cui/source/options/optimprove.cxx b/cui/source/options/optimprove.cxx index 54e06bab95d7..9b00c88e8ef1 100644 --- a/cui/source/options/optimprove.cxx +++ b/cui/source/options/optimprove.cxx @@ -38,7 +38,7 @@ #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/lang/XMultiServiceFactory.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/oooimprovement/XCoreController.hpp> #include <comphelper/configurationhelper.hxx> @@ -142,12 +142,9 @@ IMPL_LINK( SvxImprovementDialog, HandleHyperlink, svt::FixedHyperlinkImage*, pHy { try { - 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 ); + com::sun::star::system::SystemShellExecute::create( + ::comphelper::getProcessComponentContext() ) ); if ( xSystemShell.is() ) { xSystemShell->execute( diff --git a/cui/source/options/optimprove2.cxx b/cui/source/options/optimprove2.cxx index 5bf1c31bae6e..292d4591cdbb 100644 --- a/cui/source/options/optimprove2.cxx +++ b/cui/source/options/optimprove2.cxx @@ -40,7 +40,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/oooimprovement/XCore.hpp> #include <com/sun/star/oooimprovement/XCoreController.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/XStringSubstitution.hpp> #include <comphelper/configurationhelper.hxx> @@ -111,12 +111,9 @@ IMPL_LINK( SvxImprovementOptionsPage, HandleHyperlink, svt::FixedHyperlinkImage* { try { - 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 ); + com::sun::star::system::SystemShellExecute::create( + ::comphelper::getProcessComponentContext() ) ); if ( xSystemShell.is() ) { xSystemShell->execute( diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 6af076f238cb..180aa80e736c 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -54,7 +54,7 @@ #include <com/sun/star/linguistic2/XDictionaryList.hpp> #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/ucb/CommandAbortedException.hpp> -#include <com/sun/star/system/XSystemShellExecute.hpp> +#include <com/sun/star/system/SystemShellExecute.hpp> #include <com/sun/star/system/SystemShellExecuteFlags.hpp> #include <unotools/extendedsecurityoptions.hxx> #include <svtools/svlbox.hxx> @@ -148,12 +148,9 @@ static void lcl_OpenURL( const ::rtl::OUString& rURL ) { try { - uno::Reference< lang::XMultiServiceFactory > xSMGR = - ::comphelper::getProcessServiceFactory(); uno::Reference< css::system::XSystemShellExecute > xSystemShell( - xSMGR->createInstance( ::rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ), - uno::UNO_QUERY_THROW ); + css::system::SystemShellExecute::create( + ::comphelper::getProcessComponentContext() ) ); if ( xSystemShell.is() ) xSystemShell->execute( rURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::DEFAULTS ); } |