diff options
Diffstat (limited to 'sw/source/core/doc/doctxm.cxx')
-rw-r--r-- | sw/source/core/doc/doctxm.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index f5372a773c23..02bc7de34605 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -858,9 +858,10 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, SwPosition aPos( aEndIdx, SwIndex( pFirstEmptyNd, 0 )); pDoc->CorrAbs( aSttIdx, aEndIdx, aPos, sal_True ); - // delete all before - DelFlyInRange( aSttIdx, aEndIdx ); - _DelBookmarks( aSttIdx, aEndIdx ); + // delete flys in whole range including start node which requires + // giving the node before start node as Mark parameter, hence -1. + // (flys must be deleted because the anchor nodes are removed) + DelFlyInRange( SwNodeIndex(aSttIdx, -1), aEndIdx ); pDoc->GetNodes().Delete( aSttIdx, aEndIdx.GetIndex() - aSttIdx.GetIndex() ); |