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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/appl/fileobj.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/appl/lnkbase2.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/titledockwin.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/docinsert.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 3 |
6 files changed, 9 insertions, 18 deletions
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 15168bc2290c..6d97ba0d31a4 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -418,8 +418,7 @@ void SvFileObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Li sFile += OUString(::sfx2::cTokenSeparator); sFile += aDlg.GetCurrentFilter(); - if ( aEndEditLink.IsSet() ) - aEndEditLink.Call( sFile ); + aEndEditLink.Call( sFile ); } else sFile.clear(); @@ -525,8 +524,7 @@ IMPL_LINK_TYPED( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileD SAL_WARN( "sfx.appl", "SvFileObject::DialogClosedHdl(): wrong file type" ); } - if ( aEndEditLink.IsSet() ) - aEndEditLink.Call( sFile ); + aEndEditLink.Call( sFile ); } /* [Description] diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index f509183b69e2..421abc7c1b1a 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -253,8 +253,7 @@ IMPL_LINK_TYPED( SvBaseLink, EndEditHdl, const OUString&, _rNewName, void ) if ( !ExecuteEdit( sNewName ) ) sNewName.clear(); bWasLastEditOK = !sNewName.isEmpty(); - if ( pImpl->m_aEndEditLink.IsSet() ) - pImpl->m_aEndEditLink.Call( *this ); + pImpl->m_aEndEditLink.Call( *this ); } @@ -505,8 +504,7 @@ void SvBaseLink::Edit( vcl::Window* pParent, const Link<SvBaseLink&,void>& rEndE { ExecuteEdit( OUString() ); bWasLastEditOK = false; - if ( pImpl->m_aEndEditLink.IsSet() ) - pImpl->m_aEndEditLink.Call( *this ); + pImpl->m_aEndEditLink.Call( *this ); } } diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 9141bd16ea4b..6bbddc0e744e 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2308,8 +2308,7 @@ void FileDialogHelper::SetContext( Context _eNewContext ) IMPL_LINK_NOARG_TYPED(FileDialogHelper, ExecuteSystemFilePicker, void*, void) { m_nError = mpImp->execute(); - if ( m_aDialogClosedLink.IsSet() ) - m_aDialogClosedLink.Call( this ); + m_aDialogClosedLink.Call( this ); } // rDirPath has to be a directory @@ -2573,8 +2572,7 @@ void SAL_CALL FileDialogHelper::DialogSizeChanged() void SAL_CALL FileDialogHelper::DialogClosed( const DialogClosedEvent& _rEvent ) { m_nError = ( RET_OK == _rEvent.DialogResult ) ? ERRCODE_NONE : ERRCODE_ABORT; - if ( m_aDialogClosedLink.IsSet() ) - m_aDialogClosedLink.Call( this ); + m_aDialogClosedLink.Call( this ); } ErrCode FileOpenDialog_Impl( sal_Int16 nDialogType, diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx index b5e9067ad3ea..89d69a926ab6 100644 --- a/sfx2/source/dialog/titledockwin.cxx +++ b/sfx2/source/dialog/titledockwin.cxx @@ -289,8 +289,7 @@ namespace sfx2 { SfxDockingWindow::EndDocking( i_rRect, i_bFloatMode ); - if ( m_aEndDockingHdl.IsSet() ) - m_aEndDockingHdl.Call( this ); + m_aEndDockingHdl.Call( this ); } diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index 951930e2c413..8c479a95f4cb 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -262,8 +262,7 @@ IMPL_LINK_NOARG_TYPED(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper* m_sFilter = m_pFileDlg->GetRealFilter(); - if ( m_aDialogClosedLink.IsSet() ) - m_aDialogClosedLink.Call( m_pFileDlg ); + m_aDialogClosedLink.Call( m_pFileDlg ); } } // namespace sfx2 diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index f645bca41044..2bca60cf3a01 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1129,8 +1129,7 @@ void SfxPopupWindow::StateChanged( void SfxPopupWindow::Delete() { - if ( m_aDeleteLink.IsSet() ) - m_aDeleteLink.Call( this ); + m_aDeleteLink.Call( this ); disposeOnce(); } |