summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-13 15:51:37 +0200
committerNoel Grandin <noel@peralex.com>2015-10-15 10:32:29 +0200
commit74dbe58f1e5b6f4f281e13f348c8952b1086877a (patch)
treefda8bd8374592491d3e64b02e4f3ca13879cf2d4 /sw/source/ui
parentfa21f301ddef575baad9a3aa8564199285e6d90b (diff)
convert Link<> to typed
Change-Id: I2ef1e5fe5c6dc65c254b3a16b0b12fca5caba16e
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx9
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hxx2
-rw-r--r--sw/source/ui/envelp/envfmt.cxx9
-rw-r--r--sw/source/ui/envelp/envfmt.hxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx2
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx24
-rw-r--r--sw/source/ui/misc/num.cxx40
-rw-r--r--sw/source/ui/misc/pggrid.cxx28
-rw-r--r--sw/source/ui/misc/titlepage.cxx6
-rw-r--r--sw/source/ui/table/tabledlg.cxx26
10 files changed, 67 insertions, 81 deletions
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 78c6bd70912b..16dfdd50b3b4 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -134,7 +134,7 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
m_pZoomLB->SelectEntryPos(0); //page size
m_pZoomLB->SetSelectHdl(LINK(this, SwMailMergeLayoutPage, ZoomHdl_Impl));
- Link<> aFrameHdl = LINK(this, SwMailMergeLayoutPage, ChangeAddressHdl_Impl);
+ Link<SpinField&,void> aFrameHdl = LINK(this, SwMailMergeLayoutPage, ChangeAddressHdl_Impl);
Link<Control&,void> aFocusHdl = LINK(this, SwMailMergeLayoutPage, ChangeAddressLoseFocusHdl_Impl);
m_pLeftMF->SetUpHdl(aFrameHdl);
m_pLeftMF->SetDownHdl(aFrameHdl);
@@ -684,9 +684,9 @@ IMPL_LINK_TYPED(SwMailMergeLayoutPage, ZoomHdl_Impl, ListBox&, rBox, void)
IMPL_LINK_NOARG_TYPED(SwMailMergeLayoutPage, ChangeAddressLoseFocusHdl_Impl, Control&, void)
{
- ChangeAddressHdl_Impl(nullptr);
+ ChangeAddressHdl_Impl(*m_pLeftMF);
}
-IMPL_LINK_NOARG(SwMailMergeLayoutPage, ChangeAddressHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SwMailMergeLayoutPage, ChangeAddressHdl_Impl, SpinField&, void)
{
if(m_pExampleWrtShell && m_pAddressBlockFormat)
{
@@ -704,7 +704,6 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, ChangeAddressHdl_Impl)
aSet.Put(SwFormatVertOrient( nTop, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ));
m_pExampleWrtShell->GetDoc()->SetFlyFrmAttr( *m_pAddressBlockFormat, aSet );
}
- return 0;
}
IMPL_LINK_TYPED(SwMailMergeLayoutPage, GreetingsHdl_Impl, Button*, pButton, void)
@@ -725,7 +724,7 @@ IMPL_LINK_TYPED(SwMailMergeLayoutPage, AlignToTextHdl_Impl, Button*, pBox, void)
bool bCheck = static_cast<CheckBox*>(pBox)->IsChecked() && pBox->IsEnabled();
m_pLeftFT->Enable(!bCheck);
m_pLeftMF->Enable(!bCheck);
- ChangeAddressHdl_Impl( 0 );
+ ChangeAddressHdl_Impl( *m_pLeftMF );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx
index 821f9666734e..83007a94623a 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -67,7 +67,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage
DECL_LINK_TYPED(PreviewLoadedHdl_Impl, SwOneExampleFrame&, void);
DECL_LINK_TYPED(ZoomHdl_Impl, ListBox&, void);
- DECL_LINK(ChangeAddressHdl_Impl, void *);
+ DECL_LINK_TYPED(ChangeAddressHdl_Impl, SpinField&, void);
DECL_LINK_TYPED(ChangeAddressLoseFocusHdl_Impl, Control&, void);
DECL_LINK_TYPED(GreetingsHdl_Impl, Button*, void);
DECL_LINK_TYPED(AlignToTextHdl_Impl, Button*, void);
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 7c06b38580b8..61220e376e12 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -141,7 +141,7 @@ SwEnvFormatPage::SwEnvFormatPage(vcl::Window* pParent, const SfxItemSet& rSet)
SetMetric(*m_pSizeHeightField, aMetric);
// Install handlers
- Link<> aLk = LINK(this, SwEnvFormatPage, ModifyHdl);
+ Link<SpinField&,void> aLk = LINK(this, SwEnvFormatPage, ModifyHdl);
m_pAddrLeftField->SetUpHdl( aLk );
m_pAddrTopField->SetUpHdl( aLk );
m_pSendLeftField->SetUpHdl( aLk );
@@ -220,9 +220,9 @@ void SwEnvFormatPage::dispose()
IMPL_LINK_TYPED( SwEnvFormatPage, LoseFocusHdl, Control&, rControl, void )
{
- ModifyHdl(static_cast<Edit*>(&rControl));
+ ModifyHdl(static_cast<SpinField&>(rControl));
}
-IMPL_LINK( SwEnvFormatPage, ModifyHdl, Edit *, pEdit )
+IMPL_LINK_TYPED( SwEnvFormatPage, ModifyHdl, SpinField&, rEdit, void )
{
long lWVal = static_cast< long >(GetFieldVal(*m_pSizeWidthField ));
long lHVal = static_cast< long >(GetFieldVal(*m_pSizeHeightField));
@@ -230,7 +230,7 @@ IMPL_LINK( SwEnvFormatPage, ModifyHdl, Edit *, pEdit )
long lWidth = std::max(lWVal, lHVal);
long lHeight = std::min(lWVal, lHVal);
- if (pEdit == m_pSizeWidthField || pEdit == m_pSizeHeightField)
+ if (&rEdit == m_pSizeWidthField || &rEdit == m_pSizeHeightField)
{
long nRotatedWidth = lHeight;
long nRotatedHeight = lWidth;
@@ -255,7 +255,6 @@ IMPL_LINK( SwEnvFormatPage, ModifyHdl, Edit *, pEdit )
SetMinMax();
m_pPreview->Invalidate();
}
- return 0;
}
IMPL_LINK_TYPED( SwEnvFormatPage, EditHdl, MenuButton *, pButton, void )
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index 5cb2ccdedb87..2abd1c2576fb 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -43,7 +43,7 @@ class SwEnvFormatPage : public SfxTabPage
std::vector<sal_uInt16> aIDs;
- DECL_LINK( ModifyHdl, Edit * );
+ DECL_LINK_TYPED( ModifyHdl, SpinField&, void );
DECL_LINK_TYPED( LoseFocusHdl, Control&, void );
DECL_LINK_TYPED( EditHdl, MenuButton *, void );
DECL_LINK_TYPED(FormatHdl, ListBox&, void);
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 2595b91ef741..73874e4ddfdb 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -672,7 +672,7 @@ VclPtr<SfxTabPage> SwColumnPage::Create(vcl::Window *pParent, const SfxItemSet *
bool SwColumnPage::FillItemSet(SfxItemSet *rSet)
{
if(m_pCLNrEdt->HasChildPathFocus())
- m_pCLNrEdt->GetDownHdl().Call(m_pCLNrEdt);
+ m_pCLNrEdt->GetDownHdl().Call(*m_pCLNrEdt);
// set in ItemSet setzen
// the current settings are already present
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index bc3227de5030..d30e3edc58a3 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -95,7 +95,7 @@ SwWrapTabPage::SwWrapTabPage(vcl::Window *pParent, const SfxItemSet &rSet)
SetExchangeSupport();
- Link<> aLk = LINK(this, SwWrapTabPage, RangeModifyHdl);
+ Link<SpinField&,void> aLk = LINK(this, SwWrapTabPage, RangeModifyHdl);
Link<Control&,void> aLk3 = LINK(this, SwWrapTabPage, RangeLoseFocusHdl);
m_pLeftMarginED->SetUpHdl(aLk);
m_pLeftMarginED->SetDownHdl(aLk);
@@ -491,8 +491,8 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
m_pTopMarginED->SetMax(m_pTopMarginED->Normalize(nTop), FUNIT_TWIP);
m_pBottomMarginED->SetMax(m_pBottomMarginED->Normalize(nBottom), FUNIT_TWIP);
- RangeModifyHdl(m_pLeftMarginED);
- RangeModifyHdl(m_pTopMarginED);
+ RangeModifyHdl(*m_pLeftMarginED);
+ RangeModifyHdl(*m_pTopMarginED);
}
const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(rSet.Get(RES_SURROUND));
@@ -589,19 +589,20 @@ SfxTabPage::sfxpg SwWrapTabPage::DeactivatePage(SfxItemSet* _pSet)
// range check
IMPL_LINK_TYPED( SwWrapTabPage, RangeLoseFocusHdl, Control&, rControl, void )
{
- RangeModifyHdl( static_cast<MetricField*>(&rControl) );
+ RangeModifyHdl( static_cast<SpinField&>(rControl) );
}
-IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField*, pEdit )
+IMPL_LINK_TYPED( SwWrapTabPage, RangeModifyHdl, SpinField&, rSpin, void )
{
- sal_Int64 nValue = pEdit->GetValue();
+ MetricField& rEdit = static_cast<MetricField&>(rSpin);
+ sal_Int64 nValue = rEdit.GetValue();
MetricField *pOpposite = 0;
- if (pEdit == m_pLeftMarginED)
+ if (&rEdit == m_pLeftMarginED)
pOpposite = m_pRightMarginED;
- else if (pEdit == m_pRightMarginED)
+ else if (&rEdit == m_pRightMarginED)
pOpposite = m_pLeftMarginED;
- else if (pEdit == m_pTopMarginED)
+ else if (&rEdit == m_pTopMarginED)
pOpposite = m_pBottomMarginED;
- else if (pEdit == m_pBottomMarginED)
+ else if (&rEdit == m_pBottomMarginED)
pOpposite = m_pTopMarginED;
OSL_ASSERT(pOpposite);
@@ -610,10 +611,9 @@ IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField*, pEdit )
{
sal_Int64 nOpposite = pOpposite->GetValue();
- if (nValue + nOpposite > std::max(pEdit->GetMax(), pOpposite->GetMax()))
+ if (nValue + nOpposite > std::max(rEdit.GetMax(), pOpposite->GetMax()))
pOpposite->SetValue(pOpposite->GetMax() - nValue);
}
- return 0;
}
IMPL_LINK_TYPED( SwWrapTabPage, WrapTypeHdl, Button *, pBtn, void )
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 46708058d1e2..569b42efa367 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -115,7 +115,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(vcl::Window* pParent,
m_pAlign2LB->SetDropDownLineCount( m_pAlign2LB->GetEntryCount() );
m_pAlign2FT->SetText( m_pAlignFT->GetText() );
- Link<> aLk = LINK(this, SwNumPositionTabPage, DistanceHdl);
+ Link<SpinField&,void> aLk = LINK(this, SwNumPositionTabPage, DistanceHdl);
Link<Control&,void> aLk2 = LINK(this, SwNumPositionTabPage, DistanceLoseFocusHdl);
m_pDistBorderMF->SetUpHdl(aLk);
m_pDistNumMF->SetUpHdl(aLk);
@@ -660,20 +660,21 @@ IMPL_LINK_TYPED( SwNumPositionTabPage, LevelHdl, ListBox&, rBox, void )
IMPL_LINK_TYPED( SwNumPositionTabPage, DistanceLoseFocusHdl, Control&, rControl, void )
{
- DistanceHdl(static_cast<MetricField*>(&rControl));
+ DistanceHdl(static_cast<SpinField&>(rControl));
}
-IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pField )
+IMPL_LINK_TYPED( SwNumPositionTabPage, DistanceHdl, SpinField&, rSpin, void )
{
if(bInInintControl)
- return 0;
- long nValue = static_cast< long >(pField->Denormalize(pField->GetValue(FUNIT_TWIP)));
+ return;
+ MetricField& rField = static_cast<MetricField&>(rSpin);
+ long nValue = static_cast< long >(rField.Denormalize(rField.GetValue(FUNIT_TWIP)));
sal_uInt16 nMask = 1;
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
{
SwNumFormat aNumFormat( pActNum->Get( i ) );
- if(pField == m_pDistBorderMF)
+ if(&rField == m_pDistBorderMF)
{
if(m_pRelativeCB->IsChecked() && m_pRelativeCB->IsEnabled())
@@ -697,11 +698,11 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pField )
aNumFormat.SetAbsLSpace( (short)nValue - aNumFormat.GetFirstLineOffset());
}
}
- else if (pField == m_pDistNumMF)
+ else if (&rField == m_pDistNumMF)
{
aNumFormat.SetCharTextDistance( nValue );
}
- else if (pField == m_pIndentMF)
+ else if (&rField == m_pIndentMF)
{
// now AbsLSpace also has to be modified by FirstLineOffset
long nDiff = nValue + aNumFormat.GetFirstLineOffset();
@@ -718,8 +719,6 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pField )
SetModified();
if(!m_pDistBorderMF->IsEnabled())
m_pDistBorderMF->SetText(aEmptyOUStr);
-
- return 0;
}
IMPL_LINK_TYPED( SwNumPositionTabPage, RelativeHdl, Button *, pBox, void )
@@ -819,10 +818,11 @@ IMPL_LINK_NOARG_TYPED(SwNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox&, v
SetModified();
}
-IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pField )
+IMPL_LINK_TYPED( SwNumPositionTabPage, ListtabPosHdl_Impl, SpinField&, rSpin, void )
{
+ MetricField& rField = static_cast<MetricField&>(rSpin);
// determine value to be set at the chosen list levels
- const long nValue = static_cast< long >(pField->Denormalize(pField->GetValue(FUNIT_TWIP)));
+ const long nValue = static_cast< long >(rField.Denormalize(rField.GetValue(FUNIT_TWIP)));
// set value at the chosen list levels
sal_uInt16 nMask = 1;
@@ -838,14 +838,13 @@ IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pField )
}
SetModified();
-
- return 0;
}
-IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pField )
+IMPL_LINK_TYPED( SwNumPositionTabPage, AlignAtHdl_Impl, SpinField&, rSpin, void )
{
+ MetricField& rField = static_cast<MetricField&>(rSpin);
// determine value to be set at the chosen list levels
- const long nValue = static_cast< long >(pField->Denormalize(pField->GetValue(FUNIT_TWIP)));
+ const long nValue = static_cast< long >(rField.Denormalize(rField.GetValue(FUNIT_TWIP)));
// set value at the chosen list levels
sal_uInt16 nMask = 1;
@@ -862,14 +861,13 @@ IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pField )
}
SetModified();
-
- return 0;
}
-IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pField )
+IMPL_LINK_TYPED( SwNumPositionTabPage, IndentAtHdl_Impl, SpinField&, rSpin, void )
{
+ MetricField& rField = static_cast<MetricField&>(rSpin);
// determine value to be set at the chosen list levels
- const long nValue = static_cast< long >(pField->Denormalize(pField->GetValue(FUNIT_TWIP)));
+ const long nValue = static_cast< long >(rField.Denormalize(rField.GetValue(FUNIT_TWIP)));
// set value at the chosen list levels
sal_uInt16 nMask = 1;
@@ -889,8 +887,6 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pField )
}
SetModified();
-
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwNumPositionTabPage, StandardHdl, Button*, void)
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index b607f3567d7f..6c3e70d16617 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -76,7 +76,7 @@ SwTextGridPage::SwTextGridPage(vcl::Window *pParent, const SfxItemSet &rSet) :
get(m_pPrintCB,"checkCB_PRINT");
get(m_pColorLB,"listLB_COLOR");
- Link<> aLink = LINK(this, SwTextGridPage, CharorLineChangedHdl);
+ Link<SpinField&,void> aLink = LINK(this, SwTextGridPage, CharorLineChangedHdl);
Link<Control&,void> aLink2 = LINK(this, SwTextGridPage, CharorLineLoseFocusdHdl);
m_pCharsPerLineNF->SetUpHdl(aLink);
m_pCharsPerLineNF->SetDownHdl(aLink);
@@ -85,7 +85,7 @@ SwTextGridPage::SwTextGridPage(vcl::Window *pParent, const SfxItemSet &rSet) :
m_pLinesPerPageNF->SetDownHdl(aLink);
m_pLinesPerPageNF->SetLoseFocusHdl(aLink2);
- Link<> aSizeLink = LINK(this, SwTextGridPage, TextSizeChangedHdl);
+ Link<SpinField&,void> aSizeLink = LINK(this, SwTextGridPage, TextSizeChangedHdl);
Link<Control&,void> aSizeLink2 = LINK(this, SwTextGridPage, TextSizeLoseFocusHdl);
m_pTextSizeMF->SetUpHdl(aSizeLink);
m_pTextSizeMF->SetDownHdl(aSizeLink);
@@ -389,14 +389,14 @@ const sal_uInt16* SwTextGridPage::GetRanges()
IMPL_LINK_TYPED(SwTextGridPage, CharorLineLoseFocusdHdl, Control&, rControl, void)
{
- CharorLineChangedHdl(static_cast<SpinField*>(&rControl));
+ CharorLineChangedHdl(static_cast<SpinField&>(rControl));
}
-IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, SpinField*, pField)
+IMPL_LINK_TYPED(SwTextGridPage, CharorLineChangedHdl, SpinField&, rField, void)
{
//if in squared mode
if ( m_bSquaredMode )
{
- if(m_pCharsPerLineNF == pField)
+ if(m_pCharsPerLineNF == &rField)
{
long nWidth = (long)(m_aPageSize.Width() / m_pCharsPerLineNF->GetValue());
m_pTextSizeMF->SetValue(m_pTextSizeMF->Normalize(nWidth), FUNIT_TWIP);
@@ -413,11 +413,11 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, SpinField*, pField)
m_pLinesPerPageNF->SetMax(nMaxLines);
}
SetLinesOrCharsRanges( *m_pLinesRangeFT , m_pLinesPerPageNF->GetMax() );
- SetLinesOrCharsRanges( *m_pCharsRangeFT , m_pCharsPerLineNF->GetMax() );
+ SetLinesOrCharsRanges( *m_pCharsRangeFT , m_pCharsPerLineNF->GetMax() );
}
else//in normal mode
{
- if(m_pLinesPerPageNF == pField)
+ if(m_pLinesPerPageNF == &rField)
{
long nHeight = static_cast< sal_Int32 >(m_aPageSize.Height() / m_pLinesPerPageNF->GetValue());
m_pTextSizeMF->SetValue(m_pTextSizeMF->Normalize(nHeight), FUNIT_TWIP);
@@ -427,7 +427,7 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, SpinField*, pField)
m_nRubyUserValue = nHeight;
m_bRubyUserValue = true;
}
- else if (m_pCharsPerLineNF == pField)
+ else if (m_pCharsPerLineNF == &rField)
{
long nWidth = static_cast< sal_Int32 >(m_aPageSize.Width() / m_pCharsPerLineNF->GetValue());
m_pCharWidthMF->SetValue(m_pCharWidthMF->Normalize(nWidth), FUNIT_TWIP);
@@ -435,19 +435,18 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, SpinField*, pField)
}
}
GridModifyHdl(*m_pColorLB);
- return 0;
}
IMPL_LINK_TYPED(SwTextGridPage, TextSizeLoseFocusHdl, Control&, rControl, void)
{
- TextSizeChangedHdl(static_cast<SpinField*>(&rControl));
+ TextSizeChangedHdl(static_cast<SpinField&>(rControl));
}
-IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField)
+IMPL_LINK_TYPED(SwTextGridPage, TextSizeChangedHdl, SpinField&, rField, void)
{
//if in squared mode
if( m_bSquaredMode )
{
- if (m_pTextSizeMF == pField)
+ if (m_pTextSizeMF == &rField)
{
m_bRubyUserValue = false;
@@ -472,14 +471,14 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField)
}
else
{
- if (m_pTextSizeMF == pField)
+ if (m_pTextSizeMF == &rField)
{
sal_Int32 nTextSize = static_cast< sal_Int32 >(m_pTextSizeMF->Denormalize(m_pTextSizeMF->GetValue(FUNIT_TWIP)));
m_pLinesPerPageNF->SetValue(m_aPageSize.Height() / nTextSize);
m_bRubyUserValue = false;
SetLinesOrCharsRanges( *m_pLinesRangeFT , m_pLinesPerPageNF->GetMax() );
}
- else if (m_pCharWidthMF == pField)
+ else if (m_pCharWidthMF == &rField)
{
sal_Int32 nTextWidth = static_cast< sal_Int32 >(m_pCharWidthMF->Denormalize(m_pCharWidthMF->GetValue(FUNIT_TWIP)));
sal_Int32 nMaxChar = 45 ;
@@ -491,7 +490,6 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField)
//rubySize is disabled
}
GridModifyHdl(*m_pColorLB);
- return 0;
}
IMPL_LINK_TYPED(SwTextGridPage, GridTypeHdl, Button*, pButton, void)
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index fd432e1e4167..2ebdd8725fd3 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -236,18 +236,16 @@ SwTitlePageDlg::SwTitlePageDlg( vcl::Window *pParent ) :
m_pPagePropertiesPB->SetClickHdl(LINK(this, SwTitlePageDlg, EditHdl));
}
-IMPL_LINK_NOARG(SwTitlePageDlg, UpHdl)
+IMPL_LINK_NOARG_TYPED(SwTitlePageDlg, UpHdl, SpinField&, void)
{
if (m_pPageCountNF->GetValue() == 2)
FillList();
- return 0;
}
-IMPL_LINK_NOARG(SwTitlePageDlg, DownHdl)
+IMPL_LINK_NOARG_TYPED(SwTitlePageDlg, DownHdl, SpinField&, void)
{
if (m_pPageCountNF->GetValue() == 1)
FillList();
- return 0;
}
IMPL_LINK_NOARG_TYPED(SwTitlePageDlg, RestartNumberingHdl, Button*, void)
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 6402a7dd382d..ed324912bd68 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -145,7 +145,7 @@ void SwFormatTablePage::Init()
m_pRightBtn->SetClickHdl( aLk2 );
m_pCenterBtn->SetClickHdl( aLk2 );
- Link<> aLk = LINK( this, SwFormatTablePage, UpDownHdl );
+ Link<SpinField&,void> aLk = LINK( this, SwFormatTablePage, UpDownHdl );
m_pTopMF->SetUpHdl( aLk );
m_pBottomMF->SetUpHdl( aLk );
m_aRightMF.SetUpHdl( aLk );
@@ -286,19 +286,17 @@ void SwFormatTablePage::RightModify()
IMPL_LINK_TYPED( SwFormatTablePage, LoseFocusHdl, Control&, rControl, void )
{
- UpDownHdl(static_cast<MetricField*>(&rControl));
+ UpDownHdl(static_cast<SpinField&>(rControl));
}
-IMPL_LINK( SwFormatTablePage, UpDownHdl, MetricField *, pEdit )
+IMPL_LINK_TYPED( SwFormatTablePage, UpDownHdl, SpinField&, rEdit, void )
{
- if( m_aRightMF.get() == pEdit)
+ if( m_aRightMF.get() == &rEdit)
RightModify();
- ModifyHdl( pEdit );
- return 0;
+ ModifyHdl( &rEdit );
}
void SwFormatTablePage::ModifyHdl(const Edit * pEdit)
{
-
SwTwips nCurWidth = static_cast< SwTwips >(m_aWidthMF.DenormalizePercent(m_aWidthMF.GetValue( FUNIT_TWIP )));
SwTwips nPrevWidth = nCurWidth;
SwTwips nRight = static_cast< SwTwips >(m_aRightMF.DenormalizePercent(m_aRightMF.GetValue( FUNIT_TWIP )));
@@ -848,8 +846,8 @@ void SwTableColumnPage::Reset( const SfxItemSet* )
void SwTableColumnPage::Init(bool bWeb)
{
FieldUnit aMetric = ::GetDfltMetric(bWeb);
- Link<> aLkUp = LINK( this, SwTableColumnPage, UpHdl );
- Link<> aLkDown = LINK( this, SwTableColumnPage, DownHdl );
+ Link<SpinField&,void> aLkUp = LINK( this, SwTableColumnPage, UpHdl );
+ Link<SpinField&,void> aLkDown = LINK( this, SwTableColumnPage, DownHdl );
Link<Control&,void> aLkLF = LINK( this, SwTableColumnPage, LoseFocusHdl );
for( sal_uInt16 i = 0; i < MET_FIELDS; i++ )
{
@@ -907,18 +905,16 @@ IMPL_LINK_TYPED( SwTableColumnPage, AutoClickHdl, Button*, pControl, void )
UpdateCols(0);
}
-IMPL_LINK( SwTableColumnPage, UpHdl, MetricField*, pEdit )
+IMPL_LINK_TYPED( SwTableColumnPage, UpHdl, SpinField&, rEdit, void )
{
bModified = true;
- ModifyHdl( pEdit );
- return 0;
+ ModifyHdl( static_cast<MetricField*>(&rEdit) );
}
-IMPL_LINK( SwTableColumnPage, DownHdl, MetricField*, pEdit )
+IMPL_LINK_TYPED( SwTableColumnPage, DownHdl, SpinField&, rEdit, void )
{
bModified = true;
- ModifyHdl( pEdit );
- return 0;
+ ModifyHdl( static_cast<MetricField*>(&rEdit) );
}
IMPL_LINK_TYPED( SwTableColumnPage, LoseFocusHdl, Control&, rControl, void )