Blob Blame History Raw
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index cd2e416..8919bbe 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -350,7 +350,7 @@ IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
         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::DEFAULTS );
+        xSystemShellExecute->execute( sURL, rtl::OUString(),  com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
     }
     catch ( uno::Exception& )
     {
diff --git a/cui/source/options/optimprove.cxx b/cui/source/options/optimprove.cxx
index b5f550f..2c660fa 100644
--- a/cui/source/options/optimprove.cxx
+++ b/cui/source/options/optimprove.cxx
@@ -153,7 +153,7 @@ IMPL_LINK( SvxImprovementDialog, HandleHyperlink, svt::FixedHyperlinkImage*, pHy
             if ( xSystemShell.is() )
             {
                 xSystemShell->execute(
-                    sURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
+                    sURL, ::rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );
             }
         }
         catch( const uno::Exception& e )
diff --git a/cui/source/options/optimprove2.cxx b/cui/source/options/optimprove2.cxx
index 132247d..b29ed8d 100644
--- a/cui/source/options/optimprove2.cxx
+++ b/cui/source/options/optimprove2.cxx
@@ -122,7 +122,7 @@ IMPL_LINK( SvxImprovementOptionsPage, HandleHyperlink, svt::FixedHyperlinkImage*
             if ( xSystemShell.is() )
             {
                 xSystemShell->execute(
-                    sURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
+                    sURL, ::rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );
             }
         }
         catch( const uno::Exception& e )
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index e245e36..6f3e0b0 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -159,7 +159,7 @@ static void lcl_OpenURL( ::rtl::OUString sURL )
                     RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),
                 uno::UNO_QUERY_THROW );
             if ( xSystemShell.is() )
-                xSystemShell->execute( sURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::DEFAULTS );
+                xSystemShell->execute( sURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY );
         }
         catch( const uno::Exception& e )
         {
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index b15e524..175bc07 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -1514,7 +1514,7 @@ UpdateCheck::showReleaseNote(const rtl::OUString& rURL) const
     try {
         
         if( xShellExecute.is() )
-            xShellExecute->execute(rURL, rtl::OUString(), c3s::SystemShellExecuteFlags::DEFAULTS);
+            xShellExecute->execute(rURL, rtl::OUString(), c3s::SystemShellExecuteFlags::URIS_ONLY);
     } catch(c3s::SystemShellExecuteException&) {
     }
 }
diff --git a/swext/mediawiki/src/com/sun/star/wiki/Helper.java b/swext/mediawiki/src/com/sun/star/wiki/Helper.java
index a94dfc0..7faf913 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/Helper.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/Helper.java
@@ -708,7 +708,7 @@ public class Helper
                 Object oSystemShell = xContext.getServiceManager().createInstanceWithContext( "com.sun.star.system.SystemShellExecute", xContext );
                 XSystemShellExecute xSystemShell = (XSystemShellExecute)UnoRuntime.queryInterface( XSystemShellExecute.class, oSystemShell );
                 if ( xSystemShell != null )
-                    xSystemShell.execute( sURL, "", SystemShellExecuteFlags.DEFAULTS );
+                    xSystemShell.execute( sURL, "", SystemShellExecuteFlags.URIS_ONLY );
             }
             catch( Exception e )
             {
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 7aa8dec..cef7263 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -632,7 +632,7 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle
         uno::Reference< XSystemShellExecute > xSystemShellExecute(
             m_xContext->getServiceManager()->createInstanceWithContext( OUSTR( "com.sun.star.system.SystemShellExecute" ), m_xContext), uno::UNO_QUERY_THROW);
         //throws css::lang::IllegalArgumentException, css::system::SystemShellExecuteException
-        xSystemShellExecute->execute( sURL, OUString(),  SystemShellExecuteFlags::DEFAULTS );
+        xSystemShellExecute->execute( sURL, OUString(),  SystemShellExecuteFlags::URIS_ONLY );
     }
     catch ( uno::Exception& )
     {
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 7040822..e553c48 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -1428,7 +1428,7 @@ IMPL_LINK( UpdateDialog, hyperlink_clicked, svt::FixedHyperlink*, pHyperlink )
                 m_context), uno::UNO_QUERY_THROW);
         //throws lang::IllegalArgumentException, system::SystemShellExecuteException
         xSystemShellExecute->execute(
-                                     sURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS);
+                                     sURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY);
     }
     catch (uno::Exception& )
     {
diff --git a/desktop/source/registration/com/sun/star/registration/Registration.java b/desktop/source/registration/com/sun/star/registration/Registration.java
index d00ed1d..0ee7a4f 100755
--- a/desktop/source/registration/com/sun/star/registration/Registration.java
+++ b/desktop/source/registration/com/sun/star/registration/Registration.java
@@ -116,7 +116,7 @@ public class Registration {
                 XSystemShellExecute xShellExecuteService = (XSystemShellExecute) 
                     UnoRuntime.queryInterface(XSystemShellExecute.class, o);
 
-                xShellExecuteService.execute( url, "", SystemShellExecuteFlags.DEFAULTS );
+                xShellExecuteService.execute( url, "", SystemShellExecuteFlags.URIS_ONLY );
             } catch (java.lang.Exception e) {
             }
        }            
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index f017966..6ef62db 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -886,7 +886,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID )
                     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::DEFAULTS);
+                    xSystemShellExecute->execute(m_aTempDumpURL, ::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY);
                 }
                 else
                     throw embed::UnreachableStateException();
diff --git a/framework/source/dispatch/mailtodispatcher.cxx b/framework/source/dispatch/mailtodispatcher.cxx
index 023b9c0..16cd51c 100644
--- a/framework/source/dispatch/mailtodispatcher.cxx
+++ b/framework/source/dispatch/mailtodispatcher.cxx
@@ -285,7 +285,7 @@ sal_Bool MailToDispatcher::implts_dispatch( const css::util::URL&
             // start mail client
             // Because there is no notofocation about success - we use case of
             // no detected exception as SUCCESS - FAILED otherwhise.
-            xSystemShellExecute->execute( aURL.Complete, ::rtl::OUString(), css::system::SystemShellExecuteFlags::DEFAULTS );
+            xSystemShellExecute->execute( aURL.Complete, ::rtl::OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY );
             bSuccess = sal_True;
         }
         catch (css::lang::IllegalArgumentException&)
diff --git a/framework/source/dispatch/systemexec.cxx b/framework/source/dispatch/systemexec.cxx
index f6dbbaf..5b8033e 100644
--- a/framework/source/dispatch/systemexec.cxx
+++ b/framework/source/dispatch/systemexec.cxx
@@ -194,7 +194,7 @@ void SAL_CALL SystemExec::dispatchWithNotification( const css::util::URL&
             xFactory->createInstance(SERVICENAME_SYSTEMSHELLEXECUTE),
             css::uno::UNO_QUERY_THROW);
 
-        xShell->execute(sSystemURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::DEFAULTS);
+        xShell->execute(sSystemURL, ::rtl::OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY);
         impl_notifyResultListener(xListener, css::frame::DispatchResultState::SUCCESS);
     }
     catch(const css::uno::Exception&)
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index bab072d..ab846d9 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -963,7 +963,7 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG )
                             rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),
                         UNO_QUERY_THROW);
                     //throws css::lang::IllegalArgumentException, css::system::SystemShellExecuteException
-                    xSystemShellExecute->execute( sURL, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS);
+                    xSystemShellExecute->execute( sURL, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY);
                 }
             }
         }
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index c9ec52c..db71e50 100755
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -116,6 +116,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
     sfx2/source/appl/module \
     sfx2/source/appl/newhelp \
     sfx2/source/appl/opengrf \
+    sfx2/source/appl/openuriexternally \
     sfx2/source/appl/sfxhelp \
     sfx2/source/appl/sfxpicklist \
     sfx2/source/appl/shutdownicon \
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 84f0cef..36d967a 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -41,9 +41,8 @@
 #include <com/sun/star/frame/XDispatchResultListener.hpp>
 #include <com/sun/star/util/URL.hpp>
 #include <com/sun/star/util/XURLTransformer.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecuteException.hpp>
 #include <com/sun/star/document/XTypeDetection.hpp>
-#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
 #include <com/sun/star/document/MacroExecMode.hpp>
 #include <com/sun/star/document/UpdateDocMode.hpp>
 #include <com/sun/star/task/ErrorCodeRequest.hpp>
@@ -111,6 +110,7 @@
 
 #define _SVSTDARR_STRINGSDTOR
 #include <svl/svstdarr.hxx>
+#include "openuriexternally.hxx"
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::beans;
@@ -118,7 +118,6 @@ using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::system;
 using namespace ::com::sun::star::task;
 using namespace ::com::sun::star::container;
 using namespace ::cppu;
@@ -960,140 +959,100 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
             if (!pFilter || !lcl_isFilterNativelySupported(*pFilter))
             {
                 // hyperlink does not link to own type => special handling (http, ftp) browser and (other external protocols) OS
-                Reference< XSystemShellExecute > xSystemShellExecute( ::comphelper::getProcessServiceFactory()->createInstance(
-                                                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))), UNO_QUERY );
-                if ( xSystemShellExecute.is() )
+                if ( aINetProtocol == INET_PROT_MAILTO )
                 {
-                    if ( aINetProtocol == INET_PROT_MAILTO )
-                    {
-                        // don't dispatch mailto hyperlink to desktop dispatcher
-                        rReq.RemoveItem( SID_TARGETNAME );
-                        rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_self") ) );
-                    }
-                    else if ( aINetProtocol == INET_PROT_FTP ||
-                         aINetProtocol == INET_PROT_HTTP ||
-                         aINetProtocol == INET_PROT_HTTPS )
-                    {
-                        try
-                        {
-                            // start browser
-                            ::rtl::OUString aURLString( aURL.Complete );
-                            xSystemShellExecute->execute( aURLString, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
-                        }
-                        catch ( ::com::sun::star::lang::IllegalArgumentException& )
-                        {
-                            SolarMutexGuard aGuard;
-                            Window *pWindow = SFX_APP()->GetTopWindow();
-                            ErrorBox( pWindow, SfxResId( MSG_ERR_NO_WEBBROWSER_FOUND )).Execute();
-                        }
-                        catch ( ::com::sun::star::system::SystemShellExecuteException& )
-                        {
-                            SolarMutexGuard aGuard;
-                            Window *pWindow = SFX_APP()->GetTopWindow();
-                            ErrorBox( pWindow, SfxResId( MSG_ERR_NO_WEBBROWSER_FOUND )).Execute();
-                        }
-
-                        return;
-                    }
-                    else
-                    {
-                        // check for "internal" protocols that should not be forwarded to the system
-                        Sequence < ::rtl::OUString > aProtocols(2);
+                    // don't dispatch mailto hyperlink to desktop dispatcher
+                    rReq.RemoveItem( SID_TARGETNAME );
+                    rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_self") ) );
+                }
+                else if ( aINetProtocol == INET_PROT_FTP ||
+                     aINetProtocol == INET_PROT_HTTP ||
+                     aINetProtocol == INET_PROT_HTTPS )
+                {
+                    sfx2::openUriExternally(aURL.Complete, true);
+                    return;
+                }
+                else
+                {
+                    // check for "internal" protocols that should not be forwarded to the system
+                    Sequence < ::rtl::OUString > aProtocols(2);
 
-                        // add special protocols that always should be treated as internal
-                        aProtocols[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:*"));
-                        aProtocols[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.*"));
+                    // add special protocols that always should be treated as internal
+                    aProtocols[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:*"));
+                    aProtocols[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.*"));
 
-                        try
+                    try
+                    {
+                        // get registered protocol handlers from configuration
+                        Reference < XNameAccess > xAccess( ::comphelper::ConfigurationHelper::openConfig( ::comphelper::getProcessServiceFactory(),
+                            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.ProtocolHandler/HandlerSet")), ::comphelper::ConfigurationHelper::E_READONLY ), UNO_QUERY );
+                        if ( xAccess.is() )
                         {
-                            // get registered protocol handlers from configuration
-                            Reference < XNameAccess > xAccess( ::comphelper::ConfigurationHelper::openConfig( ::comphelper::getProcessServiceFactory(),
-                                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.ProtocolHandler/HandlerSet")), ::comphelper::ConfigurationHelper::E_READONLY ), UNO_QUERY );
-                            if ( xAccess.is() )
+                            Sequence < ::rtl::OUString > aNames = xAccess->getElementNames();
+                            for ( sal_Int32 nName = 0; nName < aNames.getLength(); nName ++)
                             {
-                                Sequence < ::rtl::OUString > aNames = xAccess->getElementNames();
-                                for ( sal_Int32 nName = 0; nName < aNames.getLength(); nName ++)
+                                Reference < XPropertySet > xSet;
+                                Any aRet = xAccess->getByName( aNames[nName] );
+                                aRet >>= xSet;
+                                if ( xSet.is() )
                                 {
-                                    Reference < XPropertySet > xSet;
-                                    Any aRet = xAccess->getByName( aNames[nName] );
-                                    aRet >>= xSet;
-                                    if ( xSet.is() )
-                                    {
-                                        // copy protocols
-                                        aRet = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Protocols")) );
-                                        Sequence < ::rtl::OUString > aTmp;
-                                        aRet >>= aTmp;
-
-                                        // todo: add operator+= to SequenceAsVector class and use SequenceAsVector for aProtocols
-                                        sal_Int32 nLength = aProtocols.getLength();
-                                        aProtocols.realloc( nLength+aTmp.getLength() );
-                                        for ( sal_Int32 n=0; n<aTmp.getLength(); n++ )
-                                            aProtocols[(++nLength)-1] = aTmp[n];
-                                    }
+                                    // copy protocols
+                                    aRet = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Protocols")) );
+                                    Sequence < ::rtl::OUString > aTmp;
+                                    aRet >>= aTmp;
+
+                                    // todo: add operator+= to SequenceAsVector class and use SequenceAsVector for aProtocols
+                                    sal_Int32 nLength = aProtocols.getLength();
+                                    aProtocols.realloc( nLength+aTmp.getLength() );
+                                    for ( sal_Int32 n=0; n<aTmp.getLength(); n++ )
+                                        aProtocols[(++nLength)-1] = aTmp[n];
                                 }
                             }
                         }
-                        catch ( Exception& )
-                        {
-                            // registered protocols could not be read
-                        }
+                    }
+                    catch ( Exception& )
+                    {
+                        // registered protocols could not be read
+                    }
 
-                        sal_Bool bFound = sal_False;
-                        for ( sal_Int32 nProt=0; nProt<aProtocols.getLength(); nProt++ )
+                    sal_Bool bFound = sal_False;
+                    for ( sal_Int32 nProt=0; nProt<aProtocols.getLength(); nProt++ )
+                    {
+                        WildCard aPattern(aProtocols[nProt]);
+                        if ( aPattern.Matches( aURL.Complete ) )
                         {
-                            WildCard aPattern(aProtocols[nProt]);
-                            if ( aPattern.Matches( aURL.Complete ) )
-                            {
-                                bFound = sal_True;
-                                break;
-                            }
+                            bFound = sal_True;
+                            break;
                         }
+                    }
 
-                        if ( !bFound )
-                        {
-                            sal_Bool bLoadInternal = sal_False;
+                    if ( !bFound )
+                    {
+                        sal_Bool bLoadInternal = sal_False;
 
-                            // security reservation: => we have to check the referer before executing
-                            if (SFX_APP()->IsSecureURL(rtl::OUString(), &aReferer))
+                        // security reservation: => we have to check the referer before executing
+                        if (SFX_APP()->IsSecureURL(rtl::OUString(), &aReferer))
+                        {
+                            try
                             {
-                                ::rtl::OUString aURLString( aURL.Complete );
-
-                                try
-                                {
-                                    // give os this file
-                                    xSystemShellExecute->execute( aURLString, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
-                                }
-                                catch ( ::com::sun::star::lang::IllegalArgumentException& )
-                                {
-                                    SolarMutexGuard aGuard;
-                                    Window *pWindow = SFX_APP()->GetTopWindow();
-                                    ErrorBox( pWindow, SfxResId( MSG_ERR_NO_WEBBROWSER_FOUND )).Execute();
-                                }
-                                catch ( ::com::sun::star::system::SystemShellExecuteException& )
-                                {
-                                    if ( !pFilter )
-                                    {
-                                        SolarMutexGuard aGuard;
-                                        Window *pWindow = SFX_APP()->GetTopWindow();
-                                        ErrorBox( pWindow, SfxResId( MSG_ERR_NO_WEBBROWSER_FOUND )).Execute();
-                                    }
-                                    else
-                                    {
-                                        rReq.RemoveItem( SID_TARGETNAME );
-                                        rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_default") ) );
-                                        bLoadInternal = sal_True;
-                                    }
-                                }
+                                sfx2::openUriExternally(
+                                    aURL.Complete, pFilter == 0);
                             }
-                            else
+                            catch ( ::com::sun::star::system::SystemShellExecuteException& )
                             {
-                                SfxErrorContext aCtx( ERRCTX_SFX_OPENDOC, aURL.Complete );
-                                ErrorHandler::HandleError( ERRCODE_IO_ACCESSDENIED );
+                                rReq.RemoveItem( SID_TARGETNAME );
+                                rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_default") ) );
+                                bLoadInternal = sal_True;
                             }
-
-                            if ( !bLoadInternal )
-                                return;
                         }
+                        else
+                        {
+                            SfxErrorContext aCtx( ERRCTX_SFX_OPENDOC, aURL.Complete );
+                            ErrorHandler::HandleError( ERRCODE_IO_ACCESSDENIED );
+                        }
+
+                        if ( !bLoadInternal )
+                            return;
                     }
                 }
             }
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index ca10e6b..7912c54 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -981,7 +981,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
                     xSystemShell->execute(
                         aURLBuf.makeStringAndClear(),
                         ::rtl::OUString(),
-                        css::system::SystemShellExecuteFlags::DEFAULTS );
+                        css::system::SystemShellExecuteFlags::URIS_ONLY );
                 }
             }
             catch( const ::com::sun::star::uno::Exception& )
diff --git a/sfx2/source/appl/openuriexternally.cxx b/sfx2/source/appl/openuriexternally.cxx
new file mode 100644
index 0000000..db889ce
--- /dev/null
+++ b/sfx2/source/appl/openuriexternally.cxx
@@ -0,0 +1,99 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * [ Copyright (C) 2012 Red Hat, Inc., Stephan Bergmann <sbergman@redhat.com>
+ *   (initial developer) ]
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include "sal/config.h"
+
+#include "com/sun/star/lang/IllegalArgumentException.hpp"
+#include "com/sun/star/system/XSystemShellExecute.hpp"
+#include "com/sun/star/system/SystemShellExecuteException.hpp"
+#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/XInterface.hpp"
+#include "comphelper/processfactory.hxx"
+#include "rtl/ustring.h"
+#include "rtl/ustring.hxx"
+#include "sfx2/app.hxx"
+#include "sfx2/sfxresid.hxx"
+#include "vcl/msgbox.hxx"
+#include "vcl/svapp.hxx"
+
+#include "openuriexternally.hxx"
+
+#include "app.hrc"
+
+namespace {
+
+namespace css = com::sun::star;
+
+}
+
+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);
+    try {
+        exec->execute(
+            uri, rtl::OUString(),
+            css::system::SystemShellExecuteFlags::URIS_ONLY);
+        return true;
+    } catch (css::lang::IllegalArgumentException & e) {
+        if (e.ArgumentPosition != 0) {
+            throw css::uno::RuntimeException(
+                (rtl::OUString(
+                    RTL_CONSTASCII_USTRINGPARAM(
+                        "unexpected IllegalArgumentException: "))
+                 + e.Message),
+                css::uno::Reference< css::uno::XInterface >());
+        }
+        SolarMutexGuard g;
+        WarningBox wb(
+            SfxGetpApp()->GetTopWindow(),
+            SfxResId(RID_SECURITY_WARNING_NO_HYPERLINKS));
+        wb.SetText(SfxResId(RID_SECURITY_WARNING_TITLE));
+        wb.Execute();
+    } catch (css::system::SystemShellExecuteException &) {
+        if (!handleSystemShellExecuteException) {
+            throw;
+        }
+        SolarMutexGuard g;
+        ErrorBox(
+            SfxGetpApp()->GetTopWindow(),
+            SfxResId(MSG_ERR_NO_WEBBROWSER_FOUND)).
+            Execute();
+    }
+    return false;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 7eb6194..127fc22 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -747,7 +747,7 @@ static bool impl_showOnlineHelp( const String& rURL )
 
         if ( xSystemShell.is() )
         {
-            xSystemShell->execute( aHelpLink, rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
+            xSystemShell->execute( aHelpLink, rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );
             return true;
         }
     }
diff --git a/sfx2/source/inc/openuriexternally.hxx b/sfx2/source/inc/openuriexternally.hxx
new file mode 100644
index 0000000..79a05a8
--- /dev/null
+++ b/sfx2/source/inc/openuriexternally.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * [ Copyright (C) 2012 Red Hat, Inc., Stephan Bergmann <sbergman@redhat.com>
+ *   (initial developer) ]
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef INCLUDED_SFX2_SOURCE_INC_OPENURIEXTERNALLY_HXX
+#define INCLUDED_SFX2_SOURCE_INC_OPENURIEXTERNALLY_HXX
+
+#include "sal/config.h"
+
+namespace rtl { class OUString; }
+
+namespace sfx2 {
+
+/// Open a URI via com.sun.star.system.SystemShellExecute
+///
+/// Handles XSystemShellExecute.execute's IllegalArgumentException (throwing a
+/// RuntimeException if it is unexpected, i.e., not caused by the given uri not
+/// being an absolute URI reference).
+///
+/// Handles XSystemShellExecute.execute's SystemShellExecuteException unless the
+/// given handleSystemShellExecuteException is false (in which case the
+/// exception is re-thrown).
+///
+/// @return true iff execution was successful
+bool openUriExternally(
+    rtl::OUString const & uri, bool handleSystemShellExecuteException);
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/view/view.hrc b/sfx2/source/view/view.hrc
index cdeba10..ed91074 100755
--- a/sfx2/source/view/view.hrc
+++ b/sfx2/source/view/view.hrc
@@ -63,7 +63,7 @@
 
 #define MSG_QUERY_OPENASTEMPLATE			(RID_SFX_VIEW_START+41)
 #define MSG_CANT_CLOSE						(RID_SFX_VIEW_START+42)
-#define MSG_ERROR_NO_WEBBROWSER_FOUND       (RID_SFX_VIEW_START+43)
+
 #define TP_FRAMEPROPERTIES                  (RID_SFX_VIEW_START+44)
 
 #define FT_FRAMENAME					3
diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src
index ca066ea..51adee0 100644
--- a/sfx2/source/view/view.src
+++ b/sfx2/source/view/view.src
@@ -170,21 +170,3 @@ String STR_REPAIREDDOCUMENT
 {
     Text [ en-US ] = " (repaired document)" ;
 };
-
-ErrorBox MSG_ERROR_NO_WEBBROWSER_FOUND
-{
-    BUTTONS = WB_OK ;
-    DEFBUTTON = WB_DEF_OK ;
-    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." ;
-};
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 0ff6bf8..5b24c3f 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -41,8 +41,6 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/embed/EmbedStates.hpp>
 #include <com/sun/star/embed/EmbedMisc.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
-#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
 #include <com/sun/star/container/XContainerQuery.hpp>
 #include <com/sun/star/frame/XStorable.hpp>
 #include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
@@ -89,6 +87,7 @@
 #include "workwin.hxx"
 #include <sfx2/objface.hxx>
 #include <sfx2/docfilt.hxx>
+#include "openuriexternally.hxx"
 
 #include <comphelper/processfactory.hxx>
 
@@ -97,7 +96,6 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::system;
 using namespace ::cppu;
 namespace css = ::com::sun::star;
 
@@ -729,29 +727,8 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
                     return;
                 }
 
-                ::com::sun::star::uno::Reference< XSystemShellExecute > xSystemShellExecute( xSMGR->createInstance(
-                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))),
-                    css::uno::UNO_QUERY );
-
-                        sal_Bool bRet( sal_True );
-                if ( xSystemShellExecute.is() )
-                {
-                    try
-                    {
-                                xSystemShellExecute->execute(
-                                                    aFileURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
-                    }
-                    catch ( uno::Exception& )
-                    {
-                        SolarMutexGuard aGuard;
-                        Window *pParent = SFX_APP()->GetTopWindow();
-                                            ErrorBox( pParent, SfxResId( MSG_ERROR_NO_WEBBROWSER_FOUND )).Execute();
-                        bRet = sal_False;
-                    }
-                }
-
-                rReq.Done(bRet);
-                            break;
+                rReq.Done(sfx2::openUriExternally(aFileURL, true));
+                break;
             }
             else
             {
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index b6eb604..e5f1a2e 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -41,6 +41,7 @@
 #include <com/sun/star/util/XMacroExpander.hpp>
 #include <com/sun/star/uri/XExternalUriReferenceTranslator.hpp>
 #include <com/sun/star/uri/ExternalUriReferenceTranslator.hpp>
+#include <com/sun/star/uri/UriReferenceFactory.hpp>
 
 #include "uno/current_context.hxx"
 
@@ -78,6 +79,8 @@ using namespace cppu;
 
 namespace // private
 {
+    namespace css = com::sun::star;
+
     Sequence< OUString > SAL_CALL ShellExec_getSupportedServiceNames()
     {
         Sequence< OUString > aRet(1);
@@ -140,10 +143,10 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
     // DESKTOP_LAUNCH, see http://freedesktop.org/pipermail/xdg/2004-August/004489.html
     static const char *pDesktopLaunch = getenv( "DESKTOP_LAUNCH" );
     
-    // Check wether aCommand contains a document url or not
-    sal_Int32 nIndex = aCommand.indexOf( OUString( RTL_CONSTASCII_USTRINGPARAM(":/") ) );
-    
-    if( nIndex > 0 || 0 == aCommand.compareToAscii("mailto:", 7) )
+    // Check whether aCommand contains an absolute URI reference:
+    css::uno::Reference< css::uri::XUriReference > uri(
+        css::uri::UriReferenceFactory::create(m_xContext)->parse(aCommand));
+    if (uri.is() && uri->isAbsolute())
     {
         // It seems to be a url ..
         // We need to re-encode file urls because osl_getFileURLFromSystemPath converts
@@ -163,7 +166,29 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
         }
         
 #ifdef MACOSX
-        aBuffer.append("open");
+        //TODO: Using open(1) with an argument that syntactically is an absolute
+        // URI reference does not necessarily give expected results:
+        // 1  If the given URI reference matches a supported scheme (e.g.,
+        //  "mailto:foo"):
+        // 1.1  If it matches an existing pathname (relative to CWD):  Results
+        //  in "mailto:foo?\n[0]\tcancel\n[1]\tOpen the file\tmailto:foo\n[2]\t
+        //  Open the URL\tmailto:foo\n\nWhich did you mean? Cancelled." on
+        //  stderr and SystemShellExecuteException.
+        // 1.2  If it does not match an exitsting pathname (relative to CWD):
+        //  Results in the corresponding application being opened with the given
+        //  document (e.g., Mail with a New Message).
+        // 2  If the given URI reference does not match a supported scheme
+        //  (e.g., "foo:bar"):
+        // 2.1  If it matches an existing pathname (relative to CWD) pointing to
+        //  an executable:  Results in execution of that executable.
+        // 2.2  If it matches an existing pathname (relative to CWD) pointing to
+        //  a non-executable regular file:  Results in opening it in TextEdit.
+        // 2.3  If it matches an existing pathname (relative to CWD) pointing to
+        //  a directory:  Results in opening it in Finder.
+        // 2.4  If it does not match an exitsting pathname (relative to CWD):
+        //  Results in "The file /.../foo:bar does not exits." (where "/..." is
+        //  the CWD) on stderr and SystemShellExecuteException.
+        aBuffer.append("open --");
 #else
         // The url launchers are expected to be in the $OOO_BASE_DIR/program
         // directory:
@@ -260,6 +285,15 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
             aLaunchBuffer.append(" ");
             escapeForShell(aLaunchBuffer, OUStringToOString(aURL, osl_getThreadTextEncoding()));
         }
+    } else if ((nFlags & css::system::SystemShellExecuteFlags::URIS_ONLY) != 0)
+    {
+        throw css::lang::IllegalArgumentException(
+            (rtl::OUString(
+                RTL_CONSTASCII_USTRINGPARAM(
+                    "XSystemShellExecute.execute URIS_ONLY with non-absolute"
+                    " URI reference "))
+             + aCommand),
+            static_cast< cppu::OWeakObject * >(this), 0);
     } else {
         escapeForShell(aBuffer, OUStringToOString(aCommand, osl_getThreadTextEncoding()));
         aBuffer.append(" ");
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index 620d98f..53ab1cf 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -38,6 +38,7 @@
 #include <sal/macros.h>
 
 #include <com/sun/star/system/SystemShellExecuteFlags.hpp>
+#include <com/sun/star/uri/UriReferenceFactory.hpp>
 
 #define WIN32_LEAN_AND_MEAN
 #if defined _MSC_VER
@@ -81,6 +82,8 @@ using namespace cppu;
 
 namespace // private
 {
+    namespace css = com::sun::star;
+
     Sequence< OUString > SAL_CALL SysShExec_getSupportedServiceNames()
     {
         Sequence< OUString > aRet(1);
@@ -264,8 +267,9 @@ namespace // private
 // 
 //-----------------------------------------------------------------------------------------
 
-CSysShExec::CSysShExec( ) : 
-    WeakComponentImplHelper2< XSystemShellExecute, XServiceInfo >( m_aMutex )
+CSysShExec::CSysShExec( const Reference< css::uno::XComponentContext >& xContext ) :
+    WeakComponentImplHelper2< XSystemShellExecute, XServiceInfo >( m_aMutex ),
+    m_xContext(xContext)
 {	
     /*
      * As this service is declared thread-affine, it is ensured to be called from a
@@ -292,12 +296,28 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
             static_cast< XSystemShellExecute* >( this ),
             1 );
 
-    if (!(nFlags >= DEFAULTS && nFlags <= NO_SYSTEM_ERROR_MESSAGE))
+    if ((nFlags & ~(NO_SYSTEM_ERROR_MESSAGE | URIS_ONLY)) != 0)
         throw IllegalArgumentException(
             OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid Flags specified")),
             static_cast< XSystemShellExecute* >( this ),
             3 );
 
+    if ((nFlags & URIS_ONLY) != 0)
+    {
+        css::uno::Reference< css::uri::XUriReference > uri(
+            css::uri::UriReferenceFactory::create(m_xContext)->parse(aCommand));
+        if (!(uri.is() && uri->isAbsolute()))
+        {
+            throw css::lang::IllegalArgumentException(
+                (rtl::OUString(
+                    RTL_CONSTASCII_USTRINGPARAM(
+                        "XSystemShellExecute.execute URIS_ONLY with"
+                        " non-absolute URI reference "))
+                 + aCommand),
+                static_cast< cppu::OWeakObject * >(this), 0);
+        }
+    }
+
     /*  #i4789#; jump mark detection on system paths
         if the given command is a system path (not http or
         other uri schemes) and seems to have a jump mark
diff --git a/shell/source/win32/SysShExec.hxx b/shell/source/win32/SysShExec.hxx
index 928d519..99e5a88 100644
--- a/shell/source/win32/SysShExec.hxx
+++ b/shell/source/win32/SysShExec.hxx
@@ -36,6 +36,7 @@
 #include <cppuhelper/compbase2.hxx>
 #include <osl/mutex.hxx>
 #include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
 
 #include <com/sun/star/system/XSystemShellExecute.hpp>
 
@@ -55,8 +56,11 @@ class CSysShExec :
             com::sun::star::system::XSystemShellExecute,
             com::sun::star::lang::XServiceInfo >
 {
+    ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+    m_xContext;
+
 public:
-    CSysShExec( );
+    CSysShExec(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext);
 
     //------------------------------------------------
     // XSystemShellExecute
diff --git a/shell/source/win32/SysShentry.cxx b/shell/source/win32/SysShentry.cxx
index ea0e547..09ab0e5 100644
--- a/shell/source/win32/SysShentry.cxx
+++ b/shell/source/win32/SysShentry.cxx
@@ -63,9 +63,9 @@ using com::sun::star::system::XSystemShellExecute;
 
 namespace
 {
-    Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& )
+    Reference< XInterface > SAL_CALL createInstance( const Reference< XComponentContext >& xContext )
     {		
-        return Reference< XInterface >( static_cast< XSystemShellExecute* >( new CSysShExec( ) ) );
+        return Reference< XInterface >( static_cast< XSystemShellExecute* >( new CSysShExec(xContext) ) );
     }
 }
 
@@ -91,19 +91,18 @@ void SAL_CALL component_getImplementationEnvironment(
 // returns a factory to create XFilePicker-Services
 //----------------------------------------------------------------------
 
-void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ )
+void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface*, uno_Interface* /*pRegistryKey*/ )
 {
     void* pRet = 0;
 
-    if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, SYSSHEXEC_IMPL_NAME ) ) )
+    if ( 0 == rtl_str_compare( pImplName, SYSSHEXEC_IMPL_NAME ) )
     {
         Sequence< OUString > aSNS( 1 );
         aSNS.getArray( )[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( SYSSHEXEC_SERVICE_NAME ));
                 
-        Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory(
-            reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
-            OUString::createFromAscii( pImplName ),
+        Reference< XSingleComponentFactory > xFactory ( createSingleComponentFactory(
             createInstance,
+            OUString::createFromAscii( pImplName ),
             aSNS ) );
         if ( xFactory.is() )
         {
diff --git a/uui/source/newerverwarn.cxx b/uui/source/newerverwarn.cxx
index ed86042..cd15b01 100644
--- a/uui/source/newerverwarn.cxx
+++ b/uui/source/newerverwarn.cxx
@@ -113,7 +113,7 @@ IMPL_LINK( NewerVersionWarningDialog, UpdateHdl, PushButton*, EMPTYARG )
             if ( xSystemShell.is() && sNotifyURL.getLength() )
             {
                 xSystemShell->execute(
-                    sNotifyURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
+                    sNotifyURL, ::rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );
             }
         }
         else
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 9691a4f..6170586 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -2004,7 +2004,7 @@ IMPL_LINK ( SvtDocumentTemplateDialog, OpenLinkHdl_Impl, svt::FixedHyperlink*, E
                     RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),
                 uno::UNO_QUERY_THROW );
             if ( xSystemShell.is() )
-                xSystemShell->execute( sURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
+                xSystemShell->execute( sURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
             EndDialog( RET_CANCEL );
         }
         catch( const uno::Exception& e )
diff --git a/svtools/source/productregistration/productregistration.cxx b/svtools/source/productregistration/productregistration.cxx
index c820099..6e304d8 100644
--- a/svtools/source/productregistration/productregistration.cxx
+++ b/svtools/source/productregistration/productregistration.cxx
@@ -413,7 +413,7 @@ namespace svt
 
             if ( xSystemShell.is() && sRegistrationURL.getLength() )
             {
-                xSystemShell->execute( sRegistrationURL, OUString(), SystemShellExecuteFlags::DEFAULTS );
+                xSystemShell->execute( sRegistrationURL, OUString(), SystemShellExecuteFlags::URIS_ONLY );
                 bSuccess = sal_True;
             }
         }
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 96c991b..bc2430a 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2981,7 +2981,7 @@ void VCLXFixedHyperlink::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve
                     {
                         // start browser
                         xSystemShellExecute->execute(
-                            sURL, ::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
+                            sURL, ::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
                     }
                     catch( uno::Exception& )
                     {
diff --git a/autodoc/source/parser_i/idoc/docu_pe2.cxx b/autodoc/source/parser_i/idoc/docu_pe2.cxx
index 45adb29..3b1ca0d 100644
--- a/autodoc/source/parser_i/idoc/docu_pe2.cxx
+++ b/autodoc/source/parser_i/idoc/docu_pe2.cxx
@@ -616,7 +616,8 @@ bool
 SapiDocu_PE::CheckVersionSyntax_OOo(const String & i_versionPart1)
 {
     return      i_versionPart1 == "OOo"
-            OR  i_versionPart1 == "OpenOffice.org";
+            OR  i_versionPart1 == "OpenOffice.org"
+            OR  i_versionPart1 == "LibreOffice";
 }
 
 bool
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
index 17bea5d..75a6147 100644
--- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
@@ -277,7 +277,7 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
                 try
                     
                 {
-                    xSystemShellExecute->execute( sURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
+                    xSystemShellExecute->execute( sURL, ::rtl::OUString(), SystemShellExecuteFlags::URIS_ONLY );
                 }    
                 catch( Exception& rEx )
                 {
diff --git a/offapi/com/sun/star/system/SystemShellExecuteFlags.idl b/offapi/com/sun/star/system/SystemShellExecuteFlags.idl
index 0b5719e..a1378d2 100644
--- a/offapi/com/sun/star/system/SystemShellExecuteFlags.idl
+++ b/offapi/com/sun/star/system/SystemShellExecuteFlags.idl
@@ -47,6 +47,12 @@ published constants SystemShellExecuteFlags
         method <member scope="com::sun::star::system">XSystemShellExecute::execute()</member> fails.
      */
     const long NO_SYSTEM_ERROR_MESSAGE = 1;
+
+    /** Only allows opening of absolute URI references.
+
+        @since LibreOffice 3.6
+     */
+    const long URIS_ONLY = 2;
 };	
 
 //=============================================================================
diff --git a/offapi/com/sun/star/system/XSystemShellExecute.idl b/offapi/com/sun/star/system/XSystemShellExecute.idl
index 22db7e9..00e1bd0 100644
--- a/offapi/com/sun/star/system/XSystemShellExecute.idl
+++ b/offapi/com/sun/star/system/XSystemShellExecute.idl
@@ -75,8 +75,10 @@ published interface XSystemShellExecute: com::sun::star::uno::XInterface
         avoid showing system error messages, in case of failures, etc.		
 
         @throws com::sun::star::lang::IllegalArgumentException 
-        when the specified flags are wrong or exclude each other.
-.		
+        when the specified flags are wrong or exclude each other; also thrown,
+        with an ArgumentPosition of 0, when nFlags contains URIS_ONLY and
+        aCommand is not an absolute URI reference
+
         @throws com::sun::star::sys::SystemExecuteException 
         in the case of errors when trying to executed the specified command.	
 
diff --git a/sw/source/ui/docvw/extedit.cxx b/sw/source/ui/docvw/extedit.cxx
index bf39575..10d3b2a 100644
--- a/sw/source/ui/docvw/extedit.cxx
+++ b/sw/source/ui/docvw/extedit.cxx
@@ -97,7 +97,7 @@ void pWorker(void *pThreadData)
     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( pData->fileName, rtl::OUString(),  com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
+    xSystemShellExecute->execute( pData->fileName, rtl::OUString(),  com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY );
 }
 
 void EditWithExternalTool(GraphicObject *pGraphicObject, SwWrtShell *rSh)