cui/source/customize/cfg.cxx     |    2 +-
 cui/source/customize/cfgutil.cxx |    9 +++------
 cui/source/inc/cfgutil.hxx       |    2 +-
 3 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 69ebf09889c551c41aac951d2df97ff0e75d841c
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Jun 6 17:27:25 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Jun 6 21:07:30 2024 +0200

    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.mcnam...@collabora.com>
    Tested-by: Jenkins

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;
 

Reply via email to