diff options
author | Jim Raykowski <raykowj@gmail.com> | 2021-09-22 17:24:42 -0800 |
---|---|---|
committer | Jim Raykowski <raykowj@gmail.com> | 2021-09-23 08:35:50 +0200 |
commit | e43eeac1a99ea0d70192dfd7cecf3e8f52f3e53c (patch) | |
tree | 683f0714b27f132eda745d337c0f014a8534cc64 /sw/source/uibase/utlui | |
parent | 8cecaa622700cecb5b5776bd3e5360ac6cc3dd63 (diff) |
tdf#95378 Writer Navigator: Track indexes
Resolves indexes tracking part of the enhancement request. Makes
corresponding table of content entry, listed under Indexes category in
Navigator content tree, highlight when current cursor position in the
document is on table of content type section.
Change-Id: I8237bc55db5568e585b25f898935b4506dec5c7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122503
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 ff17d753e13e..9fb2367e0d39 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3557,6 +3557,14 @@ void SwContentTree::UpdateTracking() } return; } + // indexes + if (const SwTOXBase* pTOX = m_pActiveShell->GetCurTOX(); pTOX && + !(m_bIsRoot && m_nRootType != ContentTypeId::INDEX)) + { + lcl_SelectByContentTypeAndName(this, *m_xTreeView, SwResId(STR_CONTENT_TYPE_INDEX), + pTOX->GetTOXName()); + return; + } // section if (const SwSection* pSection = m_pActiveShell->GetCurrSection(); pSection && !(m_bIsRoot && m_nRootType != ContentTypeId::REGION)) |