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

New commits:
commit e43eeac1a99ea0d70192dfd7cecf3e8f52f3e53c
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Wed Sep 22 17:24:42 2021 -0800
Commit:     Jim Raykowski <rayk...@gmail.com>
CommitDate: Thu Sep 23 08:35:50 2021 +0200

    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 <rayk...@gmail.com>

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))

Reply via email to