comphelper/source/misc/sequenceashashmap.cxx | 13 +++++++++---- sw/source/core/unocore/unodraw.cxx | 11 ++++++++++- 2 files changed, 19 insertions(+), 5 deletions(-)
New commits: commit 358f5280e0f6afb968edc295d8f1dce55f05e18f Author: Stephan Bergmann <[email protected]> Date: Thu Oct 9 08:38:38 2014 +0200 Fix coverity#1224993 w/o breaking JunitTest_framework_unoapi Change-Id: Iefa1d79c52c4f951a7a66be98de3c9752bf89daf diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 366c5a2..f6c6b7e 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. commit 52028d4632d4898ad0f9119841bcf171f6e18682 Author: Stephan Bergmann <[email protected]> Date: Thu Oct 9 08:28:52 2014 +0200 Revert "coverity#1224993 Uncaught exception" This reverts commit b66a96d792e9ef8022547f835ed4633c8e7f4c10, follow-up commit will fix w/o breaking JunitTest_framework_unoapi. Change-Id: Iac12d52c2eb9a1e4ab09d24910cee1838cc7d883 diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx index b34d8c9..35f2d6b 100644 --- a/comphelper/source/misc/sequenceashashmap.cxx +++ b/comphelper/source/misc/sequenceashashmap.cxx @@ -75,9 +75,11 @@ void SequenceAsHashMap::operator<<(const css::uno::Any& aSource) return; } - throw std::invalid_argument("Any contains wrong type."); + throw css::beans::IllegalTypeException( + "Any contains wrong type." ); } + void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lSource) { sal_Int32 c = lSource.getLength(); @@ -92,7 +94,8 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS (lP.Name.isEmpty()) || (!lP.Value.hasValue()) ) - throw std::invalid_argument("PropertyValue struct contains no useful information."); + throw css::beans::IllegalTypeException( + "PropertyValue struct contains no useful information." ); (*this)[lP.Name] = lP.Value; continue; } @@ -104,14 +107,16 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS (lN.Name.isEmpty()) || (!lN.Value.hasValue()) ) - throw std::invalid_argument("NamedValue struct contains no useful information."); + throw css::beans::IllegalTypeException( + "NamedValue struct contains no useful information." ); (*this)[lN.Name] = lN.Value; continue; } // ignore VOID Any ... but reject wrong filled ones! if (lSource[i].hasValue()) - throw std::invalid_argument("Any contains wrong type."); + throw css::beans::IllegalTypeException( + "Any contains wrong type." ); } } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
