dbaccess/source/ui/dlg/advancedsettings.cxx |    7 ++++---
 sc/source/ui/attrdlg/tabpages.cxx           |    2 +-
 sc/source/ui/inc/tabpages.hxx               |    2 +-
 sfx2/source/doc/templatedlg.cxx             |    8 ++++----
 4 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit f715f339d002f50efcef8f4b2a9c1bc039d9191f
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Jul 16 22:20:17 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Jul 18 07:06:44 2025 +0200

    sc: Switch param to weld::CheckButton&
    
    All callers pass one, and this makes that
    clearer (and that it's a weld::Toggleable
    subclass that actually supports TRISTATE_INDET).
    
    Change-Id: I3e1841e22ee4bd8525f63ad6dbb21c27902747b2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187995
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sc/source/ui/attrdlg/tabpages.cxx 
b/sc/source/ui/attrdlg/tabpages.cxx
index 0e62a9ada6c5..bc4e4ffcf55f 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -161,7 +161,7 @@ IMPL_LINK_NOARG(ScTabPageProtection, HidePrintClickHdl, 
weld::Toggleable&, void)
     ButtonClick(*m_xBtnHidePrint);
 }
 
-void ScTabPageProtection::ButtonClick(const weld::Toggleable& rBox)
+void ScTabPageProtection::ButtonClick(const weld::CheckButton& rBox)
 {
     TriState eState = rBox.get_state();
     if (eState == TRISTATE_INDET)
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
index 4a613f344b12..f7f70673a047 100644
--- a/sc/source/ui/inc/tabpages.hxx
+++ b/sc/source/ui/inc/tabpages.hxx
@@ -61,7 +61,7 @@ private:
     DECL_LINK(HideCellClickHdl, weld::Toggleable&, void);
     DECL_LINK(HideFormulaClickHdl, weld::Toggleable&, void);
     DECL_LINK(HidePrintClickHdl, weld::Toggleable&, void);
-    void ButtonClick(const weld::Toggleable& rBox);
+    void ButtonClick(const weld::CheckButton& rBox);
     void UpdateButtons();
 };
 
commit 2476872b8f78e8c2dc98d2e91133d272835e3f6d
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Jul 16 21:33:00 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Jul 18 07:06:38 2025 +0200

    dbaccess: Use weld::CheckButton& when calling set_state()
    
    The handler gets connected as follows in the SpecialSettingsPage
    ctor:
    
        booleanSetting.xControl->connect_toggled(LINK(this, 
SpecialSettingsPage, OnTriStateToggleHdl));
    
    The control is always a weld::CheckButton, so casting to
    that is safe.
    
    Do this in preparation of making the inconsistent
    state specific to weld::CheckButton and dropping
    weld::Toggleable::set_state in an upcoming commit.
    
    Change-Id: I03106924f7bdebd90ddcad5fe4c8136d32b72c5a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187994
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx 
b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 09d7430fc926..12c479b75b03 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -117,16 +117,17 @@ namespace dbaui
     IMPL_LINK(SpecialSettingsPage, OnTriStateToggleHdl, weld::Toggleable&, 
rToggle, void)
     {
         auto eOldState = m_aTriStates[&rToggle];
+        weld::CheckButton& rCheckButton = 
dynamic_cast<weld::CheckButton&>(rToggle);
         switch (eOldState)
         {
             case TRISTATE_INDET:
-                rToggle.set_state(TRISTATE_FALSE);
+                rCheckButton.set_state(TRISTATE_FALSE);
                 break;
             case TRISTATE_TRUE:
-                rToggle.set_state(TRISTATE_INDET);
+                rCheckButton.set_state(TRISTATE_INDET);
                 break;
             case TRISTATE_FALSE:
-                rToggle.set_state(TRISTATE_TRUE);
+                rCheckButton.set_state(TRISTATE_TRUE);
                 break;
         }
         m_aTriStates[&rToggle] = rToggle.get_state();
commit 1288b1ee2b10a76fc7fd02ce282473c347db1195
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Jul 16 21:26:25 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Jul 18 07:06:31 2025 +0200

    sfx2: Switch weld::Toggleable::{set_state -> set_active}
    
    Use weld::Toggleable::set_active instead
    of weld::Toggleable::set_state here, which
    is equivalent, but doesn't handle the
    TRISTATE_INDET state that isn't used/needed here.
    
    This is in preparation of making the inconsistent
    state specific to weld::CheckButton and dropping
    weld::Toggleable::set_state.
    
    Change-Id: I29016d872c72dde7f8e26aaaa815550973fee200
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187993
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 9a32cc1e8458..7c04c31d4c70 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -287,8 +287,8 @@ void 
SfxTemplateManagerDlg::setTemplateViewMode(TemplateViewMode eViewMode)
 {
     if(eViewMode == TemplateViewMode::eThumbnailView && mViewMode != 
TemplateViewMode::eThumbnailView)
     {
-        mxThumbnailViewButton->set_state(TRISTATE_TRUE);
-        mxListViewButton->set_state(TRISTATE_FALSE);
+        mxThumbnailViewButton->set_active(true);
+        mxListViewButton->set_active(false);
         mxLocalView->ThumbnailView::GrabFocus();
         mViewMode = eViewMode;
         mxLocalView->setTemplateViewMode(eViewMode);
@@ -296,8 +296,8 @@ void 
SfxTemplateManagerDlg::setTemplateViewMode(TemplateViewMode eViewMode)
     }
     if(eViewMode == TemplateViewMode::eListView && mViewMode != 
TemplateViewMode::eListView)
     {
-        mxListViewButton->set_state(TRISTATE_TRUE);
-        mxThumbnailViewButton->set_state(TRISTATE_FALSE);
+        mxListViewButton->set_active(true);
+        mxThumbnailViewButton->set_active(false);
         mxLocalView->ListView::grab_focus();
         mViewMode = eViewMode;
         mxLocalView->setTemplateViewMode(eViewMode);

Reply via email to