summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorccsheller <ccsheller@gmail.com>2015-10-08 11:34:39 +0800
committerNorbert Thiebaud <nthiebaud@gmail.com>2015-11-04 09:39:10 +0000
commit67b4adc473c14f6ab72c27b52e77a76ed387dccc (patch)
tree8213d8284ef6f3212a7db2a4d0f32982f25de807 /sw
parent32bc8ddbf335dd26019edcf12758643b4cff9913 (diff)
tdf#95077 Check Index != 0
follow code: ScVbaCollectionBase::getItemByIntIndex .... return createCollectionObject( m_xIndexAccess->getByIndex( nIndex - 1 ) ); .... my test code of vba: Application.ActiveWindow.Panes(1).View Change-Id: I5229142377364f374e4bbc24bd3b8dfd5d351f56 Reviewed-on: https://gerrit.libreoffice.org/19239 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/vba/vbapanes.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/ui/vba/vbapanes.cxx b/sw/source/ui/vba/vbapanes.cxx
index 21603675ced2..30456464e414 100644
--- a/sw/source/ui/vba/vbapanes.cxx
+++ b/sw/source/ui/vba/vbapanes.cxx
@@ -42,7 +42,7 @@ public:
}
virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override
{
- if( Index != 1 )
+ if( Index != 0 )
throw lang::IndexOutOfBoundsException();
return uno::makeAny( uno::Reference< word::XPane >( new SwVbaPane( mxParent, mxContext, mxModel ) ) );
}