diff options
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 9 | ||||
-rw-r--r-- | cui/source/dialogs/about.cxx | 10 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 13 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 11 | ||||
-rw-r--r-- | embeddedobj/source/msole/oleembed.cxx | 9 | ||||
-rw-r--r-- | extensions/source/update/check/updatecheck.cxx | 9 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertestdialog.cxx | 10 | ||||
-rw-r--r-- | framework/source/services/backingwindow.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/appl/openuriexternally.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 13 | ||||
-rw-r--r-- | svtools/source/contnr/templwin.cxx | 14 | ||||
-rw-r--r-- | svx/source/core/extedit.cxx | 7 | ||||
-rw-r--r-- | sw/source/ui/lingu/olmenu.cxx | 7 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindows.cxx | 9 | ||||
-rw-r--r-- | uui/source/newerverwarn.cxx | 12 |
17 files changed, 68 insertions, 99 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index e71256943cc5..834d31e11735 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -49,7 +49,7 @@ #include <com/sun/star/linguistic2/SpellFailure.hpp> #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/system/SystemShellExecuteFlags.hpp> -#include <com/sun/star/system/XSystemShellExecute.hpp> +#include <com/sun/star/system/SystemShellExecute.hpp> #include <sfx2/app.hxx> #include <vcl/help.hxx> #include <vcl/graph.hxx> @@ -2174,10 +2174,9 @@ IMPL_LINK( SpellDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink ) return 1; try { - uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute( - ::comphelper::getProcessServiceFactory()->createInstance( - DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW ); - xSystemShellExecute->execute( sURL, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY ); + uno::Reference< system::XSystemShellExecute > xSystemShellExecute( + system::SystemShellExecute::create(::comphelper::getProcessComponentContext()) ); + xSystemShellExecute->execute( sURL, rtl::OUString(), system::SystemShellExecuteFlags::URIS_ONLY ); } catch ( uno::Exception& ) { diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index e25c72984213..9d5b4f1f19af 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -39,7 +39,7 @@ #include <svtools/langhelp.hxx> #include "com/sun/star/system/SystemShellExecuteFlags.hpp" -#include "com/sun/star/system/XSystemShellExecute.hpp" +#include "com/sun/star/system/SystemShellExecute.hpp" #include <comphelper/processfactory.hxx> #include "comphelper/anytostring.hxx" #include "cppuhelper/exc_hlp.hxx" @@ -133,11 +133,9 @@ IMPL_LINK( AboutDialog, HandleClick, PushButton*, pButton ) return 1; try { - Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute( - ::comphelper::getProcessServiceFactory()->createInstance( - DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), UNO_QUERY_THROW ); - xSystemShellExecute->execute( sURL, rtl::OUString(), - com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY ); + Reference< system::XSystemShellExecute > xSystemShellExecute( + system::SystemShellExecute::create(::comphelper::getProcessComponentContext() ) ); + xSystemShellExecute->execute( sURL, rtl::OUString(), system::SystemShellExecuteFlags::URIS_ONLY ); } catch (const Exception&) { diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 8ee3d37368ea..d26f97a1fd20 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -53,7 +53,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,14 +148,11 @@ static void lcl_OpenURL( ::rtl::OUString sURL ) localizeWebserviceURI(sURL); try { - uno::Reference< lang::XMultiServiceFactory > xSMGR = - ::comphelper::getProcessServiceFactory(); + uno::Reference< uno::XComponentContext > xContext = + ::comphelper::getProcessComponentContext(); uno::Reference< css::system::XSystemShellExecute > xSystemShell( - xSMGR->createInstance( ::rtl::OUString( - "com.sun.star.system.SystemShellExecute") ), - uno::UNO_QUERY_THROW ); - if ( xSystemShell.is() ) - xSystemShell->execute( sURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY ); + css::system::SystemShellExecute::create(xContext) ); + xSystemShell->execute( sURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY ); } catch( const uno::Exception& e ) { diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 87c25cb7035b..cb80e01ea78a 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -68,7 +68,7 @@ #include "com/sun/star/i18n/CollatorOptions.hpp" #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/ui/dialogs/ExecutableDialogResults.hpp" #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" @@ -632,7 +632,7 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle try { uno::Reference< XSystemShellExecute > xSystemShellExecute( - m_xContext->getServiceManager()->createInstanceWithContext( OUSTR( "com.sun.star.system.SystemShellExecute" ), m_xContext), uno::UNO_QUERY_THROW); + SystemShellExecute::create(m_xContext)); //throws css::lang::IllegalArgumentException, css::system::SystemShellExecuteException xSystemShellExecute->execute( sURL, OUString(), SystemShellExecuteFlags::URIS_ONLY ); } diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 6704da10192b..e79d94df7e0d 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -65,7 +65,7 @@ #include "com/sun/star/lang/XMultiComponentFactory.hpp" #include "com/sun/star/lang/XSingleServiceFactory.hpp" #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/task/XAbortChannel.hpp" #include "com/sun/star/task/XJob.hpp" #include "com/sun/star/ucb/CommandAbortedException.hpp" @@ -1413,13 +1413,10 @@ IMPL_LINK( UpdateDialog, hyperlink_clicked, svt::FixedHyperlink*, pHyperlink ) try { - uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute( - m_context->getServiceManager()->createInstanceWithContext( - OUSTR( "com.sun.star.system.SystemShellExecute" ), - m_context), uno::UNO_QUERY_THROW); + uno::Reference< system::XSystemShellExecute > xSystemShellExecute( + system::SystemShellExecute::create(m_context) ); //throws lang::IllegalArgumentException, system::SystemShellExecuteException - xSystemShellExecute->execute( - sURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY); + xSystemShellExecute->execute( sURL, ::rtl::OUString(), system::SystemShellExecuteFlags::URIS_ONLY); } catch ( const uno::Exception& ) { diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 1a65e1a5efdb..c57955f697db 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -49,7 +49,7 @@ #include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/system/XSystemShellExecute.hpp> +#include <com/sun/star/system/SystemShellExecute.hpp> #include <com/sun/star/system/SystemShellExecuteFlags.hpp> #include <rtl/logfile.hxx> @@ -878,10 +878,9 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) if (!m_aTempDumpURL.isEmpty()) { - uno::Reference< ::com::sun::star::system::XSystemShellExecute > xSystemShellExecute( m_xFactory->createInstance( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))), - uno::UNO_QUERY_THROW); - xSystemShellExecute->execute(m_aTempDumpURL, ::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY); + uno::Reference< system::XSystemShellExecute > xSystemShellExecute( + system::SystemShellExecute::create(comphelper::ComponentContext(m_xFactory).getUNOContext()) ); + xSystemShellExecute->execute(m_aTempDumpURL, ::rtl::OUString(), system::SystemShellExecuteFlags::URIS_ONLY); } else throw embed::UnreachableStateException(); diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 7832d8c15d87..c6fb071fd1ed 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -36,7 +36,7 @@ #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/DispatchResultEvent.hpp> #include <com/sun/star/frame/DispatchResultState.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/task/XJob.hpp> #include <com/sun/star/task/XJobExecutor.hpp> @@ -1486,13 +1486,10 @@ void UpdateCheck::showReleaseNote(const rtl::OUString& rURL) const { const uno::Reference< c3s::XSystemShellExecute > xShellExecute( - createService( UNISTRING( "com.sun.star.system.SystemShellExecute" ), m_xContext ), - uno::UNO_QUERY ); + c3s::SystemShellExecute::create( m_xContext ) ); try { - - if( xShellExecute.is() ) - xShellExecute->execute(rURL, rtl::OUString(), c3s::SystemShellExecuteFlags::URIS_ONLY); + xShellExecute->execute(rURL, rtl::OUString(), c3s::SystemShellExecuteFlags::URIS_ONLY); } catch(const c3s::SystemShellExecuteException&) { } } diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index c0e6b47495e0..ad0e65d3f894 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -43,8 +43,8 @@ #include <com/sun/star/document/XExporter.hpp> #include <com/sun/star/task/XInteractionHandler.hpp> -#include "com/sun/star/system/XSystemShellExecute.hpp" -#include "com/sun/star/system/SystemShellExecuteFlags.hpp" +#include <com/sun/star/system/SystemShellExecute.hpp> +#include <com/sun/star/system/SystemShellExecuteFlags.hpp> #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" #include <vcl/svapp.hxx> @@ -72,6 +72,7 @@ using namespace com::sun::star::frame; using namespace com::sun::star::task; using namespace com::sun::star::uno; using namespace com::sun::star::io; +using namespace com::sun::star::system; using namespace com::sun::star::xml; using namespace com::sun::star::xml::sax; @@ -566,8 +567,9 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp ) void XMLFilterTestDialog::displayXMLFile( const OUString& rURL ) { - ::com::sun::star::uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(comphelper::getProcessServiceFactory()->createInstance(DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), com::sun::star::uno::UNO_QUERY_THROW ); - xSystemShellExecute->execute( rURL, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY ); + Reference< XSystemShellExecute > xSystemShellExecute( + SystemShellExecute::create(comphelper::getProcessComponentContext()) ); + xSystemShellExecute->execute( rURL, rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY ); } void XMLFilterTestDialog::onImportBrowse() diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index 019619e773e3..560330c1abae 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -62,7 +62,7 @@ #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/container/XNameAccess.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/task/XJobExecutor.hpp" #include "com/sun/star/util/XStringWidth.hpp" @@ -877,10 +877,8 @@ IMPL_LINK_NOARG(BackingWindow, ToolboxHdl) sURL = value.get<rtl::OUString> (); localizeWebserviceURI(sURL); - Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( "com.sun.star.system.SystemShellExecute" ) ), - UNO_QUERY_THROW); + Reference< system::XSystemShellExecute > xSystemShellExecute( + system::SystemShellExecute::create(comphelper::getProcessComponentContext())); //throws css::lang::IllegalArgumentException, css::system::SystemShellExecuteException xSystemShellExecute->execute( sURL, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY); } diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index f28418384d2b..c251d9797da0 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -33,7 +33,7 @@ #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/embed/ElementModes.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/system/SystemShellExecuteException.hpp> @@ -426,10 +426,9 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) ::rtl::OUString sURL("http://hub.libreoffice.org/file-a-bug/"); try { - uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute( - ::comphelper::getProcessServiceFactory()->createInstance( - DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW ); - xSystemShellExecute->execute( sURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY ); + uno::Reference< system::XSystemShellExecute > xSystemShellExecute( + system::SystemShellExecute::create(::comphelper::getProcessComponentContext()) ); + xSystemShellExecute->execute( sURL, ::rtl::OUString(), system::SystemShellExecuteFlags::URIS_ONLY ); } catch ( uno::Exception& ) { @@ -1039,9 +1038,10 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) { uno::Reference< lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory(); + uno::Reference< uno::XComponentContext > xContext = + ::comphelper::getProcessComponentContext(); uno::Reference< css::system::XSystemShellExecute > xSystemShell( - xSMGR->createInstance( DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute" ) ), - uno::UNO_QUERY_THROW ); + css::system::SystemShellExecute::create(xContext) ); // read repository URL from configuration ::rtl::OUString sTemplRepoURL = diff --git a/sfx2/source/appl/openuriexternally.cxx b/sfx2/source/appl/openuriexternally.cxx index 381946987844..b704b38cb649 100644 --- a/sfx2/source/appl/openuriexternally.cxx +++ b/sfx2/source/appl/openuriexternally.cxx @@ -30,7 +30,7 @@ #include "sal/config.h" #include "com/sun/star/lang/IllegalArgumentException.hpp" -#include "com/sun/star/system/XSystemShellExecute.hpp" +#include "com/sun/star/system/SystemShellExecute.hpp" #include "com/sun/star/system/SystemShellExecuteException.hpp" #include "com/sun/star/system/SystemShellExecuteFlags.hpp" #include "com/sun/star/uno/Reference.hxx" @@ -59,11 +59,7 @@ bool sfx2::openUriExternally( rtl::OUString const & uri, bool handleSystemShellExecuteException) { css::uno::Reference< css::system::XSystemShellExecute > exec( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.system.SystemShellExecute"))), - css::uno::UNO_QUERY_THROW); + css::system::SystemShellExecute::create(comphelper::getProcessComponentContext())); try { exec->execute( uri, rtl::OUString(), diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index eb6f06cef991..8f728c55349e 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -39,7 +39,7 @@ #include <com/sun/star/frame/FrameSearchFlag.hpp> #include <toolkit/helper/vclunohelper.hxx> #include <com/sun/star/frame/XModuleManager.hpp> -#include <com/sun/star/system/XSystemShellExecute.hpp> +#include <com/sun/star/system/SystemShellExecute.hpp> #include <com/sun/star/system/SystemShellExecuteFlags.hpp> #include <unotools/configmgr.hxx> #include <unotools/configitem.hxx> @@ -670,15 +670,10 @@ static bool impl_showOnlineHelp( const String& rURL ) try { Reference< XSystemShellExecute > xSystemShell( - ::comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( "com.sun.star.system.SystemShellExecute" ) ), - UNO_QUERY ); + SystemShellExecute::create(::comphelper::getProcessComponentContext()) ); - if ( xSystemShell.is() ) - { - xSystemShell->execute( aHelpLink, rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY ); - return true; - } + xSystemShell->execute( aHelpLink, rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY ); + return true; } catch (const Exception&) { 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 ) diff --git a/svx/source/core/extedit.cxx b/svx/source/core/extedit.cxx index 29cabefa5c40..52d6f57fce03 100644 --- a/svx/source/core/extedit.cxx +++ b/svx/source/core/extedit.cxx @@ -38,7 +38,7 @@ #include <vcl/graph.hxx> #include <vcl/cvtgrf.hxx> -#include "com/sun/star/system/XSystemShellExecute.hpp" +#include "com/sun/star/system/SystemShellExecute.hpp" #include "com/sun/star/system/SystemShellExecuteFlags.hpp" #include <comphelper/processfactory.hxx> @@ -89,9 +89,8 @@ void ExternalToolEdit::threadWorker(void* pThreadData) // getting changed Application::PostUserEvent( LINK( NULL, ExternalToolEdit, StartListeningEvent ), pThreadData); - uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute( - ::comphelper::getProcessServiceFactory()->createInstance( - DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW ); + uno::Reference< system::XSystemShellExecute > xSystemShellExecute( + system::SystemShellExecute::create(::comphelper::getProcessComponentContext() ) ); xSystemShellExecute->execute( pData->m_aFileName, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY ); } diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 7a4cdb95518b..4c5130a3c4d0 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -88,7 +88,7 @@ #include <com/sun/star/linguistic2/XSpellChecker1.hpp> #include <com/sun/star/uno/Any.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/ui/UICommandDescription.hpp> @@ -851,9 +851,8 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) { try { - uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute( - ::comphelper::getProcessServiceFactory()->createInstance( - DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW ); + uno::Reference< system::XSystemShellExecute > xSystemShellExecute( + system::SystemShellExecute::create( ::comphelper::getProcessComponentContext() ) ); xSystemShellExecute->execute( sExplanationLink, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY ); } diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 88ae10ad077e..4ba4fc2355cf 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -41,7 +41,7 @@ #include <cppuhelper/typeprovider.hxx> #include <com/sun/star/awt/VisualEffect.hpp> #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/resource/XStringResourceResolver.hpp> #include <com/sun/star/awt/ImageScaleMode.hpp> @@ -2961,10 +2961,9 @@ void VCLXFixedHyperlink::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve ::toolkit::FixedHyperlinkBase* pBase = (::toolkit::FixedHyperlinkBase*)GetWindow(); if ( pBase ) sURL = pBase->GetURL(); - Reference< ::com::sun::star::system::XSystemShellExecute > xSystemShellExecute( - ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString("com.sun.star.system.SystemShellExecute")), uno::UNO_QUERY ); - if ( !sURL.isEmpty() && xSystemShellExecute.is() ) + Reference< system::XSystemShellExecute > xSystemShellExecute( system::SystemShellExecute::create( + ::comphelper::getProcessComponentContext() ) ); + if ( !sURL.isEmpty() ) { try { 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 ); |