Hi Talen,

Õ»ª¾ü wrote:
Hi Andreas

I have modified my code like below
/**************************************************************************/
BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
const SwNodeIndex& aIndex, BOOL bNewFrms )
{
[..]
I don' t think that it's a good idea to change the behavior of such base functions like _MoveNodes. The side effects cannot be controlled.

so,I wanna add some code before call _MoveNodes(...) in the 
SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy ) 
function of sw\source\core\undo\undel.cxx,the objects are below:
1.Check if the range is last section of this document
2.If 1 is true,then append one node to this range
3.Update the range
What do you think about this plan?
The undo code is known as very sensitive and should not be changed to repair something what has been caused somewhere else. I think the best place to fix this issue is to avoid these wrong redlines. Every Writer document contains a paragraph at the end of the document, it maybe empty or not. If you compare two completely different documents, the content of the last paragraph could be marked as inserted/deleted but _not_ the whole paragraph. So please have a look into SwCompareData::SetRedlinesToDoc(..) and check there if a selection contains the last paragraph of the document. This should not be that dangerous.
Kindly regards
   Andreas
Awaiting your reply:)
Best Regards
Talen
I propose to have a look into the insertion of the change tracks (SwDoc::AppendRedline()). It is not allowed that the change tracking area covers the whole document. At least one empty paragraph has to be outside these change tracks.
 I will investigate this function and try to correct my fixing.
My assumption is that AppendRedline() is fine but the calling function should not span the deletion redline so widely.
[..]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to