[Libreoffice-commits] core.git: cui/source sc/source

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Sun Dec 27 09:07:27 UTC 2020


 cui/source/tabpages/numfmt.cxx          |   12 +++++-------
 sc/source/ui/miscdlgs/datafdlg.cxx      |   18 ++++++++----------
 sc/source/ui/miscdlgs/tabbgcolordlg.cxx |    6 ++----
 sc/source/ui/pagedlg/areasdlg.cxx       |   29 ++++++++++++++---------------
 sc/source/ui/pagedlg/tptable.cxx        |    9 +++------
 5 files changed, 32 insertions(+), 42 deletions(-)

New commits:
commit db97e00893c204226a2eab2d95c9837bce3cddb0
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Fri Dec 25 15:55:45 2020 +0100
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Dec 27 10:06:50 2020 +0100

    Drop some unnecessary HDL macros
    
    Change-Id: I48586a9648183df2ecd18f15a596a23c36aa15f0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108359
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 5a6436e8998b..6ff9acdb5641 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -190,8 +190,6 @@ void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::
         m_xLbLanguage->set_active_id(pNumFmtShell->GetCurLanguage()); \
     }
 
-#define HDL(hdl) LINK( this, SvxNumberFormatTabPage, hdl )
-
 SvxNumberFormatTabPage::SvxNumberFormatTabPage(weld::Container* pPage, weld::DialogController* pController,
     const SfxItemSet& rCoreAttrs)
     : SfxTabPage(pPage, pController, "cui/ui/numberingformatpage.ui", "NumberingFormatPage", &rCoreAttrs)
@@ -297,14 +295,14 @@ void SvxNumberFormatTabPage::Init_Impl()
     m_xBtnThousand->connect_focus_in(LINK(this, SvxNumberFormatTabPage, LostFocusHdl_Impl));
     m_xBtnEngineering->connect_clicked(LINK(this, SvxNumberFormatTabPage, OptClickHdl_Impl));
     m_xBtnEngineering->connect_focus_in(LINK(this, SvxNumberFormatTabPage, LostFocusHdl_Impl));
-    m_xLbFormat->connect_row_activated(HDL(DoubleClickHdl_Impl));
-    m_xEdFormat->connect_changed(HDL(EditModifyHdl_Impl));
+    m_xLbFormat->connect_row_activated(LINK(this, SvxNumberFormatTabPage, DoubleClickHdl_Impl));
+    m_xEdFormat->connect_changed(LINK(this, SvxNumberFormatTabPage, EditModifyHdl_Impl));
     m_xEdFormat->connect_focus_in(LINK(this, SvxNumberFormatTabPage, LostFocusHdl_Impl));
-    m_xIbAdd->connect_clicked(HDL(ClickHdl_Impl));
+    m_xIbAdd->connect_clicked(LINK(this, SvxNumberFormatTabPage, ClickHdl_Impl));
     m_xIbAdd->connect_focus_in(LINK(this, SvxNumberFormatTabPage, LostFocusHdl_Impl));
-    m_xIbRemove->connect_clicked(HDL(ClickHdl_Impl));
+    m_xIbRemove->connect_clicked(LINK(this, SvxNumberFormatTabPage, ClickHdl_Impl));
     m_xIbRemove->connect_focus_in(LINK(this, SvxNumberFormatTabPage, LostFocusHdl_Impl));
-    m_xIbInfo->connect_clicked(HDL(ClickHdl_Impl));
+    m_xIbInfo->connect_clicked(LINK(this, SvxNumberFormatTabPage, ClickHdl_Impl));
     UpdateThousandEngineeringCheckBox();
     UpdateDecimalsDenominatorEditBox();
 
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index 636ad9336928..c357718c2a53 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -16,8 +16,6 @@
 
 #include <vcl/svapp.hxx>
 
-#define HDL(hdl)            LINK( this, ScDataFormDlg, hdl )
-
 ScDataFormDlg::ScDataFormDlg(weld::Window* pParent, ScTabViewShell* pTabViewShellOri)
     : GenericDialogController(pParent, "modules/scalc/ui/dataform.ui", "DataFormDialog")
     , pTabViewShell(pTabViewShellOri)
@@ -165,7 +163,7 @@ ScDataFormDlg::ScDataFormDlg(weld::Window* pParent, ScTabViewShell* pTabViewShel
             }
             if (m_aEntries[nIndex] != nullptr)
             {
-                m_aEntries[nIndex]->m_xEdit->connect_changed(HDL(Impl_DataModifyHdl));
+                m_aEntries[nIndex]->m_xEdit->connect_changed(LINK( this, ScDataFormDlg, Impl_DataModifyHdl));
                 m_aEntries[nIndex]->m_xEdit->save_value();
             }
         }
@@ -175,15 +173,15 @@ ScDataFormDlg::ScDataFormDlg(weld::Window* pParent, ScTabViewShell* pTabViewShel
 
     m_xSlider->vadjustment_configure(0, 0, nEndRow - nStartRow + 1, 1, 10, 1);
 
-    m_xBtnNew->connect_clicked(HDL(Impl_NewHdl));
-    m_xBtnPrev->connect_clicked(HDL(Impl_PrevHdl));
-    m_xBtnNext->connect_clicked(HDL(Impl_NextHdl));
+    m_xBtnNew->connect_clicked(LINK( this, ScDataFormDlg, Impl_NewHdl));
+    m_xBtnPrev->connect_clicked(LINK( this, ScDataFormDlg, Impl_PrevHdl));
+    m_xBtnNext->connect_clicked(LINK( this, ScDataFormDlg, Impl_NextHdl));
 
-    m_xBtnRestore->connect_clicked(HDL(Impl_RestoreHdl));
-    m_xBtnDelete->connect_clicked(HDL(Impl_DeleteHdl));
-    m_xBtnClose->connect_clicked(HDL(Impl_CloseHdl));
+    m_xBtnRestore->connect_clicked(LINK( this, ScDataFormDlg, Impl_RestoreHdl));
+    m_xBtnDelete->connect_clicked(LINK( this, ScDataFormDlg, Impl_DeleteHdl));
+    m_xBtnClose->connect_clicked(LINK( this, ScDataFormDlg, Impl_CloseHdl));
 
-    m_xSlider->connect_vadjustment_changed(HDL(Impl_ScrollHdl));
+    m_xSlider->connect_vadjustment_changed(LINK( this, ScDataFormDlg, Impl_ScrollHdl));
 
     SetButtonState();
 }
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index 0d873c901043..d5491b50874e 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -26,8 +26,6 @@
 
 #include <officecfg/Office/Common.hxx>
 
-#define HDL(hdl) LINK(this,ScTabBgColorDlg,hdl)
-
 ScTabBgColorDlg::ScTabBgColorDlg(weld::Window* pParent, const OUString& rTitle,
     const OUString& rTabBgColorNoColorText, const Color& rDefaultColor)
     : GenericDialogController(pParent, "modules/scalc/ui/tabcolordialog.ui", "TabColorDialog")
@@ -55,8 +53,8 @@ ScTabBgColorDlg::ScTabBgColorDlg(weld::Window* pParent, const OUString& rTitle,
     FillPaletteLB();
 
     m_xSelectPalette->connect_changed(LINK(this, ScTabBgColorDlg, SelectPaletteLBHdl));
-    m_xTabBgColorSet->SetDoubleClickHdl(HDL(TabBgColorDblClickHdl_Impl));
-    m_xBtnOk->connect_clicked(HDL(TabBgColorOKHdl_Impl));
+    m_xTabBgColorSet->SetDoubleClickHdl(LINK(this, ScTabBgColorDlg, TabBgColorDblClickHdl_Impl));
+    m_xBtnOk->connect_clicked(LINK(this, ScTabBgColorDlg, TabBgColorOKHdl_Impl));
 }
 
 ScTabBgColorDlg::~ScTabBgColorDlg()
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index d2639b085a77..e90f32408fcd 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -49,7 +49,6 @@ enum {
     SC_AREASDLG_RR_OFFSET  = 2
 };
 
-#define HDL(hdl)            LINK( this, ScPrintAreasDlg, hdl )
 namespace
 {
     void ERRORBOX(weld::Window* pParent, const char* rId)
@@ -238,20 +237,20 @@ void ScPrintAreasDlg::Impl_Reset()
     const ScRange*  pRepeatColRange = pDoc->GetRepeatColRange( nCurTab );
     const ScRange*  pRepeatRowRange = pDoc->GetRepeatRowRange( nCurTab );
 
-    m_xEdPrintArea->SetModifyHdl   ( HDL(Impl_ModifyHdl) );
-    m_xEdRepeatRow->SetModifyHdl   ( HDL(Impl_ModifyHdl) );
-    m_xEdRepeatCol->SetModifyHdl   ( HDL(Impl_ModifyHdl) );
-    m_xEdPrintArea->SetGetFocusHdl( HDL(Impl_GetEditFocusHdl) );
-    m_xEdRepeatRow->SetGetFocusHdl( HDL(Impl_GetEditFocusHdl) );
-    m_xEdRepeatCol->SetGetFocusHdl( HDL(Impl_GetEditFocusHdl) );
-    m_xLbPrintArea->connect_focus_in( HDL(Impl_GetFocusHdl) );
-    m_xLbRepeatRow->connect_focus_in( HDL(Impl_GetFocusHdl) );
-    m_xLbRepeatCol->connect_focus_in( HDL(Impl_GetFocusHdl) );
-    m_xLbPrintArea->connect_changed( HDL(Impl_SelectHdl) );
-    m_xLbRepeatRow->connect_changed( HDL(Impl_SelectHdl) );
-    m_xLbRepeatCol->connect_changed( HDL(Impl_SelectHdl) );
-    m_xBtnOk->connect_clicked( HDL(Impl_BtnHdl)    );
-    m_xBtnCancel->connect_clicked( HDL(Impl_BtnHdl)    );
+    m_xEdPrintArea->SetModifyHdl   (LINK( this, ScPrintAreasDlg, Impl_ModifyHdl));
+    m_xEdRepeatRow->SetModifyHdl   (LINK( this, ScPrintAreasDlg, Impl_ModifyHdl));
+    m_xEdRepeatCol->SetModifyHdl   (LINK( this, ScPrintAreasDlg, Impl_ModifyHdl));
+    m_xEdPrintArea->SetGetFocusHdl(LINK( this, ScPrintAreasDlg, Impl_GetEditFocusHdl));
+    m_xEdRepeatRow->SetGetFocusHdl(LINK( this, ScPrintAreasDlg, Impl_GetEditFocusHdl));
+    m_xEdRepeatCol->SetGetFocusHdl(LINK( this, ScPrintAreasDlg, Impl_GetEditFocusHdl));
+    m_xLbPrintArea->connect_focus_in(LINK( this, ScPrintAreasDlg, Impl_GetFocusHdl));
+    m_xLbRepeatRow->connect_focus_in(LINK( this, ScPrintAreasDlg, Impl_GetFocusHdl));
+    m_xLbRepeatCol->connect_focus_in(LINK( this, ScPrintAreasDlg, Impl_GetFocusHdl));
+    m_xLbPrintArea->connect_changed(LINK( this, ScPrintAreasDlg, Impl_SelectHdl));
+    m_xLbRepeatRow->connect_changed(LINK( this, ScPrintAreasDlg, Impl_SelectHdl));
+    m_xLbRepeatCol->connect_changed(LINK( this, ScPrintAreasDlg, Impl_SelectHdl));
+    m_xBtnOk->connect_clicked(LINK( this, ScPrintAreasDlg, Impl_BtnHdl));
+    m_xBtnCancel->connect_clicked(LINK( this, ScPrintAreasDlg, Impl_BtnHdl));
 
     Impl_FillLists();
 
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index 7ea361b94557..76ecb43fb8ad 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -73,9 +73,6 @@ static bool lcl_PutBoolItem( sal_uInt16 nWhich,
                       bool              bIsChecked,
                       bool              bSavedValue );
 
-#define PAGENO_HDL          LINK(this,ScTablePage,PageNoHdl)
-#define PAGEDIR_HDL         LINK(this,ScTablePage,PageDirHdl)
-
 namespace {
 
 bool WAS_DEFAULT(sal_uInt16 w, SfxItemSet const & s)
@@ -122,9 +119,9 @@ ScTablePage::ScTablePage(weld::Container* pPage, weld::DialogController* pContro
 {
     SetExchangeSupport();
 
-    m_xBtnPageNo->connect_toggled(PAGENO_HDL);
-    m_xBtnTopDown->connect_toggled(PAGEDIR_HDL);
-    m_xBtnLeftRight->connect_toggled(PAGEDIR_HDL);
+    m_xBtnPageNo->connect_toggled(LINK(this,ScTablePage,PageNoHdl));
+    m_xBtnTopDown->connect_toggled(LINK(this,ScTablePage,PageDirHdl));
+    m_xBtnLeftRight->connect_toggled(LINK(this,ScTablePage,PageDirHdl));
     m_xLbScaleMode->connect_changed(LINK(this,ScTablePage,ScaleHdl));
     m_xCbScalePageWidth->connect_toggled(LINK(this, ScTablePage, ToggleHdl));
     m_xCbScalePageHeight->connect_toggled(LINK(this, ScTablePage, ToggleHdl));


More information about the Libreoffice-commits mailing list