From 51c879d8649c7aad7a0c9be0c7ea042d041254d8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 31 May 2018 08:29:01 +0200 Subject: 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 Reviewed-by: Noel Grandin --- sd/source/ui/table/tablefunction.cxx | 4 ++-- sd/source/ui/table/tableobjectbar.cxx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sd/source/ui/table') diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index fb54c8a3ba26..9e71eeeaaaed 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -125,9 +125,9 @@ void DrawViewShell::FuTable(SfxRequest& rReq) if( (nColumns == 0) || (nRows == 0) ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr pDlg( pFact ? pFact->CreateSvxNewTableDialog(rReq.GetFrameWeld()) : nullptr); + ScopedVclPtr pDlg( pFact->CreateSvxNewTableDialog(rReq.GetFrameWeld()) ); - if( !pDlg.get() || (pDlg->Execute() != RET_OK) ) + if( pDlg->Execute() != RET_OK ) break; nColumns = pDlg->getColumns(); diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx index 50ec33d0e884..b4fd0e4d35cb 100644 --- a/sd/source/ui/table/tableobjectbar.cxx +++ b/sd/source/ui/table/tableobjectbar.cxx @@ -143,11 +143,11 @@ void TableObjectBar::Execute( SfxRequest& rReq ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); vcl::Window* pWin = mpView->GetViewShell()->GetParentWindow(); - pDlg.disposeAndReset(pFact ? pFact->CreateSvxInsRowColDlg(pWin ? pWin->GetFrameWeld() : nullptr, - nSlotId == SID_TABLE_INSERT_COL_DLG, - SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : nullptr); + pDlg.disposeAndReset( pFact->CreateSvxInsRowColDlg(pWin ? pWin->GetFrameWeld() : nullptr, + nSlotId == SID_TABLE_INSERT_COL_DLG, + SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) ); - if (!pDlg.get() || (pDlg->Execute() != 1)) + if (pDlg->Execute() != 1) break; } -- cgit