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 /cui | |
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 'cui')
-rw-r--r-- | cui/source/dialogs/cuifmsearch.cxx | 1 | ||||
-rw-r--r-- | cui/source/options/optcolor.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optpath.cxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tpgradnt.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tphatch.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tplnedef.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tplneend.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tppattern.cxx | 4 |
10 files changed, 0 insertions, 28 deletions
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; |