diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2012-11-29 15:55:45 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2012-11-29 21:44:16 +0100 |
commit | efd2438e824edd616075e62e948d4ed771f1251f (patch) | |
tree | de8e46d69b3e9c483f28110a317c123772d9c428 /reportdesign | |
parent | 8a5fddc656705cf0175c1f5eda98a153a0953b52 (diff) |
Enhance error message for too small FixedLine size
Change-Id: Icc9ac2789637db3d30ad452998cf0d857c9f5bea
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/api/FixedLine.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx index b2c3dbe26734..79e836de72be 100644 --- a/reportdesign/source/core/api/FixedLine.cxx +++ b/reportdesign/source/core/api/FixedLine.cxx @@ -514,8 +514,12 @@ awt::Size SAL_CALL OFixedLine::getSize( ) throw (uno::RuntimeException) // ----------------------------------------------------------------------------- void SAL_CALL OFixedLine::setSize( const awt::Size& aSize ) throw (beans::PropertyVetoException, uno::RuntimeException) { - if ( (aSize.Width < MIN_WIDTH && m_nOrientation == 1) || (aSize.Height < MIN_HEIGHT && m_nOrientation == 0) ) - throw beans::PropertyVetoException(); + const char hundredthmmC[] = "0\xe2\x80\x89\xC2\xB5""m"; // in UTF-8: 0, thin space, ยต (micro), m (meter) + const rtl::OUString hundredthmm(hundredthmmC, sizeof(hundredthmmC)-1, RTL_TEXTENCODING_UTF8); + if ( aSize.Width < MIN_WIDTH && m_nOrientation == 1 ) + throw beans::PropertyVetoException("Too small width for FixedLine; minimum is " + rtl::OUString::valueOf(MIN_WIDTH) + hundredthmm, *this); + else if ( aSize.Height < MIN_HEIGHT && m_nOrientation == 0 ) + throw beans::PropertyVetoException("Too small height for FixedLine; minimum is " + rtl::OUString::valueOf(MIN_HEIGHT) + hundredthmm, *this); OShapeHelper::setSize(aSize,this); } // ----------------------------------------------------------------------------- |