sw/source/uibase/utlui/content.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit f11ed86c0ce8b41482ad217bb6700832ef746870 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Tue Sep 14 17:03:24 2021 -0800 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Fri Sep 17 03:44:22 2021 +0200 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 <rayk...@gmail.com> 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);