diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-31 08:29:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-12 08:24:04 +0200 |
commit | 51c879d8649c7aad7a0c9be0c7ea042d041254d8 (patch) | |
tree | d454d885be767ba7d113547b1fa91ee85cabcf6a /starmath | |
parent | af66cd6e0809982d61b962fbcf2042981084f770 (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 'starmath')
-rw-r--r-- | starmath/source/view.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 346ea88400f3..a95376d75864 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1707,14 +1707,10 @@ void SmViewShell::Execute(SfxRequest& rReq) SfxItemSet aSet( SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{}); aSet.Put( SvxZoomItem( SvxZoomType::PERCENT, mpGraphic->GetZoom())); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if(pFact) - { - ScopedVclPtr<AbstractSvxZoomDialog> xDlg(pFact->CreateSvxZoomDialog(GetViewFrame()->GetWindow().GetFrameWeld(), aSet)); - assert(xDlg); - xDlg->SetLimits( MINZOOM, MAXZOOM ); - if (xDlg->Execute() != RET_CANCEL) - ZoomByItemSet(xDlg->GetOutputItemSet()); - } + ScopedVclPtr<AbstractSvxZoomDialog> xDlg(pFact->CreateSvxZoomDialog(GetViewFrame()->GetWindow().GetFrameWeld(), aSet)); + xDlg->SetLimits( MINZOOM, MAXZOOM ); + if (xDlg->Execute() != RET_CANCEL) + ZoomByItemSet(xDlg->GetOutputItemSet()); } } } |