[Libreoffice-commits] core.git: canvas/source

Stephan Bergmann sbergman at redhat.com
Tue Apr 2 06:22:47 PDT 2013


 canvas/source/factory/cf_service.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 67d724e46579462d906477f52cf7919338bab834
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Apr 2 15:16:22 2013 +0200

    Adapt code to IllegalArgumentException being a RuntimeException
    
    ...since 31170413ae3786bf44564e813d7291354e939a77 "API CHANGE:
    com.sun.star.lang.IllegalArgumentException."  In this case, with an
    --enable-dbgutil build,
    
      soffice --headless 'AP - ISS de La Pampa - SGTyDD - REQ 06.docx'
    
    (as attached to fdo#61305 "improper display" as
    <https://bugs.freedesktop.org/attachment.cgi?id=75354>) would lead to "terminate
    called after throwing an instance of
    'com::sun::star::lang::IllegalArgumentException'" when the erroneously leaked
    IllegalArgumentException was unexpected in SvxShape::GetBitmap
    (svx/source/unodraw/unoshape.cxx).
    
    Change-Id: I849b5cf496cc7dff7b3c17d2d4d54f0194553e27

diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx
index 54459ec..89ef16f 100644
--- a/canvas/source/factory/cf_service.cxx
+++ b/canvas/source/factory/cf_service.cxx
@@ -25,6 +25,7 @@
 #include <cppuhelper/implbase3.hxx>
 
 #include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
 #include <com/sun/star/configuration/theDefaultProvider.hpp>
@@ -277,6 +278,10 @@ Reference<XInterface> CanvasFactory::use(
         return m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
             serviceName, args, xContext);
     }
+    catch (css::lang::IllegalArgumentException &)
+    {
+        return Reference<XInterface>();
+    }
     catch (const RuntimeException &)
     {
         throw;


More information about the Libreoffice-commits mailing list