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/editsh.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/editsh.cxx')
-rw-r--r-- | sc/source/ui/view/editsh.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
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 |