diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index e8eb722c1338..a7c74261c4f8 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1213,6 +1213,27 @@ IMPL_LINK(SwContentTree, MouseMoveHdl, const MouseEvent&, rMEvt, bool) { BringBookmarksToAttention(std::vector {pCnt->GetName()}); } + else if (nType == ContentTypeId::REGION) + { + const SwSectionFormats& rFormats = m_pActiveShell->GetDoc()->GetSections(); + if (const size_t nSize = rFormats.size()) + { + auto aEntryName = pCnt->GetName(); + for (SwSectionFormats::size_type n = nSize; n;) + { + if (const SwSectionFormat* pFormat = rFormats[--n]) + { + const SwSection* pSect = pFormat->GetSection(); + if (pSect && !pSect->IsHiddenFlag() && + pSect->GetSectionName() == aEntryName) + { + BringFramesToAttention(std::vector {pFormat}); + break; + } + } + } + } + } else if (nType == ContentTypeId::URLFIELD) { BringURLFieldsToAttention(SwGetINetAttrs {SwGetINetAttr(pCnt->GetName(), @@ -1302,6 +1323,24 @@ IMPL_LINK(SwContentTree, MouseMoveHdl, const MouseEvent&, rMEvt, bool) BringBookmarksToAttention(aNames); } } + else if (nType == ContentTypeId::REGION) + { + const SwSectionFormats& rFormats = m_pActiveShell->GetDoc()->GetSections(); + if (const size_t nSize = rFormats.size()) + { + std::vector aSectionsFormatsArr; + for (SwSectionFormats::size_type n = nSize; n;) + { + if (const SwSectionFormat* pFormat = rFormats[--n]) + { + const SwSection* pSect = pFormat->GetSection(); + if (pSect && !pSect->IsHiddenFlag()) + aSectionsFormatsArr.push_back(pFormat); + } + } + BringFramesToAttention(aSectionsFormatsArr); + } + } else if (nType == ContentTypeId::URLFIELD) { SwGetINetAttrs aINetAttrsArr;