Kaydet (Commit) 67b4adc4 authored tarafından ccsheller's avatar ccsheller Kaydeden (comit) Norbert Thiebaud

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/19239Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst 32bc8ddb
...@@ -42,7 +42,7 @@ public: ...@@ -42,7 +42,7 @@ public:
} }
virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override 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(); throw lang::IndexOutOfBoundsException();
return uno::makeAny( uno::Reference< word::XPane >( new SwVbaPane( mxParent, mxContext, mxModel ) ) ); return uno::makeAny( uno::Reference< word::XPane >( new SwVbaPane( mxParent, mxContext, mxModel ) ) );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment