diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-01-26 13:43:28 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-01-27 17:15:34 +0000 |
commit | 5aeee226479427062ac885be407671981d6940ef (patch) | |
tree | 21a23377fb0bffed475076e56d2f6b255b678eb7 | |
parent | 96302e0bbadfe3ed33af4a14a33a44bab3f5f0d4 (diff) |
tdf#114973 sw: IsSelOvr() should not leave the text
Jumping from body to header is certainly unexpected, call FindNextCnt()
which does additional checks to stay in the same text environment.
Change-Id: If54bff62cac420dc0990b6be070b81fa56365c50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146256
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | sw/source/core/crsr/swcrsr.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 132bbe644610..e3bb1a02c8d8 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -219,7 +219,7 @@ namespace } } -bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags ) +bool SwCursor::IsSelOvr(SwCursorSelOverFlags const eFlags) { SwDoc& rDoc = GetDoc(); SwNodes& rNds = rDoc.GetNodes(); @@ -341,7 +341,7 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags ) bool bGoNxt = m_vSavePos.back().nNode < rPtPos.GetNodeIndex(); for (;;) { - pFrame = bGoNxt ? pFrame->GetNextContentFrame() : pFrame->GetPrevContentFrame(); + pFrame = bGoNxt ? pFrame->FindNextCnt(true) : pFrame->FindPrevCnt(); if (!pFrame || 0 != pFrame->getFrameArea().Height() ) break; } @@ -354,8 +354,7 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags ) pFrame = static_cast<const SwContentNode*>(pNd)->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() ); while ( pFrame && 0 == pFrame->getFrameArea().Height() ) { - pFrame = bGoNxt ? pFrame->GetNextContentFrame() - : pFrame->GetPrevContentFrame(); + pFrame = bGoNxt ? pFrame->FindNextCnt(true) : pFrame->FindPrevCnt(); } } |