From fc44168ebe840fa2e772f034232fed15460e4977 Mon Sep 17 00:00:00 2001 From: Jim Raykowski Date: Fri, 1 Oct 2021 15:51:08 -0800 Subject: tdf#144788 SwNavigator: Add footnotes and endnotes to content tree This patch introduces lcl_SelectByContentTypeAndAddress function which is useful for content types that can have non unique string entries which can be selected incorrectly by use of the lcl_SelectByContentTypeAndName function. Although footnotes and endnotes names are always unique, lcl_SelectByContentTypeAndAddress is used here in preference of lcl_SelectByContentTypeAndName. Change-Id: Ia118f717f72877cddb932ef19f6d155a7227845d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122970 Tested-by: Jenkins Reviewed-by: Jim Raykowski --- sw/source/uibase/wrtsh/move.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sw/source/uibase/wrtsh') diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index 95443ba16ca7..a5f10d5f8800 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -706,6 +706,14 @@ void SwWrtShell::GotoFormatField( const SwFormatField& rField ) { m_aNavigationMgr.addEntry(aPos); } +void SwWrtShell::GotoFootnoteAnchor(const SwTextFootnote& rTextFootnote) +{ + SwPosition aPos = *GetCursor()->GetPoint(); + bool bRet = SwCursorShell::GotoFootnoteAnchor(rTextFootnote); + if (bRet) + m_aNavigationMgr.addEntry(aPos); +} + const SwRangeRedline* SwWrtShell::GotoRedline( SwRedlineTable::size_type nArrPos, bool bSelect ) { SwPosition aPos = *GetCursor()->GetPoint(); const SwRangeRedline *pRedline = SwCursorShell::GotoRedline(nArrPos, bSelect); -- cgit