diff options
author | László Németh <laszlo.nemeth@collabora.com> | 2015-02-18 01:31:12 +0100 |
---|---|---|
committer | László Németh <laszlo.nemeth@collabora.com> | 2015-02-18 01:31:12 +0100 |
commit | dd4bd0ee74fae3d7e3a16e018021da173152571b (patch) | |
tree | 1e28c8bb17f7a0a01d6d84895b22e25d67ef9c10 /sc | |
parent | b0979fb26e0026e46149135804e2484ac5a4de58 (diff) |
tdf#89436 ScHorizontalAttrIterator - fix condition + cleanup
Change-Id: I0e2d467044fc46f56bd52083d4365357033cb1b8
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/dociter.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 9a55e571bd97..3b3b2b1e5e87 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -2313,6 +2313,8 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo ++nCol; // Count up for next call return pPat; // Found it! } + + bRepeatedRow = true; // we can use the stored row data next time } // Next row @@ -2321,10 +2323,10 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo return NULL; // Found nothing nCol = nStartCol; // Start at the left again - if ( !bRowEmpty && bRepeatedRow && ! nMinNextEnd < nRow ) // use the data of the previous row + if ( bRepeatedRow && nRow <= nMinNextEnd ) // use only the stored data of the previous row continue; - bRepeatedRow = true; // ppPatterns is not modified + bRepeatedRow = false; nMinNextEnd = MAXROW; bool bEmpty = true; SCCOL i; @@ -2335,7 +2337,6 @@ const ScPatternAttr* ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo if ( pNextEnd[nPos] < nRow ) { const ScAttrArray* pArray = pDoc->maTabs[nTab]->aCol[i].pAttrArray; - bRepeatedRow = false; SCSIZE nIndex = ++pIndices[nPos]; if ( nIndex < pArray->nCount ) |