diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-10-09 08:38:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-09 08:38:38 +0200 |
commit | 358f5280e0f6afb968edc295d8f1dce55f05e18f (patch) | |
tree | b83746bcf641d681f12c207e219a6be2ae70d09c /sw/source/core/unocore/unodraw.cxx | |
parent | 52028d4632d4898ad0f9119841bcf171f6e18682 (diff) |
Fix coverity#1224993 w/o breaking JunitTest_framework_unoapi
Change-Id: Iefa1d79c52c4f951a7a66be98de3c9752bf89daf
Diffstat (limited to 'sw/source/core/unocore/unodraw.cxx')
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 366c5a2d0f20..f6c6b7eeb663 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -58,8 +58,10 @@ #include <crstate.hxx> #include <comphelper/extract.hxx> #include <comphelper/makesequence.hxx> +#include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/supportsservice.hxx> #include <svx/scene3d.hxx> +#include <com/sun/star/beans/IllegalTypeException.hpp> #include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include <fmtwrapinfluenceonobjpos.hxx> #include <com/sun/star/text/TextContentAnchorType.hpp> @@ -1462,7 +1464,14 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a if (pFmt) { // We have a pFmt (but no pEntry): try to sync TextBox property. - SwTextBoxHelper::syncProperty(pFmt, rPropertyName, aValue); + try { + SwTextBoxHelper::syncProperty(pFmt, rPropertyName, aValue); + } catch (css::beans::IllegalTypeException & e) { + css::uno::Any a(cppu::getCaughtException()); + throw css::lang::WrappedTargetException( + "wrapped IllegalTypeException " + e.Message, + css::uno::Reference<css::uno::XInterface>(), a); + } } // #i31698# - restore object position, if caption point is set. |