diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-13 15:51:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-15 10:32:29 +0200 |
commit | 74dbe58f1e5b6f4f281e13f348c8952b1086877a (patch) | |
tree | fda8bd8374592491d3e64b02e4f3ca13879cf2d4 /sw/source/ui/envelp | |
parent | fa21f301ddef575baad9a3aa8564199285e6d90b (diff) |
convert Link<> to typed
Change-Id: I2ef1e5fe5c6dc65c254b3a16b0b12fca5caba16e
Diffstat (limited to 'sw/source/ui/envelp')
-rw-r--r-- | sw/source/ui/envelp/envfmt.cxx | 9 | ||||
-rw-r--r-- | sw/source/ui/envelp/envfmt.hxx | 2 |
2 files changed, 5 insertions, 6 deletions
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); |