Writer Navigator: Fix category content tracking
This patch fixes a tracking bug that causes category content not to be
tracked when field content is at the current cursor position in the
document.
Change-Id: I6fb5c4584cb05205e0c966eef079bd30ee3e6430
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122105
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 57171cc..4efaa1b4 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3392,7 +3392,8 @@ void SwContentTree::UpdateTracking()
}
// fields
if (SwField* pField = m_pActiveShell->GetCurField())
if (SwField* pField = m_pActiveShell->GetCurField(); pField &&
!(m_bIsRoot && m_nRootType != ContentTypeId::TEXTFIELD))
{
OUString sContentType(SwResId(STR_CONTENT_TYPE_TEXTFIELD));
if (pField->GetTypeId() == SwFieldTypesEnum::Postit)