[Libreoffice-commits] core.git: sw/source

Jim Raykowski (via logerrit) logerrit at kemper.freedesktop.org
Sat Mar 14 23:29:07 UTC 2020


 sw/source/uibase/utlui/content.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 6f82f5163fdd43ea22958dfb28926c88ed97fa7c
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Sat Feb 15 21:20:57 2020 -0900
Commit:     Jim Raykowski <raykowj at gmail.com>
CommitDate: Sun Mar 15 00:28:30 2020 +0100

    tdf#105600 rework section selection from Navigator
    
    Corrects selection behavior when the section is empty or has
    a single empty line before a table. Also, doesn't suffer the SelAll
    function use selection misbehaviors when a table is at the start of the
    document, other than for the case of a section containing a table at the
    start of document, in which case, neither this rework nor SelAll
    function selects the section.
    
    Change-Id: Ibdefa0af417fc3c3262acaa1977fec811c8f24e8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90181
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <raykowj at gmail.com>

diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index bce33ac6aaba..340a3a90ba1f 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3453,9 +3453,13 @@ void SwContentTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
             }
             else if (eTypeId == ContentTypeId::REGION)
             {
+                m_pActiveShell->EnterStdMode();
                 m_pActiveShell->GotoRegion(pCnt->GetName());
-                m_pActiveShell->Right(CRSR_SKIP_CHARS, false, 1, false );
-                m_pActiveShell->SelAll();
+                GotoCurrRegionAndSkip(m_pActiveShell->GetCurrentShellCursor(), fnRegionEnd, m_pActiveShell->IsReadOnlyAvailable());
+                m_pActiveShell->SttSelect();
+                GotoCurrRegionAndSkip(m_pActiveShell->GetCurrentShellCursor(), fnRegionStart, m_pActiveShell->IsReadOnlyAvailable());
+                m_pActiveShell->EndSelect();
+                m_pActiveShell->UpdateCursor();
             }
             m_pActiveShell->LeaveAddMode();
         }


More information about the Libreoffice-commits mailing list