summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-11-10 09:36:12 +0900
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-10 10:51:59 +0000
commitc024344c2fe3d40050fa7144935704f16adec6e9 (patch)
tree491607124bc0199509c11f7105c8425839eda3cc /sd
parent25edea06374e5283f28c3ea9a29c470c575f3364 (diff)
Wrap pointer to dialog with VclPtr
Change-Id: Ifaf0f45b12d983d556ca4c7e0b4a57c47ff38597 Reviewed-on: https://gerrit.libreoffice.org/30737 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews2.cxx9
-rw-r--r--sd/source/ui/view/outlnvs2.cxx9
2 files changed, 12 insertions, 6 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 8504dadbe590..fb23aee39eca 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 20ffe09396f3..c4adefd0164f 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;