diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-31 08:29:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-12 08:24:04 +0200 |
commit | 51c879d8649c7aad7a0c9be0c7ea042d041254d8 (patch) | |
tree | d454d885be767ba7d113547b1fa91ee85cabcf6a /sd/source/ui/func/fucopy.cxx | |
parent | af66cd6e0809982d61b962fbcf2042981084f770 (diff) |
simplify calls to *DialogFactory::Create methods
we don't need to check for nullptr here, it's never null.
Change-Id: I3cc5337a8f4dec6747821679e39ccba3cec20f56
Reviewed-on: https://gerrit.libreoffice.org/55114
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/func/fucopy.cxx')
-rw-r--r-- | sd/source/ui/func/fucopy.cxx | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index a8cde2135f49..e6b1c95f35e2 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -99,27 +99,22 @@ void FuCopy::DoExecute( SfxRequest& rReq ) } SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - if( pFact ) - { - ScopedVclPtr<AbstractCopyDlg> pDlg(pFact->CreateCopyDlg(mpViewShell->GetActiveWindow(), aSet, mpView )); - if (!pDlg) - return; + ScopedVclPtr<AbstractCopyDlg> pDlg(pFact->CreateCopyDlg(mpViewShell->GetActiveWindow(), aSet, mpView )); - sal_uInt16 nResult = pDlg->Execute(); + sal_uInt16 nResult = pDlg->Execute(); - switch( nResult ) - { - case RET_OK: - pDlg->GetAttr( aSet ); - rReq.Done( aSet ); - pArgs = rReq.GetArgs(); - break; + switch( nResult ) + { + case RET_OK: + pDlg->GetAttr( aSet ); + rReq.Done( aSet ); + pArgs = rReq.GetArgs(); + break; - default: - { - pDlg.disposeAndClear(); - mpView->EndUndo(); - } + default: + { + pDlg.disposeAndClear(); + mpView->EndUndo(); return; // Cancel } } |