diff options
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 8865d294597a..7b639f6628d8 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -714,7 +714,6 @@ void SwView::Execute(SfxRequest &rReq) if (pArgs && pArgs->GetItemState(nSlot, false, &pItem) == SfxItemState::SET) nRedline = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); - const SwRangeRedline *pCurrent = m_pWrtShell->GetCurrRedline(); SwDoc* pDoc = m_pWrtShell->GetDoc(); const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable(); const SwRangeRedline *pNext = nullptr; @@ -723,15 +722,6 @@ void SwView::Execute(SfxRequest &rReq) else pNext = m_pWrtShell->SelNextRedline(); - // FN_REDLINE_PREV_CHANGE leaves the selection point at the start of the redline. - // In such cases, SelNextRedline (which starts searching from the selection point) - // immediately finds the current redline and advances the selection point to its end. - - // This behavior means that PREV_CHANGE followed by NEXT_CHANGE would not change - // the current redline, so we detect it and select the next redline again. - if (pCurrent && pCurrent == pNext && nRedline == USHRT_MAX) - pNext = m_pWrtShell->SelNextRedline(); - if (pNext) m_pWrtShell->SetInSelect(); } @@ -739,24 +729,9 @@ void SwView::Execute(SfxRequest &rReq) case FN_REDLINE_PREV_CHANGE: { - const SwPaM *pCursor = m_pWrtShell->GetCursor(); - const SwPosition initialCursorStart = *pCursor->Start(); const SwRangeRedline *pPrev = m_pWrtShell->SelPrevRedline(); if (pPrev) - { - // FN_REDLINE_NEXT_CHANGE leaves the selection point at the end of the redline. - // In such cases, SelPrevRedline (which starts searching from the selection point) - // immediately finds the current redline and advances the selection point to its - // start. - - // This behavior means that NEXT_CHANGE followed by PREV_CHANGE would not change - // the current redline, so we detect it and move to the previous redline again. - if (initialCursorStart == *pPrev->Start()) - pPrev = m_pWrtShell->SelPrevRedline(); - } - - if (pPrev) m_pWrtShell->SetInSelect(); } break; |