cui/source/dialogs/cuifmsearch.cxx | 1 cui/source/options/optcolor.cxx | 2 - cui/source/options/optlingu.cxx | 2 - cui/source/options/optpath.cxx | 1 cui/source/tabpages/tpbitmap.cxx | 4 -- cui/source/tabpages/tpgradnt.cxx | 2 - cui/source/tabpages/tphatch.cxx | 4 -- cui/source/tabpages/tplnedef.cxx | 4 -- cui/source/tabpages/tplneend.cxx | 4 -- cui/source/tabpages/tppattern.cxx | 4 -- editeng/source/misc/hangulhanja.cxx | 1 reportdesign/source/ui/dlg/dlgpage.cxx | 1 sc/source/ui/app/scmod.cxx | 1 sc/source/ui/attrdlg/attrdlg.cxx | 1 sc/source/ui/docshell/arealink.cxx | 2 - sc/source/ui/docshell/docsh.cxx | 1 sc/source/ui/docshell/docsh4.cxx | 8 ---- sc/source/ui/drawfunc/drawsh.cxx | 3 - sc/source/ui/drawfunc/drawsh5.cxx | 4 -- sc/source/ui/drawfunc/drtxtob1.cxx | 2 - sc/source/ui/miscdlgs/redcom.cxx | 1 sc/source/ui/pagedlg/tphf.cxx | 2 - sc/source/ui/pagedlg/tphfedit.cxx | 2 - sc/source/ui/styleui/styledlg.cxx | 1 sc/source/ui/unoobj/filtuno.cxx | 3 - sc/source/ui/vba/vbaworksheet.cxx | 2 - sc/source/ui/view/cellsh1.cxx | 29 ----------------- sc/source/ui/view/cellsh2.cxx | 6 --- sc/source/ui/view/cellsh3.cxx | 4 -- sc/source/ui/view/editsh.cxx | 4 -- sc/source/ui/view/formatsh.cxx | 2 - sc/source/ui/view/gridwin2.cxx | 2 - sc/source/ui/view/pivotsh.cxx | 2 - sc/source/ui/view/prevwsh.cxx | 2 - sc/source/ui/view/tabvwsh3.cxx | 3 - sc/source/ui/view/tabvwsh4.cxx | 1 sc/source/ui/view/tabvwsha.cxx | 1 sc/source/ui/view/tabvwshf.cxx | 9 ----- sd/source/ui/dlg/dlgchar.cxx | 1 sd/source/ui/dlg/dlgpage.cxx | 1 sd/source/ui/dlg/prltempl.cxx | 1 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 2 - sd/source/ui/view/drviews2.cxx | 6 --- svx/source/dialog/grfflt.cxx | 6 --- svx/source/dialog/hdft.cxx | 2 - svx/source/dialog/hyperdlg.cxx | 2 - svx/source/dialog/imapwnd.cxx | 1 svx/source/dialog/srchdlg.cxx | 4 -- svx/source/fmcomp/fmgridcl.cxx | 1 svx/source/form/fmshell.cxx | 1 svx/source/gallery2/galbrws1.cxx | 4 -- svx/source/gallery2/galbrws2.cxx | 1 svx/source/svdraw/svdedtv2.cxx | 1 svx/source/tbxctrls/grafctrl.cxx | 2 - sw/source/ui/chrdlg/chardlg.cxx | 1 sw/source/ui/chrdlg/tblnumfm.cxx | 1 sw/source/ui/dbui/dbinsdlg.cxx | 2 - sw/source/ui/dialog/addrdlg.cxx | 1 sw/source/ui/dialog/uiregionsw.cxx | 2 - sw/source/ui/envelp/envfmt.cxx | 1 sw/source/ui/fldui/fldedt.cxx | 1 sw/source/ui/fmtui/tmpdlg.cxx | 1 sw/source/ui/frmdlg/frmdlg.cxx | 1 sw/source/ui/frmdlg/pattern.cxx | 1 sw/source/ui/frmdlg/uiborder.cxx | 1 sw/source/ui/index/cnttab.cxx | 1 sw/source/ui/misc/bookmark.cxx | 1 sw/source/ui/misc/glossary.cxx | 1 sw/source/ui/table/convert.cxx | 1 sw/source/ui/table/tabledlg.cxx | 1 sw/source/uibase/app/appenv.cxx | 1 sw/source/uibase/app/applab.cxx | 2 - sw/source/uibase/app/docsh2.cxx | 1 sw/source/uibase/dbui/dbmgr.cxx | 2 - sw/source/uibase/dialog/regionsw.cxx | 6 --- sw/source/uibase/dochdl/gloshdl.cxx | 5 -- sw/source/uibase/fldui/fldwrap.cxx | 2 - sw/source/uibase/index/idxmrk.cxx | 2 - sw/source/uibase/misc/redlndlg.cxx | 3 - sw/source/uibase/ribbar/workctrl.cxx | 1 sw/source/uibase/shells/annotsh.cxx | 2 - sw/source/uibase/shells/basesh.cxx | 10 ----- sw/source/uibase/shells/drawdlg.cxx | 2 - sw/source/uibase/shells/drwbassh.cxx | 5 -- sw/source/uibase/shells/drwtxtex.cxx | 2 - sw/source/uibase/shells/tabsh.cxx | 6 --- sw/source/uibase/shells/textfld.cxx | 7 ---- sw/source/uibase/shells/textglos.cxx | 3 - sw/source/uibase/shells/textidx.cxx | 8 ---- sw/source/uibase/shells/textsh.cxx | 4 -- sw/source/uibase/shells/textsh1.cxx | 6 --- sw/source/uibase/shells/txtattr.cxx | 1 sw/source/uibase/shells/txtnum.cxx | 2 - sw/source/uibase/table/tablemgr.cxx | 1 sw/source/uibase/uiview/pview.cxx | 1 sw/source/uibase/uiview/view0.cxx | 3 - sw/source/uibase/uiview/view2.cxx | 6 --- sw/source/uibase/uiview/viewdlg2.cxx | 5 -- sw/source/uibase/uno/SwXFilterOptions.cxx | 1 sw/source/uibase/utlui/content.cxx | 1 sw/source/uibase/utlui/glbltree.cxx | 2 - sw/source/uibase/utlui/numfmtlb.cxx | 1 sw/source/uibase/wrtsh/wrtsh2.cxx | 3 - 103 files changed, 289 deletions(-)
New commits: commit b79fa59df33da81daf119a61d6dffdae232baf82 Author: Noel Grandin <[email protected]> Date: Wed May 30 15:19:16 2018 +0200 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 <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 749ba6d8af59..3766fd9781b5 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -380,7 +380,6 @@ IMPL_LINK(FmSearchDialog, OnClickedSpecialSettings, Button*, pButton, void ) if(pFact) { ScopedVclPtr<AbstractSvxJSearchOptionsDialog> aDlg(pFact->CreateSvxJSearchOptionsDialog( this, aSet, m_pSearchEngine->GetTransliterationFlags() )); - DBG_ASSERT(aDlg, "Dialog creation failed!"); aDlg->Execute(); diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index a6538fd26d46..daa240157889 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -1112,10 +1112,8 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, Button*, pButton, void ) OUString sName; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog(pButton->GetFrameWeld(), sName, CuiResId(RID_SVXSTR_COLOR_CONFIG_SAVE2) )); - DBG_ASSERT(aNameDlg, "Dialog creation failed!"); aNameDlg->SetCheckNameHdl( LINK(this, SvxColorOptionsTabPage, CheckNameHdl_Impl)); aNameDlg->SetText(CuiResId(RID_SVXSTR_COLOR_CONFIG_SAVE1)); aNameDlg->SetHelpId(HID_OPTIONS_COLORCONFIG_SAVE_SCHEME); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 1155d2792992..20018047d8af 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1494,7 +1494,6 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, Button *, pBtn, void ) if(pFact) { ScopedVclPtr<AbstractSvxNewDictionaryDialog> aDlg(pFact->CreateSvxNewDictionaryDialog(GetFrameWeld())); - DBG_ASSERT(aDlg, "Dialog creation failed!"); uno::Reference< XDictionary > xNewDic; if ( aDlg->Execute() == RET_OK ) xNewDic.set( aDlg->GetNewDictionary(), UNO_QUERY ); @@ -1528,7 +1527,6 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, Button *, pBtn, void ) if(pFact) { ScopedVclPtr<VclAbstractDialog> aDlg(pFact->CreateSvxEditDictionaryDialog( this, xDic->getName() )); - DBG_ASSERT(aDlg, "Dialog creation failed!"); aDlg->Execute(); } } diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 59c93cf9d216..2275ce332e6e 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -559,7 +559,6 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, Button*, void) { ScopedVclPtr<AbstractSvxMultiPathDialog> pMultiDlg( pFact->CreateSvxMultiPathDialog( this )); - DBG_ASSERT( pMultiDlg, "Dialog creation failed!" ); OUString sPath( sUser ); if ( !sPath.isEmpty() ) diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 24136082515e..201634ecc1f0 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -548,9 +548,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickRenameHdl, SvxPresetListBox*, void) OUString aName( m_pBitmapList->GetBitmap( nPos )->GetName() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - assert(pFact && "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); - assert(pDlg && "Dialog creation failed!"); bool bLoop = true; while( bLoop && pDlg->Execute() == RET_OK ) @@ -761,9 +759,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, Button*, void) OUString aName; INetURLObject aURL( aDlg.GetPath() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aURL.GetName().getToken(0, '.'), aDesc)); - DBG_ASSERT(pDlg, "Dialog creation failed!"); nError = ErrCode(1); while( pDlg->Execute() == RET_OK ) diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 96b0063b81c7..fb12fddfdbdf 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -498,9 +498,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickRenameHdl_Impl, SvxPresetListBox*, void OUString aName( m_pGradientList->GetGradient( nPos )->GetName() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - assert(pFact && "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); - assert(pDlg && "Dialog creation failed!"); bool bLoop = true; while( bLoop && pDlg->Execute() == RET_OK ) diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 16e45e307db7..e103b509417e 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -441,9 +441,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl, Button*, void) } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - assert(pFact && "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); - assert(pDlg && "Dialog creation failed!"); sal_uInt16 nError = 1; while( pDlg->Execute() == RET_OK ) @@ -555,9 +553,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickRenameHdl_Impl, SvxPresetListBox*, void ) OUString aName( m_pHatchingList->GetHatch( nPos )->GetName() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - assert(pFact && "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); - assert(pDlg && "Dialog creation failed!"); bool bLoop = true; while( bLoop && pDlg->Execute() == RET_OK ) diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 409de2429405..16e76024714a 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -544,9 +544,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl, Button*, void) } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); - DBG_ASSERT(pDlg, "Dialog creation failed!"); bool bLoop = true; while ( bLoop && pDlg->Execute() == RET_OK ) @@ -614,9 +612,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl, Button*, void) OUString aOldName = aName; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); - DBG_ASSERT(pDlg, "Dialog creation failed!"); long nCount = pDashList->Count(); bool bLoop = true; diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 091b1fa04192..89345008fda6 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -324,9 +324,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl, Button*, void) xWarningBox->run(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); - DBG_ASSERT(pDlg, "Dialog creation failed!"); bool bLoop = true; while( !bDifferent && bLoop && pDlg->Execute() == RET_OK ) @@ -430,9 +428,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl, Button*, void) } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc )); - DBG_ASSERT(pDlg, "Dialog creation failed!"); bool bLoop = true; while ( bLoop && pDlg->Execute() == RET_OK ) diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index 52ad7eb3762c..9bb279850d1f 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -355,9 +355,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, Button*, void) } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - assert(pFact && "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); - assert(pDlg && "Dialog creation failed!"); sal_uInt16 nError(1); while( pDlg->Execute() == RET_OK ) @@ -462,9 +460,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickRenameHdl_Impl, SvxPresetListBox*, void) OUString aName(m_pPatternList->GetBitmap(nPos)->GetName()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - assert(pFact && "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc)); - assert(pDlg && "Dialog creation failed!"); bool bLoop = true; diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx index ee50f639a434..7dc6930fd19f 100644 --- a/editeng/source/misc/hangulhanja.cxx +++ b/editeng/source/misc/hangulhanja.cxx @@ -282,7 +282,6 @@ namespace editeng if(pFact) { m_pConversionDialog = pFact->CreateHangulHanjaConversionDialog(m_pUIParent, m_ePrimaryConversionDirection ); - DBG_ASSERT(m_pConversionDialog, "Dialog creation failed!"); m_pConversionDialog->EnableRubySupport( m_pAntiImpl->HasRubySupport() ); diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx index 26bae5a4faff..fa2a38ff9da0 100644 --- a/reportdesign/source/ui/dlg/dlgpage.cxx +++ b/reportdesign/source/ui/dlg/dlgpage.cxx @@ -43,7 +43,6 @@ ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const SfxItemSet* pAttr, c , m_nCharBgdId(0) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - assert(pFact && "Dialog creation failed!"); if (rDialog == "BackgroundDialog") { diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index d87fe6dfdc06..c0f8a33b8367 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -2053,7 +2053,6 @@ VclPtr<SfxTabPage> ScModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParen { VclPtr<SfxTabPage> pRet; ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); switch(nId) { case SID_SC_TP_LAYOUT: diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx index b47339ac5721..9a4cfdba6155 100644 --- a/sc/source/ui/attrdlg/attrdlg.cxx +++ b/sc/source/ui/attrdlg/attrdlg.cxx @@ -38,7 +38,6 @@ ScAttrDlg::ScAttrDlg(vcl::Window* pParent, const SfxItemSet* pCellAttrs) { SvtCJKOptions aCJKOptions; SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageCreatorFunc fail!"); m_nNumberPageId = AddTabPage( "numbers", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), nullptr ); diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index acdc09144a42..5c3f22ec4c17 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -78,10 +78,8 @@ void ScAreaLink::Edit(weld::Window* pParent, const Link<SvBaseLink&,void>& /* rE { // use own dialog instead of SvBaseLink::Edit... ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScLinkedAreaDlg> pDlg(pFact->CreateScLinkedAreaDlg(pParent)); - OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->InitFromOldLink( aFileName, aFilterName, aOptions, aSourceArea, GetRefreshDelay() ); if ( pDlg->Execute() == RET_OK ) { diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 59d0d28fa7c2..48a3c806a20e 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -3035,7 +3035,6 @@ VclPtr<SfxDocumentInfoDialog> ScDocShell::CreateDocumentInfoDialog( const SfxIte if( pDocSh == this ) { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ::CreateTabPage ScDocStatPageCreate = pFact->GetTabPageCreatorFunc(SID_SC_TP_STAT); OSL_ENSURE(ScDocStatPageCreate, "Tabpage create fail!"); pDlg->AddFontTabPage(); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 47992f8ea28d..16c1cf1b9aef 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -365,10 +365,8 @@ void ScDocShell::Execute( SfxRequest& rReq ) bRowHeaders = aChartPositioner.HasRowHeaders(); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScColRowLabelDlg> pDlg(pFact->CreateScColRowLabelDlg(pParent, bRowHeaders, bColHeaders)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { bColHeaders = pDlg->IsRow(); @@ -916,10 +914,8 @@ void ScDocShell::Execute( SfxRequest& rReq ) bool bSheetProtected = m_aDocument.IsTabProtected(nActualTab); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScNewScenarioDlg> pNewDlg(pFact->CreateScNewScenarioDlg(GetActiveDialogParent(), aName, true, bSheetProtected)); - OSL_ENSURE(pNewDlg, "Dialog create fail!"); pNewDlg->SetScenarioData( aName, aComment, aColor, nFlags ); if ( pNewDlg->Execute() == RET_OK ) { @@ -1697,10 +1693,8 @@ void ScDocShell::ExecutePageStyle( const SfxViewShell& rCaller, SfxItemSet& rStyleSet = pStyleSheet->GetItemSet(); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScStyleDlg( GetActiveDialogParent(), *pStyleSheet, RID_SCDLG_STYLES_PAGE, RID_SCDLG_STYLES_PAGE )); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { @@ -1852,14 +1846,12 @@ void ScDocShell::ExecutePageStyle( const SfxViewShell& rCaller, } ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScHFEditDlg( GetActiveDialogParent(), rStyleSet, aStr, nResId)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 62dea38876d8..16badca23968 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -286,7 +286,6 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) if(pFact) { ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxTransformTabDialog(pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr, pView)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if (pDlg->Execute() == RET_OK) { rReq.Done(*(pDlg->GetOutputItemSet())); @@ -390,13 +389,11 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq ) pView->MergeAttrFromMarked( aNewAttr, false ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxLineTabDialog( pViewData->GetDialogParent(), &aNewAttr, pViewData->GetDocument()->GetDrawLayer(), pObj, bHasMarked)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK ) { diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx index f300b4e9495a..962a1b257509 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -485,10 +485,8 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) OUString aName = pSelected->GetName(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); vcl::Window* pWin = pViewData->GetActiveWin(); ScopedVclPtr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(pWin ? pWin->GetFrameWeld() : nullptr, aName)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->SetCheckNameHdl(LINK(this, ScDrawShell, NameObjectHdl)); @@ -555,11 +553,9 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) OUString aDescription(pSelected->GetDescription()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); vcl::Window* pWin = pViewData->GetActiveWin(); ScopedVclPtr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog( pWin ? pWin->GetFrameWeld() : nullptr, aTitle, aDescription)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if(RET_OK == pDlg->Execute()) { diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx index 6cdc699b83a9..a5345c51fe87 100644 --- a/sc/source/ui/drawfunc/drtxtob1.cxx +++ b/sc/source/ui/drawfunc/drtxtob1.cxx @@ -87,11 +87,9 @@ bool ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs, aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScParagraphDlg( pViewData->GetDialogParent(), &aNewAttr)); - OSL_ENSURE(pDlg, "Dialog create fail!"); bool bRet = ( pDlg->Execute() == RET_OK ); if ( bRet ) diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx index 9753c2e8306d..3c0c8af9a1a0 100644 --- a/sc/source/ui/miscdlgs/redcom.cxx +++ b/sc/source/ui/miscdlgs/redcom.cxx @@ -35,7 +35,6 @@ ScRedComDialog::ScRedComDialog( weld::Window* pParent, const SfxItemSet& rCoreSe if(pFact) { pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext ); - OSL_ENSURE(pDlg, "Dialog creation failed!"); pDocShell=pShell; pDlg->DontChangeAuthor(); pDlg->HideAuthor(); diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx index bfc94fa35382..cf5aa5e36a01 100644 --- a/sc/source/ui/pagedlg/tphf.cxx +++ b/sc/source/ui/pagedlg/tphf.cxx @@ -187,12 +187,10 @@ IMPL_LINK_NOARG(ScHFPage, HFEditHdl, void*, void) : RID_SCDLG_HFED_FOOTER; ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScHFEditDlg( this, aDataSet, aStrPageStyle, nResId)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { aDataSet.Put( *pDlg->GetOutputItemSet() ); diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index 535c2b117812..7ddb851ff18f 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -199,11 +199,9 @@ void ScEditWindow::SetCharAttributes() SfxItemSet aSet( pEdView->GetAttribs() ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg( GetParent(), &aSet, pDocSh)); - OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->SetText( ScResId( STR_TEXTATTRS ) ); if ( pDlg->Execute() == RET_OK ) { diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx index 568e4b66999d..74bdd7c91632 100644 --- a/sc/source/ui/styleui/styledlg.cxx +++ b/sc/source/ui/styleui/styledlg.cxx @@ -59,7 +59,6 @@ ScStyleDlg::ScStyleDlg( vcl::Window* pParent, , m_nFooterId(0) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); switch ( nRscId ) { case RID_SCDLG_STYLES_PAR: // cell format styles diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index 26c45ecfbfc3..d15425eb92ad 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -179,7 +179,6 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() OUString aFilterString( aFilterName ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); if ( !bExport && aFilterString == ScDocShell::GetAsciiFilterName() ) { @@ -192,7 +191,6 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() pInStream.reset(utl::UcbStreamHelper::CreateStream( xInputStream )); ScopedVclPtr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg(nullptr, aPrivDatName, pInStream.get(), SC_IMPORTFILE)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { ScAsciiOptions aOptions; @@ -320,7 +318,6 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() ScopedVclPtr<AbstractScImportOptionsDlg> pDlg(pFact->CreateScImportOptionsDlg( bAscii, &aOptions, &aTitle, bDBEnc, !bExport)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { pDlg->SaveImportOptions(); diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index a531cf5844e2..2299c022220e 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -876,11 +876,9 @@ ScVbaWorksheet::ShowDataForm( ) ScTabViewShell* pTabViewShell = excel::getBestViewShell( xModel ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScDataFormDlg> pDlg(pFact->CreateScDataFormDlg(pTabViewShell->GetDialogParent(), pTabViewShell)); - OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->Execute(); } diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index feb677e6a335..2d42839f055b 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -291,10 +291,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) bool bTheFlag=(pDoc->GetChangeTrack()!=nullptr); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScInsertCellDlg> pDlg(pFact->CreateScInsertCellDlg(pTabViewShell->GetFrameWeld(), bTheFlag)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if (pDlg->Execute() == RET_OK) eCmd = pDlg->GetInsCellCmd(); } @@ -363,10 +361,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) (pDoc->GetChangeTrack() != nullptr); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScDeleteCellDlg> pDlg(pFact->CreateScDeleteCellDlg( pTabViewShell->GetFrameWeld(), bTheFlag )); - OSL_ENSURE(pDlg, "Dialog create fail!"); if (pDlg->Execute() == RET_OK) eCmd = pDlg->GetDelCellCmd(); @@ -426,10 +422,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if (aTester.IsEditable()) { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScDeleteContentsDlg> pDlg(pFact->CreateScDeleteContentsDlg(pTabViewShell->GetFrameWeld())); - OSL_ENSURE(pDlg, "Dialog create fail!"); ScDocument* pDoc = GetViewData()->GetDocument(); SCTAB nTab = GetViewData()->GetTabNo(); if ( pDoc->IsTabProtected(nTab) ) @@ -500,11 +494,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) else { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScInsertContentsDlg> pDlg(pFact->CreateScInsertContentsDlg(pTabViewShell->GetFrameWeld(), new OUString(ScResId(STR_FILL_TAB)))); - OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->SetFillMode(true); if (pDlg->Execute() == RET_OK) @@ -719,14 +711,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) } } ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScFillSeriesDlg> pDlg(pFact->CreateScFillSeriesDlg( pTabViewShell->GetFrameWeld(), *pDoc, eFillDir, eFillCmd, eFillDateCmd, aStartStr, fIncVal, fMaxVal, nPossDir)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( nStartCol != nEndCol && nStartRow != nEndRow ) { @@ -1123,12 +1113,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if ( pTabViewShell->HasSelectionForDateGroup( aNumInfo, nParts ) ) { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE( pFact, "ScAbstractFactory create fail!" ); const Date& rNullDate( GetViewData()->GetDocument()->GetFormatTable()->GetNullDate() ); ScopedVclPtr<AbstractScDPDateGroupDlg> pDlg( pFact->CreateScDPDateGroupDlg( pTabViewShell->GetDialogParent(), aNumInfo, nParts, rNullDate ) ); - OSL_ENSURE( pDlg, "Dialog create fail!" ); if( pDlg->Execute() == RET_OK ) { aNumInfo = pDlg->GetGroupInfo(); @@ -1138,10 +1126,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) else if ( pTabViewShell->HasSelectionForNumGroup( aNumInfo ) ) { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE( pFact, "ScAbstractFactory create fail!" ); ScopedVclPtr<AbstractScDPNumGroupDlg> pDlg( pFact->CreateScDPNumGroupDlg( pTabViewShell->GetDialogParent(), aNumInfo ) ); - OSL_ENSURE( pDlg, "Dialog create fail!" ); if( pDlg->Execute() == RET_OK ) pTabViewShell->NumGroupDataPilot( pDlg->GetGroupInfo() ); } @@ -1176,10 +1162,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) else { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScGroupDlg> pDlg(pFact->CreateAbstractScGroupDlg(pTabViewShell->GetFrameWeld())); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) bColumns = pDlg->GetColsChecked(); else @@ -1236,10 +1220,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if ( bColPoss && bRowPoss && !comphelper::LibreOfficeKit::isActive() ) { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScGroupDlg> pDlg(pFact->CreateAbstractScGroupDlg(pTabViewShell->GetFrameWeld(), true)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) bColumns = pDlg->GetColsChecked(); else @@ -1379,10 +1361,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if (aTester.IsEditable()) { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScInsertContentsDlg> pDlg(pFact->CreateScInsertContentsDlg(pTabViewShell->GetFrameWeld())); - OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->SetOtherDoc( bOtherDoc ); // if ChangeTrack MoveMode disable pDlg->SetChangeTrack( pDoc->GetChangeTrack() != nullptr ); @@ -1824,10 +1804,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) CreateNameFlags nFlags = pTabViewShell->GetCreateNameFlags(); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScNameCreateDlg> pDlg(pFact->CreateScNameCreateDlg(pTabViewShell->GetFrameWeld(), nFlags)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if( pDlg->Execute() ) { @@ -2147,10 +2125,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case FID_INSERT_NAME: { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScNamePasteDlg> pDlg(pFact->CreateScNamePasteDlg( pTabViewShell->GetDialogParent(), GetViewData()->GetDocShell() )); - OSL_ENSURE(pDlg, "Dialog create fail!"); switch( pDlg->Execute() ) { case BTN_PASTE_LIST: @@ -2617,12 +2593,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) else { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); pImpl->m_pLinkedDlg.disposeAndClear(); pImpl->m_pLinkedDlg = pFact->CreateScLinkedAreaDlg(pTabViewShell->GetFrameWeld()); - OSL_ENSURE(pImpl->m_pLinkedDlg, "Dialog create fail!"); delete pImpl->m_pRequest; pImpl->m_pRequest = new SfxRequest( rReq ); OUString sFile, sFilter, sOptions, sSource; @@ -2818,7 +2792,6 @@ void ScCellShell::ExecuteDataPilotDialog() bool bEnableExt = ScDPObject::HasRegisteredSources(); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScDataPilotSourceTypeDlg> pTypeDlg( pFact->CreateScDataPilotSourceTypeDlg( @@ -2833,7 +2806,6 @@ void ScCellShell::ExecuteDataPilotDialog() pTypeDlg->AppendNamedRange(itr->second->GetName()); } - OSL_ENSURE(pTypeDlg, "Dialog create fail!"); if ( pTypeDlg->Execute() == RET_OK ) { if ( pTypeDlg->IsExternal() ) @@ -2843,7 +2815,6 @@ void ScCellShell::ExecuteDataPilotDialog() pFact->CreateScDataPilotServiceDlg( pTabViewShell->GetFrameWeld(), aSources)); - OSL_ENSURE(pServDlg, "Dialog create fail!"); if ( pServDlg->Execute() == RET_OK ) { ScDPServiceDesc aServDesc( diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 2236af146366..65d781793d65 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -186,10 +186,8 @@ static bool lcl_GetSortParam( const ScViewData* pData, const ScSortParam& rSortP OUString aCurrentStr( aCurrentRange.Format(ScRefFlags::VALID, pDoc)); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScSortWarningDlg> pWarningDlg(pFact->CreateScSortWarningDlg(pTabViewShell->GetFrameWeld(), aExtendStr, aCurrentStr)); - OSL_ENSURE(pWarningDlg, "Dialog create fail!"); short bResult = pWarningDlg->Execute(); if( bResult == BTN_EXTEND_RANGE || bResult == BTN_CURRENT_SELECTION ) { @@ -340,11 +338,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) case SID_DATA_FORM: { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScDataFormDlg> pDlg(pFact->CreateScDataFormDlg( pTabViewShell->GetDialogParent(), pTabViewShell)); - OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->Execute(); @@ -745,10 +741,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) aList.push_back((*itr)->GetName()); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScSelEntryDlg> pDlg(pFact->CreateScSelEntryDlg(pTabViewShell->GetFrameWeld(), aList)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { OUString aName = pDlg->GetSelectedEntry(); diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index e56623f062e4..18a06369db1c 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -503,10 +503,8 @@ void ScCellShell::Execute( SfxRequest& rReq ) { bool bSheetProtected = pDoc->IsTabProtected(nTab); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScNewScenarioDlg> pNewDlg(pFact->CreateScNewScenarioDlg(pTabViewShell->GetDialogParent(), aName, false, bSheetProtected)); - OSL_ENSURE(pNewDlg, "Dialog create fail!"); if ( pNewDlg->Execute() == RET_OK ) { pNewDlg->GetScenarioData( aName, aComment, aColor, nFlags ); @@ -871,10 +869,8 @@ void ScCellShell::Execute( SfxRequest& rReq ) ScGlobal::ClearAutoFormat(); std::unique_ptr<ScAutoFormatData> pNewEntry(pTabViewShell->CreateAutoFormatData()); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScAutoFormatDlg> pDlg(pFact->CreateScAutoFormatDlg(pDlgParent, ScGlobal::GetOrCreateAutoFormat(), pNewEntry.get(), GetViewData())); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 0278a30a66a4..849f11f486d7 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -464,10 +464,8 @@ void ScEditShell::Execute( SfxRequest& rReq ) case FID_INSERT_NAME: { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScNamePasteDlg> pDlg(pFact->CreateScNamePasteDlg( pViewData->GetDialogParent(), pViewData->GetDocShell() )); - OSL_ENSURE(pDlg, "Dialog create fail!"); short nRet = pDlg->Execute(); // pDlg is needed below @@ -506,11 +504,9 @@ void ScEditShell::Execute( SfxRequest& rReq ) SfxObjectShell* pObjSh = pViewData->GetSfxDocShell(); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg( pViewData->GetDialogParent(), &aAttrs, pObjSh)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if (nSlot == SID_CHAR_DLG_EFFECT) { pDlg->SetCurPageId("fonteffects"); diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 9881ad3db05d..b4a5fa80fddf 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -858,10 +858,8 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) pTabViewShell->SetInFormatDialog(true); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); pDlg.disposeAndReset(pFact->CreateScStyleDlg( pParent, *pStyleSheet, nRsc, nRsc )); - OSL_ENSURE(pDlg, "Dialog create fail!"); short nResult = pDlg->Execute(); pTabViewShell->SetInFormatDialog(false); diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 9ca2b14bcab7..216f838b748a 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -203,12 +203,10 @@ void ScGridWindow::DoPushPivotButton( SCCOL nCol, SCROW nRow, const MouseEvent& aArgSet.Put( ScQueryItem( SCITEM_QUERYDATA, pViewData, &aQueryParam ) ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScPivotFilterDlg> pDlg( pFact->CreateScPivotFilterDlg( pViewData->GetViewShell()->GetDialogParent(), aArgSet, nSrcTab)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { ScSheetSourceDesc aNewDesc(pDoc); diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx index 750405f846a5..f069f075bb84 100644 --- a/sc/source/ui/view/pivotsh.cxx +++ b/sc/source/ui/view/pivotsh.cxx @@ -102,11 +102,9 @@ void ScPivotShell::Execute( const SfxRequest& rReq ) aArgSet.Put( ScQueryItem( SCITEM_QUERYDATA, &rViewData, &aQueryParam ) ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScPivotFilterDlg> pDlg(pFact->CreateScPivotFilterDlg( pViewShell->GetDialogParent(), aArgSet, nSrcTab)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if( pDlg->Execute() == RET_OK ) { diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 336c612fa6f3..8aef31ae8889 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -518,7 +518,6 @@ bool ScPreviewShell::HasPrintOptionsPage() const VclPtr<SfxTabPage> ScPreviewShell::CreatePrintOptionsPage(weld::Container* pPage, const SfxItemSet &rOptions) { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc(RID_SC_TP_PRINT); if ( ScTpPrintOptionsCreate ) return ScTpPrintOptionsCreate(pPage, &rOptions); @@ -622,7 +621,6 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) if(pFact) { ScopedVclPtr<AbstractSvxZoomDialog> pDlg(pFact->CreateSvxZoomDialog(nullptr, aSet)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->SetLimits( 20, 400 ); pDlg->HideButton( ZoomButtonId::OPTIMAL ); bCancel = ( RET_CANCEL == pDlg->Execute() ); diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 5e5932bad002..7ee3978f30ac 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -727,7 +727,6 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { vcl::Window* pWin = GetDialogParent(); pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(pWin ? pWin->GetFrameWeld() : nullptr, aSet)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); } if (pDlg) { @@ -848,10 +847,8 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) else { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScShowTabDlg> pDlg(pFact->CreateScShowTabDlg(GetFrameWeld())); - OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->SetDescription( ScResId( STR_DLG_SELECTTABLES_TITLE ), ScResId( STR_DLG_SELECTTABLES_LBNAME ), diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 401cca9ebd95..6012975b26a6 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1052,7 +1052,6 @@ bool ScTabViewShell::HasPrintOptionsPage() const VclPtr<SfxTabPage> ScTabViewShell::CreatePrintOptionsPage(weld::Container* pPage, const SfxItemSet &rOptions ) { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc(RID_SC_TP_PRINT); if ( ScTpPrintOptionsCreate ) return ScTpPrintOptionsCreate(pPage, &rOptions); diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 2287dc0d4038..42a1245ef8c4 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -534,7 +534,6 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName bInFormatDialog = true; ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScAttrDlg(GetDialogParent(), pOldSet.get())); diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 83056b0ea4b6..7922fdfcdea1 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -134,10 +134,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) else { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); VclPtr<AbstractScShowTabDlg> pDlg(pFact->CreateScShowTabDlg(GetFrameWeld())); - OSL_ENSURE(pDlg, "Dialog create fail!"); OUString aTabName; bool bFirst = true; @@ -216,11 +214,9 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) else // dialog { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScInsertTableDlg> pDlg(pFact->CreateScInsertTableDlg(GetFrameWeld(), rViewData, nTabSelCount, nSlot == FID_INS_TABLE_EXT)); - OSL_ENSURE(pDlg, "Dialog create fail!"); if ( RET_OK == pDlg->Execute() ) { if (pDlg->GetTablesFromFile()) @@ -394,7 +390,6 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) } ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); vcl::Window* pWin = GetDialogParent(); ScopedVclPtr<AbstractScStringInputDlg> pDlg(pFact->CreateScStringInputDlg( @@ -402,7 +397,6 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) aName, GetStaticInterface()->GetSlot(nSlot)->GetCommand(), pHelpId)); - OSL_ENSURE(pDlg, "Dialog create fail!"); while ( !bDone && nRet == RET_OK ) { @@ -520,11 +514,9 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) pDoc->GetName( rViewData.GetTabNo(), aDefaultName ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScMoveTableDlg> pDlg(pFact->CreateScMoveTableDlg(GetFrameWeld(), aDefaultName)); - OSL_ENSURE(pDlg, "Dialog create fail!"); SCTAB nTableCount = pDoc->GetTableCount(); ScMarkData& rMark = GetViewData().GetMarkData(); @@ -785,7 +777,6 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) aTabBgColor = pDoc->GetTabBgColor( nCurrentTab ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScTabBgColorDlg> pDlg(pFact->CreateScTabBgColorDlg( GetFrameWeld(), ScResId(SCSTR_SET_TAB_BG_COLOR), diff --git a/sd/source/ui/dlg/dlgchar.cxx b/sd/source/ui/dlg/dlgchar.cxx index 6fcc3f727073..4075a5995388 100644 --- a/sd/source/ui/dlg/dlgchar.cxx +++ b/sd/source/ui/dlg/dlgchar.cxx @@ -40,7 +40,6 @@ SdCharDlg::SdCharDlg( vcl::Window* pParent, const SfxItemSet* pAttr, { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); mnCharName = AddTabPage( "RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), nullptr ); mnCharEffects = AddTabPage( "RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), nullptr ); diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx index b3577e8c795f..1556efdfdccb 100644 --- a/sd/source/ui/dlg/dlgpage.cxx +++ b/sd/source/ui/dlg/dlgpage.cxx @@ -52,7 +52,6 @@ SdPageDlg::SdPageDlg( SfxObjectShell const * pDocSh, vcl::Window* pParent, const mpPatternList = pPatternListItem->GetPatternList(); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); mnPage = AddTabPage( "RID_SVXPAGE_PAGE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), nullptr ); mnArea = AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), nullptr ); diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index 7f384937f0d0..f633be3adb5e 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -132,7 +132,6 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh, pPatternList = pPatternListItem->GetPatternList(); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); mnLine = AddTabPage( "RID_SVXPAGE_LINE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), nullptr ); mnArea = AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), nullptr ); diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 18b9b01b24cc..cb86bafb5a8c 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -880,12 +880,10 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest) OUString aPageName = pSelectedPage->GetName(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialog creation failed!"); vcl::Window* pWin = mrSlideSorter.GetContentWindow(); ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog( pWin ? pWin->GetFrameWeld() : nullptr, aPageName, aDescr)); - DBG_ASSERT(aNameDlg, "Dialog creation failed!"); aNameDlg->SetText( aTitle ); aNameDlg->SetCheckNameHdl( LINK( this, SlotManager, RenameSlideHdl ), true ); aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE ); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 62bcd90f4bbc..d1280bae129a 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -787,9 +787,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) OUString aPageName = pCurrentPage->GetName(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aPageName, aDescr)); - DBG_ASSERT(aNameDlg, "Dialog creation failed!"); aNameDlg->SetText( aTitle ); aNameDlg->SetCheckNameHdl( LINK( this, DrawViewShell, RenameSlideHdl ), true ); aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE ); @@ -2505,9 +2503,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) OUString aName(pSelected->GetName()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(GetFrameWeld(), aName)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->SetCheckNameHdl(LINK(this, DrawViewShell, NameObjectHdl)); @@ -2538,10 +2534,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) OUString aDescription(pSelected->GetDescription()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog( GetFrameWeld(), aTitle, aDescription)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if(RET_OK == pDlg->Execute()) { diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx index ccc8e2148e99..3d7a7daf0df7 100644 --- a/svx/source/dialog/grfflt.cxx +++ b/svx/source/dialog/grfflt.cxx @@ -78,7 +78,6 @@ SvxGraphicFilterResult SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest const if(pFact) { ScopedVclPtr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterSmooth(pWindow, rGraphic, 0.7)); - DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); } @@ -166,7 +165,6 @@ SvxGraphicFilterResult SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest const if(pFact) { ScopedVclPtr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterMosaic(pWindow, rGraphic)); - DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); } @@ -179,7 +177,6 @@ SvxGraphicFilterResult SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest const if(pFact) { ScopedVclPtr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterEmboss(pWindow, rGraphic)); - DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); } @@ -192,7 +189,6 @@ SvxGraphicFilterResult SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest const if(pFact) { ScopedVclPtr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterPoster(pWindow, rGraphic)); - DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); } @@ -230,7 +226,6 @@ SvxGraphicFilterResult SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest const if(pFact) { ScopedVclPtr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterSepia(pWindow, rGraphic)); - DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); } @@ -243,7 +238,6 @@ SvxGraphicFilterResult SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest const if(pFact) { ScopedVclPtr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterSolarize(pWindow, rGraphic)); - DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); } diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 698fb4eccf2a..39e0a3d44dbb 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -91,7 +91,6 @@ namespace svx { if(pFact) { ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxBorderBackgroundDlg( pParent, *pBBSet, false/*bEnableDrawingLayerFillStyles*/ )); - DBG_ASSERT(pDlg, "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK && pDlg->GetOutputItemSet() ) { SfxItemIter aIter( *pDlg->GetOutputItemSet() ); @@ -676,7 +675,6 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, Button*, void) *pBBSet, mbEnableDrawingLayerFillStyles)); - DBG_ASSERT(pDlg,"Dialog creation failed!"); if(RET_OK == pDlg->Execute() && pDlg->GetOutputItemSet()) { SfxItemIter aIter(*pDlg->GetOutputItemSet()); diff --git a/svx/source/dialog/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx index 24eedbfd78f1..20cb0dcecbd4 100644 --- a/svx/source/dialog/hyperdlg.cxx +++ b/svx/source/dialog/hyperdlg.cxx @@ -41,9 +41,7 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialog creation failed!"); mpDlg = pFact->CreateSvxHpLinkDlg(_pParent, pBindings); - DBG_ASSERT(mpDlg, "Dialog creation failed!"); SetWindow( mpDlg->GetWindow() ); SetVisible_Impl(false); diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index e30c992e7d03..d17d6f52b692 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -690,7 +690,6 @@ void IMapWindow::DoPropertyDialog() { ScopedVclPtr<AbstractURLDlg> aDlg(pFact->CreateURLDialog( this, pIMapObj->GetURL(), pIMapObj->GetAltText(), pIMapObj->GetDesc(), pIMapObj->GetTarget(), pIMapObj->GetName(), aTargetList )); - DBG_ASSERT(aDlg, "Dialog creation failed!"); if ( aDlg->Execute() == RET_OK ) { const OUString aURLText( aDlg->GetURL() ); diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 406b87d2ce7b..1df659a36941 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1419,7 +1419,6 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void ) pSearchItem->GetLEVOther(), pSearchItem->GetLEVShorter(), pSearchItem->GetLEVLonger() )); - DBG_ASSERT(pDlg, "Dialog creation failed!"); if ( pDlg && pDlg->Execute() == RET_OK ) { pSearchItem->SetLEVRelaxed( pDlg->IsRelaxed() ); @@ -1439,7 +1438,6 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void ) { ScopedVclPtr<AbstractSvxJSearchOptionsDialog> aDlg(pFact->CreateSvxJSearchOptionsDialog( this, aSet, pSearchItem->GetTransliterationFlags() )); - DBG_ASSERT(aDlg, "Dialog creation failed!"); int nRet = aDlg->Execute(); if (RET_OK == nRet) //! true only if FillItemSet of SvxJSearchOptionsPage returns true { @@ -2035,7 +2033,6 @@ IMPL_LINK_NOARG(SvxSearchDialog, FormatHdl_Impl, Button*, void) if(pFact) { ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTabItemDialog(this, aSet)); - DBG_ASSERT(pDlg, "Dialog creation failed!"); pDlg->SetText( aTxt ); if ( pDlg->Execute() == RET_OK ) @@ -2119,7 +2116,6 @@ IMPL_LINK_NOARG(SvxSearchDialog, AttributeHdl_Impl, Button*, void) if(pFact) { ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSvxSearchAttributeDialog( this, *pSearchList, pImpl->pRanges.get() )); - DBG_ASSERT(pDlg, "Dialog creation failed!"); pDlg->Execute(); } PaintAttrText_Impl(); diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index fae0a2cbf853..984a4b10a883 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -896,7 +896,6 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe if(pFact) { ScopedVclPtr<AbstractFmShowColsDialog> pDlg(pFact->CreateFmShowColsDialog()); - DBG_ASSERT(pDlg, "Dialog creation failed!"); pDlg->SetColumns(xCols); pDlg->Execute(); } diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index d2d2fdf24e96..aace131faea1 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -732,7 +732,6 @@ void FmFormShell::Execute(SfxRequest &rReq) if ( pFact ) { ScopedVclPtr<AbstractFmInputRecordNoDialog> dlg(pFact->CreateFmInputRecordNoDialog(rReq.GetFrameWeld())); - assert(dlg.get() && "Dialog creation failed!"); dlg->SetValue( rController->getCursor()->getRow() ); if ( dlg->Execute() == RET_OK ) nRecord = dlg->GetValue(); diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 93d60ae548aa..992aab0546d6 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -348,7 +348,6 @@ void GalleryBrowser1::ImplExecute(const OString &rIdent) if(pFact) { ScopedVclPtr<VclAbstractRefreshableDialog> aActualizeProgress(pFact->CreateActualizeProgressDialog( this, pTheme )); - DBG_ASSERT(aActualizeProgress, "Dialog creation failed!"); aActualizeProgress->Update(); aActualizeProgress->Execute(); @@ -368,9 +367,7 @@ void GalleryBrowser1::ImplExecute(const OString &rIdent) const OUString aOldName( pTheme->GetName() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - assert(pFact && "Dialog creation failed!"); ScopedVclPtr<AbstractTitleDialog> aDlg(pFact->CreateTitleDialog(GetFrameWeld(), aOldName)); - assert(aDlg.get() && "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) { @@ -404,7 +401,6 @@ void GalleryBrowser1::ImplExecute(const OString &rIdent) if(pFact) { ScopedVclPtr<AbstractGalleryIdDialog> aDlg(pFact->CreateGalleryIdDialog(GetFrameWeld(), pTheme)); - DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) pTheme->SetId( aDlg->GetId(), true ); diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index dc7d4ff6a386..6838801883f6 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -1121,7 +1121,6 @@ void GalleryBrowser2::Execute(const OString &rIdent) if(pFact) { ScopedVclPtr<AbstractTitleDialog> aDlg(pFact->CreateTitleDialog(GetFrameWeld(), aOldTitle)); - DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) { OUString aNewTitle( aDlg->GetTitle() ); diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 9adec973de3d..8d905be3971a 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -771,7 +771,6 @@ void SdrEditView::DistributeMarkedObjects() if(pFact) { ScopedVclPtr<AbstractSvxDistributeDialog> pDlg(pFact->CreateSvxDistributeDialog(aNewAttr)); - DBG_ASSERT(pDlg, "Dialog creation failed!"); sal_uInt16 nResult = pDlg->Execute(); diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 3e19d9958b85..4d9b24e52e41 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -704,9 +704,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) const OUString aCropStr(SvxResId(RID_SVXSTR_GRAFCROP)); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - assert(pFact && "Dialog creation failed!"); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_GRFCROP ); - assert(fnCreatePage && "Dialog creation failed!"); VclPtr<SfxTabPage> pTabPage = (*fnCreatePage)( aCropDialog->get_content_area(), &aCropDlgAttr ); pTabPage->SetText( aCropStr ); diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index cb522a9a0825..8680340f7819 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -70,7 +70,6 @@ SwCharDlg::SwCharDlg(vcl::Window* pParent, SwView& rVw, const SfxItemSet& rCoreS SetText(GetText() + SwResId(STR_TEXTCOLL_HEADER) + *pStr + ")"); } SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); m_nCharStdId = AddTabPage("font", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), nullptr); m_nCharExtId = AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), nullptr); m_nCharPosId = AddTabPage("position", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), nullptr ); diff --git a/sw/source/ui/chrdlg/tblnumfm.cxx b/sw/source/ui/chrdlg/tblnumfm.cxx index 0946178626c3..ddcad7961029 100644 --- a/sw/source/ui/chrdlg/tblnumfm.cxx +++ b/sw/source/ui/chrdlg/tblnumfm.cxx @@ -33,7 +33,6 @@ SwNumFormatDlg::SwNumFormatDlg(vcl::Window* pParent, const SfxItemSet& rSet) { // Create TabPage SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ); if ( fnCreatePage ) diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index d1bd4b95d96b..98accb38e18e 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -762,7 +762,6 @@ IMPL_LINK( SwInsertDBColAutoPilot, TableFormatHdl, Button*, pButton, void ) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwTableTabDlg(pButton, pTableSet, &rSh)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute() ) pTableSet->Put( *pDlg->GetOutputItemSet() ); else if( bNewSet ) @@ -780,7 +779,6 @@ IMPL_LINK( SwInsertDBColAutoPilot, AutoFormatHdl, Button*, pButton, void ) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(pButton->GetFrameWeld(), pView->GetWrtShellPtr(), false, m_xTAutoFormat.get())); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute()) m_xTAutoFormat.reset(pDlg->FillAutoFormatOfIndex()); } diff --git a/sw/source/ui/dialog/addrdlg.cxx b/sw/source/ui/dialog/addrdlg.cxx index fc4e2e37c465..bbc945cfe424 100644 --- a/sw/source/ui/dialog/addrdlg.cxx +++ b/sw/source/ui/dialog/addrdlg.cxx @@ -26,7 +26,6 @@ SwAddrDlg::SwAddrDlg(vcl::Window* pParent, const SfxItemSet& rSet) : SfxSingleTabDialog(pParent, rSet) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SFXPAGE_GENERAL ); if ( fnCreatePage ) { diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 2d42cbfeb582..da6a099e4beb 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1418,7 +1418,6 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog( , rWrtSh(rSh) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); m_nSectionPageId = AddTabPage("section", SwInsertSectionTabPage::Create, nullptr); m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, nullptr); m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), nullptr); @@ -2070,7 +2069,6 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog( , rWrtSh(rSh) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, nullptr); m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), nullptr ); m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, nullptr); diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index b46b795fdaac..98834e3d443c 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -256,7 +256,6 @@ void SwEnvFormatPage::Edit(const OString& rIdent, bool bSender) const OUString sFormatStr = pColl->GetName(); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg(nullptr /*TODO*/, pSh->GetView(), aTmpSet, SwCharDlgMode::Env, &sFormatStr)); //ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, SwCharDlgMode::Env, &sFormatStr)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if (pDlg->Execute() == RET_OK) { SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() ); diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index ab8e4f1483f4..59df5627aee7 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -327,7 +327,6 @@ IMPL_LINK_NOARG(SwFieldEditDlg, AddressHdl, Button*, void) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSwAddressAbstractDlg(this, aSet)); - assert(pDlg && "Dialog creation failed!"); if (RET_OK == pDlg->Execute()) { pSh->UpdateFields( *pCurField ); diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 500fa8194919..fb8f7b4c18ed 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -106,7 +106,6 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent, { nHtmlMode = ::GetHtmlMode(pWrtShell->GetView().GetDocShell()); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); // tinker TabPages together switch( nRegion ) { diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index 178ed41f3fd1..2f9b8d3016e2 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -95,7 +95,6 @@ SwFrameDlg::SwFrameDlg( SfxViewFrame const * pViewFrame, m_nColumnId = AddTabPage("columns", SwColumnPage::Create, nullptr); } SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); // remove? // m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0); diff --git a/sw/source/ui/frmdlg/pattern.cxx b/sw/source/ui/frmdlg/pattern.cxx index c7c54cac7841..332601519f7e 100644 --- a/sw/source/ui/frmdlg/pattern.cxx +++ b/sw/source/ui/frmdlg/pattern.cxx @@ -29,7 +29,6 @@ SwBackgroundDlg::SwBackgroundDlg(vcl::Window* pParent, const SfxItemSet& rSet) { SetText(SwResId(STR_FRMUI_PATTERN)); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ); if ( fnCreatePage ) { diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx index a934461d3b1d..ae6b14c55202 100644 --- a/sw/source/ui/frmdlg/uiborder.cxx +++ b/sw/source/ui/frmdlg/uiborder.cxx @@ -36,7 +36,6 @@ SwBorderDlg::SwBorderDlg(vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes n SetText(SwResId(STR_FRMUI_BORDER)); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ); if ( fnCreatePage ) diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 7324a4f44c41..ef3b40be1a12 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -294,7 +294,6 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet& } } SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); m_nSelectId = AddTabPage("index", SwTOXSelectTabPage::Create, nullptr); AddTabPage("styles", SwTOXStylesTabPage::Create, nullptr); m_nColumnId = AddTabPage("columns", SwColumnPage::Create, nullptr); diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 24d9f8f4e77a..1b9395d4c1f7 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -193,7 +193,6 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, Button*, void) SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<AbstractSwRenameXNamedDlg> pDlg(pFact->CreateSwRenameXNamedDlg(GetFrameWeld(), xNamed, xNameAccess)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->SetForbiddenChars(BookmarkTable::aForbiddenChars + OUStringLiteral1(BookmarkTable::cSeparator)); if (pDlg->Execute()) diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index c62a67a214c6..88df3b3926a5 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -1038,7 +1038,6 @@ IMPL_LINK_NOARG( SwGlossaryDlg, PathHdl, Button *, void ) if(pFact) { ScopedVclPtr<AbstractSvxMultiPathDialog> pDlg(pFact->CreateSvxPathSelectDialog(GetFrameWeld())); - OSL_ENSURE(pDlg, "Dialog creation failed!"); SvtPathOptions aPathOpt; const OUString sGlosPath( aPathOpt.GetAutoTextPath() ); pDlg->SetPath(sGlosPath); diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 066ad5f51a99..0e140f0866f6 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -176,7 +176,6 @@ IMPL_LINK_NOARG(SwConvertTableDlg, AutoFormatHdl, weld::Button&, void) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(m_xDialog.get(), pShell, false, mxTAutoFormat.get())); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if (RET_OK == pDlg->Execute()) mxTAutoFormat.reset(pDlg->FillAutoFormatOfIndex()); } diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index ae260c093031..32351f453f95 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1197,7 +1197,6 @@ SwTableTabDlg::SwTableTabDlg(vcl::Window* pParent, , pShell(pSh) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); AddTabPage("table", &SwFormatTablePage::Create, nullptr); m_nTextFlowId = AddTabPage("textflow", &SwTextFlowPage::Create, nullptr); AddTabPage("columns", &SwTableColumnPage::Create, nullptr); diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx index 7b9a927d3df0..f9732a261a89 100644 --- a/sw/source/uibase/app/appenv.cxx +++ b/sw/source/uibase/app/appenv.cxx @@ -215,7 +215,6 @@ void SwModule::InsertEnv( SfxRequest& rReq ) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); pDlg.disposeAndReset(pFact->CreateSwEnvDlg(pParent ? pParent->GetFrameWeld() : nullptr, aSet, pOldSh, pTempPrinter, !bEnvChange)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); nMode = pDlg->Execute(); } else diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index ce01e26863aa..769d9d2cef71 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -103,7 +103,6 @@ static const SwFrameFormat *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& if(!rItem.m_bSynchron || !(nCol|nRow)) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc(); if ( fnSetActGroup ) (*fnSetActGroup)( rItem.m_sGlossaryGroup ); @@ -176,7 +175,6 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) NULL, #endif bLabel)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if ( RET_OK != pDlg->Execute() ) return; diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index a6b11a5f4500..b00e8a8b2fef 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -765,7 +765,6 @@ void SwDocShell::Execute(SfxRequest& rReq) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<AbstractSwInsertAbstractDlg> pDlg(pFact->CreateSwInsertAbstractDlg()); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if(RET_OK == pDlg->Execute()) { sal_uInt8 nLevel = pDlg->GetLevel(); diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 9b29507fa46b..c1ea6ec85357 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -3090,7 +3090,6 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh, sDataTableOrQuery, nCmdType, xConnection); - assert( pImpl->pMergeDialog && "Dialog creation failed!" ); if(pImpl->pMergeDialog->Execute() == RET_OK) { aDescriptor[svx::DataAccessDescriptorProperty::Selection] <<= pImpl->pMergeDialog->GetSelection(); @@ -3196,7 +3195,6 @@ void SwDBManager::InsertText(SwWrtShell& rSh, xSource, xColSupp, aDBData )); - assert( pDlg && "Dialog creation failed!" ); if( RET_OK == pDlg->Execute() ) { OUString sDummy; 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<AbstractInsertSectionTabDialog> 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<AbstractInsertSectionTabDialog> 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<AbstractEditRegionDlg> pEditRegionDlg(pFact->CreateEditRegionDlg(pParentWin, rWrtShell)); - OSL_ENSURE(pEditRegionDlg, "Dialog creation failed!"); if(pItem && dynamic_cast< const SfxStringItem *>( pItem ) != nullptr) { pEditRegionDlg->SelectSection(static_cast<const SfxStringItem*>(pItem)->GetValue()); diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index bb6df864bb55..8b93fb6545be 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -75,9 +75,7 @@ struct TextBlockInfo_Impl void SwGlossaryHdl::GlossaryDlg() { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "Dialog creation failed!"); ScopedVclPtr<AbstractGlossaryDlg> pDlg(pFact->CreateGlossaryDlg(pViewFrame, this, pWrtShell)); - assert(pDlg && "Dialog creation failed!"); OUString sName; OUString sShortName; @@ -354,9 +352,7 @@ bool SwGlossaryHdl::ExpandGlossary() OSL_ENSURE(pWrtShell->CanInsert(), "illegal"); SwTextBlocks *pGlossary; SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "Dialog creation failed!"); ::GlossaryGetCurrGroup fnGetCurrGroup = pFact->GetGlossaryCurrGroupFunc(); - assert(fnGetCurrGroup && "Dialog creation failed!"); OUString sGroupName( (*fnGetCurrGroup)() ); if (sGroupName.indexOf(GLOS_DELIM)<0) FindGroupName(sGroupName); @@ -439,7 +435,6 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, assert(pFact && "SwAbstractDialogFactory fail!"); ScopedVclPtr<AbstractSwSelGlossaryDlg> pDlg(pFact->CreateSwSelGlossaryDlg(aShortName)); - assert(pDlg && "Dialog creation failed!"); for(TextBlockInfo_Impl & i : aFoundArr) { pDlg->InsertGlos(i.sTitle, i.sLongName); diff --git a/sw/source/uibase/fldui/fldwrap.cxx b/sw/source/uibase/fldui/fldwrap.cxx index 697f183d7445..d1f79d6473fe 100644 --- a/sw/source/uibase/fldui/fldwrap.cxx +++ b/sw/source/uibase/fldui/fldwrap.cxx @@ -79,7 +79,6 @@ SwFieldDlgWrapper::SwFieldDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert(pFact && "SwAbstractDialogFactory fail!"); pDlgInterface = pFact->CreateSwFieldDlg(pB, this, _pParent); - assert(pDlgInterface && "Dialog creation failed!"); SetWindow( pDlgInterface->GetWindow() ); pDlgInterface->Start(); } @@ -121,7 +120,6 @@ SwFieldDataOnlyDlgWrapper::SwFieldDataOnlyDlgWrapper( vcl::Window* _pParent, sal OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); pDlgInterface = pFact->CreateSwFieldDlg(pB, this, _pParent); - OSL_ENSURE(pDlgInterface, "Dialog creation failed!"); SetWindow( pDlgInterface->GetWindow() ); pDlgInterface->ActivateDatabasePage(); diff --git a/sw/source/uibase/index/idxmrk.cxx b/sw/source/uibase/index/idxmrk.cxx index 5435d176dc17..cd30b9e1a4b3 100644 --- a/sw/source/uibase/index/idxmrk.cxx +++ b/sw/source/uibase/index/idxmrk.cxx @@ -51,7 +51,6 @@ SwInsertIdxMarkWrapper::SwInsertIdxMarkWrapper( vcl::Window *pParentWindow, SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert(pFact && "SwAbstractDialogFactory fail!"); pAbstDlg = pFact->CreateIndexMarkFloatDlg(pBindings, this, pParentWindow, pInfo); - assert(pAbstDlg && "Dialog creation failed!"); SetWindow( pAbstDlg->GetWindow() ); GetWindow()->Show(); // at this point,because before pSh has to be initialized in ReInitDlg() // -> Show() will invoke StateChanged() and save pos @@ -80,7 +79,6 @@ SwInsertAuthMarkWrapper::SwInsertAuthMarkWrapper( vcl::Window *pParentWindow, SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); pAbstDlg = pFact->CreateAuthMarkFloatDlg(pBindings, this, pParentWindow, pInfo); - OSL_ENSURE(pAbstDlg, "Dialog creation failed!"); SetWindow( pAbstDlg->GetWindow() ); } diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index e6de1254c8b6..1c1d40962749 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -1076,9 +1076,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void) OUString sComment = convertLineEnd(rRedline.GetComment(), GetSystemLineEnd()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ::DialogGetRanges fnGetRange = pFact->GetDialogGetRangesFunc(); - OSL_ENSURE(fnGetRange, "Dialog creation failed! GetRanges()"); SfxItemSet aSet( pSh->GetAttrPool(), fnGetRange() ); aSet.Put(SvxPostItTextItem(sComment, SID_ATTR_POSTIT_TEXT)); @@ -1089,7 +1087,6 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void) SID_ATTR_POSTIT_DATE )); ScopedVclPtr<AbstractSvxPostItDialog> pDlg(pFact->CreateSvxPostItDialog(m_pParentDlg->GetFrameWeld(), aSet)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->HideAuthor(); diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 31f5efd1104e..1dd1190915a2 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -145,7 +145,6 @@ IMPL_STATIC_LINK(SwTbxAutoTextCtrl, PopupHdl, Menu*, pMenu, bool) SwGlossaryHdl* pGlosHdl = ::GetActiveView()->GetGlosHdl(); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc(); if ( fnSetActGroup ) (*fnSetActGroup)( sGroup ); diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index 06be285e36f2..f105072c0443 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -485,7 +485,6 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg( rView.GetWindow(), rView, aDlgAttr, SwCharDlgMode::Ann)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if (nSlot == SID_CHAR_DLG_EFFECT) { pDlg->SetCurPageId("fonteffects"); @@ -537,7 +536,6 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr, true )); - OSL_ENSURE(pDlg, "Dialog creation failed!"); sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet) { diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 234daac5e1f3..8180958d55b9 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -876,7 +876,6 @@ void SwBaseShell::Execute(SfxRequest &rReq) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<AbstractSwConvertTableDlg> pDlg(pFact->CreateSwConvertTableDlg(GetView(), bToTable)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute() ) { pDlg->GetValues( cDelim, aInsTableOpts, pTAFormat ); @@ -2473,7 +2472,6 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); pDlg.disposeAndReset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::TABLE )); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK ) { rSh.SetTabBorders( *pDlg->GetOutputItemSet() ); @@ -2490,7 +2488,6 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); pDlg.disposeAndReset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::FRAME )); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK ) { aMgr.SetAttrSet( *pDlg->GetOutputItemSet() ); @@ -2508,7 +2505,6 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); pDlg.disposeAndReset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::PARA )); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK ) { rSh.SetAttrSet( *pDlg->GetOutputItemSet() ); @@ -2538,7 +2534,6 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) SvxBrushItem aBrush(RES_BACKGROUND); rSh.GetBoxBackground( aBrush ); pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(pMDI, aSet)); - assert(pDlg && "Dialog creation failed!"); aSet.Put( aBrush ); if ( pDlg->Execute() == RET_OK ) { @@ -2553,7 +2548,6 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) rSh.GetFlyFrameAttr( aSet ); pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(pMDI, aSet)); - assert(pDlg && "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK ) { rSh.SetFlyFrameAttr(const_cast<SfxItemSet &>(*pDlg->GetOutputItemSet()) ); @@ -2566,7 +2560,6 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) rSh.GetCurAttr( aSet ); pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(pMDI, aSet)); - assert(pDlg && "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK ) { rSh.SetAttrSet( *pDlg->GetOutputItemSet() ); @@ -2675,9 +2668,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) if( !nCols || !nRows ) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractInsTableDlg> pDlg(pFact->CreateInsTableDlg(rTempView)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute() ) { pDlg->GetValues( aTableName, nRows, nCols, aInsTableOpts, aAutoName, pTAFormat ); @@ -2894,7 +2885,6 @@ void SwBaseShell::ExecField( SfxRequest const & rReq ) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwChangeDBDlg(GetView())); - OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->Execute(); } break; diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx index 2edc3848a9c0..90f99d4a5fb3 100644 --- a/sw/source/uibase/shells/drawdlg.cxx +++ b/sw/source/uibase/shells/drawdlg.cxx @@ -117,13 +117,11 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxLineTabDialog( nullptr, &aNewAttr, pDoc, pObj, bHasMarked)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if (pDlg->Execute() == RET_OK) { pSh->StartAction(); diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index ca3cd3808ae8..610006aabea6 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -140,7 +140,6 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq) OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh )); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if (pDlg->Execute() == RET_OK) { @@ -512,9 +511,7 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq) OUString aName(pSelected->GetName()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(GetView().GetFrameWeld(), aName)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->SetCheckNameHdl(LINK(this, SwDrawBaseShell, CheckGroupShapeNameHdl)); @@ -542,10 +539,8 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq) OUString aDescription(pSelected->GetDescription()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(GetView().GetFrameWeld(), aTitle, aDescription)); - OSL_ENSURE(pDlg, "Dialog creation failed!"); if(RET_OK == pDlg->Execute()) { diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index f01775af4fe5..c24d82199a79 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -353,7 +353,6 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) assert(pFact && "SwAbstractDialogFactory fail!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg(pView->GetWindow(), *pView, aDlgAttr, SwCharDlgMode::Draw)); - assert(pDlg && "Dialog creation failed!"); if (nSlot == SID_CHAR_DLG_EFFECT) { pDlg->SetCurPageId("fonteffects"); @@ -428,7 +427,6 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) assert(pFact && "SwAbstractDialogFactory fail!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr, true )); - assert(pDlg && "Dialog creation failed!"); sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet) { diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index ba3291f465c5..d4babd3c0ca5 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -596,7 +596,6 @@ void SwTableShell::Execute(SfxRequest &rReq) ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
