[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Wed Sep 13 08:12:35 UTC 2017
sw/source/ui/frmdlg/wrap.cxx | 37 ++++++-------------------------------
sw/source/uibase/inc/wrap.hxx | 3 +--
2 files changed, 7 insertions(+), 33 deletions(-)
New commits:
commit 5c0bb1088a678d36309866c4eee43e58901f6b7b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Sep 13 09:11:36 2017 +0100
listening to modify is sufficient to get all changes
Change-Id: I9dc7301bed990838ac5fbb3bb5394bae5171bc22
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);
More information about the Libreoffice-commits
mailing list