From 9940f077fdfc0c271aa66ad64578ae2236a2ca81 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 20 May 2021 17:27:49 +0100 Subject: add Toggleable as a separate thing to a Button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and inherit ToggleButton from both it and Button Change-Id: If0e500aca8d0ffa087cb5e2bfc1786372fbff4eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115921 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sfx2/source/dialog/printopt.cxx | 14 +++++++------- sfx2/source/dialog/securitypage.cxx | 4 ++-- sfx2/source/dialog/templdlg.cxx | 2 +- sfx2/source/dialog/versdlg.cxx | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'sfx2/source/dialog') diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 2b106f9c5081..d6fe953c785b 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -216,7 +216,7 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt } } -IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, weld::ToggleButton&, void ) +IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, weld::Toggleable&, void ) { const bool bReduceTransparency = m_xReduceTransparencyCB->get_active(); @@ -226,7 +226,7 @@ IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, wel m_xTransparencyCB->set_sensitive( !bReduceTransparency ); } -IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, weld::ToggleButton&, void ) +IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, weld::Toggleable&, void ) { const bool bEnable = m_xReduceGradientsCB->get_active(); @@ -237,7 +237,7 @@ IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, weld:: ToggleReduceGradientsStripesRBHdl(*m_xReduceGradientsStripesRB); } -IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, weld::ToggleButton&, void ) +IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, weld::Toggleable&, void ) { const bool bEnable = m_xReduceBitmapsCB->get_active(); @@ -250,21 +250,21 @@ IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, weld::To ToggleReduceBitmapsResolutionRBHdl(*m_xReduceBitmapsResolutionRB); } -IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, weld::ToggleButton&, void ) +IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, weld::Toggleable&, void ) { const bool bEnable = m_xReduceGradientsCB->get_active() && m_xReduceGradientsStripesRB->get_active(); m_xReduceGradientsStepCountNF->set_sensitive(bEnable); } -IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl, weld::ToggleButton&, void ) +IMPL_LINK_NOARG( SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl, weld::Toggleable&, void ) { const bool bEnable = m_xReduceBitmapsCB->get_active() && m_xReduceBitmapsResolutionRB->get_active(); m_xReduceBitmapsResolutionLB->set_sensitive(bEnable); } -IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, weld::ToggleButton&, rButton, void ) +IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, weld::Toggleable&, rButton, void ) { if (rButton.get_active()) { @@ -275,7 +275,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, weld::ToggleB ImplSaveControls( &maPrinterOptions ); } -IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, weld::ToggleButton&, rButton, void ) +IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, weld::Toggleable&, rButton, void ) { if (rButton.get_active()) { diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index ad4c30b4e6c1..7441e47c1746 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -147,7 +147,7 @@ struct SfxSecurityPage_Impl std::unique_ptr m_xProtectPB; // for record changes std::unique_ptr m_xUnProtectPB; // for record changes - DECL_LINK(RecordChangesCBToggleHdl, weld::ToggleButton&, void); + DECL_LINK(RecordChangesCBToggleHdl, weld::Toggleable&, void); DECL_LINK(ChangeProtectionPBHdl, weld::Button&, void); SfxSecurityPage_Impl( SfxSecurityPage &rDlg ); @@ -312,7 +312,7 @@ void SfxSecurityPage_Impl::Reset_Impl() } } -IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl, weld::ToggleButton&, void) +IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl, weld::Toggleable&, void) { // when change recording gets disabled protection must be disabled as well if (m_xRecordChangesCB->get_active()) // the new check state is already present, thus the '!' diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index ed55c859fb2e..5ed2e844c38c 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1935,7 +1935,7 @@ IMPL_LINK_NOARG(SfxCommonTemplateDialog_Impl, TreeListApplyHdl, weld::TreeView&, return true; } -IMPL_LINK_NOARG(SfxCommonTemplateDialog_Impl, PreviewHdl, weld::ToggleButton&, void) +IMPL_LINK_NOARG(SfxCommonTemplateDialog_Impl, PreviewHdl, weld::Toggleable&, void) { std::shared_ptr batch( comphelper::ConfigurationChanges::create() ); bool bCustomPreview = mxPreviewCheckbox->get_active(); diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 2501df8ed480..1c11e5fd422f 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -376,7 +376,7 @@ IMPL_LINK(SfxVersionDialog, ButtonHdl_Impl, weld::Button&, rButton, void) } } -IMPL_LINK(SfxVersionDialog, ToggleHdl_Impl, weld::ToggleButton&, rButton, void) +IMPL_LINK(SfxVersionDialog, ToggleHdl_Impl, weld::Toggleable&, rButton, void) { if (&rButton == m_xSaveCheckBox.get()) { -- cgit