include/svl/hint.hxx | 1 + sw/source/uibase/uiview/view2.cxx | 1 + sw/source/uibase/utlui/content.cxx | 20 ++++++++++++++++---- 3 files changed, 18 insertions(+), 4 deletions(-)
New commits: commit 5830f1f2941652895187b252b202b6042bb72c76 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Sat Jul 20 20:43:22 2024 -0800 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Thu Feb 27 08:11:01 2025 +0100 tdf#157249 Show deleted headings tracked changes in the Navigator only when show tracked changes is on Change-Id: I941d0af303f962dfca28ba11f449bda812c99aaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170810 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx index ee919d32c442..f38dd0d95435 100644 --- a/include/svl/hint.hxx +++ b/include/svl/hint.hxx @@ -214,6 +214,7 @@ enum class SfxHintId { SwRedlineUnDelText, SwMoveText, SwRedlineContentAtPos, + SwRedlineShowChanged, SwTableBoxFormatChanged, SwFindContentFrame, SwTableLineFormatChanged, diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index a566915a7e16..0f4112c7ed47 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -863,6 +863,7 @@ void SwView::Execute(SfxRequest &rReq) m_pWrtShell->EndAllAction(); if (m_pWrtShell->IsRedlineOn()) m_pWrtShell->SetInsMode(); + GetDocShell()->Broadcast(SfxHint(SfxHintId::SwRedlineShowChanged)); } break; case FN_MAILMERGE_SENDMAIL_CHILDWINDOW: diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 42c2be038a7d..e7b8aac22ec1 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -127,6 +127,8 @@ #include <unotxdoc.hxx> #include <unoidxcoll.hxx> +#include <rootfrm.hxx> + #define CTYPE_CNT 0 #define CTYPE_CTT 1 @@ -535,6 +537,18 @@ void SwContentType::FillMemberList(bool* pbContentChanged) for (size_t i = 0; i < nOutlineCount; ++i) { SwTextNode* pNode = rOutlineNodes[i]->GetTextNode(); + + OUString aEntry(comphelper::string::stripStart( + m_pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineText( + i, m_pWrtShell->GetLayout(), true, false, false), ' ')); + aEntry = SwNavigationPI::CleanEntry(aEntry); + + // tdf#157250 Show deleted headings tracked changes in the Navigator only when show + // tracked changes is on + if (m_pWrtShell->GetLayout()->IsHideRedlines() + && pNode->GetRedlineMergeFlag() != SwNode::Merge::None && aEntry.isEmpty()) + continue; + const sal_uInt8 nLevel = pNode->GetAttrOutlineLevel() - 1; if (nLevel >= m_nOutlineLevel) continue; @@ -544,10 +558,7 @@ void SwContentType::FillMemberList(bool* pbContentChanged) nYPos += nOutlinesInFramesIndexAdjustment; nOutlinesInFramesIndexAdjustment += 0.00001; } - OUString aEntry(comphelper::string::stripStart( - m_pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineText( - i, m_pWrtShell->GetLayout(), true, false, false), ' ')); - aEntry = SwNavigationPI::CleanEntry(aEntry); + auto pCnt(std::make_unique<SwOutlineContent>(this, aEntry, i, nLevel, m_pWrtShell->IsOutlineMovable(i), nYPos)); if (!pNode->getLayoutFrame(m_pWrtShell->GetLayout())) @@ -3846,6 +3857,7 @@ void SwContentTree::Notify(SfxBroadcaster & rBC, SfxHint const& rHint) break; } case SfxHintId::DocChanged: + case SfxHintId::SwRedlineShowChanged: OverlayObject(); if (!m_bIgnoreDocChange) {