[Libreoffice-commits] .: sc/source
Eike Rathke
erack at kemper.freedesktop.org
Thu May 24 03:40:11 PDT 2012
sc/source/core/data/attarray.cxx | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 816f65da41c8c30e5854e333a6498e58c64303aa
Author: Eike Rathke <erack at redhat.com>
Date: Thu May 24 12:37:57 2012 +0200
resolved fdo#41214 crash due to offset error
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 9de2b02..f201e5d 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1800,12 +1800,11 @@ bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData, bool bFu
while ( nPos < nCount )
{
// find range of visually equal formats
- SCSIZE nStartPos = nPos;
- SCSIZE nEndPos = nStartPos + 1;
+ SCSIZE nEndPos = nPos;
while ( nEndPos < nCount-1 &&
pData[nEndPos].pPattern->IsVisibleEqual( *pData[nEndPos+1].pPattern))
++nEndPos;
- SCROW nAttrStartRow = ( nStartPos > 0 ) ? ( pData[nStartPos-1].nRow + 1 ) : 0;
+ SCROW nAttrStartRow = ( nPos > 0 ) ? ( pData[nPos-1].nRow + 1 ) : 0;
if ( nAttrStartRow <= nLastData )
nAttrStartRow = nLastData + 1;
SCROW nAttrSize = pData[nEndPos].nRow + 1 - nAttrStartRow;
@@ -1816,7 +1815,7 @@ bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData, bool bFu
rLastRow = pData[nEndPos].nRow;
bFound = true;
}
- nPos = nEndPos;
+ nPos = nEndPos + 1;
}
return bFound;
More information about the Libreoffice-commits
mailing list