reportdesign/source/core/inc/ReportHelperImpl.hxx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
New commits: commit b14f981e055bde9243c82d3ca5bbd3e469a7eb40 Author: Lionel Elie Mamane <[email protected]> Date: Thu Nov 29 16:35:14 2012 +0100 fdo#57611 do not crash when setting too small size setWidth/setHeight's exception specifications are lacking, but fixing this in a stable release line is too invasive: they are "inherited" from the specification in offapi/com/sun/star/report/XReportComponent.idl and are thus part of our public API. Change-Id: I8ae2048a6c0acc6b6cf2beece9e630c87caac39f Signed-off-by: Stephan Bergmann <[email protected]> diff --git a/reportdesign/source/core/inc/ReportHelperImpl.hxx b/reportdesign/source/core/inc/ReportHelperImpl.hxx index 1b5f7d2..6325f8f 100644 --- a/reportdesign/source/core/inc/ReportHelperImpl.hxx +++ b/reportdesign/source/core/inc/ReportHelperImpl.hxx @@ -46,7 +46,14 @@ void SAL_CALL clazz::setHeight( ::sal_Int32 _height ) throw (uno::RuntimeExcepti { \ awt::Size aSize = getSize(); \ aSize.Height = _height; \ - setSize(aSize); \ + try \ + { \ + setSize(aSize); \ + } \ + catch (const beans::PropertyVetoException &) \ + { \ + throw uno::RuntimeException("Unacceptable height", static_cast<cppu::OWeakObject*>(this)); \ + } \ } \ ::sal_Int32 SAL_CALL clazz::getPositionX() throw (uno::RuntimeException) \ { \ @@ -76,7 +83,14 @@ void SAL_CALL clazz::setWidth( ::sal_Int32 _width ) throw (uno::RuntimeException { \ awt::Size aSize = getSize(); \ aSize.Width = _width; \ - setSize(aSize); \ + try \ + { \ + setSize(aSize); \ + } \ + catch (const beans::PropertyVetoException &) \ + { \ + throw uno::RuntimeException("Unacceptable width", static_cast<cppu::OWeakObject*>(this)); \ + } \ } \ uno::Reference< report::XSection > SAL_CALL clazz::getSection() throw (uno::RuntimeException) \ { \ _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
