cui/source/options/optlingu.cxx | 2 +- desktop/source/deployment/gui/dp_gui_dialog2.cxx | 2 +- extensions/source/propctrlr/eventhandler.cxx | 2 +- sc/source/ui/view/tabvwshf.cxx | 2 +- scripting/source/protocolhandler/scripthandler.cxx | 2 +- sd/qa/unit/dialogs-test.cxx | 2 +- sd/source/ui/docshell/docshel3.cxx | 2 +- sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 10 ++++------ sd/source/ui/view/drviews2.cxx | 13 ++++++------- sd/source/ui/view/drviews3.cxx | 5 ++--- sd/source/ui/view/outlnvs2.cxx | 11 +++++------ sfx2/source/appl/appserv.cxx | 2 +- sfx2/source/doc/objmisc.cxx | 11 ++++++----- svx/source/dialog/srchdlg.cxx | 2 +- sw/source/uibase/shells/basesh.cxx | 4 ++-- sw/source/uibase/shells/langhelper.cxx | 2 +- sw/source/uibase/shells/tabsh.cxx | 4 ++-- sw/source/uibase/shells/textidx.cxx | 6 +++--- sw/source/uibase/shells/textsh.cxx | 2 +- sw/source/uibase/shells/textsh1.cxx | 10 +++------- sw/source/uibase/table/tablemgr.cxx | 2 +- sw/source/uibase/uiview/view0.cxx | 2 +- sw/source/uibase/uiview/view2.cxx | 4 ++-- test/source/screenshot_test.cxx | 4 ++-- 24 files changed, 50 insertions(+), 58 deletions(-)
New commits: commit 09cb92096919e5a7bf4cf5fe66689e312ebc7f9c Author: Noel Grandin <[email protected]> Date: Fri Oct 28 09:11:02 2016 +0200 convert std::unique_ptr<VclAbstractDialog> to VclPtr Change-Id: Ifdd2a0599efd701def02b4a4d2a1c489cb1b27fa diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 2b374b1..1172777 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 a2b7988..4c6cd32 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 a1b6240..f314ad4 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 d01ab66..b8b1d3f 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 85573b5..cd82b19 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 679c999..4acc570 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 5aa32ba..35f8a38 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 26336fb..a42d222 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 2d08d73..66a94d5 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 7f71b47..54b649a 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 c813593..ea7dcb9 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 b7da7a4..e9750b4 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 473176c..f750d1e 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 177dd16..a035d61 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 832da5f..ea45810 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 a879fac..453a4ad 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 0923545..7c5875a 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 5b7d55a..8aab95d 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 7613cad..2db970d 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 918c501..efab29c 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 b2e7cd0..af57206 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 93430e1..b242e43 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 81716ba..531b923 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 6c22d9f..650b9cd 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) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
