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 /svx | |
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 'svx')
-rw-r--r-- | svx/source/dialog/contwnd.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/graphctl.cxx | 6 | ||||
-rw-r--r-- | svx/source/form/fmexch.cxx | 6 | ||||
-rw-r--r-- | svx/source/form/fmsrcimp.cxx | 3 | ||||
-rw-r--r-- | svx/source/form/fmtextcontrolshell.cxx | 3 | ||||
-rw-r--r-- | svx/source/gallery2/galctrl.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdedxv.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 12 |
8 files changed, 14 insertions, 27 deletions
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index 5b21b4a3a26c..6b560012db53 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -185,8 +185,7 @@ void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt) { Control::MouseButtonUp( rMEvt ); - if ( aPipetteClickLink.IsSet() ) - aPipetteClickLink.Call( *this ); + aPipetteClickLink.Call( *this ); } else if ( bWorkplaceMode ) { @@ -210,8 +209,7 @@ void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt) Invalidate( aGraphRect ); - if ( aWorkplaceClickLink.IsSet() ) - aWorkplaceClickLink.Call( *this ); + aWorkplaceClickLink.Call( *this ); } else GraphCtrl::MouseButtonUp( rMEvt ); diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index a013a990bfe9..272005bc12d5 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -199,8 +199,7 @@ void GraphCtrl::SetGraphic( const Graphic& rGraphic, bool bNewModel ) if ( bSdrMode && bNewModel ) InitSdrModel(); - if ( aGraphSizeLink.IsSet() ) - aGraphSizeLink.Call( this ); + aGraphSizeLink.Call( this ); Resize(); Invalidate(); @@ -745,8 +744,7 @@ void GraphCtrl::SetObjKind( const SdrObjKind _eObjKind ) IMPL_LINK_TYPED( GraphCtrl, UpdateHdl, Idle*, pTimer, void ) { - if ( aUpdateLink.IsSet() ) - aUpdateLink.Call( this ); + aUpdateLink.Call( this ); pTimer->Start(); } diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx index cf7673a83c75..d9b0911b2a0f 100644 --- a/svx/source/form/fmexch.cxx +++ b/svx/source/form/fmexch.cxx @@ -47,8 +47,7 @@ namespace svxform { if ( m_bClipboardOwner ) { // simulate a lostOwnership to notify parties interested in - if ( m_aClipboardListener.IsSet() ) - m_aClipboardListener.Call( *this ); + m_aClipboardListener.Call( *this ); } m_bClipboardOwner = true; @@ -80,8 +79,7 @@ namespace svxform TransferableHelper::implCallOwnLostOwnership( _rxClipboard, _rxTrans ); m_bClipboardOwner = false; - if ( m_aClipboardListener.IsSet() ) - m_aClipboardListener.Call( *this ); + m_aClipboardListener.Call( *this ); } diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index 571334e3dfa4..5361cf735a32 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -78,8 +78,7 @@ void FmSearchThread::run() void FmSearchThread::onTerminated() { - if (m_aTerminationHdl.IsSet()) - m_aTerminationHdl.Call(this); + m_aTerminationHdl.Call(this); delete this; } diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index e7aaeeca0a9c..7de8f4f4fe91 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -1256,8 +1256,7 @@ namespace svx // #i51621# / 2005-08-19 / frank.schoenheit@sun.com // bool bHaveAnyServeableSlots = m_xActiveTextComponent.is() || !m_aControlFeatures.empty(); // LEM: not calling m_aControlActivatonHandler causes fdo#63695, so disable this hack for now. - if ( m_aControlActivationHandler.IsSet() /* && bHaveAnyServeableSlots */ ) - m_aControlActivationHandler.Call( NULL ); + m_aControlActivationHandler.Call( NULL ); m_bNeedClipboardInvalidation = true; } diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index e05b8abd7c15..bf6e1c12a9ee 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -588,8 +588,7 @@ void GalleryListView::DoubleClick( const BrowserMouseEvent& rEvt ) void GalleryListView::Select() { - if( maSelectHdl.IsSet() ) - maSelectHdl.Call( this ); + maSelectHdl.Call( this ); } sal_Int8 GalleryListView::AcceptDrop( const BrowserAcceptDropEvent& ) diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 92ed90c9217a..6a2e179c71af 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -611,7 +611,7 @@ IMPL_LINK_TYPED(SdrObjEditView,ImpOutlinerCalcFieldValueHdl,EditFieldInfo*,pFI,v aDrawOutlLink.Call(pFI); bOk = !rStr.isEmpty(); } - if (!bOk && aOldCalcFieldValueLink.IsSet()) { + if (!bOk) { aOldCalcFieldValueLink.Call(pFI); } } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 659b40d20e12..d100e1125ba5 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -561,14 +561,12 @@ void SvxStyleBox_Impl::StateChanged( StateChangedType nStateChange ) if ( nStateChange == StateChangedType::Visible ) { bVisible = IsReallyVisible(); - if ( aVisibilityListener.IsSet() ) - aVisibilityListener.Call( *this ); + aVisibilityListener.Call( *this ); } else if ( nStateChange == StateChangedType::InitShow ) { bVisible = true; - if ( aVisibilityListener.IsSet() ) - aVisibilityListener.Call( *this ); + aVisibilityListener.Call( *this ); } } @@ -1375,8 +1373,7 @@ IMPL_LINK_TYPED(SvxColorWindow_Impl, SelectHdl, ValueSet*, pColorSet, void) if ( IsInPopupMode() ) EndPopupMode(); - if ( maSelectedLink.IsSet() ) - maSelectedLink.Call(aColor); + maSelectedLink.Call(aColor); maColorSelectFunction(maCommand, aColor); } @@ -1415,8 +1412,7 @@ IMPL_LINK_NOARG_TYPED(SvxColorWindow_Impl, AutoColorClickHdl, Button*, void) if ( IsInPopupMode() ) EndPopupMode(); - if ( maSelectedLink.IsSet() ) - maSelectedLink.Call(aColor); + maSelectedLink.Call(aColor); maColorSelectFunction(maCommand, aColor); } |