Related: tdf#35030 hide the "reset" button more reliably

otherwise it won't end up hidden if the "keyboard" tab page is the initial
page, this handler only happens when the user switches tabs.

use the newly added virtual methods to manage this instead

Change-Id: I3eef6b4d7d453a5ec16ec62b2ebb558bd4757caa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140489
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index f5ed658..9baf31e 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -214,7 +214,6 @@ SvxConfigDialog::SvxConfigDialog(weld::Window * pParent, const SfxItemSet* pInSe
    AddTabPage("contextmenus", CreateSvxContextMenuConfigPage, nullptr);
    AddTabPage("keyboard", CreateKeyboardConfigPage, nullptr);
    AddTabPage("events", CreateSvxEventConfigPage, nullptr);
    m_xTabCtrl->connect_enter_page(LINK(this, SvxConfigDialog, ActivatePageHdl));

    const SfxPoolItem* pItem = pInSet->GetItem( SID_CONFIG );

@@ -229,8 +228,9 @@ SvxConfigDialog::SvxConfigDialog(weld::Window * pParent, const SfxItemSet* pInSe
    }
}

IMPL_LINK(SvxConfigDialog, ActivatePageHdl, const OString&, rPage, void)
void SvxConfigDialog::ActivatePage(const OString& rPage)
{
    SfxTabDialogController::ActivatePage(rPage);
    GetResetButton()->set_visible(rPage != "keyboard");
}

diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index bde738e..ee97f6e 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -67,7 +67,9 @@ class SvxConfigDialog : public SfxTabDialogController
{
private:
    css::uno::Reference< css::frame::XFrame > m_xFrame;
    DECL_LINK(ActivatePageHdl, const OString&, void);

    virtual void ActivatePage(const OString& rPage) override;

public:
    SvxConfigDialog(weld::Window*, const SfxItemSet*);