[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu May 20 15:32:10 UTC 2021


 sw/source/ui/dbui/dbinsdlg.cxx    |   16 +++++-----------
 sw/source/uibase/inc/dbinsdlg.hxx |    2 +-
 2 files changed, 6 insertions(+), 12 deletions(-)

New commits:
commit f7aca9ed4533f202e87141ca7a65d9949a36c9a1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu May 20 14:39:56 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu May 20 17:31:26 2021 +0200

    HeaderHdl only does something for the m_xCbTableHeadon case
    
    drop the others
    
    Change-Id: Ibc07996ada54437c44201cb32f70bd594dd4a202
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115878
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index a48dfeea4726..1f19a0884273 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -354,9 +354,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
     m_xIbDbcolAllFrom->connect_clicked( LINK(this, SwInsertDBColAutoPilot, TableToFromHdl ));
     m_xIbDbcolToEdit->connect_clicked( LINK(this, SwInsertDBColAutoPilot, TableToFromHdl ));
 
-    m_xCbTableHeadon->connect_clicked( LINK(this, SwInsertDBColAutoPilot, HeaderHdl ));
-    m_xRbHeadlColnms->connect_clicked( LINK(this, SwInsertDBColAutoPilot, HeaderHdl ));
-    m_xRbHeadlEmpty->connect_clicked( LINK(this, SwInsertDBColAutoPilot, HeaderHdl ));
+    m_xCbTableHeadon->connect_toggled( LINK(this, SwInsertDBColAutoPilot, HeaderHdl ));
 
     m_xLbTextDbColumn->connect_changed( LINK( this, SwInsertDBColAutoPilot, TVSelectHdl ));
     m_xLbTableDbColumn->connect_changed( LINK( this, SwInsertDBColAutoPilot, TVSelectHdl ));
@@ -797,15 +795,11 @@ IMPL_LINK_NOARG(SwInsertDBColAutoPilot, CBSelectHdl, weld::ComboBox&, void)
     }
 }
 
-IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, weld::Button&, rButton, void )
+IMPL_LINK_NOARG(SwInsertDBColAutoPilot, HeaderHdl, weld::ToggleButton&, void)
 {
-    if (&rButton == m_xCbTableHeadon.get())
-    {
-        bool bEnable = m_xCbTableHeadon->get_active();
-
-        m_xRbHeadlColnms->set_sensitive( bEnable );
-        m_xRbHeadlEmpty->set_sensitive( bEnable );
-    }
+    bool bEnable = m_xCbTableHeadon->get_active();
+    m_xRbHeadlColnms->set_sensitive( bEnable );
+    m_xRbHeadlEmpty->set_sensitive( bEnable );
 }
 
 static void lcl_InsTextInArr( const OUString& rText, DB_Columns& rColArr )
diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx
index 0dc715d1c6fd..2d3206331e2f 100644
--- a/sw/source/uibase/inc/dbinsdlg.hxx
+++ b/sw/source/uibase/inc/dbinsdlg.hxx
@@ -131,7 +131,7 @@ class SwInsertDBColAutoPilot : public SfxDialogController, public utl::ConfigIte
     DECL_LINK( TVSelectHdl, weld::TreeView&, void );
     DECL_LINK( CBSelectHdl, weld::ComboBox&, void );
     DECL_LINK( DblClickHdl, weld::TreeView&, bool );
-    DECL_LINK( HeaderHdl, weld::Button&, void );
+    DECL_LINK( HeaderHdl, weld::ToggleButton&, void );
 
     bool SplitTextToColArr( const OUString& rText, DB_Columns& rColArr, bool bInsField );
     virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;


More information about the Libreoffice-commits mailing list