diff options
Diffstat (limited to 'sw/source/uibase/app')
-rw-r--r-- | sw/source/uibase/app/appopt.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 16 | ||||
-rw-r--r-- | sw/source/uibase/app/docst.cxx | 3 |
3 files changed, 11 insertions, 12 deletions
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx index db3aeb30865d..4d4af5cf1b2a 100644 --- a/sw/source/uibase/app/appopt.cxx +++ b/sw/source/uibase/app/appopt.cxx @@ -418,9 +418,9 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) ApplyUsrPref( aViewOpt, pAppView, bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB); } -SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) +VclPtr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) { - SfxTabPage* pRet = NULL; + VclPtr<SfxTabPage> pRet; SfxAllItemSet aSet(*(rSet.GetPool())); switch( nId ) { diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 1ef8a1fd1025..706015d73dbd 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -133,10 +133,10 @@ using namespace ::com::sun::star; using namespace ::sfx2; // create DocInfo (virtual) -SfxDocumentInfoDialog* SwDocShell::CreateDocumentInfoDialog( +VclPtr<SfxDocumentInfoDialog> SwDocShell::CreateDocumentInfoDialog( vcl::Window *pParent, const SfxItemSet &rSet) { - SfxDocumentInfoDialog* pDlg = new SfxDocumentInfoDialog(pParent, rSet); + VclPtr<SfxDocumentInfoDialog> pDlg = VclPtr<SfxDocumentInfoDialog>::Create(pParent, rSet); //only with statistics, when this document is being shown, not //from within the Doc-Manager SwDocShell* pDocSh = static_cast<SwDocShell*>( SfxObjectShell::Current()); @@ -500,8 +500,8 @@ void SwDocShell::Execute(SfxRequest& rReq) if ( aFileName.isEmpty() ) { SvtPathOptions aPathOpt; - boost::scoped_ptr<SfxNewFileDialog> pNewFileDlg( - new SfxNewFileDialog(&GetView()->GetViewFrame()->GetWindow(), SFXWB_LOAD_TEMPLATE)); + ScopedVclPtr<SfxNewFileDialog> pNewFileDlg( + VclPtr<SfxNewFileDialog>::Create(&GetView()->GetViewFrame()->GetWindow(), SFXWB_LOAD_TEMPLATE)); pNewFileDlg->SetTemplateFlags(nFlags); nRet = pNewFileDlg->Execute(); @@ -608,10 +608,10 @@ void SwDocShell::Execute(SfxRequest& rReq) const SfxFilter* pFlt = GetMedium()->GetFilter(); if(!pFlt || pFlt->GetUserData() != pHtmlFlt->GetUserData()) { - MessageDialog aQuery(&pViewFrm->GetWindow(), - "SaveAsHTMLDialog", "modules/swriter/ui/saveashtmldialog.ui"); + ScopedVclPtrInstance<MessageDialog> aQuery(&pViewFrm->GetWindow(), + "SaveAsHTMLDialog", "modules/swriter/ui/saveashtmldialog.ui"); - if(RET_YES == aQuery.Execute()) + if(RET_YES == aQuery->Execute()) bLocalHasName = false; else break; @@ -648,7 +648,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { SfxPrinter* pTemp = GetDoc()->getIDocumentDeviceAccess().getPrinter( false ); if(pTemp) - pSavePrinter = new SfxPrinter(*pTemp); + pSavePrinter = VclPtr<SfxPrinter>::Create(*pTemp); bSetModified = IsModified() || pSrcView->IsModified(); if(pSrcView->IsModified()||pSrcView->HasSourceSaved()) { diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index e110b0d75ed3..28e1d2c00948 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -356,8 +356,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) { case SID_STYLE_NEW_BY_EXAMPLE: { - boost::scoped_ptr<SfxNewStyleDlg> pDlg(new SfxNewStyleDlg( 0, - *GetStyleSheetPool())); + VclPtrInstance<SfxNewStyleDlg> pDlg( nullptr, *GetStyleSheetPool()); if(RET_OK == pDlg->Execute()) { aParam = pDlg->GetName(); |