[Libreoffice-commits] core.git: sw/source

ccsheller ccsheller at gmail.com
Wed Nov 4 01:39:36 PST 2015


 sw/source/ui/vba/vbapanes.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 67b4adc473c14f6ab72c27b52e77a76ed387dccc
Author: ccsheller <ccsheller at gmail.com>
Date:   Thu Oct 8 11:34:39 2015 +0800

    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 at libreoffice.org>
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/sw/source/ui/vba/vbapanes.cxx b/sw/source/ui/vba/vbapanes.cxx
index 2160367..3045646 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 ) ) );
     }


More information about the Libreoffice-commits mailing list