diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-06-06 17:27:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-06-06 21:07:30 +0200 |
commit | 69ebf09889c551c41aac951d2df97ff0e75d841c (patch) | |
tree | 7dab71a897bbd10ba5bc6298256f626c5c8dfe41 /cui | |
parent | 37b0c15c6a360758d1648b2ca47eff1de41f4f84 (diff) |
customization entry help never wants to search for parent widget help
it's not a widget context help where help about the parent widget might
help in the case of nothing available for the child widget, but help
for the specific selected command/script
see also: https://bugs.documentfoundation.org/show_bug.cgi?id=116494
Change-Id: Ib4b5650ca00c90b4b4b2a76ef0e3d8a438023327
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168504
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 2 | ||||
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 9 | ||||
-rw-r--r-- | cui/source/inc/cfgutil.hxx | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index ca717c2632c7..6907a2dcaaf5 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1649,7 +1649,7 @@ IMPL_LINK_NOARG(SvxConfigPage, SelectFunctionHdl, weld::TreeView&, void) if (SfxHelp::IsHelpInstalled()) { - m_xDescriptionField->set_text(m_xFunctions->GetHelpText(false)); + m_xDescriptionField->set_text(m_xFunctions->GetCommandHelpText()); } else { diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 1cc1895a490a..b6873b014396 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -244,17 +244,14 @@ std::vector< SfxStyleInfo_Impl > SfxStylesInfo_Impl::getStyles(const OUString& s return lStyles; } -OUString CuiConfigFunctionListBox::GetHelpText( bool bConsiderParent ) +OUString CuiConfigFunctionListBox::GetCommandHelpText() { SfxGroupInfo_Impl *pData = weld::fromId<SfxGroupInfo_Impl*>(get_selected_id()); if (pData) { if ( pData->nKind == SfxCfgKind::FUNCTION_SLOT ) { - if (bConsiderParent) - return Application::GetHelp()->GetHelpText(pData->sCommand, m_xTreeView.get()); - else - return Application::GetHelp()->GetHelpText(pData->sCommand, static_cast<weld::Widget*>(nullptr)); + return Application::GetHelp()->GetHelpText(pData->sCommand, static_cast<weld::Widget*>(nullptr)); } else if ( pData->nKind == SfxCfgKind::FUNCTION_SCRIPT ) { @@ -1241,7 +1238,7 @@ SvxScriptSelectorDialog::UpdateUI() OUString url = GetScriptURL(); if ( !url.isEmpty() ) { - OUString sMessage = m_xCommands->GetHelpText(); + OUString sMessage = m_xCommands->GetCommandHelpText(); m_xDescriptionText->set_text(sMessage.isEmpty() ? m_sDefaultDesc : sMessage); m_xOKButton->set_sensitive(true); } diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx index b1f22e4065b9..96bf9fb65067 100644 --- a/cui/source/inc/cfgutil.hxx +++ b/cui/source/inc/cfgutil.hxx @@ -172,7 +172,7 @@ public: void ClearAll(); OUString GetSelectedScriptURI() const; - OUString GetHelpText( bool bConsiderParent = true ); + OUString GetCommandHelpText(); OUString GetCurCommand() const; OUString GetCurLabel() const; |