summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/app.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-31 08:29:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-12 08:24:04 +0200
commit51c879d8649c7aad7a0c9be0c7ea042d041254d8 (patch)
treed454d885be767ba7d113547b1fa91ee85cabcf6a /sfx2/source/appl/app.cxx
parentaf66cd6e0809982d61b962fbcf2042981084f770 (diff)
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@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/appl/app.cxx')
-rw-r--r--sfx2/source/appl/app.cxx27
1 files changed, 12 insertions, 15 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 721b5e9e3734..aa3b29329cef 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -496,27 +496,24 @@ SfxApplication::ChooseScript()
#if HAVE_FEATURE_SCRIPTING
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- if ( pFact )
- {
- SAL_INFO( "sfx.appl", "create selector dialog");
+ SAL_INFO( "sfx.appl", "create selector dialog");
- const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
- const SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetFrame() : nullptr;
- uno::Reference< frame::XFrame > xFrame( pFrame ? pFrame->GetFrameInterface() : uno::Reference< frame::XFrame >() );
+ const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+ const SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetFrame() : nullptr;
+ uno::Reference< frame::XFrame > xFrame( pFrame ? pFrame->GetFrameInterface() : uno::Reference< frame::XFrame >() );
- ScopedVclPtr<AbstractScriptSelectorDialog> pDlg(
- pFact->CreateScriptSelectorDialog( nullptr, xFrame ));
+ ScopedVclPtr<AbstractScriptSelectorDialog> pDlg(
+ pFact->CreateScriptSelectorDialog( nullptr, xFrame ));
- SAL_INFO( "sfx.appl", "done, now exec it");
+ SAL_INFO( "sfx.appl", "done, now exec it");
- sal_uInt16 nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
- SAL_INFO( "sfx.appl", "has returned");
+ SAL_INFO( "sfx.appl", "has returned");
- if ( nRet == RET_OK )
- {
- aScriptURL = pDlg->GetScriptURL();
- }
+ if ( nRet == RET_OK )
+ {
+ aScriptURL = pDlg->GetScriptURL();
}
#endif
return aScriptURL;