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 /sc/source/ui/view/cellsh1.cxx | |
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 'sc/source/ui/view/cellsh1.cxx')
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 13 |
1 files changed, 0 insertions, 13 deletions
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(); |