include/rtl/bootstrap.h          |    7 +++----
 sal/rtl/bootstrap.cxx            |    9 +++------
 sw/source/uibase/uno/unoatxt.cxx |   31 ++++++++++++++++++++++++++-----
 3 files changed, 32 insertions(+), 15 deletions(-)

New commits:
commit 0d0137f4aebb350f93b21296a59c19829624221a
Author: Caolán McNamara <caol...@redhat.com>
Date:   Thu Sep 4 09:04:09 2014 +0100

    coverity#707336 Uncaught exception
    
    and
    
    coverity#707337 Uncaught exception
    
    Change-Id: Id6ad65e382d2a5b5f8d13a312384d715b47e95db

diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index 3aa4ba1..deb0019 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
 #include <osl/mutex.hxx>
 #include <osl/diagnose.h>
 #include <vcl/svapp.hxx>
@@ -427,11 +428,31 @@ uno::Reference< text::XAutoTextEntry >  
SwXAutoTextGroup::insertNewByName(const
         pGlossaries->PutGroupDoc( pGlosGroup );
     }
 
-    uno::Reference< text::XAutoTextEntry > xEntry = pGlossaries ?
-        pGlossaries->GetAutoTextEntry( m_sGroupName, sName, sShortName, true ) 
:
-        uno::Reference< text::XAutoTextEntry >();
-    OSL_ENSURE( xEntry.is(), "SwXAutoTextGroup::insertNewByName: no UNO object 
created? How this?" );
-        // we just inserted the entry into the group, so why doesn't it exist?
+    uno::Reference< text::XAutoTextEntry > xEntry;
+
+    try
+    {
+        xEntry = pGlossaries ?
+            pGlossaries->GetAutoTextEntry( m_sGroupName, sName, sShortName, 
true ) :
+            uno::Reference< text::XAutoTextEntry >();
+        OSL_ENSURE( xEntry.is(), "SwXAutoTextGroup::insertNewByName: no UNO 
object created? How this?" );
+            // we just inserted the entry into the group, so why doesn't it 
exist?
+    }
+    catch (const container::ElementExistException&)
+    {
+        throw;
+    }
+    catch (const uno::RuntimeException&)
+    {
+        throw;
+    }
+    catch (const uno::Exception& e)
+    {
+        throw css::lang::WrappedTargetRuntimeException(
+               "Error Getting AutoText!",
+               static_cast < OWeakObject * > ( this ),
+               makeAny( e ) );
+    }
 
     return xEntry;
 }
commit 91c0bdf0816a5e62f4fa6cad7587ce8db975425f
Author: Caolán McNamara <caol...@redhat.com>
Date:   Thu Sep 4 08:08:58 2014 +0100

    coverity#706611 Uncaught exception
    
    Change-Id: I42bff46998b3d516161068af3d53bf92ee2f2b15

diff --git a/include/rtl/bootstrap.h b/include/rtl/bootstrap.h
index 850aa7b..a4e109f 100644
--- a/include/rtl/bootstrap.h
+++ b/include/rtl/bootstrap.h
@@ -200,15 +200,14 @@ SAL_DLLPUBLIC void SAL_CALL 
rtl_bootstrap_get_iniName_from_handle(
     @param macro    [inout]  The macro to be expanded
 */
 SAL_DLLPUBLIC void SAL_CALL rtl_bootstrap_expandMacros_from_handle(
-    rtlBootstrapHandle handle, rtl_uString ** macro )
-    SAL_THROW_EXTERN_C();
+    rtlBootstrapHandle handle, rtl_uString ** macro );
+
 /** Expands a macro using default bootstrap variables.
 
     @param macro    [inout]  The macro to be expanded
 */
 SAL_DLLPUBLIC void SAL_CALL rtl_bootstrap_expandMacros(
-    rtl_uString ** macro )
-    SAL_THROW_EXTERN_C();
+    rtl_uString ** macro);
 
 /** Escapes special characters ("$" and "\").
 
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index cf5b9ca..2e99332 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -811,10 +811,9 @@ void SAL_CALL rtl_bootstrap_set (
     r_rtl_bootstrap_set_list.push_back( rtl_bootstrap_NameValue( name, value ) 
);
 }
 
-void SAL_CALL rtl_bootstrap_expandMacros_from_handle (
+void SAL_CALL rtl_bootstrap_expandMacros_from_handle(
     rtlBootstrapHandle handle,
-    rtl_uString     ** macro
-) SAL_THROW_EXTERN_C()
+    rtl_uString     ** macro)
 {
     if (handle == NULL) {
         handle = get_static_bootstrap_handle();
@@ -825,9 +824,7 @@ void SAL_CALL rtl_bootstrap_expandMacros_from_handle (
     rtl_uString_assign( macro, expanded.pData );
 }
 
-void SAL_CALL rtl_bootstrap_expandMacros(
-    rtl_uString ** macro )
-    SAL_THROW_EXTERN_C()
+void SAL_CALL rtl_bootstrap_expandMacros(rtl_uString ** macro)
 {
     rtl_bootstrap_expandMacros_from_handle(NULL, macro);
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to