summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-10 14:39:17 +0200
committerNoel Grandin <noel@peralex.com>2015-09-11 08:48:54 +0200
commitcf0c04a428754dfd5aa477cebc5441bc74e27005 (patch)
tree6d4657ec370a3378887745b34d217a91bdab2eef /sw/source/ui
parente8ee8473361f09034fdcd4f30a2325a53a512a7a (diff)
convert Link<> to typed
Change-Id: I85658fa35b9b85106a3b9c8ef303584cad6f39b0
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx10
-rw-r--r--sw/source/ui/fldui/flddb.cxx2
-rw-r--r--sw/source/ui/fldui/flddinf.cxx2
-rw-r--r--sw/source/ui/fldui/fldpage.cxx9
-rw-r--r--sw/source/ui/fldui/fldpage.hxx4
-rw-r--r--sw/source/ui/fldui/fldref.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx4
7 files changed, 22 insertions, 11 deletions
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 63f5f77d4121..1d109958cc99 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -82,7 +82,7 @@ SwCondCollPage::SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet)
// Install handlers
m_pConditionCB->SetClickHdl( LINK(this, SwCondCollPage, OnOffHdl));
- m_pTbLinks->SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
+ m_pTbLinks->SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveTreeListBoxHdl ));
m_pStyleLB->SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
m_pRemovePB->SetClickHdl( LINK(this, SwCondCollPage, AssignRemoveClickHdl ));
m_pAssignPB->SetClickHdl( LINK(this, SwCondCollPage, AssignRemoveClickHdl ));
@@ -230,9 +230,13 @@ IMPL_LINK_TYPED( SwCondCollPage, OnOffHdl, Button*, pBox, void )
IMPL_LINK_TYPED( SwCondCollPage, AssignRemoveClickHdl, Button*, pBtn, void)
{
- AssignRemoveHdl(static_cast<PushButton*>(pBtn));
+ AssignRemoveHdl(pBtn);
}
-IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
+IMPL_LINK_TYPED( SwCondCollPage, AssignRemoveTreeListBoxHdl, SvTreeListBox*, pBtn, bool)
+{
+ return AssignRemoveHdl(pBtn) != 0;
+}
+IMPL_LINK( SwCondCollPage, AssignRemoveHdl, void*, pBtn)
{
SvTreeListEntry* pE = m_pTbLinks->FirstSelected();
sal_uLong nPos;
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 71c871a23b2a..7c2375914f08 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -66,7 +66,7 @@ SwFieldDBPage::SwFieldDBPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
m_pNumFormatLB->SetSelectHdl(LINK(this, SwFieldDBPage, NumSelectHdl));
m_pDatabaseTLB->SetSelectHdl(LINK(this, SwFieldDBPage, TreeSelectHdl));
- m_pDatabaseTLB->SetDoubleClickHdl(LINK(this, SwFieldDBPage, InsertHdl));
+ m_pDatabaseTLB->SetDoubleClickHdl(LINK(this, SwFieldDBPage, TreeListBoxInsertHdl));
m_pValueED->SetModifyHdl(LINK(this, SwFieldDBPage, ModifyHdl));
m_pAddDBPB->SetClickHdl(LINK(this, SwFieldDBPage, AddDBHdl));
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 267c634535e4..5719d923edce 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -206,7 +206,7 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
m_pTypeTLB->SetUpdateMode(true);
m_pTypeTLB->SetSelectHdl(LINK(this, SwFieldDokInfPage, TypeHdl));
- m_pTypeTLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, InsertHdl));
+ m_pTypeTLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, TreeListBoxInsertHdl));
m_pSelectionLB->SetSelectHdl(LINK(this, SwFieldDokInfPage, SubTypeHdl));
m_pSelectionLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, InsertHdl));
m_pFormatLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, InsertHdl));
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 9db03bdcae0c..6e2e274851cc 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -307,7 +307,12 @@ void SwFieldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3)
}
// Insert new fields
-IMPL_LINK( SwFieldPage, InsertHdl, Button *, pBtn )
+IMPL_LINK_TYPED( SwFieldPage, TreeListBoxInsertHdl, SvTreeListBox*, pBtn, bool )
+{
+ return InsertHdl(pBtn);
+}
+
+IMPL_LINK( SwFieldPage, InsertHdl, void *, pBtn )
{
SwFieldDlg *pDlg = static_cast<SwFieldDlg*>(GetTabDialog());
if (pDlg)
@@ -315,7 +320,7 @@ IMPL_LINK( SwFieldPage, InsertHdl, Button *, pBtn )
pDlg->InsertHdl();
if (pBtn)
- pBtn->GrabFocus(); // because of InputField-Dlg
+ static_cast<Button*>(pBtn)->GrabFocus(); // because of InputField-Dlg
}
else
{
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index 845f4499d766..09c7ac7eea46 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -25,6 +25,7 @@
#define FIELD_COLUMN_WIDTH 76
class ListBox;
+class SvTreeListBox;
const int coLBCount = 3;
@@ -53,7 +54,8 @@ protected:
SwField* GetCurField() { return m_pCurField;}
SwWrtShell* GetWrtShell() { return m_pWrtShell;}
- DECL_LINK( InsertHdl, Button * = 0);
+ DECL_LINK( InsertHdl, void * = 0);
+ DECL_LINK_TYPED( TreeListBoxInsertHdl, SvTreeListBox*, bool);
DECL_LINK(NumFormatHdl, void *);
void Init();
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index c7a135a61c8d..4eb1cfd3dac5 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -99,7 +99,7 @@ SwFieldRefPage::SwFieldRefPage(vcl::Window* pParent, const SfxItemSet& rCoreSet
// #i83479#
m_pSelectionToolTipLB->SetSelectHdl( LINK(this, SwFieldRefPage, SubTypeTreeListBoxHdl) );
- m_pSelectionToolTipLB->SetDoubleClickHdl( LINK(this, SwFieldRefPage, InsertHdl) );
+ m_pSelectionToolTipLB->SetDoubleClickHdl( LINK(this, SwFieldRefPage, TreeListBoxInsertHdl) );
m_pSelectionToolTipLB->SetStyle( m_pSelectionToolTipLB->GetStyle() | WB_HSCROLL );
m_pSelectionToolTipLB->SetSpaceBetweenEntries(1);
m_pSelectionToolTipLB->SetHighlightRange();
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index d89f30d81fac..e65f3334beca 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -410,12 +410,12 @@ IMPL_LINK( SwGlossaryDlg, NameModify, Edit *, pEdit )
return 0;
}
-IMPL_LINK( SwGlossaryDlg, NameDoubleClick, SvTreeListBox*, pBox )
+IMPL_LINK_TYPED( SwGlossaryDlg, NameDoubleClick, SvTreeListBox*, pBox, bool )
{
SvTreeListEntry* pEntry = pBox->FirstSelected();
if(pBox->GetParent(pEntry) && !bIsDocReadOnly)
EndDialog( RET_OK );
- return 0;
+ return false;
}
IMPL_LINK_TYPED( SwGlossaryDlg, EnableHdl, Menu *, pMn, bool )