dubious to enable/disable help button based on IsContextHelpEnabled

in just the SingleTabController, which is a specific subset of all
dialogs, the case of a dialog that hosts a page typically seen in a
multi-table dialog. Why should such a dialog have no help, while
its sibling containing the same page alongside others would have help,
or vice-versa.

Change-Id: I3f54c0088e30a396e83e990510ebe7f1f3bc7bda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171848
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-08-14 08:22:31 +01:00
parent 67c0fe349a
commit d27a88f4fe
5 changed files with 0 additions and 14 deletions

View file

@ -1292,7 +1292,6 @@ Help::EndExtHelp()
Help::GetHelpText(rtl::OUString const&, vcl::Window const*)
Help::GetHelpText(rtl::OUString const&, weld::Widget const*)
Help::Help()
Help::IsContextHelpEnabled()
Help::IsExtHelpEnabled()
Help::SearchKeyword(rtl::OUString const&)
Help::Start(rtl::OUString const&, vcl::Window const*)

View file

@ -102,7 +102,6 @@ class SFX2_DLLPUBLIC SfxSingleTabDialogController : public SfxOkDialogController
private:
std::unique_ptr<SfxItemSet> m_xOutputSet;
const SfxItemSet* m_pInputSet;
bool m_bHideHelpBtn;
public:
SfxSingleTabDialogController(weld::Widget* pParent, const SfxItemSet* pOptionsSet,

View file

@ -71,7 +71,6 @@ public:
static void EnableContextHelp();
static void DisableContextHelp();
static bool IsContextHelpEnabled();
static void EnableExtHelp();
static void DisableExtHelp();

View file

@ -29,7 +29,6 @@
#include <sfx2/childwin.hxx>
#include <sfx2/viewsh.hxx>
#include <workwin.hxx>
#include <officecfg/Office/Common.hxx>
#include <comphelper/lok.hxx>
using namespace ::com::sun::star::uno;
@ -232,7 +231,6 @@ SfxSingleTabDialogController::SfxSingleTabDialogController(weld::Widget *pParent
const OUString& rUIXMLDescription, const OUString& rID)
: SfxOkDialogController(pParent, rUIXMLDescription, rID)
, m_pInputSet(pSet)
, m_bHideHelpBtn(comphelper::LibreOfficeKit::isActive() && officecfg::Office::Common::Help::HelpRootURL::get().isEmpty())
, m_xContainer(m_xDialog->weld_content_area())
, m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
, m_xHelpBtn(m_xBuilder->weld_button(u"help"_ustr))
@ -244,7 +242,6 @@ SfxSingleTabDialogController::SfxSingleTabDialogController(weld::Widget *pParent
const OUString& rContainerId, const OUString& rUIXMLDescription, const OUString& rID)
: SfxOkDialogController(pParent, rUIXMLDescription, rID)
, m_pInputSet(pSet)
, m_bHideHelpBtn(comphelper::LibreOfficeKit::isActive() && officecfg::Office::Common::Help::HelpRootURL::get().isEmpty())
, m_xContainer(m_xBuilder->weld_container(rContainerId))
, m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
, m_xHelpBtn(m_xBuilder->weld_button(u"help"_ustr))
@ -277,9 +274,6 @@ void SfxSingleTabDialogController::SetTabPage(std::unique_ptr<SfxTabPage> xTabPa
m_xSfxPage->SetUserData(sUserData);
m_xSfxPage->Reset(GetInputItemSet());
if (!m_bHideHelpBtn)
m_xHelpBtn->set_visible(Help::IsContextHelpEnabled());
// Set TabPage text in the Dialog if there is any
OUString sTitle(m_xSfxPage->GetPageTitle());
if (!sTitle.isEmpty())

View file

@ -79,11 +79,6 @@ void Help::DisableContextHelp()
ImplGetSVHelpData().mbContextHelp = false;
}
bool Help::IsContextHelpEnabled()
{
return ImplGetSVHelpData().mbContextHelp;
}
void Help::EnableExtHelp()
{
ImplGetSVHelpData().mbExtHelp = true;