[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - canvas/source
Stephan Bergmann
sbergman at redhat.com
Tue Apr 2 07:58:01 PDT 2013
canvas/source/factory/cf_service.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 749095a80b526fab01acf8bf5bee824ce7cbb664
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
(cherry picked from commit 67d724e46579462d906477f52cf7919338bab834)
Reviewed-on: https://gerrit.libreoffice.org/3174
Reviewed-by: Tor Lillqvist <tml at iki.fi>
Tested-by: Tor Lillqvist <tml at iki.fi>
diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx
index b725c95..797a1db 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;
More information about the Libreoffice-commits
mailing list