diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-10 13:07:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-10 15:44:58 +0000 |
commit | b6d6dab920a9e14a6fe9c61446da64ab62dcbfdf (patch) | |
tree | 0b80eb631d6869ad1c3c06857909c08c9f5d3480 /cui | |
parent | 441523b0df8983fb34409a5f4e25dde571be1af7 (diff) |
V668 no sense in testing the result of new against null
Change-Id: I1cff71d15f4d1b5ee47cc734b3fc2168d7f99201
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 10 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 17 |
2 files changed, 7 insertions, 20 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index f8c6c50c3aee..b1b045158301 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -448,13 +448,9 @@ short ActualizeProgress::Execute() short nRet; pIdle = new Idle; - - if ( pIdle ) - { - pIdle->SetIdleHdl( LINK( this, ActualizeProgress, TimeoutHdl ) ); - pIdle->SetPriority( SchedulerPriority::LOWEST ); - pIdle->Start(); - } + pIdle->SetIdleHdl( LINK( this, ActualizeProgress, TimeoutHdl ) ); + pIdle->SetPriority( SchedulerPriority::LOWEST ); + pIdle->Start(); nRet = ModalDialog::Execute(); diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 1421e83a7295..062d67e9c2bf 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1216,13 +1216,8 @@ void AbstractScriptSelectorDialog_Impl::SetRunLabel() VclAbstractDialog * AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog( vcl::Window* pParent, const OUString& rLanguage) { - Dialog* pDlg=NULL; - - pDlg = new SvxScriptOrgDialog( pParent, rLanguage); - - if ( pDlg ) - return new CuiVclAbstractDialog_Impl( pDlg ); - return 0; + Dialog* pDlg = new SvxScriptOrgDialog( pParent, rLanguage); + return new CuiVclAbstractDialog_Impl( pDlg ); } AbstractTitleDialog * AbstractDialogFactory_Impl::CreateTitleDialog( vcl::Window* pParent, @@ -1295,9 +1290,7 @@ AbstractSvxSearchSimilarityDialog * AbstractDialogFactory_Impl::CreateSvxSearchS sal_uInt16 nLonger) { SvxSearchSimilarityDialog* pDlg = new SvxSearchSimilarityDialog( pParent, bRelax, nOther, nShorter, nLonger ); - if ( pDlg ) - return new AbstractSvxSearchSimilarityDialog_Impl( pDlg ); - return NULL; + return new AbstractSvxSearchSimilarityDialog_Impl( pDlg ); } //UUUU @@ -1460,9 +1453,7 @@ AbstractFmSearchDialog* AbstractDialogFactory_Impl::CreateFmSearchDialog(vcl::W const Link& lnkContextSupplier) { FmSearchDialog* pDlg = new FmSearchDialog( pParent, strInitialText, _rContexts, nInitialContext, lnkContextSupplier ); - if ( pDlg ) - return new AbstractFmSearchDialog_Impl( pDlg ); - return 0; + return new AbstractFmSearchDialog_Impl( pDlg ); } AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterEmboss (vcl::Window* pParent, |