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 --- sc/source/ui/view/cellsh2.cxx | 5 ----- 1 file changed, 5 deletions(-) (limited to 'sc/source/ui/view/cellsh2.cxx') diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 65d781793d65..52588c005dda 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -496,10 +496,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) aArgSet.Put( ScSortItem( SCITEM_SORTDATA, GetViewData(), &aSortParam ) ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - assert(pFact); //ScAbstractFactory create fail! - ScopedVclPtr pDlg(pFact->CreateScSortDlg(pTabViewShell->GetFrameWeld(), &aArgSet)); - assert(pDlg); //Dialog create fail! pDlg->SetCurPageId("criteria"); // 1=sort field tab 2=sort options tab if ( pDlg->Execute() == RET_OK ) @@ -1005,10 +1002,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) aExport.ExportStream( aStream, OUString(), SotClipboardFormatId::STRING ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE( pFact, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pFact is null!" ); ScopedVclPtr pDlg(pFact->CreateScImportAsciiDlg( nullptr, OUString(), &aStream, SC_TEXTTOCOLUMNS)); - OSL_ENSURE( pDlg, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDlg is null!" ); if ( pDlg->Execute() == RET_OK ) { -- cgit