[Libreoffice-commits] .: Branch 'libreoffice-3-6' - cppuhelper/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Jul 13 03:22:18 PDT 2012


 cppuhelper/source/defaultbootstrap.cxx |   24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

New commits:
commit 2714a433d6c52ebc5030c4b956ff0f06e1533e84
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jul 13 11:55:53 2012 +0200

    fdo#51143 Do not wrap CannotActivateFactoryException as DeploymentException
    
    ...as some client code catches just the former and thus fails now.  (This was a
    regression introduced with the recent cppuhelper/source/defaultbootstrap.cxx.)
    
    Change-Id: I8306797f8331d894ab4e7695478e3824e9f79197
    (cherry picked from commit 2e7702fb704133bad6a534a166e96599347cf6b4)
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx
index 4edd7a1..078ee29 100644
--- a/cppuhelper/source/defaultbootstrap.cxx
+++ b/cppuhelper/source/defaultbootstrap.cxx
@@ -872,15 +872,9 @@ void ServiceManager::loadImplementation(
         if (!prefix.isEmpty()) {
             prefix += "_";
         }
-        try {
-            f0 = cppu::loadSharedLibComponentFactory(
-                uri, rtl::OUString(), info->name, this,
-                css::uno::Reference< css::registry::XRegistryKey >(), prefix);
-        } catch (css::loader::CannotActivateFactoryException & e) {
-            throw css::uno::DeploymentException(
-                "Cannot activate implementation " + uri + ": " + e.Message,
-                static_cast< cppu::OWeakObject * >(this));
-        }
+        f0 = cppu::loadSharedLibComponentFactory(
+            uri, rtl::OUString(), info->name, this,
+            css::uno::Reference< css::registry::XRegistryKey >(), prefix);
     } else {
         SAL_INFO_IF(
             !info->prefix.isEmpty(), "cppuhelper",
@@ -900,15 +894,9 @@ void ServiceManager::loadImplementation(
         css::uno::Reference< css::loader::XImplementationLoader > loader(
             smgr->createInstanceWithContext(info->loader, ctxt),
             css::uno::UNO_QUERY_THROW);
-        try {
-            f0 = loader->activate(
-                info->name, rtl::OUString(), uri,
-                css::uno::Reference< css::registry::XRegistryKey >());
-        } catch (css::loader::CannotActivateFactoryException & e) {
-            throw css::uno::DeploymentException(
-                "Cannot activate implementation " + uri + ": " + e.Message,
-                static_cast< cppu::OWeakObject * >(this));
-        }
+        f0 = loader->activate(
+            info->name, rtl::OUString(), uri,
+            css::uno::Reference< css::registry::XRegistryKey >());
     }
     factory1->set(f0, css::uno::UNO_QUERY);
     if (!factory1->is()) {


More information about the Libreoffice-commits mailing list