bin/find-mergedlib-can-be-private-symbols.functions.results | 1 - include/vcl/help.hxx | 1 - sfx2/source/dialog/basedlgs.cxx | 2 -- vcl/source/app/help.cxx | 5 ----- 4 files changed, 9 deletions(-)
New commits: commit d27a88f4fed168068bce5fc36d0bf62301641e25 Author: Caolán McNamara <[email protected]> AuthorDate: Wed Aug 14 08:22:31 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Aug 14 11:04:51 2024 +0200 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 <[email protected]> diff --git a/bin/find-mergedlib-can-be-private-symbols.functions.results b/bin/find-mergedlib-can-be-private-symbols.functions.results index 3ceead740e10..24eeb5a85d5e 100644 --- a/bin/find-mergedlib-can-be-private-symbols.functions.results +++ b/bin/find-mergedlib-can-be-private-symbols.functions.results @@ -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*) diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index 3a8d9e9849ff..0a7f653b0180 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -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, diff --git a/include/vcl/help.hxx b/include/vcl/help.hxx index b4bacc9a476f..4265e258292d 100644 --- a/include/vcl/help.hxx +++ b/include/vcl/help.hxx @@ -71,7 +71,6 @@ public: static void EnableContextHelp(); static void DisableContextHelp(); - static bool IsContextHelpEnabled(); static void EnableExtHelp(); static void DisableExtHelp(); diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 01a9937d3706..0a1ab15b2a51 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -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()) diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index de5ef8bb0c15..de54818d05a0 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -79,11 +79,6 @@ void Help::DisableContextHelp() ImplGetSVHelpData().mbContextHelp = false; } -bool Help::IsContextHelpEnabled() -{ - return ImplGetSVHelpData().mbContextHelp; -} - void Help::EnableExtHelp() { ImplGetSVHelpData().mbExtHelp = true; commit 67c0fe349aaec504144fe55ce282dbc92aa01b62 Author: Hubert Figuière <[email protected]> AuthorDate: Fri Aug 9 11:34:45 2024 -0400 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Aug 14 11:04:40 2024 +0200 cool#9699 - Don't show Help button when there is no help The SfxSingleTabDialogController was explictely showing the Help button even if it was previously hidden by the VclBuilder due to lack of Help URL in Collabora Online This was the case in the spelling option dialog. See https://github.com/CollaboraOnline/online/issues/9699 Signed-off-by: Hubert Figuière <[email protected]> Change-Id: I4454f3d1f0c097faeebf912c3282335fed67ec84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171697 Tested-by: Caolán McNamara <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171847 Tested-by: Jenkins diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index 0a7f653b0180..3a8d9e9849ff 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -102,6 +102,7 @@ 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, diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 9807730db7a2..01a9937d3706 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -29,6 +29,7 @@ #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; @@ -231,6 +232,7 @@ 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)) @@ -242,6 +244,7 @@ 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)) @@ -274,7 +277,8 @@ void SfxSingleTabDialogController::SetTabPage(std::unique_ptr<SfxTabPage> xTabPa m_xSfxPage->SetUserData(sUserData); m_xSfxPage->Reset(GetInputItemSet()); - m_xHelpBtn->set_visible(Help::IsContextHelpEnabled()); + if (!m_bHideHelpBtn) + m_xHelpBtn->set_visible(Help::IsContextHelpEnabled()); // Set TabPage text in the Dialog if there is any OUString sTitle(m_xSfxPage->GetPageTitle());
