d5dc242
From 4f1f9c6e6e6b07515bb601d7acbdb4705e266366 Mon Sep 17 00:00:00 2001
d5dc242
From: Stephan Bergmann <sbergman@redhat.com>
d5dc242
Date: Tue, 27 Mar 2012 13:56:12 +0200
d5dc242
Subject: [PATCH] Introduced SystemShellExecuteFlags::URIS_ONLY
d5dc242
d5dc242
(cherry-picked from commit d4b67611c421ebe9b75284106fe389b434419961)
d5dc242
Conflicts:
d5dc242
d5dc242
	extensions/source/update/check/updatecheck.cxx
d5dc242
	filter/source/xsltdialog/xmlfiltertestdialog.cxx
d5dc242
	sfx2/source/view/viewsh.cxx
d5dc242
	shell/source/unix/exec/shellexec.cxx
d5dc242
d5dc242
Replaced master's new MSG_ERR_NO_ABS_URI_REF with re-using
d5dc242
RID_SECURITY_WARNING_NO_HYPERLINKS, to avoid introducing new resources
d5dc242
into the LO 3.5 series that require localization.
d5dc242
d5dc242
New css.system.SystemShellExecuteFlags.URIS_ONLY remains @since
d5dc242
LibreOffice 3.6.  Officially, new features are only added when bumping
d5dc242
the minor revision number, not the micro one (but backporting does not
d5dc242
hurt here).
d5dc242
d5dc242
Signed-off-by: Michael Meeks <michael.meeks@suse.com>
d5dc242
---
d5dc242
 cui/source/dialogs/SpellDialog.cxx                 |    2 +-
d5dc242
 cui/source/dialogs/about.cxx                       |    2 +-
d5dc242
 cui/source/options/optimprove.cxx                  |    2 +-
d5dc242
 cui/source/options/optimprove2.cxx                 |    2 +-
d5dc242
 cui/source/options/optlingu.cxx                    |    2 +-
d5dc242
 desktop/source/deployment/gui/dp_gui_dialog2.cxx   |    2 +-
d5dc242
 .../source/deployment/gui/dp_gui_updatedialog.cxx  |    2 +-
d5dc242
 embeddedobj/source/msole/oleembed.cxx              |    2 +-
d5dc242
 extensions/source/update/check/updatecheck.cxx     |    2 +-
d5dc242
 framework/source/dispatch/mailtodispatcher.cxx     |    2 +-
d5dc242
 framework/source/dispatch/systemexec.cxx           |    2 +-
d5dc242
 framework/source/services/backingwindow.cxx        |    2 +-
d5dc242
 .../complextoolbarcontrols/MyProtocolHandler.cxx   |    2 +-
d5dc242
 .../sun/star/system/SystemShellExecuteFlags.idl    |    6 +
d5dc242
 offapi/com/sun/star/system/XSystemShellExecute.idl |    6 +-
d5dc242
 sfx2/Library_sfx.mk                                |    1 +
d5dc242
 sfx2/source/appl/appopen.cxx                       |  195 ++++++++------------
d5dc242
 sfx2/source/appl/appserv.cxx                       |    4 +-
d5dc242
 sfx2/source/appl/openuriexternally.cxx             |   99 ++++++++++
d5dc242
 sfx2/source/appl/sfxhelp.cxx                       |    2 +-
d5dc242
 sfx2/source/inc/openuriexternally.hxx              |   57 ++++++
d5dc242
 sfx2/source/view/view.hrc                          |    2 +-
d5dc242
 sfx2/source/view/view.src                          |   18 --
d5dc242
 sfx2/source/view/viewsh.cxx                        |   29 +---
d5dc242
 shell/source/unix/exec/shellexec.cxx               |   44 ++++-
d5dc242
 shell/source/win32/SysShExec.cxx                   |   26 +++-
d5dc242
 shell/source/win32/SysShExec.hxx                   |    6 +-
d5dc242
 shell/source/win32/SysShentry.cxx                  |   13 +-
d5dc242
 svtools/source/contnr/templwin.cxx                 |    2 +-
d5dc242
 sw/source/ui/docvw/extedit.cxx                     |    2 +-
d5dc242
 sw/source/ui/lingu/olmenu.cxx                      |    2 +-
d5dc242
 swext/mediawiki/src/com/sun/star/wiki/Helper.java  |    2 +-
d5dc242
 toolkit/source/awt/vclxwindows.cxx                 |    2 +-
d5dc242
 uui/source/newerverwarn.cxx                        |    2 +-
d5dc242
 34 files changed, 343 insertions(+), 203 deletions(-)
d5dc242
 create mode 100644 sfx2/source/appl/openuriexternally.cxx
d5dc242
 create mode 100644 sfx2/source/inc/openuriexternally.hxx
d5dc242
d5dc242
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
d5dc242
index feb6a7e..485105f 100644
d5dc242
--- a/cui/source/dialogs/SpellDialog.cxx
d5dc242
+++ b/cui/source/dialogs/SpellDialog.cxx
d5dc242
@@ -2147,7 +2147,7 @@ IMPL_LINK( SpellDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
d5dc242
         uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
d5dc242
             ::comphelper::getProcessServiceFactory()->createInstance(
d5dc242
                 DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW );
d5dc242
-        xSystemShellExecute->execute( sURL, rtl::OUString(),  com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
d5dc242
+        xSystemShellExecute->execute( sURL, rtl::OUString(),  com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
d5dc242
     }
d5dc242
     catch ( uno::Exception& )
d5dc242
     {
d5dc242
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
d5dc242
index 0355574..b327d72 100644
d5dc242
--- a/cui/source/dialogs/about.cxx
d5dc242
+++ b/cui/source/dialogs/about.cxx
d5dc242
@@ -267,7 +267,7 @@ IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
d5dc242
         uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
d5dc242
             ::comphelper::getProcessServiceFactory()->createInstance(
d5dc242
                 DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW );
d5dc242
-        xSystemShellExecute->execute( sURL, rtl::OUString(),  com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
d5dc242
+        xSystemShellExecute->execute( sURL, rtl::OUString(),  com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
d5dc242
     }
d5dc242
     catch ( uno::Exception& )
d5dc242
     {
d5dc242
diff --git a/cui/source/options/optimprove.cxx b/cui/source/options/optimprove.cxx
d5dc242
index 0937e59..d2fdd51 100644
d5dc242
--- a/cui/source/options/optimprove.cxx
d5dc242
+++ b/cui/source/options/optimprove.cxx
d5dc242
@@ -153,7 +153,7 @@ IMPL_LINK( SvxImprovementDialog, HandleHyperlink, svt::FixedHyperlinkImage*, pHy
d5dc242
             if ( xSystemShell.is() )
d5dc242
             {
d5dc242
                 xSystemShell->execute(
d5dc242
-                    sURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
d5dc242
+                    sURL, ::rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );
d5dc242
             }
d5dc242
         }
d5dc242
         catch( const uno::Exception& e )
d5dc242
diff --git a/cui/source/options/optimprove2.cxx b/cui/source/options/optimprove2.cxx
d5dc242
index 132247d..b29ed8d 100644
d5dc242
--- a/cui/source/options/optimprove2.cxx
d5dc242
+++ b/cui/source/options/optimprove2.cxx
d5dc242
@@ -122,7 +122,7 @@ IMPL_LINK( SvxImprovementOptionsPage, HandleHyperlink, svt::FixedHyperlinkImage*
d5dc242
             if ( xSystemShell.is() )
d5dc242
             {
d5dc242
                 xSystemShell->execute(
d5dc242
-                    sURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
d5dc242
+                    sURL, ::rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );
d5dc242
             }
d5dc242
         }
d5dc242
         catch( const uno::Exception& e )
d5dc242
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
d5dc242
index d716f7f..4847ab3 100644
d5dc242
--- a/cui/source/options/optlingu.cxx
d5dc242
+++ b/cui/source/options/optlingu.cxx
d5dc242
@@ -158,7 +158,7 @@ static void lcl_OpenURL( ::rtl::OUString sURL )
d5dc242
                     RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),
d5dc242
                 uno::UNO_QUERY_THROW );
d5dc242
             if ( xSystemShell.is() )
d5dc242
-                xSystemShell->execute( sURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::DEFAULTS );
d5dc242
+                xSystemShell->execute( sURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY );
d5dc242
         }
d5dc242
         catch( const uno::Exception& e )
d5dc242
         {
d5dc242
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
d5dc242
index 58e06ed..90c2544 100644
d5dc242
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
d5dc242
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
d5dc242
@@ -634,7 +634,7 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle
d5dc242
         uno::Reference< XSystemShellExecute > xSystemShellExecute(
d5dc242
             m_xContext->getServiceManager()->createInstanceWithContext( OUSTR( "com.sun.star.system.SystemShellExecute" ), m_xContext), uno::UNO_QUERY_THROW);
d5dc242
         //throws css::lang::IllegalArgumentException, css::system::SystemShellExecuteException
d5dc242
-        xSystemShellExecute->execute( sURL, OUString(),  SystemShellExecuteFlags::DEFAULTS );
d5dc242
+        xSystemShellExecute->execute( sURL, OUString(),  SystemShellExecuteFlags::URIS_ONLY );
d5dc242
     }
d5dc242
     catch ( const uno::Exception& )
d5dc242
     {
d5dc242
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
d5dc242
index b8dabbb..841db30 100644
d5dc242
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
d5dc242
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
d5dc242
@@ -1425,7 +1425,7 @@ IMPL_LINK( UpdateDialog, hyperlink_clicked, svt::FixedHyperlink*, pHyperlink )
d5dc242
                 m_context), uno::UNO_QUERY_THROW);
d5dc242
         //throws lang::IllegalArgumentException, system::SystemShellExecuteException
d5dc242
         xSystemShellExecute->execute(
d5dc242
-                                     sURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS);
d5dc242
+                                     sURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY);
d5dc242
     }
d5dc242
     catch ( const uno::Exception& )
d5dc242
     {
d5dc242
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
d5dc242
index 4c5b4ff8..32bc790 100644
d5dc242
--- a/embeddedobj/source/msole/oleembed.cxx
d5dc242
+++ b/embeddedobj/source/msole/oleembed.cxx
d5dc242
@@ -879,7 +879,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID )
d5dc242
                     uno::Reference< ::com::sun::star::system::XSystemShellExecute > xSystemShellExecute( m_xFactory->createInstance(
d5dc242
                         ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))),
d5dc242
                         uno::UNO_QUERY_THROW);
d5dc242
-                    xSystemShellExecute->execute(m_aTempDumpURL, ::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::DEFAULTS);
d5dc242
+                    xSystemShellExecute->execute(m_aTempDumpURL, ::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY);
d5dc242
                 }
d5dc242
                 else
d5dc242
                     throw embed::UnreachableStateException();
d5dc242
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
d5dc242
index c88ea82..6485a77 100644
d5dc242
--- a/extensions/source/update/check/updatecheck.cxx
d5dc242
+++ b/extensions/source/update/check/updatecheck.cxx
d5dc242
@@ -1512,7 +1512,7 @@ UpdateCheck::showReleaseNote(const rtl::OUString& rURL) const
d5dc242
     try {
d5dc242
 
d5dc242
         if( xShellExecute.is() )
d5dc242
-            xShellExecute->execute(rURL, rtl::OUString(), c3s::SystemShellExecuteFlags::DEFAULTS);
d5dc242
+            xShellExecute->execute(rURL, rtl::OUString(), c3s::SystemShellExecuteFlags::URIS_ONLY);
d5dc242
     } catch(c3s::SystemShellExecuteException&) {
d5dc242
     }
d5dc242
 }
d5dc242
diff --git a/framework/source/dispatch/mailtodispatcher.cxx b/framework/source/dispatch/mailtodispatcher.cxx
d5dc242
index 96ef8cd..0f7d7c1 100644
d5dc242
--- a/framework/source/dispatch/mailtodispatcher.cxx
d5dc242
+++ b/framework/source/dispatch/mailtodispatcher.cxx
d5dc242
@@ -283,7 +283,7 @@ sal_Bool MailToDispatcher::implts_dispatch( const css::util::URL&
d5dc242
             // start mail client
d5dc242
             // Because there is no notofocation about success - we use case of
d5dc242
             // no detected exception as SUCCESS - FAILED otherwhise.
d5dc242
-            xSystemShellExecute->execute( aURL.Complete, ::rtl::OUString(), css::system::SystemShellExecuteFlags::DEFAULTS );
d5dc242
+            xSystemShellExecute->execute( aURL.Complete, ::rtl::OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY );
d5dc242
             bSuccess = sal_True;
d5dc242
         }
d5dc242
         catch (css::lang::IllegalArgumentException&)
d5dc242
diff --git a/framework/source/dispatch/systemexec.cxx b/framework/source/dispatch/systemexec.cxx
d5dc242
index e516a38..d3f5e78 100644
d5dc242
--- a/framework/source/dispatch/systemexec.cxx
d5dc242
+++ b/framework/source/dispatch/systemexec.cxx
d5dc242
@@ -192,7 +192,7 @@ void SAL_CALL SystemExec::dispatchWithNotification( const css::util::URL&
d5dc242
             xFactory->createInstance(SERVICENAME_SYSTEMSHELLEXECUTE),
d5dc242
             css::uno::UNO_QUERY_THROW);
d5dc242
 
d5dc242
-        xShell->execute(sSystemURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::DEFAULTS);
d5dc242
+        xShell->execute(sSystemURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY);
d5dc242
         impl_notifyResultListener(xListener, css::frame::DispatchResultState::SUCCESS);
d5dc242
     }
d5dc242
     catch(const css::uno::Exception&)
d5dc242
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
d5dc242
index 290e7d3..697be90 100644
d5dc242
--- a/framework/source/services/backingwindow.cxx
d5dc242
+++ b/framework/source/services/backingwindow.cxx
d5dc242
@@ -943,7 +943,7 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG )
d5dc242
                             rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),
d5dc242
                         UNO_QUERY_THROW);
d5dc242
                     //throws css::lang::IllegalArgumentException, css::system::SystemShellExecuteException
d5dc242
-                    xSystemShellExecute->execute( sURL, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS);
d5dc242
+                    xSystemShellExecute->execute( sURL, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY);
d5dc242
                 }
d5dc242
             }
d5dc242
         }
d5dc242
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
d5dc242
index 1238cf9..e7d9336 100644
d5dc242
--- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
d5dc242
+++ b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
d5dc242
@@ -277,7 +277,7 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
d5dc242
                 try
d5dc242
 
d5dc242
                 {
d5dc242
-                    xSystemShellExecute->execute( sURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
d5dc242
+                    xSystemShellExecute->execute( sURL, ::rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );
d5dc242
                 }
d5dc242
                 catch( Exception& rEx )
d5dc242
                 {
d5dc242
diff --git a/offapi/com/sun/star/system/SystemShellExecuteFlags.idl b/offapi/com/sun/star/system/SystemShellExecuteFlags.idl
d5dc242
index cd93fa1..58950cb 100644
d5dc242
--- a/offapi/com/sun/star/system/SystemShellExecuteFlags.idl
d5dc242
+++ b/offapi/com/sun/star/system/SystemShellExecuteFlags.idl
d5dc242
@@ -47,6 +47,12 @@ published constants SystemShellExecuteFlags
d5dc242
         method <member scope="com::sun::star::system">XSystemShellExecute::execute()</member> fails.
d5dc242
      */
d5dc242
     const long NO_SYSTEM_ERROR_MESSAGE = 1;
d5dc242
+
d5dc242
+    /** Only allows opening of absolute URI references.
d5dc242
+
d5dc242
+        @since LibreOffice 3.6
d5dc242
+     */
d5dc242
+    const long URIS_ONLY = 2;
d5dc242
 };
d5dc242
 
d5dc242
 //=============================================================================
d5dc242
diff --git a/offapi/com/sun/star/system/XSystemShellExecute.idl b/offapi/com/sun/star/system/XSystemShellExecute.idl
d5dc242
index 4440b04..4813fb4 100644
d5dc242
--- a/offapi/com/sun/star/system/XSystemShellExecute.idl
d5dc242
+++ b/offapi/com/sun/star/system/XSystemShellExecute.idl
d5dc242
@@ -64,8 +64,10 @@ published interface XSystemShellExecute: com::sun::star::uno::XInterface
d5dc242
         avoid showing system error messages, in case of failures, etc.
d5dc242
 
d5dc242
         @throws com::sun::star::lang::IllegalArgumentException
d5dc242
-        when the specified flags are wrong or exclude each other.
d5dc242
-.
d5dc242
+        when the specified flags are wrong or exclude each other; also thrown,
d5dc242
+        with an ArgumentPosition of 0, when nFlags contains URIS_ONLY and
d5dc242
+        aCommand is not an absolute URI reference
d5dc242
+
d5dc242
         @throws com::sun::star::sys::SystemExecuteException
d5dc242
         in the case of errors when trying to executed the specified command.
d5dc242
 
d5dc242
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
d5dc242
index b8f5d37..2b636da 100644
d5dc242
--- a/sfx2/Library_sfx.mk
d5dc242
+++ b/sfx2/Library_sfx.mk
d5dc242
@@ -116,6 +116,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
d5dc242
     sfx2/source/appl/module \
d5dc242
     sfx2/source/appl/newhelp \
d5dc242
     sfx2/source/appl/opengrf \
d5dc242
+    sfx2/source/appl/openuriexternally \
d5dc242
     sfx2/source/appl/sfxhelp \
d5dc242
     sfx2/source/appl/sfxpicklist \
d5dc242
     sfx2/source/appl/shutdownicon \
d5dc242
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
d5dc242
index 54b9b26..257668a 100644
d5dc242
--- a/sfx2/source/appl/appopen.cxx
d5dc242
+++ b/sfx2/source/appl/appopen.cxx
d5dc242
@@ -39,9 +39,8 @@
d5dc242
 #include <com/sun/star/frame/XDispatchResultListener.hpp>
d5dc242
 #include <com/sun/star/util/URL.hpp>
d5dc242
 #include <com/sun/star/util/XURLTransformer.hpp>
d5dc242
-#include <com/sun/star/system/XSystemShellExecute.hpp>
d5dc242
+#include <com/sun/star/system/SystemShellExecuteException.hpp>
d5dc242
 #include <com/sun/star/document/XTypeDetection.hpp>
d5dc242
-#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
d5dc242
 #include <com/sun/star/document/MacroExecMode.hpp>
d5dc242
 #include <com/sun/star/document/UpdateDocMode.hpp>
d5dc242
 #include <com/sun/star/task/ErrorCodeRequest.hpp>
d5dc242
@@ -110,6 +109,7 @@
d5dc242
 
d5dc242
 #define _SVSTDARR_STRINGSDTOR
d5dc242
 #include <svl/svstdarr.hxx>
d5dc242
+#include "openuriexternally.hxx"
d5dc242
 
d5dc242
 using namespace ::com::sun::star;
d5dc242
 using namespace ::com::sun::star::beans;
d5dc242
@@ -117,7 +117,6 @@ using namespace ::com::sun::star::frame;
d5dc242
 using namespace ::com::sun::star::lang;
d5dc242
 using namespace ::com::sun::star::uno;
d5dc242
 using namespace ::com::sun::star::util;
d5dc242
-using namespace ::com::sun::star::system;
d5dc242
 using namespace ::com::sun::star::task;
d5dc242
 using namespace ::com::sun::star::container;
d5dc242
 using namespace ::cppu;
d5dc242
@@ -961,140 +960,100 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
d5dc242
             if (!pFilter || !lcl_isFilterNativelySupported(*pFilter))
d5dc242
             {
d5dc242
                 // hyperlink does not link to own type => special handling (http, ftp) browser and (other external protocols) OS
d5dc242
-                Reference< XSystemShellExecute > xSystemShellExecute( ::comphelper::getProcessServiceFactory()->createInstance(
d5dc242
-                                                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))), UNO_QUERY );
d5dc242
-                if ( xSystemShellExecute.is() )
d5dc242
+                if ( aINetProtocol == INET_PROT_MAILTO )
d5dc242
                 {
d5dc242
-                    if ( aINetProtocol == INET_PROT_MAILTO )
d5dc242
-                    {
d5dc242
-                        // don't dispatch mailto hyperlink to desktop dispatcher
d5dc242
-                        rReq.RemoveItem( SID_TARGETNAME );
d5dc242
-                        rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_self") ) );
d5dc242
-                    }
d5dc242
-                    else if ( aINetProtocol == INET_PROT_FTP ||
d5dc242
-                         aINetProtocol == INET_PROT_HTTP ||
d5dc242
-                         aINetProtocol == INET_PROT_HTTPS )
d5dc242
-                    {
d5dc242
-                        try
d5dc242
-                        {
d5dc242
-                            // start browser
d5dc242
-                            ::rtl::OUString aURLString( aURL.Complete );
d5dc242
-                            xSystemShellExecute->execute( aURLString, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
d5dc242
-                        }
d5dc242
-                        catch ( ::com::sun::star::lang::IllegalArgumentException& )
d5dc242
-                        {
d5dc242
-                            SolarMutexGuard aGuard;
d5dc242
-                            Window *pWindow = SFX_APP()->GetTopWindow();
d5dc242
-                            ErrorBox( pWindow, SfxResId( MSG_ERR_NO_WEBBROWSER_FOUND )).Execute();
d5dc242
-                        }
d5dc242
-                        catch ( ::com::sun::star::system::SystemShellExecuteException& )
d5dc242
-                        {
d5dc242
-                            SolarMutexGuard aGuard;
d5dc242
-                            Window *pWindow = SFX_APP()->GetTopWindow();
d5dc242
-                            ErrorBox( pWindow, SfxResId( MSG_ERR_NO_WEBBROWSER_FOUND )).Execute();
d5dc242
-                        }
d5dc242
-
d5dc242
-                        return;
d5dc242
-                    }
d5dc242
-                    else
d5dc242
-                    {
d5dc242
-                        // check for "internal" protocols that should not be forwarded to the system
d5dc242
-                        Sequence < ::rtl::OUString > aProtocols(2);
d5dc242
+                    // don't dispatch mailto hyperlink to desktop dispatcher
d5dc242
+                    rReq.RemoveItem( SID_TARGETNAME );
d5dc242
+                    rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_self") ) );
d5dc242
+                }
d5dc242
+                else if ( aINetProtocol == INET_PROT_FTP ||
d5dc242
+                     aINetProtocol == INET_PROT_HTTP ||
d5dc242
+                     aINetProtocol == INET_PROT_HTTPS )
d5dc242
+                {
d5dc242
+                    sfx2::openUriExternally(aURL.Complete, true);
d5dc242
+                    return;
d5dc242
+                }
d5dc242
+                else
d5dc242
+                {
d5dc242
+                    // check for "internal" protocols that should not be forwarded to the system
d5dc242
+                    Sequence < ::rtl::OUString > aProtocols(2);
d5dc242
 
d5dc242
-                        // add special protocols that always should be treated as internal
d5dc242
-                        aProtocols[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:*"));
d5dc242
-                        aProtocols[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.*"));
d5dc242
+                    // add special protocols that always should be treated as internal
d5dc242
+                    aProtocols[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:*"));
d5dc242
+                    aProtocols[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.*"));
d5dc242
 
d5dc242
-                        try
d5dc242
+                    try
d5dc242
+                    {
d5dc242
+                        // get registered protocol handlers from configuration
d5dc242
+                        Reference < XNameAccess > xAccess( ::comphelper::ConfigurationHelper::openConfig( ::comphelper::getProcessServiceFactory(),
d5dc242
+                            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.ProtocolHandler/HandlerSet")), ::comphelper::ConfigurationHelper::E_READONLY ), UNO_QUERY );
d5dc242
+                        if ( xAccess.is() )
d5dc242
                         {
d5dc242
-                            // get registered protocol handlers from configuration
d5dc242
-                            Reference < XNameAccess > xAccess( ::comphelper::ConfigurationHelper::openConfig( ::comphelper::getProcessServiceFactory(),
d5dc242
-                                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.ProtocolHandler/HandlerSet")), ::comphelper::ConfigurationHelper::E_READONLY ), UNO_QUERY );
d5dc242
-                            if ( xAccess.is() )
d5dc242
+                            Sequence < ::rtl::OUString > aNames = xAccess->getElementNames();
d5dc242
+                            for ( sal_Int32 nName = 0; nName < aNames.getLength(); nName ++)
d5dc242
                             {
d5dc242
-                                Sequence < ::rtl::OUString > aNames = xAccess->getElementNames();
d5dc242
-                                for ( sal_Int32 nName = 0; nName < aNames.getLength(); nName ++)
d5dc242
+                                Reference < XPropertySet > xSet;
d5dc242
+                                Any aRet = xAccess->getByName( aNames[nName] );
d5dc242
+                                aRet >>= xSet;
d5dc242
+                                if ( xSet.is() )
d5dc242
                                 {
d5dc242
-                                    Reference < XPropertySet > xSet;
d5dc242
-                                    Any aRet = xAccess->getByName( aNames[nName] );
d5dc242
-                                    aRet >>= xSet;
d5dc242
-                                    if ( xSet.is() )
d5dc242
-                                    {
d5dc242
-                                        // copy protocols
d5dc242
-                                        aRet = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Protocols")) );
d5dc242
-                                        Sequence < ::rtl::OUString > aTmp;
d5dc242
-                                        aRet >>= aTmp;
d5dc242
-
d5dc242
-                                        // todo: add operator+= to SequenceAsVector class and use SequenceAsVector for aProtocols
d5dc242
-                                        sal_Int32 nLength = aProtocols.getLength();
d5dc242
-                                        aProtocols.realloc( nLength+aTmp.getLength() );
d5dc242
-                                        for ( sal_Int32 n=0; n
d5dc242
-                                            aProtocols[(++nLength)-1] = aTmp[n];
d5dc242
-                                    }
d5dc242
+                                    // copy protocols
d5dc242
+                                    aRet = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Protocols")) );
d5dc242
+                                    Sequence < ::rtl::OUString > aTmp;
d5dc242
+                                    aRet >>= aTmp;
d5dc242
+
d5dc242
+                                    // todo: add operator+= to SequenceAsVector class and use SequenceAsVector for aProtocols
d5dc242
+                                    sal_Int32 nLength = aProtocols.getLength();
d5dc242
+                                    aProtocols.realloc( nLength+aTmp.getLength() );
d5dc242
+                                    for ( sal_Int32 n=0; n
d5dc242
+                                        aProtocols[(++nLength)-1] = aTmp[n];
d5dc242
                                 }
d5dc242
                             }
d5dc242
                         }
d5dc242
-                        catch ( Exception& )
d5dc242
-                        {
d5dc242
-                            // registered protocols could not be read
d5dc242
-                        }
d5dc242
+                    }
d5dc242
+                    catch ( Exception& )
d5dc242
+                    {
d5dc242
+                        // registered protocols could not be read
d5dc242
+                    }
d5dc242
 
d5dc242
-                        sal_Bool bFound = sal_False;
d5dc242
-                        for ( sal_Int32 nProt=0; nProt
d5dc242
+                    sal_Bool bFound = sal_False;
d5dc242
+                    for ( sal_Int32 nProt=0; nProt
d5dc242
+                    {
d5dc242
+                        WildCard aPattern(aProtocols[nProt]);
d5dc242
+                        if ( aPattern.Matches( aURL.Complete ) )
d5dc242
                         {
d5dc242
-                            WildCard aPattern(aProtocols[nProt]);
d5dc242
-                            if ( aPattern.Matches( aURL.Complete ) )
d5dc242
-                            {
d5dc242
-                                bFound = sal_True;
d5dc242
-                                break;
d5dc242
-                            }
d5dc242
+                            bFound = sal_True;
d5dc242
+                            break;
d5dc242
                         }
d5dc242
+                    }
d5dc242
 
d5dc242
-                        if ( !bFound )
d5dc242
-                        {
d5dc242
-                            sal_Bool bLoadInternal = sal_False;
d5dc242
+                    if ( !bFound )
d5dc242
+                    {
d5dc242
+                        sal_Bool bLoadInternal = sal_False;
d5dc242
 
d5dc242
-                            // security reservation: => we have to check the referer before executing
d5dc242
-                            if (SFX_APP()->IsSecureURL(rtl::OUString(), &aReferer))
d5dc242
+                        // security reservation: => we have to check the referer before executing
d5dc242
+                        if (SFX_APP()->IsSecureURL(rtl::OUString(), &aReferer))
d5dc242
+                        {
d5dc242
+                            try
d5dc242
                             {
d5dc242
-                                ::rtl::OUString aURLString( aURL.Complete );
d5dc242
-
d5dc242
-                                try
d5dc242
-                                {
d5dc242
-                                    // give os this file
d5dc242
-                                    xSystemShellExecute->execute( aURLString, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
d5dc242
-                                }
d5dc242
-                                catch ( ::com::sun::star::lang::IllegalArgumentException& )
d5dc242
-                                {
d5dc242
-                                    SolarMutexGuard aGuard;
d5dc242
-                                    Window *pWindow = SFX_APP()->GetTopWindow();
d5dc242
-                                    ErrorBox( pWindow, SfxResId( MSG_ERR_NO_WEBBROWSER_FOUND )).Execute();
d5dc242
-                                }
d5dc242
-                                catch ( ::com::sun::star::system::SystemShellExecuteException& )
d5dc242
-                                {
d5dc242
-                                    if ( !pFilter )
d5dc242
-                                    {
d5dc242
-                                        SolarMutexGuard aGuard;
d5dc242
-                                        Window *pWindow = SFX_APP()->GetTopWindow();
d5dc242
-                                        ErrorBox( pWindow, SfxResId( MSG_ERR_NO_WEBBROWSER_FOUND )).Execute();
d5dc242
-                                    }
d5dc242
-                                    else
d5dc242
-                                    {
d5dc242
-                                        rReq.RemoveItem( SID_TARGETNAME );
d5dc242
-                                        rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_default") ) );
d5dc242
-                                        bLoadInternal = sal_True;
d5dc242
-                                    }
d5dc242
-                                }
d5dc242
+                                sfx2::openUriExternally(
d5dc242
+                                    aURL.Complete, pFilter == 0);
d5dc242
                             }
d5dc242
-                            else
d5dc242
+                            catch ( ::com::sun::star::system::SystemShellExecuteException& )
d5dc242
                             {
d5dc242
-                                SfxErrorContext aCtx( ERRCTX_SFX_OPENDOC, aURL.Complete );
d5dc242
-                                ErrorHandler::HandleError( ERRCODE_IO_ACCESSDENIED );
d5dc242
+                                rReq.RemoveItem( SID_TARGETNAME );
d5dc242
+                                rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_default") ) );
d5dc242
+                                bLoadInternal = sal_True;
d5dc242
                             }
d5dc242
-
d5dc242
-                            if ( !bLoadInternal )
d5dc242
-                                return;
d5dc242
                         }
d5dc242
+                        else
d5dc242
+                        {
d5dc242
+                            SfxErrorContext aCtx( ERRCTX_SFX_OPENDOC, aURL.Complete );
d5dc242
+                            ErrorHandler::HandleError( ERRCODE_IO_ACCESSDENIED );
d5dc242
+                        }
d5dc242
+
d5dc242
+                        if ( !bLoadInternal )
d5dc242
+                            return;
d5dc242
                     }
d5dc242
                 }
d5dc242
             }
d5dc242
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
d5dc242
index ad68da7..5b8bd18 100644
d5dc242
--- a/sfx2/source/appl/appserv.cxx
d5dc242
+++ b/sfx2/source/appl/appserv.cxx
d5dc242
@@ -369,7 +369,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
d5dc242
                 uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
d5dc242
                     ::comphelper::getProcessServiceFactory()->createInstance(
d5dc242
                         DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW );
d5dc242
-                xSystemShellExecute->execute( sURL, ::rtl::OUString(),  com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
d5dc242
+                xSystemShellExecute->execute( sURL, ::rtl::OUString(),  com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
d5dc242
             }
d5dc242
             catch ( uno::Exception& )
d5dc242
             {
d5dc242
@@ -977,7 +977,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
d5dc242
                     xSystemShell->execute(
d5dc242
                         aURLBuf.makeStringAndClear(),
d5dc242
                         ::rtl::OUString(),
d5dc242
-                        css::system::SystemShellExecuteFlags::DEFAULTS );
d5dc242
+                        css::system::SystemShellExecuteFlags::URIS_ONLY );
d5dc242
                 }
d5dc242
             }
d5dc242
             catch( const ::com::sun::star::uno::Exception& )
d5dc242
diff --git a/sfx2/source/appl/openuriexternally.cxx b/sfx2/source/appl/openuriexternally.cxx
d5dc242
new file mode 100644
d5dc242
index 0000000..db889ce
d5dc242
--- /dev/null
d5dc242
+++ b/sfx2/source/appl/openuriexternally.cxx
d5dc242
@@ -0,0 +1,99 @@
d5dc242
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
d5dc242
+/*
d5dc242
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
d5dc242
+ *
d5dc242
+ * The contents of this file are subject to the Mozilla Public License Version
d5dc242
+ * 1.1 (the "License"); you may not use this file except in compliance with
d5dc242
+ * the License or as specified alternatively below. You may obtain a copy of
d5dc242
+ * the License at http://www.mozilla.org/MPL/
d5dc242
+ *
d5dc242
+ * Software distributed under the License is distributed on an "AS IS" basis,
d5dc242
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
d5dc242
+ * for the specific language governing rights and limitations under the
d5dc242
+ * License.
d5dc242
+ *
d5dc242
+ * Major Contributor(s):
d5dc242
+ * [ Copyright (C) 2012 Red Hat, Inc., Stephan Bergmann <sbergman@redhat.com>
d5dc242
+ *   (initial developer) ]
d5dc242
+ *
d5dc242
+ * All Rights Reserved.
d5dc242
+ *
d5dc242
+ * For minor contributions see the git repository.
d5dc242
+ *
d5dc242
+ * Alternatively, the contents of this file may be used under the terms of
d5dc242
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
d5dc242
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
d5dc242
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
d5dc242
+ * instead of those above.
d5dc242
+ */
d5dc242
+
d5dc242
+#include "sal/config.h"
d5dc242
+
d5dc242
+#include "com/sun/star/lang/IllegalArgumentException.hpp"
d5dc242
+#include "com/sun/star/system/XSystemShellExecute.hpp"
d5dc242
+#include "com/sun/star/system/SystemShellExecuteException.hpp"
d5dc242
+#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
d5dc242
+#include "com/sun/star/uno/Reference.hxx"
d5dc242
+#include "com/sun/star/uno/RuntimeException.hpp"
d5dc242
+#include "com/sun/star/uno/XInterface.hpp"
d5dc242
+#include "comphelper/processfactory.hxx"
d5dc242
+#include "rtl/ustring.h"
d5dc242
+#include "rtl/ustring.hxx"
d5dc242
+#include "sfx2/app.hxx"
d5dc242
+#include "sfx2/sfxresid.hxx"
d5dc242
+#include "vcl/msgbox.hxx"
d5dc242
+#include "vcl/svapp.hxx"
d5dc242
+
d5dc242
+#include "openuriexternally.hxx"
d5dc242
+
d5dc242
+#include "app.hrc"
d5dc242
+
d5dc242
+namespace {
d5dc242
+
d5dc242
+namespace css = com::sun::star;
d5dc242
+
d5dc242
+}
d5dc242
+
d5dc242
+bool sfx2::openUriExternally(
d5dc242
+    rtl::OUString const & uri, bool handleSystemShellExecuteException)
d5dc242
+{
d5dc242
+    css::uno::Reference< css::system::XSystemShellExecute > exec(
d5dc242
+        comphelper::getProcessServiceFactory()->createInstance(
d5dc242
+            rtl::OUString(
d5dc242
+                RTL_CONSTASCII_USTRINGPARAM(
d5dc242
+                    "com.sun.star.system.SystemShellExecute"))),
d5dc242
+        css::uno::UNO_QUERY_THROW);
d5dc242
+    try {
d5dc242
+        exec->execute(
d5dc242
+            uri, rtl::OUString(),
d5dc242
+            css::system::SystemShellExecuteFlags::URIS_ONLY);
d5dc242
+        return true;
d5dc242
+    } catch (css::lang::IllegalArgumentException & e) {
d5dc242
+        if (e.ArgumentPosition != 0) {
d5dc242
+            throw css::uno::RuntimeException(
d5dc242
+                (rtl::OUString(
d5dc242
+                    RTL_CONSTASCII_USTRINGPARAM(
d5dc242
+                        "unexpected IllegalArgumentException: "))
d5dc242
+                 + e.Message),
d5dc242
+                css::uno::Reference< css::uno::XInterface >());
d5dc242
+        }
d5dc242
+        SolarMutexGuard g;
d5dc242
+        WarningBox wb(
d5dc242
+            SfxGetpApp()->GetTopWindow(),
d5dc242
+            SfxResId(RID_SECURITY_WARNING_NO_HYPERLINKS));
d5dc242
+        wb.SetText(SfxResId(RID_SECURITY_WARNING_TITLE));
d5dc242
+        wb.Execute();
d5dc242
+    } catch (css::system::SystemShellExecuteException &) {
d5dc242
+        if (!handleSystemShellExecuteException) {
d5dc242
+            throw;
d5dc242
+        }
d5dc242
+        SolarMutexGuard g;
d5dc242
+        ErrorBox(
d5dc242
+            SfxGetpApp()->GetTopWindow(),
d5dc242
+            SfxResId(MSG_ERR_NO_WEBBROWSER_FOUND)).
d5dc242
+            Execute();
d5dc242
+    }
d5dc242
+    return false;
d5dc242
+}
d5dc242
+
d5dc242
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
d5dc242
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
d5dc242
index 47f470e..b5650ac 100644
d5dc242
--- a/sfx2/source/appl/sfxhelp.cxx
d5dc242
+++ b/sfx2/source/appl/sfxhelp.cxx
d5dc242
@@ -693,7 +693,7 @@ static bool impl_showOnlineHelp( const String& rURL )
d5dc242
 
d5dc242
         if ( xSystemShell.is() )
d5dc242
         {
d5dc242
-            xSystemShell->execute( aHelpLink, rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
d5dc242
+            xSystemShell->execute( aHelpLink, rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );
d5dc242
             return true;
d5dc242
         }
d5dc242
     }
d5dc242
diff --git a/sfx2/source/inc/openuriexternally.hxx b/sfx2/source/inc/openuriexternally.hxx
d5dc242
new file mode 100644
d5dc242
index 0000000..79a05a8
d5dc242
--- /dev/null
d5dc242
+++ b/sfx2/source/inc/openuriexternally.hxx
d5dc242
@@ -0,0 +1,57 @@
d5dc242
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
d5dc242
+/*
d5dc242
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
d5dc242
+ *
d5dc242
+ * The contents of this file are subject to the Mozilla Public License Version
d5dc242
+ * 1.1 (the "License"); you may not use this file except in compliance with
d5dc242
+ * the License or as specified alternatively below. You may obtain a copy of
d5dc242
+ * the License at http://www.mozilla.org/MPL/
d5dc242
+ *
d5dc242
+ * Software distributed under the License is distributed on an "AS IS" basis,
d5dc242
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
d5dc242
+ * for the specific language governing rights and limitations under the
d5dc242
+ * License.
d5dc242
+ *
d5dc242
+ * Major Contributor(s):
d5dc242
+ * [ Copyright (C) 2012 Red Hat, Inc., Stephan Bergmann <sbergman@redhat.com>
d5dc242
+ *   (initial developer) ]
d5dc242
+ *
d5dc242
+ * All Rights Reserved.
d5dc242
+ *
d5dc242
+ * For minor contributions see the git repository.
d5dc242
+ *
d5dc242
+ * Alternatively, the contents of this file may be used under the terms of
d5dc242
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
d5dc242
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
d5dc242
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
d5dc242
+ * instead of those above.
d5dc242
+ */
d5dc242
+
d5dc242
+#ifndef INCLUDED_SFX2_SOURCE_INC_OPENURIEXTERNALLY_HXX
d5dc242
+#define INCLUDED_SFX2_SOURCE_INC_OPENURIEXTERNALLY_HXX
d5dc242
+
d5dc242
+#include "sal/config.h"
d5dc242
+
d5dc242
+namespace rtl { class OUString; }
d5dc242
+
d5dc242
+namespace sfx2 {
d5dc242
+
d5dc242
+/// Open a URI via com.sun.star.system.SystemShellExecute
d5dc242
+///
d5dc242
+/// Handles XSystemShellExecute.execute's IllegalArgumentException (throwing a
d5dc242
+/// RuntimeException if it is unexpected, i.e., not caused by the given uri not
d5dc242
+/// being an absolute URI reference).
d5dc242
+///
d5dc242
+/// Handles XSystemShellExecute.execute's SystemShellExecuteException unless the
d5dc242
+/// given handleSystemShellExecuteException is false (in which case the
d5dc242
+/// exception is re-thrown).
d5dc242
+///
d5dc242
+/// @return true iff execution was successful
d5dc242
+bool openUriExternally(
d5dc242
+    rtl::OUString const & uri, bool handleSystemShellExecuteException);
d5dc242
+
d5dc242
+}
d5dc242
+
d5dc242
+#endif
d5dc242
+
d5dc242
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
d5dc242
diff --git a/sfx2/source/view/view.hrc b/sfx2/source/view/view.hrc
d5dc242
index 3dce1ec..adcc3a8 100755
d5dc242
--- a/sfx2/source/view/view.hrc
d5dc242
+++ b/sfx2/source/view/view.hrc
d5dc242
@@ -63,7 +63,7 @@
d5dc242
 
d5dc242
 #define MSG_QUERY_OPENASTEMPLATE            (RID_SFX_VIEW_START+41)
d5dc242
 #define MSG_CANT_CLOSE                      (RID_SFX_VIEW_START+42)
d5dc242
-#define MSG_ERROR_NO_WEBBROWSER_FOUND       (RID_SFX_VIEW_START+43)
d5dc242
+
d5dc242
 #define TP_FRAMEPROPERTIES                  (RID_SFX_VIEW_START+44)
d5dc242
 
d5dc242
 #define FT_FRAMENAME                    3
d5dc242
diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src
d5dc242
index b4c09a0..40a6862 100644
d5dc242
--- a/sfx2/source/view/view.src
d5dc242
+++ b/sfx2/source/view/view.src
d5dc242
@@ -170,21 +170,3 @@ String STR_REPAIREDDOCUMENT
d5dc242
 {
d5dc242
     Text [ en-US ] = " (repaired document)" ;
d5dc242
 };
d5dc242
-
d5dc242
-ErrorBox MSG_ERROR_NO_WEBBROWSER_FOUND
d5dc242
-{
d5dc242
-    BUTTONS = WB_OK ;
d5dc242
-    DEFBUTTON = WB_DEF_OK ;
d5dc242
-    Message[ en-US ] = "%PRODUCTNAME could not find a web browser on your system. Please check your Desktop Preferences or install a web browser (for example, Mozilla) in the default  location requested during the browser installation." ;
d5dc242
-};
d5dc242
-
d5dc242
-
d5dc242
-
d5dc242
-
d5dc242
-
d5dc242
-
d5dc242
-
d5dc242
-
d5dc242
-
d5dc242
-
d5dc242
-
d5dc242
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
d5dc242
index d85b2c6..394d346 100644
d5dc242
--- a/sfx2/source/view/viewsh.cxx
d5dc242
+++ b/sfx2/source/view/viewsh.cxx
d5dc242
@@ -39,8 +39,6 @@
d5dc242
 #include <com/sun/star/beans/XPropertySet.hpp>
d5dc242
 #include <com/sun/star/embed/EmbedStates.hpp>
d5dc242
 #include <com/sun/star/embed/EmbedMisc.hpp>
d5dc242
-#include <com/sun/star/system/XSystemShellExecute.hpp>
d5dc242
-#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
d5dc242
 #include <com/sun/star/container/XContainerQuery.hpp>
d5dc242
 #include <com/sun/star/frame/XStorable.hpp>
d5dc242
 #include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
d5dc242
@@ -86,6 +84,7 @@
d5dc242
 #include "workwin.hxx"
d5dc242
 #include <sfx2/objface.hxx>
d5dc242
 #include <sfx2/docfilt.hxx>
d5dc242
+#include "openuriexternally.hxx"
d5dc242
 
d5dc242
 #include <comphelper/processfactory.hxx>
d5dc242
 
d5dc242
@@ -94,7 +93,6 @@ using namespace ::com::sun::star::uno;
d5dc242
 using namespace ::com::sun::star::frame;
d5dc242
 using namespace ::com::sun::star::beans;
d5dc242
 using namespace ::com::sun::star::util;
d5dc242
-using namespace ::com::sun::star::system;
d5dc242
 using namespace ::cppu;
d5dc242
 namespace css = ::com::sun::star;
d5dc242
 
d5dc242
@@ -729,29 +727,8 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
d5dc242
                     return;
d5dc242
                 }
d5dc242
 
d5dc242
-                ::com::sun::star::uno::Reference< XSystemShellExecute > xSystemShellExecute( xSMGR->createInstance(
d5dc242
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))),
d5dc242
-                    css::uno::UNO_QUERY );
d5dc242
-
d5dc242
-                        sal_Bool bRet( sal_True );
d5dc242
-                if ( xSystemShellExecute.is() )
d5dc242
-                {
d5dc242
-                    try
d5dc242
-                    {
d5dc242
-                                xSystemShellExecute->execute(
d5dc242
-                                                    aFileURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
d5dc242
-                    }
d5dc242
-                    catch (const uno::Exception&)
d5dc242
-                    {
d5dc242
-                        SolarMutexGuard aGuard;
d5dc242
-                        Window *pParent = SFX_APP()->GetTopWindow();
d5dc242
-                                            ErrorBox( pParent, SfxResId( MSG_ERROR_NO_WEBBROWSER_FOUND )).Execute();
d5dc242
-                        bRet = sal_False;
d5dc242
-                    }
d5dc242
-                }
d5dc242
-
d5dc242
-                rReq.Done(bRet);
d5dc242
-                            break;
d5dc242
+                rReq.Done(sfx2::openUriExternally(aFileURL, true));
d5dc242
+                break;
d5dc242
             }
d5dc242
             else
d5dc242
             {
d5dc242
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
d5dc242
index db4570f..97e37ee 100644
d5dc242
--- a/shell/source/unix/exec/shellexec.cxx
d5dc242
+++ b/shell/source/unix/exec/shellexec.cxx
d5dc242
@@ -39,6 +39,7 @@
d5dc242
 #include <com/sun/star/util/XMacroExpander.hpp>
d5dc242
 #include <com/sun/star/uri/XExternalUriReferenceTranslator.hpp>
d5dc242
 #include <com/sun/star/uri/ExternalUriReferenceTranslator.hpp>
d5dc242
+#include <com/sun/star/uri/UriReferenceFactory.hpp>
d5dc242
 
d5dc242
 #include "uno/current_context.hxx"
d5dc242
 
d5dc242
@@ -76,6 +77,8 @@ using namespace cppu;
d5dc242
 
d5dc242
 namespace // private
d5dc242
 {
d5dc242
+    namespace css = com::sun::star;
d5dc242
+
d5dc242
     Sequence< OUString > SAL_CALL ShellExec_getSupportedServiceNames()
d5dc242
     {
d5dc242
         Sequence< OUString > aRet(1);
d5dc242
@@ -132,10 +135,10 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
d5dc242
     // DESKTOP_LAUNCH, see http://freedesktop.org/pipermail/xdg/2004-August/004489.html
d5dc242
     static const char *pDesktopLaunch = getenv( "DESKTOP_LAUNCH" );
d5dc242
 
d5dc242
-    // Check wether aCommand contains a document url or not
d5dc242
-    sal_Int32 nIndex = aCommand.indexOf( OUString( RTL_CONSTASCII_USTRINGPARAM(":/") ) );
d5dc242
-
d5dc242
-    if( nIndex > 0 || 0 == aCommand.compareToAscii("mailto:", 7) )
d5dc242
+    // Check whether aCommand contains an absolute URI reference:
d5dc242
+    css::uno::Reference< css::uri::XUriReference > uri(
d5dc242
+        css::uri::UriReferenceFactory::create(m_xContext)->parse(aCommand));
d5dc242
+    if (uri.is() && uri->isAbsolute())
d5dc242
     {
d5dc242
         // It seems to be a url ..
d5dc242
         // We need to re-encode file urls because osl_getFileURLFromSystemPath converts
d5dc242
@@ -155,7 +158,29 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
d5dc242
         }
d5dc242
 
d5dc242
 #ifdef MACOSX
d5dc242
-        aBuffer.append("open");
d5dc242
+        //TODO: Using open(1) with an argument that syntactically is an absolute
d5dc242
+        // URI reference does not necessarily give expected results:
d5dc242
+        // 1  If the given URI reference matches a supported scheme (e.g.,
d5dc242
+        //  "mailto:foo"):
d5dc242
+        // 1.1  If it matches an existing pathname (relative to CWD):  Results
d5dc242
+        //  in "mailto:foo?\n[0]\tcancel\n[1]\tOpen the file\tmailto:foo\n[2]\t
d5dc242
+        //  Open the URL\tmailto:foo\n\nWhich did you mean? Cancelled." on
d5dc242
+        //  stderr and SystemShellExecuteException.
d5dc242
+        // 1.2  If it does not match an exitsting pathname (relative to CWD):
d5dc242
+        //  Results in the corresponding application being opened with the given
d5dc242
+        //  document (e.g., Mail with a New Message).
d5dc242
+        // 2  If the given URI reference does not match a supported scheme
d5dc242
+        //  (e.g., "foo:bar"):
d5dc242
+        // 2.1  If it matches an existing pathname (relative to CWD) pointing to
d5dc242
+        //  an executable:  Results in execution of that executable.
d5dc242
+        // 2.2  If it matches an existing pathname (relative to CWD) pointing to
d5dc242
+        //  a non-executable regular file:  Results in opening it in TextEdit.
d5dc242
+        // 2.3  If it matches an existing pathname (relative to CWD) pointing to
d5dc242
+        //  a directory:  Results in opening it in Finder.
d5dc242
+        // 2.4  If it does not match an exitsting pathname (relative to CWD):
d5dc242
+        //  Results in "The file /.../foo:bar does not exits." (where "/..." is
d5dc242
+        //  the CWD) on stderr and SystemShellExecuteException.
d5dc242
+        aBuffer.append("open --");
d5dc242
 #else
d5dc242
         // The url launchers are expected to be in the $BRAND_BASE_DIR/program
d5dc242
         // directory:
d5dc242
@@ -233,6 +258,15 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
d5dc242
             aLaunchBuffer.append(" ");
d5dc242
             escapeForShell(aLaunchBuffer, OUStringToOString(aURL, osl_getThreadTextEncoding()));
d5dc242
         }
d5dc242
+    } else if ((nFlags & css::system::SystemShellExecuteFlags::URIS_ONLY) != 0)
d5dc242
+    {
d5dc242
+        throw css::lang::IllegalArgumentException(
d5dc242
+            (rtl::OUString(
d5dc242
+                RTL_CONSTASCII_USTRINGPARAM(
d5dc242
+                    "XSystemShellExecute.execute URIS_ONLY with non-absolute"
d5dc242
+                    " URI reference "))
d5dc242
+             + aCommand),
d5dc242
+            static_cast< cppu::OWeakObject * >(this), 0);
d5dc242
     } else {
d5dc242
         escapeForShell(aBuffer, OUStringToOString(aCommand, osl_getThreadTextEncoding()));
d5dc242
         aBuffer.append(" ");
d5dc242
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
d5dc242
index c35e445..318b7f56 100644
d5dc242
--- a/shell/source/win32/SysShExec.cxx
d5dc242
+++ b/shell/source/win32/SysShExec.cxx
d5dc242
@@ -36,6 +36,7 @@
d5dc242
 #include <sal/macros.h>
d5dc242
 
d5dc242
 #include <com/sun/star/system/SystemShellExecuteFlags.hpp>
d5dc242
+#include <com/sun/star/uri/UriReferenceFactory.hpp>
d5dc242
 
d5dc242
 #define WIN32_LEAN_AND_MEAN
d5dc242
 #if defined _MSC_VER
d5dc242
@@ -79,6 +80,8 @@ using namespace cppu;
d5dc242
 
d5dc242
 namespace // private
d5dc242
 {
d5dc242
+    namespace css = com::sun::star;
d5dc242
+
d5dc242
     Sequence< OUString > SAL_CALL SysShExec_getSupportedServiceNames()
d5dc242
     {
d5dc242
         Sequence< OUString > aRet(1);
d5dc242
@@ -258,8 +261,9 @@ namespace // private
d5dc242
 
d5dc242
 //-----------------------------------------------------------------------------------------
d5dc242
 
d5dc242
-CSysShExec::CSysShExec( ) :
d5dc242
-    WeakComponentImplHelper2< XSystemShellExecute, XServiceInfo >( m_aMutex )
d5dc242
+CSysShExec::CSysShExec( const Reference< css::uno::XComponentContext >& xContext ) :
d5dc242
+    WeakComponentImplHelper2< XSystemShellExecute, XServiceInfo >( m_aMutex ),
d5dc242
+    m_xContext(xContext)
d5dc242
 {
d5dc242
     /*
d5dc242
      * As this service is declared thread-affine, it is ensured to be called from a
d5dc242
@@ -284,12 +288,28 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
d5dc242
             static_cast< XSystemShellExecute* >( this ),
d5dc242
             1 );
d5dc242
 
d5dc242
-    if (!(nFlags >= DEFAULTS && nFlags <= NO_SYSTEM_ERROR_MESSAGE))
d5dc242
+    if ((nFlags & ~(NO_SYSTEM_ERROR_MESSAGE | URIS_ONLY)) != 0)
d5dc242
         throw IllegalArgumentException(
d5dc242
             OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid Flags specified")),
d5dc242
             static_cast< XSystemShellExecute* >( this ),
d5dc242
             3 );
d5dc242
 
d5dc242
+    if ((nFlags & URIS_ONLY) != 0)
d5dc242
+    {
d5dc242
+        css::uno::Reference< css::uri::XUriReference > uri(
d5dc242
+            css::uri::UriReferenceFactory::create(m_xContext)->parse(aCommand));
d5dc242
+        if (!(uri.is() && uri->isAbsolute()))
d5dc242
+        {
d5dc242
+            throw css::lang::IllegalArgumentException(
d5dc242
+                (rtl::OUString(
d5dc242
+                    RTL_CONSTASCII_USTRINGPARAM(
d5dc242
+                        "XSystemShellExecute.execute URIS_ONLY with"
d5dc242
+                        " non-absolute URI reference "))
d5dc242
+                 + aCommand),
d5dc242
+                static_cast< cppu::OWeakObject * >(this), 0);
d5dc242
+        }
d5dc242
+    }
d5dc242
+
d5dc242
     /*  #i4789#; jump mark detection on system paths
d5dc242
         if the given command is a system path (not http or
d5dc242
         other uri schemes) and seems to have a jump mark
d5dc242
diff --git a/shell/source/win32/SysShExec.hxx b/shell/source/win32/SysShExec.hxx
d5dc242
index 84b9a74..3ba357f 100644
d5dc242
--- a/shell/source/win32/SysShExec.hxx
d5dc242
+++ b/shell/source/win32/SysShExec.hxx
d5dc242
@@ -36,6 +36,7 @@
d5dc242
 #include <cppuhelper/compbase2.hxx>
d5dc242
 #include <osl/mutex.hxx>
d5dc242
 #include <com/sun/star/lang/XServiceInfo.hpp>
d5dc242
+#include <com/sun/star/uno/XComponentContext.hpp>
d5dc242
 
d5dc242
 #include <com/sun/star/system/XSystemShellExecute.hpp>
d5dc242
 
d5dc242
@@ -55,8 +56,11 @@ class CSysShExec :
d5dc242
             com::sun::star::system::XSystemShellExecute,
d5dc242
             com::sun::star::lang::XServiceInfo >
d5dc242
 {
d5dc242
+    ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
d5dc242
+    m_xContext;
d5dc242
+
d5dc242
 public:
d5dc242
-    CSysShExec( );
d5dc242
+    CSysShExec(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext);
d5dc242
 
d5dc242
     //------------------------------------------------
d5dc242
     // XSystemShellExecute
d5dc242
diff --git a/shell/source/win32/SysShentry.cxx b/shell/source/win32/SysShentry.cxx
d5dc242
index 874be55..37a9367 100644
d5dc242
--- a/shell/source/win32/SysShentry.cxx
d5dc242
+++ b/shell/source/win32/SysShentry.cxx
d5dc242
@@ -59,9 +59,9 @@ using com::sun::star::system::XSystemShellExecute;
d5dc242
 
d5dc242
 namespace
d5dc242
 {
d5dc242
-    Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& )
d5dc242
+    Reference< XInterface > SAL_CALL createInstance( const Reference< XComponentContext >& xContext )
d5dc242
     {
d5dc242
-        return Reference< XInterface >( static_cast< XSystemShellExecute* >( new CSysShExec( ) ) );
d5dc242
+        return Reference< XInterface >( static_cast< XSystemShellExecute* >( new CSysShExec(xContext) ) );
d5dc242
     }
d5dc242
 }
d5dc242
 
d5dc242
@@ -72,19 +72,18 @@ extern "C"
d5dc242
 // returns a factory to create XFilePicker-Services
d5dc242
 //----------------------------------------------------------------------
d5dc242
 
d5dc242
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ )
d5dc242
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface*, uno_Interface* /*pRegistryKey*/ )
d5dc242
 {
d5dc242
     void* pRet = 0;
d5dc242
 
d5dc242
-    if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, SYSSHEXEC_IMPL_NAME ) ) )
d5dc242
+    if ( 0 == rtl_str_compare( pImplName, SYSSHEXEC_IMPL_NAME ) )
d5dc242
     {
d5dc242
         Sequence< OUString > aSNS( 1 );
d5dc242
         aSNS.getArray( )[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( SYSSHEXEC_SERVICE_NAME ));
d5dc242
 
d5dc242
-        Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory(
d5dc242
-            reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
d5dc242
-            OUString::createFromAscii( pImplName ),
d5dc242
+        Reference< XSingleComponentFactory > xFactory ( createSingleComponentFactory(
d5dc242
             createInstance,
d5dc242
+            OUString::createFromAscii( pImplName ),
d5dc242
             aSNS ) );
d5dc242
         if ( xFactory.is() )
d5dc242
         {
d5dc242
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
d5dc242
index 66f80a4..85292a5 100644
d5dc242
--- a/svtools/source/contnr/templwin.cxx
d5dc242
+++ b/svtools/source/contnr/templwin.cxx
d5dc242
@@ -1919,7 +1919,7 @@ IMPL_LINK ( SvtDocumentTemplateDialog, OpenLinkHdl_Impl, svt::FixedHyperlink*, E
d5dc242
                     RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),
d5dc242
                 uno::UNO_QUERY_THROW );
d5dc242
             if ( xSystemShell.is() )
d5dc242
-                xSystemShell->execute( sURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
d5dc242
+                xSystemShell->execute( sURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
d5dc242
             EndDialog( RET_CANCEL );
d5dc242
         }
d5dc242
         catch( const uno::Exception& e )
d5dc242
diff --git a/sw/source/ui/docvw/extedit.cxx b/sw/source/ui/docvw/extedit.cxx
d5dc242
index 1063682..98dc6aa 100644
d5dc242
--- a/sw/source/ui/docvw/extedit.cxx
d5dc242
+++ b/sw/source/ui/docvw/extedit.cxx
d5dc242
@@ -96,7 +96,7 @@ void pWorker(void *pThreadData)
d5dc242
     uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
d5dc242
             ::comphelper::getProcessServiceFactory()->createInstance(
d5dc242
                 DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW );
d5dc242
-    xSystemShellExecute->execute( pData->fileName, rtl::OUString(),  com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
d5dc242
+    xSystemShellExecute->execute( pData->fileName, rtl::OUString(),  com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
d5dc242
 }
d5dc242
 
d5dc242
 void EditWithExternalTool(GraphicObject *pGraphicObject, SwWrtShell *rSh)
d5dc242
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
d5dc242
index b85dfaa..51ee827 100644
d5dc242
--- a/sw/source/ui/lingu/olmenu.cxx
d5dc242
+++ b/sw/source/ui/lingu/olmenu.cxx
d5dc242
@@ -849,7 +849,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
d5dc242
                 ::comphelper::getProcessServiceFactory()->createInstance(
d5dc242
                     DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW );
d5dc242
             xSystemShellExecute->execute( sExplanationLink, rtl::OUString(),
d5dc242
-                    com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
d5dc242
+                    com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
d5dc242
         }
d5dc242
         catch (const uno::Exception&)
d5dc242
         {
d5dc242
diff --git a/swext/mediawiki/src/com/sun/star/wiki/Helper.java b/swext/mediawiki/src/com/sun/star/wiki/Helper.java
d5dc242
index 7ecd9ec..e392811 100644
d5dc242
--- a/swext/mediawiki/src/com/sun/star/wiki/Helper.java
d5dc242
+++ b/swext/mediawiki/src/com/sun/star/wiki/Helper.java
d5dc242
@@ -708,7 +708,7 @@ public class Helper
d5dc242
                 Object oSystemShell = xContext.getServiceManager().createInstanceWithContext( "com.sun.star.system.SystemShellExecute", xContext );
d5dc242
                 XSystemShellExecute xSystemShell = (XSystemShellExecute)UnoRuntime.queryInterface( XSystemShellExecute.class, oSystemShell );
d5dc242
                 if ( xSystemShell != null )
d5dc242
-                    xSystemShell.execute( sURL, "", SystemShellExecuteFlags.DEFAULTS );
d5dc242
+                    xSystemShell.execute( sURL, "", SystemShellExecuteFlags.URIS_ONLY );
d5dc242
             }
d5dc242
             catch( Exception e )
d5dc242
             {
d5dc242
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
d5dc242
index 2669f0f..c8c9edf 100644
d5dc242
--- a/toolkit/source/awt/vclxwindows.cxx
d5dc242
+++ b/toolkit/source/awt/vclxwindows.cxx
d5dc242
@@ -2979,7 +2979,7 @@ void VCLXFixedHyperlink::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve
d5dc242
                     {
d5dc242
                         // start browser
d5dc242
                         xSystemShellExecute->execute(
d5dc242
-                            sURL, ::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
d5dc242
+                            sURL, ::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
d5dc242
                     }
d5dc242
                     catch( uno::Exception& )
d5dc242
                     {
d5dc242
diff --git a/uui/source/newerverwarn.cxx b/uui/source/newerverwarn.cxx
d5dc242
index 2fd8be7..bcdfa60 100644
d5dc242
--- a/uui/source/newerverwarn.cxx
d5dc242
+++ b/uui/source/newerverwarn.cxx
d5dc242
@@ -113,7 +113,7 @@ IMPL_LINK( NewerVersionWarningDialog, UpdateHdl, PushButton*, EMPTYARG )
d5dc242
             if ( xSystemShell.is() && sNotifyURL.getLength() )
d5dc242
             {
d5dc242
                 xSystemShell->execute(
d5dc242
-                    sNotifyURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
d5dc242
+                    sNotifyURL, ::rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );
d5dc242
             }
d5dc242
         }
d5dc242
         else
d5dc242
-- 
d5dc242
1.7.7.6
d5dc242