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 /sw | |
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 'sw')
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/cctrl/actctrl.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/utlui/unotools.cxx | 3 |
3 files changed, 5 insertions, 9 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index eeaa6ef8f822..282de8c9b02a 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1596,7 +1596,7 @@ void SwTOXEdit::KeyInput( const KeyEvent& rKEvt ) m_pParent->SetFocus2theAllBtn(); } } - if(bCall && aPrevNextControlLink.IsSet()) + if(bCall) aPrevNextControlLink.Call(*this); } @@ -3196,8 +3196,7 @@ void SwTokenWindow::RemoveControl(SwTOXButton* pDel, bool bInternalCall ) SetActiveControl(pLeftEdit); AdjustPositions(); - if(aModifyHdl.IsSet()) - aModifyHdl.Call(0); + aModifyHdl.Call(0); } void SwTokenWindow::AdjustPositions() @@ -3464,8 +3463,7 @@ IMPL_LINK(SwTokenWindow, EditResize, Edit*, pEdit) { static_cast<SwTOXEdit*>(pEdit)->AdjustSize(); AdjustPositions(); - if(aModifyHdl.IsSet()) - aModifyHdl.Call(0); + aModifyHdl.Call(0); return 0; } diff --git a/sw/source/uibase/cctrl/actctrl.cxx b/sw/source/uibase/cctrl/actctrl.cxx index d17706730dcf..8a2a501b5855 100644 --- a/sw/source/uibase/cctrl/actctrl.cxx +++ b/sw/source/uibase/cctrl/actctrl.cxx @@ -55,8 +55,7 @@ void ReturnActionEdit::KeyInput( const KeyEvent& rEvt) if( aKeyCode.GetCode() == KEY_RETURN && !nModifier) { - if(aReturnActionLink.IsSet()) - aReturnActionLink.Call(*this); + aReturnActionLink.Call(*this); } else Edit::KeyInput(rEvt); diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index 0b3525c63120..9afbb4ab79a1 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -368,8 +368,7 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) // can only be done here - the SFX changes the ScrollBar values disableScrollBars(xViewProps, (nStyleFlags&EX_SHOW_ONLINE_LAYOUT) != 0); - if (aInitializedLink.IsSet()) - aInitializedLink.Call(*this); + aInitializedLink.Call(*this); uno::Reference< text::XTextViewCursorSupplier > xCrsrSupp(_xController, uno::UNO_QUERY); uno::Reference< view::XScreenCursor > xScrCrsr(xCrsrSupp->getViewCursor(), uno::UNO_QUERY); |