summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-05-17 15:50:18 +0200
committerMichael Stahl <mst@openoffice.org>2010-05-17 15:50:18 +0200
commitf4609c4c294a62023b6cd6baeb6a73d44992dec3 (patch)
tree3d313a93e14e8da6cdce1492320bb33de3a6e7df
parentc9d620f5dd472902fe6d5aed93ed55dec6dd7f7b (diff)
sw33bf04: #i101009#: doccomp.cxx: avoid creating redlines including EndOfContent
-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 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 );