summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui/content.cxx
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2020-02-15 21:20:57 -0900
committerJim Raykowski <raykowj@gmail.com>2020-03-15 00:28:30 +0100
commit6f82f5163fdd43ea22958dfb28926c88ed97fa7c (patch)
treef0844275444216f0428557869315bc779c1d529f /sw/source/uibase/utlui/content.cxx
parent87c87b6f8a48bdbee49a50bea2aefa5b934a86f5 (diff)
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@gmail.com>
Diffstat (limited to 'sw/source/uibase/utlui/content.cxx')
-rw-r--r--sw/source/uibase/utlui/content.cxx8
1 files changed, 6 insertions, 2 deletions
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();
}