summaryrefslogtreecommitdiff
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-07 09:56:21 +0100
commit41d1ae7cbefb8ddac92859d574b2af72fced5dd7 (patch)
tree1ab4866901032a3951d28354bb5a9643009a33bf
parent5396c6e6b14560f0ec6a130fec24c86c4fde51c7 (diff)
fix TextBox value error, MaxLength is long in vba but short in libreoffice
Change-Id: I550fe6833f240d085fadf55ab8d9421947318eef
-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);
}