sw/source/core/docnode/ndcopy.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 87cf1b730e771f18d5f0a110b98ffab6494d3b25 Author: Julien Nabet <serval2...@yahoo.fr> Date: Sun Aug 25 22:20:16 2013 +0200 Fix iterator management Change-Id: Ifb230525d3f5462553a3e78bb4ee740f6a7cc5c2 Reviewed-on: https://gerrit.libreoffice.org/5629 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index a23d4eb..fe9201b 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -1469,8 +1469,9 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg, // They are stored as matching the originals, so that we will be later // able to build the chains accordingly. ::std::vector< SwFrmFmt* > aVecSwFrmFmt; + ::std::set< _ZSortFly >::const_iterator it=aSet.begin(); - for (::std::set< _ZSortFly >::const_iterator it=aSet.begin() ; it != aSet.end(); ++it ) + while (it != aSet.end()) { // #i59964# // correct determination of new anchor position @@ -1570,7 +1571,9 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg, rStartIdx.GetIndex() < pSNd->EndOfSectionIndex() ) { bMakeCpy = false; - aSet.erase ( it ); + ::std::set< _ZSortFly >::const_iterator it_erase=it++; + aSet.erase (it_erase); + continue; } } @@ -1578,6 +1581,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg, if( bMakeCpy ) aVecSwFrmFmt.push_back( pDest->CopyLayoutFmt( *(*it).GetFmt(), aAnchor, false, true ) ); + ++it; } // Rebuild as much as possible of all chains that are available in the original, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits