summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-28 09:11:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-28 09:12:27 +0200
commit09cb92096919e5a7bf4cf5fe66689e312ebc7f9c (patch)
tree91af4abe382007a45f6e18c88eba11fc0fe5795f
parent89687d651eabcf64816c1b25defe38c7b68dd468 (diff)
convert std::unique_ptr<VclAbstractDialog> to VclPtr
Change-Id: Ifdd2a0599efd701def02b4a4d2a1c489cb1b27fa
-rw-r--r--cui/source/options/optlingu.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx2
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx2
-rw-r--r--sc/source/ui/view/tabvwshf.cxx2
-rw-r--r--scripting/source/protocolhandler/scripthandler.cxx2
-rw-r--r--sd/qa/unit/dialogs-test.cxx2
-rw-r--r--sd/source/ui/docshell/docshel3.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx10
-rw-r--r--sd/source/ui/view/drviews2.cxx13
-rw-r--r--sd/source/ui/view/drviews3.cxx5
-rw-r--r--sd/source/ui/view/outlnvs2.cxx11
-rw-r--r--sfx2/source/appl/appserv.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx11
-rw-r--r--svx/source/dialog/srchdlg.cxx2
-rw-r--r--sw/source/uibase/shells/basesh.cxx4
-rw-r--r--sw/source/uibase/shells/langhelper.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx4
-rw-r--r--sw/source/uibase/shells/textidx.cxx6
-rw-r--r--sw/source/uibase/shells/textsh.cxx2
-rw-r--r--sw/source/uibase/shells/textsh1.cxx10
-rw-r--r--sw/source/uibase/table/tablemgr.cxx2
-rw-r--r--sw/source/uibase/uiview/view0.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx4
-rw-r--r--test/source/screenshot_test.cxx4
24 files changed, 50 insertions, 58 deletions
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 2b374b136cbc..1172777d0a6b 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1587,7 +1587,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, Button *, pBtn, void )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- std::unique_ptr<VclAbstractDialog> aDlg(pFact->CreateSvxEditDictionaryDialog( this, xDic->getName() ));
+ ScopedVclPtr<VclAbstractDialog> aDlg(pFact->CreateSvxEditDictionaryDialog( this, xDic->getName() ));
DBG_ASSERT(aDlg, "Dialog creation failed!");
aDlg->Execute();
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index a2b7988d390c..4c6cd322a9ae 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -505,7 +505,7 @@ IMPL_LINK_NOARG(ExtBoxWithBtns_Impl, HandleOptionsBtn, Button*, void)
if ( pFact )
{
OUString sExtensionId = GetEntryData( nActive )->m_xPackage->getIdentifier().Value;
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateOptionsDialog( this, sExtensionId, OUString() ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateOptionsDialog( this, sExtensionId, OUString() ));
pDlg->Execute();
}
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index a1b6240f08d4..f314ad43c279 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -832,7 +832,7 @@ namespace pcr
if ( !pFactory )
return InteractiveSelectionResult_Cancelled;
- ::std::unique_ptr< VclAbstractDialog > pDialog( pFactory->CreateSvxMacroAssignDlg(
+ ScopedVclPtr<VclAbstractDialog> pDialog( pFactory->CreateSvxMacroAssignDlg(
PropertyHandlerHelper::getDialogParentWindow( m_xContext ),
impl_getContextFrame_nothrow(),
m_bIsDialogElement,
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index d01ab664bd7d..b8b1d3f18e10 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -796,7 +796,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
SvxAbstractDialogFactory* pDlgFactory = SvxAbstractDialogFactory::Create();
if (pDlgFactory)
{
- std::unique_ptr<VclAbstractDialog> pDialog( pDlgFactory->CreateSvxMacroAssignDlg(
+ ScopedVclPtr<VclAbstractDialog> pDialog( pDlgFactory->CreateSvxMacroAssignDlg(
GetDialogParent(), xFrame, false, xEvents, 0 ) );
if ( pDialog.get() && pDialog->Execute() == RET_OK )
{
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index 85573b51a5c3..cd82b1931f5f 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -273,7 +273,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
if ( pFact != nullptr )
{
- std::unique_ptr<VclAbstractDialog> pDlg(
+ ScopedVclPtr<VclAbstractDialog> pDlg(
pFact->CreateScriptErrorDialog( aException ));
if ( pDlg )
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 679c999f001b..4acc570ca599 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -623,7 +623,7 @@ void SdDialogsTest::openAnyDialog()
// example for SfxTabDialog: 5 -> "modules/sdraw/ui/drawpagedialog.ui"
// example for TabDialog: 22 -> "modules/simpress/ui/headerfooterdialog.ui"
// example for self-adapted wizard: 0 -> "modules/simpress/ui/publishingdialog.ui"
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID(5));
+ ScopedVclPtr<VclAbstractDialog> pDlg(createDialogByID(5));
if (pDlg)
{
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index 5aa32ba9f24e..35f8a38ebe0d 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -283,7 +283,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if (pFact && mpViewShell)
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( mpViewShell->GetActiveWindow(), SID_LANGUAGE_OPTIONS ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( mpViewShell->GetActiveWindow(), SID_LANGUAGE_OPTIONS ));
pDlg->Execute();
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 26336fb033a9..a42d222b1417 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -259,14 +259,12 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_PHOTOALBUM:
{
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog(
- mrSlideSorter.GetContentWindow(),
- pDocument) : nullptr);
-
- if (pDlg)
+ if (pFact)
{
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSdPhotoAlbumDialog(
+ mrSlideSorter.GetContentWindow(),
+ pDocument));
pDlg->Execute();
- pDlg.reset();
}
rRequest.Done ();
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 2d08d7320208..66a94d53a195 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2365,7 +2365,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
if( pFact )
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateBreakDlg(GetActiveWindow(), mpDrawView, GetDocSh(), nCount, static_cast<sal_uLong>(nAnz) ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateBreakDlg(GetActiveWindow(), mpDrawView, GetDocSh(), nCount, static_cast<sal_uLong>(nAnz) ));
if( pDlg )
{
pDlg->Execute();
@@ -2879,14 +2879,13 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_PHOTOALBUM:
{
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog(
- GetActiveWindow(),
- GetDoc()) : nullptr);
-
- if (pDlg)
+ if (pFact)
{
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSdPhotoAlbumDialog(
+ GetActiveWindow(),
+ GetDoc()));
+
pDlg->Execute();
- pDlg.reset();
}
Cancel();
rReq.Ignore ();
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 7f71b4747865..54b649a1ab30 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -315,11 +315,10 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
pPage = static_cast<SdPage*>(&pPage->TRG_GetMasterPage());
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateMasterLayoutDialog( GetActiveWindow(), GetDoc(), pPage ) : nullptr);
- if( pDlg )
+ if (pFact)
{
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateMasterLayoutDialog( GetActiveWindow(), GetDoc(), pPage ));
pDlg->Execute();
- pDlg.reset();
Invalidate();
}
rReq.Done ();
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index c8135930073f..ea7dcb951a4e 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -311,14 +311,13 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
case SID_PHOTOALBUM:
{
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog(
- GetActiveWindow(),
- GetDoc()) : nullptr);
-
- if (pDlg)
+ if (pFact)
{
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSdPhotoAlbumDialog(
+ GetActiveWindow(),
+ GetDoc()));
+
pDlg->Execute();
- pDlg.reset();
}
Cancel();
rReq.Ignore ();
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index b7da7a4af5e8..e9750b4d3dbb 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -606,7 +606,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( nullptr, RID_DEFAULTABOUT ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( nullptr, RID_DEFAULTABOUT ));
pDlg->Execute();
bDone = true;
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 473176c20ef1..f750d1ee74dd 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1477,14 +1477,15 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon
if ( bCaughtException && bRaiseError )
{
- std::unique_ptr< VclAbstractDialog > pScriptErrDlg;
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
- pScriptErrDlg.reset( pFact->CreateScriptErrorDialog( aException ) );
- OSL_ENSURE( pScriptErrDlg.get(), "SfxObjectShell::CallXScript: no script error dialog!" );
+ {
+ ScopedVclPtr<VclAbstractDialog> pScriptErrDlg( pFact->CreateScriptErrorDialog( aException ) );
+ OSL_ENSURE( pScriptErrDlg.get(), "SfxObjectShell::CallXScript: no script error dialog!" );
- if ( pScriptErrDlg.get() )
- pScriptErrDlg->Execute();
+ if ( pScriptErrDlg.get() )
+ pScriptErrDlg->Execute();
+ }
}
OSL_TRACE( "leaving CallXScript" );
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 177dd16fea87..a035d61abb95 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -2103,7 +2103,7 @@ IMPL_LINK_NOARG(SvxSearchDialog, AttributeHdl_Impl, Button*, void)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateSvxSearchAttributeDialog( this, *pSearchList, pImpl->pRanges ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSvxSearchAttributeDialog( this, *pSearchList, pImpl->pRanges ));
DBG_ASSERT(pDlg, "Dialog creation failed!");
pDlg->Execute();
}
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 832da5fd261a..ea45810304be 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2396,7 +2396,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
case FN_FORMAT_TITLEPAGE_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateTitlePageDlg( pMDI ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateTitlePageDlg( pMDI ));
pDlg->Execute();
}
break;
@@ -2870,7 +2870,7 @@ void SwBaseShell::ExecField( SfxRequest& rReq )
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateSwChangeDBDlg(GetView()));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwChangeDBDlg(GetView()));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
}
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index a879fac088d7..453a4adba303 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -126,7 +126,7 @@ namespace SwLangHelper
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if (pFact)
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS ));
pDlg->Execute();
}
}
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 09235458cb75..7c5875a5c375 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -833,7 +833,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclAbstractDialog( GetView().GetWindow(), rSh, DLG_ROW_HEIGHT ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclAbstractDialog( GetView().GetWindow(), rSh, DLG_ROW_HEIGHT ));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
break;
@@ -1049,7 +1049,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateTableMergeDialog(GetView().GetWindow(), bPrev));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateTableMergeDialog(GetView().GetWindow(), bPrev));
OSL_ENSURE(pDlg, "Dialog creation failed!");
if( RET_OK != pDlg->Execute())
bPrev = bNext = false;
diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx
index 5b7d55a4ce89..8aab95d1a405 100644
--- a/sw/source/uibase/shells/textidx.cxx
+++ b/sw/source/uibase/shells/textidx.cxx
@@ -58,7 +58,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclAbstractDialog( pMDI, GetShell(), DLG_EDIT_AUTHMARK));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclAbstractDialog( pMDI, GetShell(), DLG_EDIT_AUTHMARK));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
}
@@ -84,7 +84,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
{ // Several marks, which should it be?
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<VclAbstractDialog> pMultDlg(pFact->CreateMultiTOXMarkDlg(pMDI, aMgr));
+ ScopedVclPtr<VclAbstractDialog> pMultDlg(pFact->CreateMultiTOXMarkDlg(pMDI, aMgr));
OSL_ENSURE(pMultDlg, "Dialog creation failed!");
nRet = pMultDlg->Execute();
}
@@ -92,7 +92,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateIndexMarkModalDlg(pMDI, GetShell(), aMgr.GetCurTOXMark()));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateIndexMarkModalDlg(pMDI, GetShell(), aMgr.GetCurTOXMark()));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
}
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 7613cadb4673..2db970ded529 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -532,7 +532,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<VclAbstractDialog> pColDlg(pFact->CreateVclAbstractDialog( GetView().GetWindow(), rSh, DLG_COLUMN));
+ ScopedVclPtr<VclAbstractDialog> pColDlg(pFact->CreateVclAbstractDialog( GetView().GetWindow(), rSh, DLG_COLUMN));
OSL_ENSURE(pColDlg, "Dialog creation failed!");
pColDlg->Execute();
}
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 918c501e1585..efab29c75f79 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -338,7 +338,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if (pFact)
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( GetView().GetWindow(), SID_LANGUAGE_OPTIONS ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( GetView().GetWindow(), SID_LANGUAGE_OPTIONS ));
pDlg->Execute();
}
}
@@ -626,7 +626,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateSwInsertBookmarkDlg( GetView().GetWindow(), rWrtSh, rReq ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwInsertBookmarkDlg( GetView().GetWindow(), rWrtSh, rReq ));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
}
@@ -721,12 +721,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_SORTING_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
-
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclAbstractDialog( GetView().GetWindow(), rWrtSh, DLG_SORTING ));
- OSL_ENSURE(pDlg, "Dialog creation failed!");
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclAbstractDialog( GetView().GetWindow(), rWrtSh, DLG_SORTING ));
pDlg->Execute();
- pDlg.reset();
rReq.Done();
}
break;
diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx
index b2e7cd076a66..af57206b04a2 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -56,7 +56,7 @@ void SwTableFUNC::ColWidthDlg( vcl::Window *pParent )
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateSwTableWidthDlg(pParent, *this));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwTableWidthDlg(pParent, *this));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
}
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 93430e1bdcb7..b242e4314709 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -606,7 +606,7 @@ void SwView::ExecFormatFootnote()
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateSwFootNoteOptionDlg(GetWindow(), GetWrtShell()));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwFootNoteOptionDlg(GetWindow(), GetWrtShell()));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
}
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 81716baa9793..531b9234bbb2 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -534,7 +534,7 @@ void SwView::Execute(SfxRequest &rReq)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclSwViewDialog(*this));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclSwViewDialog(*this));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->Execute();
break;
@@ -2387,7 +2387,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( nullptr, SID_OPTIONS_DATABASES ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( nullptr, SID_OPTIONS_DATABASES ));
pDlg->Execute();
}
}
diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx
index 6c22d9fa56c9..650b9cd70912 100644
--- a/test/source/screenshot_test.cxx
+++ b/test/source/screenshot_test.cxx
@@ -198,7 +198,7 @@ void ScreenshotTest::processAllKnownDialogs()
{
for (mapType::const_iterator i = getKnownDialogs().begin(); i != getKnownDialogs().end(); ++i)
{
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
+ ScopedVclPtr<VclAbstractDialog> pDlg(createDialogByID((*i).second));
if (pDlg)
{
@@ -227,7 +227,7 @@ void ScreenshotTest::processDialogBatchFile(const OUString& rFile)
if (!aNextUIFile.isEmpty() && !aNextUIFile.startsWith(aComment))
{
// first check if it's a known dialog
- std::unique_ptr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
+ ScopedVclPtr<VclAbstractDialog> pDlg(createDialogByName(aNextUIFile));
if (pDlg)
{