sw/source/core/crsr/crsrsh.cxx |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

New commits:
commit cf6c6db51eada17408c412173331db0820a23e5d
Author:     Jim Raykowski <[email protected]>
AuthorDate: Tue Feb 27 19:22:50 2024 -0900
Commit:     Jim Raykowski <[email protected]>
CommitDate: Tue Mar 5 07:21:02 2024 +0100

    tdf#49994 Fix text selection over pages for multi column tables
    
    with repeated headings
    
    Change-Id: I6cddeb132ff4f8ff27ea03701067d7a3d4c4cf82
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/79113
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <[email protected]>

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 04c904f13905..3e9ca93b3380 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1994,22 +1994,27 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, 
bool bIdleEnd )
             {
                 pTableFrame = nullptr;
 
-                SwMoveFnCollection const & fnPosSect = *pPos <  
*pITmpCursor->GetMark()
-                                            ? fnSectionStart
-                                            : fnSectionEnd;
-
                 // then only select inside the Box
                 if( m_pTableCursor )
                 {
+                    SwMoveFnCollection const & fnPosSect = *pPos <  
*pITmpCursor->GetMark()
+                                                ? fnSectionStart
+                                                : fnSectionEnd;
+
                     m_pCurrentCursor->SetMark();
                     *m_pCurrentCursor->GetMark() = *m_pTableCursor->GetMark();
                     m_pCurrentCursor->GetMkPos() = m_pTableCursor->GetMkPos();
                     m_pTableCursor->DeleteMark();
                     m_pTableCursor->SwSelPaintRects::Hide();
-                }
 
-                *m_pCurrentCursor->GetPoint() = *m_pCurrentCursor->GetMark();
-                GoCurrSection( *m_pCurrentCursor, fnPosSect );
+                    *m_pCurrentCursor->GetPoint() = 
*m_pCurrentCursor->GetMark();
+                    GoCurrSection( *m_pCurrentCursor, fnPosSect );
+                }
+                else
+                {
+                    eFlags &= SwCursorShell::UPDOWN;
+                    *m_pCurrentCursor->GetPoint() = 
*m_pCurrentCursor->GetMark();
+                }
             }
         }
 

Reply via email to