diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-15 12:28:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-15 12:29:01 +0200 |
commit | 0e8a40e8b8c883611b6d34e47dc6e33ba60e0f91 (patch) | |
tree | 92e49014bb9b368309c98d85dcfbd2f673e23d54 /cui | |
parent | cfc7307a23eed561152c1b016cd0ec22bc7af145 (diff) |
calling IsSet() before Call() on Link<> is unnecessary
the Call() already does a check
Found with:
git grep -A 1 -w 'IsSet()'
| grep -B 1 '.Call('
| grep ':'
| cut -d ':' -f 1
Change-Id: Ia7248f5d62640b75f705e539c3d1183e39c0d847
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.cxx | 3 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 17 | ||||
-rw-r--r-- | cui/source/tabpages/swpossizetabpage.cxx | 3 |
3 files changed, 6 insertions, 17 deletions
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index df88b8429eb1..c11cd43bbf31 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -1384,8 +1384,7 @@ namespace svx void SuggestionEdit::DoJump( bool _bUp ) { const Link<Control&,void>& rLoseFocusHdl = GetLoseFocusHdl(); - if( rLoseFocusHdl.IsSet() ) - rLoseFocusHdl.Call( *this ); + rLoseFocusHdl.Call( *this ); m_pScrollBar->SetThumbPos( m_pScrollBar->GetThumbPos() + ( _bUp? -1 : 1 ) ); ( static_cast< HangulHanjaEditDictDialog* >( GetParentDialog() ) )->UpdateScrollbar(); diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 91336b4bf68e..df51d084b28d 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -607,9 +607,7 @@ void AbstractSvxNameDialog_Impl::SetText( const OUString& rStr ) } IMPL_LINK_NOARG_TYPED(AbstractSvxNameDialog_Impl, CheckNameHdl, SvxNameDialog&, bool) { - if( aCheckNameHdl.IsSet() ) - return aCheckNameHdl.Call(*this); - return false; + return aCheckNameHdl.Call(*this); } void AbstractSvxObjectNameDialog_Impl::GetName(OUString& rName) @@ -633,12 +631,7 @@ void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const Link<AbstractSvxObj IMPL_LINK_NOARG_TYPED(AbstractSvxObjectNameDialog_Impl, CheckNameHdl, SvxObjectNameDialog&, bool) { - if(aCheckNameHdl.IsSet()) - { - return aCheckNameHdl.Call(*this); - } - - return false; + return aCheckNameHdl.Call(*this); } void AbstractSvxObjectTitleDescDialog_Impl::GetTitle(OUString& rTitle) @@ -795,13 +788,11 @@ void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link<AbstractSvxPostItDialo } IMPL_LINK_NOARG_TYPED(AbstractSvxPostItDialog_Impl, NextHdl, SvxPostItDialog&, void) { - if( aNextHdl.IsSet() ) - aNextHdl.Call(*this); + aNextHdl.Call(*this); } IMPL_LINK_NOARG_TYPED(AbstractSvxPostItDialog_Impl, PrevHdl, SvxPostItDialog&, void) { - if( aPrevHdl.IsSet() ) - aPrevHdl.Call(*this); + aPrevHdl.Call(*this); } vcl::Window * AbstractSvxPostItDialog_Impl::GetWindow() { diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index c115591a0af9..4718180cd14f 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -1192,8 +1192,7 @@ IMPL_LINK_NOARG_TYPED(SvxSwPosSizeTabPage, RangeModifyHdl, Control&, void) aVal.nWidth = nWidth; aVal.nHeight = nHeight; - if(m_aValidateLink.IsSet()) - m_aValidateLink.Call(aVal); + m_aValidateLink.Call(aVal); nWidth = aVal.nWidth; nHeight = aVal.nHeight; |