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

New commits:
commit dd4bd0ee74fae3d7e3a16e018021da173152571b
Author: László Németh <laszlo.nem...@collabora.com>
Date:   Wed Feb 18 01:31:12 2015 +0100

    tdf#89436 ScHorizontalAttrIterator - fix condition + cleanup
    
    Change-Id: I0e2d467044fc46f56bd52083d4365357033cb1b8

diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 9a55e57..3b3b2b1 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 )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to