[Libreoffice-commits] core.git: desktop/source extensions/source fpicker/source sw/source uui/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu May 20 18:28:22 UTC 2021


 desktop/source/deployment/gui/dp_gui_dialog2.cxx |    8 +++---
 desktop/source/deployment/gui/dp_gui_dialog2.hxx |    2 -
 extensions/source/abpilot/abpfinalpage.cxx       |    8 +++---
 extensions/source/abpilot/abpfinalpage.hxx       |    4 +--
 extensions/source/scanner/sanedlg.cxx            |   29 ++++++++++++++---------
 extensions/source/scanner/sanedlg.hxx            |    1 
 fpicker/source/office/iodlg.cxx                  |   21 +++++++---------
 fpicker/source/office/iodlg.hxx                  |    4 +--
 sw/source/ui/table/convert.cxx                   |    8 +++---
 sw/source/uibase/inc/convert.hxx                 |    4 +--
 uui/source/logindlg.cxx                          |    4 +--
 uui/source/logindlg.hxx                          |    2 -
 uui/source/secmacrowarnings.cxx                  |    4 +--
 uui/source/secmacrowarnings.hxx                  |    2 -
 14 files changed, 54 insertions(+), 47 deletions(-)

New commits:
commit bb166403ef1026e3665b2d60810c71955d7402c0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu May 20 15:30:35 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu May 20 20:27:38 2021 +0200

    use toggle instead of click for CheckButton
    
    Change-Id: I7196581a8b7c307d531f6995e1c24db746afdb26
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115883
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 730854127ac2..00d2603e529d 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -448,9 +448,9 @@ ExtMgrDialog::ExtMgrDialog(weld::Window *pParent, TheExtensionManager *pManager)
 
     m_xCancelBtn->connect_clicked( LINK( this, ExtMgrDialog, HandleCancelBtn ) );
 
-    m_xBundledCbx->connect_clicked( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) );
-    m_xSharedCbx->connect_clicked( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) );
-    m_xUserCbx->connect_clicked( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) );
+    m_xBundledCbx->connect_toggled( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) );
+    m_xSharedCbx->connect_toggled( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) );
+    m_xUserCbx->connect_toggled( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) );
 
     m_xBundledCbx->set_active(true);
     m_xSharedCbx->set_active(true);
@@ -905,7 +905,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleEnableBtn, weld::Button&, void)
     }
 }
 
-IMPL_LINK_NOARG(ExtMgrDialog, HandleExtTypeCbx, weld::Button&, void)
+IMPL_LINK_NOARG(ExtMgrDialog, HandleExtTypeCbx, weld::ToggleButton&, void)
 {
     // re-creates the list of packages with addEntry selecting the packages
     prepareChecking();
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 40faf4548313..424ad607f7fa 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -132,7 +132,7 @@ class ExtMgrDialog : public weld::GenericDialogController
     DECL_LINK( HandleUpdateBtn, weld::Button&, void );
     DECL_LINK( HandleCancelBtn, weld::Button&, void );
     DECL_LINK( HandleCloseBtn, weld::Button&, void );
-    DECL_LINK( HandleExtTypeCbx, weld::Button&, void );
+    DECL_LINK( HandleExtTypeCbx, weld::ToggleButton&, void );
     DECL_LINK( TimeOutHdl, Timer *, void );
     DECL_LINK( startProgress, void *, void );
 
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx
index 802b0d853b52..609918899e0b 100644
--- a/extensions/source/abpilot/abpfinalpage.cxx
+++ b/extensions/source/abpilot/abpfinalpage.cxx
@@ -61,9 +61,9 @@ namespace abp
 
         m_xName->connect_changed( LINK(this, FinalPage, OnEntryNameModified) );
         m_xLocation->connect_changed( LINK(this, FinalPage, OnComboNameModified) );
-        m_xRegisterName->connect_clicked( LINK( this, FinalPage, OnRegister ) );
+        m_xRegisterName->connect_toggled( LINK( this, FinalPage, OnRegister ) );
         m_xRegisterName->set_active(true);
-        m_xEmbed->connect_clicked( LINK( this, FinalPage, OnEmbed ) );
+        m_xEmbed->connect_toggled( LINK( this, FinalPage, OnEmbed ) );
         m_xEmbed->set_active(true);
     }
 
@@ -204,7 +204,7 @@ namespace abp
         implCheckName();
     }
 
-    IMPL_LINK_NOARG(FinalPage, OnRegister, weld::Button&, void)
+    IMPL_LINK_NOARG(FinalPage, OnRegister, weld::ToggleButton&, void)
     {
         bool bEnable = m_xRegisterName->get_active();
         m_xNameLabel->set_sensitive(bEnable);
@@ -212,7 +212,7 @@ namespace abp
         implCheckName();
     }
 
-    IMPL_LINK_NOARG(FinalPage, OnEmbed, weld::Button&, void)
+    IMPL_LINK_NOARG(FinalPage, OnEmbed, weld::ToggleButton&, void)
     {
         bool bEmbed = m_xEmbed->get_active();
         m_xLocationLabel->set_sensitive(!bEmbed);
diff --git a/extensions/source/abpilot/abpfinalpage.hxx b/extensions/source/abpilot/abpfinalpage.hxx
index 400d4d8ad5e6..229509cb97fb 100644
--- a/extensions/source/abpilot/abpfinalpage.hxx
+++ b/extensions/source/abpilot/abpfinalpage.hxx
@@ -62,8 +62,8 @@ namespace abp
 
         DECL_LINK(OnEntryNameModified, weld::Entry&, void);
         DECL_LINK(OnComboNameModified, weld::ComboBox&, void);
-        DECL_LINK(OnRegister, weld::Button&, void);
-        DECL_LINK(OnEmbed, weld::Button&, void);
+        DECL_LINK(OnRegister, weld::ToggleButton&, void);
+        DECL_LINK(OnEmbed, weld::ToggleButton&, void);
 
         bool isValidName() const;
         void implCheckName();
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 197da88d94fd..06a508d6f860 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -250,7 +250,7 @@ SaneDlg::SaneDlg(weld::Window* pParent, Sane& rSane, bool bScanEnabled)
     mxDeviceBox->connect_changed( LINK( this, SaneDlg, SelectHdl ) );
     mxOptionBox->connect_changed( LINK( this, SaneDlg, OptionsBoxSelectHdl ) );
     mxCancelButton->connect_clicked( LINK( this, SaneDlg, ClickBtnHdl ) );
-    mxBoolCheckBox->connect_clicked( LINK( this, SaneDlg, ClickBtnHdl ) );
+    mxBoolCheckBox->connect_toggled( LINK( this, SaneDlg, ToggleBtnHdl ) );
     mxStringEdit->connect_changed( LINK( this, SaneDlg, ModifyHdl ) );
     mxNumericEdit->connect_changed( LINK( this, SaneDlg, ModifyHdl ) );
     mxVectorBox->connect_changed( LINK( this, SaneDlg, ModifyHdl ) );
@@ -261,7 +261,7 @@ SaneDlg::SaneDlg(weld::Window* pParent, Sane& rSane, bool bScanEnabled)
     mxRightField->connect_value_changed( LINK( this, SaneDlg, MetricValueModifyHdl) );
     mxTopField->connect_value_changed( LINK( this, SaneDlg, MetricValueModifyHdl) );
     mxBottomField->connect_value_changed( LINK( this, SaneDlg, MetricValueModifyHdl) );
-    mxAdvancedBox->connect_clicked( LINK( this, SaneDlg, ClickBtnHdl ) );
+    mxAdvancedBox->connect_toggled( LINK( this, SaneDlg, ToggleBtnHdl ) );
 
     maOldLink = mrSane.SetReloadOptionsHdl( LINK( this, SaneDlg, ReloadSaneOptionsHdl ) );
 }
@@ -568,11 +568,6 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, weld::Button&, rButton, void )
         }
         else if( &rButton == mxPreviewButton.get() )
             AcquirePreview();
-        else if( &rButton == mxBoolCheckBox.get() )
-        {
-            mrSane.SetOptionValue( mnCurrentOption,
-                                   mxBoolCheckBox->get_active() );
-        }
         else if( &rButton == mxButtonOption.get() )
         {
 
@@ -605,10 +600,6 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, weld::Button&, rButton, void )
                     break;
             }
         }
-        else if( &rButton == mxAdvancedBox.get() )
-        {
-            ReloadSaneOptionsHdl( mrSane );
-        }
     }
     if (&rButton == mxScanButton.get())
     {
@@ -626,6 +617,22 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, weld::Button&, rButton, void )
     }
 }
 
+IMPL_LINK( SaneDlg, ToggleBtnHdl, weld::ToggleButton&, rButton, void )
+{
+    if( mrSane.IsOpen() )
+    {
+        if( &rButton == mxBoolCheckBox.get() )
+        {
+            mrSane.SetOptionValue( mnCurrentOption,
+                                   mxBoolCheckBox->get_active() );
+        }
+        else if( &rButton == mxAdvancedBox.get() )
+        {
+            ReloadSaneOptionsHdl( mrSane );
+        }
+    }
+}
+
 IMPL_LINK( SaneDlg, SelectHdl, weld::ComboBox&, rListBox, void )
 {
     if( &rListBox == mxDeviceBox.get() && Sane::IsSane() && Sane::CountDevices() )
diff --git a/extensions/source/scanner/sanedlg.hxx b/extensions/source/scanner/sanedlg.hxx
index ad87667bf13a..f467cdd1f6f8 100644
--- a/extensions/source/scanner/sanedlg.hxx
+++ b/extensions/source/scanner/sanedlg.hxx
@@ -75,6 +75,7 @@ private:
     std::unique_ptr<weld::CustomWeld> mxPreviewWnd;
 
     DECL_LINK( ClickBtnHdl, weld::Button&, void );
+    DECL_LINK( ToggleBtnHdl, weld::ToggleButton&, void );
     DECL_LINK( SelectHdl, weld::ComboBox&, void );
     DECL_LINK( ModifyHdl, weld::Entry&, void );
     DECL_LINK( MetricValueModifyHdl, weld::MetricSpinButton&, void );
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 98c89e2b2e5e..a861716559ef 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -359,16 +359,16 @@ SvtFileDialog::SvtFileDialog(weld::Window* pParent, PickerFlags nStyle)
     {
         m_xCbReadOnly->set_help_id( HID_FILEOPEN_READONLY );
         m_xCbReadOnly->set_label( FpsResId( STR_SVT_FILEPICKER_READONLY ) );
-        m_xCbReadOnly->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        m_xCbReadOnly->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
         m_xCbReadOnly->show();
     }
 
     if ( nStyle & PickerFlags::Password )
     {
         m_xImpl->m_xCbPassword->set_label( FpsResId( STR_SVT_FILEPICKER_PASSWORD ) );
-        m_xImpl->m_xCbPassword->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        m_xImpl->m_xCbPassword->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
         m_xImpl->m_xCbPassword->show();
-        m_xImpl->m_xCbGPGEncrypt->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        m_xImpl->m_xCbGPGEncrypt->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
         m_xImpl->m_xCbGPGEncrypt->show();
     }
 
@@ -1213,7 +1213,7 @@ IMPL_LINK( SvtFileDialog, OpenDoneHdl_Impl, SvtFileView*, pView, void )
     EnableControl( m_xImpl->m_xBtnUp->getWidget(), bCanTravelUp );
 }
 
-IMPL_LINK_NOARG(SvtFileDialog, AutoExtensionHdl_Impl, weld::Button&, void)
+IMPL_LINK_NOARG(SvtFileDialog, AutoExtensionHdl_Impl, weld::ToggleButton&, void)
 {
     if (m_pFileNotifier)
         m_pFileNotifier->notify(CTRL_STATE_CHANGED, CHECKBOX_AUTOEXTENSION);
@@ -1222,7 +1222,7 @@ IMPL_LINK_NOARG(SvtFileDialog, AutoExtensionHdl_Impl, weld::Button&, void)
     lcl_autoUpdateFileExtension( this, m_xImpl->GetCurFilter()->GetExtension() );
 }
 
-IMPL_LINK( SvtFileDialog, ClickHdl_Impl, weld::Button&, rCheckBox, void )
+IMPL_LINK( SvtFileDialog, ClickHdl_Impl, weld::ToggleButton&, rCheckBox, void )
 {
     if (!m_pFileNotifier)
         return;
@@ -1248,7 +1248,6 @@ IMPL_LINK( SvtFileDialog, ClickHdl_Impl, weld::Button&, rCheckBox, void )
         m_pFileNotifier->notify( CTRL_STATE_CHANGED, nId );
 }
 
-
 IMPL_LINK_NOARG(SvtFileDialog, PlayButtonHdl_Impl, weld::Button&, void)
 {
     if (m_pFileNotifier)
@@ -2043,7 +2042,7 @@ void SvtFileDialog::AddControls_Impl( )
     {
         m_xCbLinkBox->set_label( FpsResId( STR_SVT_FILEPICKER_INSERT_AS_LINK ) );
         m_xCbLinkBox->set_help_id( HID_FILEDLG_LINK_CB );
-        m_xCbLinkBox->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        m_xCbLinkBox->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
         m_xCbLinkBox->show();
     }
 
@@ -2055,7 +2054,7 @@ void SvtFileDialog::AddControls_Impl( )
         // "preview"
         m_xCbPreviewBox->set_label( FpsResId( STR_SVT_FILEPICKER_SHOW_PREVIEW ) );
         m_xCbPreviewBox->set_help_id( HID_FILEDLG_PREVIEW_CB );
-        m_xCbPreviewBox->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        m_xCbPreviewBox->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
         m_xCbPreviewBox->show();
 
         // generate preview window just here
@@ -2070,21 +2069,21 @@ void SvtFileDialog::AddControls_Impl( )
     {
         m_xImpl->m_xCbAutoExtension->set_label( FpsResId( STR_SVT_FILEPICKER_AUTO_EXTENSION ) );
         m_xImpl->m_xCbAutoExtension->set_active(true);
-        m_xImpl->m_xCbAutoExtension->connect_clicked( LINK( this, SvtFileDialog, AutoExtensionHdl_Impl ) );
+        m_xImpl->m_xCbAutoExtension->connect_toggled( LINK( this, SvtFileDialog, AutoExtensionHdl_Impl ) );
         m_xImpl->m_xCbAutoExtension->show();
     }
 
     if ( m_nPickerFlags & PickerFlags::FilterOptions )
     {
         m_xImpl->m_xCbOptions->set_label( FpsResId( STR_SVT_FILEPICKER_FILTER_OPTIONS ) );
-        m_xImpl->m_xCbOptions->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        m_xImpl->m_xCbOptions->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
         m_xImpl->m_xCbOptions->show();
     }
 
     if ( m_nPickerFlags & PickerFlags::Selection )
     {
         m_xCbSelection->set_label( FpsResId( STR_SVT_FILEPICKER_SELECTION ) );
-        m_xCbSelection->connect_clicked( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+        m_xCbSelection->connect_toggled( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
         m_xCbSelection->show();
     }
 
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index c53302038bb0..4eec689116fa 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -120,8 +120,8 @@ private:
     DECL_LINK(DblClickHdl_Impl, SvtFileView*, bool);
     DECL_LINK(EntrySelectHdl_Impl, weld::ComboBox&, void);
     DECL_LINK(OpenDoneHdl_Impl, SvtFileView*, void);
-    DECL_LINK(AutoExtensionHdl_Impl, weld::Button&, void);
-    DECL_LINK(ClickHdl_Impl, weld::Button&, void);
+    DECL_LINK(AutoExtensionHdl_Impl, weld::ToggleButton&, void);
+    DECL_LINK(ClickHdl_Impl, weld::ToggleButton&, void);
     DECL_LINK(PlayButtonHdl_Impl, weld::Button&, void);
     DECL_LINK(SizeAllocHdl, const Size&, void);
 
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 52bc85e2a46b..cd0631b6dee9 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -156,8 +156,8 @@ SwConvertTableDlg::SwConvertTableDlg(SwView& rView, bool bToTable)
     m_xRepeatHeaderCB->set_active(aInsOpts.mnRowsToRepeat > 0);
     m_xDontSplitCB->set_active(!(nInsTableFlags & SwInsertTableFlags::SplitLayout));
 
-    m_xHeaderCB->connect_clicked(LINK(this, SwConvertTableDlg, CheckBoxHdl));
-    m_xRepeatHeaderCB->connect_clicked(LINK(this, SwConvertTableDlg, RepeatHeaderCheckBoxHdl));
+    m_xHeaderCB->connect_toggled(LINK(this, SwConvertTableDlg, CheckBoxHdl));
+    m_xRepeatHeaderCB->connect_toggled(LINK(this, SwConvertTableDlg, RepeatHeaderCheckBoxHdl));
     RepeatHeaderCheckBoxHdl(*m_xRepeatHeaderCB);
     CheckBoxHdl(*m_xHeaderCB);
 }
@@ -186,13 +186,13 @@ IMPL_LINK(SwConvertTableDlg, BtnHdl, weld::Button&, rButton, void)
     m_xOtherEd->set_sensitive(m_xOtherBtn->get_active());
 }
 
-IMPL_LINK_NOARG(SwConvertTableDlg, CheckBoxHdl, weld::Button&, void)
+IMPL_LINK_NOARG(SwConvertTableDlg, CheckBoxHdl, weld::ToggleButton&, void)
 {
     m_xRepeatHeaderCB->set_sensitive(m_xHeaderCB->get_active());
     RepeatHeaderCheckBoxHdl(*m_xRepeatHeaderCB);
 }
 
-IMPL_LINK_NOARG(SwConvertTableDlg, RepeatHeaderCheckBoxHdl, weld::Button&, void)
+IMPL_LINK_NOARG(SwConvertTableDlg, RepeatHeaderCheckBoxHdl, weld::ToggleButton&, void)
 {
     bool bEnable = m_xHeaderCB->get_active() && m_xRepeatHeaderCB->get_active();
     m_xRepeatRows->set_sensitive(bEnable);
diff --git a/sw/source/uibase/inc/convert.hxx b/sw/source/uibase/inc/convert.hxx
index cc7929e9fb64..6b1d9da1a323 100644
--- a/sw/source/uibase/inc/convert.hxx
+++ b/sw/source/uibase/inc/convert.hxx
@@ -53,8 +53,8 @@ class SwConvertTableDlg : public SfxDialogController
 
     DECL_LINK(AutoFormatHdl, weld::Button&, void);
     DECL_LINK(BtnHdl, weld::Button&, void);
-    DECL_LINK(CheckBoxHdl, weld::Button&, void);
-    DECL_LINK(RepeatHeaderCheckBoxHdl, weld::Button&, void);
+    DECL_LINK(CheckBoxHdl, weld::ToggleButton&, void);
+    DECL_LINK(RepeatHeaderCheckBoxHdl, weld::ToggleButton&, void);
 
 public:
     SwConvertTableDlg(SwView& rView, bool bToTable);
diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx
index 5264c26f8366..262da5d7f74c 100644
--- a/uui/source/logindlg.cxx
+++ b/uui/source/logindlg.cxx
@@ -105,7 +105,7 @@ IMPL_LINK_NOARG(LoginDialog, OKHdl_Impl, weld::Button&, void)
     m_xDialog->response(RET_OK);
 }
 
-IMPL_LINK_NOARG(LoginDialog, UseSysCredsHdl_Impl, weld::Button&, void)
+IMPL_LINK_NOARG(LoginDialog, UseSysCredsHdl_Impl, weld::ToggleButton&, void)
 {
     EnableUseSysCredsControls_Impl( m_xUseSysCredsCB->get_active() );
 }
@@ -135,7 +135,7 @@ LoginDialog::LoginDialog(weld::Window* pParent, LoginFlags nFlags,
     m_xNameED->set_max_length( _MAX_PATH );
 
     m_xOKBtn->connect_clicked( LINK( this, LoginDialog, OKHdl_Impl ) );
-    m_xUseSysCredsCB->connect_clicked( LINK( this, LoginDialog, UseSysCredsHdl_Impl ) );
+    m_xUseSysCredsCB->connect_toggled( LINK( this, LoginDialog, UseSysCredsHdl_Impl ) );
 
     HideControls_Impl( nFlags );
 }
diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx
index 0b3d57f1d885..6f2e2de2de98 100644
--- a/uui/source/logindlg.hxx
+++ b/uui/source/logindlg.hxx
@@ -58,7 +58,7 @@ class LoginDialog : public weld::GenericDialogController
     void            SetRequest();
 
     DECL_LINK(OKHdl_Impl, weld::Button&, void);
-    DECL_LINK(UseSysCredsHdl_Impl, weld::Button&, void);
+    DECL_LINK(UseSysCredsHdl_Impl, weld::ToggleButton&, void);
 
 public:
     LoginDialog(weld::Window* pParent, LoginFlags nFlags,
diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx
index 7c853cf2f8e0..10bd36a17a94 100644
--- a/uui/source/secmacrowarnings.cxx
+++ b/uui/source/secmacrowarnings.cxx
@@ -137,7 +137,7 @@ IMPL_LINK_NOARG(MacroWarning, DisableBtnHdl, weld::Button&, void)
     m_xDialog->response(RET_CANCEL);
 }
 
-IMPL_LINK_NOARG(MacroWarning, AlwaysTrustCheckHdl, weld::Button&, void)
+IMPL_LINK_NOARG(MacroWarning, AlwaysTrustCheckHdl, weld::ToggleButton&, void)
 {
     const bool bEnable = (mnActSecLevel < 2 || mxAlwaysTrustCB->get_active());
     mxEnableBtn->set_sensitive(bEnable);
@@ -154,7 +154,7 @@ void MacroWarning::InitControls()
 
         const SvtSecurityOptions aSecOption;
         if (!aSecOption.IsReadOnly(SvtSecurityOptions::EOption::MacroTrustedAuthors))
-            mxAlwaysTrustCB->connect_clicked(LINK(this, MacroWarning, AlwaysTrustCheckHdl));
+            mxAlwaysTrustCB->connect_toggled(LINK(this, MacroWarning, AlwaysTrustCheckHdl));
         else
             mxAlwaysTrustCB->set_visible(false);
 
diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx
index 71660fe7d0ff..1c0776e4bc52 100644
--- a/uui/source/secmacrowarnings.hxx
+++ b/uui/source/secmacrowarnings.hxx
@@ -48,7 +48,7 @@ private:
     DECL_LINK(ViewSignsBtnHdl, weld::Button&, void);
     DECL_LINK(EnableBtnHdl, weld::Button&, void);
     DECL_LINK(DisableBtnHdl, weld::Button&, void);
-    DECL_LINK(AlwaysTrustCheckHdl, weld::Button&, void);
+    DECL_LINK(AlwaysTrustCheckHdl, weld::ToggleButton&, void);
     DECL_STATIC_LINK(MacroWarning, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*);
 
     void                InitControls();


More information about the Libreoffice-commits mailing list