summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-29 07:45:05 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-03 15:55:05 +0200
commitbc00717bb7a2b48885ca356fb0a966acbe72dca9 (patch)
tree3eacf7bb54893d7380789d1a2e9ffbb759da16ba /desktop
parent7dd6c0a8372810f48e6bee35a11ac4ad0432640b (diff)
fdo#46808, Adapt system::SystemShellExecute UNO service to new style
Change-Id: Ib298b3219c3e89dd35bce0974846ed4888ed941e
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx11
2 files changed, 6 insertions, 9 deletions
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& )
{