diff options
-rw-r--r-- | vbahelper/source/msforms/vbatextbox.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vbahelper/source/msforms/vbatextbox.cxx b/vbahelper/source/msforms/vbatextbox.cxx index 4e94a3380c8f..d4d10c147204 100644 --- a/vbahelper/source/msforms/vbatextbox.cxx +++ b/vbahelper/source/msforms/vbatextbox.cxx @@ -73,15 +73,16 @@ ScVbaTextBox::getMaxLength() throw (css::uno::RuntimeException) { uno::Any aValue; aValue = m_xProps->getPropertyValue( "MaxTextLen" ); - sal_Int32 nMaxLength = 0; + sal_Int16 nMaxLength = 0; aValue >>= nMaxLength; - return nMaxLength; + return (sal_Int32)nMaxLength; } void SAL_CALL ScVbaTextBox::setMaxLength( sal_Int32 _maxlength ) throw (css::uno::RuntimeException) { - uno::Any aValue( _maxlength ); + sal_Int16 nTmp( _maxlength ); + uno::Any aValue( nTmp ); m_xProps->setPropertyValue( "MaxTextLen" , aValue); } |