summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-15 08:13:49 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-16 09:11:29 +0000
commit6f1313b3d44ea54e9a331e0fc00871081fa662fe (patch)
treefa6d9b6da04daedcb63ea2a0bc8c414288ed8bc6 /sw/source
parent14bf708ef586b15dffed66ffaf524baf4d8fcbfa (diff)
convert Link<> to typed
Change-Id: Icbba339dac0be31e30dff021bba06a219f8aecd6 Reviewed-on: https://gerrit.libreoffice.org/19405 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/chrdlg/break.cxx3
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx18
-rw-r--r--sw/source/ui/config/optload.cxx9
-rw-r--r--sw/source/ui/config/optpage.cxx28
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx19
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.hxx4
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx7
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.hxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx10
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx4
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx5
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx2
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx22
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.cxx9
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hxx3
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx43
-rw-r--r--sw/source/ui/envelp/labfmt.cxx10
-rw-r--r--sw/source/ui/envelp/labfmt.hxx4
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx5
-rw-r--r--sw/source/ui/fldui/flddb.cxx3
-rw-r--r--sw/source/ui/fldui/flddb.hxx4
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx18
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx16
-rw-r--r--sw/source/ui/fldui/fldref.cxx10
-rw-r--r--sw/source/ui/fldui/fldref.hxx2
-rw-r--r--sw/source/ui/fldui/fldvar.cxx14
-rw-r--r--sw/source/ui/fldui/fldvar.hxx8
-rw-r--r--sw/source/ui/frmdlg/column.cxx33
-rw-r--r--sw/source/ui/frmdlg/cption.cxx7
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx17
-rw-r--r--sw/source/ui/index/cnttab.cxx38
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx52
-rw-r--r--sw/source/ui/misc/bookmark.cxx11
-rw-r--r--sw/source/ui/misc/glosbib.cxx5
-rw-r--r--sw/source/ui/misc/glossary.cxx22
-rw-r--r--sw/source/ui/misc/insfnote.cxx4
-rw-r--r--sw/source/ui/misc/linenum.cxx8
-rw-r--r--sw/source/ui/misc/outline.cxx22
-rw-r--r--sw/source/ui/misc/pgfnote.cxx4
-rw-r--r--sw/source/ui/table/colwd.cxx5
-rw-r--r--sw/source/ui/table/instable.cxx16
-rw-r--r--sw/source/ui/utlui/swrenamexnameddlg.cxx5
-rw-r--r--sw/source/uibase/inc/bookmark.hxx2
-rw-r--r--sw/source/uibase/inc/break.hxx2
-rw-r--r--sw/source/uibase/inc/column.hxx13
-rw-r--r--sw/source/uibase/inc/cption.hxx2
-rw-r--r--sw/source/uibase/inc/drpcps.hxx8
-rw-r--r--sw/source/uibase/inc/frmpage.hxx4
-rw-r--r--sw/source/uibase/inc/glosbib.hxx8
-rw-r--r--sw/source/uibase/inc/glossary.hxx8
-rw-r--r--sw/source/uibase/inc/inputwin.hxx2
-rw-r--r--sw/source/uibase/inc/insfnote.hxx2
-rw-r--r--sw/source/uibase/inc/instable.hxx10
-rw-r--r--sw/source/uibase/inc/linenum.hxx2
-rw-r--r--sw/source/uibase/inc/mailmrge.hxx4
-rw-r--r--sw/source/uibase/inc/optload.hxx2
-rw-r--r--sw/source/uibase/inc/optpage.hxx6
-rw-r--r--sw/source/uibase/inc/outline.hxx10
-rw-r--r--sw/source/uibase/inc/pgfnote.hxx10
-rw-r--r--sw/source/uibase/inc/prcntfld.hxx2
-rw-r--r--sw/source/uibase/inc/regionsw.hxx20
-rw-r--r--sw/source/uibase/inc/swrenamexnameddlg.hxx2
-rw-r--r--sw/source/uibase/inc/swuicnttab.hxx10
-rw-r--r--sw/source/uibase/inc/swuiidxmrk.hxx25
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx3
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.cxx10
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.hxx4
67 files changed, 321 insertions, 381 deletions
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index 1342a77e5909..bdadb73b990f 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -79,10 +79,9 @@ IMPL_LINK_TYPED( SwBreakDlg, PageNumHdl, Button*, pBox, void )
}
// By changing the Page number the checkbox is checked.
-IMPL_LINK_NOARG(SwBreakDlg, PageNumModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwBreakDlg, PageNumModifyHdl, Edit&, void)
{
m_pPageNumBox->Check();
- return 0;
}
/*
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 6ee99f411b8a..f6c75f66bd36 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -575,7 +575,7 @@ SwDropCapsPage::SwDropCapsPage(vcl::Window *pParent, const SfxItemSet &rSet)
m_pPict->SetBorderStyle( WindowBorderStyle::MONO );
// Install handler
- Link<> aLk = LINK(this, SwDropCapsPage, ModifyHdl);
+ Link<Edit&,void> aLk = LINK(this, SwDropCapsPage, ModifyHdl);
m_pDropCapsField->SetModifyHdl( aLk );
m_pLinesField->SetModifyHdl( aLk );
m_pDistanceField->SetModifyHdl( aLk );
@@ -698,7 +698,7 @@ IMPL_LINK_NOARG_TYPED(SwDropCapsPage, ClickHdl, Button*, void)
if ( bChecked )
{
- ModifyHdl(m_pDropCapsField);
+ ModifyHdl(*m_pDropCapsField);
m_pDropCapsField->GrabFocus();
}
else
@@ -712,17 +712,17 @@ IMPL_LINK_NOARG_TYPED(SwDropCapsPage, WholeWordHdl, Button*, void)
m_pDropCapsField->Enable( !m_pWholeWordCB->IsChecked() );
m_pSwitchText->Enable(!m_pWholeWordCB->IsChecked());
- ModifyHdl(m_pDropCapsField);
+ ModifyHdl(*m_pDropCapsField);
bModified = true;
}
-IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
+IMPL_LINK_TYPED( SwDropCapsPage, ModifyHdl, Edit&, rEdit, void )
{
OUString sPreview;
// set text if applicable
- if (pEdit == m_pDropCapsField)
+ if (&rEdit == m_pDropCapsField)
{
const sal_Int32 nVal = !m_pWholeWordCB->IsChecked()
? static_cast<sal_Int32>(m_pDropCapsField->GetValue())
@@ -748,7 +748,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
if (bSetText)
m_pTextEdit->SetText(sPreview);
}
- else if (pEdit == m_pTextEdit) // set quantity if applicable
+ else if (&rEdit == m_pTextEdit) // set quantity if applicable
{
const sal_Int32 nTmp = m_pTextEdit->GetText().getLength();
m_pDropCapsField->SetValue(std::max<sal_Int32>(1, nTmp));
@@ -756,16 +756,14 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
}
// adjust image
- if (pEdit == m_pDropCapsField || pEdit == m_pTextEdit)
+ if (&rEdit == m_pDropCapsField || &rEdit == m_pTextEdit)
m_pPict->SetText (sPreview);
- else if (pEdit == m_pLinesField)
+ else if (&rEdit == m_pLinesField)
m_pPict->SetLines((sal_uInt8)m_pLinesField->GetValue());
else
m_pPict->SetDistance((sal_uInt16)m_pDistanceField->Denormalize(m_pDistanceField->GetValue(FUNIT_TWIP)));
bModified = true;
-
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwDropCapsPage, SelectHdl, ListBox&, void)
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index e6574716be33..784206bcfa82 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -526,7 +526,7 @@ SwCaptionOptPage::SwCaptionOptPage(vcl::Window* pParent, const SfxItemSet& rSet)
m_pLbLevel->SelectEntryPos( nLvl < MAXLEVEL ? nLvl + 1 : 0 );
m_pEdDelim->SetText( sDelim );
- Link<> aLk = LINK( this, SwCaptionOptPage, ModifyHdl );
+ Link<Edit&,void> aLk = LINK( this, SwCaptionOptPage, ModifyHdl );
m_pCategoryBox->SetModifyHdl( aLk );
m_pNumberingSeparatorED->SetModifyHdl( aLk );
m_pTextEdit->SetModifyHdl( aLk );
@@ -647,7 +647,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet* rSet)
}
m_pLbCaptionOrder->SelectEntryPos(
SW_MOD()->GetModuleConfig()->IsCaptionOrderNumberingFirst() ? 1 : 0);
- ModifyHdl();
+ ModifyHdl(*m_pCategoryBox);
}
void SwCaptionOptPage::SetOptions(const sal_uLong nPos,
@@ -783,7 +783,7 @@ IMPL_LINK_NOARG_TYPED(SwCaptionOptPage, ShowEntryHdl, SvTreeListBox*, void)
m_pApplyBorderCB->Check( pOpt->CopyAttributes() );
}
- ModifyHdl();
+ ModifyHdl(*m_pCategoryBox);
}
IMPL_LINK_NOARG_TYPED(SwCaptionOptPage, SaveEntryHdl, SvTreeListBox*, void)
@@ -822,7 +822,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
}
}
-IMPL_LINK_NOARG(SwCaptionOptPage, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwCaptionOptPage, ModifyHdl, Edit&, void)
{
const OUString sFieldTypeName = m_pCategoryBox->GetText();
@@ -838,7 +838,6 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ModifyHdl)
m_pTextEdit->Enable(bEnable);
InvalidatePreview();
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwCaptionOptPage, SelectHdl, ComboBox&, void)
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 54575fc5e718..3e5419f14c21 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -594,7 +594,7 @@ SwStdFontTabPage::SwStdFontTabPage( vcl::Window* pParent,
pLabelBox ->SetLoseFocusHdl( aFocusLink );
pIdxBox ->SetLoseFocusHdl( aFocusLink );
- Link<> aModifyHeightLink( LINK( this, SwStdFontTabPage, ModifyHeightHdl));
+ Link<Edit&,void> aModifyHeightLink( LINK( this, SwStdFontTabPage, ModifyHeightHdl));
pStandardHeightLB->SetModifyHdl( aModifyHeightLink );
pTitleHeightLB-> SetModifyHdl( aModifyHeightLink );
pListHeightLB-> SetModifyHdl( aModifyHeightLink );
@@ -1006,11 +1006,11 @@ IMPL_LINK_NOARG_TYPED(SwStdFontTabPage, StandardHdl, Button*, void)
SFX_MAPUNIT_TWIP, 10 ));
}
-IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox )
+IMPL_LINK_TYPED( SwStdFontTabPage, ModifyHdl, Edit&, rBox, void )
{
- if(pBox == pStandardBox)
+ if(&rBox == pStandardBox)
{
- const OUString sEntry = pBox->GetText();
+ const OUString sEntry = rBox.GetText();
if(bSetListDefault && bListDefault)
pListBox->SetText(sEntry);
if(bSetLabelDefault && bLabelDefault)
@@ -1018,26 +1018,25 @@ IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox )
if(bSetIdxDefault && bIdxDefault)
pIdxBox->SetText(sEntry);
}
- else if(pBox == pListBox)
+ else if(&rBox == pListBox)
{
bSetListDefault = false;
}
- else if(pBox == pLabelBox)
+ else if(&rBox == pLabelBox)
{
bSetLabelDefault = false;
}
- else if(pBox == pIdxBox)
+ else if(&rBox == pIdxBox)
{
bSetIdxDefault = false;
}
- return 0;
}
-IMPL_LINK( SwStdFontTabPage, ModifyHeightHdl, FontSizeBox*, pBox )
+IMPL_LINK_TYPED( SwStdFontTabPage, ModifyHeightHdl, Edit&, rBox, void )
{
- if(pBox == pStandardHeightLB)
+ if(&rBox == pStandardHeightLB)
{
- sal_Int64 nValue = pBox->GetValue(FUNIT_TWIP);
+ sal_Int64 nValue = static_cast<FontSizeBox&>(rBox).GetValue(FUNIT_TWIP);
if(bSetListHeightDefault && bListHeightDefault)
pListHeightLB->SetValue(nValue, FUNIT_TWIP);
if(bSetLabelHeightDefault && bLabelHeightDefault)
@@ -1045,19 +1044,18 @@ IMPL_LINK( SwStdFontTabPage, ModifyHeightHdl, FontSizeBox*, pBox )
if(bSetIndexHeightDefault && bIndexHeightDefault)
pIndexHeightLB->SetValue(nValue, FUNIT_TWIP);
}
- else if(pBox == pListHeightLB)
+ else if(&rBox == pListHeightLB)
{
bSetListHeightDefault = false;
}
- else if(pBox == pLabelHeightLB)
+ else if(&rBox == pLabelHeightLB)
{
bSetLabelHeightDefault = false;
}
- else if(pBox == pIndexHeightLB)
+ else if(&rBox == pIndexHeightLB)
{
bSetIndexHeightDefault = false;
}
- return 0;
}
IMPL_LINK_TYPED( SwStdFontTabPage, LoseFocusHdl, Control&, rControl, void )
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 486fecc93b38..d108103ce461 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -61,7 +61,7 @@ class SwAddressControl_Impl : public Control
DECL_LINK_TYPED(ScrollHdl_Impl, ScrollBar*, void);
DECL_LINK_TYPED(GotFocusHdl_Impl, Control&, void);
- DECL_LINK(EditModifyHdl_Impl, Edit*);
+ DECL_LINK_TYPED(EditModifyHdl_Impl, Edit&, void);
void MakeVisible(const Rectangle& aRect);
@@ -174,7 +174,7 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
long nFTYPos = nEDYPos + nEDHeight - nFTHeight;
Link<Control&,void> aFocusLink = LINK(this, SwAddressControl_Impl, GotFocusHdl_Impl);
- Link<> aEditModifyLink = LINK(this, SwAddressControl_Impl, EditModifyHdl_Impl);
+ Link<Edit&,void> aEditModifyLink = LINK(this, SwAddressControl_Impl, EditModifyHdl_Impl);
Edit* pLastEdit = 0;
sal_Int32 nVisibleLines = 0;
sal_uIntPtr nLines = 0;
@@ -299,17 +299,16 @@ void SwAddressControl_Impl::MakeVisible(const Rectangle & rRect)
}
// copy data changes into database
-IMPL_LINK(SwAddressControl_Impl, EditModifyHdl_Impl, Edit*, pEdit)
+IMPL_LINK_TYPED(SwAddressControl_Impl, EditModifyHdl_Impl, Edit&, rEdit, void)
{
//get the data element number of the current set
- sal_Int32 nIndex = (sal_Int32)reinterpret_cast<sal_IntPtr>(pEdit->GetData());
+ sal_Int32 nIndex = (sal_Int32)reinterpret_cast<sal_IntPtr>(rEdit.GetData());
//get the index of the set
OSL_ENSURE(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index" );
if(m_pData->aDBData.size() > m_nCurrentDataSet)
{
- m_pData->aDBData[m_nCurrentDataSet][nIndex] = pEdit->GetText();
+ m_pData->aDBData[m_nCurrentDataSet][nIndex] = rEdit.GetText();
}
- return 0;
}
void SwAddressControl_Impl::SetCursorTo(sal_uInt32 nElement)
@@ -681,15 +680,14 @@ IMPL_LINK_TYPED(SwCreateAddressListDialog, DBCursorHdl_Impl, Button*, pButton, v
if(nValue != m_pSetNoNF->GetValue())
{
m_pSetNoNF->SetValue(nValue);
- DBNumCursorHdl_Impl(m_pSetNoNF);
+ DBNumCursorHdl_Impl(*m_pSetNoNF);
}
}
-IMPL_LINK_NOARG(SwCreateAddressListDialog, DBNumCursorHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SwCreateAddressListDialog, DBNumCursorHdl_Impl, Edit&, void)
{
m_pAddressControl->SetCurrentDataSet( static_cast< sal_uInt32 >(m_pSetNoNF->GetValue() - 1) );
UpdateButtons();
- return 0;
}
void SwCreateAddressListDialog::UpdateButtons()
@@ -788,10 +786,9 @@ IMPL_LINK_NOARG_TYPED(SwFindEntryDialog, FindHdl_Impl, Button*, void)
m_pParent->Find(m_pFindED->GetText(), nColumn);
}
-IMPL_LINK_NOARG(SwFindEntryDialog, FindEnableHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SwFindEntryDialog, FindEnableHdl_Impl, Edit&, void)
{
m_pFindPB->Enable(!m_pFindED->GetText().isEmpty());
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwFindEntryDialog, CloseHdl_Impl, Button*, void)
diff --git a/sw/source/ui/dbui/createaddresslistdialog.hxx b/sw/source/ui/dbui/createaddresslistdialog.hxx
index 8e291c57261e..0fced148e5fe 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.hxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.hxx
@@ -68,7 +68,7 @@ class SwCreateAddressListDialog : public SfxModalDialog
DECL_LINK_TYPED(CustomizeHdl_Impl, Button*, void);
DECL_LINK_TYPED(OkHdl_Impl, Button*, void);
DECL_LINK_TYPED(DBCursorHdl_Impl, Button*, void);
- DECL_LINK(DBNumCursorHdl_Impl, void *);
+ DECL_LINK_TYPED(DBNumCursorHdl_Impl, Edit&, void);
void UpdateButtons();
@@ -94,7 +94,7 @@ class SwFindEntryDialog : public ModelessDialog
VclPtr<SwCreateAddressListDialog> m_pParent;
DECL_LINK_TYPED(FindHdl_Impl, Button*, void);
- DECL_LINK(FindEnableHdl_Impl, void *);
+ DECL_LINK_TYPED(FindEnableHdl_Impl, Edit&, void);
DECL_LINK_TYPED(CloseHdl_Impl, Button*, void);
public:
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index b935b6394374..7eb46bd9a09e 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -188,7 +188,7 @@ SwAddRenameEntryDialog::SwAddRenameEntryDialog(
get(m_pOK, "ok");
get(m_pFieldNameED, "entry");
m_pFieldNameED->SetModifyHdl(LINK(this, SwAddRenameEntryDialog, ModifyHdl_Impl));
- ModifyHdl_Impl(m_pFieldNameED);
+ ModifyHdl_Impl(*m_pFieldNameED);
}
SwAddRenameEntryDialog::~SwAddRenameEntryDialog()
@@ -203,9 +203,9 @@ void SwAddRenameEntryDialog::dispose()
SfxModalDialog::dispose();
}
-IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
+IMPL_LINK_TYPED(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit&, rEdit, void)
{
- OUString sEntry = pEdit->GetText();
+ OUString sEntry = rEdit.GetText();
bool bFound = sEntry.isEmpty();
if(!bFound)
@@ -221,7 +221,6 @@ IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
}
}
m_pOK->Enable(!bFound);
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hxx b/sw/source/ui/dbui/customizeaddresslistdialog.hxx
index c242ea43429a..c0d58660b906 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.hxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.hxx
@@ -60,7 +60,7 @@ class SwAddRenameEntryDialog : public SfxModalDialog
VclPtr<OKButton> m_pOK;
const std::vector< OUString >& m_rCSVHeader;
- DECL_LINK(ModifyHdl_Impl, Edit*);
+ DECL_LINK_TYPED(ModifyHdl_Impl, Edit&, void);
protected:
SwAddRenameEntryDialog(vcl::Window* pParent, const OUString& rID,
const OUString& rUIXMLDescription, const std::vector< OUString >& rCSVHeader);
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 4382ec17ff17..3eaf0e8d1bef 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -549,7 +549,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
m_pAddressElementsLB->SetSelectHdl(LINK(this, SwCustomizeAddressBlockDialog, ListBoxSelectHdl_Impl ));
m_pDragED->SetModifyHdl(LINK(this, SwCustomizeAddressBlockDialog, EditModifyHdl_Impl));
m_pDragED->SetSelectionChangedHdl( LINK( this, SwCustomizeAddressBlockDialog, SelectionChangedHdl_Impl));
- Link<> aFieldsLink = LINK(this, SwCustomizeAddressBlockDialog, FieldChangeHdl_Impl);
+ Link<Edit&,void> aFieldsLink = LINK(this, SwCustomizeAddressBlockDialog, FieldChangeHdl_Impl);
m_pFieldCB->SetModifyHdl(aFieldsLink);
m_pFieldCB->SetSelectHdl(LINK(this, SwCustomizeAddressBlockDialog, FieldChangeComboBoxHdl_Impl));
Link<Button*,void> aImgButtonHdl = LINK(this, SwCustomizeAddressBlockDialog, ImageButtonHdl_Impl);
@@ -598,11 +598,10 @@ IMPL_LINK_TYPED(SwCustomizeAddressBlockDialog, ListBoxSelectHdl_Impl, SvTreeList
m_pInsertFieldIB->Enable(nUserData >= 0 || !HasItem_Impl(nUserData));
}
-IMPL_LINK_NOARG(SwCustomizeAddressBlockDialog, EditModifyHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SwCustomizeAddressBlockDialog, EditModifyHdl_Impl, Edit&, void)
{
m_pPreviewWIN->SetAddress(SwAddressPreview::FillData(GetAddress(), m_rConfigItem));
UpdateImageButtons_Impl();
- return 0;
}
IMPL_LINK_TYPED(SwCustomizeAddressBlockDialog, ImageButtonHdl_Impl, Button*, pButton, void)
@@ -722,9 +721,9 @@ IMPL_LINK_TYPED(SwCustomizeAddressBlockDialog, SelectionChangedHdl_Impl, Address
IMPL_LINK_NOARG_TYPED(SwCustomizeAddressBlockDialog, FieldChangeComboBoxHdl_Impl, ComboBox&, void)
{
- FieldChangeHdl_Impl(nullptr);
+ FieldChangeHdl_Impl(*m_pFieldCB);
}
-IMPL_LINK_NOARG(SwCustomizeAddressBlockDialog, FieldChangeHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SwCustomizeAddressBlockDialog, FieldChangeHdl_Impl, Edit&, void)
{
//changing the field content changes the related members, too
sal_Int32 nSelected = GetSelectedItem_Impl();
@@ -743,7 +742,6 @@ IMPL_LINK_NOARG(SwCustomizeAddressBlockDialog, FieldChangeHdl_Impl)
UpdateImageButtons_Impl();
m_pPreviewWIN->SetAddress(GetAddress());
m_pDragED->Modify();
- return 0;
}
void SwCustomizeAddressBlockDialog::UpdateImageButtons_Impl()
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index b4abb2befb2e..f91287a8b667 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -222,10 +222,10 @@ private:
DECL_LINK_TYPED(OKHdl_Impl, Button*, void);
DECL_LINK_TYPED(ListBoxSelectHdl_Impl, SvTreeListBox*, void);
- DECL_LINK(EditModifyHdl_Impl, void *);
+ DECL_LINK_TYPED(EditModifyHdl_Impl, Edit&, void);
DECL_LINK_TYPED(ImageButtonHdl_Impl, Button*, void);
DECL_LINK_TYPED(SelectionChangedHdl_Impl, AddressMultiLineEdit&, void);
- DECL_LINK(FieldChangeHdl_Impl, void *);
+ DECL_LINK_TYPED(FieldChangeHdl_Impl, Edit&, void);
DECL_LINK_TYPED(FieldChangeComboBoxHdl_Impl, ComboBox&, void);
bool HasItem_Impl(sal_Int32 nUserData);
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 7cd8d128175a..87cbd05e3038 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -139,10 +139,9 @@ IMPL_LINK_TYPED(SwMailMergeGreetingsPage, AssignHdl_Impl, Button*, pButton, void
}
}
-IMPL_LINK_NOARG(SwMailMergeGreetingsPage, GreetingSelectHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SwMailMergeGreetingsPage, GreetingSelectHdl_Impl, Edit&, void)
{
UpdatePreview();
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwMailMergeGreetingsPage, GreetingSelectListBoxHdl_Impl, ListBox&, void)
{
@@ -267,7 +266,7 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* _pParent)
m_pFemalePB->SetClickHdl(aGreetingLink);
m_pMalePB->SetClickHdl(aGreetingLink);
m_pAssignPB->SetClickHdl(LINK(this, SwMailMergeGreetingsPage, AssignHdl_Impl));
- Link<> aLBoxLink = LINK(this, SwMailMergeGreetingsPage, GreetingSelectHdl_Impl);
+ Link<Edit&,void> aLBoxLink = LINK(this, SwMailMergeGreetingsPage, GreetingSelectHdl_Impl);
Link<ListBox&,void> aLBoxLink2 = LINK(this, SwMailMergeGreetingsPage, GreetingSelectListBoxHdl_Impl);
m_pFemaleLB->SetSelectHdl(aLBoxLink2);
m_pMaleLB->SetSelectHdl(aLBoxLink2);
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index f0edeaaa6d43..95cfd17219fb 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -81,7 +81,7 @@ class SwMailMergeGreetingsPage : public svt::OWizardPage,
DECL_LINK_TYPED(ContainsHdl_Impl, Button*, void);
DECL_LINK_TYPED(InsertDataHdl_Impl, Button*, void);
- DECL_LINK(GreetingSelectHdl_Impl, void *);
+ DECL_LINK_TYPED(GreetingSelectHdl_Impl, Edit&, void);
DECL_LINK_TYPED(GreetingSelectComboBoxHdl_Impl, ComboBox&, void);
DECL_LINK_TYPED(GreetingSelectListBoxHdl_Impl, ListBox&, void);
DECL_LINK_TYPED(AssignHdl_Impl, Button*, void);
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 92ebab67c332..6aad4e4211d8 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -119,7 +119,7 @@ static OUString lcl_GetColumnValueOf(const OUString& rColumn, Reference < contai
class SwSaveWarningBox_Impl : public SwMessageAndEditDialog
{
- DECL_LINK( ModifyHdl, Edit*);
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void);
public:
SwSaveWarningBox_Impl(vcl::Window* pParent, const OUString& rFileName);
@@ -132,7 +132,7 @@ public:
class SwSendQueryBox_Impl : public SwMessageAndEditDialog
{
bool bIsEmptyAllowed;
- DECL_LINK( ModifyHdl, Edit*);
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void);
public:
SwSendQueryBox_Impl(vcl::Window* pParent, const OUString& rID,
const OUString& rUIXMLDescription);
@@ -140,7 +140,7 @@ public:
void SetValue(const OUString& rSet)
{
m_pEdit->SetText(rSet);
- ModifyHdl(m_pEdit);
+ ModifyHdl(*m_pEdit);
}
OUString GetValue() const
@@ -151,7 +151,7 @@ public:
void SetIsEmptyTextAllowed(bool bSet)
{
bIsEmptyAllowed = bSet;
- ModifyHdl(m_pEdit);
+ ModifyHdl(*m_pEdit);
}
};
@@ -166,13 +166,12 @@ SwSaveWarningBox_Impl::SwSaveWarningBox_Impl(vcl::Window* pParent, const OUStrin
m_pPrimaryMessage->SetText(m_pPrimaryMessage->GetText().replaceAll("%1", aTmp.getName(
INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET)));
- ModifyHdl(m_pEdit);
+ ModifyHdl(*m_pEdit);
}
-IMPL_LINK( SwSaveWarningBox_Impl, ModifyHdl, Edit*, pEdit)
+IMPL_LINK_TYPED( SwSaveWarningBox_Impl, ModifyHdl, Edit&, rEdit, void)
{
- m_pOKPB->Enable(!pEdit->GetText().isEmpty());
- return 0;
+ m_pOKPB->Enable(!rEdit.GetText().isEmpty());
}
SwSendQueryBox_Impl::SwSendQueryBox_Impl(vcl::Window* pParent, const OUString& rID,
@@ -182,13 +181,12 @@ SwSendQueryBox_Impl::SwSendQueryBox_Impl(vcl::Window* pParent, const OUString& r
{
m_pImageIM->SetImage(QueryBox::GetStandardImage());
m_pEdit->SetModifyHdl(LINK(this, SwSendQueryBox_Impl, ModifyHdl));
- ModifyHdl(m_pEdit);
+ ModifyHdl(*m_pEdit);
}
-IMPL_LINK( SwSendQueryBox_Impl, ModifyHdl, Edit*, pEdit)
+IMPL_LINK_TYPED( SwSendQueryBox_Impl, ModifyHdl, Edit&, rEdit, void)
{
- m_pOKPB->Enable(bIsEmptyAllowed || !pEdit->GetText().isEmpty());
- return 0;
+ m_pOKPB->Enable(bIsEmptyAllowed || !rEdit.GetText().isEmpty());
}
class SwCopyToDialog : public SfxModalDialog
diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx
index cbcf5f8d47f3..7b8d649fc7f5 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.cxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.cxx
@@ -55,7 +55,7 @@ SwMailMergePrepareMergePage::SwMailMergePrepareMergePage( SwMailMergeWizard* _pP
m_pPrevPB->SetClickHdl( aMoveLink );
m_pNextPB->SetClickHdl( aMoveLink );
m_pLastPB->SetClickHdl( aMoveLink );
- m_pRecordED->SetModifyHdl( LINK( this, SwMailMergePrepareMergePage, MoveHdl_Impl) );
+ m_pRecordED->SetModifyHdl( LINK( this, SwMailMergePrepareMergePage, MoveEditHdl_Impl) );
m_pExcludeCB->SetClickHdl(LINK(this, SwMailMergePrepareMergePage, ExcludeHdl_Impl));
MoveHdl_Impl(m_pRecordED);
}
@@ -88,7 +88,11 @@ IMPL_LINK_TYPED( SwMailMergePrepareMergePage, MoveClickHdl_Impl, Button*, pCtrl,
{
MoveHdl_Impl(pCtrl);
}
-IMPL_LINK( SwMailMergePrepareMergePage, MoveHdl_Impl, void*, pCtrl)
+IMPL_LINK_TYPED( SwMailMergePrepareMergePage, MoveEditHdl_Impl, Edit&, rEdit, void)
+{
+ MoveHdl_Impl(&rEdit);
+}
+void SwMailMergePrepareMergePage:: MoveHdl_Impl(Control* pCtrl)
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
sal_Int32 nPos = rConfigItem.GetResultSetPosition();
@@ -135,7 +139,6 @@ IMPL_LINK( SwMailMergePrepareMergePage, MoveHdl_Impl, void*, pCtrl)
SwWrtShell& rSh = m_pWizard->GetSwView()->GetWrtShell();
SwMergeDescriptor aMergeDesc( DBMGR_MERGE, rSh, aDescriptor );
rSh.GetDBManager()->MergeNew(aMergeDesc);
- return 0;
}
IMPL_LINK_TYPED( SwMailMergePrepareMergePage, ExcludeHdl_Impl, Button*, pBox, void)
diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx
index f1b39f4d51d2..89c44752b48c 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.hxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.hxx
@@ -42,8 +42,9 @@ class SwMailMergePrepareMergePage : public svt::OWizardPage
DECL_LINK_TYPED(EditDocumentHdl_Impl, Button*, void);
DECL_LINK_TYPED(ExcludeHdl_Impl, Button*, void);
- DECL_LINK(MoveHdl_Impl, void*);
+ DECL_LINK_TYPED(MoveEditHdl_Impl, Edit&, void);
DECL_LINK_TYPED(MoveClickHdl_Impl, Button*, void);
+ void MoveHdl_Impl(Control*);
virtual void ActivatePage() override;
virtual bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) override;
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index ab0a489f1d5a..f4fe433bfeb8 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1131,22 +1131,22 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OptionsHdl, Button*, void)
}
// Applying of the filename or the linked region
-IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit )
+IMPL_LINK_TYPED( SwEditRegionDlg, FileNameHdl, Edit&, rEdit, void )
{
- Selection aSelect = pEdit->GetSelection();
+ Selection aSelect = rEdit.GetSelection();
if(!CheckPasswd())
- return 0;
- pEdit->SetSelection(aSelect);
+ return;
+ rEdit.SetSelection(aSelect);
SvTreeListEntry* pEntry = m_pTree->FirstSelected();
OSL_ENSURE(pEntry,"no entry found");
SectRepr* pSectRepr = static_cast<SectRepr*>(pEntry->GetUserData());
- if (pEdit == m_pFileNameED)
+ if (&rEdit == m_pFileNameED)
{
m_bSubRegionsFilled = false;
m_pSubRegionED->Clear();
if (m_pDDECB->IsChecked())
{
- OUString sLink( SwSectionData::CollapseWhiteSpaces(pEdit->GetText()) );
+ OUString sLink( SwSectionData::CollapseWhiteSpaces(rEdit.GetText()) );
sal_Int32 nPos = 0;
sLink = sLink.replaceFirst( " ", OUString(sfx2::cTokenSeparator), &nPos );
if (nPos>=0)
@@ -1159,7 +1159,7 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit )
}
else
{
- OUString sTmp(pEdit->GetText());
+ OUString sTmp(rEdit.GetText());
if(!sTmp.isEmpty())
{
SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium();
@@ -1175,9 +1175,8 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit )
}
else
{
- pSectRepr->SetSubRegion( pEdit->GetText() );
+ pSectRepr->SetSubRegion( rEdit.GetText() );
}
- return 0;
}
IMPL_LINK_TYPED( SwEditRegionDlg, DDEHdl, Button*, pButton, void )
@@ -1283,10 +1282,10 @@ IMPL_LINK_TYPED( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox, void )
// the current region name is being added to the TreeListBox immediately during
// editing, with empty string no Ok()
-IMPL_LINK_NOARG(SwEditRegionDlg, NameEditHdl)
+IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, NameEditHdl, Edit&, void)
{
if(!CheckPasswd(0))
- return 0;
+ return;
SvTreeListEntry* pEntry = m_pTree->FirstSelected();
OSL_ENSURE(pEntry,"no entry found");
if (pEntry)
@@ -1298,24 +1297,22 @@ IMPL_LINK_NOARG(SwEditRegionDlg, NameEditHdl)
m_pOK->Enable(!aName.isEmpty());
}
- return 0;
}
-IMPL_LINK( SwEditRegionDlg, ConditionEditHdl, Edit *, pEdit )
+IMPL_LINK_TYPED( SwEditRegionDlg, ConditionEditHdl, Edit&, rEdit, void )
{
- Selection aSelect = pEdit->GetSelection();
+ Selection aSelect = rEdit.GetSelection();
if(!CheckPasswd(0))
- return 0;
- pEdit->SetSelection(aSelect);
+ return;
+ rEdit.SetSelection(aSelect);
SvTreeListEntry* pEntry = m_pTree->FirstSelected();
OSL_ENSURE(pEntry,"no entry found");
while( pEntry )
{
SectRepr* pRepr = static_cast<SectRepr*>(pEntry->GetUserData());
- pRepr->GetSectionData().SetCondition(pEdit->GetText());
+ pRepr->GetSectionData().SetCondition(rEdit.GetText());
pEntry = m_pTree->NextSelected(pEntry);
}
- return 0;
}
IMPL_LINK_TYPED( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg, void )
@@ -1719,12 +1716,11 @@ IMPL_LINK_TYPED( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton, voi
m_aNewPasswd.realloc(0);
}
-IMPL_LINK_NOARG(SwInsertSectionTabPage, NameEditHdl)
+IMPL_LINK_NOARG_TYPED(SwInsertSectionTabPage, NameEditHdl, Edit&, void)
{
const OUString aName = m_pCurName->GetText();
GetTabDialog()->GetOKButton().Enable(!aName.isEmpty() &&
m_pCurName->GetEntryPos( aName ) == LISTBOX_ENTRY_NOTFOUND);
- return 0;
}
IMPL_LINK_TYPED( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void )
@@ -2136,7 +2132,7 @@ SwSectionIndentTabPage::SwSectionIndentTabPage(vcl::Window *pParent, const SfxIt
get(m_pBeforeMF, "before");
get(m_pAfterMF, "after");
get(m_pPreviewWin, "preview");
- Link<> aLk = LINK(this, SwSectionIndentTabPage, IndentModifyHdl);
+ Link<Edit&,void> aLk = LINK(this, SwSectionIndentTabPage, IndentModifyHdl);
m_pBeforeMF->SetModifyHdl(aLk);
m_pAfterMF->SetModifyHdl(aLk);
}
@@ -2190,7 +2186,7 @@ void SwSectionIndentTabPage::Reset( const SfxItemSet* rSet)
}
m_pBeforeMF->SaveValue();
m_pAfterMF->SaveValue();
- IndentModifyHdl(0);
+ IndentModifyHdl(*m_pBeforeMF);
}
VclPtr<SfxTabPage> SwSectionIndentTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet)
@@ -2208,12 +2204,11 @@ void SwSectionIndentTabPage::SetWrtShell(SwWrtShell& rSh)
m_pPreviewWin->SetSize(aPageSize);
}
-IMPL_LINK_NOARG(SwSectionIndentTabPage, IndentModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwSectionIndentTabPage, IndentModifyHdl, Edit&, void)
{
m_pPreviewWin->SetLeftMargin( static_cast< long >(m_pBeforeMF->Denormalize(m_pBeforeMF->GetValue(FUNIT_TWIP))) );
m_pPreviewWin->SetRightMargin( static_cast< long >(m_pAfterMF->Denormalize(m_pAfterMF->GetValue(FUNIT_TWIP))) );
m_pPreviewWin->Invalidate();
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 48a4f21b6400..14191095d2a5 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -326,7 +326,7 @@ SwLabFormatPage::SwLabFormatPage(vcl::Window* pParent, const SfxItemSet& rSet)
SetMetric(*m_pPHeightField, aMetric);
// Install handlers
- Link<> aLk = LINK(this, SwLabFormatPage, ModifyHdl);
+ Link<Edit&,void> aLk = LINK(this, SwLabFormatPage, ModifyHdl);
m_pHDistField->SetModifyHdl( aLk );
m_pVDistField->SetModifyHdl( aLk );
m_pWidthField->SetModifyHdl( aLk );
@@ -382,11 +382,10 @@ void SwLabFormatPage::dispose()
// Modify-handler of MetricFields. start preview timer
-IMPL_LINK_NOARG(SwLabFormatPage, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwLabFormatPage, ModifyHdl, Edit&, void)
{
bModified = true;
aPreviewIdle.Start();
- return 0;
}
// Invalidate preview
@@ -607,7 +606,7 @@ SwSaveLabelDlg::SwSaveLabelDlg(SwLabFormatPage* pParent, SwLabRec& rRec)
get(m_pOKPB, "ok");
m_pOKPB->SetClickHdl(LINK(this, SwSaveLabelDlg, OkHdl));
- Link<> aLk(LINK(this, SwSaveLabelDlg, ModifyHdl));
+ Link<Edit&,void> aLk(LINK(this, SwSaveLabelDlg, ModifyHdl));
m_pMakeCB->SetModifyHdl(aLk);
m_pTypeED->SetModifyHdl(aLk);
@@ -664,10 +663,9 @@ IMPL_LINK_NOARG_TYPED(SwSaveLabelDlg, OkHdl, Button*, void)
EndDialog(RET_OK);
}
-IMPL_LINK_NOARG(SwSaveLabelDlg, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwSaveLabelDlg, ModifyHdl, Edit&, void)
{
m_pOKPB->Enable(!m_pMakeCB->GetText().isEmpty() && !m_pTypeED->GetText().isEmpty());
- return 0;
}
bool SwSaveLabelDlg::GetLabel(SwLabItem& rItem)
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index 8ef6ed52b86a..1e4675cb13d4 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -87,7 +87,7 @@ class SwLabFormatPage : public SfxTabPage
SwLabItem aItem;
- DECL_LINK(ModifyHdl, void *);
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void );
DECL_LINK_TYPED( PreviewHdl, Idle *, void );
DECL_LINK_TYPED( LoseFocusHdl, Control&, void );
DECL_LINK_TYPED( SaveHdl, Button*, void );
@@ -124,7 +124,7 @@ class SwSaveLabelDlg : public ModalDialog
SwLabRec& rLabRec;
DECL_LINK_TYPED(OkHdl, Button*, void);
- DECL_LINK(ModifyHdl, void *);
+ DECL_LINK_TYPED(ModifyHdl, Edit&, void);
public:
SwSaveLabelDlg(SwLabFormatPage* pParent, SwLabRec& rRec);
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 8bfa3ef5ee3c..9f872426261d 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -279,7 +279,7 @@ SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell,
m_pSaveIndividualRB->SetClickHdl( aLk );
aLk.Call( m_pSaveSingleDocRB );
- Link<> aLk2 = LINK(this, SwMailMergeDlg, ModifyHdl);
+ Link<Edit&,void> aLk2 = LINK(this, SwMailMergeDlg, ModifyHdl);
m_pFromNF->SetModifyHdl(aLk2);
m_pToNF->SetModifyHdl(aLk2);
m_pFromNF->SetMax(SAL_MAX_INT32);
@@ -481,10 +481,9 @@ IMPL_LINK_TYPED( SwMailMergeDlg, FilenameHdl, Button*, pBox, void )
m_pFilterLB->Enable( bEnable );
}
-IMPL_LINK_NOARG(SwMailMergeDlg, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwMailMergeDlg, ModifyHdl, Edit&, void)
{
m_pFromRB->Check();
- return 0;
}
bool SwMailMergeDlg::ExecQryShell()
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 34db853ebcae..3e0c7620ccab 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -485,10 +485,9 @@ IMPL_LINK_NOARG_TYPED(SwFieldDBPage, AddDBHdl, Button*, void)
}
// Modify
-IMPL_LINK_NOARG(SwFieldDBPage, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwFieldDBPage, ModifyHdl, Edit&, void)
{
CheckInsert();
- return 0;
}
void SwFieldDBPage::FillUserData()
diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx
index 5a5a8fc2b1e4..6fcf77ef559e 100644
--- a/sw/source/ui/fldui/flddb.hxx
+++ b/sw/source/ui/fldui/flddb.hxx
@@ -57,8 +57,8 @@ class SwFieldDBPage : public SwFieldPage
DECL_LINK_TYPED( TypeListBoxHdl, ListBox&, void );
DECL_LINK_TYPED( NumSelectHdl, ListBox&, void );
DECL_LINK_TYPED( TreeSelectHdl, SvTreeListBox*, void );
- DECL_LINK(ModifyHdl, void *);
- DECL_LINK_TYPED(AddDBHdl, Button*, void);
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void );
+ DECL_LINK_TYPED( AddDBHdl, Button*, void );
void TypeHdl(ListBox*);
void CheckInsert();
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 31aae8eb3b05..aa8c6e9523b8 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -174,7 +174,7 @@ void SwFieldFuncPage::Reset(const SfxItemSet* )
m_pListUpPB->SetClickHdl(aListModifyLk);
m_pListDownPB->SetClickHdl(aListModifyLk);
m_pListItemED->SetReturnActionLink(LINK(this, SwFieldFuncPage, ListModifyReturnActionHdl));
- Link<> aListEnableLk = LINK(this, SwFieldFuncPage, ListEnableHdl);
+ Link<Edit&,void> aListEnableLk = LINK(this, SwFieldFuncPage, ListEnableHdl);
m_pListItemED->SetModifyHdl(aListEnableLk);
m_pListItemsLB->SetSelectHdl(LINK(this, SwFieldFuncPage, ListEnableListBoxHdl));
@@ -298,7 +298,7 @@ IMPL_LINK_NOARG_TYPED(SwFieldFuncPage, TypeHdl, ListBox&, void)
m_pValueED->SetText(OUString());
}
if(bDropDown)
- ListEnableHdl(0);
+ ListEnableHdl(*m_pListItemED);
if (m_pNameFT->GetText() != m_sOldNameFT)
m_pNameFT->SetText(m_sOldNameFT);
@@ -468,14 +468,14 @@ void SwFieldFuncPage::ListModifyHdl(Control* pControl)
}
bDropDownLBChanged = true;
m_pListItemsLB->SetUpdateMode(true);
- ListEnableHdl(0);
+ ListEnableHdl(*m_pListItemED);
}
IMPL_LINK_NOARG_TYPED(SwFieldFuncPage, ListEnableListBoxHdl, ListBox&, void)
{
- ListEnableHdl(0);
+ ListEnableHdl(*m_pListItemED);
}
-IMPL_LINK_NOARG(SwFieldFuncPage, ListEnableHdl)
+IMPL_LINK_NOARG_TYPED(SwFieldFuncPage, ListEnableHdl, Edit&, void)
{
//enable "Add" button when text is in the Edit that's not already member of the box
m_pListAddPB->Enable(!m_pListItemED->GetText().isEmpty() &&
@@ -485,8 +485,6 @@ IMPL_LINK_NOARG(SwFieldFuncPage, ListEnableHdl)
m_pListUpPB->Enable(bEnableButtons && (m_pListItemsLB->GetSelectEntryPos() > 0));
m_pListDownPB->Enable(bEnableButtons &&
(m_pListItemsLB->GetSelectEntryPos() < (m_pListItemsLB->GetEntryCount() - 1)));
-
- return 0;
}
// renew types in SelectionBox
@@ -602,7 +600,7 @@ bool SwFieldFuncPage::FillItemSet(SfxItemSet* )
InsertField( nTypeId, nSubType, aName, aVal, nFormat );
}
- ModifyHdl(NULL); // enable/disable Insert if applicable
+ ModifyHdl(*m_pNameED); // enable/disable Insert if applicable
return false;
}
@@ -652,7 +650,7 @@ void SwFieldFuncPage::FillUserData()
SetUserData(USER_DATA_VERSION ";" + OUString::number( nTypeSel ));
}
-IMPL_LINK_NOARG(SwFieldFuncPage, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwFieldFuncPage, ModifyHdl, Edit&, void)
{
const sal_Int32 nLen = m_pNameED->GetText().getLength();
@@ -664,8 +662,6 @@ IMPL_LINK_NOARG(SwFieldFuncPage, ModifyHdl)
bEnable = false;
EnableInsert( bEnable );
-
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx
index 96ce837c8f98..7effcb4d0929 100644
--- a/sw/source/ui/fldui/fldfunc.hxx
+++ b/sw/source/ui/fldui/fldfunc.hxx
@@ -66,14 +66,14 @@ class SwFieldFuncPage : public SwFieldPage
sal_uLong nOldFormat;
bool bDropDownLBChanged;
- DECL_LINK_TYPED(TypeHdl, ListBox&, void);
- DECL_LINK_TYPED(SelectHdl, ListBox&, void);
- DECL_LINK_TYPED(InsertMacroHdl, ListBox&, void);
- DECL_LINK(ModifyHdl, void *);
- DECL_LINK_TYPED(ListModifyReturnActionHdl, ReturnActionEdit&, void);
- DECL_LINK_TYPED(ListModifyButtonHdl, Button*, void);
- DECL_LINK( ListEnableHdl, void*);
- DECL_LINK_TYPED( ListEnableListBoxHdl, ListBox&, void);
+ DECL_LINK_TYPED( TypeHdl, ListBox&, void );
+ DECL_LINK_TYPED( SelectHdl, ListBox&, void );
+ DECL_LINK_TYPED( InsertMacroHdl, ListBox&, void );
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void );
+ DECL_LINK_TYPED( ListModifyReturnActionHdl, ReturnActionEdit&, void );
+ DECL_LINK_TYPED( ListModifyButtonHdl, Button*, void );
+ DECL_LINK_TYPED( ListEnableHdl, Edit&, void );
+ DECL_LINK_TYPED( ListEnableListBoxHdl, ListBox&, void );
void ListModifyHdl(Control*);
// select Macro
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 1c0bd9f74222..4b38523b2d73 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -408,7 +408,7 @@ IMPL_LINK_NOARG_TYPED(SwFieldRefPage, TypeHdl, ListBox&, void)
m_pFormat->Enable(bFormat);
SubTypeHdl();
- ModifyHdl(NULL);
+ ModifyHdl(*m_pNameED);
}
}
@@ -430,7 +430,7 @@ void SwFieldRefPage::SubTypeHdl()
if (!IsFieldEdit() || m_pSelectionLB->GetSelectEntryCount())
{
m_pNameED->SetText(m_pSelectionLB->GetSelectEntry());
- ModifyHdl(m_pNameED);
+ ModifyHdl(*m_pNameED);
}
break;
@@ -758,7 +758,7 @@ sal_Int32 SwFieldRefPage::FillFormatLB(sal_uInt16 nTypeId)
}
// Modify
-IMPL_LINK_NOARG(SwFieldRefPage, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwFieldRefPage, ModifyHdl, Edit&, void)
{
OUString aName(m_pNameED->GetText());
const bool bEmptyName = aName.isEmpty();
@@ -774,8 +774,6 @@ IMPL_LINK_NOARG(SwFieldRefPage, ModifyHdl)
EnableInsert(bEnable);
m_pSelectionLB->SelectEntry(aName);
-
- return 0;
}
bool SwFieldRefPage::FillItemSet(SfxItemSet* )
@@ -954,7 +952,7 @@ bool SwFieldRefPage::FillItemSet(SfxItemSet* )
InsertField( nTypeId, nSubType, aName, aVal, nFormat );
}
- ModifyHdl(); // enable/disable insert if applicable
+ ModifyHdl(*m_pNameED); // enable/disable insert if applicable
return false;
}
diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx
index d59d872758c7..f06f114d6585 100644
--- a/sw/source/ui/fldui/fldref.hxx
+++ b/sw/source/ui/fldui/fldref.hxx
@@ -63,7 +63,7 @@ class SwFieldRefPage : public SwFieldPage
DECL_LINK_TYPED(TypeHdl, ListBox&, void);
DECL_LINK_TYPED(SubTypeListBoxHdl, ListBox&, void);
DECL_LINK_TYPED(SubTypeTreeListBoxHdl, SvTreeListBox*, void);
- DECL_LINK(ModifyHdl, void * = 0);
+ DECL_LINK_TYPED(ModifyHdl, Edit&, void);
void SubTypeHdl();
void UpdateSubType();
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index b1366fbbefdb..3dcbf74e2cb6 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -561,7 +561,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox)
m_pChapterFrame->Show(bShowChapterFrame);
m_pInvisibleCB->Enable(bInvisible);
- ModifyHdl(); // apply/insert/delete status update
+ ModifyHdl(*m_pNameED); // apply/insert/delete status update
m_pNumFormatLB->SetUpdateMode(true);
m_pFormatLB->SetUpdateMode(true);
@@ -582,7 +582,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox)
if (nSelData != SIZE_MAX && pBox && !bInit)
{
m_pValueED->ReplaceSelected(m_pSelectionLB->GetSelectEntry());
- ModifyHdl();
+ ModifyHdl(*m_pNameED);
}
}
}
@@ -831,7 +831,7 @@ sal_Int32 SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId)
}
// Modify
-IMPL_LINK_NOARG(SwFieldVarPage, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwFieldVarPage, ModifyHdl, Edit&, void)
{
OUString sValue(m_pValueED->GetText());
bool bHasValue = !sValue.isEmpty();
@@ -952,8 +952,6 @@ IMPL_LINK_NOARG(SwFieldVarPage, ModifyHdl)
m_pNewDelTBX->EnableItem(m_nApplyId, bApply);
m_pNewDelTBX->EnableItem(m_nDeleteId, bDelete);
EnableInsert(bInsert);
-
- return 0;
}
IMPL_LINK_TYPED( SwFieldVarPage, TBClickHdl, ToolBox *, pBox, void )
@@ -1106,16 +1104,14 @@ IMPL_LINK_NOARG_TYPED(SwFieldVarPage, ChapterHdl, ListBox&, void)
m_pSeparatorED->Enable(bEnable);
m_pSeparatorFT->Enable(bEnable);
- SeparatorHdl();
+ SeparatorHdl(*m_pSeparatorED);
}
-IMPL_LINK_NOARG(SwFieldVarPage, SeparatorHdl)
+IMPL_LINK_NOARG_TYPED(SwFieldVarPage, SeparatorHdl, Edit&, void)
{
bool bEnable = !m_pSeparatorED->GetText().isEmpty() ||
m_pChapterLevelLB->GetSelectEntryPos() == 0;
EnableInsert(bEnable);
-
- return 0;
}
bool SwFieldVarPage::FillItemSet(SfxItemSet* )
diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx
index 435fef91c259..853edf348e74 100644
--- a/sw/source/ui/fldui/fldvar.hxx
+++ b/sw/source/ui/fldui/fldvar.hxx
@@ -76,12 +76,12 @@ class SwFieldVarPage : public SwFieldPage
sal_uLong nOldFormat;
bool bInit;
- DECL_LINK_TYPED(TypeHdl, ListBox&, void);
+ DECL_LINK_TYPED( TypeHdl, ListBox&, void );
DECL_LINK_TYPED( SubTypeListBoxHdl, ListBox&, void );
- DECL_LINK(ModifyHdl, void * = 0);
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void );
DECL_LINK_TYPED( TBClickHdl, ToolBox *, void );
- DECL_LINK_TYPED(ChapterHdl, ListBox&, void);
- DECL_LINK(SeparatorHdl, void * = 0);
+ DECL_LINK_TYPED( ChapterHdl, ListBox&, void );
+ DECL_LINK_TYPED( SeparatorHdl, Edit&, void );
void SubTypeHdl(ListBox*);
void UpdateSubType();
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 73874e4ddfdb..4a5d5b4002c9 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -481,9 +481,9 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
m_pDefaultVS->SetSelectHdl(LINK(this, SwColumnPage, SetDefaultsHdl));
- Link<> aCLNrLk = LINK(this, SwColumnPage, ColModify);
+ Link<Edit&,void> aCLNrLk = LINK(this, SwColumnPage, ColModify);
m_pCLNrEdt->SetModifyHdl(aCLNrLk);
- Link<> aLk = LINK(this, SwColumnPage, GapModify);
+ Link<Edit&,void> aLk = LINK(this, SwColumnPage, GapModify);
aDistEd1.SetModifyHdl(aLk);
aDistEd2.SetModifyHdl(aLk);
@@ -701,9 +701,9 @@ bool SwColumnPage::FillItemSet(SfxItemSet *rSet)
// update ColumnManager
IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgrListBox, ListBox&, void )
{
- UpdateColMgr(0);
+ UpdateColMgr(*m_pLineWidthEdit);
}
-IMPL_LINK_NOARG( SwColumnPage, UpdateColMgr )
+IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgr, Edit&, void )
{
long nGutterWidth = pColMgr->GetGutterWidth();
if(nCols > 1)
@@ -803,8 +803,6 @@ IMPL_LINK_NOARG( SwColumnPage, UpdateColMgr )
else
m_pPgeExampleWN->Invalidate();
}
-
- return 0;
}
void SwColumnPage::Init()
@@ -973,7 +971,12 @@ void SwColumnPage::SetLabels( sal_uInt16 nVis )
* the column number overwrites potential user's width settings; all columns
* are equally wide.
*/
-IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
+IMPL_LINK_TYPED( SwColumnPage, ColModify, Edit&, rEdit, void )
+{
+ ColModify(static_cast<NumericField*>(&rEdit));
+}
+
+void SwColumnPage::ColModify(NumericField* pNF)
{
nCols = (sal_uInt16)m_pCLNrEdt->GetValue();
//#107890# the handler is also called from LoseFocus()
@@ -995,8 +998,6 @@ IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
ResetColWidth();
Update(NULL);
}
-
- return 0;
}
/*
@@ -1005,10 +1006,11 @@ IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
* width the automatic calculation of the column width is overruled; only an
* alteration of the column number leads back to that default.
*/
-IMPL_LINK( SwColumnPage, GapModify, MetricField*, pMetricField )
+IMPL_LINK_TYPED( SwColumnPage, GapModify, Edit&, rEdit, void )
{
if (nCols < 2)
- return 0;
+ return;
+ MetricField* pMetricField = static_cast<MetricField*>(&rEdit);
PercentField *pField = m_aPercentFieldsMap[pMetricField];
assert(pField);
long nActValue = static_cast< long >(pField->DenormalizePercent(pField->GetValue(FUNIT_TWIP)));
@@ -1069,16 +1071,15 @@ IMPL_LINK( SwColumnPage, GapModify, MetricField*, pMetricField )
}
Update(pMetricField);
- return 0;
}
-IMPL_LINK( SwColumnPage, EdModify, MetricField *, pMetricField )
+IMPL_LINK_TYPED( SwColumnPage, EdModify, Edit&, rEdit, void )
{
+ MetricField * pMetricField = static_cast<MetricField*>(&rEdit);
PercentField *pField = m_aPercentFieldsMap[pMetricField];
assert(pField);
pModifiedField = pField;
Timeout();
- return 0;
}
// Handler behind the Checkbox for automatic width. When the box is checked
@@ -1219,7 +1220,7 @@ void SwColumnPage::Update(MetricField *pInteractiveField)
aDistEd1.SetText(OUString());
aDistEd2.SetText(OUString());
}
- UpdateColMgr(0);
+ UpdateColMgr(*m_pLineWidthEdit);
}
// Update Bsp
@@ -1265,7 +1266,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
{
pColMgr->SetActualWidth(nActWidth);
ColModify( 0 );
- UpdateColMgr( 0 );
+ UpdateColMgr( *m_pLineWidthEdit );
}
}
m_pFrmExampleWN->Hide();
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index d0435d892927..2008493285b1 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -130,7 +130,7 @@ SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) :
xNameAccess = xObjs->getEmbeddedObjects();
}
- Link<> aLk = LINK( this, SwCaptionDialog, ModifyHdl );
+ Link<Edit&,void> aLk = LINK( this, SwCaptionDialog, ModifyHdl );
m_pCategoryBox->SetModifyHdl( aLk );
m_pTextEdit->SetModifyHdl( aLk );
m_pNumberingSeparatorED->SetModifyHdl ( aLk );
@@ -246,7 +246,7 @@ SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) :
}
m_pPosBox->SelectEntryPos(1);
- m_pCategoryBox->GetModifyHdl().Call(m_pCategoryBox);
+ m_pCategoryBox->GetModifyHdl().Call(*m_pCategoryBox);
m_pSepEdit->SetText(our_aSepTextSave);
m_pTextEdit->GrabFocus();
@@ -310,7 +310,7 @@ IMPL_LINK_NOARG_TYPED(SwCaptionDialog, SelectHdl, ComboBox&, void)
DrawSample();
}
-IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwCaptionDialog, ModifyHdl, Edit&, void)
{
SwWrtShell &rSh = rView.GetWrtShell();
OUString sFieldTypeName = m_pCategoryBox->GetText();
@@ -330,7 +330,6 @@ IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl)
m_pSepText->Enable( !bNone );
m_pSepEdit->Enable( !bNone );
DrawSample();
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwCaptionDialog, CaptionHdl, Button*, void)
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index a2318f5ff99b..63145d2620c1 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -684,7 +684,7 @@ SwFrmPage::SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet)
m_pAtVertPosED->SetLoseFocusHdl( aLk3 );
m_pFollowTextFlowCB->SetClickHdl( LINK(this, SwFrmPage, RangeModifyClickHdl) );
- Link<> aLk = LINK(this, SwFrmPage, ModifyHdl);
+ Link<Edit&,void> aLk = LINK(this, SwFrmPage, ModifyHdl);
m_aWidthED.SetModifyHdl( aLk );
m_aHeightED.SetModifyHdl( aLk );
m_pAtHorzPosED->SetModifyHdl( aLk );
@@ -1788,9 +1788,9 @@ IMPL_LINK_TYPED( SwFrmPage, RelSizeClickHdl, Button *, p, void )
RangeModifyHdl(); // correct the values again
if (pBtn == m_pRelWidthCB)
- ModifyHdl(m_aWidthED.get());
+ ModifyHdl(*m_aWidthED.get());
else // pBtn == m_pRelHeightCB
- ModifyHdl(m_aHeightED.get());
+ ModifyHdl(*m_aHeightED.get());
}
// range check
@@ -2099,18 +2099,18 @@ IMPL_LINK_NOARG_TYPED(SwFrmPage, AutoHeightClickHdl, Button*, void)
HandleAutoCB( m_pAutoHeightCB->IsChecked(), *m_pHeightFT, *m_pHeightAutoFT, *m_aWidthED.get() );
}
-IMPL_LINK( SwFrmPage, ModifyHdl, Edit *, pEdit )
+IMPL_LINK_TYPED( SwFrmPage, ModifyHdl, Edit&, rEdit, void )
{
SwTwips nWidth = static_cast< SwTwips >(m_aWidthED.DenormalizePercent(m_aWidthED.GetValue(FUNIT_TWIP)));
SwTwips nHeight = static_cast< SwTwips >(m_aHeightED.DenormalizePercent(m_aHeightED.GetValue(FUNIT_TWIP)));
if ( m_pFixedRatioCB->IsChecked() )
{
- if (pEdit == m_aWidthED.get())
+ if (&rEdit == m_aWidthED.get())
{
nHeight = SwTwips((double)nWidth / fWidthHeightRatio);
m_aHeightED.SetPrcntValue(m_aHeightED.NormalizePercent(nHeight), FUNIT_TWIP);
}
- else if (pEdit == m_aHeightED.get())
+ else if (&rEdit == m_aHeightED.get())
{
nWidth = SwTwips((double)nHeight * fWidthHeightRatio);
m_aWidthED.SetPrcntValue(m_aWidthED.NormalizePercent(nWidth), FUNIT_TWIP);
@@ -2118,7 +2118,6 @@ IMPL_LINK( SwFrmPage, ModifyHdl, Edit *, pEdit )
}
fWidthHeightRatio = nHeight ? double(nWidth) / double(nHeight) : 1.0;
UpdateExample();
- return 0;
}
void SwFrmPage::UpdateExample()
@@ -3192,13 +3191,11 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet)
return bRet;
}
-IMPL_LINK_NOARG(SwFrmAddPage, EditModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwFrmAddPage, EditModifyHdl, Edit&, void)
{
bool bEnable = !pNameED->GetText().isEmpty();
pAltNameED->Enable(bEnable);
pAltNameFT->Enable(bEnable);
-
- return 0;
}
void SwFrmAddPage::SetFormatUsed(bool bFormatUsed)
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 282de8c9b02a..08e32af3e8f1 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -884,7 +884,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r
m_pInitialCapsCB->SetClickHdl(aLk);
m_pKeyAsEntryCB->SetClickHdl(aLk);
- Link<> aModifyLk = LINK(this, SwTOXSelectTabPage, ModifyHdl);
+ Link<Edit&,void> aModifyLk = LINK(this, SwTOXSelectTabPage, ModifyHdl);
m_pTitleED->SetModifyHdl(aModifyLk);
m_pLevelNF->SetModifyHdl(aModifyLk);
m_pSortAlgorithmLB->SetSelectHdl(LINK(this, SwTOXSelectTabPage, ModifyListBoxHdl));
@@ -1379,14 +1379,14 @@ IMPL_LINK_TYPED(SwTOXSelectTabPage, TOXTypeHdl, ListBox&, rBox, void)
{
ApplyTOXDescription();
}
- ModifyHdl(0);
+ ModifyHdl(*m_pTitleED);
}
IMPL_LINK_NOARG_TYPED(SwTOXSelectTabPage, ModifyListBoxHdl, ListBox&, void)
{
- ModifyHdl(0);
+ ModifyHdl(*m_pTitleED);
}
-IMPL_LINK_NOARG(SwTOXSelectTabPage, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwTOXSelectTabPage, ModifyHdl, Edit&, void)
{
if(!m_bWaitingInitialSettings)
{
@@ -1394,7 +1394,6 @@ IMPL_LINK_NOARG(SwTOXSelectTabPage, ModifyHdl)
SwMultiTOXTabDialog* pTOXDlg = static_cast<SwMultiTOXTabDialog*>(GetTabDialog());
pTOXDlg->CreateOrUpdateExample(pTOXDlg->GetCurrentTOXType().eType, TOX_PAGE_SELECT);
}
- return 0;
}
IMPL_LINK_TYPED(SwTOXSelectTabPage, CheckBoxHdl, Button*, pButton, void )
@@ -1423,7 +1422,7 @@ IMPL_LINK_TYPED(SwTOXSelectTabPage, CheckBoxHdl, Button*, pButton, void )
m_pUseDashCB->Enable(m_pCollectSameCB->IsChecked() && !m_pUseFFCB->IsChecked());
m_pCaseSensitiveCB->Enable(m_pCollectSameCB->IsChecked());
}
- ModifyHdl(0);
+ ModifyHdl(*m_pTitleED);
};
IMPL_LINK_NOARG_TYPED(SwTOXSelectTabPage, RadioButtonHdl, Button*, void)
@@ -1433,7 +1432,7 @@ IMPL_LINK_NOARG_TYPED(SwTOXSelectTabPage, RadioButtonHdl, Button*, void)
m_pCaptionSequenceLB->Enable(bEnable);
m_pDisplayTypeFT->Enable(bEnable);
m_pDisplayTypeLB->Enable(bEnable);
- ModifyHdl(0);
+ ModifyHdl(*m_pTitleED);
}
IMPL_LINK_TYPED(SwTOXSelectTabPage, LanguageListBoxHdl, ListBox&, rBox, void)
@@ -1476,7 +1475,7 @@ void SwTOXSelectTabPage::LanguageHdl( ListBox* pBox )
m_pSortAlgorithmLB->SelectEntryPos( 0 );
if(pBox)
- ModifyHdl(0);
+ ModifyHdl(*m_pTitleED);
};
IMPL_LINK_TYPED(SwTOXSelectTabPage, AddStylesHdl, Button*, pButton, void)
@@ -1486,7 +1485,7 @@ IMPL_LINK_TYPED(SwTOXSelectTabPage, AddStylesHdl, Button*, pButton, void)
aStyleArr);
pDlg->Execute();
pDlg.disposeAndClear();
- ModifyHdl(0);
+ ModifyHdl(*m_pTitleED);
}
IMPL_LINK_TYPED(SwTOXSelectTabPage, MenuEnableHdl, Menu*, pMenu, bool)
@@ -2575,9 +2574,9 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, ChapterInfoHdl, ListBox&, rBox, void)
}
}
-IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField)
+IMPL_LINK_TYPED(SwTOXEntryTabPage, ChapterInfoOutlineHdl, Edit&, rEdit, void)
{
- const sal_uInt16 nLevel = static_cast<sal_uInt8>(pField->GetValue());
+ const sal_uInt16 nLevel = static_cast<sal_uInt8>(static_cast<NumericField&>(rEdit).GetValue());
Control* pCtrl = m_pTokenWIN->GetActiveControl();
OSL_ENSURE(pCtrl, "no active control?");
@@ -2585,7 +2584,6 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField)
static_cast<SwTOXButton*>(pCtrl)->SetOutlineLevel(nLevel);
ModifyHdl(0);
- return 0;
}
IMPL_LINK_TYPED(SwTOXEntryTabPage, NumberFormatHdl, ListBox&, rBox, void)
@@ -2604,8 +2602,9 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, NumberFormatHdl, ListBox&, rBox, void)
}
}
-IMPL_LINK(SwTOXEntryTabPage, TabPosHdl, MetricField*, pField)
+IMPL_LINK_TYPED(SwTOXEntryTabPage, TabPosHdl, Edit&, rEdit, void)
{
+ MetricField* pField = static_cast<MetricField*>(&rEdit);
Control* pCtrl = m_pTokenWIN->GetActiveControl();
OSL_ENSURE(pCtrl && WINDOW_EDIT != pCtrl->GetType() &&
TOKEN_TAB_STOP == static_cast<SwTOXButton*>(pCtrl)->GetFormToken().eTokenType,
@@ -2616,10 +2615,9 @@ IMPL_LINK(SwTOXEntryTabPage, TabPosHdl, MetricField*, pField)
pField->Denormalize( pField->GetValue( FUNIT_TWIP ))));
}
ModifyHdl(0);
- return 0;
}
-IMPL_LINK(SwTOXEntryTabPage, FillCharHdl, ComboBox*, pBox)
+IMPL_LINK_TYPED(SwTOXEntryTabPage, FillCharHdl, Edit&, rBox, void)
{
Control* pCtrl = m_pTokenWIN->GetActiveControl();
OSL_ENSURE(pCtrl && WINDOW_EDIT != pCtrl->GetType() &&
@@ -2628,14 +2626,13 @@ IMPL_LINK(SwTOXEntryTabPage, FillCharHdl, ComboBox*, pBox)
if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
{
sal_Unicode cSet;
- if( !pBox->GetText().isEmpty() )
- cSet = pBox->GetText()[0];
+ if( !rBox.GetText().isEmpty() )
+ cSet = rBox.GetText()[0];
else
cSet = ' ';
static_cast<SwTOXButton*>(pCtrl)->SetFillChar( cSet );
}
ModifyHdl(0);
- return 0;
}
IMPL_LINK_TYPED(SwTOXEntryTabPage, AutoRightHdl, Button*, pBox, void)
@@ -3459,12 +3456,11 @@ bool SwTokenWindow::CreateQuickHelp(Control* pCtrl,
return bRet;
}
-IMPL_LINK(SwTokenWindow, EditResize, Edit*, pEdit)
+IMPL_LINK_TYPED(SwTokenWindow, EditResize, Edit&, rEdit, void)
{
- static_cast<SwTOXEdit*>(pEdit)->AdjustSize();
+ static_cast<SwTOXEdit*>(&rEdit)->AdjustSize();
AdjustPositions();
aModifyHdl.Call(0);
- return 0;
}
IMPL_LINK_TYPED(SwTokenWindow, NextItemHdl, SwTOXEdit&, rEdit, void)
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 331bb63ba67d..7f5108e0c577 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -144,8 +144,8 @@ SwIndexMarkPane::SwIndexMarkPane(Dialog &rDialog, bool bNewDlg,
m_pTypeDCB->SetSelectHdl(LINK(this,SwIndexMarkPane, ModifyListBoxHdl));
m_pKey1DCB->SetModifyHdl(LINK(this,SwIndexMarkPane, KeyDCBModifyHdl));
m_pKey2DCB->SetModifyHdl(LINK(this,SwIndexMarkPane, KeyDCBModifyHdl));
- m_pCloseBT->SetClickHdl(LINK(this,SwIndexMarkPane, CloseHdl));
- m_pEntryED->SetModifyHdl(LINK(this,SwIndexMarkPane, ModifyHdl));
+ m_pCloseBT->SetClickHdl(LINK(this,SwIndexMarkPane, CloseHdl));
+ m_pEntryED->SetModifyHdl(LINK(this,SwIndexMarkPane, ModifyEditHdl));
m_pNewBT->SetClickHdl(LINK(this, SwIndexMarkPane, NewUserIdxHdl));
m_pApplyToAllCB->SetClickHdl(LINK(this, SwIndexMarkPane, SearchTypeHdl));
m_pPhoneticED0->SetModifyHdl(LINK(this,SwIndexMarkPane, PhoneticEDModifyHdl));
@@ -550,7 +550,7 @@ class SwNewUserIdxDlg : public ModalDialog
SwIndexMarkPane* m_pDlg;
- DECL_LINK( ModifyHdl, Edit*);
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void);
public:
explicit SwNewUserIdxDlg(SwIndexMarkPane* pPane)
@@ -575,10 +575,9 @@ class SwNewUserIdxDlg : public ModalDialog
OUString GetName(){return m_pNameED->GetText();}
};
-IMPL_LINK( SwNewUserIdxDlg, ModifyHdl, Edit*, pEdit)
+IMPL_LINK_TYPED( SwNewUserIdxDlg, ModifyHdl, Edit&, rEdit, void)
{
- m_pOKPB->Enable(!pEdit->GetText().isEmpty() && !m_pDlg->IsTOXType(pEdit->GetText()));
- return 0;
+ m_pOKPB->Enable(!rEdit.GetText().isEmpty() && !m_pDlg->IsTOXType(rEdit.GetText()));
}
IMPL_LINK_NOARG_TYPED(SwIndexMarkPane, NewUserIdxHdl, Button*, void)
@@ -627,7 +626,11 @@ IMPL_LINK_TYPED( SwIndexMarkPane, ModifyListBoxHdl, ListBox&, rBox, void )
{
ModifyHdl(&rBox);
}
-IMPL_LINK( SwIndexMarkPane, ModifyHdl, void*, pBox )
+IMPL_LINK_TYPED( SwIndexMarkPane, ModifyEditHdl, Edit&, rEdit, void )
+{
+ ModifyHdl(&rEdit);
+}
+void SwIndexMarkPane::ModifyHdl(Control* pBox)
{
if (m_pTypeDCB == pBox)
{
@@ -699,7 +702,6 @@ IMPL_LINK( SwIndexMarkPane, ModifyHdl, void*, pBox )
}
m_pOKBT->Enable(!pSh->HasReadonlySel() &&
(!m_pEntryED->GetText().isEmpty() || pSh->GetCrsrCnt(false)));
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwIndexMarkPane, NextHdl, Button*, void)
@@ -848,26 +850,26 @@ void SwIndexMarkPane::UpdateDialog()
}
// Remind whether the edit boxes for Phonetic reading are changed manually
-IMPL_LINK( SwIndexMarkPane, PhoneticEDModifyHdl, Edit *, pEdit )
+IMPL_LINK_TYPED( SwIndexMarkPane, PhoneticEDModifyHdl, Edit&, rEdit, void )
{
- if (m_pPhoneticED0 == pEdit)
+ if (m_pPhoneticED0 == &rEdit)
{
- bPhoneticED0_ChangedByUser = !pEdit->GetText().isEmpty();
+ bPhoneticED0_ChangedByUser = !rEdit.GetText().isEmpty();
}
- else if (m_pPhoneticED1 == pEdit)
+ else if (m_pPhoneticED1 == &rEdit)
{
- bPhoneticED1_ChangedByUser = !pEdit->GetText().isEmpty();
+ bPhoneticED1_ChangedByUser = !rEdit.GetText().isEmpty();
}
- else if (m_pPhoneticED2 == pEdit)
+ else if (m_pPhoneticED2 == &rEdit)
{
- bPhoneticED2_ChangedByUser = !pEdit->GetText().isEmpty();
+ bPhoneticED2_ChangedByUser = !rEdit.GetText().isEmpty();
}
- return 0;
}
// Enable Disable of the 2nd key
-IMPL_LINK( SwIndexMarkPane, KeyDCBModifyHdl, ComboBox *, pBox )
+IMPL_LINK_TYPED( SwIndexMarkPane, KeyDCBModifyHdl, Edit&, rEdit, void )
{
+ ComboBox* pBox = static_cast<ComboBox*>(&rEdit);
if (m_pKey1DCB == pBox)
{
bool bEnable = !pBox->GetText().isEmpty();
@@ -917,8 +919,6 @@ IMPL_LINK( SwIndexMarkPane, KeyDCBModifyHdl, ComboBox *, pBox )
m_pPhoneticED1->Enable(bKey1HasText && bIsPhoneticReadingEnabled);
m_pPhoneticFT2->Enable(bKey2HasText && bIsPhoneticReadingEnabled);
m_pPhoneticED2->Enable(bKey2HasText && bIsPhoneticReadingEnabled);
-
- return 0;
}
SwIndexMarkPane::~SwIndexMarkPane()
@@ -993,7 +993,7 @@ class SwCreateAuthEntryDlg_Impl : public ModalDialog
bool m_bNameAllowed;
DECL_LINK_TYPED(IdentifierHdl, ComboBox&, void);
- DECL_LINK(ShortNameHdl, Edit*);
+ DECL_LINK_TYPED(ShortNameHdl, Edit&, void);
DECL_LINK_TYPED(EnableHdl, ListBox&, void);
public:
@@ -1333,18 +1333,17 @@ IMPL_LINK_TYPED(SwAuthorMarkPane, ChangeSourceHdl, Button*, pButton, void)
CompEntryHdl(*m_pEntryLB);
}
-IMPL_LINK(SwAuthorMarkPane, EditModifyHdl, Edit*, pEdit)
+IMPL_LINK_TYPED(SwAuthorMarkPane, EditModifyHdl, Edit&, rEdit, void)
{
Link<Edit*,bool> aAllowed = LINK(this, SwAuthorMarkPane, IsEntryAllowedHdl);
- bool bResult = aAllowed.Call(pEdit);
+ bool bResult = aAllowed.Call(&rEdit);
m_pActionBT->Enable(bResult);
if(bResult)
{
- OUString sEntry(pEdit->GetText());
+ OUString sEntry(rEdit.GetText());
m_sFields[AUTH_FIELD_IDENTIFIER] = sEntry;
m_sCreatedEntry[AUTH_FIELD_IDENTIFIER] = sEntry;
}
- return 0;
};
IMPL_LINK_TYPED(SwAuthorMarkPane, IsEntryAllowedHdl, Edit*, pEdit, bool)
@@ -1579,15 +1578,14 @@ IMPL_LINK_TYPED(SwCreateAuthEntryDlg_Impl, IdentifierHdl, ComboBox&, rBox, void)
}
}
-IMPL_LINK(SwCreateAuthEntryDlg_Impl, ShortNameHdl, Edit*, pEdit)
+IMPL_LINK_TYPED(SwCreateAuthEntryDlg_Impl, ShortNameHdl, Edit&, rEdit, void)
{
if(aShortNameCheckLink.IsSet())
{
- bool bEnable = aShortNameCheckLink.Call(pEdit);
+ bool bEnable = aShortNameCheckLink.Call(&rEdit);
m_bNameAllowed |= bEnable;
m_pOKBT->Enable(pTypeListBox->GetSelectEntryCount() && bEnable);
}
- return 0;
}
IMPL_LINK_TYPED(SwCreateAuthEntryDlg_Impl, EnableHdl, ListBox&, rBox, void)
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 40a7e6b2db66..3dd6d2e4c3e5 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -33,14 +33,15 @@
const OUString BookmarkCombo::aForbiddenChars("/\\@*?\";,#");
-IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox )
+IMPL_LINK_TYPED( SwInsertBookmarkDlg, ModifyHdl, Edit&, rEdit, void )
{
- bool bSelEntries = pBox->GetSelectEntryCount() != 0;
+ BookmarkCombo& rBox = static_cast<BookmarkCombo&>(rEdit);
+ bool bSelEntries = rBox.GetSelectEntryCount() != 0;
// if a string has been pasted from the clipboard then
// there may be illegal characters in the box
if(!bSelEntries)
{
- OUString sTmp = pBox->GetText();
+ OUString sTmp = rBox.GetText();
const sal_Int32 nLen = sTmp.getLength();
OUString sMsg;
for(sal_Int32 i = 0; i < BookmarkCombo::aForbiddenChars.getLength(); i++)
@@ -52,7 +53,7 @@ IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox )
}
if(sTmp.getLength() != nLen)
{
- pBox->SetText(sTmp);
+ rBox.SetText(sTmp);
ScopedVclPtr<InfoBox>::Create(this, sRemoveWarning+sMsg)->Execute();
}
@@ -60,8 +61,6 @@ IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox )
m_pOkBtn->Enable(!bSelEntries); // new text mark
m_pDeleteBtn->Enable(bSelEntries); // deletable?
-
- return 0;
}
// callback to delete a text mark
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index f14a6b17930d..24cbf3ce654e 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -322,9 +322,9 @@ IMPL_LINK_NOARG_TYPED(SwGlossaryGroupDlg, RenameHdl, Button*, void)
IMPL_LINK_NOARG_TYPED(SwGlossaryGroupDlg, ModifyListBoxHdl, ListBox&, void)
{
- ModifyHdl(0);
+ ModifyHdl(*m_pNameED);
}
-IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwGlossaryGroupDlg, ModifyHdl, Edit&, void)
{
OUString sEntry(m_pNameED->GetText());
bool bEnableNew = true;
@@ -373,7 +373,6 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl)
m_pDelPB->Enable(bEnableDel);
m_pNewPB->Enable(bEnableNew);
m_pRenamePB->Enable(bEnableNew && pEntry);
- return 0;
}
bool SwGlossaryGroupDlg::IsDeleteAllowed(const OUString &rGroup)
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 95cecccec87b..3ab52b95f415 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -124,7 +124,7 @@ class SwNewGlosNameDlg : public ModalDialog
VclPtr<Edit> m_pOldShort;
protected:
- DECL_LINK( Modify, Edit * );
+ DECL_LINK_TYPED( Modify, Edit&, void );
DECL_LINK_TYPED(Rename, Button*, void);
public:
@@ -305,7 +305,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, GrpSelect, SvTreeListBox *, pBox, void )
ShowAutoText("", "");
}
// update controls
- NameModify(m_pShortNameEdit);
+ NameModify(*m_pShortNameEdit);
if( SfxRequest::HasMacroRecorder( pSh->GetView().GetViewFrame() ) )
{
SfxRequest aReq( pSh->GetView().GetViewFrame(), FN_SET_ACT_GLOSSARY );
@@ -370,18 +370,18 @@ SvTreeListEntry* SwGlossaryDlg::DoesBlockExist(const OUString& rBlock,
return 0;
}
-IMPL_LINK( SwGlossaryDlg, NameModify, Edit *, pEdit )
+IMPL_LINK_TYPED( SwGlossaryDlg, NameModify, Edit&, rEdit, void )
{
const OUString aName(m_pNameED->GetText());
- bool bNameED = pEdit == m_pNameED;
+ bool bNameED = &rEdit == m_pNameED;
if( aName.isEmpty() )
{
if(bNameED)
m_pShortNameEdit->SetText(aName);
m_pInsertBtn->Enable(false);
- return 0;
+ return;
}
- const bool bNotFound = !DoesBlockExist(aName, bNameED ? OUString() : pEdit->GetText());
+ const bool bNotFound = !DoesBlockExist(aName, bNameED ? OUString() : rEdit.GetText());
if(bNameED)
{
// did the text get in to the Listbbox in the Edit with a click?
@@ -407,7 +407,6 @@ IMPL_LINK( SwGlossaryDlg, NameModify, Edit *, pEdit )
m_pInsertBtn->Enable(bEnable);
}
}
- return 0;
}
IMPL_LINK_TYPED( SwGlossaryDlg, NameDoubleClick, SvTreeListBox*, pBox, bool )
@@ -479,7 +478,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool )
pChild->SetUserData(new OUString(aShortName));
m_pNameED->SetText(aStr);
m_pShortNameEdit->SetText(aShortName);
- NameModify(m_pNameED); // for toggling the buttons
+ NameModify(*m_pNameED); // for toggling the buttons
if( SfxRequest::HasMacroRecorder( pSh->GetView().GetViewFrame() ) )
{
@@ -536,7 +535,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool )
m_pCategoryBox->GetModel()->Remove(pChild);
m_pNameED->SetText(OUString());
- NameModify(m_pNameED);
+ NameModify(*m_pNameED);
}
}
}
@@ -794,18 +793,17 @@ IMPL_LINK_NOARG_TYPED(SwGlossaryDlg, EditHdl, MenuButton *, void)
}
// KeyInput for ShortName - Edits without Spaces
-IMPL_LINK( SwNewGlosNameDlg, Modify, Edit *, pBox )
+IMPL_LINK_TYPED( SwNewGlosNameDlg, Modify, Edit&, rBox, void )
{
OUString aName(m_pNewName->GetText());
SwGlossaryDlg* pDlg = static_cast<SwGlossaryDlg*>(GetParent());
- if (pBox == m_pNewName)
+ if (&rBox == m_pNewName)
m_pNewShort->SetText( lcl_GetValidShortCut( aName ) );
bool bEnable = !aName.isEmpty() && !m_pNewShort->GetText().isEmpty() &&
(!pDlg->DoesBlockExist(aName, m_pNewShort->GetText())
|| aName == m_pOldName->GetText());
m_pOk->Enable(bEnable);
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwNewGlosNameDlg, Rename, Button*, void)
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 8d81fbb8fc9f..b092ed925ca2 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -88,12 +88,10 @@ IMPL_LINK_NOARG_TYPED(SwInsFootNoteDlg, NumberCharHdl, Button*, void)
m_pOkBtn->Enable( !m_pNumberCharEdit->GetText().isEmpty() || bExtCharAvailable );
}
-IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberEditHdl)
+IMPL_LINK_NOARG_TYPED(SwInsFootNoteDlg, NumberEditHdl, Edit&, void)
{
m_pNumberCharBtn->Check();
m_pOkBtn->Enable( !m_pNumberCharEdit->GetText().isEmpty() );
-
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwInsFootNoteDlg, NumberAutoBtnHdl, Button*, void)
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 1eb0e1413f94..2589db7bbb9d 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -161,7 +161,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw)
// Line Numbering
m_pNumberingOnCB->SetClickHdl(LINK(this, SwLineNumberingDlg, LineOnOffHdl));
m_pDivisorED->SetModifyHdl(LINK(this, SwLineNumberingDlg, ModifyHdl));
- ModifyHdl();
+ ModifyHdl(*m_pDivisorED);
LineOnOffHdl();
get<PushButton>("ok")->SetClickHdl(LINK(this, SwLineNumberingDlg, OKHdl));
@@ -255,15 +255,13 @@ IMPL_LINK_NOARG_TYPED(SwLineNumberingDlg, OKHdl, Button*, void)
}
// modify
-IMPL_LINK_NOARG(SwLineNumberingDlg, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwLineNumberingDlg, ModifyHdl, Edit&, void)
{
bool bEnable = m_pNumberingOnCB->IsChecked() && !m_pDivisorED->GetText().isEmpty();
m_pDivIntervalFT->Enable(bEnable);
m_pDivIntervalNF->Enable(bEnable);
m_pDivRowsFT->Enable(bEnable);
-
- return 0;
}
// On/Off
@@ -271,7 +269,7 @@ IMPL_LINK_NOARG_TYPED(SwLineNumberingDlg, LineOnOffHdl, Button*, void)
{
bool bEnable = m_pNumberingOnCB->IsChecked();
m_pBodyContent->Enable(bEnable);
- ModifyHdl();
+ ModifyHdl(*m_pDivisorED);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index b44a714553e8..f88b043c5ab9 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -63,7 +63,7 @@ class SwNumNamesDlg : public ModalDialog
VclPtr<ListBox> m_pFormBox;
VclPtr<OKButton> m_pOKBtn;
- DECL_LINK( ModifyHdl, Edit * );
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void );
DECL_LINK_TYPED( SelectHdl, ListBox&, void );
DECL_LINK_TYPED( DoubleClickHdl, ListBox&, void );
@@ -119,10 +119,9 @@ void SwNumNamesDlg::SetUserNames(const OUString *pList[])
}
// unlock OK-Button when text is in Edit
-IMPL_LINK( SwNumNamesDlg, ModifyHdl, Edit *, pBox )
+IMPL_LINK_TYPED( SwNumNamesDlg, ModifyHdl, Edit&, rBox, void )
{
- m_pOKBtn->Enable(!pBox->GetText().isEmpty());
- return 0;
+ m_pOKBtn->Enable(!rBox.GetText().isEmpty());
}
// DoubleClickHdl
@@ -583,7 +582,7 @@ IMPL_LINK_TYPED( SwOutlineSettingsTabPage, LevelHdl, ListBox&, rBox, void )
Update();
}
-IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pField )
+IMPL_LINK_TYPED( SwOutlineSettingsTabPage, ToggleComplete, Edit&, rEdit, void )
{
sal_uInt16 nMask = 1;
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
@@ -591,14 +590,13 @@ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pField )
if(nActLevel & nMask)
{
SwNumFormat aNumFormat(pNumRule->Get(i));
- aNumFormat.SetIncludeUpperLevels( std::min( (sal_uInt8)pField->GetValue(),
+ aNumFormat.SetIncludeUpperLevels( std::min( (sal_uInt8)static_cast<NumericField&>(rEdit).GetValue(),
(sal_uInt8)(i + 1)) );
pNumRule->Set(i, aNumFormat);
}
nMask <<= 1;
}
SetModified();
- return 0;
}
IMPL_LINK_TYPED( SwOutlineSettingsTabPage, CollSelect, ListBox&, rBox, void )
@@ -667,7 +665,7 @@ IMPL_LINK_TYPED( SwOutlineSettingsTabPage, NumberSelect, ListBox&, rBox, void )
SetModified();
}
-IMPL_LINK_NOARG(SwOutlineSettingsTabPage, DelimModify)
+IMPL_LINK_NOARG_TYPED(SwOutlineSettingsTabPage, DelimModify, Edit&, void)
{
sal_uInt16 nMask = 1;
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
@@ -682,10 +680,9 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, DelimModify)
nMask <<= 1;
}
SetModified();
- return 0;
}
-IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pField )
+IMPL_LINK_TYPED( SwOutlineSettingsTabPage, StartModified, Edit&, rEdit, void )
{
sal_uInt16 nMask = 1;
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
@@ -693,13 +690,12 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pField )
if(nActLevel & nMask)
{
SwNumFormat aNumFormat(pNumRule->Get(i));
- aNumFormat.SetStart( (sal_uInt16)pField->GetValue() );
+ aNumFormat.SetStart( (sal_uInt16)static_cast<NumericField&>(rEdit).GetValue() );
pNumRule->Set(i, aNumFormat);
}
nMask <<= 1;
}
SetModified();
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwOutlineSettingsTabPage, CharFormatHdl, ListBox&, void)
@@ -866,7 +862,7 @@ void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType
SVX_NUM_CHARS_LOWER_LETTER_N == nNumberingType;
m_pStartEdit->SetMin(bNoZeroAllowed ? 1 : 0);
if(bIsNull && bNoZeroAllowed)
- m_pStartEdit->GetModifyHdl().Call(m_pStartEdit);
+ m_pStartEdit->GetModifyHdl().Call(*m_pStartEdit);
}
static long lcl_DrawBullet(vcl::RenderContext* pVDev, const SwNumFormat& rFormat, long nXStart, long nYStart, const Size& rSize)
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 07a77808b10e..cf875f1ce3e6 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -84,15 +84,13 @@ IMPL_LINK_NOARG_TYPED(SwFootNotePage, HeightModify, Control&, void)
FUNIT_TWIP);
}
-IMPL_LINK_NOARG(SwFootNotePage, LineWidthChanged_Impl)
+IMPL_LINK_NOARG_TYPED(SwFootNotePage, LineWidthChanged_Impl, Edit&, void)
{
sal_Int64 nVal = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
m_pLineWidthEdit->GetValue( ),
m_pLineWidthEdit->GetDecimalDigits( ),
m_pLineWidthEdit->GetUnit(), MAP_TWIP ));
m_pLineTypeBox->SetWidth( nVal );
-
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwFootNotePage, LineColorSelected_Impl, ListBox&, void)
diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx
index bea63ffdec9f..36286e35af1a 100644
--- a/sw/source/ui/table/colwd.cxx
+++ b/sw/source/ui/table/colwd.cxx
@@ -31,13 +31,12 @@
#include <cmdid.h>
#include <table.hrc>
-IMPL_LINK_NOARG(SwTableWidthDlg, LoseFocusHdl)
+IMPL_LINK_NOARG_TYPED(SwTableWidthDlg, LoseFocusHdl, Edit&, void)
{
sal_uInt16 nId = (sal_uInt16)m_pColNF->GetValue()-1;
const SwTwips lWidth = rFnc.GetColWidth(nId);
m_pWidthMF->SetMax(m_pWidthMF->Normalize(rFnc.GetMaxColWidth(nId)), FUNIT_TWIP);
m_pWidthMF->SetValue(m_pWidthMF->Normalize(lWidth), FUNIT_TWIP);
- return 0;
}
SwTableWidthDlg::SwTableWidthDlg(vcl::Window *pParent, SwTableFUNC &rTableFnc )
@@ -62,7 +61,7 @@ SwTableWidthDlg::SwTableWidthDlg(vcl::Window *pParent, SwTableFUNC &rTableFnc )
m_pWidthMF->SetMin(m_pWidthMF->Normalize(rFnc.GetColWidth(0)), FUNIT_TWIP);
m_pColNF->SetMax(rFnc.GetColCount() +1 );
m_pColNF->SetModifyHdl(LINK(this,SwTableWidthDlg, LoseFocusHdl));
- LoseFocusHdl();
+ LoseFocusHdl(*m_pColNF);
}
SwTableWidthDlg::~SwTableWidthDlg()
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index 4543d83df4c6..8b4c845d3af9 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -156,22 +156,21 @@ void SwInsTableDlg::dispose()
SfxModalDialog::dispose();
}
-IMPL_LINK( SwInsTableDlg, ModifyName, Edit *, pEdit )
+IMPL_LINK_TYPED( SwInsTableDlg, ModifyName, Edit&, rEdit, void )
{
- OUString sTableName = pEdit->GetText();
+ OUString sTableName = rEdit.GetText();
if (sTableName.indexOf(' ') != -1)
{
sTableName = sTableName.replaceAll(" ", "");
- pEdit->SetText(sTableName);
+ rEdit.SetText(sTableName);
}
m_pInsertBtn->Enable(pShell->GetTableStyle( sTableName ) == 0);
- return 0;
}
-IMPL_LINK( SwInsTableDlg, ModifyRowCol, NumericField *, pField )
+IMPL_LINK_TYPED( SwInsTableDlg, ModifyRowCol, Edit&, rEdit, void )
{
- if(pField == m_pColNF)
+ if(&rEdit == m_pColNF)
{
sal_Int64 nCol = m_pColNF->GetValue();
if(!nCol)
@@ -196,9 +195,7 @@ IMPL_LINK( SwInsTableDlg, ModifyRowCol, NumericField *, pField )
else if( nActVal < nEnteredValRepeatHeaderNF )
m_pRepeatHeaderNF->SetValue( ( nEnteredValRepeatHeaderNF < nMax )? nEnteredValRepeatHeaderNF : nMax );
}
- return 0;
}
-
IMPL_LINK_TYPED( SwInsTableDlg, AutoFormatHdl, Button*, pButton, void )
{
SwAbstractDialogFactory* pFact = swui::GetFactory();
@@ -221,10 +218,9 @@ IMPL_LINK_NOARG_TYPED(SwInsTableDlg, ReapeatHeaderCheckBoxHdl, Button*, void)
m_pRepeatGroup->Enable(m_pHeaderCB->IsChecked() && m_pRepeatHeaderCB->IsChecked());
}
-IMPL_LINK_NOARG(SwInsTableDlg, ModifyRepeatHeaderNF_Hdl)
+IMPL_LINK_NOARG_TYPED(SwInsTableDlg, ModifyRepeatHeaderNF_Hdl, Edit&, void)
{
nEnteredValRepeatHeaderNF = m_pRepeatHeaderNF->GetValue();
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx
index 4442f018552e..9c05b4ffcad9 100644
--- a/sw/source/ui/utlui/swrenamexnameddlg.cxx
+++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx
@@ -99,16 +99,15 @@ IMPL_LINK_NOARG_TYPED(SwRenameXNamedDlg, OkHdl, Button*, void)
EndDialog(RET_OK);
}
-IMPL_LINK(SwRenameXNamedDlg, ModifyHdl, Edit*, pEdit)
+IMPL_LINK_TYPED(SwRenameXNamedDlg, ModifyHdl, Edit&, rEdit, void)
{
- OUString sTmp(pEdit->GetText());
+ OUString sTmp(rEdit.GetText());
m_pOk->Enable(!sTmp.isEmpty()
&& !xNameAccess->hasByName(sTmp)
&& (!xSecondAccess.is() || !xSecondAccess->hasByName(sTmp))
&& (!xThirdAccess.is() || !xThirdAccess->hasByName(sTmp))
);
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/bookmark.hxx b/sw/source/uibase/inc/bookmark.hxx
index 7bd11cc8d7a1..7a94dc3473eb 100644
--- a/sw/source/uibase/inc/bookmark.hxx
+++ b/sw/source/uibase/inc/bookmark.hxx
@@ -55,7 +55,7 @@ class SwInsertBookmarkDlg: public SvxStandardDialog
SwWrtShell &rSh;
SfxRequest& rReq;
- DECL_LINK(ModifyHdl, BookmarkCombo *);
+ DECL_LINK_TYPED(ModifyHdl, Edit&, void);
DECL_LINK_TYPED(DeleteHdl, Button*, void);
virtual void Apply() override;
diff --git a/sw/source/uibase/inc/break.hxx b/sw/source/uibase/inc/break.hxx
index 9bf6bfd340af..193db7105c78 100644
--- a/sw/source/uibase/inc/break.hxx
+++ b/sw/source/uibase/inc/break.hxx
@@ -54,7 +54,7 @@ class SwBreakDlg: public SvxStandardDialog
DECL_LINK_TYPED( ClickHdl, Button*, void );
DECL_LINK_TYPED( SelectHdl, ListBox&, void );
DECL_LINK_TYPED( PageNumHdl, Button*, void );
- DECL_LINK(PageNumModifyHdl, void *);
+ DECL_LINK_TYPED(PageNumModifyHdl, Edit&, void);
DECL_LINK_TYPED(OkHdl, Button*, void);
void CheckEnable();
diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx
index 28298d8d8c7e..d956356ba852 100644
--- a/sw/source/uibase/inc/column.hxx
+++ b/sw/source/uibase/inc/column.hxx
@@ -139,15 +139,16 @@ class SwColumnPage : public SfxTabPage
bool bLockUpdate;
// Handler
- DECL_LINK( ColModify, NumericField * );
- DECL_LINK( GapModify, MetricField * );
- DECL_LINK( EdModify, MetricField * );
+ DECL_LINK_TYPED( ColModify, Edit&, void );
+ void ColModify(NumericField*);
+ DECL_LINK_TYPED( GapModify, Edit&, void );
+ DECL_LINK_TYPED( EdModify, Edit&, void );
DECL_LINK_TYPED( AutoWidthHdl, Button *, void );
DECL_LINK_TYPED( SetDefaultsHdl, ValueSet *, void );
- DECL_LINK_TYPED(Up, Button *, void);
- DECL_LINK_TYPED(Down, Button *, void);
- DECL_LINK( UpdateColMgr, void* );
+ DECL_LINK_TYPED( Up, Button *, void );
+ DECL_LINK_TYPED( Down, Button *, void );
+ DECL_LINK_TYPED( UpdateColMgr, Edit&, void );
DECL_LINK_TYPED( UpdateColMgrListBox, ListBox&, void );
void Timeout();
diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx
index de5e9b4d0164..53848f34cedb 100644
--- a/sw/source/uibase/inc/cption.hxx
+++ b/sw/source/uibase/inc/cption.hxx
@@ -96,7 +96,7 @@ class SwCaptionDialog : public SvxStandardDialog
DECL_LINK_TYPED(SelectHdl, ComboBox&, void);
DECL_LINK_TYPED(SelectListBoxHdl, ListBox&, void);
- DECL_LINK(ModifyHdl, void *);
+ DECL_LINK_TYPED(ModifyHdl, Edit&, void);
DECL_LINK_TYPED(OptionHdl, Button *, void);
DECL_LINK_TYPED(CaptionHdl, Button *, void);
diff --git a/sw/source/uibase/inc/drpcps.hxx b/sw/source/uibase/inc/drpcps.hxx
index 4aee03283fac..66c4ae24c853 100644
--- a/sw/source/uibase/inc/drpcps.hxx
+++ b/sw/source/uibase/inc/drpcps.hxx
@@ -69,10 +69,10 @@ friend class SwDropCapsPict;
virtual sfxpg DeactivatePage(SfxItemSet *pSet) override;
void FillSet( SfxItemSet &rSet );
- DECL_LINK_TYPED(ClickHdl, Button*, void);
- DECL_LINK( ModifyHdl, Edit * );
- DECL_LINK_TYPED(SelectHdl, ListBox&, void);
- DECL_LINK_TYPED(WholeWordHdl, Button*, void);
+ DECL_LINK_TYPED( ClickHdl, Button*, void );
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void );
+ DECL_LINK_TYPED( SelectHdl, ListBox&, void );
+ DECL_LINK_TYPED( WholeWordHdl, Button*, void );
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx
index b29b2b32ce3e..2f093afe5936 100644
--- a/sw/source/uibase/inc/frmpage.hxx
+++ b/sw/source/uibase/inc/frmpage.hxx
@@ -149,7 +149,7 @@ class SwFrmPage: public SfxTabPage
// update example
void UpdateExample();
- DECL_LINK( ModifyHdl, Edit * );
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void );
void Init(const SfxItemSet& rSet, bool bReset = false);
// OD 12.11.2003 #i22341# - adjustment to handle maps, that are ambigous
@@ -304,7 +304,7 @@ class SwFrmAddPage : public SfxTabPage
bool bFormat;
bool bNew;
- DECL_LINK(EditModifyHdl, void *);
+ DECL_LINK_TYPED(EditModifyHdl, Edit&, void);
DECL_LINK_TYPED(ChainModifyHdl, ListBox&, void);
static const sal_uInt16 aAddPgRg[];
diff --git a/sw/source/uibase/inc/glosbib.hxx b/sw/source/uibase/inc/glosbib.hxx
index 1b14ae803b38..ee2b1812c05d 100644
--- a/sw/source/uibase/inc/glosbib.hxx
+++ b/sw/source/uibase/inc/glosbib.hxx
@@ -92,11 +92,11 @@ class SwGlossaryGroupDlg : public SvxStandardDialog
protected:
virtual void Apply() override;
DECL_LINK_TYPED( SelectHdl, SvTreeListBox*, void );
- DECL_LINK_TYPED(NewHdl, Button *, void);
+ DECL_LINK_TYPED( NewHdl, Button *, void );
DECL_LINK_TYPED( DeleteHdl, Button*, void );
- DECL_LINK(ModifyHdl, void *);
- DECL_LINK_TYPED(ModifyListBoxHdl, ListBox&, void);
- DECL_LINK_TYPED(RenameHdl, Button *, void);
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void );
+ DECL_LINK_TYPED( ModifyListBoxHdl, ListBox&, void );
+ DECL_LINK_TYPED( RenameHdl, Button *, void );
public:
SwGlossaryGroupDlg(vcl::Window * pParent,
diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx
index 4092f98be3e8..b41ae52c9be2 100644
--- a/sw/source/uibase/inc/glossary.hxx
+++ b/sw/source/uibase/inc/glossary.hxx
@@ -123,14 +123,14 @@ class SwGlossaryDlg : public SvxStandardDialog
void EnableShortName(bool bOn = true);
void ShowPreview();
- DECL_LINK( NameModify, Edit * );
+ DECL_LINK_TYPED( NameModify, Edit&, void );
DECL_LINK_TYPED( NameDoubleClick, SvTreeListBox*, bool );
DECL_LINK_TYPED( GrpSelect, SvTreeListBox *, void );
DECL_LINK_TYPED( MenuHdl, Menu *, bool );
DECL_LINK_TYPED( EnableHdl, Menu *, bool );
- DECL_LINK_TYPED(BibHdl, Button *, void);
- DECL_LINK_TYPED(EditHdl, MenuButton *, void);
- DECL_LINK_TYPED(InsertHdl, Button *, void);
+ DECL_LINK_TYPED( BibHdl, Button *, void );
+ DECL_LINK_TYPED( EditHdl, MenuButton *, void );
+ DECL_LINK_TYPED( InsertHdl, Button *, void );
DECL_LINK_TYPED( PathHdl, Button *, void );
DECL_LINK_TYPED( CheckBoxHdl, Button*, void );
DECL_LINK_TYPED( PreviewLoadedHdl, SwOneExampleFrame&, void );
diff --git a/sw/source/uibase/inc/inputwin.hxx b/sw/source/uibase/inc/inputwin.hxx
index de5a236bc508..97fc2594903c 100644
--- a/sw/source/uibase/inc/inputwin.hxx
+++ b/sw/source/uibase/inc/inputwin.hxx
@@ -66,7 +66,7 @@ friend class InputEdit;
void CleanupUglyHackWithUndo();
void DelBoxContent();
- DECL_LINK( ModifyHdl, void* );
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void );
using Window::IsActive;
diff --git a/sw/source/uibase/inc/insfnote.hxx b/sw/source/uibase/inc/insfnote.hxx
index 03acd7eea195..81dd8c12d7ea 100644
--- a/sw/source/uibase/inc/insfnote.hxx
+++ b/sw/source/uibase/inc/insfnote.hxx
@@ -55,7 +55,7 @@ class SwInsFootNoteDlg: public SvxStandardDialog
VclPtr<PushButton> m_pNextBT;
DECL_LINK_TYPED(NumberCharHdl, Button *, void);
- DECL_LINK(NumberEditHdl, void *);
+ DECL_LINK_TYPED(NumberEditHdl, Edit&, void);
DECL_LINK_TYPED(NumberAutoBtnHdl, Button *, void);
DECL_LINK_TYPED(NumberExtCharHdl, Button *, void);
DECL_LINK_TYPED(NextPrevHdl, Button *, void);
diff --git a/sw/source/uibase/inc/instable.hxx b/sw/source/uibase/inc/instable.hxx
index e4bd75c9bcf0..a838a89c1122 100644
--- a/sw/source/uibase/inc/instable.hxx
+++ b/sw/source/uibase/inc/instable.hxx
@@ -55,13 +55,13 @@ class SwInsTableDlg : public SfxModalDialog
SwTableAutoFormat* pTAutoFormat;
sal_Int64 nEnteredValRepeatHeaderNF;
- DECL_LINK( ModifyName, Edit* );
- DECL_LINK( ModifyRowCol, NumericField* );
+ DECL_LINK_TYPED( ModifyName, Edit&, void );
+ DECL_LINK_TYPED( ModifyRowCol, Edit&, void );
DECL_LINK_TYPED( AutoFormatHdl, Button*, void );
- DECL_LINK_TYPED(OKHdl, Button*, void);
- DECL_LINK_TYPED(CheckBoxHdl, Button* = 0, void);
+ DECL_LINK_TYPED( OKHdl, Button*, void);
+ DECL_LINK_TYPED( CheckBoxHdl, Button* = 0, void);
DECL_LINK_TYPED( ReapeatHeaderCheckBoxHdl, Button* = 0, void);
- DECL_LINK( ModifyRepeatHeaderNF_Hdl, void* );
+ DECL_LINK_TYPED( ModifyRepeatHeaderNF_Hdl, Edit&, void );
public:
SwInsTableDlg( SwView& rView );
diff --git a/sw/source/uibase/inc/linenum.hxx b/sw/source/uibase/inc/linenum.hxx
index 05ac54261850..7db3ed8fdb85 100644
--- a/sw/source/uibase/inc/linenum.hxx
+++ b/sw/source/uibase/inc/linenum.hxx
@@ -50,7 +50,7 @@ private:
VclPtr<CheckBox> m_pNumberingOnFooterHeader;
DECL_LINK_TYPED(OKHdl, Button*, void);
DECL_LINK_TYPED(LineOnOffHdl, Button* = 0, void);
- DECL_LINK(ModifyHdl, void * = 0);
+ DECL_LINK_TYPED(ModifyHdl, Edit&, void);
public:
SwLineNumberingDlg(SwView *pVw);
diff --git a/sw/source/uibase/inc/mailmrge.hxx b/sw/source/uibase/inc/mailmrge.hxx
index 75be32484346..fd5777a1a496 100644
--- a/sw/source/uibase/inc/mailmrge.hxx
+++ b/sw/source/uibase/inc/mailmrge.hxx
@@ -105,10 +105,10 @@ class SwMailMergeDlg : public SvxStandardDialog
OUString m_sSaveFilter;
DECL_LINK_TYPED( ButtonHdl, Button*, void );
- DECL_LINK_TYPED( InsertPathHdl, Button*, void);
+ DECL_LINK_TYPED( InsertPathHdl, Button*, void );
DECL_LINK_TYPED( OutputTypeHdl, Button*, void );
DECL_LINK_TYPED( FilenameHdl, Button*, void );
- DECL_LINK(ModifyHdl, void *);
+ DECL_LINK_TYPED( ModifyHdl, Edit&, void );
DECL_LINK_TYPED( SaveTypeHdl, Button*, void );
virtual void Apply() override;
diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx
index 0843e6d6aec9..c05902aeb1e4 100644
--- a/sw/source/uibase/inc/optload.hxx
+++ b/sw/source/uibase/inc/optload.hxx
@@ -155,7 +155,7 @@ private:
DECL_LINK_TYPED(SelectHdl, ComboBox&, void);
DECL_LINK_TYPED(SelectListBoxHdl, ListBox&, void);
- DECL_LINK(ModifyHdl, void * = 0);
+ DECL_LINK_TYPED(ModifyHdl, Edit&, void);
DECL_LINK_TYPED( OrderHdl, ListBox&, void );
DECL_LINK_TYPED(ShowEntryHdl, SvTreeListBox*, void);
DECL_LINK_TYPED(SaveEntryHdl, SvTreeListBox*, void);
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index 95c2e191f78d..bd7117632f5e 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -173,9 +173,9 @@ class SwStdFontTabPage : public SfxTabPage
OUString sScriptAsian;
OUString sScriptComplex;
- DECL_LINK_TYPED(StandardHdl, Button*, void);
- DECL_LINK(ModifyHdl, ComboBox * );
- DECL_LINK(ModifyHeightHdl, FontSizeBox * );
+ DECL_LINK_TYPED(StandardHdl, Button*, void );
+ DECL_LINK_TYPED(ModifyHdl, Edit&, void );
+ DECL_LINK_TYPED(ModifyHeightHdl, Edit&, void );
DECL_LINK_TYPED(LoseFocusHdl, Control&, void );
SwStdFontTabPage(vcl::Window* pParent, const SfxItemSet& rSet);
diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx
index 0856a51c7db0..eff809095055 100644
--- a/sw/source/uibase/inc/outline.hxx
+++ b/sw/source/uibase/inc/outline.hxx
@@ -103,13 +103,13 @@ class SwOutlineSettingsTabPage : public SfxTabPage
sal_uInt16 nActLevel;
DECL_LINK_TYPED( LevelHdl, ListBox&, void );
- DECL_LINK( ToggleComplete, NumericField * );
+ DECL_LINK_TYPED( ToggleComplete, Edit&, void );
DECL_LINK_TYPED( CollSelect, ListBox&, void );
- DECL_LINK_TYPED(CollSelectGetFocus, Control&, void);
+ DECL_LINK_TYPED( CollSelectGetFocus, Control&, void );
DECL_LINK_TYPED( NumberSelect, ListBox&, void );
- DECL_LINK(DelimModify, void *);
- DECL_LINK( StartModified, NumericField * );
- DECL_LINK_TYPED(CharFormatHdl, ListBox&, void);
+ DECL_LINK_TYPED( DelimModify, Edit&, void );
+ DECL_LINK_TYPED( StartModified, Edit&, void );
+ DECL_LINK_TYPED( CharFormatHdl, ListBox&, void );
void Update();
diff --git a/sw/source/uibase/inc/pgfnote.hxx b/sw/source/uibase/inc/pgfnote.hxx
index 666957c39e77..4ea911d56ef2 100644
--- a/sw/source/uibase/inc/pgfnote.hxx
+++ b/sw/source/uibase/inc/pgfnote.hxx
@@ -57,11 +57,11 @@ private:
VclPtr<MetricField> m_pLineLengthEdit;
VclPtr<MetricField> m_pLineDistEdit;
- DECL_LINK_TYPED(HeightPage, Button*, void);
- DECL_LINK_TYPED(HeightMetric, Button*, void);
- DECL_LINK_TYPED(HeightModify, Control&, void);
- DECL_LINK( LineWidthChanged_Impl, void * );
- DECL_LINK_TYPED( LineColorSelected_Impl, ListBox&, void);
+ DECL_LINK_TYPED( HeightPage, Button*, void );
+ DECL_LINK_TYPED( HeightMetric, Button*, void );
+ DECL_LINK_TYPED( HeightModify, Control&, void );
+ DECL_LINK_TYPED( LineWidthChanged_Impl, Edit&, void );
+ DECL_LINK_TYPED( LineColorSelected_Impl, ListBox&, void );
long lMaxHeight;
diff --git a/sw/source/uibase/inc/prcntfld.hxx b/sw/source/uibase/inc/prcntfld.hxx
index 57fc65b0b472..6e69899810a4 100644
--- a/sw/source/uibase/inc/prcntfld.hxx
+++ b/sw/source/uibase/inc/prcntfld.hxx
@@ -50,7 +50,7 @@ public:
MetricField* get() { return m_pField; }
void SetUpHdl(const Link<SpinField&,void>& rLink) { m_pField->SetUpHdl(rLink); }
void SetDownHdl(const Link<SpinField&,void>& rLink) { m_pField->SetDownHdl(rLink); }
- void SetModifyHdl(const Link<>& rLink) { m_pField->SetModifyHdl(rLink); }
+ void SetModifyHdl(const Link<Edit&,void>& rLink) { m_pField->SetModifyHdl(rLink); }
void SetLoseFocusHdl(const Link<Control&,void>& rLink) { m_pField->SetLoseFocusHdl(rLink); }
void SetMetric(FieldUnit eUnit) { ::SetMetric(*m_pField, eUnit); }
void Enable(bool bEnable = true, bool bChild = true) { m_pField->Enable(bEnable, bChild); }
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index 0bbb394eddb3..ab1cd78378b6 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -108,20 +108,20 @@ class SwEditRegionDlg : public SfxModalDialog
DECL_LINK_TYPED( GetFirstEntryHdl, SvTreeListBox *, void );
DECL_LINK_TYPED( DeselectHdl, SvTreeListBox *, void );
- DECL_LINK_TYPED(OkHdl, Button*, void);
- DECL_LINK(NameEditHdl, void *);
- DECL_LINK( ConditionEditHdl, Edit * );
+ DECL_LINK_TYPED( OkHdl, Button*, void );
+ DECL_LINK_TYPED( NameEditHdl, Edit&, void );
+ DECL_LINK_TYPED( ConditionEditHdl, Edit&, void );
DECL_LINK_TYPED( ChangePasswdHdl, Button *, void );
DECL_LINK_TYPED( ChangeProtectHdl, Button *, void );
DECL_LINK_TYPED( ChangeHideHdl, Button *, void );
// #114856# edit in readonly sections
DECL_LINK_TYPED( ChangeEditInReadonlyHdl, Button *, void );
- DECL_LINK_TYPED(ChangeDismissHdl, Button*, void);
+ DECL_LINK_TYPED( ChangeDismissHdl, Button*, void);
DECL_LINK_TYPED( UseFileHdl, Button*, void );
- DECL_LINK_TYPED(FileSearchHdl, Button*, void);
- DECL_LINK_TYPED(OptionsHdl, Button*, void);
- DECL_LINK( FileNameHdl, Edit* );
+ DECL_LINK_TYPED( FileSearchHdl, Button*, void );
+ DECL_LINK_TYPED( OptionsHdl, Button*, void );
+ DECL_LINK_TYPED( FileNameHdl, Edit&, void );
DECL_LINK_TYPED( DDEHdl, Button*, void );
DECL_LINK_TYPED( DlgClosedHdl, sfx2::FileDialogHelper*, void );
DECL_LINK_TYPED( SubRegionEventHdl, VclWindowEvent&, void );
@@ -174,9 +174,9 @@ class SwInsertSectionTabPage : public SfxTabPage
DECL_LINK_TYPED( ChangeHideHdl, Button *, void );
DECL_LINK_TYPED( ChangeProtectHdl, Button *, void );
DECL_LINK_TYPED( ChangePasswdHdl, Button *, void );
- DECL_LINK(NameEditHdl, void *);
+ DECL_LINK_TYPED( NameEditHdl, Edit&, void );
DECL_LINK_TYPED( UseFileHdl, Button*, void );
- DECL_LINK_TYPED(FileSearchHdl, Button*, void );
+ DECL_LINK_TYPED( FileSearchHdl, Button*, void );
DECL_LINK_TYPED( DDEHdl, Button*, void );
DECL_LINK_TYPED( DlgClosedHdl, sfx2::FileDialogHelper*, void );
@@ -243,7 +243,7 @@ class SwSectionIndentTabPage : public SfxTabPage
VclPtr<MetricField> m_pAfterMF;
VclPtr<SvxParaPrevWindow> m_pPreviewWin;
- DECL_LINK(IndentModifyHdl, void *);
+ DECL_LINK_TYPED(IndentModifyHdl, Edit&, void);
public:
SwSectionIndentTabPage( vcl::Window *pParent, const SfxItemSet &rAttrSet );
virtual ~SwSectionIndentTabPage();
diff --git a/sw/source/uibase/inc/swrenamexnameddlg.hxx b/sw/source/uibase/inc/swrenamexnameddlg.hxx
index 3661d73b9b8e..87f3085043d5 100644
--- a/sw/source/uibase/inc/swrenamexnameddlg.hxx
+++ b/sw/source/uibase/inc/swrenamexnameddlg.hxx
@@ -42,7 +42,7 @@ class SwRenameXNamedDlg : public ModalDialog
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xThirdAccess;
DECL_LINK_TYPED(OkHdl, Button*, void);
- DECL_LINK(ModifyHdl, Edit*);
+ DECL_LINK_TYPED(ModifyHdl, Edit&, void);
public:
SwRenameXNamedDlg( vcl::Window* pParent,
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index a5e8608f5813..4d51f43b4f79 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -210,7 +210,7 @@ class SwTOXSelectTabPage : public SfxTabPage
void LanguageHdl(ListBox*);
DECL_LINK_TYPED(CheckBoxHdl, Button*, void );
DECL_LINK_TYPED(RadioButtonHdl, Button*, void);
- DECL_LINK(ModifyHdl, void*);
+ DECL_LINK_TYPED(ModifyHdl, Edit&, void);
DECL_LINK_TYPED(ModifyListBoxHdl, ListBox&, void);
void ApplyTOXDescription();
@@ -268,7 +268,7 @@ class SwTokenWindow : public VclHBox, public VclBuilderContainer
VclPtr<SwTOXEntryTabPage> m_pParent;
- DECL_LINK(EditResize, Edit*);
+ DECL_LINK_TYPED( EditResize, Edit&, void );
DECL_LINK_TYPED( NextItemHdl, SwTOXEdit&, void );
DECL_LINK_TYPED( TbxFocusHdl, Control&, void );
DECL_LINK_TYPED( NextItemBtnHdl, SwTOXButton&, void );
@@ -417,12 +417,12 @@ class SwTOXEntryTabPage : public SfxTabPage
DECL_LINK_TYPED(LevelHdl, SvTreeListBox*, void);
DECL_LINK_TYPED(AutoRightHdl, Button*, void);
DECL_LINK_TYPED(TokenSelectedHdl, SwFormToken&, void);
- DECL_LINK(TabPosHdl, MetricField*);
- DECL_LINK(FillCharHdl, ComboBox*);
+ DECL_LINK_TYPED(TabPosHdl, Edit&, void);
+ DECL_LINK_TYPED(FillCharHdl, Edit&, void);
DECL_LINK_TYPED(RemoveInsertAuthHdl, Button*, void);
DECL_LINK_TYPED(SortKeyHdl, Button*, void);
DECL_LINK_TYPED(ChapterInfoHdl, ListBox&, void);
- DECL_LINK(ChapterInfoOutlineHdl, NumericField*);
+ DECL_LINK_TYPED(ChapterInfoOutlineHdl, Edit&, void);
DECL_LINK_TYPED(NumberFormatHdl, ListBox&, void);
DECL_LINK_TYPED(AllLevelsHdl, Button*, void);
diff --git a/sw/source/uibase/inc/swuiidxmrk.hxx b/sw/source/uibase/inc/swuiidxmrk.hxx
index 9d0cf903c92d..44db42e84b95 100644
--- a/sw/source/uibase/inc/swuiidxmrk.hxx
+++ b/sw/source/uibase/inc/swuiidxmrk.hxx
@@ -108,18 +108,19 @@ class SwIndexMarkPane
void UpdateMark();
DECL_LINK_TYPED( InsertHdl, Button *, void );
- DECL_LINK_TYPED(CloseHdl, Button*, void);
- DECL_LINK_TYPED(DelHdl, Button*, void);
- DECL_LINK_TYPED(NextHdl, Button*, void);
- DECL_LINK_TYPED(NextSameHdl, Button*, void);
- DECL_LINK_TYPED(PrevHdl, Button*, void);
- DECL_LINK_TYPED(PrevSameHdl, Button*, void);
+ DECL_LINK_TYPED( CloseHdl, Button*, void );
+ DECL_LINK_TYPED( DelHdl, Button*, void );
+ DECL_LINK_TYPED( NextHdl, Button*, void );
+ DECL_LINK_TYPED( NextSameHdl, Button*, void );
+ DECL_LINK_TYPED( PrevHdl, Button*, void );
+ DECL_LINK_TYPED( PrevSameHdl, Button*, void );
DECL_LINK_TYPED( ModifyListBoxHdl, ListBox&, void );
- DECL_LINK( ModifyHdl, void* );
- DECL_LINK( KeyDCBModifyHdl, ComboBox * );
- DECL_LINK_TYPED(NewUserIdxHdl, Button*, void);
- DECL_LINK_TYPED( SearchTypeHdl, Button*, void);
- DECL_LINK( PhoneticEDModifyHdl, Edit * );
+ DECL_LINK_TYPED( ModifyEditHdl, Edit&, void );
+ void ModifyHdl(Control*);
+ DECL_LINK_TYPED( KeyDCBModifyHdl, Edit&, void );
+ DECL_LINK_TYPED( NewUserIdxHdl, Button*, void );
+ DECL_LINK_TYPED( SearchTypeHdl, Button*, void );
+ DECL_LINK_TYPED( PhoneticEDModifyHdl, Edit&, void );
//this method updates the values from 'nLangForPhoneticReading' and 'bIsPhoneticReadingEnabled'
//it needs to be called ones if this dialog is opened to create a new entry (in InitControls),
@@ -212,7 +213,7 @@ class SwAuthorMarkPane
DECL_LINK_TYPED(CompEntryHdl, ListBox&, void);
DECL_LINK_TYPED(ChangeSourceHdl, Button*, void);
DECL_LINK_TYPED(IsEntryAllowedHdl, Edit*, bool);
- DECL_LINK(EditModifyHdl, Edit*);
+ DECL_LINK_TYPED(EditModifyHdl, Edit&, void);
void InitControls();
void Activate();
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 9f0647bf059f..6720fe92210c 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -474,7 +474,7 @@ void SwInputWindow::SetFormula( const OUString& rFormula, bool bDelFlag )
bDelSel = bDelFlag;
}
-IMPL_LINK_NOARG(SwInputWindow, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(SwInputWindow, ModifyHdl, Edit&, void)
{
if (bIsTable && m_bResetUndo)
{
@@ -488,7 +488,6 @@ IMPL_LINK_NOARG(SwInputWindow, ModifyHdl)
pWrtShell->EndAllAction();
sOldFormula = sNew;
}
- return 0;
}
void SwInputWindow::DelBoxContent()
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index 7e3a206c63ac..069f3cf1ed72 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -94,7 +94,7 @@ PageMarginControl::PageMarginControl(
SelectValueSetItem();
SetFieldUnit( *maLeftMarginEdit.get(), eFUnit );
- Link<> aLinkLR = LINK( this, PageMarginControl, ModifyLRMarginHdl );
+ Link<Edit&,void> aLinkLR = LINK( this, PageMarginControl, ModifyLRMarginHdl );
maLeftMarginEdit->SetModifyHdl( aLinkLR );
SetMetricValue( *maLeftMarginEdit.get(), mnPageLeftMargin, meUnit );
@@ -102,7 +102,7 @@ PageMarginControl::PageMarginControl(
maRightMarginEdit->SetModifyHdl( aLinkLR );
SetMetricValue( *maRightMarginEdit.get(), mnPageRightMargin, meUnit );
- Link<> aLinkUL = LINK( this, PageMarginControl, ModifyULMarginHdl );
+ Link<Edit&,void> aLinkUL = LINK( this, PageMarginControl, ModifyULMarginHdl );
SetFieldUnit( *maTopMarginEdit.get(), eFUnit );
maTopMarginEdit->SetModifyHdl( aLinkUL );
SetMetricValue( *maTopMarginEdit.get(), mnPageTopMargin, meUnit );
@@ -399,7 +399,7 @@ IMPL_LINK_TYPED(PageMarginControl, ImplMarginHdl, ValueSet*, pControl, void)
}
}
-IMPL_LINK( PageMarginControl, ModifyLRMarginHdl, MetricField *, )
+IMPL_LINK_NOARG_TYPED( PageMarginControl, ModifyLRMarginHdl, Edit&, void )
{
mpMarginValueSet->SetNoSelection();
mpMarginValueSet->SelectItem(0);
@@ -411,10 +411,9 @@ IMPL_LINK( PageMarginControl, ModifyLRMarginHdl, MetricField *, )
mnPageRightMargin = GetCoreValue( *maRightMarginEdit.get(), meUnit );
mrPagePropPanel.ExecuteMarginLRChange( mnPageLeftMargin, mnPageRightMargin );
mbCustomValuesUsed = true;
- return 0;
}
-IMPL_LINK( PageMarginControl, ModifyULMarginHdl, MetricField *, )
+IMPL_LINK_NOARG_TYPED( PageMarginControl, ModifyULMarginHdl, Edit&, void )
{
mpMarginValueSet->SetNoSelection();
mpMarginValueSet->SelectItem(0);
@@ -426,7 +425,6 @@ IMPL_LINK( PageMarginControl, ModifyULMarginHdl, MetricField *, )
mnPageBottomMargin = GetCoreValue( *maBottomMarginEdit.get(), meUnit );
mrPagePropPanel.ExecuteMarginULChange( mnPageTopMargin, mnPageBottomMargin );
mbCustomValuesUsed = true;
- return 0;
}
bool PageMarginControl::GetUserCustomValues()
diff --git a/sw/source/uibase/sidebar/PageMarginControl.hxx b/sw/source/uibase/sidebar/PageMarginControl.hxx
index 31c226cb47da..b064c849fdd2 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.hxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.hxx
@@ -102,8 +102,8 @@ private:
PagePropertyPanel& mrPagePropPanel;
DECL_LINK_TYPED( ImplMarginHdl, ValueSet*, void );
- DECL_LINK( ModifyLRMarginHdl, MetricField* );
- DECL_LINK( ModifyULMarginHdl, MetricField* );
+ DECL_LINK_TYPED( ModifyLRMarginHdl, Edit&, void );
+ DECL_LINK_TYPED( ModifyULMarginHdl, Edit&, void );
void SetMetricFieldMaxValues(const Size& rPageSize);