sc/source/core/data/dociter.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8e9540d3d4909c6dd45c9efa294f565d9735a0d9
Author: László Németh <laszlo.nem...@collabora.com>
Date:   Wed Feb 18 16:22:56 2015 +0100

    tdf#89436 ScHorizontalAttrIterator - fix indices
    
    Change-Id: I800270cc4b1a812834be57b9eb332b4b299c0fe1

diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 3b3b2b1..cf8cbe2 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -2301,13 +2301,13 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( 
SCCOL& rCol1, SCCOL& rCo
                 rRow = nRow;
                 rCol1 = nCol;
                 if ( bRepeatedRow )
-                    nCol = pPrevColEnd[nCol];
+                    nCol = pPrevColEnd[nCol-nStartCol]; // use the result 
stored before
                 else
                 {
                     while ( nCol < nEndCol && ( ppPatterns[nCol+1-nStartCol] 
== pPat) )
                         ++nCol;
                     // store the result to avoid the previous very expensive 
comparisons
-                    pPrevColEnd[rCol1] = nCol;
+                    pPrevColEnd[rCol1-nStartCol] = nCol;
                 }
                 rCol2 = nCol;
                 ++nCol; // Count up for next call
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to