summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-16 16:10:05 +0200
committerNoel Grandin <noel@peralex.com>2015-09-17 08:19:34 +0200
commit1e2119fd0211b671cad7ba7005a99a1da1a0caf5 (patch)
treec4298af25e9a082066ad98a69c5c6c281a360ac5
parentf4f05ab199101b9f11718ddc82e139815c1fc521 (diff)
convert Link<> to typed
Change-Id: I3d35a0bb75b6989dd13371543d1bdf3ef5f47641
-rw-r--r--basctl/source/basicide/baside2.hxx2
-rw-r--r--basctl/source/basicide/baside2b.cxx3
-rw-r--r--cui/source/dialogs/SpellDialog.cxx3
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx3
-rw-r--r--cui/source/dialogs/insdlg.cxx3
-rw-r--r--cui/source/dialogs/pastedlg.cxx5
-rw-r--r--cui/source/inc/SpellDialog.hxx2
-rw-r--r--cui/source/inc/cuigaldlg.hxx2
-rw-r--r--cui/source/inc/insdlg.hxx2
-rw-r--r--cui/source/inc/pastedlg.hxx2
-rw-r--r--cui/source/options/optjava.cxx3
-rw-r--r--cui/source/options/optjava.hxx2
-rw-r--r--dbaccess/source/ui/dlg/dsselect.cxx5
-rw-r--r--dbaccess/source/ui/dlg/dsselect.hxx2
-rw-r--r--dbaccess/source/ui/inc/WColumnSelect.hxx2
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx5
-rw-r--r--extensions/source/abpilot/tableselectionpage.cxx4
-rw-r--r--extensions/source/abpilot/tableselectionpage.hxx2
-rw-r--r--extensions/source/bibliography/datman.cxx5
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx5
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.hxx2
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx7
-rw-r--r--extensions/source/dbpilots/gridwizard.hxx2
-rw-r--r--extensions/source/dbpilots/listcombowizard.cxx8
-rw-r--r--extensions/source/dbpilots/listcombowizard.hxx4
-rw-r--r--formula/source/ui/dlg/funcpage.cxx3
-rw-r--r--formula/source/ui/dlg/funcpage.hxx2
-rw-r--r--include/vcl/lstbox.hxx6
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx11
-rw-r--r--sc/source/ui/dbgui/scuiimoptdlg.cxx5
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx17
-rw-r--r--sc/source/ui/inc/dwfunctr.hxx2
-rw-r--r--sc/source/ui/inc/lbseldlg.hxx2
-rw-r--r--sc/source/ui/inc/pvfundlg.hxx8
-rw-r--r--sc/source/ui/inc/scuiautofmt.hxx4
-rw-r--r--sc/source/ui/inc/scuiimoptdlg.hxx2
-rw-r--r--sc/source/ui/inc/shtabdlg.hxx2
-rw-r--r--sc/source/ui/miscdlgs/lbseldlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/scuiautofmt.cxx3
-rw-r--r--sc/source/ui/miscdlgs/shtabdlg.cxx3
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.cxx5
-rw-r--r--sd/source/ui/dlg/dlgass.cxx22
-rw-r--r--sd/source/ui/inc/dlgass.hxx3
-rw-r--r--sfx2/source/appl/newhelp.cxx24
-rw-r--r--sfx2/source/appl/newhelp.hxx15
-rw-r--r--sfx2/source/doc/new.cxx6
-rw-r--r--svx/source/fmcomp/gridcell.cxx7
-rw-r--r--svx/source/inc/gridcell.hxx2
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx14
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx10
-rw-r--r--sw/source/ui/dochdl/selglos.cxx3
-rw-r--r--sw/source/ui/fldui/flddb.cxx2
-rw-r--r--sw/source/ui/fldui/flddinf.cxx4
-rw-r--r--sw/source/ui/fldui/flddok.cxx6
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx10
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx2
-rw-r--r--sw/source/ui/fldui/fldpage.cxx18
-rw-r--r--sw/source/ui/fldui/fldpage.hxx7
-rw-r--r--sw/source/ui/fldui/fldref.cxx6
-rw-r--r--sw/source/ui/fldui/fldvar.cxx8
-rw-r--r--sw/source/ui/index/cnttab.cxx3
-rw-r--r--sw/source/ui/misc/outline.cxx5
-rw-r--r--sw/source/uibase/inc/dbinsdlg.hxx2
-rw-r--r--sw/source/uibase/inc/selglos.hxx2
-rw-r--r--sw/source/uibase/inc/swuiccoll.hxx3
-rw-r--r--sw/source/uibase/inc/swuicnttab.hxx8
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.cxx11
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.hxx3
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx5
-rw-r--r--vcl/source/control/lstbox.cxx2
-rw-r--r--writerperfect/inc/WPFTEncodingDialog.hxx2
-rw-r--r--writerperfect/source/common/WPFTEncodingDialog.cxx5
72 files changed, 178 insertions, 205 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 7aab76158f51..23a7863cbce5 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -495,7 +495,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
void InsertSelectedEntry(); //insert the selected entry
- DECL_LINK(ImplDoubleClickHdl, void*);
+ DECL_LINK_TYPED(ImplDoubleClickHdl, ListBox&, void);
DECL_LINK(ImplSelectHdl, void*);
protected:
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index f97ffbebf6f7..be6a02ec8111 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2642,10 +2642,9 @@ void CodeCompleteListBox::dispose()
ListBox::dispose();
}
-IMPL_LINK_NOARG(CodeCompleteListBox, ImplDoubleClickHdl)
+IMPL_LINK_NOARG_TYPED(CodeCompleteListBox, ImplDoubleClickHdl, ListBox&, void)
{
InsertSelectedEntry();
- return 0;
}
IMPL_LINK_NOARG(CodeCompleteListBox, ImplSelectHdl)
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 0312c9683fc2..2d3df7d7c14b 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -569,10 +569,9 @@ OUString SpellDialog::getReplacementString() const
-IMPL_LINK_NOARG(SpellDialog, DoubleClickChangeHdl)
+IMPL_LINK_NOARG_TYPED(SpellDialog, DoubleClickChangeHdl, ListBox&, void)
{
ChangeHdl(NULL);
- return 0;
}
IMPL_LINK_NOARG_TYPED(SpellDialog, ChangeHdl, Button*, void)
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index d89872e2fc4e..1a5d0fd91b69 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -1210,7 +1210,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, SelectFoundHdl)
-IMPL_LINK_NOARG(TPGalleryThemeProperties, DClickFoundHdl)
+IMPL_LINK_NOARG_TYPED(TPGalleryThemeProperties, DClickFoundHdl, ListBox&, void)
{
if( bInputAllowed )
{
@@ -1219,7 +1219,6 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, DClickFoundHdl)
if (m_pLbxFound->GetSelectEntryCount() == 1 && bEntriesFound)
ClickTakeHdl(NULL);
}
- return 0;
}
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index eb59e4594af5..8e5bc95953a6 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -101,10 +101,9 @@ InsertObjectDialog_Impl::InsertObjectDialog_Impl(vcl::Window * pParent, const OU
-IMPL_LINK_NOARG(SvInsertOleDlg, DoubleClickHdl)
+IMPL_LINK_NOARG_TYPED(SvInsertOleDlg, DoubleClickHdl, ListBox&, void)
{
EndDialog( RET_OK );
- return 0;
}
IMPL_LINK_NOARG_TYPED(SvInsertOleDlg, BrowseHdl, Button*, void)
diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx
index 8aac59a7e2d3..afec285c61f6 100644
--- a/cui/source/dialogs/pastedlg.cxx
+++ b/cui/source/dialogs/pastedlg.cxx
@@ -82,12 +82,9 @@ IMPL_LINK( SvPasteObjectDialog, SelectHdl, ListBox *, pListBox )
return 0;
}
-IMPL_LINK( SvPasteObjectDialog, DoubleClickHdl, ListBox *, pListBox )
+IMPL_LINK_NOARG_TYPED( SvPasteObjectDialog, DoubleClickHdl, ListBox&, void )
{
- (void)pListBox;
-
EndDialog( RET_OK );
- return 0;
}
/*************************************************************************
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index c33921c9e26f..83495df9db56 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -172,7 +172,7 @@ private:
css::linguistic2::XSpellChecker1 > xSpell;
DECL_LINK_TYPED(ChangeHdl, Button*, void);
- DECL_LINK(DoubleClickChangeHdl, void*);
+ DECL_LINK_TYPED(DoubleClickChangeHdl, ListBox&, void);
DECL_LINK_TYPED(ChangeAllHdl, Button*, void);
DECL_LINK_TYPED( IgnoreAllHdl, Button*, void );
DECL_LINK_TYPED(IgnoreHdl, Button*, void);
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 30036c718da5..43f073719acf 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -284,7 +284,7 @@ class TPGalleryThemeProperties : public SfxTabPage
DECL_LINK_TYPED( ClickTakeAllHdl, Button*, void );
DECL_LINK( SelectFoundHdl, void* );
DECL_LINK( SelectFileTypeHdl, void* );
- DECL_LINK( DClickFoundHdl, void* );
+ DECL_LINK_TYPED( DClickFoundHdl, ListBox&, void );
DECL_LINK_TYPED( PreviewTimerHdl, Timer*, void );
DECL_LINK(EndSearchProgressHdl, void *);
DECL_LINK_TYPED( DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void );
diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx
index 29ac1132220a..128339158496 100644
--- a/cui/source/inc/insdlg.hxx
+++ b/cui/source/inc/insdlg.hxx
@@ -69,7 +69,7 @@ class SvInsertOleDlg : public InsertObjectDialog_Impl
css::uno::Sequence< sal_Int8 > m_aIconMetaFile;
OUString m_aIconMediaType;
- DECL_LINK(DoubleClickHdl, void*);
+ DECL_LINK_TYPED(DoubleClickHdl, ListBox&, void);
DECL_LINK_TYPED(BrowseHdl, Button*, void);
DECL_LINK_TYPED(RadioHdl, Button*, void);
void SelectDefault();
diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx
index c634dc715a6b..26a439f80402 100644
--- a/cui/source/inc/pastedlg.hxx
+++ b/cui/source/inc/pastedlg.hxx
@@ -51,7 +51,7 @@ class SvPasteObjectDialog : public ModalDialog
void SelectObject();
DECL_LINK( SelectHdl, ListBox * );
- DECL_LINK( DoubleClickHdl, ListBox * );
+ DECL_LINK_TYPED( DoubleClickHdl, ListBox&, void );
public:
SvPasteObjectDialog( vcl::Window* pParent );
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 8c805b8f6871..552bd17f2a49 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -869,12 +869,11 @@ IMPL_LINK_NOARG(SvxJavaParameterDlg, SelectHdl_Impl)
-IMPL_LINK_NOARG(SvxJavaParameterDlg, DblClickHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SvxJavaParameterDlg, DblClickHdl_Impl, ListBox&, void)
{
sal_Int32 nPos = m_pAssignedList->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
m_pParameterEdit->SetText( m_pAssignedList->GetEntry( nPos ) );
- return 0;
}
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index c4f9602ca428..a139fa27da17 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -130,7 +130,7 @@ private:
DECL_LINK(ModifyHdl_Impl, void *);
DECL_LINK_TYPED(AssignHdl_Impl, Button*, void);
DECL_LINK(SelectHdl_Impl, void *);
- DECL_LINK(DblClickHdl_Impl, void *);
+ DECL_LINK_TYPED(DblClickHdl_Impl, ListBox&, void);
DECL_LINK_TYPED(RemoveHdl_Impl, Button*, void);
inline void EnableRemoveButton()
diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx
index ac120a40723c..2a3089cc9279 100644
--- a/dbaccess/source/ui/dlg/dsselect.cxx
+++ b/dbaccess/source/ui/dlg/dsselect.cxx
@@ -84,11 +84,10 @@ void ODatasourceSelectDialog::dispose()
}
-IMPL_LINK( ODatasourceSelectDialog, ListDblClickHdl, ListBox *, pListBox )
+IMPL_LINK_TYPED( ODatasourceSelectDialog, ListDblClickHdl, ListBox&, rListBox, void )
{
- if (pListBox->GetSelectEntryCount())
+ if (rListBox.GetSelectEntryCount())
EndDialog(RET_OK);
- return 0;
}
bool ODatasourceSelectDialog::Close()
diff --git a/dbaccess/source/ui/dlg/dsselect.hxx b/dbaccess/source/ui/dlg/dsselect.hxx
index 842047f8c76e..8d8c6112c9c7 100644
--- a/dbaccess/source/ui/dlg/dsselect.hxx
+++ b/dbaccess/source/ui/dlg/dsselect.hxx
@@ -61,7 +61,7 @@ public:
virtual bool Close() SAL_OVERRIDE;
protected:
- DECL_LINK( ListDblClickHdl, ListBox * );
+ DECL_LINK_TYPED( ListDblClickHdl, ListBox&, void );
#ifdef HAVE_ODBC_ADMINISTRATION
DECL_LINK_TYPED(ManageClickHdl, Button*, void);
DECL_LINK_TYPED( ManageProcessFinished, void*, void );
diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx
index edf527f2f5b1..b40dbf5ec093 100644
--- a/dbaccess/source/ui/inc/WColumnSelect.hxx
+++ b/dbaccess/source/ui/inc/WColumnSelect.hxx
@@ -43,7 +43,7 @@ namespace dbaui
VclPtr<ListBox> m_pNewColumnNames; // right side
DECL_LINK_TYPED( ButtonClickHdl, Button *, void );
- DECL_LINK( ListDoubleClickHdl, ListBox * );
+ DECL_LINK_TYPED( ListDoubleClickHdl, ListBox&, void );
static void clearListBox(ListBox& _rListBox);
static void fillColumns( ListBox* pRight,
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index 7167141f2513..c9212bc6312b 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -246,10 +246,10 @@ IMPL_LINK_TYPED( OWizColumnSelect, ButtonClickHdl, Button *, pButton, void )
m_pOrgColumnNames->SelectEntryPos(0);
}
-IMPL_LINK( OWizColumnSelect, ListDoubleClickHdl, ListBox *, pListBox )
+IMPL_LINK_TYPED( OWizColumnSelect, ListDoubleClickHdl, ListBox&, rListBox, void )
{
ListBox *pLeft,*pRight;
- if(pListBox == m_pOrgColumnNames)
+ if(&rListBox == m_pOrgColumnNames)
{
pLeft = m_pOrgColumnNames;
pRight = m_pNewColumnNames;
@@ -275,7 +275,6 @@ IMPL_LINK( OWizColumnSelect, ListDoubleClickHdl, ListBox *, pListBox )
pLeft->RemoveEntry(pLeft->GetSelectEntry(--j));
enableButtons();
- return 0;
}
void OWizColumnSelect::clearListBox(ListBox& _rListBox)
diff --git a/extensions/source/abpilot/tableselectionpage.cxx b/extensions/source/abpilot/tableselectionpage.cxx
index 065f2d1bc85e..ed7beec4aec3 100644
--- a/extensions/source/abpilot/tableselectionpage.cxx
+++ b/extensions/source/abpilot/tableselectionpage.cxx
@@ -86,12 +86,10 @@ namespace abp
}
- IMPL_LINK( TableSelectionPage, OnTableDoubleClicked, void*, /*NOTINTERESTEDIN*/ )
+ IMPL_LINK_NOARG_TYPED( TableSelectionPage, OnTableDoubleClicked, ListBox&, void )
{
if ( 1 == m_pTableList->GetSelectEntryCount() )
getDialog()->travelNext();
-
- return 0L;
}
diff --git a/extensions/source/abpilot/tableselectionpage.hxx b/extensions/source/abpilot/tableselectionpage.hxx
index de58a65be2b1..3b92ba60ada5 100644
--- a/extensions/source/abpilot/tableselectionpage.hxx
+++ b/extensions/source/abpilot/tableselectionpage.hxx
@@ -51,7 +51,7 @@ namespace abp
private:
DECL_LINK( OnTableSelected, void* );
- DECL_LINK( OnTableDoubleClicked, void* );
+ DECL_LINK_TYPED( OnTableDoubleClicked, ListBox&, void );
};
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 860ab2dcb297..fcc7598a36e8 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -474,7 +474,7 @@ class DBChangeDialog_Impl : public ModalDialog
BibDataManager* pDatMan;
- DECL_LINK(DoubleClickHdl, SvTabListBox*);
+ DECL_LINK_TYPED(DoubleClickHdl, ListBox&, void);
public:
DBChangeDialog_Impl(vcl::Window* pParent, BibDataManager* pMan );
virtual ~DBChangeDialog_Impl();
@@ -513,10 +513,9 @@ DBChangeDialog_Impl::DBChangeDialog_Impl(vcl::Window* pParent, BibDataManager* p
}
}
-IMPL_LINK(DBChangeDialog_Impl, DoubleClickHdl, SvTabListBox*, /*pLB*/)
+IMPL_LINK_NOARG_TYPED(DBChangeDialog_Impl, DoubleClickHdl, ListBox&, void)
{
EndDialog(RET_OK);
- return 0;
}
DBChangeDialog_Impl::~DBChangeDialog_Impl()
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index 23edfb922aa4..13857eb888b5 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -217,11 +217,10 @@ namespace dbp
}
}
- IMPL_LINK( OTableSelectionPage, OnListboxDoubleClicked, ListBox*, _pBox )
+ IMPL_LINK_TYPED( OTableSelectionPage, OnListboxDoubleClicked, ListBox&, _rBox, void )
{
- if (_pBox->GetSelectEntryCount())
+ if (_rBox.GetSelectEntryCount())
getDialog()->travelNext();
- return 0L;
}
diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx
index 36001317b8ff..b8adf46b6540 100644
--- a/extensions/source/dbpilots/commonpagesdbp.hxx
+++ b/extensions/source/dbpilots/commonpagesdbp.hxx
@@ -55,7 +55,7 @@ namespace dbp
protected:
DECL_LINK( OnListboxSelection, ListBox* );
- DECL_LINK( OnListboxDoubleClicked, ListBox* );
+ DECL_LINK_TYPED( OnListboxDoubleClicked, ListBox&, void );
DECL_LINK_TYPED( OnSearchClicked, Button*, void );
void implCollectDatasource();
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index b477bc0de38b..74b96f4e51b3 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -391,16 +391,13 @@ namespace dbp
}
- IMPL_LINK(OGridFieldsSelection, OnEntryDoubleClicked, ListBox*, _pList)
+ IMPL_LINK_TYPED(OGridFieldsSelection, OnEntryDoubleClicked, ListBox&, _rList, void)
{
- PushButton* pSimulateButton = m_pExistFields == _pList ? m_pSelectOne : m_pDeselectOne;
+ PushButton* pSimulateButton = m_pExistFields == &_rList ? m_pSelectOne : m_pDeselectOne;
if (pSimulateButton->IsEnabled())
{
OnMoveOneEntry( pSimulateButton );
- return 0;
}
- else
- return 1L;
}
diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx
index c93f0ec64795..ca3a9b4e4cc6 100644
--- a/extensions/source/dbpilots/gridwizard.hxx
+++ b/extensions/source/dbpilots/gridwizard.hxx
@@ -97,7 +97,7 @@ namespace dbp
DECL_LINK_TYPED(OnMoveOneEntry, Button*, void);
DECL_LINK_TYPED(OnMoveAllEntries, Button*, void);
DECL_LINK(OnEntrySelected, ListBox*);
- DECL_LINK(OnEntryDoubleClicked, ListBox*);
+ DECL_LINK_TYPED(OnEntryDoubleClicked, ListBox&, void);
void implCheckButtons();
};
diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx
index 62c84053025f..87a605d57bfe 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -307,11 +307,10 @@ namespace dbp
}
- IMPL_LINK( OContentTableSelection, OnTableDoubleClicked, ListBox*, _pListBox )
+ IMPL_LINK_TYPED( OContentTableSelection, OnTableDoubleClicked, ListBox&, _rListBox, void )
{
- if (_pListBox->GetSelectEntryCount())
+ if (_rListBox.GetSelectEntryCount())
getDialog()->travelNext();
- return 0L;
}
@@ -403,11 +402,10 @@ namespace dbp
}
- IMPL_LINK( OContentFieldSelection, OnTableDoubleClicked, ListBox*, /*NOTINTERESTEDIN*/ )
+ IMPL_LINK_NOARG_TYPED( OContentFieldSelection, OnTableDoubleClicked, ListBox&, void )
{
if (m_pSelectTableField->GetSelectEntryCount())
getDialog()->travelNext();
- return 0L;
}
diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx
index d0b7ff3c1d97..75a839c75150 100644
--- a/extensions/source/dbpilots/listcombowizard.hxx
+++ b/extensions/source/dbpilots/listcombowizard.hxx
@@ -115,7 +115,7 @@ namespace dbp
virtual bool canAdvance() const SAL_OVERRIDE;
protected:
- DECL_LINK( OnTableDoubleClicked, ListBox* );
+ DECL_LINK_TYPED( OnTableDoubleClicked, ListBox&, void );
DECL_LINK( OnTableSelected, ListBox* );
};
@@ -134,7 +134,7 @@ namespace dbp
protected:
DECL_LINK( OnFieldSelected, ListBox* );
- DECL_LINK( OnTableDoubleClicked, ListBox* );
+ DECL_LINK_TYPED( OnTableDoubleClicked, ListBox&, void );
// TabPage overridables
virtual void ActivatePage() SAL_OVERRIDE;
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index dbcf06c6ca5e..045eef2e78b0 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -180,10 +180,9 @@ IMPL_LINK( FuncPage, SelHdl, ListBox*, pLb )
return 0;
}
-IMPL_LINK_NOARG(FuncPage, DblClkHdl)
+IMPL_LINK_NOARG_TYPED(FuncPage, DblClkHdl, ListBox&, void)
{
aDoubleClickLink.Call(this);
- return 0;
}
void FuncPage::SetCategory(sal_Int32 nCat)
diff --git a/formula/source/ui/dlg/funcpage.hxx b/formula/source/ui/dlg/funcpage.hxx
index 6d76f546aa4b..0f85df095923 100644
--- a/formula/source/ui/dlg/funcpage.hxx
+++ b/formula/source/ui/dlg/funcpage.hxx
@@ -75,7 +75,7 @@ private:
void impl_addFunctions(const IFunctionCategory* _pCategory);
DECL_LINK( SelHdl, ListBox* );
- DECL_LINK(DblClkHdl, void *);
+ DECL_LINK_TYPED(DblClkHdl, ListBox&, void);
protected:
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 1cf863fa37ff..1db08a1948df 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -45,7 +45,7 @@ private:
sal_Int32 mnSaveValue;
sal_Int32 m_nMaxWidthChars;
Link<> maSelectHdl;
- Link<> maDoubleClickHdl;
+ Link<ListBox&,void> maDoubleClickHdl;
sal_uInt16 mnLineCount;
/// bitfield
@@ -193,8 +193,8 @@ public:
void SetSelectHdl( const Link<>& rLink ) { maSelectHdl = rLink; }
const Link<>& GetSelectHdl() const { return maSelectHdl; }
- void SetDoubleClickHdl( const Link<>& rLink ) { maDoubleClickHdl = rLink; }
- const Link<>& GetDoubleClickHdl() const { return maDoubleClickHdl; }
+ void SetDoubleClickHdl( const Link<ListBox&,void>& rLink ) { maDoubleClickHdl = rLink; }
+ const Link<ListBox&,void>& GetDoubleClickHdl() const { return maDoubleClickHdl; }
Size CalcSubEditSize() const; //size of area inside lstbox, i.e. no scrollbar/dropdown
Size CalcMinimumSize() const; //size of lstbox area, i.e. including scrollbar/dropdown
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 3e9c012db054..1df27049e7d1 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -420,10 +420,9 @@ IMPL_LINK( ScDPFunctionDlg, SelectHdl, ListBox*, pLBox )
return 0;
}
-IMPL_LINK_NOARG(ScDPFunctionDlg, DblClickHdl)
+IMPL_LINK_NOARG_TYPED(ScDPFunctionDlg, DblClickHdl, ListBox&, void)
{
mpBtnOk->Click();
- return 0;
}
ScDPSubtotalDlg::ScDPSubtotalDlg( vcl::Window* pParent, ScDPObject& rDPObj,
@@ -528,10 +527,9 @@ IMPL_LINK_TYPED( ScDPSubtotalDlg, RadioClickHdl, Button*, pBtn, void )
mpLbFunc->Enable( pBtn == mpRbUser );
}
-IMPL_LINK_NOARG(ScDPSubtotalDlg, DblClickHdl)
+IMPL_LINK_NOARG_TYPED(ScDPSubtotalDlg, DblClickHdl, ListBox&, void)
{
mpBtnOk->Click();
- return 0;
}
IMPL_LINK_TYPED( ScDPSubtotalDlg, ClickHdl, Button*, pBtn, void )
@@ -892,11 +890,10 @@ OUString ScDPShowDetailDlg::GetDimensionName() const
return mrDPObj.GetDimName(nDim, bIsDataLayout);
}
-IMPL_LINK( ScDPShowDetailDlg, DblClickHdl, ListBox*, pLBox )
+IMPL_LINK_TYPED( ScDPShowDetailDlg, DblClickHdl, ListBox&, rLBox, void )
{
- if( pLBox == mpLbDims )
+ if( &rLBox == mpLbDims )
mpBtnOk->Click();
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx
index 06d8fea36cd7..98c77dae318e 100644
--- a/sc/source/ui/dbgui/scuiimoptdlg.cxx
+++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx
@@ -316,13 +316,12 @@ IMPL_LINK_TYPED( ScImportOptionsDlg, FixedWidthHdl, Button*, pCheckBox, void )
}
}
-IMPL_LINK( ScImportOptionsDlg, DoubleClickHdl, ListBox*, pLb )
+IMPL_LINK_TYPED( ScImportOptionsDlg, DoubleClickHdl, ListBox&, rLb, void )
{
- if (pLb == m_pLbCharset)
+ if (&rLb == m_pLbCharset)
{
m_pBtnOk->Click();
}
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index d10ae1fbe914..827371ab9338 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -129,8 +129,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP,
aFuncList->SetSelectHdl(aLink);
aDDFuncList->SetSelectHdl(aLink);
- Link<> a2Link=LINK( this, ScFunctionDockWin, SetSelectionHdl);
- aFuncList->SetDoubleClickHdl(a2Link);
+ aFuncList->SetDoubleClickHdl(LINK( this, ScFunctionDockWin, SetSelectionHdl));
aDDFuncList->SetSelectHdl(aLink);
aInsertButton->SetClickHdl(LINK( this, ScFunctionDockWin, SetSelectionClickHdl));
@@ -955,19 +954,13 @@ IMPL_LINK( ScFunctionDockWin, SelHdl, ListBox*, pLb )
#*
#************************************************************************/
-IMPL_LINK_TYPED( ScFunctionDockWin, SetSelectionClickHdl, Button*, pCtrl, void )
+IMPL_LINK_NOARG_TYPED( ScFunctionDockWin, SetSelectionClickHdl, Button*, void )
{
- SetSelectionHdl(pCtrl);
+ DoEnter(); // Uebernimmt die Eingabe
}
-IMPL_LINK( ScFunctionDockWin, SetSelectionHdl, void*, pCtrl )
+IMPL_LINK_NOARG_TYPED( ScFunctionDockWin, SetSelectionHdl, ListBox&, void )
{
- if (static_cast<ImageButton *>(pCtrl) == aInsertButton.get() ||
- static_cast<ListBox *>(pCtrl) == aFuncList.get())
- {
- DoEnter(); // Uebernimmt die Eingabe
- }
-
- return 0;
+ DoEnter(); // Uebernimmt die Eingabe
}
/*************************************************************************
diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx
index f2ca572b2888..9cad0bd41ef5 100644
--- a/sc/source/ui/inc/dwfunctr.hxx
+++ b/sc/source/ui/inc/dwfunctr.hxx
@@ -81,7 +81,7 @@ private:
void SetMyHeightToBo(Size &aNewSize);
void UseSplitterInitPos();
- DECL_LINK( SetSelectionHdl, void* );
+ DECL_LINK_TYPED( SetSelectionHdl, ListBox&, void );
DECL_LINK_TYPED( SetSelectionClickHdl, Button*, void );
DECL_LINK( SelHdl, ListBox* );
DECL_LINK(SetSplitHdl,ScPrivatSplit*);
diff --git a/sc/source/ui/inc/lbseldlg.hxx b/sc/source/ui/inc/lbseldlg.hxx
index ab52b76318fd..a8fce90b00b8 100644
--- a/sc/source/ui/inc/lbseldlg.hxx
+++ b/sc/source/ui/inc/lbseldlg.hxx
@@ -32,7 +32,7 @@ class ScSelEntryDlg : public ModalDialog
private:
VclPtr<ListBox> m_pLb;
- DECL_LINK( DblClkHdl, void * );
+ DECL_LINK_TYPED( DblClkHdl, ListBox&, void );
public:
ScSelEntryDlg(vcl::Window* pParent, const std::vector<OUString> &rEntryList);
diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx
index 06710d492bdd..83350a8fb948 100644
--- a/sc/source/ui/inc/pvfundlg.hxx
+++ b/sc/source/ui/inc/pvfundlg.hxx
@@ -75,7 +75,7 @@ private:
sal_Int32 FindBaseItemPos( const OUString& rEntry, sal_Int32 nStartPos ) const;
DECL_LINK( SelectHdl, ListBox* );
- DECL_LINK( DblClickHdl, void* );
+ DECL_LINK_TYPED( DblClickHdl, ListBox&, void );
private:
VclPtr<ScDPFunctionListBox> mpLbFunc;
@@ -111,8 +111,8 @@ public:
private:
void Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData );
- DECL_LINK(DblClickHdl, void *);
- DECL_LINK_TYPED( RadioClickHdl, Button* , void);
+ DECL_LINK_TYPED( DblClickHdl, ListBox&, void );
+ DECL_LINK_TYPED( RadioClickHdl, Button*, void );
DECL_LINK_TYPED( ClickHdl, Button*, void );
private:
@@ -202,7 +202,7 @@ public:
OUString GetDimensionName() const;
private:
- DECL_LINK( DblClickHdl, ListBox* );
+ DECL_LINK_TYPED( DblClickHdl, ListBox&, void );
private:
VclPtr<ListBox> mpLbDims;
diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx
index ac0c8ca0dbc4..8ff70de3eec3 100644
--- a/sc/source/ui/inc/scuiautofmt.hxx
+++ b/sc/source/ui/inc/scuiautofmt.hxx
@@ -67,8 +67,8 @@ private:
DECL_LINK_TYPED( RemoveHdl, Button*, void );
DECL_LINK( SelFmtHdl, void * );
DECL_LINK_TYPED( CloseHdl, Button *, void );
- DECL_LINK( DblClkHdl, void * );
- DECL_LINK_TYPED( RenameHdl, Button*, void);
+ DECL_LINK_TYPED( DblClkHdl, ListBox&, void );
+ DECL_LINK_TYPED( RenameHdl, Button*, void );
};
#endif
diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx
index 890d84da0e2c..ba3afee71ab8 100644
--- a/sc/source/ui/inc/scuiimoptdlg.hxx
+++ b/sc/source/ui/inc/scuiimoptdlg.hxx
@@ -62,7 +62,7 @@ private:
sal_uInt16 GetCodeFromCombo( const ComboBox& rEd ) const;
DECL_LINK_TYPED( FixedWidthHdl, Button*, void );
- DECL_LINK( DoubleClickHdl, ListBox* );
+ DECL_LINK_TYPED( DoubleClickHdl, ListBox&, void );
};
#endif
diff --git a/sc/source/ui/inc/shtabdlg.hxx b/sc/source/ui/inc/shtabdlg.hxx
index d0109a2735d4..1522ea410bb9 100644
--- a/sc/source/ui/inc/shtabdlg.hxx
+++ b/sc/source/ui/inc/shtabdlg.hxx
@@ -31,7 +31,7 @@ private:
VclPtr<VclFrame> m_pFrame;
VclPtr<ListBox> m_pLb;
- DECL_LINK( DblClkHdl, void * );
+ DECL_LINK_TYPED( DblClkHdl, ListBox&, void );
public:
ScShowTabDlg( vcl::Window* pParent );
diff --git a/sc/source/ui/miscdlgs/lbseldlg.cxx b/sc/source/ui/miscdlgs/lbseldlg.cxx
index e869d706b740..4ada1dca1adc 100644
--- a/sc/source/ui/miscdlgs/lbseldlg.cxx
+++ b/sc/source/ui/miscdlgs/lbseldlg.cxx
@@ -58,10 +58,9 @@ OUString ScSelEntryDlg::GetSelectEntry() const
return m_pLb->GetSelectEntry();
}
-IMPL_LINK_NOARG(ScSelEntryDlg, DblClkHdl)
+IMPL_LINK_NOARG_TYPED(ScSelEntryDlg, DblClkHdl, ListBox&, void)
{
EndDialog( RET_OK );
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index f12eab8a8af0..13e01eee1988 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -174,13 +174,12 @@ IMPL_LINK_TYPED( ScAutoFormatDlg, CloseHdl, Button *, pBtn, void )
}
}
-IMPL_LINK_NOARG(ScAutoFormatDlg, DblClkHdl)
+IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, DblClkHdl, ListBox&, void)
{
if ( bCoreDataChanged )
ScGlobal::GetOrCreateAutoFormat()->Save();
EndDialog( RET_OK );
- return 0;
}
IMPL_LINK_TYPED( ScAutoFormatDlg, CheckHdl, Button *, pBtn, void )
diff --git a/sc/source/ui/miscdlgs/shtabdlg.cxx b/sc/source/ui/miscdlgs/shtabdlg.cxx
index d4c7339c27a5..f15bf266e498 100644
--- a/sc/source/ui/miscdlgs/shtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/shtabdlg.cxx
@@ -81,10 +81,9 @@ sal_Int32 ScShowTabDlg::GetSelectEntryPos(sal_Int32 nPos) const
return m_pLb->GetSelectEntryPos(nPos);
}
-IMPL_LINK_NOARG(ScShowTabDlg, DblClkHdl)
+IMPL_LINK_NOARG_TYPED(ScShowTabDlg, DblClkHdl, ListBox&, void)
{
EndDialog( RET_OK );
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 169c774f01af..ab3a154721f9 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -75,7 +75,7 @@ public:
void SetDoubleClickLink( const Link<>& rDoubleClickHdl ) { maDoubleClickHdl = rDoubleClickHdl; }
- DECL_LINK(implDoubleClickHdl, void *);
+ DECL_LINK_TYPED(implDoubleClickHdl, ListBox&, void);
private:
virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE;
@@ -137,10 +137,9 @@ void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt )
}
}
-IMPL_LINK_NOARG(CategoryListBox, implDoubleClickHdl)
+IMPL_LINK_NOARG_TYPED(CategoryListBox, implDoubleClickHdl, ListBox&, void)
{
CaptureMouse();
- return 0;
}
void CategoryListBox::MouseButtonUp( const MouseEvent& rMEvt )
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 014d25080142..6d53335105be 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -109,7 +109,7 @@ private:
class AssistentDlgImpl : public SfxListener
{
public:
- AssistentDlgImpl( vcl::Window* pWindow, const Link<>& rFinishLink, bool bAutoPilot );
+ AssistentDlgImpl( vcl::Window* pWindow, const Link<ListBox&,void>& rFinishLink, bool bAutoPilot );
virtual ~AssistentDlgImpl();
/// Local mutex used to serialize concurrent method calls.
@@ -319,7 +319,7 @@ public:
};
-AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link<>& rFinishLink, bool bAutoPilot ) :
+AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link<ListBox&,void>& rFinishLink, bool bAutoPilot ) :
mpTemplateRegion(NULL),
mpLayoutRegion(NULL),
mbUserDataDirty(false),
@@ -1101,11 +1101,11 @@ IMPL_LINK_NOARG(AssistentDlgImpl, SelectEffectHdl)
return 0;
}
-IMPL_LINK_TYPED( AssistentDlgImpl, OpenButtonHdl, Button*, pButton, void )
+IMPL_LINK_NOARG_TYPED( AssistentDlgImpl, OpenButtonHdl, Button*, void )
{
// Clear the selection and forward the call.
mpPage1OpenLB->SetNoSelection();
- mpPage1OpenLB->GetDoubleClickHdl().Call(pButton);
+ mpPage1OpenLB->GetDoubleClickHdl().Call(*mpPage1OpenLB);
}
IMPL_LINK_NOARG_TYPED(AssistentDlgImpl, EffectPreviewIdleHdl, Idle *, void)
@@ -1723,15 +1723,20 @@ AssistentDlg::AssistentDlg(vcl::Window* pParent, bool bAutoPilot) :
mpImpl = new AssistentDlgImpl( this, LINK(this,AssistentDlg, FinishHdl2), bAutoPilot );
// button assignment
- mpImpl->mpFinishButton->SetClickHdl(LINK(this,AssistentDlg,FinishHdl));
+ mpImpl->mpFinishButton->SetClickHdl( LINK(this,AssistentDlg,FinishHdl) );
}
IMPL_LINK_NOARG_TYPED(AssistentDlg, FinishHdl, Button*, void)
{
- FinishHdl2(NULL);
+ FinishHdl();
}
-IMPL_LINK_NOARG(AssistentDlg, FinishHdl2)
+IMPL_LINK_NOARG_TYPED(AssistentDlg, FinishHdl2, ListBox&, void)
+{
+ FinishHdl();
+}
+
+void AssistentDlg::FinishHdl()
{
if( GetStartType() == ST_OPEN )
{
@@ -1746,7 +1751,7 @@ IMPL_LINK_NOARG(AssistentDlg, FinishHdl2)
if ( aFileDlg.Execute() == ERRCODE_NONE )
aFileToOpen = aFileDlg.GetPath();
if (aFileToOpen.isEmpty())
- return 1;
+ return;
else
{
//add the selected file to the recent-file-listbox and select the new entry
@@ -1764,7 +1769,6 @@ IMPL_LINK_NOARG(AssistentDlg, FinishHdl2)
// end
mpImpl->EndDialog(RET_OK);
EndDialog(RET_OK);
- return 0;
}
AssistentDlg::~AssistentDlg()
diff --git a/sd/source/ui/inc/dlgass.hxx b/sd/source/ui/inc/dlgass.hxx
index c3685c22d598..426683d5461a 100644
--- a/sd/source/ui/inc/dlgass.hxx
+++ b/sd/source/ui/inc/dlgass.hxx
@@ -46,7 +46,8 @@ public:
virtual void dispose() SAL_OVERRIDE;
DECL_LINK_TYPED( FinishHdl, Button*, void );
- DECL_LINK( FinishHdl2, void* );
+ DECL_LINK_TYPED( FinishHdl2, ListBox&, void );
+ void FinishHdl();
SfxObjectShellLock GetDocument();
OutputType GetOutputMedium() const;
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 3a102be60996..785bb0cfde6d 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -920,7 +920,7 @@ bool SearchResultsBox_Impl::Notify( NotifyEvent& rNEvt )
if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT &&
KEY_RETURN == rNEvt.GetKeyEvent()->GetKeyCode().GetCode() )
{
- GetDoubleClickHdl().Call( NULL );
+ GetDoubleClickHdl().Call( *this );
bHandled = true;
}
@@ -1085,7 +1085,7 @@ IMPL_LINK_NOARG_TYPED(SearchTabPage_Impl, SearchHdl, LinkParamNone*, void)
IMPL_LINK_NOARG_TYPED(SearchTabPage_Impl, OpenHdl, Button*, void)
{
- m_pResultsLB->GetDoubleClickHdl().Call(m_pResultsLB);
+ m_pResultsLB->GetDoubleClickHdl().Call(*m_pResultsLB);
}
IMPL_LINK_NOARG(SearchTabPage_Impl, ModifyHdl)
@@ -1106,7 +1106,7 @@ Control* SearchTabPage_Impl::GetLastFocusControl()
return m_pOpenBtn;
}
-void SearchTabPage_Impl::SetDoubleClickHdl( const Link<>& rLink )
+void SearchTabPage_Impl::SetDoubleClickHdl( const Link<ListBox&,void>& rLink )
{
m_pResultsLB->SetDoubleClickHdl( rLink );
}
@@ -1211,7 +1211,7 @@ void BookmarksBox_Impl::DoAction( sal_uInt16 nAction )
switch ( nAction )
{
case MID_OPEN :
- GetDoubleClickHdl().Call( NULL );
+ GetDoubleClickHdl().Call( *this );
break;
case MID_RENAME :
@@ -1271,7 +1271,7 @@ bool BookmarksBox_Impl::Notify( NotifyEvent& rNEvt )
}
else if ( KEY_RETURN == nCode )
{
- GetDoubleClickHdl().Call( NULL );
+ GetDoubleClickHdl().Call( *this );
nRet = true;
}
}
@@ -1335,7 +1335,7 @@ void BookmarksTabPage_Impl::dispose()
IMPL_LINK_NOARG_TYPED(BookmarksTabPage_Impl, OpenHdl, Button*, void)
{
- m_pBookmarksBox->GetDoubleClickHdl().Call(m_pBookmarksBox);
+ m_pBookmarksBox->GetDoubleClickHdl().Call(*m_pBookmarksBox);
}
void BookmarksTabPage_Impl::ActivatePage()
@@ -1349,7 +1349,7 @@ Control* BookmarksTabPage_Impl::GetLastFocusControl()
return m_pBookmarksPB;
}
-void BookmarksTabPage_Impl::SetDoubleClickHdl( const Link<>& rLink )
+void BookmarksTabPage_Impl::SetDoubleClickHdl( const Link<ListBox&,void>& rLink )
{
m_pBookmarksBox->SetDoubleClickHdl(rLink);
}
@@ -1725,10 +1725,6 @@ void SfxHelpIndexWindow_Impl::SetDoubleClickHdl( const Link<>& rLink )
aPageDoubleClickLink = rLink;
if ( pIPage )
pIPage->SetDoubleClickHdl( aPageDoubleClickLink );
- if ( pSPage )
- pSPage->SetDoubleClickHdl( aPageDoubleClickLink );
- if ( pBPage )
- pBPage->SetDoubleClickHdl( aPageDoubleClickLink );
}
IMPL_LINK_TYPED(SfxHelpIndexWindow_Impl, ContentTabPageDoubleClickHdl, SvTreeListBox*, p, bool)
@@ -1736,6 +1732,12 @@ IMPL_LINK_TYPED(SfxHelpIndexWindow_Impl, ContentTabPageDoubleClickHdl, SvTreeLis
return aPageDoubleClickLink.Call(p);
}
+IMPL_LINK_TYPED(SfxHelpIndexWindow_Impl, TabPageDoubleClickHdl, ListBox&, r, void)
+{
+ aPageDoubleClickLink.Call(&r);
+}
+
+
void SfxHelpIndexWindow_Impl::SetFactory( const OUString& rFactory, bool bActive )
{
if ( !rFactory.isEmpty() )
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 175b6f5f3b3e..fcbf5ed7f257 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -227,15 +227,15 @@ public:
virtual void ActivatePage() SAL_OVERRIDE;
virtual Control* GetLastFocusControl() SAL_OVERRIDE;
- void SetDoubleClickHdl( const Link<>& rLink );
+ void SetDoubleClickHdl( const Link<ListBox&,void>& rLink );
inline void SetFactory( const OUString& rFactory ) { aFactory = rFactory; }
OUString GetSelectEntry() const;
void ClearPage();
inline void SetFocusOnBox() { m_pResultsLB->GrabFocus(); }
- inline bool HasFocusOnEdit() const { return m_pSearchED->HasChildPathFocus(); }
+ inline bool HasFocusOnEdit() const { return m_pSearchED->HasChildPathFocus(); }
inline OUString GetSearchText() const { return m_pSearchED->GetText(); }
- inline bool IsFullWordSearch() const { return m_pFullWordsCB->IsChecked(); }
- bool OpenKeyword( const OUString& rKeyword );
+ inline bool IsFullWordSearch() const { return m_pFullWordsCB->IsChecked(); }
+ bool OpenKeyword( const OUString& rKeyword );
};
// class BookmarksTabPage_Impl -------------------------------------------
@@ -269,7 +269,7 @@ public:
virtual void ActivatePage() SAL_OVERRIDE;
virtual Control* GetLastFocusControl() SAL_OVERRIDE;
- void SetDoubleClickHdl( const Link<>& rLink );
+ void SetDoubleClickHdl( const Link<ListBox&,void>& rLink );
OUString GetSelectEntry() const;
void AddBookmarks( const OUString& rTitle, const OUString& rURL );
void SetFocusOnBox() { m_pBookmarksBox->GrabFocus(); }
@@ -318,6 +318,7 @@ private:
DECL_LINK_TYPED(SelectFactoryHdl, Idle *, void);
DECL_LINK_TYPED(KeywordHdl, IndexTabPage_Impl&, void);
DECL_LINK_TYPED(ContentTabPageDoubleClickHdl, SvTreeListBox*, bool);
+ DECL_LINK_TYPED(TabPageDoubleClickHdl, ListBox&, void);
public:
SfxHelpIndexWindow_Impl( SfxHelpWindow_Impl* pParent );
@@ -374,7 +375,7 @@ SearchTabPage_Impl* SfxHelpIndexWindow_Impl::GetSearchPage()
if ( !pSPage )
{
pSPage = VclPtr<SearchTabPage_Impl>::Create( m_pTabCtrl, this );
- pSPage->SetDoubleClickHdl( aPageDoubleClickLink );
+ pSPage->SetDoubleClickHdl( LINK(this, SfxHelpIndexWindow_Impl, TabPageDoubleClickHdl) );
}
return pSPage;
}
@@ -384,7 +385,7 @@ BookmarksTabPage_Impl* SfxHelpIndexWindow_Impl::GetBookmarksPage()
if ( !pBPage )
{
pBPage = VclPtr<BookmarksTabPage_Impl>::Create( m_pTabCtrl, this );
- pBPage->SetDoubleClickHdl( aPageDoubleClickLink );
+ pBPage->SetDoubleClickHdl( LINK(this, SfxHelpIndexWindow_Impl, TabPageDoubleClickHdl) );
}
return pBPage;
}
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index aa2a062589a9..c89044e3d9bc 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -149,7 +149,7 @@ class SfxNewFileDialog_Impl
DECL_LINK(RegionSelect, ListBox*);
DECL_LINK(TemplateSelect, void*);
- DECL_LINK(DoubleClick, ListBox*);
+ DECL_LINK_TYPED(DoubleClick, ListBox&, void);
DECL_LINK(Expand, void*);
DECL_LINK_TYPED(LoadFile, Button*, void);
sal_uInt16 GetSelectedTemplatePos() const;
@@ -283,13 +283,11 @@ IMPL_LINK_NOARG(SfxNewFileDialog_Impl, TemplateSelect)
return 0;
}
-IMPL_LINK( SfxNewFileDialog_Impl, DoubleClick, ListBox *, pListBox )
+IMPL_LINK_NOARG_TYPED( SfxNewFileDialog_Impl, DoubleClick, ListBox&, void )
{
- (void)pListBox;
// Still loadning
if ( !xDocShell.Is() || !xDocShell->GetProgress() )
pAntiImpl->EndDialog(RET_OK);
- return 0;
}
IMPL_LINK_NOARG_TYPED(SfxNewFileDialog_Impl, LoadFile, Button*, void)
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index e798951f67d2..934be2eca6c7 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -4033,7 +4033,7 @@ void FmXListBoxCell::disposing()
m_aActionListeners.disposeAndClear(aEvt);
m_pBox->SetSelectHdl( Link<>() );
- m_pBox->SetDoubleClickHdl( Link<>() );
+ m_pBox->SetDoubleClickHdl( Link<ListBox&,void>() );
m_pBox = NULL;
FmXTextCell::disposing();
@@ -4305,7 +4305,7 @@ void FmXListBoxCell::onWindowEvent( const sal_uIntPtr _nEventId, const vcl::Wind
&& ( _nEventId == VCLEVENT_LISTBOX_SELECT )
)
{
- OnDoubleClick( NULL );
+ OnDoubleClick( *m_pBox );
::com::sun::star::awt::ItemEvent aEvent;
aEvent.Source = *this;
@@ -4324,7 +4324,7 @@ void FmXListBoxCell::onWindowEvent( const sal_uIntPtr _nEventId, const vcl::Wind
-IMPL_LINK_NOARG(FmXListBoxCell, OnDoubleClick)
+IMPL_LINK_NOARG_TYPED(FmXListBoxCell, OnDoubleClick, ListBox&, void)
{
if (m_pBox)
{
@@ -4337,7 +4337,6 @@ IMPL_LINK_NOARG(FmXListBoxCell, OnDoubleClick)
while( aIt.hasMoreElements() )
static_cast< ::com::sun::star::awt::XActionListener *>(aIt.next())->actionPerformed( aEvent );
}
- return 1;
}
FmXComboBoxCell::FmXComboBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl )
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index e37db6fa44a4..812c5d4867ca 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -1032,7 +1032,7 @@ public:
protected:
virtual void onWindowEvent( const sal_uLong _nEventId, const vcl::Window& _rWindow, const void* _pEventData ) SAL_OVERRIDE;
- DECL_LINK( OnDoubleClick, void* );
+ DECL_LINK_TYPED( OnDoubleClick, ListBox&, void );
};
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 1d109958cc99..c6296b218f71 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -230,13 +230,18 @@ IMPL_LINK_TYPED( SwCondCollPage, OnOffHdl, Button*, pBox, void )
IMPL_LINK_TYPED( SwCondCollPage, AssignRemoveClickHdl, Button*, pBtn, void)
{
- AssignRemoveHdl(pBtn);
+ AssignRemove(pBtn);
}
IMPL_LINK_TYPED( SwCondCollPage, AssignRemoveTreeListBoxHdl, SvTreeListBox*, pBtn, bool)
{
- return AssignRemoveHdl(pBtn) != 0;
+ AssignRemove(pBtn);
+ return false;
}
-IMPL_LINK( SwCondCollPage, AssignRemoveHdl, void*, pBtn)
+IMPL_LINK_TYPED( SwCondCollPage, AssignRemoveHdl, ListBox&, rBox, void)
+{
+ AssignRemove(&rBox);
+}
+void SwCondCollPage::AssignRemove(void* pBtn)
{
SvTreeListEntry* pE = m_pTbLinks->FirstSelected();
sal_uLong nPos;
@@ -244,7 +249,7 @@ IMPL_LINK( SwCondCollPage, AssignRemoveHdl, void*, pBtn)
( nPos = m_pTbLinks->GetModel()->GetAbsPos( pE ) ) )
{
OSL_ENSURE( pE, "where's the empty entry from?" );
- return 0;
+ return;
}
OUString sSel = m_aStrArr[nPos] + "\t";
@@ -261,7 +266,6 @@ IMPL_LINK( SwCondCollPage, AssignRemoveHdl, void*, pBtn)
m_pTbLinks->Select(pE);
m_pTbLinks->MakeVisible(pE);
m_pTbLinks->SetUpdateMode(true);
- return 0;
}
IMPL_LINK_TYPED( SwCondCollPage, SelectTreeListBoxHdl, SvTreeListBox*, pBox, void)
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 01093af0dab2..d84b7d041852 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -640,20 +640,18 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, TableToFromHdl, Button*, pButton, void
m_pLbTableCol->SetUpdateMode( true );
}
-IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox )
+IMPL_LINK_TYPED( SwInsertDBColAutoPilot, DblClickHdl, ListBox&, rBox, void )
{
Button* pButton = 0;
- if( pBox == m_pLbTextDbColumn )
+ if( &rBox == m_pLbTextDbColumn )
pButton = m_pIbDbcolToEdit;
- else if( pBox == m_pLbTableDbColumn && m_pIbDbcolOneTo->IsEnabled() )
+ else if( &rBox == m_pLbTableDbColumn && m_pIbDbcolOneTo->IsEnabled() )
pButton = m_pIbDbcolOneTo;
- else if( pBox == m_pLbTableCol && m_pIbDbcolOneFrom->IsEnabled() )
+ else if( &rBox == m_pLbTableCol && m_pIbDbcolOneFrom->IsEnabled() )
pButton = m_pIbDbcolOneFrom;
if( pButton )
TableToFromHdl( pButton );
-
- return 0;
}
IMPL_LINK_TYPED( SwInsertDBColAutoPilot, TableFormatHdl, Button*, pButton, void )
diff --git a/sw/source/ui/dochdl/selglos.cxx b/sw/source/ui/dochdl/selglos.cxx
index 2cde14cea56d..b016c35d8323 100644
--- a/sw/source/ui/dochdl/selglos.cxx
+++ b/sw/source/ui/dochdl/selglos.cxx
@@ -46,10 +46,9 @@ void SwSelGlossaryDlg::dispose()
ModalDialog::dispose();
}
-IMPL_LINK(SwSelGlossaryDlg, DoubleClickHdl, ListBox*, /*pBox*/)
+IMPL_LINK_NOARG_TYPED(SwSelGlossaryDlg, DoubleClickHdl, ListBox&, void)
{
EndDialog(RET_OK);
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 7c2375914f08..8da28091d685 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -184,7 +184,7 @@ void SwFieldDBPage::Reset(const SfxItemSet*)
m_pTypeLB->SetUpdateMode(true);
m_pTypeLB->SetSelectHdl(LINK(this, SwFieldDBPage, TypeHdl));
- m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFieldDBPage, InsertHdl));
+ m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFieldDBPage, ListBoxInsertHdl));
if (IsFieldEdit())
{
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 5719d923edce..a71fcb71964e 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -208,8 +208,8 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
m_pTypeTLB->SetSelectHdl(LINK(this, SwFieldDokInfPage, TypeHdl));
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));
+ m_pSelectionLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, ListBoxInsertHdl));
+ m_pFormatLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, ListBoxInsertHdl));
if (IsFieldEdit())
{
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 780b49deb570..424152214e11 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -67,8 +67,8 @@ SwFieldDokPage::SwFieldDokPage(vcl::Window* pParent, const SfxItemSet& rCoreSet
m_pSelectionLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
- m_pSelectionLB->SetDoubleClickHdl(LINK(this, SwFieldDokPage, InsertHdl));
- m_pFormatLB->SetDoubleClickHdl(LINK(this, SwFieldDokPage, InsertHdl));
+ m_pSelectionLB->SetDoubleClickHdl(LINK(this, SwFieldDokPage, ListBoxInsertHdl));
+ m_pFormatLB->SetDoubleClickHdl(LINK(this, SwFieldDokPage, ListBoxInsertHdl));
m_pNumFormatLB->SetDoubleClickHdl(LINK(this, SwFieldDokPage, NumFormatHdl));
m_pLevelED->SetMax(MAXLEVEL);
@@ -170,7 +170,7 @@ void SwFieldDokPage::Reset(const SfxItemSet* )
RestorePos(m_pTypeLB);
m_pTypeLB->SetUpdateMode(true);
- m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFieldDokPage, InsertHdl));
+ m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFieldDokPage, ListBoxInsertHdl));
m_pTypeLB->SetSelectHdl(LINK(this, SwFieldDokPage, TypeHdl));
m_pFormatLB->SetSelectHdl(LINK(this, SwFieldDokPage, FormatHdl));
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index f028af35d3b4..ad3e4f935041 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -162,11 +162,11 @@ void SwFieldFuncPage::Reset(const SfxItemSet* )
// select old Pos
RestorePos(m_pTypeLB);
- m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFieldFuncPage, InsertHdl));
+ m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFieldFuncPage, ListBoxInsertHdl));
m_pTypeLB->SetSelectHdl (LINK(this, SwFieldFuncPage, TypeHdl));
m_pSelectionLB->SetSelectHdl (LINK(this, SwFieldFuncPage, SelectHdl));
m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFieldFuncPage, InsertMacroHdl));
- m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldFuncPage, InsertHdl));
+ m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldFuncPage, ListBoxInsertHdl));
m_pMacroBT->SetClickHdl (LINK(this, SwFieldFuncPage, MacroHdl));
Link<Button*,void> aListModifyLk( LINK(this, SwFieldFuncPage, ListModifyHdl));
m_pListAddPB->SetClickHdl(aListModifyLk);
@@ -415,12 +415,10 @@ IMPL_LINK_NOARG(SwFieldFuncPage, SelectHdl)
return 0;
}
-IMPL_LINK_NOARG(SwFieldFuncPage, InsertMacroHdl)
+IMPL_LINK_NOARG_TYPED(SwFieldFuncPage, InsertMacroHdl, ListBox&, void)
{
SelectHdl(NULL);
- InsertHdl();
-
- return 0;
+ InsertHdl(nullptr);
}
IMPL_LINK_TYPED( SwFieldFuncPage, ListModifyHdl, Button*, pControl, void)
diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx
index bedaaa51c2f1..071ff6474671 100644
--- a/sw/source/ui/fldui/fldfunc.hxx
+++ b/sw/source/ui/fldui/fldfunc.hxx
@@ -68,7 +68,7 @@ class SwFieldFuncPage : public SwFieldPage
DECL_LINK(TypeHdl, void *);
DECL_LINK(SelectHdl, void *);
- DECL_LINK(InsertMacroHdl, void *);
+ DECL_LINK_TYPED(InsertMacroHdl, ListBox&, void);
DECL_LINK(ModifyHdl, void *);
DECL_LINK(ListModifyReturnActionHdl, Control *);
DECL_LINK_TYPED( ListModifyHdl, Button*, void);
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 6e2e274851cc..a9f672f14c8d 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -309,10 +309,16 @@ void SwFieldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3)
// Insert new fields
IMPL_LINK_TYPED( SwFieldPage, TreeListBoxInsertHdl, SvTreeListBox*, pBtn, bool )
{
- return InsertHdl(pBtn);
+ InsertHdl(pBtn);
+ return false;
}
-IMPL_LINK( SwFieldPage, InsertHdl, void *, pBtn )
+IMPL_LINK_TYPED( SwFieldPage, ListBoxInsertHdl, ListBox&, rBox, void )
+{
+ InsertHdl(&rBox);
+}
+
+void SwFieldPage::InsertHdl(void* pBtn)
{
SwFieldDlg *pDlg = static_cast<SwFieldDlg*>(GetTabDialog());
if (pDlg)
@@ -327,8 +333,6 @@ IMPL_LINK( SwFieldPage, InsertHdl, void *, pBtn )
SwFieldEditDlg *pEditDlg = static_cast<SwFieldEditDlg *>(GetParentDialog());
pEditDlg->InsertHdl();
}
-
- return 0;
}
// enable/disable "Insert"-Button
@@ -349,11 +353,9 @@ void SwFieldPage::EnableInsert(bool bEnable)
m_bInsert = bEnable;
}
-IMPL_LINK_NOARG(SwFieldPage, NumFormatHdl)
+IMPL_LINK_NOARG_TYPED(SwFieldPage, NumFormatHdl, ListBox&, void)
{
- InsertHdl();
-
- return 0;
+ InsertHdl(nullptr);
}
void SwFieldPage::SetWrtShell( SwWrtShell* pShell )
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index 09c7ac7eea46..1cdb472b2d5b 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -54,9 +54,10 @@ protected:
SwField* GetCurField() { return m_pCurField;}
SwWrtShell* GetWrtShell() { return m_pWrtShell;}
- DECL_LINK( InsertHdl, void * = 0);
- DECL_LINK_TYPED( TreeListBoxInsertHdl, SvTreeListBox*, bool);
- DECL_LINK(NumFormatHdl, void *);
+ DECL_LINK_TYPED( ListBoxInsertHdl, ListBox&, void );
+ DECL_LINK_TYPED( TreeListBoxInsertHdl, SvTreeListBox*, bool );
+ DECL_LINK_TYPED( NumFormatHdl, ListBox&, void );
+ void InsertHdl(void *);
void Init();
void SavePos( const ListBox* pLst1,
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 4eb1cfd3dac5..d32b11a393ad 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -91,11 +91,11 @@ SwFieldRefPage::SwFieldRefPage(vcl::Window* pParent, const SfxItemSet& rCoreSet
m_pNameED->SetModifyHdl(LINK(this, SwFieldRefPage, ModifyHdl));
- m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFieldRefPage, InsertHdl));
+ m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFieldRefPage, ListBoxInsertHdl));
m_pTypeLB->SetSelectHdl (LINK(this, SwFieldRefPage, TypeHdl));
m_pSelectionLB->SetSelectHdl (LINK(this, SwFieldRefPage, SubTypeHdl));
- m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFieldRefPage, InsertHdl));
- m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldRefPage, InsertHdl));
+ m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFieldRefPage, ListBoxInsertHdl));
+ m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldRefPage, ListBoxInsertHdl));
// #i83479#
m_pSelectionToolTipLB->SetSelectHdl( LINK(this, SwFieldRefPage, SubTypeTreeListBoxHdl) );
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 2d217f475bc8..e1a08823e0b5 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -160,12 +160,12 @@ void SwFieldVarPage::Reset(const SfxItemSet* )
// select old Pos
RestorePos(m_pTypeLB);
- m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, InsertHdl));
+ m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, ListBoxInsertHdl));
m_pTypeLB->SetSelectHdl (LINK(this, SwFieldVarPage, TypeHdl));
m_pSelectionLB->SetSelectHdl (LINK(this, SwFieldVarPage, SubTypeHdl));
- m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, InsertHdl));
- m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, InsertHdl));
- m_pNumFormatLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, InsertHdl));
+ m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, ListBoxInsertHdl));
+ m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, ListBoxInsertHdl));
+ m_pNumFormatLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, ListBoxInsertHdl));
m_pNameED->SetModifyHdl (LINK(this, SwFieldVarPage, ModifyHdl));
m_pValueED->SetModifyHdl (LINK(this, SwFieldVarPage, ModifyHdl));
m_pNewDelTBX->SetClickHdl (LINK(this, SwFieldVarPage, TBClickHdl));
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 9601f18b5e61..433cf5cdff94 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -3792,7 +3792,7 @@ IMPL_LINK_NOARG_TYPED(SwTOXStylesTabPage, StdHdl, Button*, void)
}
}
-IMPL_LINK_NOARG(SwTOXStylesTabPage, DoubleClickHdl)
+IMPL_LINK_NOARG_TYPED(SwTOXStylesTabPage, DoubleClickHdl, ListBox&, void)
{
const OUString aTmpName( m_pParaLayLB->GetSelectEntry() );
SwWrtShell& rSh = static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell();
@@ -3800,7 +3800,6 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, DoubleClickHdl)
if(m_pParaLayLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND &&
(m_pLevelLB->GetSelectEntryPos() == 0 || SwMultiTOXTabDialog::IsNoNum(rSh, aTmpName)))
AssignHdl(m_pAssignBT);
- return 0;
}
// enable only when selected
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 3673672b40a8..a76528e6a576 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -67,7 +67,7 @@ class SwNumNamesDlg : public ModalDialog
DECL_LINK( ModifyHdl, Edit * );
DECL_LINK( SelectHdl, ListBox * );
- DECL_LINK(DoubleClickHdl, void *);
+ DECL_LINK_TYPED( DoubleClickHdl, ListBox&, void );
public:
explicit SwNumNamesDlg(vcl::Window *pParent);
@@ -129,10 +129,9 @@ IMPL_LINK( SwNumNamesDlg, ModifyHdl, Edit *, pBox )
}
// DoubleClickHdl
-IMPL_LINK_NOARG(SwNumNamesDlg, DoubleClickHdl)
+IMPL_LINK_NOARG_TYPED(SwNumNamesDlg, DoubleClickHdl, ListBox&, void)
{
EndDialog(RET_OK);
- return 0;
}
SwNumNamesDlg::SwNumNamesDlg(vcl::Window *pParent)
diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx
index 53088dea74b7..ef4157336939 100644
--- a/sw/source/uibase/inc/dbinsdlg.hxx
+++ b/sw/source/uibase/inc/dbinsdlg.hxx
@@ -139,7 +139,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem
DECL_LINK_TYPED( DBFormatHdl, Button*, void );
DECL_LINK_TYPED( TableToFromHdl, Button*, void );
DECL_LINK( SelectHdl, ListBox* );
- DECL_LINK( DblClickHdl, ListBox* );
+ DECL_LINK_TYPED( DblClickHdl, ListBox&, void );
DECL_LINK_TYPED( HeaderHdl, Button*, void );
bool SplitTextToColArr( const OUString& rText, _DB_Columns& rColArr, bool bInsField );
diff --git a/sw/source/uibase/inc/selglos.hxx b/sw/source/uibase/inc/selglos.hxx
index e67f3788a2f2..81914a479142 100644
--- a/sw/source/uibase/inc/selglos.hxx
+++ b/sw/source/uibase/inc/selglos.hxx
@@ -31,7 +31,7 @@ class SwSelGlossaryDlg : public ModalDialog
protected:
VclPtr<ListBox> m_pGlosBox;
- DECL_LINK(DoubleClickHdl, ListBox*);
+ DECL_LINK_TYPED(DoubleClickHdl, ListBox&, void);
public:
SwSelGlossaryDlg(vcl::Window * pParent, const OUString &rShortName);
virtual ~SwSelGlossaryDlg();
diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx
index 4988e11f4d7f..ef5a227b35a5 100644
--- a/sw/source/uibase/inc/swuiccoll.hxx
+++ b/sw/source/uibase/inc/swuiccoll.hxx
@@ -53,11 +53,12 @@ class SwCondCollPage : public SfxTabPage
virtual sfxpg DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE;
DECL_LINK_TYPED( OnOffHdl, Button*, void );
- DECL_LINK( AssignRemoveHdl, void*);
+ DECL_LINK_TYPED( AssignRemoveHdl, ListBox&, void);
DECL_LINK_TYPED( AssignRemoveTreeListBoxHdl, SvTreeListBox*, bool);
DECL_LINK_TYPED( AssignRemoveClickHdl, Button*, void);
DECL_LINK_TYPED( SelectTreeListBoxHdl, SvTreeListBox*, void );
DECL_LINK( SelectHdl, void* );
+ void AssignRemove(void*);
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index aa625e47bb59..f65bc9192c0e 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -465,11 +465,11 @@ class SwTOXStylesTabPage : public SfxTabPage
SwForm* m_pCurrentForm;
- DECL_LINK_TYPED( EditStyleHdl, Button *, void);
- DECL_LINK_TYPED(StdHdl, Button*, void);
+ DECL_LINK_TYPED( EditStyleHdl, Button *, void );
+ DECL_LINK_TYPED( StdHdl, Button*, void );
DECL_LINK(EnableSelectHdl, void *);
- DECL_LINK(DoubleClickHdl, void *);
- DECL_LINK_TYPED(AssignHdl, Button*, void);
+ DECL_LINK_TYPED( DoubleClickHdl, ListBox&, void );
+ DECL_LINK_TYPED( AssignHdl, Button*, void );
void Modify();
SwForm& GetForm()
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index c183a14eb404..5653db1bf76b 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -494,13 +494,17 @@ void ThemePanel::dispose()
IMPL_LINK_NOARG_TYPED(ThemePanel, ClickHdl, Button*, void)
{
- DoubleClickHdl(NULL);
+ DoubleClickHdl();
}
IMPL_LINK_NOARG_TYPED(ThemePanel, DoubleClickValueSetHdl, ValueSet*, void)
{
- DoubleClickHdl(NULL);
+ DoubleClickHdl();
}
-IMPL_LINK_NOARG(ThemePanel, DoubleClickHdl)
+IMPL_LINK_NOARG_TYPED(ThemePanel, DoubleClickHdl, ListBox&, void)
+{
+ DoubleClickHdl();
+}
+void ThemePanel::DoubleClickHdl()
{
SwDocShell* pDocSh = static_cast<SwDocShell*>(SfxObjectShell::Current());
if (pDocSh)
@@ -513,7 +517,6 @@ IMPL_LINK_NOARG(ThemePanel, DoubleClickHdl)
applyTheme(pDocSh->GetStyleSheetPool(), sEntryFonts, sEntryColors, aStyleSet, maColorSets);
}
- return 1;
}
void ThemePanel::NotifyItemUpdate(const sal_uInt16 /*nSId*/,
diff --git a/sw/source/uibase/sidebar/ThemePanel.hxx b/sw/source/uibase/sidebar/ThemePanel.hxx
index 173fb76c4375..a7a09d773022 100644
--- a/sw/source/uibase/sidebar/ThemePanel.hxx
+++ b/sw/source/uibase/sidebar/ThemePanel.hxx
@@ -73,8 +73,9 @@ private:
svx::ColorSets maColorSets;
DECL_LINK_TYPED(ClickHdl, Button*, void);
- DECL_LINK(DoubleClickHdl, void*);
+ DECL_LINK_TYPED(DoubleClickHdl, ListBox&, void);
DECL_LINK_TYPED(DoubleClickValueSetHdl, ValueSet*, void);
+ void DoubleClickHdl();
};
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index f7183654a4e5..b1fac9b59029 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -54,7 +54,7 @@ class SwGlossDecideDlg : public ModalDialog
VclPtr<OKButton> m_pOk;
VclPtr<ListBox> m_pListLB;
- DECL_LINK(DoubleClickHdl, void*);
+ DECL_LINK_TYPED(DoubleClickHdl, ListBox&, void);
DECL_LINK(SelectHdl, void*);
public:
@@ -88,10 +88,9 @@ void SwGlossDecideDlg::dispose()
ModalDialog::dispose();
}
-IMPL_LINK_NOARG(SwGlossDecideDlg, DoubleClickHdl)
+IMPL_LINK_NOARG_TYPED(SwGlossDecideDlg, DoubleClickHdl, ListBox&, void)
{
EndDialog(RET_OK);
- return 0;
}
IMPL_LINK_NOARG(SwGlossDecideDlg, SelectHdl)
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index c6ab23b444d3..c5161985f80a 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -966,7 +966,7 @@ void ListBox::Select()
void ListBox::DoubleClick()
{
- ImplCallEventListenersAndHandler( VCLEVENT_LISTBOX_DOUBLECLICK, [this] () { maDoubleClickHdl.Call(this); } );
+ ImplCallEventListenersAndHandler( VCLEVENT_LISTBOX_DOUBLECLICK, [this] () { maDoubleClickHdl.Call(*this); } );
}
void ListBox::Clear()
diff --git a/writerperfect/inc/WPFTEncodingDialog.hxx b/writerperfect/inc/WPFTEncodingDialog.hxx
index 69f409885df4..7e435dda6303 100644
--- a/writerperfect/inc/WPFTEncodingDialog.hxx
+++ b/writerperfect/inc/WPFTEncodingDialog.hxx
@@ -42,7 +42,7 @@ private:
bool m_userHasCancelled;
private:
- DECL_LINK(DoubleClickHdl, ListBox *);
+ DECL_LINK_TYPED(DoubleClickHdl, ListBox&, void);
DECL_LINK_TYPED(CancelHdl, Button*, void);
void dispose() SAL_OVERRIDE;
diff --git a/writerperfect/source/common/WPFTEncodingDialog.cxx b/writerperfect/source/common/WPFTEncodingDialog.cxx
index 4cd5b75161be..262419b0b4bf 100644
--- a/writerperfect/source/common/WPFTEncodingDialog.cxx
+++ b/writerperfect/source/common/WPFTEncodingDialog.cxx
@@ -195,13 +195,12 @@ IMPL_LINK_NOARG_TYPED(WPFTEncodingDialog, CancelHdl, Button*, void)
Close();
}
-IMPL_LINK(WPFTEncodingDialog, DoubleClickHdl, ListBox *, pLb)
+IMPL_LINK_TYPED(WPFTEncodingDialog, DoubleClickHdl, ListBox&, rLb, void)
{
- if (pLb == m_pLbCharset)
+ if (&rLb == m_pLbCharset)
{
m_pBtnOk->Click();
}
- return 0;
}
void WPFTEncodingDialog::dispose()