summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2022-02-23 12:16:35 -0900
committerJim Raykowski <raykowj@gmail.com>2022-03-13 19:55:46 +0100
commit9ae74207e02d3a0ecc8f360720eb4e1c14bba0d3 (patch)
tree05b1addf07f8fb0d6778a56f70ec20029582bf3b /sw/source/uibase
parent7c7f00a89a675dad541d32ea60695a7b11210102 (diff)
SwNavigator: Gray out Comments members not visible in the document
Grays out comment members in the Navigator Comments member list that are in hidden sections and folded outline content. Not showing comment annotation windows will not cause comment member graying. The patch also fixes comments sometimes not showing in the member list after document load due to the document layout of comments not being completed before the comment content array is initially filled. Change-Id: Id3ac664480c36f1a3d072f7658cc9269a55b70aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130471 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/utlui/content.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 1791887b1f43..6a4bf1d9456d 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -779,8 +779,7 @@ void SwContentType::FillMemberList(bool* pbContentChanged)
{
if (const SwFormatField* pFormatField = dynamic_cast<const SwFormatField *>((*i)->GetBroadcaster())) // SwPostit
{
- if (pFormatField->GetTextField() && pFormatField->IsFieldInDoc() &&
- (*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE )
+ if (pFormatField->GetTextField() && pFormatField->IsFieldInDoc())
{
OUString sEntry = pFormatField->GetField()->GetPar2();
sEntry = RemoveNewline(sEntry);
@@ -789,6 +788,17 @@ void SwContentType::FillMemberList(bool* pbContentChanged)
sEntry,
pFormatField,
nYPos));
+ if (!pFormatField->GetTextField()->GetTextNode().getLayoutFrame(
+ m_pWrtShell->GetLayout()))
+ pCnt->SetInvisible();
+ if (pOldMember)
+ {
+ assert(pbContentChanged && "pbContentChanged is always set if pOldMember is");
+ if (!*pbContentChanged &&
+ nOldMemberCount > o3tl::make_unsigned(nYPos) &&
+ (*pOldMember)[nYPos]->IsInvisible() != pCnt->IsInvisible())
+ *pbContentChanged = true;
+ }
m_pMember->insert(std::move(pCnt));
nYPos++;
}