diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:48:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:48:25 +0000 |
commit | 9c0049cfae49c8e4ddef9125a69db2ad134c10c6 (patch) | |
tree | 812a86c0eee63dfc5ace12f2622ed3ce9cd3d680 /sw/source/core/crsr | |
parent | Releasing progress-linux version 4:24.2.3-2~progress7.99u1. (diff) | |
download | libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.tar.xz libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.zip |
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/source/core/crsr')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index b7f6962982..33f11e9a28 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -738,9 +738,15 @@ bool SwCursorShell::MoveStartText() SwTableNode const*const pTable(pStartNode->FindTableNode()); m_pCurrentCursor->GetPoint()->Assign(*pStartNode); GetDoc()->GetNodes().GoNext(m_pCurrentCursor->GetPoint()); - while (m_pCurrentCursor->GetPoint()->GetNode().FindTableNode() != pTable - && (!pTable || pTable->GetIndex() < m_pCurrentCursor->GetPoint()->GetNode().FindTableNode()->GetIndex()) - && MoveOutOfTable()); + while (auto* pFoundTable = m_pCurrentCursor->GetPoint()->GetNode().FindTableNode()) + { + if (pFoundTable == pTable) + break; + if (pTable && pTable->GetIndex() >= pFoundTable->GetIndex()) + break; + if (!MoveOutOfTable()) + break; + } UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); return old != *m_pCurrentCursor->GetPoint(); } |