tdf#152029 Bring sections to attention in the document view
when mouse pointer is over section content type and content entries in the Navigator content tree Change-Id: Icdfb680752a698ad076eaaabc237b1b6facb1704 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143845 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
d8db6a0729
commit
b7a51a7cd4
@@ -1213,6 +1213,27 @@ IMPL_LINK(SwContentTree, MouseMoveHdl, const MouseEvent&, rMEvt, bool)
|
|||||||
{
|
{
|
||||||
BringBookmarksToAttention(std::vector<OUString> {pCnt->GetName()});
|
BringBookmarksToAttention(std::vector<OUString> {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<const SwFrameFormat*> {pFormat});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (nType == ContentTypeId::URLFIELD)
|
else if (nType == ContentTypeId::URLFIELD)
|
||||||
{
|
{
|
||||||
BringURLFieldsToAttention(SwGetINetAttrs {SwGetINetAttr(pCnt->GetName(),
|
BringURLFieldsToAttention(SwGetINetAttrs {SwGetINetAttr(pCnt->GetName(),
|
||||||
@@ -1302,6 +1323,24 @@ IMPL_LINK(SwContentTree, MouseMoveHdl, const MouseEvent&, rMEvt, bool)
|
|||||||
BringBookmarksToAttention(aNames);
|
BringBookmarksToAttention(aNames);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (nType == ContentTypeId::REGION)
|
||||||
|
{
|
||||||
|
const SwSectionFormats& rFormats = m_pActiveShell->GetDoc()->GetSections();
|
||||||
|
if (const size_t nSize = rFormats.size())
|
||||||
|
{
|
||||||
|
std::vector<const SwFrameFormat*> 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)
|
else if (nType == ContentTypeId::URLFIELD)
|
||||||
{
|
{
|
||||||
SwGetINetAttrs aINetAttrsArr;
|
SwGetINetAttrs aINetAttrsArr;
|
||||||
|
Reference in New Issue
Block a user