summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/docsh2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/app/docsh2.cxx')
-rw-r--r--sw/source/uibase/app/docsh2.cxx16
1 files changed, 8 insertions, 8 deletions
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())
{