summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
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/dbui/addresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx10
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx2
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx8
-rw-r--r--sw/source/ui/envelp/envfmt.cxx2
-rw-r--r--sw/source/ui/envelp/envprt.cxx2
-rw-r--r--sw/source/ui/envelp/label1.cxx2
-rw-r--r--sw/source/ui/envelp/labfmt.cxx2
-rw-r--r--sw/source/ui/envelp/labprt.cxx2
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx2
-rw-r--r--sw/source/ui/frmdlg/cption.cxx6
-rw-r--r--sw/source/ui/index/cnttab.cxx2
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx4
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx6
-rw-r--r--sw/source/ui/misc/num.cxx2
-rw-r--r--sw/source/ui/misc/outline.cxx4
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx4
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx2
-rw-r--r--sw/source/uibase/shells/grfsh.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx12
-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.cxx2
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx2
32 files changed, 52 insertions, 50 deletions
diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx
index 6ba5ae3a1c6c..2fddd6c33691 100644
--- a/sw/qa/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/tiledrendering/tiledrendering.cxx
@@ -197,7 +197,7 @@ int TiledRenderingApp::Main()
Help::EnableQuickHelp();
try
{
- ScopedVclPtr<TiledRenderingDialog> pDialog(new TiledRenderingDialog(this));
+ ScopedVclPtrInstance< TiledRenderingDialog > pDialog(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 360b45e1ab74..ccd71a80a94b 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) )
{
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(pParent, "QueryShowChangesDialog", "modules/swriter/ui/queryshowchangesdialog.ui"));
+ ScopedVclPtrInstance< MessageDialog > aQuery(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 6ce1b194f628..ab6fe8a69e15 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)
{
- ScopedVclPtr<SwAuthenticationSettingsDialog> aDlg(new SwAuthenticationSettingsDialog(this, *m_pConfigItem));
+ ScopedVclPtrInstance< SwAuthenticationSettingsDialog > aDlg(this, *m_pConfigItem);
aDlg->Execute();
return 0;
}
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index c1a4aaa754e7..149041798109 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -576,7 +576,7 @@ void SwAddressListDialog::DetectTablesAndQueries(
if(nTables > 1 && bWidthDialog)
{
//now call the table select dialog - if more than one table exists
- VclPtr<SwSelectDBTableDialog> pDlg(new SwSelectDBTableDialog(this, pUserData->xConnection));
+ VclPtrInstance<SwSelectDBTableDialog> pDlg(this, pUserData->xConnection);
const OUString sTable = SvTabListBox::GetEntryText(pSelect, ITEMID_TABLE - 1);
if(!sTable.isEmpty())
pDlg->SetSelectedTable(sTable, pUserData->nCommandType == CommandType::TABLE);
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 5f7a6fde5281..6dbd308133ce 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -578,7 +578,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, FindHdl_Impl)
IMPL_LINK(SwCreateAddressListDialog, CustomizeHdl_Impl, PushButton*, pButton)
{
- VclPtr<SwCustomizeAddressListDialog> pDlg(new SwCustomizeAddressListDialog(pButton, *m_pCSVData));
+ VclPtrInstance< SwCustomizeAddressListDialog > pDlg(pButton, *m_pCSVData);
if(RET_OK == pDlg->Execute())
{
delete m_pCSVData;
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 42b9e33118be..9d632f1cb974 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -163,7 +163,7 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl)
{
try
{
- VclPtr<SwAddressListDialog> xAddrDialog(new SwAddressListDialog(this));
+ VclPtrInstance< SwAddressListDialog > xAddrDialog(this);
if(RET_OK == xAddrDialog->Execute())
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 6b4ee00ca8ae..50fe45c17446 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -126,7 +126,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
if(bTemplate)
{
m_pLoadTemplateRB->Check();
- VclPtr<SfxNewFileDialog> pNewFileDlg(new SfxNewFileDialog(this, 0));
+ VclPtrInstance< SfxNewFileDialog > pNewFileDlg(this, 0);
sal_uInt16 nRet = pNewFileDlg->Execute();
if(RET_TEMPLATE_LOAD == nRet)
bTemplate = false;
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index bdb8992004c1..438225085654 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)
{
- ScopedVclPtr<SwCopyToDialog> pDlg(new SwCopyToDialog(pButton));
+ ScopedVclPtrInstance< SwCopyToDialog > pDlg(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();
- ScopedVclPtrInstance<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)
{
- ScopedVclPtr<SwSaveWarningBox_Impl> aWarning(new SwSaveWarningBox_Impl( pButton, sOutPath ));
+ ScopedVclPtrInstance< SwSaveWarningBox_Impl > aWarning( 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()) )
{
- ScopedVclPtr<QueryBox> aQuery(new QueryBox(pButton, WB_YES_NO_CANCEL, m_sConfigureMail));
+ ScopedVclPtrInstance< QueryBox > aQuery(pButton, WB_YES_NO_CANCEL, m_sConfigureMail);
sal_uInt16 nRet = aQuery->Execute();
if(RET_YES == nRet )
{
SfxAllItemSet aSet(pTargetView->GetPool());
- ScopedVclPtr<SwMailConfigDlg> pDlg(new SwMailConfigDlg(pButton, aSet));
+ ScopedVclPtrInstance< SwMailConfigDlg > pDlg(pButton, aSet);
nRet = pDlg->Execute();
}
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index f486d75ae03b..09cf2cf750f3 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -583,7 +583,7 @@ void SwSendMailDialog::DocumentSent( uno::Reference< mail::XMailMessage> xMessag
if (pError)
{
- VclPtr<SwSendWarningBox_Impl> pDlg(new SwSendWarningBox_Impl(0, *pError));
+ VclPtrInstance< SwSendWarningBox_Impl > pDlg(nullptr, *pError);
pDlg->Execute();
}
}
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 99581c799b16..5cf71f0eb173 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -187,7 +187,7 @@ IMPL_LINK(SwSelectDBTableDialog, PreviewHdl, PushButton*, pButton)
pProperties[4].Name = "ShowTreeViewButton";
pProperties[4].Value <<= sal_False;
- VclPtr<SwDBTablePreviewDialog> pDlg(new SwDBTablePreviewDialog(pButton, aProperties));
+ VclPtrInstance< SwDBTablePreviewDialog > pDlg(pButton, aProperties);
pDlg->Execute();
}
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index f0e6e9bc39dd..73a396cef327 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())
{
- ScopedVclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog(this));
+ ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg(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)));
- ScopedVclPtr<SwSectionPropertyTabDialog> aTabDlg(new SwSectionPropertyTabDialog(this, aSet, rSh));
+ ScopedVclPtrInstance< SwSectionPropertyTabDialog > aTabDlg(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)
{
- ScopedVclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog(this));
+ ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg(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)
{
- ScopedVclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog(this));
+ ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg(this);
aPasswdDlg->ShowExtras(SHOWEXTRAS_CONFIRM);
if(RET_OK == aPasswdDlg->Execute())
{
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 4cb70e88476d..b8ec0bd0e391 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -319,7 +319,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
::PrepareBoxInfo( aTmpSet, *pSh );
const OUString sFmtStr = pColl->GetName();
- VclPtr<SwParaDlg> pDlg(new SwParaDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFmtStr));
+ VclPtrInstance< SwParaDlg > pDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFmtStr);
if ( pDlg->Execute() == RET_OK )
{
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index 0fea874dca82..b6b8a3f580dc 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -116,7 +116,7 @@ IMPL_LINK( SwEnvPrtPage, ButtonHdl, Button *, pBtn )
// Call printer setup
if (pPrt)
{
- VclPtr<PrinterSetupDialog> pDlg(new PrinterSetupDialog(this));
+ VclPtrInstance< PrinterSetupDialog > pDlg(this);
pDlg->SetPrinter(pPrt);
pDlg->Execute();
pDlg.reset();
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 7c1ca59c064c..cfffa1f57b54 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()
{
- ScopedVclPtr<MetricField> aField(new MetricField(this, WinBits(0)));
+ ScopedVclPtrInstance< MetricField > aField(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 ee31bc5d3841..7ff48c71944e 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;
- ScopedVclPtr<SwSaveLabelDlg> pSaveDlg(new SwSaveLabelDlg(this, aRec));
+ ScopedVclPtrInstance< SwSaveLabelDlg > pSaveDlg(this, aRec);
pSaveDlg->SetLabel(aItem.aLstMake, aItem.aLstType);
pSaveDlg->Execute();
if(pSaveDlg->GetLabel(aItem))
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index 77be9df13fc2..4fd81fe25f87 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -88,7 +88,7 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton )
if (!pPrinter)
pPrinter = new Printer;
- VclPtr<PrinterSetupDialog> pDlg(new PrinterSetupDialog(this));
+ VclPtrInstance< PrinterSetupDialog > pDlg(this);
pDlg->SetPrinter(pPrinter);
pDlg->Execute();
pDlg.reset();
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index b08a6af3ecb9..11dccd075cc9 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
- ScopedVclPtr<ListBox> rCharFmtLB(new ListBox(this));
+ ScopedVclPtrInstance< ListBox > rCharFmtLB(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 d66cf500b440..14c43ccb9d7d 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -284,8 +284,8 @@ IMPL_LINK_INLINE_START( SwCaptionDialog, OptionHdl, Button*, pButton )
{
OUString sFldTypeName = m_pCategoryBox->GetText();
if(sFldTypeName == m_sNone)
- sFldTypeName = OUString();
- ScopedVclPtrInstance<SwSequenceOptionDialog> aDlg( pButton, rView, sFldTypeName );
+ sFldTypeName.clear();
+ 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() );
- ScopedVclPtr<SwCaptionOptDlg> aDlg(new SwCaptionOptDlg( this, aSet ) );
+ ScopedVclPtrInstance< SwCaptionOptDlg > aDlg( this, aSet );
aDlg->Execute();
return 0;
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index ccf04859f8eb..a274cbd426c7 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() );
- ScopedVclPtr<InfoBox> aInfo(new InfoBox(GetParent(), sInfo));
+ ScopedVclPtrInstance< InfoBox > aInfo(GetParent(), sInfo);
aInfo->Execute();
}
else
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 34ca667d31be..bb595bf5d737 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)
{
- ScopedVclPtr<SwNewUserIdxDlg> pDlg(new SwNewUserIdxDlg(this));
+ ScopedVclPtrInstance< SwNewUserIdxDlg > pDlg(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)
{
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aQuery(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
if(RET_YES != aQuery->Execute())
return 0;
}
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index 458c6aca348a..7f86ef083348 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));
- ScopedVclPtr<QueryBox> aQuery(new QueryBox(this->GetParent(), WB_YES_NO|WB_DEF_NO, sMsg ));
+ ScopedVclPtrInstance< QueryBox > aQuery(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 be6bf1546d8a..0d21fa03ba3e 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -523,7 +523,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
}
else if (sItemIdent == "delete")
{
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, SW_RES(STR_QUERY_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aQuery(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)
{
- ScopedVclPtr<SwGlossaryGroupDlg> pDlg(new SwGlossaryGroupDlg( this, pGloss->GetPathArray(), pGlossaryHdl ));
+ ScopedVclPtrInstance< SwGlossaryGroupDlg > pDlg( this, pGloss->GetPathArray(), pGlossaryHdl );
if ( RET_OK == pDlg->Execute() )
{
Init();
@@ -681,7 +681,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl)
}
else
{
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, sReadonlyPath, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aBox(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 276e76ea572c..2d347ba8eb42 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
- ScopedVclPtr<ListBox> rCharFmtLB(new ListBox(this));
+ ScopedVclPtrInstance< ListBox > rCharFmtLB(this);
rCharFmtLB->Clear();
rCharFmtLB->InsertEntry( SwViewShell::GetShellRes()->aStrNone );
SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell();
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 08583bf9f9bd..c648fb635cb1 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -287,7 +287,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
nLevelNo = 9;
else if (sIdent == "saveas")
{
- VclPtr<SwNumNamesDlg> pDlg(new SwNumNamesDlg(this));
+ VclPtrInstance< SwNumNamesDlg > pDlg(this);
const OUString *aStrArr[SwChapterNumRules::nMaxRules];
for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i)
{
@@ -931,7 +931,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
{
const Size aSize(PixelToLogic(GetOutputSizePixel()));
- ScopedVclPtr<VirtualDevice> pVDev(new VirtualDevice(*this));
+ ScopedVclPtrInstance< VirtualDevice > pVDev(*this);
pVDev->SetMapMode(GetMapMode());
pVDev->SetOutputSize( aSize );
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index b4c9881803c3..a578ff05ebbc 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -388,7 +388,9 @@ namespace
sal_uInt16 aRotation = aMetadata.getRotation();
if (aRotation != 0)
{
- ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( 0,"QueryRotateIntoStandardOrientationDialog","modules/swriter/ui/queryrotateintostandarddialog.ui") );
+ ScopedVclPtrInstance< MessageDialog > aQueryBox(
+ nullptr, "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 641739755dc2..dbe37ec77fbc 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;
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, msg));
+ ScopedVclPtrInstance< MessageDialog > aErrorBox(nullptr, msg);
aErrorBox->SetText( "Explanations" );
aErrorBox->Execute();
}
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 5014223d5e6f..7823ca126637 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 );
- ScopedVclPtr<CompressGraphicsDialog> aDialog(new CompressGraphicsDialog( GetView().GetWindow(), aGraphic, aSize, aCropRectangle, GetView().GetViewFrame()->GetBindings() ) );
+ ScopedVclPtrInstance< CompressGraphicsDialog > aDialog( GetView().GetWindow(), aGraphic, aSize, aCropRectangle, GetView().GetViewFrame()->GetBindings() );
if( aDialog->Execute() == RET_OK )
{
rSh.StartAllAction();
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 314eccf5e12e..4367f93b3102 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)
{
- ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetWindow(),"QueryRotateIntoStandardOrientationDialog","modules/swriter/ui/queryrotateintostandarddialog.ui") );
+ ScopedVclPtrInstance< MessageDialog > aQueryBox( 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() )
{
- ScopedVclPtr<SvxLinkWarningDialog> aWarnDlg(new SvxLinkWarningDialog(GetWindow(),pFileDlg->GetPath()));
+ ScopedVclPtrInstance< SvxLinkWarningDialog > aWarnDlg(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 )
{
- ScopedVclPtr<MessageDialog> aInfoBox(new MessageDialog( GetWindow(), SW_RESSTR( nResId ), VCL_MESSAGE_INFO) );
+ ScopedVclPtrInstance< MessageDialog > aInfoBox( 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();
- ScopedVclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog( pParent ));
+ ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg( 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();
- ScopedVclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog( pParent ));
+ ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg( pParent );
aPasswdDlg->SetMinLen( 1 );
if(!aPasswd.getLength())
aPasswdDlg->ShowExtras(SHOWEXTRAS_CONFIRM);
@@ -2390,7 +2390,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
SfxApplication* pSfxApp = SfxGetpApp();
vcl::Window* pTopWin = pSfxApp->GetTopWindow();
- ScopedVclPtr<SfxTemplateManagerDlg> aDocTemplDlg(new SfxTemplateManagerDlg);
+ ScopedVclPtrInstance< SfxTemplateManagerDlg > aDocTemplDlg;
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 0b75147b401a..228ba99bae98 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;
- ScopedVclPtr<svx::FontWorkGalleryDialog> aDlg(new svx::FontWorkGalleryDialog( pSdrView, pWin, nSlotId ));
+ ScopedVclPtrInstance< svx::FontWorkGalleryDialog > aDlg( 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 a68bd58e5ede..637fdd0f9913 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
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(&GetEditWin(), SW_RES(STR_QUERY_SPECIAL_FORCED), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aBox(&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 f3b963724472..2309ea25209e 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
{
- ScopedVclPtr<MessageDialog> aInfoBox(new MessageDialog(&GetEditWin(), SW_RES(STR_ERR_NO_FAX), VCL_MESSAGE_INFO));
+ ScopedVclPtrInstance< MessageDialog > aInfoBox(&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();
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index cf9d634e5435..f6924e73b40a 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)
{
- ScopedVclPtr<SwGlossDecideDlg> aDlg(new SwGlossDecideDlg(0));
+ ScopedVclPtrInstance< SwGlossDecideDlg > aDlg(0);
OUString sTitle = aDlg->GetText() + " " + aTripleStrings.front().sBlock;
aDlg->SetText(sTitle);