[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sw/source
Julien Nabet
serval2412 at yahoo.fr
Tue Aug 27 08:58:23 PDT 2013
sw/source/core/docnode/ndcopy.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 2729009dcfa1bc4a4a0f5547fff1b75b5ff9fecb
Author: Julien Nabet <serval2412 at 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 <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/5638
Reviewed-by: Thorsten Behrens <tbehrens at suse.com>
Tested-by: Thorsten Behrens <tbehrens at suse.com>
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index deefc12..f444c47 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,
More information about the Libreoffice-commits
mailing list