diff options
Diffstat (limited to 'sd/source/ui/func')
26 files changed, 37 insertions, 42 deletions
diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx index 50be16e23fd7..ac4fff67a62d 100644 --- a/sd/source/ui/func/fuarea.cxx +++ b/sd/source/ui/func/fuarea.cxx @@ -60,7 +60,7 @@ void FuArea::DoExecute( SfxRequest& rReq ) mpView->GetAttributes( aNewAttr ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - std::unique_ptr<AbstractSvxAreaTabDialog> pDlg(pFact ? pFact->CreateSvxAreaTabDialog( nullptr, + ScopedVclPtr<AbstractSvxAreaTabDialog> pDlg(pFact ? pFact->CreateSvxAreaTabDialog( nullptr, &aNewAttr, mpDoc, true) : nullptr); diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index ac1b89fa5ba1..486af64be04a 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -190,7 +190,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) aSet.Put( *pFontItem ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractDialog> pDlg(pFact ? pFact->CreateSfxDialog( &mpView->GetViewShell()->GetViewFrame()->GetWindow(), aSet, + ScopedVclPtr<SfxAbstractDialog> pDlg(pFact ? pFact->CreateSfxDialog( &mpView->GetViewShell()->GetViewFrame()->GetWindow(), aSet, mpView->GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ) : nullptr); if( !pDlg ) diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx index cd02f20e80ba..f5601b3f2cd3 100644 --- a/sd/source/ui/func/fuchar.cxx +++ b/sd/source/ui/func/fuchar.cxx @@ -96,7 +96,7 @@ void FuChar::DoExecute( SfxRequest& rReq ) } SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdTabCharDialog(mpViewShell->GetActiveWindow(), &aNewAttr, mpDoc->GetDocSh() ) : nullptr); + ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdTabCharDialog(mpViewShell->GetActiveWindow(), &aNewAttr, mpDoc->GetDocSh() ) : nullptr); sal_uInt16 nResult = RET_CANCEL; if( pDlg ) { diff --git a/sd/source/ui/func/fuconnct.cxx b/sd/source/ui/func/fuconnct.cxx index e2e7b51d83a7..197cca71225c 100644 --- a/sd/source/ui/func/fuconnct.cxx +++ b/sd/source/ui/func/fuconnct.cxx @@ -57,7 +57,7 @@ void FuConnectionDlg::DoExecute( SfxRequest& rReq ) if( !pArgs ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( nullptr, aNewAttr, mpView, RID_SVXPAGE_CONNECTION) : nullptr); + ScopedVclPtr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( nullptr, aNewAttr, mpView, RID_SVXPAGE_CONNECTION) : nullptr); if( pDlg.get() && (pDlg->Execute() == RET_OK) ) { diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index d6bab1ad174c..a834258b78d2 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -102,7 +102,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); if( pFact ) { - std::unique_ptr<AbstractCopyDlg> pDlg(pFact->CreateCopyDlg(mpViewShell->GetActiveWindow(), aSet, mpDoc->GetColorList(), mpView )); + ScopedVclPtr<AbstractCopyDlg> pDlg(pFact->CreateCopyDlg(mpViewShell->GetActiveWindow(), aSet, mpDoc->GetColorList(), mpView )); if (!pDlg) return; @@ -118,7 +118,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) default: { - pDlg.reset(); + pDlg.disposeAndClear(); mpView->EndUndo(); } return; // Cancel diff --git a/sd/source/ui/func/fucushow.cxx b/sd/source/ui/func/fucushow.cxx index f3cce7bb272c..7c76ecb8919c 100644 --- a/sd/source/ui/func/fucushow.cxx +++ b/sd/source/ui/func/fucushow.cxx @@ -57,7 +57,7 @@ rtl::Reference<FuPoor> FuCustomShowDlg::Create( ViewShell* pViewSh, ::sd::Window void FuCustomShowDlg::DoExecute( SfxRequest& ) { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<AbstractSdCustomShowDlg> pDlg(pFact ? pFact->CreateSdCustomShowDlg(mpViewShell->GetActiveWindow(), *mpDoc) : nullptr); + ScopedVclPtr<AbstractSdCustomShowDlg> pDlg(pFact ? pFact->CreateSdCustomShowDlg(mpViewShell->GetActiveWindow(), *mpDoc) : nullptr); if( pDlg ) { sal_uInt16 nRet = pDlg->Execute(); @@ -67,7 +67,7 @@ void FuCustomShowDlg::DoExecute( SfxRequest& ) sd::PresentationSettings& rSettings = mpDoc->getPresentationSettings(); rSettings.mbCustomShow = pDlg->IsCustomShow(); } - pDlg.reset(); + pDlg.disposeAndClear(); if( nRet == RET_YES ) { diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index f605a5bfa25f..82e42bafb81c 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -240,7 +240,7 @@ void FuInsertClipboard::DoExecute( SfxRequest& ) SotClipboardFormatId nFormatId; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( mpViewShell->GetActiveWindow() )); + ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( mpViewShell->GetActiveWindow() )); if ( pDlg ) { pDlg->Insert( SotClipboardFormatId::EMBED_SOURCE, OUString() ); @@ -496,7 +496,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) case SID_INSERT_FLOATINGFRAME : { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractInsertObjectDialog> pDlg( + ScopedVclPtr<SfxAbstractInsertObjectDialog> pDlg( pFact->CreateInsertObjectDialog( mpViewShell->GetActiveWindow(), SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommandString(), xStorage, &aServerLst )); if ( pDlg ) diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index 28c7441cc454..b000b3e8ddbc 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -329,7 +329,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium) mpDocSh->SetWaitCursor( false ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); vcl::Window* pParent = mpViewShell ? mpViewShell->GetActiveWindow() : nullptr; - std::unique_ptr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(pParent, mpDoc, pMedium, aFile) : nullptr); + ScopedVclPtr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(pParent, mpDoc, pMedium, aFile) : nullptr); if( !pDlg ) return false; @@ -414,7 +414,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium) void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(mpViewShell->GetActiveWindow(), mpDoc, nullptr, aFile) : nullptr); + ScopedVclPtr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(mpViewShell->GetActiveWindow(), mpDoc, nullptr, aFile) : nullptr); if( !pDlg ) return; diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx index 21b19bf3fc97..5f643ef7b774 100644 --- a/sd/source/ui/func/fuline.cxx +++ b/sd/source/ui/func/fuline.cxx @@ -75,7 +75,7 @@ void FuLine::DoExecute( SfxRequest& rReq ) mpView->GetAttributes( *pNewAttr ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSvxLineTabDialog(nullptr,pNewAttr.get(),mpDoc,pObj,bHasMarked) : nullptr); + ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSvxLineTabDialog(nullptr,pNewAttr.get(),mpDoc,pObj,bHasMarked) : nullptr); if( pDlg && (pDlg->Execute() == RET_OK) ) { mpView->SetAttributes (*(pDlg->GetOutputItemSet ())); diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx index 6025641dfd48..f79612f2bc52 100644 --- a/sd/source/ui/func/fulinend.cxx +++ b/sd/source/ui/func/fulinend.cxx @@ -114,7 +114,7 @@ void FuLineEnd::DoExecute( SfxRequest& ) } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - std::unique_ptr<AbstractSvxNameDialog> pDlg(pFact ? pFact->CreateSvxNameDialog( nullptr, aName, aDesc ) : nullptr); + ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact ? pFact->CreateSvxNameDialog( nullptr, aName, aDesc ) : nullptr); if( pDlg ) { diff --git a/sd/source/ui/func/fulink.cxx b/sd/source/ui/func/fulink.cxx index f39d668a041e..d884ca6840e9 100644 --- a/sd/source/ui/func/fulink.cxx +++ b/sd/source/ui/func/fulink.cxx @@ -58,7 +58,7 @@ void FuLink::DoExecute( SfxRequest& ) sfx2::LinkManager* pLinkManager = mpDoc->GetLinkManager(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog( mpViewShell->GetActiveWindow(), pLinkManager )); + ScopedVclPtr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog( mpViewShell->GetActiveWindow(), pLinkManager )); if ( pDlg ) { pDlg->Execute(); diff --git a/sd/source/ui/func/fumeasur.cxx b/sd/source/ui/func/fumeasur.cxx index 73fef5805709..204e1f1ec9a3 100644 --- a/sd/source/ui/func/fumeasur.cxx +++ b/sd/source/ui/func/fumeasur.cxx @@ -57,7 +57,7 @@ void FuMeasureDlg::DoExecute( SfxRequest& rReq ) if( !pArgs ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( nullptr, aNewAttr, mpView, RID_SVXPAGE_MEASURE) : nullptr ); + ScopedVclPtr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( nullptr, aNewAttr, mpView, RID_SVXPAGE_MEASURE) : nullptr ); if( pDlg.get() && (pDlg->Execute() == RET_OK) ) { diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx index 889b85837871..009a2f39426c 100644 --- a/sd/source/ui/func/fumorph.cxx +++ b/sd/source/ui/func/fumorph.cxx @@ -95,7 +95,7 @@ void FuMorph::DoExecute( SfxRequest& ) SdrObject* pPolyObj1 = pCloneObj1->ConvertToPolyObj(false, false); SdrObject* pPolyObj2 = pCloneObj2->ConvertToPolyObj(false, false); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<AbstractMorphDlg> pDlg(pFact ? pFact->CreateMorphDlg( static_cast< vcl::Window*>(mpWindow), pObj1, pObj2 ) : nullptr); + ScopedVclPtr<AbstractMorphDlg> pDlg(pFact ? pFact->CreateMorphDlg( static_cast< vcl::Window*>(mpWindow), pObj1, pObj2 ) : nullptr); if(pPolyObj1 && pPolyObj2 && pDlg && (pDlg->Execute() == RET_OK)) { B2DPolyPolygonList_impl aPolyPolyList; diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index 89df12f6e268..a63c5f12c7fb 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -447,7 +447,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false)); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractDialog> pDlg(pFact ? pFact->CreatSdActionDialog(mpViewShell->GetActiveWindow(), &aSet, mpView) : nullptr); + ScopedVclPtr<SfxAbstractDialog> pDlg(pFact ? pFact->CreatSdActionDialog(mpViewShell->GetActiveWindow(), &aSet, mpView) : nullptr); short nResult = pDlg ? pDlg->Execute() : static_cast<short>(RET_CANCEL); diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index 8906e7a82fb3..56d0dd25c5a7 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -81,7 +81,7 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq ) // create and execute dialog SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdOutlineBulletTabDlg(mpViewShell->GetActiveWindow(), &aNewAttr, mpView) : nullptr); + ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdOutlineBulletTabDlg(mpViewShell->GetActiveWindow(), &aNewAttr, mpView) : nullptr); if( pDlg ) { if ( pPageItem ) diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 8e97080fe121..15515f88463c 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -336,7 +336,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent ) { // create the dialog SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractTabDialog> pDlg( pFact ? pFact->CreateSdTabPageDialog(mpViewShell->GetActiveWindow(), &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage) : nullptr ); + ScopedVclPtr<SfxAbstractTabDialog> pDlg( pFact ? pFact->CreateSdTabPageDialog(mpViewShell->GetActiveWindow(), &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage) : nullptr ); if( pDlg.get() && pDlg->Execute() == RET_OK ) pTempSet.reset( new SfxItemSet(*pDlg->GetOutputItemSet()) ); } diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx index 69e5050fd643..9daab0a6077e 100644 --- a/sd/source/ui/func/fuparagr.cxx +++ b/sd/source/ui/func/fuparagr.cxx @@ -91,7 +91,7 @@ void FuParagraph::DoExecute( SfxRequest& rReq ) } SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdParagraphTabDlg(mpViewShell->GetActiveWindow(), &aNewAttr) : nullptr); + ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdParagraphTabDlg(mpViewShell->GetActiveWindow(), &aNewAttr) : nullptr); if (!pDlg) return; diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx index d3d78f3c8991..567426287d8f 100644 --- a/sd/source/ui/func/fuprlout.cxx +++ b/sd/source/ui/func/fuprlout.cxx @@ -174,7 +174,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) else { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<AbstractSdPresLayoutDlg> pDlg(pFact ? pFact->CreateSdPresLayoutDlg(mpDocSh, aSet ) : nullptr); + ScopedVclPtr<AbstractSdPresLayoutDlg> pDlg(pFact ? pFact->CreateSdPresLayoutDlg(mpDocSh, aSet ) : nullptr); sal_uInt16 nResult = pDlg ? pDlg->Execute() : static_cast<short>(RET_CANCEL); diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx index daa979bf1fc5..575638d4f58d 100644 --- a/sd/source/ui/func/fuprobjs.cxx +++ b/sd/source/ui/func/fuprobjs.cxx @@ -139,7 +139,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& ) SfxStyleSheetBase& rStyleSheet = *pStyleSheet; SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), SdResId( nDlgId ), rStyleSheet, ePO, pStyleSheetPool ) : nullptr); + ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), SdResId( nDlgId ), rStyleSheet, ePO, pStyleSheetPool ) : nullptr); if( pDlg && (pDlg->Execute() == RET_OK) ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx index 023660ad827e..e71d93a17378 100644 --- a/sd/source/ui/func/fuscale.cxx +++ b/sd/source/ui/func/fuscale.cxx @@ -109,14 +109,9 @@ void FuScale::DoExecute( SfxRequest& rReq ) pZoomItem->SetValueSet( nZoomValues ); aNewAttr.Put( *pZoomItem ); - std::unique_ptr<AbstractSvxZoomDialog> pDlg; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if(pFact) - { - pDlg.reset(pFact->CreateSvxZoomDialog(nullptr, aNewAttr)); - } - - if( pDlg ) + ScopedVclPtr<AbstractSvxZoomDialog> pDlg(pFact ? pFact->CreateSvxZoomDialog(nullptr, aNewAttr) : nullptr); + if (pDlg) { pDlg->SetLimits( (sal_uInt16)mpWindow->GetMinZoom(), (sal_uInt16)mpWindow->GetMaxZoom() ); sal_uInt16 nResult = pDlg->Execute(); @@ -136,7 +131,7 @@ void FuScale::DoExecute( SfxRequest& rReq ) const SfxItemSet aArgs (*(pDlg->GetOutputItemSet ())); - pDlg.reset(); + pDlg.disposeAndClear(); if (!mpViewShell) return; diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx index 07322ac2d3cf..8d3a4218839f 100644 --- a/sd/source/ui/func/fusldlg.cxx +++ b/sd/source/ui/func/fusldlg.cxx @@ -108,7 +108,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& ) aDlgSet.Put( SfxInt32Item( ATTR_PRESENT_DISPLAY, pOptions->GetDisplay() ) ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<AbstractSdStartPresDlg> pDlg(pFact ? pFact->CreateSdStartPresentationDlg(mpWindow, aDlgSet, aPageNameList, pCustomShowList) : nullptr); + ScopedVclPtr<AbstractSdStartPresDlg> pDlg(pFact ? pFact->CreateSdStartPresentationDlg(mpWindow, aDlgSet, aPageNameList, pCustomShowList) : nullptr); if( pDlg && (pDlg->Execute() == RET_OK) ) { OUString aPage; diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index 03a77aaec8aa..958f7f906a1e 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -110,7 +110,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_Y, aLinePos.Y())); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<AbstractSdSnapLineDlg> pDlg(pFact ? pFact->CreateSdSnapLineDlg(mpViewShell->GetActiveWindow(), aNewAttr, mpView) : nullptr); + ScopedVclPtr<AbstractSdSnapLineDlg> pDlg(pFact ? pFact->CreateSdSnapLineDlg(mpViewShell->GetActiveWindow(), aNewAttr, mpView) : nullptr); OSL_ASSERT(pDlg); if (!pDlg) return; @@ -143,7 +143,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) sal_uInt16 nResult = pDlg->Execute(); pDlg->GetAttr(aNewAttr); - pDlg.reset(); + pDlg.disposeAndClear(); switch( nResult ) { diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 7c2ae80248e4..535237564c7a 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -295,8 +295,8 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) if( pStyleSheet ) { - std::unique_ptr<SfxAbstractTabDialog> pStdDlg; - std::unique_ptr<SfxAbstractTabDialog> pPresDlg; + ScopedVclPtr<SfxAbstractTabDialog> pStdDlg; + ScopedVclPtr<SfxAbstractTabDialog> pPresDlg; SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); bool bOldDocInOtherLanguage = false; SfxItemSet aOriSet( pStyleSheet->GetItemSet() ); @@ -305,7 +305,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) if (eFamily == SD_STYLE_FAMILY_GRAPHICS) { - pStdDlg.reset(pFact ? pFact->CreateSdTabTemplateDlg(mpViewShell->GetActiveWindow(), mpDoc->GetDocSh(), *pStyleSheet, mpDoc, mpView) : nullptr); + pStdDlg.disposeAndReset(pFact ? pFact->CreateSdTabTemplateDlg(mpViewShell->GetActiveWindow(), mpDoc->GetDocSh(), *pStyleSheet, mpDoc, mpView) : nullptr); } else if (eFamily == SD_STYLE_FAMILY_PSEUDO) { @@ -369,7 +369,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) if( !bOldDocInOtherLanguage ) { - pPresDlg.reset(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), SdResId(nDlgId), *pStyleSheet, ePO, pSSPool ) : nullptr); + pPresDlg.disposeAndReset(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), SdResId(nDlgId), *pStyleSheet, ePO, pSSPool ) : nullptr); } } else if (eFamily == SD_STYLE_FAMILY_CELL) diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx index a7a4164d6692..02de2bdbb9d3 100644 --- a/sd/source/ui/func/futransf.cxx +++ b/sd/source/ui/func/futransf.cxx @@ -73,7 +73,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if ( pFact ) { - std::unique_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateCaptionDialog( nullptr, mpView ) ); + ScopedVclPtr< SfxAbstractTabDialog > pDlg( pFact->CreateCaptionDialog( nullptr, mpView ) ); const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() ); SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange ); @@ -93,7 +93,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - std::unique_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateSvxTransformTabDialog( nullptr, &aSet, mpView ) ); + ScopedVclPtr< SfxAbstractTabDialog > pDlg( pFact->CreateSvxTransformTabDialog( nullptr, &aSet, mpView ) ); if( pDlg.get() && (pDlg->Execute() == RET_OK) ) { rReq.Done( *( pDlg->GetOutputItemSet() ) ); diff --git a/sd/source/ui/func/futxtatt.cxx b/sd/source/ui/func/futxtatt.cxx index 7737a4bd833c..81f9317ecd15 100644 --- a/sd/source/ui/func/futxtatt.cxx +++ b/sd/source/ui/func/futxtatt.cxx @@ -58,7 +58,7 @@ void FuTextAttrDlg::DoExecute( SfxRequest& rReq ) if( !pArgs ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( nullptr, &aNewAttr, mpView )); + ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( nullptr, &aNewAttr, mpView )); sal_uInt16 nResult = pDlg->Execute(); diff --git a/sd/source/ui/func/fuvect.cxx b/sd/source/ui/func/fuvect.cxx index f5f729805605..bd23fe21b7e5 100644 --- a/sd/source/ui/func/fuvect.cxx +++ b/sd/source/ui/func/fuvect.cxx @@ -63,7 +63,7 @@ void FuVectorize::DoExecute( SfxRequest& ) if( pObj && dynamic_cast< const SdrGrafObj *>( pObj ) != nullptr ) { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - std::unique_ptr<AbstractSdVectorizeDlg> pDlg(pFact ? pFact->CreateSdVectorizeDlg( mpWindow, static_cast<SdrGrafObj*>( pObj )->GetGraphic().GetBitmap(), mpDocSh ) : nullptr); + ScopedVclPtr<AbstractSdVectorizeDlg> pDlg(pFact ? pFact->CreateSdVectorizeDlg( mpWindow, static_cast<SdrGrafObj*>( pObj )->GetGraphic().GetBitmap(), mpDocSh ) : nullptr); if( pDlg && pDlg->Execute() == RET_OK ) { const GDIMetaFile& rMtf = pDlg->GetGDIMetaFile(); |