From b79fa59df33da81daf119a61d6dffdae232baf82 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 30 May 2018 15:19:16 +0200 Subject: remove cargo cult OSL_ENSURE(pFact, "ScAbstractFactory create fail!"( Possibly this was useful once upon a time, but now it's just noise. If it failed, we're going to crash on the next line when we call a method on that pointer anyway. Change-Id: Ic601f0c3344f6895f8a6ffb3bc6f8bcb45d00a92 Reviewed-on: https://gerrit.libreoffice.org/55082 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/uibase/dialog/regionsw.cxx | 6 ------ 1 file changed, 6 deletions(-) (limited to 'sw/source/uibase/dialog') diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx index 65815235fe42..95617aac1b0a 100644 --- a/sw/source/uibase/dialog/regionsw.cxx +++ b/sw/source/uibase/dialog/regionsw.cxx @@ -79,10 +79,8 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) // height=width for more consistent preview (analog to edit region) aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ScopedVclPtr aTabDlg(pFact->CreateInsertSectionTabDialog( &GetView().GetViewFrame()->GetWindow(), aSet , rSh)); - OSL_ENSURE(aTabDlg, "Dialog creation failed!"); aTabDlg->Execute(); rReq.Ignore(); } @@ -193,10 +191,8 @@ IMPL_LINK( SwWrtShell, InsertRegionDialog, void*, p, void ) // height=width for more consistent preview (analog to edit region) aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ScopedVclPtr aTabDlg(pFact->CreateInsertSectionTabDialog( &GetView().GetViewFrame()->GetWindow(),aSet , *this)); - OSL_ENSURE(aTabDlg, "Dialog creation failed!"); aTabDlg->SetSectionData(*xSectionData); aTabDlg->Execute(); @@ -219,9 +215,7 @@ void SwBaseShell::EditRegionDialog(SfxRequest const & rReq) vcl::Window* pParentWin = &GetView().GetViewFrame()->GetWindow(); { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ScopedVclPtr pEditRegionDlg(pFact->CreateEditRegionDlg(pParentWin, rWrtShell)); - OSL_ENSURE(pEditRegionDlg, "Dialog creation failed!"); if(pItem && dynamic_cast< const SfxStringItem *>( pItem ) != nullptr) { pEditRegionDlg->SelectSection(static_cast(pItem)->GetValue()); -- cgit