summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2021-11-29 23:56:07 -0900
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-12-05 17:54:45 +0100
commit6caee83a16690d0a664c80ebe42c5b739afe7567 (patch)
treeefa14cdec22d2d82ed93e5c88f4128f07645385f /sw
parentc9d10718e2d39b0b063c4b17ed3fde07522458f7 (diff)
SwNavigator: make comment tracking work in content navigation view
and respect comment tracking setting Change-Id: I93c50cd5e022512bd092fed0922e8a22bdc7b665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126085 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com> (cherry picked from commit f53dd906e79ab77f0ab4a421e47650a9cc4ce1d6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126229
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/utlui/content.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 44c610341fea..380af4aba7a4 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3840,17 +3840,18 @@ void SwContentTree::UpdateTracking()
aContentAtPos.pFndTextAttr);
return;
}
- // fields
+ // fields, comments
if (SwField* pField = m_pActiveShell->GetCurField(); pField &&
- !(m_bIsRoot && m_nRootType != ContentTypeId::TEXTFIELD))
+ !(m_bIsRoot &&
+ m_nRootType != ContentTypeId::TEXTFIELD &&
+ m_nRootType != ContentTypeId::POSTIT))
{
- if (m_bFieldTracking)
- {
- ContentTypeId nContentTypeId =
- pField->GetTypeId() == SwFieldTypesEnum::Postit ? ContentTypeId::POSTIT :
- ContentTypeId::TEXTFIELD;
+ ContentTypeId nContentTypeId =
+ pField->GetTypeId() == SwFieldTypesEnum::Postit ? ContentTypeId::POSTIT :
+ ContentTypeId::TEXTFIELD;
+ if ((m_bFieldTracking && nContentTypeId == ContentTypeId::TEXTFIELD) ||
+ (m_bCommentTracking && nContentTypeId == ContentTypeId::POSTIT))
lcl_SelectByContentTypeAndAddress(this, *m_xTreeView, nContentTypeId, pField);
- }
return;
}
// table