diff options
author | Jim Raykowski <raykowj@gmail.com> | 2021-09-14 17:03:24 -0800 |
---|---|---|
committer | Jim Raykowski <raykowj@gmail.com> | 2021-09-17 03:44:22 +0200 |
commit | f11ed86c0ce8b41482ad217bb6700832ef746870 (patch) | |
tree | b89040f043a65d1e615608428a3de4139aac5a5e /sw/source/uibase/utlui | |
parent | a9cc066a86c6bd3423c5802c5a4eded55a50c754 (diff) |
tdf#95378 Writer Navigator: Track sections
This patch adds document content tracking of sections.
Change-Id: I4355792968031f10ab0afd176aa3284e89541b72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122104
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 0a14d3d12abb..57171cceeb0b 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3505,6 +3505,14 @@ void SwContentTree::UpdateTracking() } return; } + // section + if (const SwSection* pSection = m_pActiveShell->GetCurrSection(); pSection && + !(m_bIsRoot && m_nRootType != ContentTypeId::REGION)) + { + lcl_SelectByContentTypeAndName(this, *m_xTreeView, SwResId(STR_CONTENT_TYPE_REGION), + pSection->GetSectionName()); + return; + } // outline // find out where the cursor is const SwOutlineNodes::size_type nActPos = GetWrtShell()->GetOutlinePos(MAXLEVEL); |