summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-20 11:27:10 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 12:37:44 +0100
commit61b224f392eb856bf4cfa0c04c68202a463cbdbf (patch)
tree77a28e38763bc5f9d95e2c278601d31dc6fbf65d /sw
parentf1d9eef4163e88a3cb6360178b52ce441e65d8ae (diff)
vclwidget: fixup locally allocated vcl::Window objects
They need to be wrapped in ScopedVclPtr in order to be disposed properly. Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/tiledrendering/tiledrendering.cxx2
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx2
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx2
-rw-r--r--sw/source/ui/config/optcomp.cxx2
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx14
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx8
-rw-r--r--sw/source/ui/envelp/label1.cxx2
-rw-r--r--sw/source/ui/envelp/labfmt.cxx4
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx2
-rw-r--r--sw/source/ui/frmdlg/cption.cxx4
-rw-r--r--sw/source/ui/index/cnttab.cxx2
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx6
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx8
-rw-r--r--sw/source/ui/misc/num.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx2
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx2
-rw-r--r--sw/source/uibase/shells/grfsh.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx2
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx16
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx2
-rw-r--r--sw/source/uibase/uiview/viewling.cxx2
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx4
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx2
26 files changed, 51 insertions, 51 deletions
diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx
index 8f9a51aee6dc..6ba5ae3a1c6c 100644
--- a/sw/qa/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/tiledrendering/tiledrendering.cxx
@@ -197,7 +197,7 @@ int TiledRenderingApp::Main()
Help::EnableQuickHelp();
try
{
- VclPtr<TiledRenderingDialog> pDialog(new TiledRenderingDialog(this));
+ ScopedVclPtr<TiledRenderingDialog> pDialog(new TiledRenderingDialog(this));
pDialog->Execute();
}
catch (const uno::Exception &e)
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index b5c28bad182a..360b45e1ab74 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -2665,7 +2665,7 @@ void DocumentRedlineManager::checkRedlining(RedlineMode_t& _rReadlineMode)
if ( pParent && !mbReadlineChecked && rRedlineTbl.size() > MAX_REDLINE_COUNT
&& !((_rReadlineMode & nsRedlineMode_t::REDLINE_SHOW_DELETE) == nsRedlineMode_t::REDLINE_SHOW_DELETE) )
{
- VclPtr<MessageDialog> aQuery(new MessageDialog(pParent, "QueryShowChangesDialog", "modules/swriter/ui/queryshowchangesdialog.ui"));
+ ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(pParent, "QueryShowChangesDialog", "modules/swriter/ui/queryshowchangesdialog.ui"));
sal_uInt16 nResult = aQuery->Execute();
mbReadlineChecked = true;
if ( nResult == RET_YES )
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 86f0a4d61d7a..6ce1b194f628 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -217,7 +217,7 @@ IMPL_LINK(SwMailConfigPage, ReplyToHdl, CheckBox*, pBox)
IMPL_LINK_NOARG(SwMailConfigPage, AuthenticationHdl)
{
- VclPtr<SwAuthenticationSettingsDialog> aDlg(new SwAuthenticationSettingsDialog(this, *m_pConfigItem));
+ ScopedVclPtr<SwAuthenticationSettingsDialog> aDlg(new SwAuthenticationSettingsDialog(this, *m_pConfigItem));
aDlg->Execute();
return 0;
}
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 1342d5859389..d187795f43a6 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -319,7 +319,7 @@ IMPL_LINK_NOARG(SwCompatibilityOptPage, SelectHdl)
IMPL_LINK_NOARG(SwCompatibilityOptPage, UseAsDefaultHdl)
{
- VclPtr<MessageDialog> aQuery(new MessageDialog(this, "QueryDefaultCompatDialog",
+ ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, "QueryDefaultCompatDialog",
"modules/swriter/ui/querydefaultcompatdialog.ui"));
if (aQuery->Execute() == RET_YES)
{
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 7d62a1b7f782..7a95d497a707 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -540,7 +540,7 @@ IMPL_LINK(SwMailMergeOutputPage, DocumentSelectionHdl_Impl, RadioButton*, pButto
IMPL_LINK(SwMailMergeOutputPage, CopyToHdl_Impl, PushButton*, pButton)
{
- VclPtr<SwCopyToDialog> pDlg(new SwCopyToDialog(pButton));
+ ScopedVclPtr<SwCopyToDialog> pDlg(new SwCopyToDialog(pButton));
pDlg->SetCC(m_sCC );
pDlg->SetBCC(m_sBCC);
if(RET_OK == pDlg->Execute())
@@ -733,7 +733,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
}
SwView* pSourceView = rConfigItem.GetSourceView();
- VclPtr<PrintMonitor> aSaveMonitor(this, false, PrintMonitor::MONITOR_TYPE_SAVE);
+ ScopedVclPtrInstance<PrintMonitor> aSaveMonitor(this, false, PrintMonitor::MONITOR_TYPE_SAVE);
aSaveMonitor->m_pDocName->SetText(pSourceView->GetDocShell()->GetTitle(22));
aSaveMonitor->SetCancelHdl(LINK(this, SwMailMergeOutputPage, SaveCancelHdl_Impl));
aSaveMonitor->m_pPrinter->SetText( INetURLObject( sPath ).getFSysPath( INetURLObject::FSYS_DETECT ) );
@@ -799,7 +799,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
if(bFailed)
{
- VclPtr<SwSaveWarningBox_Impl> aWarning(new SwSaveWarningBox_Impl( pButton, sOutPath ));
+ ScopedVclPtr<SwSaveWarningBox_Impl> aWarning(new SwSaveWarningBox_Impl( pButton, sOutPath ));
if(RET_OK == aWarning->Execute())
sOutPath = aWarning->GetFileName();
else
@@ -983,12 +983,12 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
if(rConfigItem.GetMailServer().isEmpty() ||
!SwMailMergeHelper::CheckMailAddress(rConfigItem.GetMailAddress()) )
{
- VclPtr<QueryBox> aQuery(new QueryBox(pButton, WB_YES_NO_CANCEL, m_sConfigureMail));
+ ScopedVclPtr<QueryBox> aQuery(new QueryBox(pButton, WB_YES_NO_CANCEL, m_sConfigureMail));
sal_uInt16 nRet = aQuery->Execute();
if(RET_YES == nRet )
{
SfxAllItemSet aSet(pTargetView->GetPool());
- VclPtr<SwMailConfigDlg> pDlg(new SwMailConfigDlg(pButton, aSet));
+ ScopedVclPtr<SwMailConfigDlg> pDlg(new SwMailConfigDlg(pButton, aSet));
nRet = pDlg->Execute();
}
@@ -1077,7 +1077,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
if(m_pSubjectED->GetText().isEmpty())
{
- VclPtr<SwSendQueryBox_Impl> aQuery(new SwSendQueryBox_Impl(pButton, "SubjectDialog",
+ ScopedVclPtr<SwSendQueryBox_Impl> aQuery(new SwSendQueryBox_Impl(pButton, "SubjectDialog",
"modules/swriter/ui/subjectdialog.ui"));
aQuery->SetIsEmptyTextAllowed(true);
aQuery->SetValue(m_sNoSubjectST);
@@ -1091,7 +1091,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
}
if(!bAsBody && m_pAttachmentED->GetText().isEmpty())
{
- VclPtr<SwSendQueryBox_Impl> aQuery(new SwSendQueryBox_Impl(pButton, "AttachNameDialog",
+ ScopedVclPtr<SwSendQueryBox_Impl> aQuery(new SwSendQueryBox_Impl(pButton, "AttachNameDialog",
"modules/swriter/ui/attachnamedialog.ui"));
aQuery->SetIsEmptyTextAllowed(false);
if(RET_OK == aQuery->Execute())
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 8d97a7acd0c5..f0e6e9bc39dd 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -404,7 +404,7 @@ bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
if (!pRepr->GetTempPasswd().getLength()
&& pRepr->GetSectionData().GetPassword().getLength())
{
- VclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog(this));
+ ScopedVclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog(this));
bRet = false;
if (aPasswdDlg->Execute())
{
@@ -1081,7 +1081,7 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl)
aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth));
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
- VclPtr<SwSectionPropertyTabDialog> aTabDlg(new SwSectionPropertyTabDialog(this, aSet, rSh));
+ ScopedVclPtr<SwSectionPropertyTabDialog> aTabDlg(new SwSectionPropertyTabDialog(this, aSet, rSh));
if(RET_OK == aTabDlg->Execute())
{
const SfxItemSet* pOutSet = aTabDlg->GetOutputItemSet();
@@ -1260,7 +1260,7 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox )
{
if(!pRepr->GetTempPasswd().getLength() || bChange)
{
- VclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog(this));
+ ScopedVclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog(this));
aPasswdDlg->ShowExtras(SHOWEXTRAS_CONFIRM);
if(RET_OK == aPasswdDlg->Execute())
{
@@ -1721,7 +1721,7 @@ IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton )
{
if(!m_aNewPasswd.getLength() || bChange)
{
- VclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog(this));
+ ScopedVclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog(this));
aPasswdDlg->ShowExtras(SHOWEXTRAS_CONFIRM);
if(RET_OK == aPasswdDlg->Execute())
{
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 9883e9a99b14..7c1ca59c064c 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -436,7 +436,7 @@ IMPL_LINK_NOARG_INLINE_END(SwLabPage, TypeHdl)
void SwLabPage::DisplayFormat()
{
- VclPtr<MetricField> aField(new MetricField(this, WinBits(0)));
+ ScopedVclPtr<MetricField> aField(new MetricField(this, WinBits(0)));
FieldUnit aMetric = ::GetDfltMetric(false);
SetMetric(*aField.get(), aMetric);
aField->SetDecimalDigits(2);
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index e333e9bb1ed9..3a4b9fdfb40b 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -579,7 +579,7 @@ IMPL_LINK_NOARG(SwLabFmtPage, SaveHdl)
aRec.lPWidth = static_cast< long >(GETFLDVAL(*m_pPWidthField ));
aRec.lPHeight = static_cast< long >(GETFLDVAL(*m_pPHeightField));
aRec.bCont = aItem.bCont;
- VclPtr<SwSaveLabelDlg> pSaveDlg(new SwSaveLabelDlg(this, aRec));
+ ScopedVclPtr<SwSaveLabelDlg> pSaveDlg(new SwSaveLabelDlg(this, aRec));
pSaveDlg->SetLabel(aItem.aLstMake, aItem.aLstType);
pSaveDlg->Execute();
if(pSaveDlg->GetLabel(aItem))
@@ -649,7 +649,7 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl)
return 0;
}
- VclPtr<MessageDialog> aQuery(new MessageDialog(this, "QuerySaveLabelDialog",
+ ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, "QuerySaveLabelDialog",
"modules/swriter/ui/querysavelabeldialog.ui"));
aQuery->set_primary_text(aQuery->get_primary_text().
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 553dcf9ff5e8..b08a6af3ecb9 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -540,7 +540,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFmt));
aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt));
// collect character styles
- VclPtr<ListBox> rCharFmtLB(new ListBox(this));
+ ScopedVclPtr<ListBox> rCharFmtLB(new ListBox(this));
rCharFmtLB->Clear();
rCharFmtLB->InsertEntry( SwViewShell::GetShellRes()->aStrNone );
SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index e3c3f9eeb4ff..d66cf500b440 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -285,7 +285,7 @@ IMPL_LINK_INLINE_START( SwCaptionDialog, OptionHdl, Button*, pButton )
OUString sFldTypeName = m_pCategoryBox->GetText();
if(sFldTypeName == m_sNone)
sFldTypeName = OUString();
- VclPtr<SwSequenceOptionDialog> aDlg( pButton, rView, sFldTypeName );
+ ScopedVclPtrInstance<SwSequenceOptionDialog> aDlg( pButton, rView, sFldTypeName );
aDlg->SetApplyBorderAndShadow(bCopyAttributes);
aDlg->SetCharacterStyle( sCharacterStyle );
aDlg->SetOrderNumberingFirst( bOrderNumberingFirst );
@@ -339,7 +339,7 @@ IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl)
IMPL_LINK_NOARG(SwCaptionDialog, CaptionHdl)
{
SfxItemSet aSet( rView.GetDocShell()->GetDoc()->GetAttrPool() );
- VclPtr<SwCaptionOptDlg> aDlg(new SwCaptionOptDlg( this, aSet ) );
+ ScopedVclPtr<SwCaptionOptDlg> aDlg(new SwCaptionOptDlg( this, aSet ) );
aDlg->Execute();
return 0;
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 073fc004ff7f..e0fd48353790 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -490,7 +490,7 @@ IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl )
OUString sInfo(SW_RESSTR(STR_FILE_NOT_FOUND));
sInfo = sInfo.replaceFirst( "%1", sTemplate );
sInfo = sInfo.replaceFirst( "%2", aOpt.GetTemplatePath() );
- VclPtr<InfoBox> aInfo(new InfoBox(GetParent(), sInfo));
+ ScopedVclPtr<InfoBox> aInfo(new InfoBox(GetParent(), sInfo));
aInfo->Execute();
}
else
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index bd7bfda19a07..159d3310830f 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -584,7 +584,7 @@ IMPL_LINK( SwNewUserIdxDlg, ModifyHdl, Edit*, pEdit)
IMPL_LINK_NOARG(SwIndexMarkPane, NewUserIdxHdl)
{
- VclPtr<SwNewUserIdxDlg> pDlg(new SwNewUserIdxDlg(this));
+ ScopedVclPtr<SwNewUserIdxDlg> pDlg(new SwNewUserIdxDlg(this));
if(RET_OK == pDlg->Execute())
{
OUString sNewName(pDlg->GetName());
@@ -1208,7 +1208,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl)
bDifferent |= m_sFields[i] != pEntry->GetAuthorField((ToxAuthorityField)i);
if(bDifferent)
{
- VclPtr<MessageDialog> aQuery(new MessageDialog(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if(RET_YES != aQuery->Execute())
return 0;
}
@@ -1248,7 +1248,7 @@ IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, PushButton*, pButton)
OUString sOldId = m_sCreatedEntry[0];
for(int i = 0; i < AUTH_FIELD_END; i++)
m_sCreatedEntry[i] = bCreate ? OUString() : m_sFields[i];
- VclPtr<SwCreateAuthEntryDlg_Impl> aDlg(new SwCreateAuthEntryDlg_Impl(pButton,
+ ScopedVclPtr<SwCreateAuthEntryDlg_Impl> aDlg(new SwCreateAuthEntryDlg_Impl(pButton,
bCreate ? m_sCreatedEntry : m_sFields,
*pSh, bNewEntry, bCreate));
if(bNewEntry)
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index d5baec16a62d..458c6aca348a 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -151,7 +151,7 @@ void SwGlossaryGroupDlg::Apply()
const OUString sMsg(SW_RESSTR(STR_QUERY_DELETE_GROUP1)
+ sTitle
+ SW_RESSTR(STR_QUERY_DELETE_GROUP2));
- VclPtr<QueryBox> aQuery(new QueryBox(this->GetParent(), WB_YES_NO|WB_DEF_NO, sMsg ));
+ ScopedVclPtr<QueryBox> aQuery(new QueryBox(this->GetParent(), WB_YES_NO|WB_DEF_NO, sMsg ));
if(RET_YES == aQuery->Execute())
pGlosHdl->DelGroup( sDelGroup );
}
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 65a5da2cb8a0..985641c52f17 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -503,7 +503,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
else if (sItemIdent == "rename")
{
m_pShortNameEdit->SetText(pGlossaryHdl->GetGlossaryShortName(m_pNameED->GetText()));
- VclPtr<SwNewGlosNameDlg> pNewNameDlg(new SwNewGlosNameDlg(this, m_pNameED->GetText(),
+ ScopedVclPtr<SwNewGlosNameDlg> pNewNameDlg(new SwNewGlosNameDlg(this, m_pNameED->GetText(),
m_pShortNameEdit->GetText() ));
if( RET_OK == pNewNameDlg->Execute() &&
pGlossaryHdl->Rename( m_pShortNameEdit->GetText(),
@@ -523,7 +523,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
}
else if (sItemIdent == "delete")
{
- VclPtr<MessageDialog> aQuery(new MessageDialog(this, SW_RES(STR_QUERY_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, SW_RES(STR_QUERY_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if (RET_YES == aQuery->Execute())
{
const OUString aShortName(m_pShortNameEdit->GetText());
@@ -651,7 +651,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl)
if(bIsWritable)
{
- VclPtr<SwGlossaryGroupDlg> pDlg(new SwGlossaryGroupDlg( this, pGloss->GetPathArray(), pGlossaryHdl ));
+ ScopedVclPtr<SwGlossaryGroupDlg> pDlg(new SwGlossaryGroupDlg( this, pGloss->GetPathArray(), pGlossaryHdl ));
if ( RET_OK == pDlg->Execute() )
{
Init();
@@ -681,7 +681,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl)
}
else
{
- VclPtr<MessageDialog> aBox(new MessageDialog(this, sReadonlyPath, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, sReadonlyPath, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if(RET_YES == aBox->Execute())
PathHdl(m_pPathBtn);
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 5fd96981c7b8..276e76ea572c 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -990,7 +990,7 @@ void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFmt));
aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt));
// collect char styles
- VclPtr<ListBox> rCharFmtLB(new ListBox(this));
+ ScopedVclPtr<ListBox> rCharFmtLB(new ListBox(this));
rCharFmtLB->Clear();
rCharFmtLB->InsertEntry( SwViewShell::GetShellRes()->aStrNone );
SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell();
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index cbd1cc96f80c..c42759275ea4 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -500,7 +500,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if ( aFileName.isEmpty() )
{
SvtPathOptions aPathOpt;
- VclPtr<SfxNewFileDialog> pNewFileDlg(
+ ScopedVclPtr<SfxNewFileDialog> pNewFileDlg(
new SfxNewFileDialog(&GetView()->GetViewFrame()->GetWindow(), SFXWB_LOAD_TEMPLATE));
pNewFileDlg->SetTemplateFlags(nFlags);
@@ -608,7 +608,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
const SfxFilter* pFlt = GetMedium()->GetFilter();
if(!pFlt || pFlt->GetUserData() != pHtmlFlt->GetUserData())
{
- VclPtr<MessageDialog> aQuery(new MessageDialog(&pViewFrm->GetWindow(),
+ ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(&pViewFrm->GetWindow(),
"SaveAsHTMLDialog", "modules/swriter/ui/saveashtmldialog.ui"));
if(RET_YES == aQuery->Execute())
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 03545308ca2d..b4c9881803c3 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -388,7 +388,7 @@ namespace
sal_uInt16 aRotation = aMetadata.getRotation();
if (aRotation != 0)
{
- VclPtr<MessageDialog> aQueryBox(new MessageDialog( 0,"QueryRotateIntoStandardOrientationDialog","modules/swriter/ui/queryrotateintostandarddialog.ui") );
+ ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( 0,"QueryRotateIntoStandardOrientationDialog","modules/swriter/ui/queryrotateintostandarddialog.ui") );
if (aQueryBox->Execute() == RET_YES)
{
GraphicNativeTransform aTransform( aGraphic );
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index a1cdc385a2e3..641739755dc2 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -803,7 +803,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
uno::Any exc( ::cppu::getCaughtException() );
OUString msg( ::comphelper::anyToString( exc ) );
const SolarMutexGuard guard;
- VclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, msg));
+ ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, msg));
aErrorBox->SetText( "Explanations" );
aErrorBox->Execute();
}
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index be54e67b88ae..5014223d5e6f 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -163,7 +163,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
Graphic aGraphic = Graphic( *pGraphic );
- VclPtr<CompressGraphicsDialog> aDialog(new CompressGraphicsDialog( GetView().GetWindow(), aGraphic, aSize, aCropRectangle, GetView().GetViewFrame()->GetBindings() ) );
+ ScopedVclPtr<CompressGraphicsDialog> aDialog(new CompressGraphicsDialog( GetView().GetWindow(), aGraphic, aSize, aCropRectangle, GetView().GetViewFrame()->GetBindings() ) );
if( aDialog->Execute() == RET_OK )
{
rSh.StartAllAction();
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 3a282dfa5258..2f1180061991 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -735,7 +735,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
break;
case TBLMERGE_TOOCOMPLEX:
{
- VclPtr<MessageDialog> aInfoBox(new MessageDialog( GetView().GetWindow(),
+ ScopedVclPtr<MessageDialog> aInfoBox(new MessageDialog( GetView().GetWindow(),
SW_RES( STR_ERR_TABLE_MERGE ), VCL_MESSAGE_INFO ) );
aInfoBox->Execute();
break;
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index cbaf14a9bc8c..b1dcea637cab 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -257,7 +257,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
static short lcl_AskRedlineMode(vcl::Window *pWin)
{
- VclPtr<MessBox> aQBox(new MessBox( pWin, 0,
+ ScopedVclPtr<MessBox> aQBox(new MessBox( pWin, 0,
OUString( SW_RES( STR_REDLINE_TITLE ) ),
OUString( SW_RES( STR_REDLINE_MSG ) ) ) );
aQBox->SetImage( QueryBox::GetStandardImage() );
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 14698d8593c2..e408b3e81756 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -240,7 +240,7 @@ int SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter,
const sal_uInt16 aRotation = aMetadata.getRotation();
if (aRotation != 0)
{
- VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetWindow(),"QueryRotateIntoStandardOrientationDialog","modules/swriter/ui/queryrotateintostandarddialog.ui") );
+ ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetWindow(),"QueryRotateIntoStandardOrientationDialog","modules/swriter/ui/queryrotateintostandarddialog.ui") );
if (aQueryBox->Execute() == RET_YES)
{
GraphicNativeTransform aTransform( aGraphic );
@@ -439,7 +439,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
// really store as link only?
if( bAsLink && SvtMiscOptions().ShowLinkWarningDialog() )
{
- VclPtr<SvxLinkWarningDialog> aWarnDlg(new SvxLinkWarningDialog(GetWindow(),pFileDlg->GetPath()));
+ ScopedVclPtr<SvxLinkWarningDialog> aWarnDlg(new SvxLinkWarningDialog(GetWindow(),pFileDlg->GetPath()));
if( aWarnDlg->Execute() != RET_OK )
bAsLink=false; // don't store as link
}
@@ -504,7 +504,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
{
if( bShowError )
{
- VclPtr<MessageDialog> aInfoBox(new MessageDialog( GetWindow(), SW_RESSTR( nResId ), VCL_MESSAGE_INFO) );
+ ScopedVclPtr<MessageDialog> aInfoBox(new MessageDialog( GetWindow(), SW_RESSTR( nResId ), VCL_MESSAGE_INFO) );
aInfoBox->Execute();
}
rReq.Ignore();
@@ -585,7 +585,7 @@ void SwView::Execute(SfxRequest &rReq)
pParent = static_cast<const XWindowItem*>( pParentItem )->GetWindowPtr();
else
pParent = &GetViewFrame()->GetWindow();
- VclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog( pParent ));
+ ScopedVclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog( pParent ));
aPasswdDlg->SetMinLen( 1 );
//#i69751# the result of Execute() can be ignored
(void)aPasswdDlg->Execute();
@@ -623,7 +623,7 @@ void SwView::Execute(SfxRequest &rReq)
pParent = static_cast<const XWindowItem*>( pParentItem )->GetWindowPtr();
else
pParent = &GetViewFrame()->GetWindow();
- VclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog( pParent ));
+ ScopedVclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog( pParent ));
aPasswdDlg->SetMinLen( 1 );
if(!aPasswd.getLength())
aPasswdDlg->ShowExtras(SHOWEXTRAS_CONFIRM);
@@ -2287,7 +2287,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
if ( lcl_NeedAdditionalDataSource( xDBContext ) )
{
// no data sources are available - create a new one
- VclPtr<MessageDialog> aQuery(new MessageDialog(&GetViewFrame()->GetWindow(),
+ ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(&GetViewFrame()->GetWindow(),
"DataSourcesUnavailableDialog",
"modules/swriter/ui/datasourcesunavailabledialog.ui"));
// no cancel allowed
@@ -2336,7 +2336,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
OUString sSource;
if(!GetWrtShell().IsFieldDataSourceAvailable(sSource))
{
- VclPtr<MessageDialog> aWarning(new MessageDialog(&GetViewFrame()->GetWindow(),
+ ScopedVclPtr<MessageDialog> aWarning(new MessageDialog(&GetViewFrame()->GetWindow(),
"WarnDataSourceDialog",
"modules/swriter/ui/warndatasourcedialog.ui"));
OUString sTmp(aWarning->get_primary_text());
@@ -2390,7 +2390,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
SfxApplication* pSfxApp = SfxGetpApp();
vcl::Window* pTopWin = pSfxApp->GetTopWindow();
- VclPtr<SfxTemplateManagerDlg> aDocTemplDlg(new SfxTemplateManagerDlg);
+ ScopedVclPtr<SfxTemplateManagerDlg> aDocTemplDlg(new SfxTemplateManagerDlg);
int nRet = aDocTemplDlg->Execute();
bool bNewWin = false;
if ( nRet == RET_OK )
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 1319bd75ee8a..0b75147b401a 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -177,7 +177,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
if ( pSdrView )
{
SdrObject* pObj = NULL;
- VclPtr<svx::FontWorkGalleryDialog> aDlg(new svx::FontWorkGalleryDialog( pSdrView, pWin, nSlotId ));
+ ScopedVclPtr<svx::FontWorkGalleryDialog> aDlg(new svx::FontWorkGalleryDialog( pSdrView, pWin, nSlotId ));
aDlg->SetSdrObjectRef( &pObj, pSdrView->GetModel() );
aDlg->Execute();
if ( pObj )
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 6c8d9ad2a4f3..a68bd58e5ede 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -459,7 +459,7 @@ void SwView::HyphenateDocument()
// turned on no special area
{
// I want also in special areas hyphenation
- VclPtr<MessageDialog> aBox(new MessageDialog(&GetEditWin(), SW_RES(STR_QUERY_SPECIAL_FORCED), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtr<MessageDialog> aBox(new MessageDialog(&GetEditWin(), SW_RES(STR_QUERY_SPECIAL_FORCED), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if( aBox->Execute() == RET_YES )
{
bOther = true;
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 0a3a4cf363e0..af45b47ce266 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -175,7 +175,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
}
else
{
- VclPtr<MessageDialog> aInfoBox(new MessageDialog(&GetEditWin(), SW_RES(STR_ERR_NO_FAX), VCL_MESSAGE_INFO));
+ ScopedVclPtr<MessageDialog> aInfoBox(new MessageDialog(&GetEditWin(), SW_RES(STR_ERR_NO_FAX), VCL_MESSAGE_INFO));
sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS;
aInfoBox->set_primary_text(aInfoBox->get_primary_text().replaceFirst("%1", OUString(SW_RES(nResNo))));
aInfoBox->Execute();
@@ -201,7 +201,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
if(!bSilent && !bFromMerge &&
SW_MOD()->GetModuleConfig()->IsAskForMailMerge() && pSh->IsAnyDatabaseFieldInDoc())
{
- VclPtr<MessageDialog> aBox(new MessageDialog(&GetEditWin(), "PrintMergeDialog",
+ ScopedVclPtr<MessageDialog> aBox(new MessageDialog(&GetEditWin(), "PrintMergeDialog",
"modules/swriter/ui/printmergedialog.ui"));
short nRet = aBox->Execute();
if(RET_YES == nRet)
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index eb6be8eec322..cf9d634e5435 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -158,7 +158,7 @@ bool SwGlossaryList::GetShortName(const OUString& rLongName,
}
else if(1 < nCount)
{
- VclPtr<SwGlossDecideDlg> aDlg(new SwGlossDecideDlg(0));
+ ScopedVclPtr<SwGlossDecideDlg> aDlg(new SwGlossDecideDlg(0));
OUString sTitle = aDlg->GetText() + " " + aTripleStrings.front().sBlock;
aDlg->SetText(sTitle);