[Libreoffice-commits] core.git: chart2/source cui/source dbaccess/source desktop/source editeng/source extensions/source reportdesign/source sc/qa scripting/source sc/source sd/source sfx2/source starmath/source svx/source sw/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Jun 12 06:24:31 UTC 2018


 chart2/source/controller/main/ChartController_Position.cxx |    2 
 chart2/source/controller/main/ChartController_TextEdit.cxx |    2 
 chart2/source/controller/main/ShapeController.cxx          |  151 ++---
 cui/source/dialogs/cuifmsearch.cxx                         |   38 -
 cui/source/options/optlingu.cxx                            |   30 -
 cui/source/options/optpath.cxx                             |   79 +-
 dbaccess/source/ui/browser/brwctrlr.cxx                    |   23 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx           |    9 
 editeng/source/misc/hangulhanja.cxx                        |   37 -
 extensions/source/propctrlr/eventhandler.cxx               |    2 
 extensions/source/propctrlr/fontdialog.cxx                 |    1 
 extensions/source/propctrlr/formcomponenthandler.cxx       |    1 
 reportdesign/source/ui/report/ReportController.cxx         |   86 +--
 sc/qa/unit/screenshots/screenshots.cxx                     |    1 
 sc/source/ui/docshell/docsh4.cxx                           |    7 
 sc/source/ui/drawfunc/drawsh.cxx                           |   40 -
 sc/source/ui/drawfunc/drtxtob1.cxx                         |    3 
 sc/source/ui/miscdlgs/redcom.cxx                           |   17 
 sc/source/ui/view/cellsh1.cxx                              |   13 
 sc/source/ui/view/cellsh2.cxx                              |    5 
 sc/source/ui/view/cellsh3.cxx                              |   14 
 sc/source/ui/view/editsh.cxx                               |   19 
 sc/source/ui/view/prevwsh.cxx                              |   23 
 sc/source/ui/view/tabvwsh3.cxx                             |   30 -
 sc/source/ui/view/tabvwshb.cxx                             |   11 
 sc/source/ui/view/tabvwshf.cxx                             |    9 
 sc/source/ui/view/viewutil.cxx                             |   13 
 scripting/source/protocolhandler/scripthandler.cxx         |   12 
 sd/source/filter/html/HtmlOptionsDialog.cxx                |   22 
 sd/source/ui/app/sdmod2.cxx                                |  101 +--
 sd/source/ui/docshell/docshel2.cxx                         |   24 
 sd/source/ui/docshell/docshel3.cxx                         |    4 
 sd/source/ui/func/fuarea.cxx                               |    4 
 sd/source/ui/func/fubullet.cxx                             |    6 
 sd/source/ui/func/fuchar.cxx                               |   50 -
 sd/source/ui/func/fuconnct.cxx                             |    4 
 sd/source/ui/func/fucopy.cxx                               |   31 -
 sd/source/ui/func/fucushow.cxx                             |   29 -
 sd/source/ui/func/fuinsert.cxx                             |   92 +--
 sd/source/ui/func/fuinsfil.cxx                             |    9 
 sd/source/ui/func/fuline.cxx                               |    4 
 sd/source/ui/func/fulinend.cxx                             |   45 -
 sd/source/ui/func/fulink.cxx                               |    7 
 sd/source/ui/func/fumeasur.cxx                             |    4 
 sd/source/ui/func/fumorph.cxx                              |    4 
 sd/source/ui/func/fuoaprms.cxx                             |   13 
 sd/source/ui/func/fuolbull.cxx                             |   46 -
 sd/source/ui/func/fupage.cxx                               |    4 
 sd/source/ui/func/fuparagr.cxx                             |    4 
 sd/source/ui/func/fuprlout.cxx                             |    4 
 sd/source/ui/func/fuprobjs.cxx                             |   25 
 sd/source/ui/func/fuscale.cxx                              |   85 +--
 sd/source/ui/func/fusldlg.cxx                              |    4 
 sd/source/ui/func/fusnapln.cxx                             |    5 
 sd/source/ui/func/futransf.cxx                             |    6 
 sd/source/ui/func/fuvect.cxx                               |    2 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx     |   21 
 sd/source/ui/table/tablefunction.cxx                       |    4 
 sd/source/ui/table/tableobjectbar.cxx                      |    8 
 sd/source/ui/view/drviews2.cxx                             |  171 ++----
 sd/source/ui/view/drviews3.cxx                             |   22 
 sd/source/ui/view/outlnvs2.cxx                             |   24 
 sd/source/ui/view/sdview2.cxx                              |   19 
 sfx2/source/appl/app.cxx                                   |   27 
 sfx2/source/appl/appserv.cxx                               |   93 +--
 sfx2/source/dialog/tabdlg.cxx                              |    8 
 sfx2/source/doc/iframe.cxx                                 |    3 
 sfx2/source/doc/objmisc.cxx                                |   11 
 starmath/source/view.cxx                                   |   12 
 svx/source/dialog/SpellDialogChildWindow.cxx               |    1 
 svx/source/dialog/databaseregistrationui.cxx               |    7 
 svx/source/dialog/grfflt.cxx                               |   54 -
 svx/source/dialog/hdft.cxx                                 |  110 +---
 svx/source/dialog/imapwnd.cxx                              |   41 -
 svx/source/dialog/srchdlg.cxx                              |   94 +--
 svx/source/fmcomp/fmgridcl.cxx                             |   10 
 svx/source/form/fmshell.cxx                                |   14 
 svx/source/form/fmshimp.cxx                                |   22 
 svx/source/gallery2/galbrws1.cxx                           |   23 
 svx/source/gallery2/galbrws2.cxx                           |   25 
 svx/source/svdraw/svdedtv2.cxx                             |  355 ++++++-------
 svx/source/table/tablecontroller.cxx                       |   10 
 sw/source/ui/misc/glossary.cxx                             |   23 
 sw/source/ui/misc/srtdlg.cxx                               |   17 
 sw/source/uibase/app/appenv.cxx                            |    2 
 sw/source/uibase/app/applab.cxx                            |    1 
 sw/source/uibase/app/docsh2.cxx                            |    3 
 sw/source/uibase/app/docst.cxx                             |    2 
 sw/source/uibase/dbui/dbmgr.cxx                            |    2 
 sw/source/uibase/dialog/wordcountwrapper.cxx               |    2 
 sw/source/uibase/dochdl/gloshdl.cxx                        |    2 
 sw/source/uibase/fldui/fldwrap.cxx                         |    3 
 sw/source/uibase/index/idxmrk.cxx                          |    2 
 sw/source/uibase/shells/annotsh.cxx                        |    4 
 sw/source/uibase/shells/basesh.cxx                         |   11 
 sw/source/uibase/shells/drawdlg.cxx                        |   21 
 sw/source/uibase/shells/drwbassh.cxx                       |    2 
 sw/source/uibase/shells/drwtxtex.cxx                       |    4 
 sw/source/uibase/shells/drwtxtsh.cxx                       |   21 
 sw/source/uibase/shells/frmsh.cxx                          |    9 
 sw/source/uibase/shells/grfsh.cxx                          |    3 
 sw/source/uibase/shells/langhelper.cxx                     |    7 
 sw/source/uibase/shells/tabsh.cxx                          |   37 -
 sw/source/uibase/shells/textfld.cxx                        |    7 
 sw/source/uibase/shells/textsh1.cxx                        |   21 
 sw/source/uibase/shells/textsh2.cxx                        |    1 
 sw/source/uibase/shells/txtattr.cxx                        |    1 
 sw/source/uibase/table/tablemgr.cxx                        |    2 
 sw/source/uibase/uiview/pview.cxx                          |    6 
 sw/source/uibase/uiview/view0.cxx                          |    2 
 sw/source/uibase/uiview/view2.cxx                          |   27 
 sw/source/uibase/uiview/viewdlg2.cxx                       |   19 
 sw/source/uibase/uiview/viewprt.cxx                        |    3 
 sw/source/uibase/uno/SwXFilterOptions.cxx                  |    3 
 sw/source/uibase/utlui/content.cxx                         |    2 
 sw/source/uibase/utlui/numfmtlb.cxx                        |    1 
 sw/source/uibase/wrtsh/wrtsh2.cxx                          |    2 
 117 files changed, 1134 insertions(+), 1646 deletions(-)

New commits:
commit 51c879d8649c7aad7a0c9be0c7ea042d041254d8
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu May 31 08:29:01 2018 +0200

    simplify calls to *DialogFactory::Create methods
    
    we don't need to check for nullptr here, it's never null.
    
    Change-Id: I3cc5337a8f4dec6747821679e39ccba3cec20f56
    Reviewed-on: https://gerrit.libreoffice.org/55114
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index 2304bb72cda0..dc7c194b87dc 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -135,11 +135,9 @@ void ChartController::executeDispatch_PositionAndSize()
 
         SolarMutexGuard aGuard;
         SvxAbstractDialogFactory * pFact = SvxAbstractDialogFactory::Create();
-        OSL_ENSURE( pFact, "No dialog factory" );
         vcl::Window* pWin = GetChartWindow();
         ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSchTransformTabDialog(
             pWin ? pWin->GetFrameWeld() : nullptr, &aItemSet, pSdrView, bResizePossible));
-        OSL_ENSURE( pDlg, "Couldn't create SchTransformTabDialog" );
 
         if( pDlg->Execute() == RET_OK )
         {
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 89cc3ca0e513..dfb94cc64725 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -155,7 +155,6 @@ void ChartController::executeDispatch_InsertSpecialCharacter()
         StartTextEdit();
 
     SvxAbstractDialogFactory * pFact = SvxAbstractDialogFactory::Create();
-    OSL_ENSURE( pFact, "No dialog factory" );
 
     SfxAllItemSet aSet( m_pDrawModelWrapper->GetItemPool() );
     aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
@@ -168,7 +167,6 @@ void ChartController::executeDispatch_InsertSpecialCharacter()
 
     vcl::Window* pWin = GetChartWindow();
     ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(pWin ? pWin->GetFrameWeld() : nullptr, aSet, false));
-    OSL_ENSURE( pDlg, "Couldn't create SvxCharacterMap dialog" );
     if( pDlg->Execute() == RET_OK )
     {
         const SfxItemSet* pSet = pDlg->GetOutputItemSet();
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 80203f179b83..7767d77773e0 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -254,22 +254,19 @@ void ShapeController::executeDispatch_FormatLine()
                 pDrawViewWrapper->MergeAttrFromMarked( aAttr, false );
             }
             SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-            if ( pFact )
+            ScopedVclPtr< SfxAbstractTabDialog > pDlg(
+                pFact->CreateSvxLineTabDialog( pChartWindow, &aAttr, &pDrawModelWrapper->getSdrModel(),
+                    pSelectedObj, bHasMarked ) );
+            if ( pDlg->Execute() == RET_OK )
             {
-                ScopedVclPtr< SfxAbstractTabDialog > pDlg(
-                    pFact->CreateSvxLineTabDialog( pChartWindow, &aAttr, &pDrawModelWrapper->getSdrModel(),
-                        pSelectedObj, bHasMarked ) );
-                if ( pDlg->Execute() == RET_OK )
+                const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+                if ( bHasMarked )
                 {
-                    const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
-                    if ( bHasMarked )
-                    {
-                        pDrawViewWrapper->SetAttrToMarked( *pOutAttr, false );
-                    }
-                    else
-                    {
-                        pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
-                    }
+                    pDrawViewWrapper->SetAttrToMarked( *pOutAttr, false );
+                }
+                else
+                {
+                    pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
                 }
             }
         }
@@ -293,24 +290,18 @@ void ShapeController::executeDispatch_FormatArea()
                 pDrawViewWrapper->MergeAttrFromMarked( aAttr, false );
             }
             SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-            if ( pFact )
-            {
                 ScopedVclPtr< AbstractSvxAreaTabDialog > pDlg(
                     pFact->CreateSvxAreaTabDialog( pChartWindow, &aAttr, &pDrawModelWrapper->getSdrModel(), true ) );
-                if ( pDlg.get() )
+            if ( pDlg->Execute() == RET_OK )
+            {
+                const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+                if ( bHasMarked )
                 {
-                    if ( pDlg->Execute() == RET_OK )
-                    {
-                        const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
-                        if ( bHasMarked )
-                        {
-                            pDrawViewWrapper->SetAttrToMarked( *pOutAttr, false );
-                        }
-                        else
-                        {
-                            pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
-                        }
-                    }
+                    pDrawViewWrapper->SetAttrToMarked( *pOutAttr, false );
+                }
+                else
+                {
+                    pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
                 }
             }
         }
@@ -333,21 +324,18 @@ void ShapeController::executeDispatch_TextAttributes()
                 pDrawViewWrapper->MergeAttrFromMarked( aAttr, false );
             }
             SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-            if ( pFact )
+            ScopedVclPtr< SfxAbstractTabDialog > pDlg(
+                pFact->CreateTextTabDialog( pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, &aAttr, pDrawViewWrapper ) );
+            if ( pDlg->Execute() == RET_OK )
             {
-                ScopedVclPtr< SfxAbstractTabDialog > pDlg(
-                    pFact->CreateTextTabDialog( pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, &aAttr, pDrawViewWrapper ) );
-                if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+                const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+                if ( bHasMarked )
                 {
-                    const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
-                    if ( bHasMarked )
-                    {
-                        pDrawViewWrapper->SetAttributes( *pOutAttr );
-                    }
-                    else
-                    {
-                        pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
-                    }
+                    pDrawViewWrapper->SetAttributes( *pOutAttr );
+                }
+                else
+                {
+                    pDrawViewWrapper->SetDefaultAttr( *pOutAttr, false );
                 }
             }
         }
@@ -372,39 +360,30 @@ void ShapeController::executeDispatch_TransformDialog()
                 // item set for position and size
                 SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                if ( pFact )
+                ScopedVclPtr< SfxAbstractTabDialog > pDlg(
+                    pFact->CreateCaptionDialog( pChartWindow, pDrawViewWrapper ) );
+                const sal_uInt16* pRange = pDlg->GetInputRanges( *aAttr.GetPool() );
+                SfxItemSet aCombAttr( *aAttr.GetPool(), pRange );
+                aCombAttr.Put( aAttr );
+                aCombAttr.Put( aGeoAttr );
+                pDlg->SetInputSet( &aCombAttr );
+                if ( pDlg->Execute() == RET_OK )
                 {
-                    ScopedVclPtr< SfxAbstractTabDialog > pDlg(
-                        pFact->CreateCaptionDialog( pChartWindow, pDrawViewWrapper ) );
-                    if ( pDlg.get() )
-                    {
-                        const sal_uInt16* pRange = pDlg->GetInputRanges( *aAttr.GetPool() );
-                        SfxItemSet aCombAttr( *aAttr.GetPool(), pRange );
-                        aCombAttr.Put( aAttr );
-                        aCombAttr.Put( aGeoAttr );
-                        pDlg->SetInputSet( &aCombAttr );
-                        if ( pDlg->Execute() == RET_OK )
-                        {
-                            const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
-                            pDrawViewWrapper->SetAttributes( *pOutAttr );
-                            pDrawViewWrapper->SetGeoAttrToMarked( *pOutAttr );
-                        }
-                    }
+                    const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+                    pDrawViewWrapper->SetAttributes( *pOutAttr );
+                    pDrawViewWrapper->SetGeoAttrToMarked( *pOutAttr );
                 }
             }
             else
             {
                 SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                if ( pFact )
+                ScopedVclPtr< SfxAbstractTabDialog > pDlg(
+                    pFact->CreateSvxTransformTabDialog(pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, &aGeoAttr, pDrawViewWrapper));
+                if ( pDlg->Execute() == RET_OK )
                 {
-                    ScopedVclPtr< SfxAbstractTabDialog > pDlg(
-                        pFact->CreateSvxTransformTabDialog(pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, &aGeoAttr, pDrawViewWrapper));
-                    if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
-                    {
-                        const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
-                        pDrawViewWrapper->SetGeoAttrToMarked( *pOutAttr );
-                    }
+                    const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
+                    pDrawViewWrapper->SetGeoAttrToMarked( *pOutAttr );
                 }
             }
         }
@@ -425,18 +404,15 @@ void ShapeController::executeDispatch_ObjectTitleDescription()
                 OUString aTitle( pSelectedObj->GetTitle() );
                 OUString aDescription( pSelectedObj->GetDescription() );
                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                if ( pFact )
+                VclPtr<ChartWindow> pChartWindow( m_pChartController->GetChartWindow() );
+                ScopedVclPtr< AbstractSvxObjectTitleDescDialog > pDlg(
+                    pFact->CreateSvxObjectTitleDescDialog(pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, aTitle, aDescription ) );
+                if ( pDlg->Execute() == RET_OK )
                 {
-                    VclPtr<ChartWindow> pChartWindow( m_pChartController->GetChartWindow() );
-                    ScopedVclPtr< AbstractSvxObjectTitleDescDialog > pDlg(
-                        pFact->CreateSvxObjectTitleDescDialog(pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, aTitle, aDescription ) );
-                    if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
-                    {
-                        pDlg->GetTitle( aTitle );
-                        pDlg->GetDescription( aDescription );
-                        pSelectedObj->SetTitle( aTitle );
-                        pSelectedObj->SetDescription( aDescription );
-                    }
+                    pDlg->GetTitle( aTitle );
+                    pDlg->GetDescription( aDescription );
+                    pSelectedObj->SetTitle( aTitle );
+                    pSelectedObj->SetDescription( aDescription );
                 }
             }
         }
@@ -456,19 +432,16 @@ void ShapeController::executeDispatch_RenameObject()
             {
                 OUString aName = pSelectedObj->GetName();
                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                if ( pFact )
+                VclPtr<ChartWindow> pChartWindow( m_pChartController->GetChartWindow() );
+                ScopedVclPtr< AbstractSvxObjectNameDialog > pDlg(
+                    pFact->CreateSvxObjectNameDialog(pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, aName));
+                pDlg->SetCheckNameHdl( LINK( this, ShapeController, CheckNameHdl ) );
+                if ( pDlg->Execute() == RET_OK )
                 {
-                    VclPtr<ChartWindow> pChartWindow( m_pChartController->GetChartWindow() );
-                    ScopedVclPtr< AbstractSvxObjectNameDialog > pDlg(
-                        pFact->CreateSvxObjectNameDialog(pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, aName));
-                    pDlg->SetCheckNameHdl( LINK( this, ShapeController, CheckNameHdl ) );
-                    if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+                    pDlg->GetName(aName);
+                    if (pSelectedObj->GetName() == aName)
                     {
-                        pDlg->GetName(aName);
-                        if (pSelectedObj->GetName() == aName)
-                        {
-                            pSelectedObj->SetName( aName );
-                        }
+                        pSelectedObj->SetName( aName );
                     }
                 }
             }
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 6195662e4300..75425a9672df 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -357,38 +357,30 @@ IMPL_LINK(FmSearchDialog, OnClickedSpecialSettings, Button*, pButton, void )
     if (m_ppbApproxSettings == pButton)
     {
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        if (pFact)
+        ScopedVclPtr<AbstractSvxSearchSimilarityDialog> pDlg(pFact->CreateSvxSearchSimilarityDialog(GetFrameWeld(), m_pSearchEngine->GetLevRelaxed(), m_pSearchEngine->GetLevOther(),
+                    m_pSearchEngine->GetLevShorter(), m_pSearchEngine->GetLevLonger() ));
+        if (pDlg->Execute() == RET_OK)
         {
-            ScopedVclPtr<AbstractSvxSearchSimilarityDialog> pDlg(pFact->CreateSvxSearchSimilarityDialog(GetFrameWeld(), m_pSearchEngine->GetLevRelaxed(), m_pSearchEngine->GetLevOther(),
-                        m_pSearchEngine->GetLevShorter(), m_pSearchEngine->GetLevLonger() ));
-            DBG_ASSERT( pDlg, "FmSearchDialog, OnClickedSpecialSettings: could not load the dialog!" );
-            if (pDlg && pDlg->Execute() == RET_OK)
-            {
-                m_pSearchEngine->SetLevRelaxed( pDlg->IsRelaxed() );
-                m_pSearchEngine->SetLevOther( pDlg->GetOther() );
-                m_pSearchEngine->SetLevShorter(pDlg->GetShorter() );
-                m_pSearchEngine->SetLevLonger( pDlg->GetLonger() );
-            }
+            m_pSearchEngine->SetLevRelaxed( pDlg->IsRelaxed() );
+            m_pSearchEngine->SetLevOther( pDlg->GetOther() );
+            m_pSearchEngine->SetLevShorter(pDlg->GetShorter() );
+            m_pSearchEngine->SetLevLonger( pDlg->GetLonger() );
         }
     }
     else if (m_pSoundsLikeCJKSettings == pButton)
     {
         SfxItemSet aSet( SfxGetpApp()->GetPool() );
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        if(pFact)
-        {
-            ScopedVclPtr<AbstractSvxJSearchOptionsDialog> aDlg(pFact->CreateSvxJSearchOptionsDialog( this, aSet, m_pSearchEngine->GetTransliterationFlags() ));
-            aDlg->Execute();
+        ScopedVclPtr<AbstractSvxJSearchOptionsDialog> aDlg(pFact->CreateSvxJSearchOptionsDialog( this, aSet, m_pSearchEngine->GetTransliterationFlags() ));
+        aDlg->Execute();
 
+        TransliterationFlags nFlags = aDlg->GetTransliterationFlags();
+        m_pSearchEngine->SetTransliterationFlags(nFlags);
 
-            TransliterationFlags nFlags = aDlg->GetTransliterationFlags();
-            m_pSearchEngine->SetTransliterationFlags(nFlags);
-
-            m_pcbCase->Check(m_pSearchEngine->GetCaseSensitive());
-            OnCheckBoxToggled( *m_pcbCase );
-            m_pHalfFullFormsCJK->Check( !m_pSearchEngine->GetIgnoreWidthCJK() );
-            OnCheckBoxToggled( *m_pHalfFullFormsCJK );
-        }
+        m_pcbCase->Check(m_pSearchEngine->GetCaseSensitive());
+        OnCheckBoxToggled( *m_pcbCase );
+        m_pHalfFullFormsCJK->Check( !m_pSearchEngine->GetIgnoreWidthCJK() );
+        OnCheckBoxToggled( *m_pHalfFullFormsCJK );
     }
 }
 
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 20018047d8af..6ee8ea97aa67 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1491,22 +1491,19 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, Button *, pBtn, void )
     else if (m_pLinguDicsNewPB == pBtn)
     {
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        if(pFact)
+        ScopedVclPtr<AbstractSvxNewDictionaryDialog> aDlg(pFact->CreateSvxNewDictionaryDialog(GetFrameWeld()));
+        uno::Reference< XDictionary >  xNewDic;
+        if ( aDlg->Execute() == RET_OK )
+            xNewDic.set( aDlg->GetNewDictionary(), UNO_QUERY );
+        if ( xNewDic.is() )
         {
-            ScopedVclPtr<AbstractSvxNewDictionaryDialog> aDlg(pFact->CreateSvxNewDictionaryDialog(GetFrameWeld()));
-            uno::Reference< XDictionary >  xNewDic;
-            if ( aDlg->Execute() == RET_OK )
-                xNewDic.set( aDlg->GetNewDictionary(), UNO_QUERY );
-            if ( xNewDic.is() )
-            {
-                // add new dics to the end
-                sal_Int32 nLen = aDics.getLength();
-                aDics.realloc( nLen + 1 );
+            // add new dics to the end
+            sal_Int32 nLen = aDics.getLength();
+            aDics.realloc( nLen + 1 );
 
-                aDics.getArray()[ nLen ] = xNewDic;
+            aDics.getArray()[ nLen ] = xNewDic;
 
-                AddDicBoxEntry( xNewDic, static_cast<sal_uInt16>(nLen) );
-            }
+            AddDicBoxEntry( xNewDic, static_cast<sal_uInt16>(nLen) );
         }
     }
     else if (m_pLinguDicsEditPB == pBtn)
@@ -1524,11 +1521,8 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, Button *, pBtn, void )
                 if (xDic.is())
                 {
                     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                    if(pFact)
-                    {
-                        ScopedVclPtr<VclAbstractDialog> aDlg(pFact->CreateSvxEditDictionaryDialog( this, xDic->getName() ));
-                        aDlg->Execute();
-                    }
+                    ScopedVclPtr<VclAbstractDialog> aDlg(pFact->CreateSvxEditDictionaryDialog( this, xDic->getName() ));
+                    aDlg->Execute();
                 }
             }
         }
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 2275ce332e6e..7b3ebad23a64 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -555,56 +555,53 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, Button*, void)
     if ( IsMultiPath_Impl( nPos ) )
     {
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        if ( pFact )
-        {
-            ScopedVclPtr<AbstractSvxMultiPathDialog> pMultiDlg(
-                pFact->CreateSvxMultiPathDialog( this ));
+        ScopedVclPtr<AbstractSvxMultiPathDialog> pMultiDlg(
+            pFact->CreateSvxMultiPathDialog( this ));
 
-            OUString sPath( sUser );
-            if ( !sPath.isEmpty() )
-                sPath += OUStringLiteral1(MULTIPATH_DELIMITER);
-            sPath += sWritable;
-            pMultiDlg->SetPath( sPath );
+        OUString sPath( sUser );
+        if ( !sPath.isEmpty() )
+            sPath += OUStringLiteral1(MULTIPATH_DELIMITER);
+        sPath += sWritable;
+        pMultiDlg->SetPath( sPath );
 
-            const OUString sPathName = SvTabListBox::GetEntryText( pEntry, 0 );
-            const OUString sNewTitle = pImpl->m_sMultiPathDlg.replaceFirst( VAR_ONE, sPathName );
-            pMultiDlg->SetTitle( sNewTitle );
+        const OUString sPathName = SvTabListBox::GetEntryText( pEntry, 0 );
+        const OUString sNewTitle = pImpl->m_sMultiPathDlg.replaceFirst( VAR_ONE, sPathName );
+        pMultiDlg->SetTitle( sNewTitle );
 
-            if ( pMultiDlg->Execute() == RET_OK && pEntry )
+        if ( pMultiDlg->Execute() == RET_OK && pEntry )
+        {
+            sUser.clear();
+            sWritable.clear();
+            OUString sFullPath;
+            OUString sNewPath = pMultiDlg->GetPath();
+            if ( !sNewPath.isEmpty() )
             {
-                sUser.clear();
-                sWritable.clear();
-                OUString sFullPath;
-                OUString sNewPath = pMultiDlg->GetPath();
-                if ( !sNewPath.isEmpty() )
+                sal_Int32 nNextPos = 0;
+                for (;;)
                 {
-                    sal_Int32 nNextPos = 0;
-                    for (;;)
+                    const OUString sToken(sNewPath.getToken( 0, MULTIPATH_DELIMITER, nNextPos ));
+                    if ( nNextPos<0 )
                     {
-                        const OUString sToken(sNewPath.getToken( 0, MULTIPATH_DELIMITER, nNextPos ));
-                        if ( nNextPos<0 )
-                        {
-                            // Last token need a different handling
-                            sWritable = sToken;
-                            break;
-                        }
-                        if ( !sUser.isEmpty() )
-                            sUser += OUStringLiteral1(MULTIPATH_DELIMITER);
-                        sUser += sToken;
+                        // Last token need a different handling
+                        sWritable = sToken;
+                        break;
                     }
-                    sFullPath = sUser;
-                    if ( !sFullPath.isEmpty() )
-                        sFullPath += OUStringLiteral1(MULTIPATH_DELIMITER);
-                    sFullPath += sWritable;
+                    if ( !sUser.isEmpty() )
+                        sUser += OUStringLiteral1(MULTIPATH_DELIMITER);
+                    sUser += sToken;
                 }
-
-                pPathBox->SetEntryText( Convert_Impl( sFullPath ), pEntry, 1 );
-                // save modified flag
-                PathUserData_Impl* pPathImpl = static_cast<PathUserData_Impl*>(pEntry->GetUserData());
-                pPathImpl->eState = SfxItemState::SET;
-                pPathImpl->sUserPath = sUser;
-                pPathImpl->sWritablePath = sWritable;
+                sFullPath = sUser;
+                if ( !sFullPath.isEmpty() )
+                    sFullPath += OUStringLiteral1(MULTIPATH_DELIMITER);
+                sFullPath += sWritable;
             }
+
+            pPathBox->SetEntryText( Convert_Impl( sFullPath ), pEntry, 1 );
+            // save modified flag
+            PathUserData_Impl* pPathImpl = static_cast<PathUserData_Impl*>(pEntry->GetUserData());
+            pPathImpl->eState = SfxItemState::SET;
+            pPathImpl->sUserPath = sUser;
+            pPathImpl->sWritablePath = sWritable;
         }
     }
     else if (pEntry && !bPickFile)
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 86e65d809187..075418222a09 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1829,21 +1829,14 @@ void SbaXDataBrowserController::ExecuteSearch()
 
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
     VclPtr<AbstractFmSearchDialog> pDialog;
-    if ( pFact )
-    {
-        std::vector< OUString > aContextNames;
-        aContextNames.emplace_back("Standard" );
-        pDialog = pFact->CreateFmSearchDialog(getBrowserView(), sInitialText, aContextNames, 0, LINK(this, SbaXDataBrowserController, OnSearchContextRequest));
-    }
-    OSL_ENSURE( pDialog, "SbaXDataBrowserController::ExecuteSearch: could not get the search dialog!" );
-    if ( pDialog )
-    {
-        pDialog->SetActiveField( sActiveField );
-        pDialog->SetFoundHandler( LINK( this, SbaXDataBrowserController, OnFoundData ) );
-        pDialog->SetCanceledNotFoundHdl( LINK( this, SbaXDataBrowserController, OnCanceledNotFound ) );
-        pDialog->Execute();
-        pDialog.disposeAndClear();
-    }
+    std::vector< OUString > aContextNames;
+    aContextNames.emplace_back("Standard" );
+    pDialog = pFact->CreateFmSearchDialog(getBrowserView(), sInitialText, aContextNames, 0, LINK(this, SbaXDataBrowserController, OnSearchContextRequest));
+    pDialog->SetActiveField( sActiveField );
+    pDialog->SetFoundHandler( LINK( this, SbaXDataBrowserController, OnFoundData ) );
+    pDialog->SetCanceledNotFoundHdl( LINK( this, SbaXDataBrowserController, OnCanceledNotFound ) );
+    pDialog->Execute();
+    pDialog.disposeAndClear();
 
     // restore the grid's normal operating state
     xModelSet->setPropertyValue("DisplayIsSynchron", css::uno::Any(true));
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 9330789548e4..5dabafb1ba3d 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -893,13 +893,10 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleOptionsBtn, Button*, void)
     {
         SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
 
-        if ( pFact )
-        {
-            OUString sExtensionId = m_pExtensionBox->GetEntryData( nActive )->m_xPackage->getIdentifier().Value;
-            ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateOptionsDialog( this, sExtensionId ));
+        OUString sExtensionId = m_pExtensionBox->GetEntryData( nActive )->m_xPackage->getIdentifier().Value;
+        ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateOptionsDialog( this, sExtensionId ));
 
-            pDlg->Execute();
-        }
+        pDlg->Execute();
     }
 }
 
diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx
index 7dc6930fd19f..f5e549ff8f43 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -279,26 +279,23 @@ namespace editeng
         if ( m_bIsInteractive && !m_pConversionDialog )
         {
             EditAbstractDialogFactory* pFact = EditAbstractDialogFactory::Create();
-            if(pFact)
-            {
-                m_pConversionDialog = pFact->CreateHangulHanjaConversionDialog(m_pUIParent, m_ePrimaryConversionDirection );
-
-                m_pConversionDialog->EnableRubySupport( m_pAntiImpl->HasRubySupport() );
-
-                m_pConversionDialog->SetByCharacter( m_bByCharacter );
-                m_pConversionDialog->SetConversionFormat( m_eConversionFormat );
-                m_pConversionDialog->SetConversionDirectionState( m_bTryBothDirections, m_ePrimaryConversionDirection );
-
-                // the handlers
-                m_pConversionDialog->SetOptionsChangedHdl( LINK( this, HangulHanjaConversion_Impl, OnOptionsChanged ) );
-                m_pConversionDialog->SetIgnoreHdl( LINK( this, HangulHanjaConversion_Impl, OnIgnore ) );
-                m_pConversionDialog->SetIgnoreAllHdl( LINK( this, HangulHanjaConversion_Impl, OnIgnoreAll ) );
-                m_pConversionDialog->SetChangeHdl( LINK( this, HangulHanjaConversion_Impl, OnChange ) );
-                m_pConversionDialog->SetChangeAllHdl( LINK( this, HangulHanjaConversion_Impl, OnChangeAll ) );
-                m_pConversionDialog->SetClickByCharacterHdl( LINK( this, HangulHanjaConversion_Impl, OnByCharClicked ) );
-                m_pConversionDialog->SetConversionFormatChangedHdl( LINK( this, HangulHanjaConversion_Impl, OnConversionTypeChanged ) );
-                m_pConversionDialog->SetFindHdl( LINK( this, HangulHanjaConversion_Impl, OnFind ) );
-            }
+            m_pConversionDialog = pFact->CreateHangulHanjaConversionDialog(m_pUIParent, m_ePrimaryConversionDirection );
+
+            m_pConversionDialog->EnableRubySupport( m_pAntiImpl->HasRubySupport() );
+
+            m_pConversionDialog->SetByCharacter( m_bByCharacter );
+            m_pConversionDialog->SetConversionFormat( m_eConversionFormat );
+            m_pConversionDialog->SetConversionDirectionState( m_bTryBothDirections, m_ePrimaryConversionDirection );
+
+            // the handlers
+            m_pConversionDialog->SetOptionsChangedHdl( LINK( this, HangulHanjaConversion_Impl, OnOptionsChanged ) );
+            m_pConversionDialog->SetIgnoreHdl( LINK( this, HangulHanjaConversion_Impl, OnIgnore ) );
+            m_pConversionDialog->SetIgnoreAllHdl( LINK( this, HangulHanjaConversion_Impl, OnIgnoreAll ) );
+            m_pConversionDialog->SetChangeHdl( LINK( this, HangulHanjaConversion_Impl, OnChange ) );
+            m_pConversionDialog->SetChangeAllHdl( LINK( this, HangulHanjaConversion_Impl, OnChangeAll ) );
+            m_pConversionDialog->SetClickByCharacterHdl( LINK( this, HangulHanjaConversion_Impl, OnByCharClicked ) );
+            m_pConversionDialog->SetConversionFormatChangedHdl( LINK( this, HangulHanjaConversion_Impl, OnConversionTypeChanged ) );
+            m_pConversionDialog->SetFindHdl( LINK( this, HangulHanjaConversion_Impl, OnFind ) );
         }
     }
 
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index 0f12f0cc834d..544fb9b83c1d 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -809,8 +809,6 @@ namespace pcr
 
         // the dialog
         SvxAbstractDialogFactory* pFactory = SvxAbstractDialogFactory::Create();
-        if ( !pFactory )
-            return InteractiveSelectionResult_Cancelled;
 
         ScopedVclPtr<VclAbstractDialog> pDialog( pFactory->CreateSvxMacroAssignDlg(
             PropertyHandlerHelper::getDialogParentWindow( m_xContext ),
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index 01896d449ceb..47c2fcfe982d 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -177,7 +177,6 @@ namespace pcr
         , m_nCharsId(0)
     {
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        assert(pFact); //CreateFactory fail!
         m_nCharsId = AddTabPage("font", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), nullptr );
         AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), nullptr );
     }
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 06e7cb3d6398..62257da1efbf 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2644,7 +2644,6 @@ namespace pcr
             ScopedVclPtrInstance< SfxSingleTabDialog > xDialog( impl_getDefaultDialogParent_nothrow(), aCoreSet,
                 "FormatNumberDialog", "cui/ui/formatnumberdialog.ui");
             SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-            DBG_ASSERT( pFact, "CreateFactory fail!" );
             ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT );
             if ( !fnCreatePage )
                 throw RuntimeException();   // caught below
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index fba084130f4c..7f19e49543a7 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -4172,56 +4172,54 @@ OSectionWindow* OReportController::getSectionWindow(const css::uno::Reference< c
 void OReportController::openZoomDialog()
 {
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    if ( pFact )
-    {
-        static SfxItemInfo aItemInfos[] =
-        {
-            { SID_ATTR_ZOOM, true }
-        };
-        std::vector<SfxPoolItem*> pDefaults
-        {
-            new SvxZoomItem()
-        };
-        static const sal_uInt16 pRanges[] =
-        {
-            SID_ATTR_ZOOM,SID_ATTR_ZOOM,
-            0
-        };
-        SfxItemPool* pPool( new SfxItemPool("ZoomProperties", SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, &pDefaults) );
-        pPool->SetDefaultMetric( MapUnit::Map100thMM );    // ripped, don't understand why
-        pPool->FreezeIdRanges();                        // the same
-        try
-        {
-            ::std::unique_ptr<SfxItemSet> pDescriptor(new SfxItemSet(*pPool, pRanges));
-            // fill it
-            SvxZoomItem aZoomItem( m_eZoomType, m_nZoomValue, SID_ATTR_ZOOM );
-            aZoomItem.SetValueSet(SvxZoomEnableFlags::N100|SvxZoomEnableFlags::WHOLEPAGE|SvxZoomEnableFlags::PAGEWIDTH);
-            pDescriptor->Put(aZoomItem);
 
-            ScopedVclPtr<AbstractSvxZoomDialog> pDlg( pFact->CreateSvxZoomDialog(nullptr, *pDescriptor.get()) );
-            pDlg->SetLimits( 20, 400 );
-            bool bCancel = ( RET_CANCEL == pDlg->Execute() );
+    static SfxItemInfo aItemInfos[] =
+    {
+        { SID_ATTR_ZOOM, true }
+    };
+    std::vector<SfxPoolItem*> pDefaults
+    {
+        new SvxZoomItem()
+    };
+    static const sal_uInt16 pRanges[] =
+    {
+        SID_ATTR_ZOOM,SID_ATTR_ZOOM,
+        0
+    };
+    SfxItemPool* pPool( new SfxItemPool("ZoomProperties", SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, &pDefaults) );
+    pPool->SetDefaultMetric( MapUnit::Map100thMM );    // ripped, don't understand why
+    pPool->FreezeIdRanges();                        // the same
+    try
+    {
+        ::std::unique_ptr<SfxItemSet> pDescriptor(new SfxItemSet(*pPool, pRanges));
+        // fill it
+        SvxZoomItem aZoomItem( m_eZoomType, m_nZoomValue, SID_ATTR_ZOOM );
+        aZoomItem.SetValueSet(SvxZoomEnableFlags::N100|SvxZoomEnableFlags::WHOLEPAGE|SvxZoomEnableFlags::PAGEWIDTH);
+        pDescriptor->Put(aZoomItem);
 
-            if ( !bCancel )
-            {
-                const SvxZoomItem&  rZoomItem = pDlg->GetOutputItemSet()->Get( SID_ATTR_ZOOM );
-                m_eZoomType = rZoomItem.GetType();
-                m_nZoomValue = rZoomItem.GetValue();
-                if ( m_eZoomType != SvxZoomType::PERCENT )
-                    m_nZoomValue = getDesignView()->getZoomFactor( m_eZoomType );
+        ScopedVclPtr<AbstractSvxZoomDialog> pDlg( pFact->CreateSvxZoomDialog(nullptr, *pDescriptor.get()) );
+        pDlg->SetLimits( 20, 400 );
+        bool bCancel = ( RET_CANCEL == pDlg->Execute() );
 
-                impl_zoom_nothrow();
-            }
-        }
-        catch(const uno::Exception&)
+        if ( !bCancel )
         {
-            DBG_UNHANDLED_EXCEPTION("reportdesign");
-        }
-        SfxItemPool::Free(pPool);
+            const SvxZoomItem&  rZoomItem = pDlg->GetOutputItemSet()->Get( SID_ATTR_ZOOM );
+            m_eZoomType = rZoomItem.GetType();
+            m_nZoomValue = rZoomItem.GetValue();
+            if ( m_eZoomType != SvxZoomType::PERCENT )
+                m_nZoomValue = getDesignView()->getZoomFactor( m_eZoomType );
 
-        for (SfxPoolItem* pDefault : pDefaults)
-            delete pDefault;
+            impl_zoom_nothrow();
+        }
+    }
+    catch(const uno::Exception&)
+    {
+        DBG_UNHANDLED_EXCEPTION("reportdesign");
     }
+    SfxItemPool::Free(pPool);
+
+    for (SfxPoolItem* pDefault : pDefaults)
+        delete pDefault;
 }
 
 
diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx
index 5c0bb28fac0b..f67580c3e9a6 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -113,7 +113,6 @@ void ScScreenshotTest::initialize()
     CPPUNIT_ASSERT(mpViewShell != nullptr);
 
     mpFact = ScAbstractDialogFactory::Create();
-    CPPUNIT_ASSERT_MESSAGE("Failed to create dialog factory", mpFact);
 
     SvMemoryStream* pNewMemStream = new SvMemoryStream(const_cast<sal_Unicode *>(mCsv.getStr()), mCsv.getLength() * sizeof(sal_Unicode), StreamMode::READ);
     pNewMemStream->SetStreamCharSet( RTL_TEXTENCODING_UNICODE );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 16c1cf1b9aef..dc65831465b9 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1184,11 +1184,8 @@ void ScDocShell::Execute( SfxRequest& rReq )
                 if ( aLangText == "*" )
                 {
                     SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
-                    if (pFact)
-                    {
-                        ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog(GetActiveDialogParent(), SID_LANGUAGE_OPTIONS));
-                        pDlg->Execute();
-                    }
+                    ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog(GetActiveDialogParent(), SID_LANGUAGE_OPTIONS));
+                    pDlg->Execute();
 
                     rDoc.GetLanguage( eLang, eCjk, eCtl );
                 }
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 16badca23968..22cf65513595 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -261,36 +261,30 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
                                 SfxItemSet aNewGeoAttr(pView->GetGeoAttrFromMarked());
 
                                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                                if ( pFact )
+                                ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateCaptionDialog( pWin, pView ));
+
+                                const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
+                                SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
+                                aCombSet.Put( aNewAttr );
+                                aCombSet.Put( aNewGeoAttr );
+                                pDlg->SetInputSet( &aCombSet );
+
+                                if (pDlg->Execute() == RET_OK)
                                 {
-                                    ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateCaptionDialog( pWin, pView ));
-
-                                    const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
-                                    SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
-                                    aCombSet.Put( aNewAttr );
-                                    aCombSet.Put( aNewGeoAttr );
-                                    pDlg->SetInputSet( &aCombSet );
-
-                                    if (pDlg->Execute() == RET_OK)
-                                    {
-                                        rReq.Done(*(pDlg->GetOutputItemSet()));
-                                        pView->SetAttributes(*pDlg->GetOutputItemSet());
-                                        pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
-                                    }
+                                    rReq.Done(*(pDlg->GetOutputItemSet()));
+                                    pView->SetAttributes(*pDlg->GetOutputItemSet());
+                                    pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
                                 }
                             }
                             else
                             {
                                 SfxItemSet aNewAttr(pView->GetGeoAttrFromMarked());
                                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                                if(pFact)
+                                ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxTransformTabDialog(pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr, pView));
+                                if (pDlg->Execute() == RET_OK)
                                 {
-                                    ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxTransformTabDialog(pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr, pView));
-                                    if (pDlg->Execute() == RET_OK)
-                                    {
-                                        rReq.Done(*(pDlg->GetOutputItemSet()));
-                                        pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
-                                    }
+                                    rReq.Done(*(pDlg->GetOutputItemSet()));
+                                    pView->SetGeoAttrToMarked(*pDlg->GetOutputItemSet());
                                 }
                             }
                         }
@@ -346,7 +340,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, vcl::Window* pWin )
 
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
     ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateEventConfigDialog( pWin, *pItemSet, xFrame ));
-    if ( pMacroDlg && pMacroDlg->Execute() == RET_OK )
+    if ( pMacroDlg->Execute() == RET_OK )
     {
         const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
         const SfxPoolItem* pItem;
diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx
index a5345c51fe87..dfad2d5de902 100644
--- a/sc/source/ui/drawfunc/drtxtob1.cxx
+++ b/sc/source/ui/drawfunc/drtxtob1.cxx
@@ -43,12 +43,9 @@ bool ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs,
                                                 SfxItemSet& rOutSet , sal_uInt16 nSlot)
 {
     ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
-    assert(pFact && "ScAbstractFactory create fail!");
-
     ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg(
         pViewData->GetDialogParent(), &rArgs,
         pViewData->GetSfxDocShell()));
-    assert(pDlg && "Dialog create fail!");
     if (nSlot == SID_CHAR_DLG_EFFECT)
     {
         pDlg->SetCurPageId("fonteffects");
diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx
index 3c0c8af9a1a0..cea274a5b5cf 100644
--- a/sc/source/ui/miscdlgs/redcom.cxx
+++ b/sc/source/ui/miscdlgs/redcom.cxx
@@ -32,18 +32,15 @@ ScRedComDialog::ScRedComDialog( weld::Window* pParent, const SfxItemSet& rCoreSe
     , pDlg(nullptr)
 {
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    if(pFact)
-    {
-        pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext );
-        pDocShell=pShell;
-        pDlg->DontChangeAuthor();
-        pDlg->HideAuthor();
+    pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext );
+    pDocShell=pShell;
+    pDlg->DontChangeAuthor();
+    pDlg->HideAuthor();
 
-        pDlg->SetPrevHdl(LINK( this, ScRedComDialog, PrevHdl));
-        pDlg->SetNextHdl(LINK( this, ScRedComDialog, NextHdl));
+    pDlg->SetPrevHdl(LINK( this, ScRedComDialog, PrevHdl));
+    pDlg->SetNextHdl(LINK( this, ScRedComDialog, NextHdl));
 
-        ReInit(pAction);
-    }
+    ReInit(pAction);
 }
 
 ScRedComDialog::~ScRedComDialog()
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 2d42839f055b..2df5212b0577 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1073,10 +1073,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                     if ( pTabViewShell->HasSelectionForDrillDown( nOrientation ) )
                     {
                         ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
-                        assert(pFact && "ScAbstractFactory create fail!");
                         ScopedVclPtr<AbstractScDPShowDetailDlg> pDlg( pFact->CreateScDPShowDetailDlg(
                             pTabViewShell->GetFrameWeld(), *pDPObj, nOrientation ) );
-                        assert(pDlg && "Dialog create fail!");
                         if ( pDlg->Execute() == RET_OK )
                         {
                             OUString aNewDimName( pDlg->GetDimensionName() );
@@ -1547,8 +1545,6 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                         {
                             SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
                             ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(pTabViewShell->GetFrameWeld()));
-                            if ( pDlg )
-                            {
                             for (sal_uInt16 i=0; i<nFormatCount; i++)
                             {
                                 SotClipboardFormatId nFormatId = aFormats.GetClipbrdFormatId( i );
@@ -1580,7 +1576,6 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                                 rReq.SetReturnValue(SfxInt16Item(nSlot, 0));    // 0 = fail
                                 rReq.Ignore();
                             }
-                            }
                         }
                         else
                             rReq.SetReturnValue(SfxInt16Item(nSlot, 0));        // 0 = fail
@@ -2492,7 +2487,6 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
         case SID_OPENDLG_CURRENTCONDFRMT_MANAGER:
             {
                 ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
-                assert(pFact);
 
                 ScViewData* pData = GetViewData();
                 ScDocument* pDoc = pData->GetDocument();
@@ -2935,10 +2929,6 @@ void ScCellShell::ExecuteDataPilotDialog()
 
 void ScCellShell::ExecuteXMLSourceDialog()
 {
-    ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
-    if (!pFact)
-        return;
-
     ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
     if (!pTabViewShell)
         return;
@@ -2984,10 +2974,7 @@ void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
 
     aArgSet.Put( ScSubTotalItem( SCITEM_SUBTDATA, GetViewData(), &aSubTotalParam ) );
     ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
-    assert(pFact); //"ScAbstractFactory create fail
-
     pDlg.disposeAndReset(pFact->CreateScSubTotalDlg(pTabViewShell->GetDialogParent(), &aArgSet));
-    assert(pDlg); // "Dialog create fail
     pDlg->SetCurPageId("1stgroup");
 
     short bResult = pDlg->Execute();
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 65d781793d65..52588c005dda 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -496,10 +496,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
                         aArgSet.Put( ScSortItem( SCITEM_SORTDATA, GetViewData(), &aSortParam ) );
 
                         ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
-                        assert(pFact); //ScAbstractFactory create fail!
-
                         ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScSortDlg(pTabViewShell->GetFrameWeld(),  &aArgSet));
-                        assert(pDlg); //Dialog create fail!
                         pDlg->SetCurPageId("criteria");  // 1=sort field tab  2=sort options tab
 
                         if ( pDlg->Execute() == RET_OK )
@@ -1005,10 +1002,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
                     aExport.ExportStream( aStream, OUString(), SotClipboardFormatId::STRING );
 
                     ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
-                    OSL_ENSURE( pFact, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pFact is null!" );
                     ScopedVclPtr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg(
                             nullptr, OUString(), &aStream, SC_TEXTTOCOLUMNS));
-                    OSL_ENSURE( pDlg, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDlg is null!" );
 
                     if ( pDlg->Execute() == RET_OK )
                     {
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 18a06369db1c..8da6bfbf0195 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -574,13 +574,10 @@ void ScCellShell::Execute( SfxRequest& rReq )
                                                 GetRowHeight( pData->GetCurY(),
                                                               pData->GetTabNo() );
                     ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
-                    assert(pFact); //ScAbstractFactory create fail!
-
                     ScopedVclPtr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
                         pTabViewShell->GetFrameWeld(), "RowHeightDialog",
                         nCurHeight, ScGlobal::nStdRowHeight,
                         eMetric, 2, MAX_ROW_HEIGHT));
-                    assert(pDlg); //Dialog create fail
 
                     if ( pDlg->Execute() == RET_OK )
                     {
@@ -615,13 +612,9 @@ void ScCellShell::Execute( SfxRequest& rReq )
                     FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric();
 
                     ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
-                    assert(pFact); //ScAbstractFactory create fail!
-
                     ScopedVclPtr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
                         pTabViewShell->GetFrameWeld(), "OptimalRowHeightDialog",
                         ScGlobal::nLastRowHeightExtra, 0, eMetric, 1, MAX_EXTRA_HEIGHT));
-                    assert(pDlg); //Dialog create fail!
-
                     if ( pDlg->Execute() == RET_OK )
                     {
                         long nVal = pDlg->GetInputValue();
@@ -680,13 +673,9 @@ void ScCellShell::Execute( SfxRequest& rReq )
                                                 GetColWidth( pData->GetCurX(),
                                                              pData->GetTabNo() );
                     ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
-                    assert(pFact); //ScAbstractFactory create fail!
-
                     ScopedVclPtr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
                         pTabViewShell->GetFrameWeld(), "ColWidthDialog", nCurHeight,
                         STD_COL_WIDTH, eMetric, 2, MAX_COL_WIDTH));
-                    assert(pDlg); //Dialog create fail!
-
                     if ( pDlg->Execute() == RET_OK )
                     {
                         long nVal = pDlg->GetInputValue();
@@ -720,12 +709,9 @@ void ScCellShell::Execute( SfxRequest& rReq )
                     FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric();
 
                     ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
-                    assert(pFact); //ScAbstractFactory create fail!
-
                     ScopedVclPtr<AbstractScMetricInputDlg> pDlg(pFact->CreateScMetricInputDlg(
                         pTabViewShell->GetFrameWeld(), "OptimalColWidthDialog",
                         ScGlobal::nLastColWidthExtra, STD_EXTRA_WIDTH, eMetric, 1, MAX_EXTRA_WIDTH));
-                    assert(pDlg); //Dialog create fail!
                     if ( pDlg->Execute() == RET_OK )
                     {
                         long nVal = pDlg->GetInputValue();
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 849f11f486d7..2b286e59ad48 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -273,19 +273,16 @@ void ScEditShell::Execute( SfxRequest& rReq )
                 vcl::Window* pWin = pViewData->GetDialogParent();
                 ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(pWin ? pWin->GetFrameWeld() : nullptr));
                 SotClipboardFormatId nFormat = SotClipboardFormatId::NONE;
-                if ( pDlg )
-                {
-                    pDlg->Insert( SotClipboardFormatId::STRING, EMPTY_OUSTRING );
-                    pDlg->Insert( SotClipboardFormatId::RTF,    EMPTY_OUSTRING );
-                    pDlg->Insert( SotClipboardFormatId::RICHTEXT,    EMPTY_OUSTRING );
-                    // Do not offer SotClipboardFormatId::STRING_TSVC for
-                    // in-cell paste.
+                pDlg->Insert( SotClipboardFormatId::STRING, EMPTY_OUSTRING );
+                pDlg->Insert( SotClipboardFormatId::RTF,    EMPTY_OUSTRING );
+                pDlg->Insert( SotClipboardFormatId::RICHTEXT,    EMPTY_OUSTRING );
+                // Do not offer SotClipboardFormatId::STRING_TSVC for
+                // in-cell paste.
 
-                    TransferableDataHelper aDataHelper(
-                        TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) );
+                TransferableDataHelper aDataHelper(
+                    TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) );
 
-                    nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
-                }
+                nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
                 pDlg.disposeAndClear();
 
                 // while the dialog was open, edit mode may have been stopped
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 8aef31ae8889..883a2e224ab3 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -618,21 +618,18 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
 
                     aSet.Put( aZoomItem );
                     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                    if(pFact)
-                    {
-                        ScopedVclPtr<AbstractSvxZoomDialog> pDlg(pFact->CreateSvxZoomDialog(nullptr, aSet));
-                        pDlg->SetLimits( 20, 400 );
-                        pDlg->HideButton( ZoomButtonId::OPTIMAL );
-                        bCancel = ( RET_CANCEL == pDlg->Execute() );
+                    ScopedVclPtr<AbstractSvxZoomDialog> pDlg(pFact->CreateSvxZoomDialog(nullptr, aSet));
+                    pDlg->SetLimits( 20, 400 );
+                    pDlg->HideButton( ZoomButtonId::OPTIMAL );
+                    bCancel = ( RET_CANCEL == pDlg->Execute() );
 
-                        if ( !bCancel )
-                        {
-                            const SvxZoomItem&  rZoomItem = pDlg->GetOutputItemSet()->
-                                                        Get( SID_ATTR_ZOOM );
+                    if ( !bCancel )
+                    {
+                        const SvxZoomItem&  rZoomItem = pDlg->GetOutputItemSet()->
+                                                    Get( SID_ATTR_ZOOM );
 
-                            eZoom = rZoomItem.GetType();
-                            nZoom = rZoomItem.GetValue();
-                        }
+                        eZoom = rZoomItem.GetType();
+                        nZoom = rZoomItem.GetValue();
                     }
                 }
 
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 7ee3978f30ac..0d9239f3a69e 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -723,27 +723,21 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
                     aZoomItem.SetValueSet( nBtnFlags );
                     aSet.Put( aZoomItem );
                     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                    if(pFact)
-                    {
-                        vcl::Window* pWin = GetDialogParent();
-                        pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(pWin ? pWin->GetFrameWeld() : nullptr, aSet));
-                    }
-                    if (pDlg)
-                    {
-                        pDlg->SetLimits( MINZOOM, MAXZOOM );
+                    vcl::Window* pWin = GetDialogParent();
+                    pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(pWin ? pWin->GetFrameWeld() : nullptr, aSet));
+                    pDlg->SetLimits( MINZOOM, MAXZOOM );
 
-                        bCancel = ( RET_CANCEL == pDlg->Execute() );
+                    bCancel = ( RET_CANCEL == pDlg->Execute() );
 
-                        // bCancel is True only if we were in the previous if block,
-                        // so no need to check again pDlg
-                        if ( !bCancel )
-                        {
-                            const SvxZoomItem&  rZoomItem = pDlg->GetOutputItemSet()->
-                                                        Get( SID_ATTR_ZOOM );
+                    // bCancel is True only if we were in the previous if block,
+                    // so no need to check again pDlg
+                    if ( !bCancel )
+                    {
+                        const SvxZoomItem&  rZoomItem = pDlg->GetOutputItemSet()->
+                                                    Get( SID_ATTR_ZOOM );
 
-                            eNewZoomType = rZoomItem.GetType();
-                            nZoom     = rZoomItem.GetValue();
-                        }
+                        eNewZoomType = rZoomItem.GetType();
+                        nZoom     = rZoomItem.GetValue();
                     }
                 }
 
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index c301750fb97c..ae40de856b47 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -402,13 +402,10 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
             {
                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
                 ScopedVclPtr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog( pWin, rDoc.GetLinkManager() ));
-                if ( pDlg )
-                {
-                    pDlg->Execute();
-                    rBindings.Invalidate( nSlot );
-                    SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );     // Navigator
-                    rReq.Done();
-                }
+                pDlg->Execute();
+                rBindings.Invalidate( nSlot );
+                SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );     // Navigator
+                rReq.Done();
             }
             break;
 
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 7922fdfcdea1..224fbc2ec1c6 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -835,14 +835,11 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                     uno::Reference<container::XNameReplace> xEvents( new ScSheetEventsObj( pDocSh, nCurrentTab ) );
                     uno::Reference<frame::XFrame> xFrame = GetViewFrame()->GetFrame().GetFrameInterface();
                     SvxAbstractDialogFactory* pDlgFactory = SvxAbstractDialogFactory::Create();
-                    if (pDlgFactory)
+                    ScopedVclPtr<VclAbstractDialog> pDialog( pDlgFactory->CreateSvxMacroAssignDlg(
+                        GetDialogParent(), xFrame, false, xEvents, 0 ) );
+                    if ( pDialog->Execute() == RET_OK )
                     {
-                        ScopedVclPtr<VclAbstractDialog> pDialog( pDlgFactory->CreateSvxMacroAssignDlg(
-                            GetDialogParent(), xFrame, false, xEvents, 0 ) );
-                        if ( pDialog.get() && pDialog->Execute() == RET_OK )
-                        {
                             // the dialog modifies the settings directly
-                        }
                     }
                 }
                 break;
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index c7a8a305e6f9..4a9759638584 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -330,14 +330,11 @@ bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
 {
     bool bRet = false;
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    if(pFact)
-    {
-        SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() );
-        aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
-        aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) );
-        ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rFrame.GetWindow().GetFrameWeld(), aSet, true));
-        pDlg->Execute();
-    }
+    SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() );
+    aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
+    aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) );
+    ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rFrame.GetWindow().GetFrameWeld(), aSet, true));
+    pDlg->Execute();
     return bRet;
 }
 
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index 2933ab8b7f0d..f07e156ce178 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -258,16 +258,10 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
     if ( bCaughtException )
     {
         SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
-
-        if ( pFact != nullptr )
-        {
-            ScopedVclPtr<VclAbstractDialog> pDlg(
+        ScopedVclPtr<VclAbstractDialog> pDlg(
                 pFact->CreateScriptErrorDialog( aException ));
-
-            if ( pDlg )
-                pDlg->Execute();
-        }
-       }
+        pDlg->Execute();
+    }
 
     if ( xListener.is() )
     {
diff --git a/sd/source/filter/html/HtmlOptionsDialog.cxx b/sd/source/filter/html/HtmlOptionsDialog.cxx
index 1716a2fd1625..092554f0e58c 100644
--- a/sd/source/filter/html/HtmlOptionsDialog.cxx
+++ b/sd/source/filter/html/HtmlOptionsDialog.cxx
@@ -171,21 +171,15 @@ sal_Int16 SdHtmlOptionsDialog::execute()
     sal_Int16 nRet = ExecutableDialogResults::CANCEL;
 
     SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-    if( pFact )
+    ScopedVclPtr<AbstractSdPublishingDlg> pDlg(pFact->CreateSdPublishingDlg( Application::GetDefDialogParent(), meDocType ));
+    if( pDlg->Execute() )
     {
-        ScopedVclPtr<AbstractSdPublishingDlg> pDlg(pFact->CreateSdPublishingDlg( Application::GetDefDialogParent(), meDocType ));
-        if( pDlg )
-        {
-            if( pDlg->Execute() )
-            {
-                pDlg->GetParameterSequence( maFilterDataSequence );
-                nRet = ExecutableDialogResults::OK;
-            }
-            else
-            {
-                nRet = ExecutableDialogResults::CANCEL;
-            }
-        }
+        pDlg->GetParameterSequence( maFilterDataSequence );
+        nRet = ExecutableDialogResults::OK;
+    }
+    else
+    {
+        nRet = ExecutableDialogResults::CANCEL;
     }
     return nRet;
 }
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index e3291634a35e..45af870b9679 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -744,66 +744,63 @@ VclPtr<SfxTabPage> SdModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParen
     VclPtr<SfxTabPage> pRet;
     SfxAllItemSet aSet(*(rSet.GetPool()));
     SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-    if( pFact )
+
+    switch(nId)
     {
-        switch(nId)
+        case SID_SD_TP_CONTENTS:
+        case SID_SI_TP_CONTENTS:
         {
-            case SID_SD_TP_CONTENTS:
-            case SID_SI_TP_CONTENTS:
-            {   ::CreateTabPage fnCreatePage = pFact->GetSdOptionsContentsTabPageCreatorFunc();
-                if( fnCreatePage )
-                    pRet = (*fnCreatePage)( pParent, &rSet );
-            }
-            break;
-            case SID_SD_TP_SNAP:
-            case SID_SI_TP_SNAP:
-            {   ::CreateTabPage fnCreatePage = pFact->GetSdOptionsSnapTabPageCreatorFunc();
-                if( fnCreatePage )
-                    pRet = (*fnCreatePage)( pParent, &rSet );
-            }
-            break;
-            case SID_SD_TP_PRINT:
-            case SID_SI_TP_PRINT:
-            {
-                ::CreateTabPage fnCreatePage = pFact->GetSdPrintOptionsTabPageCreatorFunc();
-                if( fnCreatePage )
-                {
-                    pRet = (*fnCreatePage)( pParent, &rSet );
-                    if(SID_SD_TP_PRINT == nId)
-                        aSet.Put (SfxUInt32Item(SID_SDMODE_FLAG,SD_DRAW_MODE));
-                    pRet->PageCreated(aSet);
-                }
-            }
-            break;
-            case SID_SI_TP_MISC:
-            case SID_SD_TP_MISC:
+            ::CreateTabPage fnCreatePage = pFact->GetSdOptionsContentsTabPageCreatorFunc();
+            if( fnCreatePage )
+                pRet = (*fnCreatePage)( pParent, &rSet );
+        }
+        break;
+        case SID_SD_TP_SNAP:
+        case SID_SI_TP_SNAP:
+        {
+            ::CreateTabPage fnCreatePage = pFact->GetSdOptionsSnapTabPageCreatorFunc();
+            if( fnCreatePage )
+                pRet = (*fnCreatePage)( pParent, &rSet );
+        }
+        break;
+        case SID_SD_TP_PRINT:
+        case SID_SI_TP_PRINT:
+        {
+            ::CreateTabPage fnCreatePage = pFact->GetSdPrintOptionsTabPageCreatorFunc();
+            if( fnCreatePage )
             {
-                ::CreateTabPage fnCreatePage = pFact->GetSdOptionsMiscTabPageCreatorFunc();
-                if( fnCreatePage )
-                {
-                    pRet = (*fnCreatePage)( pParent, &rSet );
-                    if(SID_SD_TP_MISC == nId)
-                        aSet.Put (SfxUInt32Item(SID_SDMODE_FLAG,SD_DRAW_MODE));
-                    else
-                        aSet.Put (SfxUInt32Item(SID_SDMODE_FLAG,SD_IMPRESS_MODE));
-                    pRet->PageCreated(aSet);
-                }
+                pRet = (*fnCreatePage)( pParent, &rSet );
+                if(SID_SD_TP_PRINT == nId)
+                    aSet.Put (SfxUInt32Item(SID_SDMODE_FLAG,SD_DRAW_MODE));
+                pRet->PageCreated(aSet);
             }
-            break;
-            case RID_SVXPAGE_TEXTANIMATION :
+        }
+        break;
+        case SID_SI_TP_MISC:
+        case SID_SD_TP_MISC:
+        {
+            ::CreateTabPage fnCreatePage = pFact->GetSdOptionsMiscTabPageCreatorFunc();
+            if( fnCreatePage )
             {
-                SfxAbstractDialogFactory* pSfxFact = SfxAbstractDialogFactory::Create();
-                if ( pSfxFact )
-                {
-                    ::CreateTabPage fnCreatePage = pSfxFact->GetTabPageCreatorFunc( nId );
-                    if ( fnCreatePage )
-                        pRet = (*fnCreatePage)( pParent, &rSet );
-                }
+                pRet = (*fnCreatePage)( pParent, &rSet );
+                if(SID_SD_TP_MISC == nId)
+                    aSet.Put (SfxUInt32Item(SID_SDMODE_FLAG,SD_DRAW_MODE));
+                else
+                    aSet.Put (SfxUInt32Item(SID_SDMODE_FLAG,SD_IMPRESS_MODE));
+                pRet->PageCreated(aSet);
             }
-            break;
         }
-        DBG_ASSERT( pRet, "SdModule::CreateTabPage(): no valid ID for TabPage!" );
+        break;
+        case RID_SVXPAGE_TEXTANIMATION :
+        {
+            SfxAbstractDialogFactory* pSfxFact = SfxAbstractDialogFactory::Create();
+            ::CreateTabPage fnCreatePage = pSfxFact->GetTabPageCreatorFunc( nId );
+            if ( fnCreatePage )
+                pRet = (*fnCreatePage)( pParent, &rSet );
+        }
+        break;
     }
+    DBG_ASSERT( pRet, "SdModule::CreateTabPage(): no valid ID for TabPage!" );
 
     return pRet;
 }
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index 434d6271ce94..6e22f84315d8 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -283,22 +283,20 @@ bool DrawDocShell::CheckPageName(weld::Window* pWin, OUString& rName)
     {
         OUString aDesc( SdResId( STR_WARN_PAGE_EXISTS ) );
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        if( pFact )
-        {
-            ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog(pWin, aStrForDlg, aDesc));
-            aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE );
 
-            aNameDlg->SetCheckNameHdl( LINK( this, DrawDocShell, RenameSlideHdl ) );
+        ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog(pWin, aStrForDlg, aDesc));
+        aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE );
 
-            rtl::Reference<FuPoor> xFunc( mpViewShell->GetCurrentFunction() );
-            if( xFunc.is() )
-                xFunc->cancel();
+        aNameDlg->SetCheckNameHdl( LINK( this, DrawDocShell, RenameSlideHdl ) );
 
-            if( aNameDlg->Execute() == RET_OK )
-            {
-                aNameDlg->GetName( rName );
-                bIsNameValid = IsNewPageNameValid( rName );
-            }
+        rtl::Reference<FuPoor> xFunc( mpViewShell->GetCurrentFunction() );
+        if( xFunc.is() )
+            xFunc->cancel();
+
+        if( aNameDlg->Execute() == RET_OK )
+        {
+            aNameDlg->GetName( rName );
+            bIsNameValid = IsNewPageNameValid( rName );
         }
     }
 
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index e482e5f13b83..b79cd11cf1bb 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -267,9 +267,9 @@ void DrawDocShell::Execute( SfxRequest& rReq )
             if (aNewLangTxt == "*" )
             {
                 // open the dialog "Tools/Options/Language Settings - Language"
-                SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
-                if (pFact && mpViewShell)
+                if (mpViewShell)
                 {
+                    SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
                     ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( mpViewShell->GetActiveWindow(), SID_LANGUAGE_OPTIONS ));
                     pDlg->Execute();
                 }
diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx
index 48ab232e591b..cb62202ea650 100644
--- a/sd/source/ui/func/fuarea.cxx
+++ b/sd/source/ui/func/fuarea.cxx
@@ -61,9 +61,7 @@ void FuArea::DoExecute( SfxRequest& rReq )
     mpView->GetAttributes( aNewAttr );
 
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    VclPtr<AbstractSvxAreaTabDialog> pDlg(pFact ? pFact->CreateSvxAreaTabDialog(mpViewShell->GetActiveWindow(), &aNewAttr, mpDoc, true) : nullptr);
-    if (!pDlg)
-        return;
+    VclPtr<AbstractSvxAreaTabDialog> pDlg( pFact->CreateSvxAreaTabDialog(mpViewShell->GetActiveWindow(), &aNewAttr, mpDoc, true) );
 
     pDlg->StartExecuteAsync([=](sal_Int32 nResult){
         if (nResult == RET_OK)
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index db6df9428138..523578bad564 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -189,10 +189,8 @@ void FuBullet::InsertSpecialCharacter( SfxRequest const & rReq )
             aSet.Put( *pFontItem );
 
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        ScopedVclPtr<SfxAbstractDialog> pDlg(pFact ? pFact->CreateCharMapDialog(mpView->GetViewShell()->GetFrameWeld(), aSet,
-            true ) : nullptr);
-        if( !pDlg )
-            return;
+        ScopedVclPtr<SfxAbstractDialog> pDlg( pFact->CreateCharMapDialog(mpView->GetViewShell()->GetFrameWeld(), aSet,
+            true ) );
 
         // If a character is selected, it can be shown
         // pDLg->SetFont( );
diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx
index 3e83b4245881..f53afb018762 100644
--- a/sd/source/ui/func/fuchar.cxx
+++ b/sd/source/ui/func/fuchar.cxx
@@ -72,40 +72,32 @@ void FuChar::DoExecute( SfxRequest& rReq )
         aNewAttr.Put( aEditAttr, false );
 
         SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-        ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdTabCharDialog(mpViewShell->GetActiveWindow(), &aNewAttr, mpDoc->GetDocSh() ) : nullptr);
-        sal_uInt16 nResult = RET_CANCEL;
-        if( pDlg )
+        ScopedVclPtr<SfxAbstractTabDialog> pDlg( pFact->CreateSdTabCharDialog(mpViewShell->GetActiveWindow(), &aNewAttr, mpDoc->GetDocSh() ) );
+        if (rReq.GetSlot() == SID_CHAR_DLG_EFFECT)
         {
-            if (rReq.GetSlot() == SID_CHAR_DLG_EFFECT)
-            {
-                pDlg->SetCurPageId("RID_SVXPAGE_CHAR_EFFECTS");
-            }
-
-            nResult = pDlg->Execute();
-
-            if( nResult == RET_OK )
-            {
-                const SfxItemSet* pOutputSet = pDlg->GetOutputItemSet();
-                SfxItemSet aOtherSet( *pOutputSet );
-
-                // and now the reverse process
-                const SvxBrushItem* pBrushItem = aOtherSet.GetItem<SvxBrushItem>( SID_ATTR_BRUSH_CHAR );
-
-                if ( pBrushItem )
-                {
-                    SvxBackgroundColorItem aBackColorItem( pBrushItem->GetColor(), EE_CHAR_BKGCOLOR );
-                    aOtherSet.ClearItem( SID_ATTR_BRUSH_CHAR );
-                    aOtherSet.Put( aBackColorItem );
-                }
-
-                rReq.Done( aOtherSet );
-                pArgs = rReq.GetArgs();
-            }
+            pDlg->SetCurPageId("RID_SVXPAGE_CHAR_EFFECTS");
         }
+
+        sal_uInt16 nResult = pDlg->Execute();
+
         if( nResult != RET_OK )
-        {
             return;
+
+        const SfxItemSet* pOutputSet = pDlg->GetOutputItemSet();
+        SfxItemSet aOtherSet( *pOutputSet );
+
+        // and now the reverse process
+        const SvxBrushItem* pBrushItem = aOtherSet.GetItem<SvxBrushItem>( SID_ATTR_BRUSH_CHAR );
+
+        if ( pBrushItem )
+        {
+            SvxBackgroundColorItem aBackColorItem( pBrushItem->GetColor(), EE_CHAR_BKGCOLOR );
+            aOtherSet.ClearItem( SID_ATTR_BRUSH_CHAR );
+            aOtherSet.Put( aBackColorItem );
         }
+
+        rReq.Done( aOtherSet );
+        pArgs = rReq.GetArgs();
     }
     mpView->SetAttributes(*pArgs);
 
diff --git a/sd/source/ui/func/fuconnct.cxx b/sd/source/ui/func/fuconnct.cxx
index a65a92c11e7f..c9f15b0389c5 100644
--- a/sd/source/ui/func/fuconnct.cxx
+++ b/sd/source/ui/func/fuconnct.cxx
@@ -56,9 +56,9 @@ void FuConnectionDlg::DoExecute( SfxRequest& rReq )
     if( !pArgs )
     {
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        ScopedVclPtr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( nullptr, aNewAttr, mpView, RID_SVXPAGE_CONNECTION) : nullptr);
+        ScopedVclPtr<SfxAbstractDialog> pDlg( pFact->CreateSfxDialog( nullptr, aNewAttr, mpView, RID_SVXPAGE_CONNECTION) );
 
-        if( pDlg.get() && (pDlg->Execute() == RET_OK) )
+        if( pDlg->Execute() == RET_OK )
         {
             rReq.Done( *pDlg->GetOutputItemSet() );
             pArgs = rReq.GetArgs();
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index a8cde2135f49..e6b1c95f35e2 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -99,27 +99,22 @@ void FuCopy::DoExecute( SfxRequest& rReq )
             }
 
             SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-            if( pFact )
-            {
-                ScopedVclPtr<AbstractCopyDlg> pDlg(pFact->CreateCopyDlg(mpViewShell->GetActiveWindow(), aSet, mpView ));
-                if (!pDlg)
-                    return;
+            ScopedVclPtr<AbstractCopyDlg> pDlg(pFact->CreateCopyDlg(mpViewShell->GetActiveWindow(), aSet, mpView ));
 
-                sal_uInt16 nResult = pDlg->Execute();
+            sal_uInt16 nResult = pDlg->Execute();
 
-                switch( nResult )
-                {
-                    case RET_OK:
-                        pDlg->GetAttr( aSet );
-                        rReq.Done( aSet );
-                        pArgs = rReq.GetArgs();
-                    break;
+            switch( nResult )
+            {
+                case RET_OK:
+                    pDlg->GetAttr( aSet );
+                    rReq.Done( aSet );
+                    pArgs = rReq.GetArgs();
+                break;
 
-                    default:
-                    {
-                        pDlg.disposeAndClear();
-                        mpView->EndUndo();
-                    }
+                default:
+                {
+                    pDlg.disposeAndClear();
+                    mpView->EndUndo();
                     return; // Cancel
                 }
             }
diff --git a/sd/source/ui/func/fucushow.cxx b/sd/source/ui/func/fucushow.cxx
index df6e0f96cc3e..7350da59c6ea 100644
--- a/sd/source/ui/func/fucushow.cxx
+++ b/sd/source/ui/func/fucushow.cxx
@@ -56,25 +56,22 @@ void FuCustomShowDlg::DoExecute( SfxRequest& )
 {
     SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
     vcl::Window* pWin = mpViewShell->GetActiveWindow();
-    ScopedVclPtr<AbstractSdCustomShowDlg> pDlg(pFact ? pFact->CreateSdCustomShowDlg(pWin ? pWin->GetFrameWeld() : nullptr, *mpDoc) : nullptr);
-    if( pDlg )
+    ScopedVclPtr<AbstractSdCustomShowDlg> pDlg( pFact->CreateSdCustomShowDlg(pWin ? pWin->GetFrameWeld() : nullptr, *mpDoc) );
+    sal_uInt16 nRet = pDlg->Execute();
+    if( pDlg->IsModified() )
     {
-        sal_uInt16 nRet = pDlg->Execute();
-        if( pDlg->IsModified() )
-        {
-            mpDoc->SetChanged();
-            sd::PresentationSettings& rSettings = mpDoc->getPresentationSettings();
-            rSettings.mbCustomShow = pDlg->IsCustomShow();
-        }
-        pDlg.disposeAndClear();
+        mpDoc->SetChanged();
+        sd::PresentationSettings& rSettings = mpDoc->getPresentationSettings();
+        rSettings.mbCustomShow = pDlg->IsCustomShow();
+    }
+    pDlg.disposeAndClear();
 
-        if( nRet == RET_YES )
-        {
-            mpViewShell->SetStartShowWithDialog(true);
+    if( nRet == RET_YES )
+    {
+        mpViewShell->SetStartShowWithDialog(true);
 
-            mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_PRESENTATION,
-                    SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
-        }
+        mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_PRESENTATION,
+                SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
     }
 }
 
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 3f910c973047..393bc24bcda2 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -241,48 +241,45 @@ void FuInsertClipboard::DoExecute( SfxRequest&  )
 
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
     ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(mpViewShell->GetFrameWeld()));
-    if ( pDlg )
+    pDlg->Insert( SotClipboardFormatId::EMBED_SOURCE, OUString() );
+    pDlg->Insert( SotClipboardFormatId::LINK_SOURCE, OUString() );
+    pDlg->Insert( SotClipboardFormatId::DRAWING, OUString() );
+    pDlg->Insert( SotClipboardFormatId::SVXB, OUString() );
+    pDlg->Insert( SotClipboardFormatId::GDIMETAFILE, OUString() );
+    pDlg->Insert( SotClipboardFormatId::BITMAP, OUString() );
+    pDlg->Insert( SotClipboardFormatId::NETSCAPE_BOOKMARK, OUString() );
+    pDlg->Insert( SotClipboardFormatId::STRING, OUString() );
+    pDlg->Insert( SotClipboardFormatId::HTML, OUString() );
+    pDlg->Insert( SotClipboardFormatId::RTF, OUString() );
+    pDlg->Insert( SotClipboardFormatId::RICHTEXT, OUString() );
+    pDlg->Insert( SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT, OUString() );
+
+    //TODO/MBA: testing
+    nFormatId = pDlg->GetFormat( aDataHelper );
+    if( nFormatId != SotClipboardFormatId::NONE && aDataHelper.GetTransferable().is() )
     {
-        pDlg->Insert( SotClipboardFormatId::EMBED_SOURCE, OUString() );
-        pDlg->Insert( SotClipboardFormatId::LINK_SOURCE, OUString() );
-        pDlg->Insert( SotClipboardFormatId::DRAWING, OUString() );
-        pDlg->Insert( SotClipboardFormatId::SVXB, OUString() );
-        pDlg->Insert( SotClipboardFormatId::GDIMETAFILE, OUString() );
-        pDlg->Insert( SotClipboardFormatId::BITMAP, OUString() );
-        pDlg->Insert( SotClipboardFormatId::NETSCAPE_BOOKMARK, OUString() );
-        pDlg->Insert( SotClipboardFormatId::STRING, OUString() );
-        pDlg->Insert( SotClipboardFormatId::HTML, OUString() );
-        pDlg->Insert( SotClipboardFormatId::RTF, OUString() );
-        pDlg->Insert( SotClipboardFormatId::RICHTEXT, OUString() );
-        pDlg->Insert( SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT, OUString() );
-
-        //TODO/MBA: testing
-        nFormatId = pDlg->GetFormat( aDataHelper );
-        if( nFormatId != SotClipboardFormatId::NONE && aDataHelper.GetTransferable().is() )
-        {
-            sal_Int8 nAction = DND_ACTION_COPY;
-            DrawViewShell* pDrViewSh = nullptr;
+        sal_Int8 nAction = DND_ACTION_COPY;
+        DrawViewShell* pDrViewSh = nullptr;
 
-            if (!mpView->InsertData( aDataHelper,
-                                    mpWindow->PixelToLogic( ::tools::Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ),
-                                    nAction, false, nFormatId ))
-            {
-                pDrViewSh = dynamic_cast<DrawViewShell*>(mpViewShell);
-            }
+        if (!mpView->InsertData( aDataHelper,
+                                mpWindow->PixelToLogic( ::tools::Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ),
+                                nAction, false, nFormatId ))
+        {
+            pDrViewSh = dynamic_cast<DrawViewShell*>(mpViewShell);
+        }
 
-            if (pDrViewSh)
+        if (pDrViewSh)
+        {
+            INetBookmark        aINetBookmark( "", "" );
+
+            if( ( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) &&
+                aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) ) ||
+                ( aDataHelper.HasFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ) &&
+                aDataHelper.GetINetBookmark( SotClipboardFormatId::FILEGRPDESCRIPTOR, aINetBookmark ) ) ||
+                ( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) &&
+                aDataHelper.GetINetBookmark( SotClipboardFormatId::UNIFORMRESOURCELOCATOR, aINetBookmark ) ) )
             {
-                INetBookmark        aINetBookmark( "", "" );
-
-                if( ( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) &&
-                    aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) ) ||
-                    ( aDataHelper.HasFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ) &&
-                    aDataHelper.GetINetBookmark( SotClipboardFormatId::FILEGRPDESCRIPTOR, aINetBookmark ) ) ||
-                    ( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) &&
-                    aDataHelper.GetINetBookmark( SotClipboardFormatId::UNIFORMRESOURCELOCATOR, aINetBookmark ) ) )
-                {
-                    pDrViewSh->InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), "" );
-                }
+                pDrViewSh->InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), "" );
             }
         }
     }
@@ -501,19 +498,16 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
                     ScopedVclPtr<SfxAbstractInsertObjectDialog> pDlg(
                             pFact->CreateInsertObjectDialog( mpViewShell->GetFrameWeld(), SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommandString(),
                             xStorage, &aServerLst ));
-                    if ( pDlg )
-                    {
-                        pDlg->Execute();
-                        bCreateNew = pDlg->IsCreateNew();
-                        xObj = pDlg->GetObject();
+                    pDlg->Execute();
+                    bCreateNew = pDlg->IsCreateNew();
+                    xObj = pDlg->GetObject();
 
-                        xIconMetaFile = pDlg->GetIconIfIconified( &aIconMediaType );
-                        if ( xIconMetaFile.is() )
-                            nAspect = embed::Aspects::MSOLE_ICON;
+                    xIconMetaFile = pDlg->GetIconIfIconified( &aIconMediaType );
+                    if ( xIconMetaFile.is() )
+                        nAspect = embed::Aspects::MSOLE_ICON;
 
-                        if ( xObj.is() )
-                            mpViewShell->GetObjectShell()->GetEmbeddedObjectContainer().InsertEmbeddedObject( xObj, aName );
-                    }
+                    if ( xObj.is() )
+                        mpViewShell->GetObjectShell()->GetEmbeddedObjectContainer().InsertEmbeddedObject( xObj, aName );
 
                     break;
                 }
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 5ad65b627063..b041615a63d9 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -331,10 +331,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
     mpDocSh->SetWaitCursor( false );
     SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
     vcl::Window* pParent = mpViewShell ? mpViewShell->GetActiveWindow() : nullptr;
-    ScopedVclPtr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(pParent, mpDoc, pMedium, aFile) : nullptr);
-
-    if( !pDlg )
-        return false;
+    ScopedVclPtr<AbstractSdInsertPagesObjsDlg> pDlg( pFact->CreateSdInsertPagesObjsDlg(pParent, mpDoc, pMedium, aFile) );
 
     sal_uInt16 nRet = pDlg->Execute();
 
@@ -415,9 +412,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
 void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
 {
     SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-    ScopedVclPtr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(mpViewShell->GetActiveWindow(), mpDoc, nullptr, aFile) : nullptr);
-    if( !pDlg )
-        return;
+    ScopedVclPtr<AbstractSdInsertPagesObjsDlg> pDlg( pFact->CreateSdInsertPagesObjsDlg(mpViewShell->GetActiveWindow(), mpDoc, nullptr, aFile) );
 
     mpDocSh->SetWaitCursor( false );
 
diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx
index 3d45adf33000..9735040321c3 100644
--- a/sd/source/ui/func/fuline.cxx
+++ b/sd/source/ui/func/fuline.cxx
@@ -75,9 +75,7 @@ void FuLine::DoExecute( SfxRequest& rReq )
 
     bool bHasMarked = mpView->AreObjectsMarked();
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    VclPtr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSvxLineTabDialog(mpViewShell->GetActiveWindow(), pNewAttr.get(), mpDoc, pObj, bHasMarked) : nullptr);
-    if (!pDlg)
-        return;
+    VclPtr<SfxAbstractTabDialog> pDlg( pFact->CreateSvxLineTabDialog(mpViewShell->GetActiveWindow(), pNewAttr.get(), mpDoc, pObj, bHasMarked) );
 
     pDlg->StartExecuteAsync([=](sal_Int32 nResult){
         if (nResult == RET_OK)
diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index 36aedff0551d..a4910d96dbac 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -115,34 +115,31 @@ void FuLineEnd::DoExecute( SfxRequest& )
         }
 
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact ? pFact->CreateSvxNameDialog( nullptr, aName, aDesc ) : nullptr);
+        ScopedVclPtr<AbstractSvxNameDialog> pDlg( pFact->CreateSvxNameDialog( nullptr, aName, aDesc ) );
 
-        if( pDlg )
+        pDlg->SetEditHelpId( HID_SD_NAMEDIALOG_LINEEND );
+
+        if( pDlg->Execute() == RET_OK )
         {
-            pDlg->SetEditHelpId( HID_SD_NAMEDIALOG_LINEEND );
+            pDlg->GetName( aName );
+            bDifferent = true;
+
+            for( long i = 0; i < nCount && bDifferent; i++ )
+            {
+                if( aName == pLineEndList->GetLineEnd( i )->GetName() )
+                    bDifferent = false;
+            }
 
-            if( pDlg->Execute() == RET_OK )
+            if( bDifferent )
+            {
+                pLineEndList->Insert(o3tl::make_unique<XLineEndEntry>(aPolyPolygon, aName));
+            }
+            else
             {
-                pDlg->GetName( aName );
-                bDifferent = true;
-
-                for( long i = 0; i < nCount && bDifferent; i++ )
-                {
-                    if( aName == pLineEndList->GetLineEnd( i )->GetName() )
-                        bDifferent = false;
-                }
-
-                if( bDifferent )
-                {
-                    pLineEndList->Insert(o3tl::make_unique<XLineEndEntry>(aPolyPolygon, aName));
-                }
-                else
-                {
-                    std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(mpWindow ? mpWindow->GetFrameWeld() : nullptr,
-                                                               VclMessageType::Warning, VclButtonsType::Ok,
-                                                               SdResId(STR_WARN_NAME_DUPLICATE)));
-                    xWarn->run();
-                }
+                std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(mpWindow ? mpWindow->GetFrameWeld() : nullptr,
+                                                           VclMessageType::Warning, VclButtonsType::Ok,
+                                                           SdResId(STR_WARN_NAME_DUPLICATE)));
+                xWarn->run();
             }
         }
     }
diff --git a/sd/source/ui/func/fulink.cxx b/sd/source/ui/func/fulink.cxx
index a048854f6c3e..4a9027ac4b03 100644
--- a/sd/source/ui/func/fulink.cxx
+++ b/sd/source/ui/func/fulink.cxx
@@ -59,11 +59,8 @@ void FuLink::DoExecute( SfxRequest& )
 
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
     ScopedVclPtr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog( mpViewShell->GetActiveWindow(), pLinkManager ));
-    if ( pDlg )
-    {
-        pDlg->Execute();
-        mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_MANAGE_LINKS );
-    }
+    pDlg->Execute();
+    mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_MANAGE_LINKS );
 }
 
 } // end of namespace sd
diff --git a/sd/source/ui/func/fumeasur.cxx b/sd/source/ui/func/fumeasur.cxx
index b4e259a8e154..f9664d76f253 100644
--- a/sd/source/ui/func/fumeasur.cxx
+++ b/sd/source/ui/func/fumeasur.cxx
@@ -56,9 +56,9 @@ void FuMeasureDlg::DoExecute( SfxRequest& rReq )
     if( !pArgs )
     {
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        ScopedVclPtr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( nullptr, aNewAttr, mpView, RID_SVXPAGE_MEASURE) : nullptr );
+        ScopedVclPtr<SfxAbstractDialog> pDlg( pFact->CreateSfxDialog( nullptr, aNewAttr, mpView, RID_SVXPAGE_MEASURE) );
 
-        if( pDlg.get() && (pDlg->Execute() == RET_OK) )
+        if( pDlg->Execute() == RET_OK )
         {
             rReq.Done( *pDlg->GetOutputItemSet() );
             pArgs = rReq.GetArgs();
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index 6fa9494dfb7f..92e7ed2d488d 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -92,8 +92,8 @@ void FuMorph::DoExecute( SfxRequest& )
         SdrObject*  pPolyObj1 = pCloneObj1->ConvertToPolyObj(false, false);
         SdrObject*  pPolyObj2 = pCloneObj2->ConvertToPolyObj(false, false);
         SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-        ScopedVclPtr<AbstractMorphDlg> pDlg(pFact ? pFact->CreateMorphDlg(mpWindow ? mpWindow->GetFrameWeld() : nullptr, pObj1, pObj2) : nullptr);
-        if(pPolyObj1 && pPolyObj2 && pDlg && (pDlg->Execute() == RET_OK))
+        ScopedVclPtr<AbstractMorphDlg> pDlg( pFact->CreateMorphDlg(mpWindow ? mpWindow->GetFrameWeld() : nullptr, pObj1, pObj2) );
+        if(pPolyObj1 && pPolyObj2 && (pDlg->Execute() == RET_OK))
         {
             B2DPolyPolygonList_impl aPolyPolyList;
             ::basegfx::B2DPolyPolygon aPolyPoly1;
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index ab6f3a51b7c8..1d1854d4906b 100644
--- a/sd/source/ui/func/fuoaprms.cxx
+++ b/sd/source/ui/func/fuoaprms.cxx
@@ -446,18 +446,15 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
             aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false));
 
         SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-        ScopedVclPtr<SfxAbstractDialog> pDlg(pFact ? pFact->CreatSdActionDialog(mpViewShell->GetActiveWindow(), &aSet, mpView) : nullptr);
+        ScopedVclPtr<SfxAbstractDialog> pDlg( pFact->CreatSdActionDialog(mpViewShell->GetActiveWindow(), &aSet, mpView) );
 
-        short nResult = pDlg ? pDlg->Execute() : static_cast<short>(RET_CANCEL);
-
-        if( nResult == RET_OK )
-        {
-            rReq.Done( *( pDlg->GetOutputItemSet() ) );
-            pArgs = rReq.GetArgs();
-        }
+        short nResult = pDlg->Execute();
 
         if( nResult != RET_OK )
             return;
+
+        rReq.Done( *( pDlg->GetOutputItemSet() ) );
+        pArgs = rReq.GetArgs();
     }
 
     // evaluation of the ItemSets
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index a46166e95dcc..ee657c01e5c8 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -81,41 +81,31 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq )
 
         // create and execute dialog
         SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-        ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdOutlineBulletTabDlg(mpViewShell->GetActiveWindow(), &aNewAttr, mpView) : nullptr);
-        if( pDlg )
-        {
-            if ( pPageItem )
-                pDlg->SetCurPageId( OUStringToOString( pPageItem->GetValue(), RTL_TEXTENCODING_UTF8 ) );
-            sal_uInt16 nResult = pDlg->Execute();
+        ScopedVclPtr<SfxAbstractTabDialog> pDlg( pFact->CreateSdOutlineBulletTabDlg(mpViewShell->GetActiveWindow(), &aNewAttr, mpView) );
+        if ( pPageItem )
+            pDlg->SetCurPageId( OUStringToOString( pPageItem->GetValue(), RTL_TEXTENCODING_UTF8 ) );
+        sal_uInt16 nResult = pDlg->Execute();
 
-            switch( nResult )
-            {
-                case RET_OK:
-                {
-                    SfxItemSet aSet( *pDlg->GetOutputItemSet() );
+        if( nResult != RET_OK )
+            return;
 
-                    OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
+        SfxItemSet aSet( *pDlg->GetOutputItemSet() );
 
-                    std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard;
+        OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
 
-                    if (OutlineView* pView = dynamic_cast<OutlineView*>(mpView))
-                    {
-                        pOLV = pView->GetViewByWindow(mpViewShell->GetActiveWindow());
-                        aGuard.reset(new OutlineViewModelChangeGuard(*pView));
-                    }
+        std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard;
 
-                    if( pOLV )
-                        pOLV->EnableBullets();
+        if (OutlineView* pView = dynamic_cast<OutlineView*>(mpView))
+        {
+            pOLV = pView->GetViewByWindow(mpViewShell->GetActiveWindow());
+            aGuard.reset(new OutlineViewModelChangeGuard(*pView));
+        }
 
-                    rReq.Done( aSet );
-                    pArgs = rReq.GetArgs();
-                }
-                break;
+        if( pOLV )
+            pOLV->EnableBullets();
 
-                default:
-                    return;
-            }
-        }
+        rReq.Done( aSet );
+        pArgs = rReq.GetArgs();
     }
 
     /* not direct to pOlView; therefore, SdDrawView::SetAttributes can catch
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 58d359b72bc5..5c2c79847df7 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -330,8 +330,8 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent)
     {
         // create the dialog
         SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-        ScopedVclPtr<SfxAbstractTabDialog> pDlg( pFact ? pFact->CreateSdTabPageDialog(mpViewShell->GetActiveWindow(), &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage) : nullptr );
-        if( pDlg.get() && pDlg->Execute() == RET_OK )
+        ScopedVclPtr<SfxAbstractTabDialog> pDlg( pFact->CreateSdTabPageDialog(mpViewShell->GetActiveWindow(), &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage) );
+        if( pDlg->Execute() == RET_OK )
             pTempSet.reset( new SfxItemSet(*pDlg->GetOutputItemSet()) );
     }
 
diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx
index 986089feb53f..a2c2ceb9f8d0 100644
--- a/sd/source/ui/func/fuparagr.cxx
+++ b/sd/source/ui/func/fuparagr.cxx
@@ -90,9 +90,7 @@ void FuParagraph::DoExecute( SfxRequest& rReq )
         }
 
         SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-        ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdParagraphTabDlg(mpViewShell->GetActiveWindow(), &aNewAttr) : nullptr);
-        if (!pDlg)
-            return;
+        ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSdParagraphTabDlg(mpViewShell->GetActiveWindow(), &aNewAttr));
 
         sal_uInt16 nResult = pDlg->Execute();
 
diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx
index 12a2003ae097..4d6002d46571 100644
--- a/sd/source/ui/func/fuprlout.cxx
+++ b/sd/source/ui/func/fuprlout.cxx
@@ -170,9 +170,9 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
     else
     {
         SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-        ScopedVclPtr<AbstractSdPresLayoutDlg> pDlg(pFact ? pFact->CreateSdPresLayoutDlg(mpDocSh, aSet ) : nullptr);
+        ScopedVclPtr<AbstractSdPresLayoutDlg> pDlg( pFact->CreateSdPresLayoutDlg(mpDocSh, aSet ) );
 
-        sal_uInt16 nResult = pDlg ? pDlg->Execute() : static_cast<short>(RET_CANCEL);
+        sal_uInt16 nResult = pDlg->Execute();
 
         switch (nResult)
         {
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index da8032d7f8f8..c9e81ec38c44 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -134,21 +134,18 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
             SfxStyleSheetBase& rStyleSheet = *pStyleSheet;
 

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list