diff options
-rw-r--r-- | sw/source/core/text/txtfld.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index d258127f0701..9aa36c0c86d3 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -553,16 +553,21 @@ static const SwRangeRedline* lcl_GetRedlineAtNodeInsertionOrDeletion( const SwTe for( ; nRedlPos < rTable.size() ; ++nRedlPos ) { const SwRangeRedline* pTmp = rTable[ nRedlPos ]; + SwNodeOffset nStart = pTmp->GetPoint()->nNode.GetIndex(), + nEnd = pTmp->GetMark()->nNode.GetIndex(); + if( nStart > nEnd ) + std::swap(nStart, nEnd); if( RedlineType::Delete == pTmp->GetType() || RedlineType::Insert == pTmp->GetType() ) { - auto [pRStt, pREnd ]= pTmp->StartEnd(); // SwPosition* - if( pRStt->nNode <= nNdIdx && pREnd->nNode > nNdIdx ) + if( nStart <= nNdIdx && nEnd > nNdIdx ) { bIsMoved = pTmp->IsMoved(); return pTmp; } } + if( nStart > nNdIdx ) + break; } } return nullptr; |