sw/inc/strings.hrc | 1 + sw/source/uibase/utlui/content.cxx | 11 +++++++++++ 2 files changed, 12 insertions(+)
New commits: commit e5a4f68410e736ee13c611365d8f325f5e382a05 Author: Jim Raykowski <rayk...@gmail..com> AuthorDate: Sat Feb 22 16:34:38 2020 -0900 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Feb 23 13:46:18 2020 +0100 related tdf#128814: Add 'Go to' to Navigator popup menu Change-Id: I63b656bd93c5e584a9d6236c6345cbd3ee939c13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index f1f16d729a8b..c2bb4ef19562 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -643,6 +643,7 @@ #define STR_OUTLINE_LEVEL NC_("STR_OUTLINE_LEVEL", "Outline Level") #define STR_DRAGMODE NC_("STR_DRAGMODE", "Drag Mode") #define STR_SEND_OUTLINE_TO_CLIPBOARD_ENTRY NC_("STR_SEND_OUTLINE_TO_CLIPBOARD_ENTRY", "Send Outline to Clipboard") +#define STR_GOTO NC_("STR_GOTO", "Go to") #define STR_SELECT NC_("STR_SELECT", "Select") #define STR_DEMOTE_CHAPTER NC_("STR_DEMOTE_CHAPTER", "Demote Chapter") #define STR_PROMOTE_CHAPTER NC_("STR_PROMOTE_CHAPTER", "Promote Chapter") diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index a41c3f951028..19a7b81f35c7 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1274,6 +1274,11 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu() pSubPop3->CheckItem( nId ); SvTreeListEntry* pEntry = nullptr; + if (lcl_IsContent(FirstSelected())) + { + pPop->InsertItem(900, SwResId(STR_GOTO)); + pPop->SetAccelKey(900, vcl::KeyCode(KEY_RETURN, false, false, false, false)); + } // Edit only if the shown content is coming from the current view. if ((State::ACTIVE == m_eState || m_pActiveShell == pActiveView->GetWrtShellPtr()) && nullptr != (pEntry = FirstSelected()) && lcl_IsContent(pEntry)) @@ -3387,6 +3392,12 @@ void SwContentTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) // Delete outline selections EditEntry(pFirst, EditEntryMode::DELETE); break; + case 900: + { + SwContent* pCnt = static_cast<SwContent*>(pFirst->GetUserData()); + GotoContent(pCnt); + } + break; //Display default: if(nSelectedPopupEntry > 300 && nSelectedPopupEntry < 400) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits