diff options
author | Michael Stahl <mst@openoffice.org> | 2010-05-17 15:50:18 +0200 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-05-17 15:50:18 +0200 |
commit | f4609c4c294a62023b6cd6baeb6a73d44992dec3 (patch) | |
tree | 3d313a93e14e8da6cdce1492320bb33de3a6e7df /sw | |
parent | c9d620f5dd472902fe6d5aed93ed55dec6dd7f7b (diff) |
sw33bf04: #i101009#: doccomp.cxx: avoid creating redlines including EndOfContent
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/doccomp.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 6451aebd4251..6e7d125e6d1d 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1480,6 +1480,17 @@ void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo ) pTmp->GetPoint()->nNode++; pTmp->GetPoint()->nContent.Assign( pTmp->GetCntntNode(), 0 ); } + // --> mst 2010-05-17 #i101009# + // prevent redlines that end on structural end node + if (& rDoc.GetNodes().GetEndOfContent() == + & pTmp->GetPoint()->nNode.GetNode()) + { + pTmp->GetPoint()->nNode--; + SwCntntNode *const pContentNode( pTmp->GetCntntNode() ); + pTmp->GetPoint()->nContent.Assign( pContentNode, + (pContentNode) ? pContentNode->Len() : 0 ); + } + // <-- rDoc.DeleteRedline( *pTmp, false, USHRT_MAX ); @@ -1499,6 +1510,17 @@ void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo ) pTmp->GetPoint()->nNode++; pTmp->GetPoint()->nContent.Assign( pTmp->GetCntntNode(), 0 ); } + // --> mst 2010-05-17 #i101009# + // prevent redlines that end on structural end node + if (& rDoc.GetNodes().GetEndOfContent() == + & pTmp->GetPoint()->nNode.GetNode()) + { + pTmp->GetPoint()->nNode--; + SwCntntNode *const pContentNode( pTmp->GetCntntNode() ); + pTmp->GetPoint()->nContent.Assign( pContentNode, + (pContentNode) ? pContentNode->Len() : 0 ); + } + // <-- } while( pInsRing != ( pTmp = (SwPaM*)pTmp->GetNext() )); SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_INSERT, nAuthor, aTimeStamp, aEmptyStr, 0, 0 ); |