summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-30 15:19:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-09 09:45:53 +0200
commitb79fa59df33da81daf119a61d6dffdae232baf82 (patch)
tree70fbbb63d55beefd017abf13c7714f4964114bb0 /sw/source
parent081d7b92ce503fa77043332728d056af7ead1604 (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 'sw/source')
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx1
-rw-r--r--sw/source/ui/chrdlg/tblnumfm.cxx1
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx2
-rw-r--r--sw/source/ui/dialog/addrdlg.cxx1
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx2
-rw-r--r--sw/source/ui/envelp/envfmt.cxx1
-rw-r--r--sw/source/ui/fldui/fldedt.cxx1
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx1
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx1
-rw-r--r--sw/source/ui/frmdlg/pattern.cxx1
-rw-r--r--sw/source/ui/frmdlg/uiborder.cxx1
-rw-r--r--sw/source/ui/index/cnttab.cxx1
-rw-r--r--sw/source/ui/misc/bookmark.cxx1
-rw-r--r--sw/source/ui/misc/glossary.cxx1
-rw-r--r--sw/source/ui/table/convert.cxx1
-rw-r--r--sw/source/ui/table/tabledlg.cxx1
-rw-r--r--sw/source/uibase/app/appenv.cxx1
-rw-r--r--sw/source/uibase/app/applab.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx1
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx2
-rw-r--r--sw/source/uibase/dialog/regionsw.cxx6
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx5
-rw-r--r--sw/source/uibase/fldui/fldwrap.cxx2
-rw-r--r--sw/source/uibase/index/idxmrk.cxx2
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx3
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx1
-rw-r--r--sw/source/uibase/shells/annotsh.cxx2
-rw-r--r--sw/source/uibase/shells/basesh.cxx10
-rw-r--r--sw/source/uibase/shells/drawdlg.cxx2
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx5
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx6
-rw-r--r--sw/source/uibase/shells/textfld.cxx7
-rw-r--r--sw/source/uibase/shells/textglos.cxx3
-rw-r--r--sw/source/uibase/shells/textidx.cxx8
-rw-r--r--sw/source/uibase/shells/textsh.cxx4
-rw-r--r--sw/source/uibase/shells/textsh1.cxx6
-rw-r--r--sw/source/uibase/shells/txtattr.cxx1
-rw-r--r--sw/source/uibase/shells/txtnum.cxx2
-rw-r--r--sw/source/uibase/table/tablemgr.cxx1
-rw-r--r--sw/source/uibase/uiview/pview.cxx1
-rw-r--r--sw/source/uibase/uiview/view0.cxx3
-rw-r--r--sw/source/uibase/uiview/view2.cxx6
-rw-r--r--sw/source/uibase/uiview/viewdlg2.cxx5
-rw-r--r--sw/source/uibase/uno/SwXFilterOptions.cxx1
-rw-r--r--sw/source/uibase/utlui/content.cxx1
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx2
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx1
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx3
49 files changed, 0 insertions, 125 deletions
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)
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwTableTabDlg(GetView().GetWindow(), &aCoreSet, &rSh));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
if (pDlg)
{
@@ -682,7 +681,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateNumFormatDialog(GetView().GetWindow(), aCoreSet));
- assert(pDlg && "Dialog creation failed!");
if (RET_OK == pDlg->Execute())
{
@@ -831,7 +829,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
ScopedVclPtr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(GetView().GetFrameWeld(), &rSh));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
break;
}
@@ -840,7 +837,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwTableHeightDialog(GetView().GetFrameWeld(), rSh));
- assert(pDlg && "Dialog creation failed!");
pDlg->Execute();
break;
}
@@ -1038,7 +1034,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
ScopedVclPtr<AbstractSplitTableDialog> pDlg(pFact->CreateSplitTableDialog(GetView().GetFrameWeld(), rSh));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
rReq.AppendItem( SfxUInt16Item( FN_PARAM_1, static_cast<sal_uInt16>(pDlg->GetSplitMode()) ) );
bCallDone = true;
@@ -1056,7 +1051,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateTableMergeDialog(GetView().GetFrameWeld(), bPrev));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
if( RET_OK != pDlg->Execute())
bPrev = bNext = false;
}
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index d5d68916c371..96ba6359a6ef 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -151,7 +151,6 @@ void SwTextShell::ExecField(SfxRequest &rReq)
assert(pFact && "SwAbstractDialogFactory fail!");
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSwFieldEditDlg( GetView() ));
- assert(pDlg && "Dialog creation failed!");
pDlg->Execute();
}
}
@@ -546,9 +545,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
bool bTravel = false;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- assert(pFact && "Dialog creation failed!");
::DialogGetRanges fnGetRange = pFact->GetDialogGetRangesFunc();
- assert(fnGetRange && "Dialog creation failed! GetRanges()");
SfxItemSet aSet(GetPool(), fnGetRange());
aSet.Put(SvxPostItTextItem(sComment, SID_ATTR_POSTIT_TEXT));
aSet.Put(SvxPostItAuthorItem(pRedline->GetAuthorString(), SID_ATTR_POSTIT_AUTHOR));
@@ -591,9 +588,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
bTravel |= bNext || bPrev;
SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create();
- assert(pFact2 && "Dialog creation failed!");
ScopedVclPtr<AbstractSvxPostItDialog> pDlg(pFact2->CreateSvxPostItDialog(GetView().GetFrameWeld(), aSet, bTravel));
- assert(pDlg && "Dialog creation failed!");
pDlg->HideAuthor();
pDlg->SetText(lcl_BuildTitleWithRedline(pRedline));
@@ -650,9 +645,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
else
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- assert(pFact && "Dialog creation failed!");
ScopedVclPtr<AbstractJavaEditDialog> pDlg(pFact->CreateJavaEditDialog(GetView().GetFrameWeld(), &rSh));
- assert(pDlg && "Dialog creation failed!");
if ( pDlg->Execute() )
{
aType = pDlg->GetScriptType();
diff --git a/sw/source/uibase/shells/textglos.cxx b/sw/source/uibase/shells/textglos.cxx
index 6a85f91867f8..af486517671b 100644
--- a/sw/source/uibase/shells/textglos.cxx
+++ b/sw/source/uibase/shells/textglos.cxx
@@ -71,7 +71,6 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
aShortName = static_cast<const SfxStringItem *>(pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialog creation failed!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc();
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
@@ -87,7 +86,6 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
OUString aGroup = static_cast<const SfxStringItem *>(pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialog creation failed!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc();
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
@@ -103,7 +101,6 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_1, false, &pItem ))
aName = static_cast<const SfxStringItem *>(pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialog creation failed!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc();
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx
index e6e13ad10f2a..0363566f248b 100644
--- a/sw/source/uibase/shells/textidx.cxx
+++ b/sw/source/uibase/shells/textidx.cxx
@@ -55,9 +55,7 @@ void SwTextShell::ExecIdx(SfxRequest const &rReq)
case FN_EDIT_AUTH_ENTRY_DLG :
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- assert(pFact && "Dialog creation failed!");
ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwAutoMarkDialog(pMDI, GetShell()));
- assert(pDlg && "Dialog creation failed!");
pDlg->Execute();
}
break;
@@ -81,17 +79,13 @@ void SwTextShell::ExecIdx(SfxRequest const &rReq)
if(aMgr.GetTOXMarkCount() > 1)
{ // Several marks, which should it be?
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialog creation failed!");
ScopedVclPtr<VclAbstractDialog> pMultDlg(pFact->CreateMultiTOXMarkDlg(GetView().GetFrameWeld(), aMgr));
- OSL_ENSURE(pMultDlg, "Dialog creation failed!");
nRet = pMultDlg->Execute();
}
if( nRet == RET_OK)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialog creation failed!");
ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateIndexMarkModalDlg(pMDI, GetShell(), aMgr.GetCurTOXMark()));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
}
break;
@@ -137,11 +131,9 @@ void SwTextShell::ExecIdx(SfxRequest const &rReq)
aSet.Put(*pSet);
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialog creation failed!");
ScopedVclPtr<AbstractMultiTOXTabDialog> pDlg(pFact->CreateMultiTOXTabDialog(
pMDI, aSet, rSh, const_cast<SwTOXBase*>(pCurTOX),
bGlobal));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
}
break;
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index b5dc483ebad5..3d9592f2ff3e 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -473,12 +473,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebDocShell*>( GetView().GetDocShell()) != nullptr );
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialog creation failed!");
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateFrameTabDialog("FrameDialog",
GetView().GetViewFrame(),
&GetView().GetViewFrame()->GetWindow(),
aSet));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
if(pDlg->Execute() == RET_OK && pDlg->GetOutputItemSet())
{
//local variable necessary at least after call of .AutoCaption() because this could be deleted at this point
@@ -526,9 +524,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_FORMAT_COLUMN :
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- assert(pFact && "Dialog creation failed!");
VclPtr<VclAbstractDialog> pColDlg(pFact->CreateSwColumnDialog(GetView().GetWindow(), rSh));
- assert(pColDlg && "Dialog creation failed!");
pColDlg->StartExecuteAsync([](sal_Int32 /*nResult*/){});
}
break;
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index ae9eff3704e9..7b37022a9326 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -562,10 +562,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_INSERT_FOOTNOTE_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialog creation failed!");
ScopedVclPtr<AbstractInsFootNoteDlg> pDlg(pFact->CreateInsFootNoteDlg(
GetView().GetFrameWeld(), rWrtSh));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->SetHelpId(GetStaticInterface()->GetSlot(nSlot)->GetCommand());
if ( pDlg->Execute() == RET_OK )
{
@@ -648,7 +646,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
ScopedVclPtr<AbstractSwBreakDlg> pDlg(pFact->CreateSwBreakDlg(GetView().GetFrameWeld(), rWrtSh));
- assert(pDlg && "Dialog creation failed!");
if ( pDlg->Execute() == RET_OK )
{
nKind = pDlg->GetKind();
@@ -706,7 +703,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwInsertBookmarkDlg( GetView().GetWindow(), rWrtSh, rReq ));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
}
@@ -738,7 +734,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
ScopedVclPtr<AbstractSwModalRedlineAcceptDlg> pDlg(pFact->CreateSwModalRedlineAcceptDlg(&GetView().GetEditWin()));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
switch (lcl_AskRedlineFlags(GetView().GetFrameWeld()))
{
@@ -1070,7 +1065,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg.reset(pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet, false, sDefPage ));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
}
if ( !bUseDialog )
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index 8178633720fb..13e3320ced6f 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -481,7 +481,6 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSwDropCapsDialog(GetView().GetWindow(), aSet));
- assert(pDlg && "Dialog creation failed!");
if (pDlg->Execute() == RET_OK)
{
rSh.StartAction();
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 67a918697a4a..0fedafa0f7c3 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -182,13 +182,11 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
pDocSh->PutItem(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(pDocSh)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- assert(pFact && "Dialog creation failed!");
vcl::Window *pParent = rReq.GetFrameWindow();
if (!pParent)
pParent = GetView().GetWindow();
VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxNumBulletTabDialog(pParent, &aSet, GetShell()));
- assert(pDlg && "Dialog creation failed!");
const SfxStringItem* pPageItem = rReq.GetArg<SfxStringItem>(FN_PARAM_1);
if ( pPageItem )
pDlg->SetCurPageId( OUStringToOString( pPageItem->GetValue(), RTL_TEXTENCODING_UTF8 ) );
diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx
index 52b49a483e7d..f0c9c26a7419 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -57,7 +57,6 @@ void SwTableFUNC::ColWidthDlg(weld::Window *pParent)
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwTableWidthDlg(pParent, *this));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
}
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 76f46c2a46dc..0d1a9b048545 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -760,7 +760,6 @@ void SwPagePreview::Execute( SfxRequest &rReq )
if(pFact)
{
pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(GetViewFrame()->GetWindow().GetFrameWeld(), aCoreSet));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
}
pDlg->SetLimits( MINZOOM, MAXZOOM );
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index f4913d84c9b9..14931e2f6f79 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -601,7 +601,6 @@ void SwView::ExecFormatFootnote()
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwFootNoteOptionDlg(GetFrameWeld(), GetWrtShell()));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
}
@@ -609,9 +608,7 @@ void SwView::ExecNumberingOutline(SfxItemPool & rPool)
{
SfxItemSet aTmp(rPool, svl::Items<FN_PARAM_1, FN_PARAM_1>{});
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- assert(pFact && "Dialog creation failed!");
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateOutlineTabDialog(GetFrameWeld(), &aTmp, GetWrtShell()));
- assert(pDlg && "Dialog creation failed!");
pDlg->Execute();
}
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index e5a7fa8b95c7..12ee6f975b22 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -520,9 +520,7 @@ void SwView::Execute(SfxRequest &rReq)
case FN_LINE_NUMBERING_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialog creation failed!");
ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclSwViewDialog(*this));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
break;
}
@@ -1110,9 +1108,7 @@ void SwView::Execute(SfxRequest &rReq)
{
SfxViewFrame* pTmpFrame = GetViewFrame();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialog creation failed!");
ScopedVclPtr<AbstractMailMergeCreateFromDlg> pDlg( pFact->CreateMailMergeCreateFromDlg(&pTmpFrame->GetWindow()) );
- OSL_ENSURE(pDlg, "Dialog creation failed!");
if(RET_OK == pDlg->Execute())
bUseCurrentDocument = pDlg->IsThisDocument();
else
@@ -2315,9 +2311,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
{
//take an existing data source or create a new one?
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialog creation failed!");
ScopedVclPtr<AbstractMailMergeFieldConnectionsDlg> pConnectionsDlg( pFact->CreateMailMergeFieldConnectionsDlg(&GetViewFrame()->GetWindow()) );
- OSL_ENSURE(pConnectionsDlg, "Dialog creation failed!");
if(RET_OK == pConnectionsDlg->Execute())
bCallAddressPilot = !pConnectionsDlg->IsUseExistingConnections();
else
diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx
index 41bec30c8023..7bc9cb1a94b4 100644
--- a/sw/source/uibase/uiview/viewdlg2.cxx
+++ b/sw/source/uibase/uiview/viewdlg2.cxx
@@ -56,7 +56,6 @@ void SwView::ExecDlgExt(SfxRequest const &rReq)
assert(pFact && "SwAbstractDialogFactory fail!");
ScopedVclPtr<VclAbstractDialog> pDialog(pFact->CreateSwCaptionDialog( &rMDI, *this ));
- assert(pDialog && "Dialog creation failed!");
if ( pDialog )
{
pDialog->Execute();
@@ -72,7 +71,6 @@ void SwView::ExecDlgExt(SfxRequest const &rReq)
const uno::Reference<frame::XModel> xModel(GetCurrentDocument());
ScopedVclPtr<AbstractSignatureLineDialog> pDialog(pFact->CreateSignatureLineDialog(
GetFrameWeld(), xModel, rReq.GetSlot() == SID_EDIT_SIGNATURELINE));
- assert(pDialog && "Dialog creation failed!");
if (pDialog)
pDialog->Execute();
@@ -86,7 +84,6 @@ void SwView::ExecDlgExt(SfxRequest const &rReq)
const uno::Reference<frame::XModel> xModel(GetCurrentDocument());
VclPtr<AbstractSignSignatureLineDialog> pDialog
= pFact->CreateSignSignatureLineDialog(GetFrameWeld(), xModel);
- assert(pDialog && "Dialog creation failed!");
if (pDialog)
pDialog->Execute();
@@ -95,10 +92,8 @@ void SwView::ExecDlgExt(SfxRequest const &rReq)
case FN_EDIT_FOOTNOTE:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- assert(pFact && "Dialog creation failed!");
ScopedVclPtr<AbstractInsFootNoteDlg> pDlg(pFact->CreateInsFootNoteDlg(
GetFrameWeld(), *m_pWrtShell, true));
- assert(pDlg && "Dialog creation failed!");
pDlg->SetHelpId(GetStaticInterface()->GetSlot(FN_EDIT_FOOTNOTE)->GetCommand());
pDlg->SetText( SwResId(STR_EDIT_FOOTNOTE) );
diff --git a/sw/source/uibase/uno/SwXFilterOptions.cxx b/sw/source/uibase/uno/SwXFilterOptions.cxx
index 5a3dab86c7d5..a5f12b146b0a 100644
--- a/sw/source/uibase/uno/SwXFilterOptions.cxx
+++ b/sw/source/uibase/uno/SwXFilterOptions.cxx
@@ -99,7 +99,6 @@ sal_Int16 SwXFilterOptions::execute()
ScopedVclPtr<AbstractSwAsciiFilterDlg> pAsciiDlg(pFact->CreateSwAsciiFilterDlg(Application::GetFrameWeld(xDialogParent), *pDocShell,
pInStream.get()));
- OSL_ENSURE(pAsciiDlg, "Dialog creation failed!");
if(RET_OK == pAsciiDlg->Execute())
{
SwAsciiOptions aOptions;
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index cc554dbd6ea1..aeb0ce137600 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3383,7 +3383,6 @@ void SwContentTree::EditEntry(SvTreeListEntry const * pEntry, EditEntryMode nMod
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
ScopedVclPtr<AbstractSwRenameXNamedDlg> pDlg(pFact->CreateSwRenameXNamedDlg(GetFrameWeld(), xNamed, xNameAccess));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
if(xSecond.is())
pDlg->SetAlternativeAccess( xSecond, xThird);
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 65d78987406b..d1f4025f5b8b 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -910,13 +910,11 @@ void SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
FN_PARAM_TOX_TYPE, FN_PARAM_TOX_TYPE>{});
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- assert(pFact && "Dialog creation failed!");
ScopedVclPtr<AbstractMultiTOXTabDialog> pDlg(pFact->CreateMultiTOXTabDialog(
this, aSet,
*m_pActiveShell,
nullptr,
true));
- assert(pDlg && "Dialog creation failed!");
if(RET_OK == pDlg->Execute())
{
SwTOXDescription& rDesc = pDlg->GetTOXDescription(
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index 099374e13f11..8b14843ef74c 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -373,7 +373,6 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox&, rBox, void )
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateNumFormatDialog(this, aCoreSet));
- assert(pDlg && "Dialog creation failed!");
if (RET_OK == pDlg->Execute())
{
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index cce9e8b9227b..abd73227d1ad 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -255,9 +255,7 @@ bool SwWrtShell::StartInputFieldDlg(SwField* pField, bool bPrevButton, bool bNex
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "Dialog creation failed!");
ScopedVclPtr<AbstractFieldInputDlg> pDlg(pFact->CreateFieldInputDlg(pParentWin, *this, pField, bPrevButton, bNextButton));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
bool bRet;
@@ -286,7 +284,6 @@ bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, bool bPrevButton, bool b
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
ScopedVclPtr<AbstractDropDownFieldDialog> pDlg(pFact->CreateDropDownFieldDialog(pParentWin, *this, pField, bPrevButton, bNextButton));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
const short nRet = pDlg->Execute();
if (pPressedButton)