summaryrefslogtreecommitdiff
path: root/vbahelper/source
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-04-19 15:54:55 +0100
committerNoel Power <noel.power@suse.com>2013-05-09 14:11:15 +0100
commit412ae1bf1c12c31f4f9d33e38e46c2ee083107b7 (patch)
tree7fcc98677baf5f46dec835948319e0abd5b0f3d8 /vbahelper/source
parent27e2b40989c62c95a54e2212f26d21f90e161c32 (diff)
fix TextBox value error, MaxLength is long in vba but short in libreoffice
Change-Id: I550fe6833f240d085fadf55ab8d9421947318eef
Diffstat (limited to 'vbahelper/source')
-rw-r--r--vbahelper/source/msforms/vbatextbox.cxx7
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);
}