diff options
Diffstat (limited to 'sw')
35 files changed, 63 insertions, 212 deletions
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 88df3b3926a5..a7badfffdfea 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -1035,21 +1035,18 @@ OUString SwGlossaryDlg::GetCurrGrpName() const IMPL_LINK_NOARG( SwGlossaryDlg, PathHdl, Button *, void ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if(pFact) + ScopedVclPtr<AbstractSvxMultiPathDialog> pDlg(pFact->CreateSvxPathSelectDialog(GetFrameWeld())); + SvtPathOptions aPathOpt; + const OUString sGlosPath( aPathOpt.GetAutoTextPath() ); + pDlg->SetPath(sGlosPath); + if(RET_OK == pDlg->Execute()) { - ScopedVclPtr<AbstractSvxMultiPathDialog> pDlg(pFact->CreateSvxPathSelectDialog(GetFrameWeld())); - SvtPathOptions aPathOpt; - const OUString sGlosPath( aPathOpt.GetAutoTextPath() ); - pDlg->SetPath(sGlosPath); - if(RET_OK == pDlg->Execute()) + const OUString sTmp(pDlg->GetPath()); + if(sTmp != sGlosPath) { - const OUString sTmp(pDlg->GetPath()); - if(sTmp != sGlosPath) - { - aPathOpt.SetAutoTextPath( sTmp ); - ::GetGlossaries()->UpdateGlosPath( true ); - Init(); - } + aPathOpt.SetAutoTextPath( sTmp ); + ::GetGlossaries()->UpdateGlosPath( true ); + Init(); } } } diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 8424d9310dc1..0420bc94b7c6 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -333,17 +333,14 @@ IMPL_LINK( SwSortDlg, DelimHdl, weld::ToggleButton&, rButton, void ) IMPL_LINK_NOARG(SwSortDlg, DelimCharHdl, weld::Button&, void) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if(pFact) + SfxAllItemSet aSet( rSh.GetAttrPool() ); + aSet.Put( SfxInt32Item( SID_ATTR_CHAR, GetDelimChar() ) ); + ScopedVclPtr<SfxAbstractDialog> pMap(pFact->CreateCharMapDialog(m_xDialog.get(), aSet, false)); + if( RET_OK == pMap->Execute() ) { - SfxAllItemSet aSet( rSh.GetAttrPool() ); - aSet.Put( SfxInt32Item( SID_ATTR_CHAR, GetDelimChar() ) ); - ScopedVclPtr<SfxAbstractDialog> pMap(pFact->CreateCharMapDialog(m_xDialog.get(), aSet, false)); - if( RET_OK == pMap->Execute() ) - { - const SfxInt32Item* pItem = SfxItemSet::GetItem<SfxInt32Item>(pMap->GetOutputItemSet(), SID_ATTR_CHAR, false); - if ( pItem ) - m_xDelimEdt->set_text(OUString(sal_Unicode(pItem->GetValue()))); - } + const SfxInt32Item* pItem = SfxItemSet::GetItem<SfxInt32Item>(pMap->GetOutputItemSet(), SID_ATTR_CHAR, false); + if ( pItem ) + m_xDelimEdt->set_text(OUString(sal_Unicode(pItem->GetValue()))); } } diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx index f9732a261a89..fe03e3793423 100644 --- a/sw/source/uibase/app/appenv.cxx +++ b/sw/source/uibase/app/appenv.cxx @@ -212,8 +212,6 @@ void SwModule::InsertEnv( SfxRequest& rReq ) if ( !pItem ) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg.disposeAndReset(pFact->CreateSwEnvDlg(pParent ? pParent->GetFrameWeld() : nullptr, aSet, pOldSh, pTempPrinter, !bEnvChange)); nMode = pDlg->Execute(); } diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index 769d9d2cef71..5c9ca1819568 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -166,7 +166,6 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) aSet.Put( aLabCfg.GetItem() ); SwAbstractDialogFactory* pDialogFactory = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pDialogFactory, "SwAbstractDialogFactory fail!"); ScopedVclPtr<AbstractSwLabDlg> pDlg(pDialogFactory->CreateSwLabDlg(rReq.GetFrameWeld(), aSet, #if HAVE_FEATURE_DBCONNECTIVITY diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index b00e8a8b2fef..ad08b8f24321 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -156,7 +156,6 @@ VclPtr<SfxDocumentInfoDialog> SwDocShell::CreateDocumentInfoDialog(const SfxItem if ( pVSh && dynamic_cast< const SwSrcView *>( pVSh ) == nullptr ) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); pDlg->AddFontTabPage(); pDlg->AddTabPage(RID_SW_TP_DOC_STAT, SwResId(STR_DOC_STAT), pFact->GetTabPageCreatorFunc(RID_SW_TP_DOC_STAT), nullptr); } @@ -762,8 +761,6 @@ void SwDocShell::Execute(SfxRequest& rReq) case FN_ABSTRACT_NEWDOC: { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<AbstractSwInsertAbstractDlg> pDlg(pFact->CreateSwInsertAbstractDlg()); if(RET_OK == pDlg->Execute()) { diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 5ef0e4b295c0..3b67b9478572 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -817,10 +817,8 @@ void SwDocShell::Edit( FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode)); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert( pFact ); ScopedVclPtr<SfxAbstractApplyTabDialog> pDlg(pFact->CreateTemplateDialog(&GetView()->GetViewFrame()->GetWindow(), *(xTmp.get()), nFamily, sPage, pCurrShell, bNew)); - assert( pDlg ); std::shared_ptr<ApplyStyle> pApplyStyleHelper(new ApplyStyle(*this, bNew, xTmp, nFamily, pDlg.get(), m_xBasePool, bModified)); pDlg->SetApplyHdl(LINK(pApplyStyleHelper.get(), ApplyStyle, ApplyHdl)); diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 2aa434b40819..54e678280616 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -3036,7 +3036,6 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh, pFound = FindDSConnection(sDataSource, true); } SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert( pFact && "Factory creation failed!" ); pImpl->pMergeDialog = pFact->CreateMailMergeDlg( &rSh.GetView().GetViewFrame()->GetWindow(), rSh, sDataSource, sDataTableOrQuery, @@ -3142,7 +3141,6 @@ void SwDBManager::InsertText(SwWrtShell& rSh, aDBData.nCommandType = nCmdType; SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert( pFact && "Factory creation failed!" ); ScopedVclPtr<AbstractSwInsertDBColAutoPilot> pDlg(pFact->CreateSwInsertDBColAutoPilot( rSh.GetView(), xSource, xColSupp, diff --git a/sw/source/uibase/dialog/wordcountwrapper.cxx b/sw/source/uibase/dialog/wordcountwrapper.cxx index 9d353d223ca2..090410509a0d 100644 --- a/sw/source/uibase/dialog/wordcountwrapper.cxx +++ b/sw/source/uibase/dialog/wordcountwrapper.cxx @@ -21,9 +21,7 @@ SwWordCountWrapper::SwWordCountWrapper( vcl::Window *pParentWindow, SfxChildWindow(pParentWindow, nId) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); xAbstDlg.reset(pFact->CreateSwWordCountDialog(pBindings, this, pParentWindow, pInfo)); - assert(xAbstDlg && "Dialog construction failed!"); SetWindow(xAbstDlg->GetWindow()); } diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 12720302f0e5..3896c3cbddeb 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -432,8 +432,6 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, else { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); - ScopedVclPtr<AbstractSwSelGlossaryDlg> pDlg(pFact->CreateSwSelGlossaryDlg(aShortName)); for(TextBlockInfo_Impl & i : aFoundArr) { diff --git a/sw/source/uibase/fldui/fldwrap.cxx b/sw/source/uibase/fldui/fldwrap.cxx index d1f79d6473fe..7b56883414ac 100644 --- a/sw/source/uibase/fldui/fldwrap.cxx +++ b/sw/source/uibase/fldui/fldwrap.cxx @@ -77,7 +77,6 @@ SwFieldDlgWrapper::SwFieldDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, : SwChildWinWrapper( _pParent, nId ) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); pDlgInterface = pFact->CreateSwFieldDlg(pB, this, _pParent); SetWindow( pDlgInterface->GetWindow() ); pDlgInterface->Start(); @@ -117,8 +116,6 @@ SwFieldDataOnlyDlgWrapper::SwFieldDataOnlyDlgWrapper( vcl::Window* _pParent, sal : SwChildWinWrapper( _pParent, nId ) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlgInterface = pFact->CreateSwFieldDlg(pB, this, _pParent); SetWindow( pDlgInterface->GetWindow() ); diff --git a/sw/source/uibase/index/idxmrk.cxx b/sw/source/uibase/index/idxmrk.cxx index cd30b9e1a4b3..2ad709b2ecdb 100644 --- a/sw/source/uibase/index/idxmrk.cxx +++ b/sw/source/uibase/index/idxmrk.cxx @@ -49,7 +49,6 @@ SwInsertIdxMarkWrapper::SwInsertIdxMarkWrapper( vcl::Window *pParentWindow, SfxChildWindow(pParentWindow, nId) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); pAbstDlg = pFact->CreateIndexMarkFloatDlg(pBindings, this, pParentWindow, pInfo); SetWindow( pAbstDlg->GetWindow() ); GetWindow()->Show(); // at this point,because before pSh has to be initialized in ReInitDlg() @@ -77,7 +76,6 @@ SwInsertAuthMarkWrapper::SwInsertAuthMarkWrapper( vcl::Window *pParentWindow, SfxChildWindow(pParentWindow, nId) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); pAbstDlg = pFact->CreateAuthMarkFloatDlg(pBindings, this, pParentWindow, pInfo); SetWindow( pAbstDlg->GetWindow() ); } diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index f105072c0443..ab802d2033d5 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -482,8 +482,6 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) aDlgAttr.Put( SvxKerningItem(0, RES_CHRATR_KERNING) ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg( rView.GetWindow(), rView, aDlgAttr, SwCharDlgMode::Ann)); if (nSlot == SID_CHAR_DLG_EFFECT) { @@ -533,8 +531,6 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) aDlgAttr.Put( SvxOrphansItem( 0, RES_PARATR_ORPHANS ) ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr, true )); 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 8180958d55b9..4a1d27e29692 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -873,8 +873,6 @@ void SwBaseShell::Execute(SfxRequest &rReq) else { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<AbstractSwConvertTableDlg> pDlg(pFact->CreateSwConvertTableDlg(GetView(), bToTable)); if( RET_OK == pDlg->Execute() ) { @@ -2469,8 +2467,6 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) ::PrepareBoxInfo( aSet, rSh ); rSh.GetTabBorders( aSet ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg.disposeAndReset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::TABLE )); if ( pDlg->Execute() == RET_OK ) { @@ -2485,8 +2481,6 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) aSet.Put( aMgr.GetAttrSet() ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg.disposeAndReset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::FRAME )); if ( pDlg->Execute() == RET_OK ) { @@ -2502,8 +2496,6 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) ::PrepareBoxInfo( aSet, rSh ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg.disposeAndReset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::PARA )); if ( pDlg->Execute() == RET_OK ) { @@ -2525,7 +2517,6 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) ScopedVclPtr<SfxAbstractDialog> pDlg; SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); // Table cell(s) selected? if ( rSh.IsTableMode() ) @@ -2882,8 +2873,6 @@ void SwBaseShell::ExecField( SfxRequest const & rReq ) case FN_CHANGE_DBFIELD: { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwChangeDBDlg(GetView())); pDlg->Execute(); } diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx index 90f99d4a5fb3..0dfaa6a92c43 100644 --- a/sw/source/uibase/shells/drawdlg.cxx +++ b/sw/source/uibase/shells/drawdlg.cxx @@ -52,20 +52,17 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) case FN_DRAWTEXT_ATTR_DLG: { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if ( pFact ) - { - ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(rReq.GetFrameWeld(), &aNewAttr, pView)); - sal_uInt16 nResult = pDlg->Execute(); + ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(rReq.GetFrameWeld(), &aNewAttr, pView)); + sal_uInt16 nResult = pDlg->Execute(); - if (nResult == RET_OK) + if (nResult == RET_OK) + { + if (pView->AreObjectsMarked()) { - if (pView->AreObjectsMarked()) - { - pSh->StartAction(); - pView->SetAttributes(*pDlg->GetOutputItemSet()); - rReq.Done(*(pDlg->GetOutputItemSet())); - pSh->EndAction(); - } + pSh->StartAction(); + pView->SetAttributes(*pDlg->GetOutputItemSet()); + rReq.Done(*(pDlg->GetOutputItemSet())); + pSh->EndAction(); } } } diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 610006aabea6..b56ae8aec092 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -137,8 +137,6 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq) pSh->GetObjAttr(aSet); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh )); if (pDlg->Execute() == RET_OK) diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index ea1810fbc485..15bd355de83d 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -350,8 +350,6 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) aDlgAttr.Put( SvxKerningItem(0, RES_CHRATR_KERNING) ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); - ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg(pView->GetWindow(), *pView, aDlgAttr, SwCharDlgMode::Draw)); if (nSlot == SID_CHAR_DLG_EFFECT) { @@ -424,8 +422,6 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) aDlgAttr.Put( SvxOrphansItem( 0, RES_PARATR_ORPHANS ) ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); - ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr, true )); sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet) diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index f4a1f7f8b263..5d6aa79c6a0d 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -437,20 +437,17 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq) SfxItemSet aNewAttr( pSdrView->GetModel()->GetItemPool() ); pSdrView->GetAttributes( aNewAttr ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if ( pFact ) - { - ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( - GetView().GetViewFrame()->GetWindow().GetFrameWeld(), - &aNewAttr, pSdrView )); - sal_uInt16 nResult = pDlg->Execute(); + ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( + GetView().GetViewFrame()->GetWindow().GetFrameWeld(), + &aNewAttr, pSdrView )); + sal_uInt16 nResult = pDlg->Execute(); - if (nResult == RET_OK) + if (nResult == RET_OK) + { + if (pSdrView->AreObjectsMarked()) { - if (pSdrView->AreObjectsMarked()) - { - pSdrView->SetAttributes(*pDlg->GetOutputItemSet()); - rReq.Done(*(pDlg->GetOutputItemSet())); - } + pSdrView->SetAttributes(*pDlg->GetOutputItemSet()); + rReq.Done(*(pDlg->GetOutputItemSet())); } } } diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index ffa11114c8e8..b9c0cdf624fd 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -476,7 +476,6 @@ void SwFrameShell::Execute(SfxRequest &rReq) FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( &GetView()) != nullptr ); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric) )); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateFrameTabDialog( nSel & SelectionType::Graphic ? OUString("PictureDialog") : nSel & SelectionType::Ole ? OUString("ObjectDialog"): @@ -486,7 +485,6 @@ void SwFrameShell::Execute(SfxRequest &rReq) aSet, false, sDefPage)); - assert(pDlg); if ( nSlot == FN_DRAW_WRAP_DLG ) { @@ -634,12 +632,9 @@ void SwFrameShell::Execute(SfxRequest &rReq) { OUString aName(rSh.GetFlyName()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - assert(pFact); ScopedVclPtr<AbstractSvxObjectNameDialog> pDlg( pFact->CreateSvxObjectNameDialog(GetView().GetFrameWeld(), aName)); - assert(pDlg); - if ( pDlg->Execute() == RET_OK ) { pDlg->GetName(aName); @@ -660,11 +655,9 @@ void SwFrameShell::Execute(SfxRequest &rReq) OUString aTitle(rSh.GetObjTitle()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - assert(pFact); ScopedVclPtr<AbstractSvxObjectTitleDescDialog> pDlg( pFact->CreateSvxObjectTitleDescDialog(GetView().GetFrameWeld(), aTitle, aDescription )); - assert(pDlg); if ( pDlg->Execute() == RET_OK ) { @@ -1296,13 +1289,11 @@ void SwFrameShell::ExecDrawDlgTextFrame(SfxRequest const & rReq) rSh.GetFlyFrameAttr(aNewAttr); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - assert(pFact); ScopedVclPtr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog( nullptr, &aNewAttr, pDoc, false)); - assert(pDlg); if(RET_OK == pDlg->Execute()) { diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index cc31d9d3ea05..f8fd3b7739a0 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -410,13 +410,10 @@ void SwGrfShell::Execute(SfxRequest &rReq) } SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "no dialog factory!"); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateFrameTabDialog("PictureDialog", GetView().GetViewFrame(), GetView().GetWindow(), aSet, false)); - OSL_ENSURE(pDlg, "no tab dialog!"); - if (nSlot == FN_DRAW_WRAP_DLG) pDlg->SetCurPageId("wrap"); diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index 07b626ad5bb5..b5417f375995 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -121,11 +121,8 @@ namespace SwLangHelper { // open the dialog "Tools/Options/Language Settings - Language" SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - if (pFact) - { - ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS )); - pDlg->Execute(); - } + ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS )); + pDlg->Execute(); } else { diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index d4babd3c0ca5..c319c895483c 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -593,8 +593,6 @@ void SwTableShell::Execute(SfxRequest &rReq) setSvxBrushItemAsFillAttributesToTargetSet(aBrush, aCoreSet); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwTableTabDlg(GetView().GetWindow(), &aCoreSet, &rSh)); if (pDlg) @@ -679,7 +677,6 @@ void SwTableShell::Execute(SfxRequest &rReq) sCurText, SID_ATTR_NUMBERFORMAT_INFO )); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateNumFormatDialog(GetView().GetWindow(), aCoreSet)); if (RET_OK == pDlg->Execute()) @@ -826,8 +823,6 @@ void SwTableShell::Execute(SfxRequest &rReq) case SID_AUTOFORMAT: { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(GetView().GetFrameWeld(), &rSh)); pDlg->Execute(); break; @@ -835,7 +830,6 @@ void SwTableShell::Execute(SfxRequest &rReq) case FN_TABLE_SET_ROW_HEIGHT: { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwTableHeightDialog(GetView().GetFrameWeld(), rSh)); pDlg->Execute(); break; @@ -948,10 +942,9 @@ void SwTableShell::Execute(SfxRequest &rReq) if ( FN_TABLE_INSERT_ROW_DLG != nSlot || !rSh.IsInRepeatedHeadline()) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<SvxAbstractInsRowColDlg> pDlg(pFact ? pFact->CreateSvxInsRowColDlg(GetView().GetFrameWeld(), - nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand() ) : nullptr); - - if( pDlg.get() && (pDlg->Execute() == 1) ) + ScopedVclPtr<SvxAbstractInsRowColDlg> pDlg(pFact->CreateSvxInsRowColDlg(GetView().GetFrameWeld(), + nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand())); + if( pDlg->Execute() == 1 ) { const sal_uInt16 nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG) ? FN_TABLE_INSERT_COL_AFTER : FN_TABLE_INSERT_ROW_AFTER; @@ -985,19 +978,16 @@ void SwTableShell::Execute(SfxRequest &rReq) else { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if( pFact ) + const long nMaxVert = rSh.GetAnyCurRect( CurRectType::Frame ).Width() / MINLAY; + ScopedVclPtr<SvxAbstractSplitTableDialog> pDlg(pFact->CreateSvxSplitTableDialog(GetView().GetFrameWeld(), rSh.IsTableVertical(), nMaxVert)); + if( pDlg->Execute() == RET_OK ) { - const long nMaxVert = rSh.GetAnyCurRect( CurRectType::Frame ).Width() / MINLAY; - ScopedVclPtr<SvxAbstractSplitTableDialog> pDlg(pFact->CreateSvxSplitTableDialog(GetView().GetFrameWeld(), rSh.IsTableVertical(), nMaxVert)); - if( pDlg && (pDlg->Execute() == RET_OK) ) - { - nCount = pDlg->GetCount(); - bHorizontal = pDlg->IsHorizontal(); - bProportional = pDlg->IsProportional(); - rReq.AppendItem( SfxInt32Item( FN_TABLE_SPLIT_CELLS, nCount ) ); - rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bHorizontal ) ); - rReq.AppendItem( SfxBoolItem( FN_PARAM_2, bProportional ) ); - } + nCount = pDlg->GetCount(); + bHorizontal = pDlg->IsHorizontal(); + bProportional = pDlg->IsProportional(); + rReq.AppendItem( SfxInt32Item( FN_TABLE_SPLIT_CELLS, nCount ) ); + rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bHorizontal ) ); + rReq.AppendItem( SfxBoolItem( FN_PARAM_2, bProportional ) ); } } @@ -1031,8 +1021,6 @@ void SwTableShell::Execute(SfxRequest &rReq) else { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<AbstractSplitTableDialog> pDlg(pFact->CreateSplitTableDialog(GetView().GetFrameWeld(), rSh)); pDlg->Execute(); rReq.AppendItem( SfxUInt16Item( FN_PARAM_1, static_cast<sal_uInt16>(pDlg->GetSplitMode()) ) ); @@ -1049,7 +1037,6 @@ void SwTableShell::Execute(SfxRequest &rReq) if( bPrev && bNext ) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateTableMergeDialog(GetView().GetFrameWeld(), bPrev)); 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 96ba6359a6ef..a8fc344d7a56 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -138,18 +138,13 @@ void SwTextShell::ExecField(SfxRequest &rReq) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); ScopedVclPtr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), false, &rLink )); - if ( pDlg ) - { - pDlg->Execute(); - } + pDlg->Execute(); } break; } default: { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); - ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSwFieldEditDlg( GetView() )); pDlg->Execute(); } diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 7b37022a9326..5495f890566c 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -183,14 +183,7 @@ void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot, const setSvxBrushItemAsFillAttributesToTargetSet(aBrushItem, *pCoreSet); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg.reset(pFact->CreateSwCharDlg(rWrtSh.GetView().GetWindow(), rWrtSh.GetView(), *pCoreSet, SwCharDlgMode::Std)); - if (!pDlg) - { - SAL_WARN("sw.ui", "Dialog creation failed!"); - return; - } if (nSlot == FN_INSERT_HYPERLINK) pDlg->SetCurPageId("hyperlink"); @@ -419,11 +412,8 @@ void SwTextShell::Execute(SfxRequest &rReq) // open the dialog "Tools/Options/Language Settings - Language" // to set the documents default language SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - if (pFact) - { - ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( GetView().GetWindow(), SID_LANGUAGE_OPTIONS )); - pDlg->Execute(); - } + ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( GetView().GetWindow(), SID_LANGUAGE_OPTIONS )); + pDlg->Execute(); } else { @@ -644,7 +634,6 @@ void SwTextShell::Execute(SfxRequest &rReq) else { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); ScopedVclPtr<AbstractSwBreakDlg> pDlg(pFact->CreateSwBreakDlg(GetView().GetFrameWeld(), rWrtSh)); if ( pDlg->Execute() == RET_OK ) { @@ -700,8 +689,6 @@ void SwTextShell::Execute(SfxRequest &rReq) else { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwInsertBookmarkDlg( GetView().GetWindow(), rWrtSh, rReq )); pDlg->Execute(); } @@ -731,8 +718,6 @@ void SwTextShell::Execute(SfxRequest &rReq) pVFrame->ToggleChildWindow(FN_REDLINE_ACCEPT); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<AbstractSwModalRedlineAcceptDlg> pDlg(pFact->CreateSwModalRedlineAcceptDlg(&GetView().GetEditWin())); switch (lcl_AskRedlineFlags(GetView().GetFrameWeld())) @@ -1062,8 +1047,6 @@ void SwTextShell::Execute(SfxRequest &rReq) sDefPage = OUStringToOString(static_cast<const SfxStringItem*>(pItem)->GetValue(), RTL_TEXTENCODING_UTF8); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg.reset(pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet, false, sDefPage )); } diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx index 2dc0dc528e89..7a0afc797764 100644 --- a/sw/source/uibase/shells/textsh2.cxx +++ b/sw/source/uibase/shells/textsh2.cxx @@ -248,7 +248,6 @@ IMPL_LINK( SwBaseShell, InsertDBTextHdl, void*, p, void ) { SwDBData aDBData = pDBStruct->aDBData; SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); ScopedVclPtr<AbstractSwInsertDBColAutoPilot>pDlg (pFact->CreateSwInsertDBColAutoPilot(GetView(), xSource, xColSupp, diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx index 13e3320ced6f..1788e6fad01d 100644 --- a/sw/source/uibase/shells/txtattr.cxx +++ b/sw/source/uibase/shells/txtattr.cxx @@ -479,7 +479,6 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) HINT_END, HINT_END>{}); rSh.GetCurAttr(aSet); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSwDropCapsDialog(GetView().GetWindow(), aSet)); if (pDlg->Execute() == RET_OK) { diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx index f0c9c26a7419..da16e077bad8 100644 --- a/sw/source/uibase/table/tablemgr.cxx +++ b/sw/source/uibase/table/tablemgr.cxx @@ -54,8 +54,6 @@ void SwTableFUNC::ColWidthDlg(weld::Window *pParent) { InitTabCols(); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwTableWidthDlg(pParent, *this)); pDlg->Execute(); } diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 0d1a9b048545..69afb012a9c8 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -757,11 +757,7 @@ void SwPagePreview::Execute( SfxRequest &rReq ) aCoreSet.Put( aZoom ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if(pFact) - { - pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(GetViewFrame()->GetWindow().GetFrameWeld(), aCoreSet)); - } - + pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(GetViewFrame()->GetWindow().GetFrameWeld(), aCoreSet)); pDlg->SetLimits( MINZOOM, MAXZOOM ); if( pDlg->Execute() != RET_CANCEL ) diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 14931e2f6f79..592147febec9 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -598,8 +598,6 @@ void SwView::ExecViewOptions(SfxRequest &rReq) void SwView::ExecFormatFootnote() { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwFootNoteOptionDlg(GetFrameWeld(), GetWrtShell())); pDlg->Execute(); } diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 12ee6f975b22..6dd361e72559 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -1678,17 +1678,10 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if(pFact) - { - pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(GetViewFrame()->GetWindow().GetFrameWeld(), aCoreSet)); - OSL_ENSURE(pDlg, "Zooming fail!"); - if (pDlg) - { - pDlg->SetLimits( MINZOOM, MAXZOOM ); - if( pDlg->Execute() != RET_CANCEL ) - pSet = pDlg->GetOutputItemSet(); - } - } + pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(GetViewFrame()->GetWindow().GetFrameWeld(), aCoreSet)); + pDlg->SetLimits( MINZOOM, MAXZOOM ); + if( pDlg->Execute() != RET_CANCEL ) + pSet = pDlg->GetOutputItemSet(); } const SfxPoolItem* pViewLayoutItem = nullptr; @@ -1884,10 +1877,7 @@ void SwView::EditLinkDlg() bool bWeb = dynamic_cast<SwWebView*>( this ) != nullptr; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); ScopedVclPtr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog( &GetViewFrame()->GetWindow(), &GetWrtShell().GetLinkManager(), bWeb )); - if ( pDlg ) - { - pDlg->Execute(); - } + pDlg->Execute(); } bool SwView::JumpToSwMark( const OUString& rMark ) @@ -2353,11 +2343,8 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument) if (RET_OK == xWarning->run()) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - if ( pFact ) - { - ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( nullptr, SID_OPTIONS_DATABASES )); - pDlg->Execute(); - } + ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( nullptr, SID_OPTIONS_DATABASES )); + pDlg->Execute(); } return ; } diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx index 7bc9cb1a94b4..e88a14128519 100644 --- a/sw/source/uibase/uiview/viewdlg2.cxx +++ b/sw/source/uibase/uiview/viewdlg2.cxx @@ -53,40 +53,27 @@ void SwView::ExecDlgExt(SfxRequest const &rReq) case FN_INSERT_CAPTION: { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); - ScopedVclPtr<VclAbstractDialog> pDialog(pFact->CreateSwCaptionDialog( &rMDI, *this )); - if ( pDialog ) - { - pDialog->Execute(); - } + pDialog->Execute(); break; } case SID_INSERT_SIGNATURELINE: case SID_EDIT_SIGNATURELINE: { VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); - assert(pFact && "VclAbstractDialogFactory fail!"); - const uno::Reference<frame::XModel> xModel(GetCurrentDocument()); ScopedVclPtr<AbstractSignatureLineDialog> pDialog(pFact->CreateSignatureLineDialog( GetFrameWeld(), xModel, rReq.GetSlot() == SID_EDIT_SIGNATURELINE)); - - if (pDialog) - pDialog->Execute(); + pDialog->Execute(); break; } case SID_SIGN_SIGNATURELINE: { VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); - assert(pFact && "VclAbstractDialogFactory fail!"); - const uno::Reference<frame::XModel> xModel(GetCurrentDocument()); VclPtr<AbstractSignSignatureLineDialog> pDialog = pFact->CreateSignSignatureLineDialog(GetFrameWeld(), xModel); - - if (pDialog) - pDialog->Execute(); + pDialog->Execute(); break; } case FN_EDIT_FOOTNOTE: diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index d7ac18727985..f3138353331c 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -308,9 +308,6 @@ VclPtr<SfxTabPage> CreatePrintOptionsPage( weld::Container* pPage, bool bPreview ) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "No Print Dialog"); - if (!pFact) - return nullptr; ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc(TP_OPTPRINT_PAGE); OSL_ENSURE(pFact, "No Page Creator"); diff --git a/sw/source/uibase/uno/SwXFilterOptions.cxx b/sw/source/uibase/uno/SwXFilterOptions.cxx index a5f12b146b0a..d7163846db00 100644 --- a/sw/source/uibase/uno/SwXFilterOptions.cxx +++ b/sw/source/uibase/uno/SwXFilterOptions.cxx @@ -93,10 +93,7 @@ sal_Int16 SwXFilterOptions::execute() } if(pDocShell) { - SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<AbstractSwAsciiFilterDlg> pAsciiDlg(pFact->CreateSwAsciiFilterDlg(Application::GetFrameWeld(xDialogParent), *pDocShell, pInStream.get())); if(RET_OK == pAsciiDlg->Execute()) diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index aeb0ce137600..80922f4ef11f 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3380,8 +3380,6 @@ void SwContentTree::EditEntry(SvTreeListEntry const * pEntry, EditEntryMode nMod aObj >>= xTmp; uno::Reference< container::XNamed > xNamed(xTmp, uno::UNO_QUERY); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<AbstractSwRenameXNamedDlg> pDlg(pFact->CreateSwRenameXNamedDlg(GetFrameWeld(), xNamed, xNameAccess)); if(xSecond.is()) pDlg->SetAlternativeAccess( xSecond, xThird); diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx index 8b14843ef74c..089e0e9f7445 100644 --- a/sw/source/uibase/utlui/numfmtlb.cxx +++ b/sw/source/uibase/utlui/numfmtlb.cxx @@ -371,7 +371,6 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox&, rBox, void ) aCoreSet.Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_ADD_AUTO, bUseAutomaticLanguage)); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateNumFormatDialog(this, aCoreSet)); if (RET_OK == pDlg->Execute()) diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index abd73227d1ad..aa3b8bf4c0f8 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -281,8 +281,6 @@ bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, bool bPrevButton, bool b weld::Window* pParentWin, SwWrtShell::FieldDialogPressedButton* pPressedButton) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<AbstractDropDownFieldDialog> pDlg(pFact->CreateDropDownFieldDialog(pParentWin, *this, pField, bPrevButton, bNextButton)); const short nRet = pDlg->Execute(); |