diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-13 09:11:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-13 09:12:00 +0100 |
commit | 5c0bb1088a678d36309866c4eee43e58901f6b7b (patch) | |
tree | 94091babdfacb7f2f8ccadc79ca1a417f9c9a9c0 /sw | |
parent | 66322c5f4a5465c74fa3ceefaa2f76e86a277c16 (diff) |
listening to modify is sufficient to get all changes
Change-Id: I9dc7301bed990838ac5fbb3bb5394bae5171bc22
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/frmdlg/wrap.cxx | 37 | ||||
-rw-r--r-- | sw/source/uibase/inc/wrap.hxx | 3 |
2 files changed, 7 insertions, 33 deletions
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index fd4de58df11a..3c3b2e243770 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -90,31 +90,11 @@ SwWrapTabPage::SwWrapTabPage(vcl::Window *pParent, const SfxItemSet &rSet) SetExchangeSupport(); - Link<SpinField&,void> aLk = LINK(this, SwWrapTabPage, RangeModifyHdl); - Link<Control&,void> aLk3 = LINK(this, SwWrapTabPage, RangeLoseFocusHdl); - m_pLeftMarginED->SetUpHdl(aLk); - m_pLeftMarginED->SetDownHdl(aLk); - m_pLeftMarginED->SetFirstHdl(aLk); - m_pLeftMarginED->SetLastHdl(aLk); - m_pLeftMarginED->SetLoseFocusHdl(aLk3); - - m_pRightMarginED->SetUpHdl(aLk); - m_pRightMarginED->SetDownHdl(aLk); - m_pRightMarginED->SetFirstHdl(aLk); - m_pRightMarginED->SetLastHdl(aLk); - m_pRightMarginED->SetLoseFocusHdl(aLk3); - - m_pTopMarginED->SetUpHdl(aLk); - m_pTopMarginED->SetDownHdl(aLk); - m_pTopMarginED->SetFirstHdl(aLk); - m_pTopMarginED->SetLastHdl(aLk); - m_pTopMarginED->SetLoseFocusHdl(aLk3); - - m_pBottomMarginED->SetUpHdl(aLk); - m_pBottomMarginED->SetDownHdl(aLk); - m_pBottomMarginED->SetFirstHdl(aLk); - m_pBottomMarginED->SetLastHdl(aLk); - m_pBottomMarginED->SetLoseFocusHdl(aLk3); + Link<Edit&,void> aLk = LINK(this, SwWrapTabPage, RangeModifyHdl); + m_pLeftMarginED->SetModifyHdl(aLk); + m_pRightMarginED->SetModifyHdl(aLk); + m_pTopMarginED->SetModifyHdl(aLk); + m_pBottomMarginED->SetModifyHdl(aLk); Link<Button*,void> aLk2 = LINK(this, SwWrapTabPage, WrapTypeHdl); m_pNoWrapRB->SetClickHdl(aLk2); @@ -572,12 +552,7 @@ DeactivateRC SwWrapTabPage::DeactivatePage(SfxItemSet* _pSet) return DeactivateRC::LeavePage; } -// range check -IMPL_LINK( SwWrapTabPage, RangeLoseFocusHdl, Control&, rControl, void ) -{ - RangeModifyHdl( static_cast<SpinField&>(rControl) ); -} -IMPL_LINK( SwWrapTabPage, RangeModifyHdl, SpinField&, rSpin, void ) +IMPL_LINK( SwWrapTabPage, RangeModifyHdl, Edit&, rSpin, void ) { MetricField& rEdit = static_cast<MetricField&>(rSpin); sal_Int64 nValue = rEdit.GetValue(); diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx index a2807b1e7bed..bbd4a0605b69 100644 --- a/sw/source/uibase/inc/wrap.hxx +++ b/sw/source/uibase/inc/wrap.hxx @@ -79,8 +79,7 @@ class SwWrapTabPage: public SfxTabPage virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override; - DECL_LINK( RangeModifyHdl, SpinField&, void ); - DECL_LINK( RangeLoseFocusHdl, Control&, void ); + DECL_LINK( RangeModifyHdl, Edit&, void ); DECL_LINK( WrapTypeHdl, Button *, void ); DECL_LINK( ContourHdl, Button *, void); |