[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - sc/source

Noel Power noel.power at suse.com
Mon Oct 28 13:29:51 PDT 2013


 sc/source/ui/vba/vbapagebreaks.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 8919e09416b2a8561c60edcaa99147bd5c55ce08
Author: Noel Power <noel.power at suse.com>
Date:   Mon Apr 22 19:29:22 2013 +0100

    fix another instance where the index is broken for pagebreaks
    
    Conflicts:
    
    	sc/source/ui/vba/vbapagebreaks.cxx
    
    Change-Id: I5c3215373c0a63c2831d7be5005f1b04a0645e99

diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx
index 09100e2..38db4f3 100644
--- a/sc/source/ui/vba/vbapagebreaks.cxx
+++ b/sc/source/ui/vba/vbapagebreaks.cxx
@@ -148,10 +148,9 @@ sheet::TablePageBreakData RangePageBreaks::getTablePageBreakData( sal_Int32 nAPI
     {
         aTablePageBreakData = aTablePageBreakDataList[i];
         sal_Int32 nPos = aTablePageBreakData.Position;
-        if( nPos >= nUsedStart )
-            index++;
-        if( nPos > nUsedEnd )
+        if( nPos > nUsedEnd + 1 )
             DebugHelper::exception(SbERR_METHOD_FAILED, OUString());
+        index++;
         if( index == nAPIItemIndex )
             return aTablePageBreakData;
     }


More information about the Libreoffice-commits mailing list