[Libreoffice-commits] .: sc/source

Katarina Machalkova bubli at kemper.freedesktop.org
Thu Nov 25 05:44:38 PST 2010


 sc/source/filter/excel/xetable.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 8a9dae45f373c2f5d87a43ff8c060c564dee03d9
Author: Katarina Machalkova <kmachalkova at suse.cz>
Date:   Thu Nov 25 14:34:41 2010 +0100

    Fixed crash in xls export caused by off-by-one iterator
    
    (this is for bnc#653533 and fdo#31141)

diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 631b771..6ed4ab7 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -2105,7 +2105,6 @@ void XclExpRowBuffer::Save( XclExpStream& rStrm )
     for (itr = itrBeg; itr != itrEnd; ++itr)
     {
         // find end of row block
-        ++itrBlkEnd;
         while( (itrBlkEnd != itrEnd) && (itrBlkEnd->second->GetXclRow() - nStartXclRow < EXC_ROW_ROWBLOCKSIZE) )
             ++itrBlkEnd;
 
@@ -2118,7 +2117,7 @@ void XclExpRowBuffer::Save( XclExpStream& rStrm )
         for( itRow = itrBlkStart; itRow != itrBlkEnd; ++itRow )
              itRow->second->WriteCellList( rStrm );
 
-        itrBlkStart = itrBlkEnd;
+        itrBlkStart = (itrBlkEnd == itrEnd) ? itrBlkEnd : itrBlkEnd++;
         nStartXclRow += EXC_ROW_ROWBLOCKSIZE;
     }
 }


More information about the Libreoffice-commits mailing list