diff -Nurpw new/sw/source/core/undo/unredln.cxx old/sw/source/core/undo/unredln.cxx --- new/sw/source/core/undo/unredln.cxx 2009-08-24 10:37:02.000000000 +0800 +++ old/sw/source/core/undo/unredln.cxx 2008-04-11 00:09:08.000000000 +0800 @@ -247,13 +247,6 @@ void SwUndoRedlineSort::_Undo( SwUndoIte // im aSaveRange steht der kopierte, sprich der originale. SwDoc& rDoc = rIter.GetDoc(); - SwPosition* pStart = rIter.pAktPam->Start(); - SwPosition* pEnd = rIter.pAktPam->End(); - - SwNodeIndex aPrevIdx( pStart->nNode, -1 ); - ULONG nOffset = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex(); - xub_StrLen nCntStt = pStart->nContent.GetIndex(); - if( 0 == ( nsRedlineMode_t::REDLINE_SHOW_DELETE & rDoc.GetRedlineMode()) ) { // die beiden Redline Objecte suchen und diese dann anzeigen lassen, @@ -279,55 +272,13 @@ void SwUndoRedlineSort::_Undo( SwUndoIte } rDoc.DelFullPara( *rIter.pAktPam ); - - SwPaM* pPam = rIter.pAktPam; - pPam->DeleteMark(); - pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 ); - SwCntntNode* pCNd = pPam->GetCntntNode(); - xub_StrLen nLen = pCNd->Len(); - if( nLen > nCntStt ) - nLen = nCntStt; - pPam->GetPoint()->nContent.Assign(pCNd, nLen ); - pPam->SetMark(); - - pPam->GetPoint()->nNode += nOffset; - pCNd = pPam->GetCntntNode(); - pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); - - SetValues( *pPam ); - SetPaM( *rIter.pAktPam ); } void SwUndoRedlineSort::_Redo( SwUndoIter& rIter ) { SwPaM& rPam = *rIter.pAktPam; - - SwPaM* pPam = &rPam; - SwPosition* pStart = pPam->Start(); - SwPosition* pEnd = pPam->End(); - - SwNodeIndex aPrevIdx( pStart->nNode, -1 ); - ULONG nOffset = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex(); - xub_StrLen nCntStt = pStart->nContent.GetIndex(); - rIter.GetDoc().SortText( rPam, *pOpt ); - - pPam->DeleteMark(); - pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 ); - SwCntntNode* pCNd = pPam->GetCntntNode(); - xub_StrLen nLen = pCNd->Len(); - if( nLen > nCntStt ) - nLen = nCntStt; - pPam->GetPoint()->nContent.Assign(pCNd, nLen ); - pPam->SetMark(); - - pPam->GetPoint()->nNode += nOffset; - pCNd = pPam->GetCntntNode(); - pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); - - SetValues( rPam ); - SetPaM( rPam ); rPam.GetPoint()->nNode = nSaveEndNode; rPam.GetPoint()->nContent.Assign( rPam.GetCntntNode(), nSaveEndCntnt );