summaryrefslogtreecommitdiff
path: root/vbahelper
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-04-19 19:31:10 +0100
commit1dc7c568b57ef812eb2c2def4d3760c8341850b7 (patch)
treec069d90b0571e5852dad860e09901b97a6b84dab /vbahelper
parentffc7a6e2a133ab443e253368217482454e646e88 (diff)
fix TextBox value error, MaxLength is long in vba but short in libreoffice
Change-Id: I550fe6833f240d085fadf55ab8d9421947318eef
Diffstat (limited to 'vbahelper')
-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);
}