summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-02 15:16:22 +0200
committerTor Lillqvist <tml@iki.fi>2013-04-02 14:57:39 +0000
commit749095a80b526fab01acf8bf5bee824ce7cbb664 (patch)
tree67f33386ed4c4f54e014f5827b7d2da2c2232deb /canvas
parent9e8115327fac8fe26be8e16e799271650392b785 (diff)
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 (cherry picked from commit 67d724e46579462d906477f52cf7919338bab834) Reviewed-on: https://gerrit.libreoffice.org/3174 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/factory/cf_service.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx
index b725c95262a4..797a1dbe2f28 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>
@@ -278,6 +279,10 @@ Reference<XInterface> CanvasFactory::use(
return m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
serviceName, args, xContext);
}
+ catch (css::lang::IllegalArgumentException &)
+ {
+ return Reference<XInterface>();
+ }
catch (const RuntimeException &)
{
throw;