summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/doccomp.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 53576828d8b4..c2da0bc91261 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1683,6 +1683,17 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
SwContentNode *const pContentNode( pTmp->GetContentNode() );
pTmp->GetPoint()->nContent.Assign( pContentNode,
(pContentNode) ? pContentNode->Len() : 0 );
+ // tdf#106218 try to avoid losing a paragraph break here:
+ if (pTmp->GetMark()->nContent == 0)
+ {
+ SwNodeIndex const prev(pTmp->GetMark()->nNode, -1);
+ if (prev.GetNode().IsTextNode())
+ {
+ *pTmp->GetMark() = SwPosition(
+ *prev.GetNode().GetTextNode(),
+ prev.GetNode().GetTextNode()->Len());
+ }
+ }
}
rDoc.getIDocumentRedlineAccess().DeleteRedline( *pTmp, false, USHRT_MAX );
@@ -1715,6 +1726,17 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
SwContentNode *const pContentNode( pTmp->GetContentNode() );
pTmp->GetPoint()->nContent.Assign( pContentNode,
(pContentNode) ? pContentNode->Len() : 0 );
+ // tdf#106218 try to avoid losing a paragraph break here:
+ if (pTmp->GetMark()->nContent == 0)
+ {
+ SwNodeIndex const prev(pTmp->GetMark()->nNode, -1);
+ if (prev.GetNode().IsTextNode())
+ {
+ *pTmp->GetMark() = SwPosition(
+ *prev.GetNode().GetTextNode(),
+ prev.GetNode().GetTextNode()->Len());
+ }
+ }
}
} while( pInsRing != ( pTmp = pTmp->GetNext()) );
SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_INSERT, nAuthor, aTimeStamp,