summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/doccorr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/doccorr.cxx')
-rw-r--r--sw/source/core/doc/doccorr.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index 6585b3359004..dec5f24f6f7d 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -210,10 +210,22 @@ void SwDoc::CorrAbs(const SwNodeIndex& rOldNode,
getIDocumentMarkAccess()->correctMarksAbsolute(rOldNode, rNewPos, nOffset);
{ // fix redlines
SwRedlineTbl& rTbl = *pRedlineTbl;
- for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
+ for (sal_uInt16 n = 0; n < rTbl.Count(); )
{
// is on position ??
- lcl_PaMCorrAbs(*rTbl[ n ], *aPam.Start(), *aPam.End(), aNewPos);
+ SwRedline *const pRedline( rTbl[ n ] );
+ bool const bChanged =
+ lcl_PaMCorrAbs(*pRedline, *aPam.Start(), *aPam.End(), aNewPos);
+ // clean up empty redlines: docredln.cxx asserts these as invalid
+ if (bChanged && (*pRedline->GetPoint() == *pRedline->GetMark())
+ && (pRedline->GetContentIdx() == NULL))
+ {
+ rTbl.DeleteAndDestroy(n);
+ }
+ else
+ {
+ ++n;
+ }
}
}