diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-30 15:19:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-09 09:45:53 +0200 |
commit | b79fa59df33da81daf119a61d6dffdae232baf82 (patch) | |
tree | 70fbbb63d55beefd017abf13c7714f4964114bb0 /svx/source | |
parent | 081d7b92ce503fa77043332728d056af7ead1604 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/grfflt.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/hdft.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/hyperdlg.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/imapwnd.cxx | 1 | ||||
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 4 | ||||
-rw-r--r-- | svx/source/fmcomp/fmgridcl.cxx | 1 | ||||
-rw-r--r-- | svx/source/form/fmshell.cxx | 1 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 1 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv2.cxx | 1 | ||||
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 2 |
11 files changed, 0 insertions, 25 deletions
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 ); |