include/sfx2/tabdlg.hxx | 3 +++ sfx2/source/dialog/tabdlg.cxx | 12 ++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-)
New commits: commit 03a970babc2df4957051af996d8a426e4d94f17d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Sep 23 13:20:48 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Sep 23 15:52:33 2022 +0200 rename SfxTabDialogController::ActivatePageHdlHdl contents and make virtual Change-Id: I9ba605f83a5841319770ff1a6d52fb8200486c23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140488 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 4c519964e275..fdfffbb8716e 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -94,6 +94,9 @@ protected: virtual SfxItemSet* CreateInputItemSet(const OString& rName); virtual void PageCreated(const OString &rName, SfxTabPage &rPage); + virtual void ActivatePage(const OString& rPage); + virtual bool DeactivatePage(const OString& rPage); + std::unique_ptr<SfxItemSet> m_xExampleSet; SfxItemSet* GetInputSetImpl(); SfxTabPage* GetTabPage(std::string_view rPageId) const; diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index fb025ac21b6e..1dda5b9f3eb5 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -510,7 +510,11 @@ IMPL_LINK_NOARG(SfxTabDialogController, BaseFmtHdl, weld::Button&, void) } IMPL_LINK(SfxTabDialogController, ActivatePageHdl, const OString&, rPage, void) +{ + ActivatePage(rPage); +} +void SfxTabDialogController::ActivatePage(const OString& rPage) /* [Description] Handler that is called by StarView for switching to a different page. @@ -545,7 +549,11 @@ IMPL_LINK(SfxTabDialogController, ActivatePageHdl, const OString&, rPage, void) } IMPL_LINK(SfxTabDialogController, DeactivatePageHdl, const OString&, rPage, bool) +{ + return DeactivatePage(rPage); +} +bool SfxTabDialogController::DeactivatePage(const OString& rPage) /* [Description] Handler that is called by StarView before leaving a page. @@ -997,7 +1005,7 @@ void SfxTabDialogController::Start_Impl() m_xTabCtrl->set_current_page(aDlgOpt.GetPageID()); } - ActivatePageHdl(m_xTabCtrl->get_current_page_ident()); + ActivatePage(m_xTabCtrl->get_current_page_ident()); m_pImpl->bStarted = true; } @@ -1015,7 +1023,7 @@ void SfxTabDialogController::SetCurPageId(const OString& rIdent) void SfxTabDialogController::ShowPage(const OString& rIdent) { SetCurPageId(rIdent); - ActivatePageHdl(rIdent); + ActivatePage(rIdent); } OString SfxTabDialogController::GetCurPageId() const