diff options
author | Rafael Lima <rafael.palma.lima@gmail.com> | 2023-07-19 15:07:20 +0200 |
---|---|---|
committer | Rafael Lima <rafael.palma.lima@gmail.com> | 2023-07-20 18:29:50 +0200 |
commit | b21159a74f287acd07c94422eb5cb3375f06c6bc (patch) | |
tree | f6d78aaec767cd015b01811985c676d8942141ef | |
parent | 58a4459627a92958ef133868f72af10d8d56ccad (diff) |
tdf#156378 Open function help page on F1 in the Functions sidebar
With this patch, when the user opens the Functions sidebar, select an entry and presses F1, the help page about the selected function will be shown.
Change-Id: I37eecc4e325cee7f25ddb1cd81098ca318ce6518
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154617
Tested-by: Jenkins
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
-rw-r--r-- | sc/source/ui/formdlg/dwfunctr.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/inc/dwfunctr.hxx | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 438f8fb70e24..8fde50549be1 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -57,6 +57,7 @@ ScFunctionWin::ScFunctionWin(weld::Widget* pParent) InitLRUList(); nArgs=0; + m_aHelpId = xFuncList->get_help_id(); // Description box has a height of 8 lines of text xFiFuncDesc->set_size_request(-1, 8 * xFiFuncDesc->get_text_height()); @@ -176,6 +177,13 @@ void ScFunctionWin::SetDescription() *pDesc->mxFuncDesc; xFiFuncDesc->set_text(aBuf); + + // Update help ID for the selected entry + const OUString sHelpId = pDesc->getHelpId(); + if (!sHelpId.isEmpty()) + xFuncList->set_help_id(pDesc->getHelpId()); + else + xFuncList->set_help_id(m_aHelpId); } } diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx index 9b984b918e11..b6d0d032a857 100644 --- a/sc/source/ui/inc/dwfunctr.hxx +++ b/sc/source/ui/inc/dwfunctr.hxx @@ -52,6 +52,7 @@ private: std::unique_ptr<EnglishFunctionNameChange> xConfigChange; const ScFuncDesc* pFuncDesc; sal_uInt16 nArgs; + OUString m_aHelpId; ::std::vector< const formula::IFunctionDescription*> aLRUList; |