summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-03-01 17:50:18 +0200
committerTor Lillqvist <tml@collabora.com>2019-09-20 11:48:14 +0200
commit2c78f42d6e8a138718052afa05f153753d372707 (patch)
tree41ab92bdb9b03f532c940d46456d7156b02116c4
parent3d7419d01f963bb3ab5633968905a8e2a2e6f2bf (diff)
Use sal_Int32 for the index as it comes in as a LONG at least from VBScript
An Any containing a LONG with value 1 won't be put into a sal_Int16 by the >>= operator, even if it obviously would fit... But maybe consistency is good here. Change-Id: If39054148f72211eae3c897675708aab58f425b2 (cherry picked from commit 97b90ad9cf4fbcef9c225928d38a367152a7d3b6) Reviewed-on: https://gerrit.libreoffice.org/79175 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--vbahelper/source/vbahelper/vbacommandbars.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vbahelper/source/vbahelper/vbacommandbars.cxx b/vbahelper/source/vbahelper/vbacommandbars.cxx
index 42ee3f6ee365..701d134eaa5a 100644
--- a/vbahelper/source/vbahelper/vbacommandbars.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbars.cxx
@@ -208,7 +208,7 @@ ScVbaCommandBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ )
}
// hardcode if "aIndex = 1" that would return "main menu".
- sal_Int16 nIndex = 0;
+ sal_Int32 nIndex = 0;
aIndex >>= nIndex;
if( nIndex == 1 )
{