sc/source/ui/view/tabvwshb.cxx | 2 +- sd/source/ui/view/drviews2.cxx | 9 ++++++--- sd/source/ui/view/outlnvs2.cxx | 9 ++++++--- sfx2/source/doc/iframe.cxx | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-)
New commits: commit c024344c2fe3d40050fa7144935704f16adec6e9 Author: Takeshi Abe <[email protected]> Date: Thu Nov 10 09:36:12 2016 +0900 Wrap pointer to dialog with VclPtr Change-Id: Ifaf0f45b12d983d556ca4c7e0b4a57c47ff38597 Reviewed-on: https://gerrit.libreoffice.org/30737 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 35ca636..f06d7d3 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -355,7 +355,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) case SID_LINKS: { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pWin, rDoc.GetLinkManager() ); + ScopedVclPtr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog( pWin, rDoc.GetLinkManager() )); if ( pDlg ) { pDlg->Execute(); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 8504dad..fb23aee 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -2793,9 +2793,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { #ifdef ENABLE_SDREMOTE SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - VclAbstractDialog* pDlg = pFact ? pFact->CreateRemoteDialog(GetActiveWindow()) : nullptr; - if (pDlg) - pDlg->Execute(); + if (pFact) + { + ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateRemoteDialog(GetActiveWindow())); + if (pDlg) + pDlg->Execute(); + } #endif } break; diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index 20ffe09..c4adefd 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -294,9 +294,12 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) { #ifdef ENABLE_SDREMOTE SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - VclAbstractDialog* pDlg = pFact ? pFact->CreateRemoteDialog(GetActiveWindow()) : nullptr; - if (pDlg) - pDlg->Execute(); + if (pFact) + { + ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateRemoteDialog(GetActiveWindow())); + if (pDlg) + pDlg->Execute(); + } #endif } break; diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx index a72d58b..ca68c67 100644 --- a/sfx2/source/doc/iframe.cxx +++ b/sfx2/source/doc/iframe.cxx @@ -404,7 +404,7 @@ void SAL_CALL IFrameObject::removeVetoableChangeListener(const OUString&, const ::sal_Int16 SAL_CALL IFrameObject::execute() throw (css::uno::RuntimeException, std::exception) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( ".uno:InsertObjectFloatingFrame", mxObj ); + ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateEditObjectDialog( ".uno:InsertObjectFloatingFrame", mxObj )); if ( pDlg ) pDlg->Execute(); return 0; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
