summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-02-18 16:22:56 +0100
committerLászló Németh <laszlo.nemeth@collabora.com>2015-02-18 16:22:56 +0100
commit8e9540d3d4909c6dd45c9efa294f565d9735a0d9 (patch)
tree6de431524756f74f5ae6da48c97f1cc02bb5c870
parent4ece31faef6279cdb0d7eafa26f696e393649fd4 (diff)
tdf#89436 ScHorizontalAttrIterator - fix indices
Change-Id: I800270cc4b1a812834be57b9eb332b4b299c0fe1
-rw-r--r--sc/source/core/data/dociter.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 3b3b2b1e5e87..cf8cbe25358c 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