Kaydet (Commit) c024344c authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Noel Grandin

Wrap pointer to dialog with VclPtr

Change-Id: Ifaf0f45b12d983d556ca4c7e0b4a57c47ff38597
Reviewed-on: https://gerrit.libreoffice.org/30737Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 25edea06
......@@ -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();
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment