[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - svx/source

Michael Stahl mstahl at redhat.com
Mon Jan 19 04:30:04 PST 2015


 svx/source/core/extedit.cxx |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit b55ec68268f72eee291cef29731b59c8c83af361
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jan 19 12:36:21 2015 +0100

    svx: ExternalToolEdit: don't terminate if SystemShellExecute throws
    
    (cherry picked from commit 5e4dc857252c8eeaaa629af2fb6b392ab02036cf)
    
    Change-Id: Ia527a2c9467e2ab097cf688164f4176a52fa1d36
    Reviewed-on: https://gerrit.libreoffice.org/13997
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/core/extedit.cxx b/svx/source/core/extedit.cxx
index e32b163..1511fdf 100644
--- a/svx/source/core/extedit.cxx
+++ b/svx/source/core/extedit.cxx
@@ -87,9 +87,17 @@ public:
 
 void ExternalToolEditThread::execute()
 {
-    Reference<XSystemShellExecute> xSystemShellExecute(
-        SystemShellExecute::create( ::comphelper::getProcessComponentContext() ) );
-    xSystemShellExecute->execute(m_aFileName, OUString(), SystemShellExecuteFlags::URIS_ONLY);
+    try
+    {
+        Reference<XSystemShellExecute> const xSystemShellExecute(
+            SystemShellExecute::create( ::comphelper::getProcessComponentContext()));
+        xSystemShellExecute->execute(m_aFileName, OUString(),
+                SystemShellExecuteFlags::URIS_ONLY);
+    }
+    catch (Exception const& e)
+    {
+        SAL_WARN("svx", "ExternalToolEditThread: exception: " << e.Message);
+    }
 }
 
 void ExternalToolEdit::Edit(GraphicObject const*const pGraphicObject)


More information about the Libreoffice-commits mailing list