[Libreoffice-commits] core.git: Branch 'feature/vclref' - avmedia/source basctl/source basic/source canvas/source chart2/source cppcanvas/source cui/source dbaccess/source desktop/source drawinglayer/source editeng/source extensions/source filter/source forms/source fpicker/source lotuswordpro/source reportdesign/source sc/source sd/source sfx2/source slideshow/source starmath/qa starmath/source svtools/source svx/source svx/workben sw/qa sw/source uui/source writerperfect/source xmlsecurity/source
Michael Meeks
michael.meeks at collabora.com
Tue Mar 31 14:59:39 PDT 2015
avmedia/source/viewer/mediawindow.cxx | 2
basctl/source/basicide/baside2.cxx | 4
basctl/source/basicide/baside2b.cxx | 4
basctl/source/basicide/baside3.cxx | 4
basctl/source/basicide/basides1.cxx | 4
basctl/source/basicide/basobj2.cxx | 4
basctl/source/basicide/basobj3.cxx | 4
basctl/source/basicide/bastypes.cxx | 6 -
basctl/source/basicide/macrodlg.cxx | 2
basctl/source/basicide/moduldl2.cxx | 6 -
basctl/source/basicide/moduldlg.cxx | 4
basctl/source/dlged/managelang.cxx | 4
basic/source/runtime/iosys.cxx | 2
canvas/source/cairo/cairo_textlayout.cxx | 2
canvas/source/opengl/ogl_canvashelper.cxx | 2
canvas/source/vcl/canvasfont.cxx | 2
canvas/source/vcl/canvashelper_texturefill.cxx | 2
canvas/source/vcl/textlayout.cxx | 6 -
chart2/source/controller/dialogs/res_DataLabel.cxx | 2
chart2/source/controller/drawinglayer/ViewElementListProvider.cxx | 2
chart2/source/controller/main/ChartController.cxx | 4
chart2/source/controller/main/ChartController_EditData.cxx | 2
chart2/source/controller/main/ChartController_Insert.cxx | 6 -
chart2/source/controller/main/ChartController_Properties.cxx | 2
chart2/source/view/main/3DChartObjects.cxx | 2
chart2/source/view/main/DummyXShape.cxx | 2
chart2/source/view/main/OpenGLRender.cxx | 2
cppcanvas/source/mtfrenderer/implrenderer.cxx | 2
cui/source/customize/cfg.cxx | 23 ++---
cui/source/customize/macropg.cxx | 4
cui/source/dialogs/SpellDialog.cxx | 2
cui/source/dialogs/about.cxx | 2
cui/source/dialogs/colorpicker.cxx | 2
cui/source/dialogs/cuigaldlg.cxx | 2
cui/source/dialogs/hangulhanjadlg.cxx | 6 -
cui/source/dialogs/hldocntp.cxx | 4
cui/source/dialogs/hltpbase.cxx | 2
cui/source/dialogs/linkdlg.cxx | 4
cui/source/dialogs/passwdomdlg.cxx | 2
cui/source/dialogs/scriptdlg.cxx | 10 +-
cui/source/factory/init.cxx | 2
cui/source/options/dbregister.cxx | 4
cui/source/options/doclinkdialog.cxx | 6 -
cui/source/options/optcolor.cxx | 8 -
cui/source/options/optdict.cxx | 2
cui/source/options/optgdlg.cxx | 2
cui/source/options/optinet2.cxx | 6 -
cui/source/options/optjava.cxx | 10 +-
cui/source/options/optlingu.cxx | 4
cui/source/options/optopencl.cxx | 2
cui/source/options/personalization.cxx | 2
cui/source/tabpages/autocdlg.cxx | 6 -
cui/source/tabpages/chardlg.cxx | 2
cui/source/tabpages/grfpage.cxx | 2
cui/source/tabpages/numpages.cxx | 4
cui/source/tabpages/tpbitmap.cxx | 2
cui/source/tabpages/tpcolor.cxx | 2
cui/source/tabpages/tpgradnt.cxx | 2
cui/source/tabpages/tphatch.cxx | 2
cui/source/tabpages/tpline.cxx | 4
dbaccess/source/ext/macromigration/macromigrationdialog.cxx | 2
dbaccess/source/ui/app/AppControllerDnD.cxx | 4
dbaccess/source/ui/app/AppControllerGen.cxx | 4
dbaccess/source/ui/browser/brwctrlr.cxx | 6 -
dbaccess/source/ui/browser/sbagrid.cxx | 4
dbaccess/source/ui/dlg/CollectionView.cxx | 2
dbaccess/source/ui/dlg/ConnectionHelper.cxx | 6 -
dbaccess/source/ui/dlg/ConnectionPage.cxx | 2
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 4
dbaccess/source/ui/dlg/UserAdmin.cxx | 8 -
dbaccess/source/ui/dlg/adminpages.cxx | 6 -
dbaccess/source/ui/dlg/detailpages.cxx | 4
dbaccess/source/ui/dlg/directsql.cxx | 2
dbaccess/source/ui/dlg/generalpage.cxx | 2
dbaccess/source/ui/dlg/indexdialog.cxx | 8 -
dbaccess/source/ui/dlg/sqlmessage.cxx | 2
dbaccess/source/ui/dlg/tablespage.cxx | 2
dbaccess/source/ui/misc/DExport.cxx | 2
dbaccess/source/ui/misc/RowSetDrop.cxx | 2
dbaccess/source/ui/misc/UITools.cxx | 6 -
dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx | 2
dbaccess/source/ui/querydesign/QueryDesignView.cxx | 2
dbaccess/source/ui/querydesign/QueryTableView.cxx | 6 -
dbaccess/source/ui/querydesign/querycontroller.cxx | 6 -
dbaccess/source/ui/relationdesign/RelationController.cxx | 2
dbaccess/source/ui/relationdesign/RelationTableView.cxx | 10 +-
dbaccess/source/ui/tabledesign/TableController.cxx | 16 +--
dbaccess/source/ui/uno/dbinteraction.cxx | 6 -
desktop/source/app/app.cxx | 4
desktop/source/deployment/gui/dp_gui_dialog2.cxx | 4
desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 4
desktop/source/lib/init.cxx | 2
desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 2
drawinglayer/source/primitive2d/controlprimitive2d.cxx | 2
drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx | 4
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 4
drawinglayer/source/tools/converters.cxx | 2
editeng/source/editeng/editeng.cxx | 2
editeng/source/misc/splwrap.cxx | 2
extensions/source/abpilot/typeselectionpage.cxx | 2
extensions/source/bibliography/bibview.cxx | 2
extensions/source/bibliography/datman.cxx | 4
extensions/source/propctrlr/browserlistbox.cxx | 2
extensions/source/propctrlr/commoncontrol.cxx | 2
extensions/source/propctrlr/formcomponenthandler.cxx | 8 -
extensions/source/scanner/sanedlg.cxx | 10 +-
extensions/source/scanner/scanunx.cxx | 2
filter/source/graphic/GraphicExportDialog.cxx | 2
filter/source/graphicfilter/eos2met/eos2met.cxx | 10 +-
filter/source/graphicfilter/epict/epict.cxx | 10 +-
filter/source/graphicfilter/eps/eps.cxx | 10 +-
filter/source/graphicfilter/ieps/ieps.cxx | 6 -
filter/source/msfilter/escherex.cxx | 2
filter/source/msfilter/msdffimp.cxx | 2
filter/source/pdf/impdialog.cxx | 4
filter/source/pdf/pdfinteract.cxx | 2
filter/source/svg/svgfontexport.cxx | 4
filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 12 +-
filter/source/xsltdialog/xmlfiltertabdialog.cxx | 2
forms/source/runtime/formoperations.cxx | 2
fpicker/source/office/PlacesListBox.cxx | 2
fpicker/source/office/iodlg.cxx | 10 +-
lotuswordpro/source/filter/lwppagelayout.cxx | 2
reportdesign/source/ui/misc/UITools.cxx | 2
reportdesign/source/ui/report/ReportController.cxx | 6 -
sc/source/core/data/documen8.cxx | 2
sc/source/core/data/dpobject.cxx | 2
sc/source/core/data/global.cxx | 2
sc/source/core/data/validat.cxx | 6 -
sc/source/filter/rtf/eeimpars.cxx | 2
sc/source/ui/app/transobj.cxx | 4
sc/source/ui/cctrl/tbzoomsliderctrl.cxx | 2
sc/source/ui/condformat/colorformat.cxx | 2
sc/source/ui/dbgui/dbnamdlg.cxx | 2
sc/source/ui/dbgui/pvfundlg.cxx | 2
sc/source/ui/docshell/dbdocimp.cxx | 2
sc/source/ui/docshell/docfunc.cxx | 4
sc/source/ui/docshell/docsh.cxx | 4
sc/source/ui/docshell/docsh3.cxx | 6 -
sc/source/ui/docshell/docsh4.cxx | 6 -
sc/source/ui/docshell/docsh5.cxx | 2
sc/source/ui/docshell/docsh6.cxx | 2
sc/source/ui/docshell/documentlinkmgr.cxx | 2
sc/source/ui/docshell/impex.cxx | 2
sc/source/ui/drawfunc/fuins1.cxx | 2
sc/source/ui/drawfunc/graphsh.cxx | 2
sc/source/ui/miscdlgs/optsolver.cxx | 6 -
sc/source/ui/miscdlgs/retypepassdlg.cxx | 2
sc/source/ui/miscdlgs/solveroptions.cxx | 4
sc/source/ui/optdlg/tpformula.cxx | 2
sc/source/ui/pagedlg/tphf.cxx | 2
sc/source/ui/undo/undobase.cxx | 4
sc/source/ui/undo/undoblk.cxx | 2
sc/source/ui/undo/undoblk3.cxx | 2
sc/source/ui/undo/undostyl.cxx | 2
sc/source/ui/unoobj/styleuno.cxx | 8 -
sc/source/ui/view/cellsh1.cxx | 2
sc/source/ui/view/cellsh2.cxx | 2
sc/source/ui/view/tabview2.cxx | 2
sc/source/ui/view/tabvwsh3.cxx | 8 -
sc/source/ui/view/tabvwshh.cxx | 2
sc/source/ui/view/viewfun3.cxx | 2
sc/source/ui/view/viewfun4.cxx | 4
sc/source/ui/view/viewfunc.cxx | 4
sd/source/core/drawdoc3.cxx | 2
sd/source/filter/grf/sdgrffilter.cxx | 2
sd/source/filter/html/buttonset.cxx | 2
sd/source/filter/html/htmlex.cxx | 2
sd/source/filter/html/pubdlg.cxx | 2
sd/source/ui/animations/CustomAnimationDialog.cxx | 2
sd/source/ui/animations/CustomAnimationPane.cxx | 4
sd/source/ui/animations/SlideTransitionPane.cxx | 2
sd/source/ui/annotations/annotationmanager.cxx | 2
sd/source/ui/annotations/annotationtag.cxx | 2
sd/source/ui/dlg/PhotoAlbumDialog.cxx | 4
sd/source/ui/dlg/animobjs.cxx | 4
sd/source/ui/dlg/brkdlg.cxx | 2
sd/source/ui/dlg/custsdlg.cxx | 4
sd/source/ui/dlg/docprev.cxx | 2
sd/source/ui/dlg/sdpreslt.cxx | 2
sd/source/ui/dlg/sdtreelb.cxx | 2
sd/source/ui/dlg/tpoption.cxx | 2
sd/source/ui/docshell/docshel2.cxx | 2
sd/source/ui/func/fuinsert.cxx | 2
sd/source/ui/func/fuinsfil.cxx | 6 -
sd/source/ui/slideshow/showwin.cxx | 2
sd/source/ui/slidesorter/controller/SlsClipboard.cxx | 2
sd/source/ui/view/Outliner.cxx | 4
sd/source/ui/view/drviews2.cxx | 2
sd/source/ui/view/drviews6.cxx | 2
sd/source/ui/view/drviews9.cxx | 2
sfx2/source/appl/appopen.cxx | 2
sfx2/source/appl/appserv.cxx | 6 -
sfx2/source/appl/impldde.cxx | 2
sfx2/source/appl/newhelp.cxx | 8 -
sfx2/source/appl/opengrf.cxx | 2
sfx2/source/appl/sfxhelp.cxx | 2
sfx2/source/bastyp/fltfnc.cxx | 2
sfx2/source/dialog/backingwindow.cxx | 2
sfx2/source/dialog/dinfdlg.cxx | 2
sfx2/source/dialog/mailmodel.cxx | 2
sfx2/source/dialog/mgetempl.cxx | 6 -
sfx2/source/dialog/passwd.cxx | 2
sfx2/source/dialog/recfloat.cxx | 2
sfx2/source/dialog/securitypage.cxx | 2
sfx2/source/dialog/templdlg.cxx | 2
sfx2/source/dialog/versdlg.cxx | 6 -
sfx2/source/doc/QuerySaveDocument.cxx | 2
sfx2/source/doc/docinsert.cxx | 2
sfx2/source/doc/doctemplates.cxx | 3
sfx2/source/doc/guisaveas.cxx | 2
sfx2/source/doc/objcont.cxx | 4
sfx2/source/doc/objserv.cxx | 14 +--
sfx2/source/doc/objstor.cxx | 2
sfx2/source/doc/templatedlg.cxx | 20 ++--
sfx2/source/view/viewsh.cxx | 6 -
slideshow/source/engine/rehearsetimingsactivity.cxx | 4
slideshow/source/engine/shapes/gdimtftools.cxx | 4
starmath/qa/cppunit/test_nodetotextvisitors.cxx | 8 -
starmath/source/document.cxx | 8 -
svtools/source/contnr/fileview.cxx | 2
svtools/source/graphic/grfmgr2.cxx | 2
svtools/source/graphic/provider.cxx | 2
svtools/source/java/javainteractionhandler.cxx | 10 +-
svtools/source/misc/sampletext.cxx | 2
svtools/source/table/gridtablerenderer.cxx | 2
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 4
svx/source/dialog/_bmpmask.cxx | 2
svx/source/dialog/_contdlg.cxx | 10 +-
svx/source/dialog/dlgctrl.cxx | 8 -
svx/source/dialog/docrecovery.cxx | 8 -
svx/source/dialog/imapdlg.cxx | 4
svx/source/dialog/svxruler.cxx | 2
svx/source/form/databaselocationinput.cxx | 2
svx/source/form/datanavi.cxx | 42 +++++-----
svx/source/gallery2/galobj.cxx | 2
svx/source/gallery2/galtheme.cxx | 2
svx/source/svdraw/svdfmtf.cxx | 2
svx/source/svdraw/svdograf.cxx | 2
svx/source/svdraw/svdotext.cxx | 2
svx/source/svdraw/svdtrans.cxx | 4
svx/source/svdraw/svdxcgv.cxx | 4
svx/source/tbxctrls/colrctrl.cxx | 2
svx/source/tbxctrls/fontworkgallery.cxx | 2
svx/source/tbxctrls/linectrl.cxx | 2
svx/source/toolbars/extrusionbar.cxx | 2
svx/source/toolbars/fontworkbar.cxx | 4
svx/source/unodraw/UnoGraphicExporter.cxx | 4
svx/source/unodraw/unoshape.cxx | 2
svx/source/xoutdev/xattrbmp.cxx | 4
svx/workben/pixelctl.cxx | 2
sw/qa/tiledrendering/tiledrendering.cxx | 2
sw/source/core/doc/DocumentRedlineManager.cxx | 2
sw/source/ui/config/mailconfigpage.cxx | 2
sw/source/ui/dbui/addresslistdialog.cxx | 2
sw/source/ui/dbui/createaddresslistdialog.cxx | 2
sw/source/ui/dbui/mmaddressblockpage.cxx | 2
sw/source/ui/dbui/mmdocselectpage.cxx | 2
sw/source/ui/dbui/mmoutputpage.cxx | 10 +-
sw/source/ui/dbui/mmoutputtypepage.cxx | 2
sw/source/ui/dbui/selectdbtabledialog.cxx | 2
sw/source/ui/dialog/uiregionsw.cxx | 8 -
sw/source/ui/envelp/envfmt.cxx | 2
sw/source/ui/envelp/envprt.cxx | 2
sw/source/ui/envelp/label1.cxx | 2
sw/source/ui/envelp/labfmt.cxx | 2
sw/source/ui/envelp/labprt.cxx | 2
sw/source/ui/fmtui/tmpdlg.cxx | 2
sw/source/ui/frmdlg/cption.cxx | 4
sw/source/ui/index/cnttab.cxx | 2
sw/source/ui/index/swuiidxmrk.cxx | 4
sw/source/ui/misc/glosbib.cxx | 2
sw/source/ui/misc/glossary.cxx | 6 -
sw/source/ui/misc/num.cxx | 2
sw/source/ui/misc/outline.cxx | 4
sw/source/uibase/dochdl/swdtflvr.cxx | 4
sw/source/uibase/lingu/olmenu.cxx | 2
sw/source/uibase/shells/grfsh.cxx | 2
sw/source/uibase/uiview/view2.cxx | 12 +-
sw/source/uibase/uiview/viewdraw.cxx | 2
sw/source/uibase/uiview/viewling.cxx | 2
sw/source/uibase/uiview/viewprt.cxx | 2
sw/source/uibase/utlui/gloslst.cxx | 2
uui/source/iahndl.cxx | 2
uui/source/masterpasscrtdlg.cxx | 2
uui/source/masterpassworddlg.cxx | 2
uui/source/nameclashdlg.cxx | 2
uui/source/passworddlg.cxx | 4
writerperfect/source/writer/WordPerfectImportFilter.cxx | 4
xmlsecurity/source/component/documentdigitalsignatures.cxx | 8 -
xmlsecurity/source/dialogs/certificatechooser.cxx | 2
xmlsecurity/source/dialogs/certificateviewer.cxx | 2
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 6 -
xmlsecurity/source/dialogs/macrosecurity.cxx | 2
294 files changed, 553 insertions(+), 553 deletions(-)
New commits:
commit 0bfa300db1b914c1064aae7fa6a70abb580b5539
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Mar 31 23:04:14 2015 +0100
Automated conversion of VclPtr construction to use Instance template.
Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e
diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index 474f2ad..00e2e6f 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -327,7 +327,7 @@ bool MediaWindow::executeMediaURLDialog(vcl::Window* /* pParent */,
void MediaWindow::executeFormatErrorBox( vcl::Window* pParent )
{
- ScopedVclPtr<MessageDialog> aErrBox(new MessageDialog( pParent, AVMEDIA_RESID( AVMEDIA_STR_ERR_URL ) ) );
+ ScopedVclPtrInstance< MessageDialog > aErrBox( pParent, AVMEDIA_RESID( AVMEDIA_STR_ERR_URL ) );
aErrBox->Execute();
aErrBox.disposeAndClear();
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index d58c9e6..bec806c 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -619,7 +619,7 @@ void ModulWindow::BasicToggleBreakPointEnabled()
void ModulWindow::ManageBreakPoints()
{
BreakPointWindow& rBrkWin = GetBreakPointWindow();
- ScopedVclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( &rBrkWin, GetBreakPoints() ));
+ ScopedVclPtrInstance< BreakPointDialog > aBrkDlg( &rBrkWin, GetBreakPoints() );
aBrkDlg->Execute();
rBrkWin.Invalidate();
}
@@ -1043,7 +1043,7 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq)
break;
case SID_GOTOLINE:
{
- ScopedVclPtr<GotoLineDialog> aGotoDlg(new GotoLineDialog(this));
+ ScopedVclPtrInstance< GotoLineDialog > aGotoDlg(this);
if (aGotoDlg->Execute())
if (sal_Int32 const nLine = aGotoDlg->GetLineNumber())
{
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 8efc327..98c5e8c 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1498,7 +1498,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt )
break;
case RID_BRKPROPS:
{
- ScopedVclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( this, GetBreakPoints() ));
+ ScopedVclPtrInstance< BreakPointDialog > aBrkDlg( this, GetBreakPoints() );
aBrkDlg->SetCurrentBreakPoint( pBrk );
aBrkDlg->Execute();
Invalidate();
@@ -1513,7 +1513,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt )
{
case RID_BRKDLG:
{
- ScopedVclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( this, GetBreakPoints() ));
+ ScopedVclPtrInstance< BreakPointDialog > aBrkDlg( this, GetBreakPoints() );
aBrkDlg->Execute();
Invalidate();
}
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index f07820c..13d28a4 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -1024,7 +1024,7 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TEXT));
aQueryBoxText = aQueryBoxText.replaceAll("$(ARG1)", aXmlDlgName);
- ScopedVclPtr<NameClashQueryBox> aQueryBox(new NameClashQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ));
+ ScopedVclPtrInstance< NameClashQueryBox > aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
sal_uInt16 nRet = aQueryBox->Execute();
if( RET_YES == nRet )
{
@@ -1086,7 +1086,7 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
{
OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TITLE));
OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TEXT));
- ScopedVclPtr<LanguageMismatchQueryBox> aQueryBox(new LanguageMismatchQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ));
+ ScopedVclPtrInstance< LanguageMismatchQueryBox > aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
sal_uInt16 nRet = aQueryBox->Execute();
if( RET_YES == nRet )
{
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 2ba4d3f..f7687c5 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -136,7 +136,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq )
SfxViewFrame* pViewFrame = GetViewFrame();
SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow( SID_SEARCH_DLG ) : NULL;
vcl::Window* pParent = pChildWin ? pChildWin->GetWindow() : NULL;
- ScopedVclPtr<QueryBox> aQuery(new QueryBox(pParent, WB_YES_NO|WB_DEF_YES, IDE_RESSTR(RID_STR_SEARCHFROMSTART)));
+ ScopedVclPtrInstance< QueryBox > aQuery(pParent, WB_YES_NO|WB_DEF_YES, IDE_RESSTR(RID_STR_SEARCHFROMSTART));
if ( aQuery->Execute() == RET_YES )
{
it = aWindowTable.begin();
@@ -676,7 +676,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_MANAGE_LANG:
{
- ScopedVclPtr<ManageLanguageDialog> aDlg(new ManageLanguageDialog(pCurWin, m_pCurLocalizationMgr));
+ ScopedVclPtrInstance< ManageLanguageDialog > aDlg(pCurWin, m_pCurLocalizationMgr);
aDlg->Execute();
rReq.Done();
}
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 7e0783c..c34ad76 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -149,7 +149,7 @@ bool RenameModule (
if ( rDocument.hasModule( rLibName, rNewName ) )
{
- ScopedVclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)));
+ ScopedVclPtrInstance< MessageDialog > aError(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2));
aError->Execute();
return false;
}
@@ -157,7 +157,7 @@ bool RenameModule (
// #i74440
if ( rNewName.isEmpty() )
{
- ScopedVclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME)));
+ ScopedVclPtrInstance< MessageDialog > aError(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME));
aError->Execute();
return false;
}
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 3c8a9f8..bae76bc 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -155,7 +155,7 @@ bool RenameDialog (
if ( rDocument.hasDialog( rLibName, rNewName ) )
{
- ScopedVclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)));
+ ScopedVclPtrInstance< MessageDialog > aError(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2));
aError->Execute();
return false;
}
@@ -163,7 +163,7 @@ bool RenameDialog (
// #i74440
if ( rNewName.isEmpty() )
{
- ScopedVclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME)));
+ ScopedVclPtrInstance< MessageDialog > aError(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME));
aError->Execute();
return false;
}
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 0b4a70e..5052dbb 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -803,7 +803,7 @@ bool QueryDel( const OUString& rName, const ResId& rId, vcl::Window* pParent )
aNameBuf.append('\'');
aNameBuf.insert(0, '\'');
aQuery = aQuery.replaceAll("XX", aNameBuf.makeStringAndClear());
- ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog(pParent, aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aQueryBox(pParent, aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
return ( aQueryBox->Execute() == RET_YES );
}
@@ -840,7 +840,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
do
{
// password dialog
- ScopedVclPtr<SfxPasswordDialog> aDlg(new SfxPasswordDialog(Application::GetDefDialogParent()));
+ ScopedVclPtrInstance< SfxPasswordDialog > aDlg(Application::GetDefDialogParent());
aDlg->SetMinLen( 1 );
// set new title
@@ -868,7 +868,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
if ( !bOK )
{
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(Application::GetDefDialogParent(), IDE_RESSTR(RID_STR_WRONGPASSWORD)));
+ ScopedVclPtrInstance< MessageDialog > aErrorBox(Application::GetDefDialogParent(), IDE_RESSTR(RID_STR_WRONGPASSWORD));
aErrorBox->Execute();
}
}
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index f294df2..655a5ce 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -777,7 +777,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
StoreMacroDescription();
EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(m_pBasicBox->FirstSelected());
- VclPtr<OrganizeDialog> pDlg(new OrganizeDialog( this, 0, aDesc ));
+ VclPtrInstance< OrganizeDialog > pDlg( this, 0, aDesc );
sal_uInt16 nRet = pDlg->Execute();
pDlg.reset();
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 1b46600..4883913 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -687,7 +687,7 @@ IMPL_LINK( LibPage, ButtonHdl, Button *, pButton )
bool const bProtected = xPasswd->isLibraryPasswordProtected( aLibName );
// change password dialog
- VclPtr<SvxPasswordDialog> pDlg(new SvxPasswordDialog( this, true, !bProtected ));
+ VclPtrInstance< SvxPasswordDialog > pDlg( this, true, !bProtected );
pDlg->SetCheckPasswordHdl( LINK( this, LibPage, CheckPasswordHdl ) );
if ( pDlg->Execute() == RET_OK )
@@ -1127,7 +1127,7 @@ void LibPage::Export( void )
return;
}
- ScopedVclPtr<ExportDialog> aNewDlg(new ExportDialog(this));
+ ScopedVclPtrInstance< ExportDialog > aNewDlg(this);
if (aNewDlg->Execute() == RET_OK)
{
try
@@ -1505,7 +1505,7 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
i++;
}
- ScopedVclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(pWin, ObjectMode::Library));
+ ScopedVclPtrInstance< NewObjectDialog > aNewDlg(pWin, ObjectMode::Library);
aNewDlg->SetObjectName(aLibName);
if (aNewDlg->Execute())
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index b929dee..5dad01d 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -825,7 +825,7 @@ void ObjectPage::NewDialog()
{
aDocument.getOrCreateLibrary( E_DIALOGS, aLibName );
- ScopedVclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(this, ObjectMode::Dialog, true));
+ ScopedVclPtrInstance< NewObjectDialog > aNewDlg(this, ObjectMode::Dialog, true);
aNewDlg->SetObjectName( aDocument.createObjectName( E_DIALOGS, aLibName ) );
if (aNewDlg->Execute() != 0)
@@ -983,7 +983,7 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
if ( aModName.isEmpty() )
aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
- ScopedVclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(pWin, ObjectMode::Module, true));
+ ScopedVclPtrInstance< NewObjectDialog > aNewDlg(pWin, ObjectMode::Module, true);
aNewDlg->SetObjectName( aModName );
if (aNewDlg->Execute() != 0)
diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx
index 414ecba..32a8297 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -146,7 +146,7 @@ void ManageLanguageDialog::ClearLanguageBox()
IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl)
{
- ScopedVclPtr<SetDefaultLanguageDialog> aDlg(new SetDefaultLanguageDialog( this, m_xLocalizationMgr ));
+ ScopedVclPtrInstance< SetDefaultLanguageDialog > aDlg( this, m_xLocalizationMgr );
if ( RET_OK == aDlg->Execute() )
{
// add new locales
@@ -164,7 +164,7 @@ IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl)
IMPL_LINK_NOARG(ManageLanguageDialog, DeleteHdl)
{
- ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this, "DeleteLangDialog", "modules/BasicIDE/ui/deletelang.ui"));
+ ScopedVclPtrInstance< MessageDialog > aQBox(this, "DeleteLangDialog", "modules/BasicIDE/ui/deletelang.ui");
if ( aQBox->Execute() == RET_OK )
{
sal_uInt16 i, nCount = m_pLanguageLB->GetSelectEntryCount();
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index de8592c..11be2e5 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -966,7 +966,7 @@ void SbiIoSystem::CloseAll(void)
void SbiIoSystem::ReadCon(OString& rIn)
{
OUString aPromptStr(OStringToOUString(aPrompt, osl_getThreadTextEncoding()));
- ScopedVclPtr<SbiInputDialog> aDlg(new SbiInputDialog(NULL, aPromptStr) );
+ ScopedVclPtrInstance< SbiInputDialog > aDlg(nullptr, aPromptStr);
if( aDlg->Execute() )
{
rIn = OUStringToOString(aDlg->GetInput(), osl_getThreadTextEncoding());
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index bde8c48..77e507d 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -180,7 +180,7 @@ namespace cairocanvas
if( !pOutDev )
return geometry::RealRectangle2D();
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice( *pOutDev ) );
+ ScopedVclPtrInstance< VirtualDevice > pVDev( *pOutDev );
pVDev->SetFont( mpFont->getVCLFont() );
// need metrics for Y offset, the XCanvas always renders
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index d3a897d..406378f 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -725,7 +725,7 @@ namespace oglcanvas
if( mpDevice )
{
- ScopedVclPtr<VirtualDevice> pVDev(new VirtualDevice());
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->EnableOutput(false);
CanvasFont* pFont=dynamic_cast<CanvasFont*>(xLayoutetText->getFont().get());
diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index 8930748..aa28e3b 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -121,7 +121,7 @@ namespace vclcanvas
SolarMutexGuard aGuard;
OutputDevice& rOutDev = mpOutDevProvider->getOutDev();
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice( rOutDev ) );
+ ScopedVclPtrInstance< VirtualDevice > pVDev( rOutDev );
pVDev->SetFont(getVCLFont());
const ::FontMetric& aMetric( pVDev->GetFontMetric() );
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index ea78890..b46746e 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -1026,7 +1026,7 @@ namespace vclcanvas
// cannot do direct XOR, but have to
// prepare the filled polygon within a
// VDev
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice( rOutDev ) );
+ ScopedVclPtrInstance< VirtualDevice > pVDev( rOutDev );
pVDev->SetOutputSizePixel( aPolygonDeviceRect.GetSize() );
// shift output to origin of VDev
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index c3efe77..6cf5342 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -104,7 +104,7 @@ namespace vclcanvas
SolarMutexGuard aGuard;
OutputDevice& rOutDev = mpOutDevProvider->getOutDev();
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice( rOutDev ) );
+ ScopedVclPtrInstance< VirtualDevice > pVDev( rOutDev );
pVDev->SetFont( mpFont->getVCLFont() );
setupLayoutMode( *pVDev.get(), mnTextDirection );
@@ -157,7 +157,7 @@ namespace vclcanvas
OutputDevice& rOutDev = mpOutDevProvider->getOutDev();
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice( rOutDev ) );
+ ScopedVclPtrInstance< VirtualDevice > pVDev( rOutDev );
pVDev->SetFont( mpFont->getVCLFont() );
setupLayoutMode( *pVDev.get(), mnTextDirection );
@@ -237,7 +237,7 @@ namespace vclcanvas
OutputDevice& rOutDev = mpOutDevProvider->getOutDev();
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice( rOutDev ) );
+ ScopedVclPtrInstance< VirtualDevice > pVDev( rOutDev );
pVDev->SetFont( mpFont->getVCLFont() );
// need metrics for Y offset, the XCanvas always renders
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index d3294590c..6f0d2b8 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -205,7 +205,7 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton )
aNumberSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, rnFormatKey ));
aNumberSet.Put( SfxBoolItem( SID_ATTR_NUMBERFORMAT_SOURCE, rUseSourceFormat ));
- ScopedVclPtr<NumberFormatDialog> aDlg(new NumberFormatDialog(m_pWindow, aNumberSet));
+ ScopedVclPtrInstance< NumberFormatDialog > aDlg(m_pWindow, aNumberSet);
if( bPercent )
aDlg->SetText( m_pFT_NumberFormatForPercent->GetText());
if( RET_OK == aDlg->Execute() )
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index e8e7a38..9f60c63 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -143,7 +143,7 @@ Graphic ViewElementListProvider::GetSymbolGraphic( sal_Int32 nStandardSymbol, co
nStandardSymbol %= pSymbolList->GetObjCount();
SdrObject* pObj = pSymbolList->GetObj(nStandardSymbol);
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->SetMapMode(MapMode(MAP_100TH_MM));
SdrModel* pModel = new SdrModel();
pModel->GetItemPool().FreezeIdRanges();
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index a48a2b1..efae2d7 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1277,7 +1277,7 @@ void ChartController::executeDispatch_ChartType()
SolarMutexGuard aSolarGuard;
//prepare and open dialog
- ScopedVclPtr<ChartTypeDialog> aDlg(new ChartTypeDialog( m_pChartWindow, getModel(), m_xCC ));
+ ScopedVclPtrInstance< ChartTypeDialog > aDlg( m_pChartWindow, getModel(), m_xCC );
if( aDlg->Execute() == RET_OK )
{
impl_adaptDataSeriesAutoResize();
@@ -1298,7 +1298,7 @@ void ChartController::executeDispatch_SourceData()
if( xChartDoc.is())
{
SolarMutexGuard aSolarGuard;
- ScopedVclPtr<::chart::DataSourceDialog> aDlg(new ::chart::DataSourceDialog( m_pChartWindow, xChartDoc, m_xCC ));
+ ScopedVclPtrInstance< ::chart::DataSourceDialog > aDlg( m_pChartWindow, xChartDoc, m_xCC );
if( aDlg->Execute() == RET_OK )
{
impl_adaptDataSeriesAutoResize();
diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx
index 8820b7d..2e19c6f 100644
--- a/chart2/source/controller/main/ChartController_EditData.cxx
+++ b/chart2/source/controller/main/ChartController_EditData.cxx
@@ -56,7 +56,7 @@ void ChartController::executeDispatch_EditData()
UndoLiveUpdateGuardWithData aUndoGuard = UndoLiveUpdateGuardWithData(
SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ),
m_xUndoManager );
- ScopedVclPtr<DataEditor> aDataEditorDialog(new DataEditor( pParent, xChartDoc, m_xCC ));
+ ScopedVclPtrInstance< DataEditor > aDataEditorDialog( pParent, xChartDoc, m_xCC );
if (aDataEditorDialog->Execute() == RET_OK)
aDataEditorDialog->ApplyChangesToModel();
aUndoGuard.commit();
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index 62109ee..a3a2b20 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -179,7 +179,7 @@ void ChartController::executeDispatch_InsertTitles()
aDialogInput.readFromModel( getModel() );
SolarMutexGuard aGuard;
- ScopedVclPtr<SchTitleDlg> aDlg(new SchTitleDlg( m_pChartWindow, aDialogInput ));
+ ScopedVclPtrInstance< SchTitleDlg > aDlg( m_pChartWindow, aDialogInput );
if( aDlg->Execute() == RET_OK )
{
// lock controllers till end of block
@@ -232,7 +232,7 @@ void ChartController::executeDispatch_OpenLegendDialog()
{
//prepare and open dialog
SolarMutexGuard aGuard;
- ScopedVclPtr<SchLegendDlg> aDlg(new SchLegendDlg( m_pChartWindow, m_xCC ));
+ ScopedVclPtrInstance< SchLegendDlg > aDlg( m_pChartWindow, m_xCC );
aDlg->init( getModel() );
if( aDlg->Execute() == RET_OK )
{
@@ -292,7 +292,7 @@ void ChartController::executeDispatch_InsertMenu_DataLabels()
NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
SvNumberFormatter* pNumberFormatter = aNumberFormatterWrapper.getSvNumberFormatter();
- ScopedVclPtr<DataLabelsDialog> aDlg(new DataLabelsDialog( m_pChartWindow, aItemSet, pNumberFormatter));
+ ScopedVclPtrInstance< DataLabelsDialog > aDlg( m_pChartWindow, aItemSet, pNumberFormatter);
if( aDlg->Execute() == RET_OK )
{
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 6ed346e..4cc7a17 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -825,7 +825,7 @@ void ChartController::executeDispatch_View3D()
//open dialog
SolarMutexGuard aSolarGuard;
- ScopedVclPtr<View3DDialog> aDlg(new View3DDialog( m_pChartWindow, getModel(), m_pDrawModelWrapper->GetColorList() ));
+ ScopedVclPtrInstance< View3DDialog > aDlg( m_pChartWindow, getModel(), m_pDrawModelWrapper->GetColorList() );
if( aDlg->Execute() == RET_OK )
aUndoGuard.commit();
}
diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx
index 55d04cd..b1354c5 100755
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -76,7 +76,7 @@ const TextCacheItem& TextCache::getText(OUString const & rText, bool bIs3dText)
if(itr != maTextCache.end())
return *itr->second;
- ScopedVclPtr<VirtualDevice> pDevice(new VirtualDevice(*Application::GetDefaultDevice(), 0, 0));
+ ScopedVclPtrInstance< VirtualDevice > pDevice(*Application::GetDefaultDevice(), 0, 0);
vcl::Font aFont;
if(bIs3dText)
aFont = vcl::Font("Brillante St",Size(0,0));
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 1e6fab1..b36a969 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -836,7 +836,7 @@ DummyText::DummyText(const OUString& rText, const tNameSequence& rNames,
{
vcl::Font aFont;
std::for_each(maProperties.begin(), maProperties.end(), FontAttribSetter(aFont));
- ScopedVclPtr<VirtualDevice> pDevice(new VirtualDevice(*Application::GetDefaultDevice(), 0, 0));
+ ScopedVclPtrInstance< VirtualDevice > pDevice(*Application::GetDefaultDevice(), 0, 0);
pDevice->Erase();
Rectangle aRect;
pDevice->SetFont(aFont);
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index 80a6971..8693a96 100644
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -625,7 +625,7 @@ int OpenGLRender::RenderRectangleShape(bool bBorder, bool bFill)
int OpenGLRender::CreateTextTexture(::rtl::OUString const &textValue, vcl::Font aFont, long , awt::Point aPos, awt::Size aSize, long rotation)
{
- ScopedVclPtr<VirtualDevice> pDevice(new VirtualDevice(*Application::GetDefaultDevice(), 0, 0));
+ ScopedVclPtrInstance< VirtualDevice > pDevice(*Application::GetDefaultDevice(), 0, 0);
pDevice->Erase();
Rectangle aRect;
pDevice->SetFont(aFont);
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 0ba1874..5c6da94 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2908,7 +2908,7 @@ namespace cppcanvas
VectorOfOutDevStates aStateStack;
- ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > aVDev;
aVDev->EnableOutput( false );
// Setup VDev for state tracking and mapping
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 92d8005..1c540ce 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2443,7 +2443,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton )
OUString aNewName( stripHotKey( pMenuData->GetName() ) );
OUString aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME );
- VclPtr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
+ VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc );
pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU );
pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_RENAME_MENU ) );
@@ -2486,7 +2486,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton )
OUString aNewName;
OUString aDesc = CUI_RESSTR( RID_SVXSTR_SUBMENU_NAME );
- VclPtr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
+ VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc );
pNameDialog->SetHelpId( HID_SVX_CONFIG_NAME_SUBMENU );
pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_ADD_SUBMENU ) );
@@ -2523,7 +2523,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton )
OUString aNewName( stripHotKey( pEntry->GetName() ) );
OUString aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME );
- VclPtr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
+ VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc );
pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU_ITEM );
pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_RENAME_MENU ) );
@@ -2563,9 +2563,8 @@ IMPL_LINK( SvxMenuConfigPage, NewMenuHdl, Button *, pButton )
{
(void)pButton;
- VclPtr<SvxMainMenuOrganizerDialog> pDialog(
- new SvxMainMenuOrganizerDialog( 0,
- GetSaveInData()->GetEntries(), NULL, true ));
+ VclPtrInstance<SvxMainMenuOrganizerDialog> pDialog( nullptr,
+ GetSaveInData()->GetEntries(), NULL, true );
if ( pDialog->Execute() == RET_OK )
{
@@ -3103,7 +3102,7 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton )
OUString aNewName( stripHotKey( pToolbar->GetName() ) );
OUString aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME );
- VclPtr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
+ VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc );
pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR );
pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_RENAME_TOOLBAR ) );
@@ -3189,7 +3188,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
OUString aNewName( stripHotKey( pEntry->GetName() ) );
OUString aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME );
- VclPtr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
+ VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc );
pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM );
pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_RENAME_TOOLBAR ) );
@@ -4358,7 +4357,7 @@ short SvxToolbarConfigPage::QueryReset()
OUString label = replaceSaveInName( msg, saveInName );
- ScopedVclPtr<QueryBox> qbox(new QueryBox( this, WB_YES_NO, label ));
+ ScopedVclPtrInstance< QueryBox > qbox( this, WB_YES_NO, label );
return qbox->Execute();
}
@@ -4449,7 +4448,7 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton )
OUString aNewURL =
generateCustomURL( GetSaveInData()->GetEntries() );
- VclPtr<SvxNewToolbarDialog> pNameDialog(new SvxNewToolbarDialog( 0, aNewName ));
+ VclPtrInstance< SvxNewToolbarDialog > pNameDialog( nullptr, aNewName );
sal_uInt16 nInsertPos;
for ( sal_uInt16 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i )
@@ -4595,7 +4594,7 @@ void SvxToolbarEntriesListBox::BuildCheckBoxButtonImages( SvLBoxButtonData* pDat
// in all color modes, like high contrast.
const AllSettings& rSettings = Application::GetSettings();
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
Size aSize( 26, 20 );
pVDev->SetOutputSizePixel( aSize );
@@ -5302,7 +5301,7 @@ void SvxIconSelectorDialog::ImportGraphics(
message += newLine;
}
- ScopedVclPtr<SvxIconChangeDialog> aDialog(new SvxIconChangeDialog(this, message));
+ ScopedVclPtrInstance< SvxIconChangeDialog > aDialog(this, message);
aDialog->Execute();
}
}
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 73a451d..739f7f9 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -659,7 +659,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton*
)
)
{
- VclPtr<AssignComponentDialog> pAssignDlg(new AssignComponentDialog( pThis, sEventURL ));
+ VclPtrInstance< AssignComponentDialog > pAssignDlg( pThis, sEventURL );
short ret = pAssignDlg->Execute();
if( ret )
@@ -673,7 +673,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton*
else if( bAssEnabled )
{
// assign pressed
- VclPtr<SvxScriptSelectorDialog> pDlg(new SvxScriptSelectorDialog( pThis, false, pThis->GetFrame() ));
+ VclPtrInstance< SvxScriptSelectorDialog > pDlg( pThis, false, pThis->GetFrame() );
if( pDlg )
{
short ret = pDlg->Execute();
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 83aabf3..dd38b81 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -2054,7 +2054,7 @@ IMPL_LINK( SpellDialog, HandleHyperlink, FixedHyperlink*, pHyperlink )
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(sTitle);
aErrorBox->Execute();
}
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index afbe11a..26612ec 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -144,7 +144,7 @@ IMPL_LINK( AboutDialog, HandleClick, PushButton*, pButton )
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( GetText() );
aErrorBox->Execute();
}
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index d789f86..cc0211a 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1544,7 +1544,7 @@ void SAL_CALL ColorPicker::setTitle( const OUString& sTitle ) throw (RuntimeExce
sal_Int16 SAL_CALL ColorPicker::execute( ) throw (RuntimeException, std::exception)
{
- ScopedVclPtr<ColorPickerDialog> aDlg(new ColorPickerDialog( VCLUnoHelper::GetWindow( mxParent ), mnColor, mnMode ));
+ ScopedVclPtrInstance< ColorPickerDialog > aDlg( VCLUnoHelper::GetWindow( mxParent ), mnColor, mnMode );
sal_Int16 ret = aDlg->Execute();
if( ret )
mnColor = aDlg->GetColor();
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 4bf5a4a..1e497d1 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -615,7 +615,7 @@ IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl)
aStr += pInfo->GetThemeName();
aStr += ")";
- ScopedVclPtr<InfoBox> aBox(new InfoBox( this, aStr ));
+ ScopedVclPtrInstance< InfoBox > aBox( this, aStr );
aBox->Execute();
m_pLbResName->GrabFocus();
bDifferentThemeExists = true;
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 22b8d7c..dc8290d 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -761,7 +761,7 @@ namespace svx
IMPL_LINK_NOARG( HangulHanjaConversionDialog, OnOption )
{
- ScopedVclPtr<HangulHanjaOptionsDialog> aOptDlg( new HangulHanjaOptionsDialog(this) );
+ ScopedVclPtrInstance< HangulHanjaOptionsDialog > aOptDlg(this);
aOptDlg->Execute();
m_aOptionsChangedLink.Call( this );
return 0L;
@@ -1041,7 +1041,7 @@ namespace svx
IMPL_LINK_NOARG(HangulHanjaOptionsDialog, NewDictHdl)
{
OUString aName;
- ScopedVclPtr<HangulHanjaNewDictDialog> aNewDlg( new HangulHanjaNewDictDialog(this) );
+ ScopedVclPtrInstance< HangulHanjaNewDictDialog > aNewDlg(this);
aNewDlg->Execute();
if( aNewDlg->GetName( aName ) )
{
@@ -1077,7 +1077,7 @@ namespace svx
DBG_ASSERT( pEntry, "+HangulHanjaEditDictDialog::EditDictHdl(): call of edit should not be possible with no selection!" );
if( pEntry )
{
- ScopedVclPtr<HangulHanjaEditDictDialog> aEdDlg( new HangulHanjaEditDictDialog(this, m_aDictList, m_pDictsLB->GetSelectEntryPos()) );
+ ScopedVclPtrInstance< HangulHanjaEditDictDialog > aEdDlg(this, m_aDictList, m_pDictsLB->GetSelectEntryPos());
aEdDlg->Execute();
}
return 0L;
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index ddedf2b1a..1e93f86 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -275,7 +275,7 @@ bool SvxHyperlinkNewDocTp::AskApply()
bool bRet = ImplGetURLObject( m_pCbbPath->GetText(), m_pCbbPath->GetBaseURL(), aINetURLObject );
if ( !bRet )
{
- ScopedVclPtr<WarningBox> aWarning(new WarningBox( this, WB_OK, CUI_RESSTR(RID_SVXSTR_HYPDLG_NOVALIDFILENAME) ) );
+ ScopedVclPtrInstance< WarningBox > aWarning( this, WB_OK, CUI_RESSTR(RID_SVXSTR_HYPDLG_NOVALIDFILENAME) );
aWarning->Execute();
}
return bRet;
@@ -325,7 +325,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
if( bOk )
{
- ScopedVclPtr<WarningBox> aWarning(new WarningBox( this, WB_YES_NO, CUI_RESSTR(RID_SVXSTR_HYPERDLG_QUERYOVERWRITE) ));
+ ScopedVclPtrInstance< WarningBox > aWarning( this, WB_YES_NO, CUI_RESSTR(RID_SVXSTR_HYPERDLG_QUERYOVERWRITE) );
bCreate = aWarning->Execute() == BUTTON_YES;
}
}
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 148e9b4..da92474 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -331,7 +331,7 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl)
bool bIsInputEnabled = GetParent()->IsInputEnabled();
if ( bIsInputEnabled )
GetParent()->EnableInput( false );
- ScopedVclPtr<SfxMacroAssignDlg> aDlg(new SfxMacroAssignDlg( this, mxDocumentFrame, *pItemSet ));
+ ScopedVclPtrInstance< SfxMacroAssignDlg > aDlg( this, mxDocumentFrame, *pItemSet );
// add events
SfxMacroTabPage *pMacroPage = static_cast<SfxMacroTabPage*>( aDlg->GetTabPage() );
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 6ec4483..e3bb381 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -443,7 +443,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
if( !xLink.Is() )
return 0;
- ScopedVclPtr<QueryBox> aBox(new QueryBox( this, WB_YES_NO | WB_DEF_YES, Closelinkmsg() ));
+ ScopedVclPtrInstance< QueryBox > aBox( this, WB_YES_NO | WB_DEF_YES, Closelinkmsg() );
if( RET_YES == aBox->Execute() )
{
@@ -474,7 +474,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
}
else
{
- ScopedVclPtr<QueryBox> aBox(new QueryBox( this, WB_YES_NO | WB_DEF_YES, CloselinkmsgMulti() ));
+ ScopedVclPtrInstance< QueryBox > aBox( this, WB_YES_NO | WB_DEF_YES, CloselinkmsgMulti() );
if( RET_YES == aBox->Execute() )
{
diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx
index eade758..1b47dda 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -112,7 +112,7 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG
const int nMismatch = (bToOpenMatch? 0 : 1) + (bToModifyMatch? 0 : 1);
if (nMismatch > 0)
{
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(m_pParent, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch));
+ ScopedVclPtrInstance< MessageDialog > aErrorBox(m_pParent, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch);
aErrorBox->Execute();
Edit* pEdit = !bToOpenMatch ? m_pPasswdToOpenED : m_pPasswdToModifyED;
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index fa89985..2352ec6 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -927,7 +927,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
bValid = false;
OUString aError( m_createErrStr );
aError += m_createDupStr;
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), aError));
+ ScopedVclPtrInstance< MessageDialog > aErrorBox(static_cast<vcl::Window*>(this), aError);
aErrorBox->SetText( m_createErrTitleStr );
aErrorBox->Execute();
xNewDlg->SetObjectName( aNewName );
@@ -1009,7 +1009,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
{
//ISSUE L10N & message from exception?
OUString aError( m_createErrStr );
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), aError));
+ ScopedVclPtrInstance< MessageDialog > aErrorBox(static_cast<vcl::Window*>(this), aError);
aErrorBox->SetText( m_createErrTitleStr );
aErrorBox->Execute();
}
@@ -1085,7 +1085,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
{
//ISSUE L10N & message from exception?
OUString aError( m_renameErrStr );
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), aError));
+ ScopedVclPtrInstance< MessageDialog > aErrorBox(static_cast<vcl::Window*>(this), aError);
aErrorBox->SetText( m_renameErrTitleStr );
aErrorBox->Execute();
}
@@ -1096,7 +1096,7 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry )
Reference< browse::XBrowseNode > node = getBrowseNode( pEntry );
// ISSUE L10N string & can we centre list?
OUString aQuery = m_delQueryStr + getListOfChildren( node, 0 );
- VclPtr<MessageDialog> aQueryBox(new MessageDialog(static_cast<vcl::Window*>(this), aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ VclPtrInstance< MessageDialog > aQueryBox(static_cast<vcl::Window*>(this), aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
aQueryBox->SetText( m_delQueryTitleStr );
if ( aQueryBox->Execute() == RET_NO )
{
@@ -1131,7 +1131,7 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry )
else
{
//ISSUE L10N & message from exception?
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), m_delErrStr));
+ ScopedVclPtrInstance< MessageDialog > aErrorBox(static_cast<vcl::Window*>(this), m_delErrStr);
aErrorBox->SetText( m_delErrTitleStr );
aErrorBox->Execute();
}
diff --git a/cui/source/factory/init.cxx b/cui/source/factory/init.cxx
index 2d179a3..cdf2ed9 100644
--- a/cui/source/factory/init.cxx
+++ b/cui/source/factory/init.cxx
@@ -28,7 +28,7 @@ extern "C"
SAL_DLLPUBLIC_EXPORT bool GetSpecialCharsForEdit(vcl::Window* i_pParent, const vcl::Font& i_rFont, OUString& o_rResult)
{
bool bRet = false;
- VclPtr<SvxCharacterMap> aDlg(new SvxCharacterMap( i_pParent ));
+ VclPtrInstance< SvxCharacterMap > aDlg( i_pParent );
aDlg->DisableFontSelection();
aDlg->SetCharFont(i_rFont);
if ( aDlg->Execute() == RET_OK )
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index 6c01a2e..2a8b515 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -278,7 +278,7 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, DeleteHdl)
SvTreeListEntry* pEntry = pPathBox->FirstSelected();
if ( pEntry )
{
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aQuery(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
if ( aQuery->Execute() == RET_YES )
pPathBox->GetModel()->Remove(pEntry);
}
@@ -414,7 +414,7 @@ void DbRegistrationOptionsPage::insertNewEntry( const OUString& _sName,const OUS
void DbRegistrationOptionsPage::openLinkDialog(const OUString& _sOldName,const OUString& _sOldLocation,SvTreeListEntry* _pEntry)
{
- ScopedVclPtr<ODocumentLinkDialog> aDlg(new ODocumentLinkDialog(this,_pEntry == NULL));
+ ScopedVclPtrInstance< ODocumentLinkDialog > aDlg(this,_pEntry == nullptr);
aDlg->setLink(_sOldName,_sOldLocation);
aDlg->setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) );
diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx
index 355c2a9..5a8a09b 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -130,7 +130,7 @@ namespace svx
{
OUString sMsg = CUI_RES(STR_LINKEDDOC_DOESNOTEXIST);
sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText());
- ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMsg));
+ ScopedVclPtrInstance< MessageDialog > aError(this, sMsg);
aError->Execute();
return 0L;
} // if (!bFileExists)
@@ -139,7 +139,7 @@ namespace svx
{
OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE);
sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText());
- ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMsg));
+ ScopedVclPtrInstance< MessageDialog > aError(this, sMsg);
aError->Execute();
return 0L;
}
@@ -151,7 +151,7 @@ namespace svx
{
OUString sMsg = CUI_RES(STR_NAME_CONFLICT);
sMsg = sMsg.replaceFirst("$file$", sCurrentText);
- ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMsg, VCL_MESSAGE_INFO));
+ ScopedVclPtrInstance< MessageDialog > aError(this, sMsg, VCL_MESSAGE_INFO);
aError->Execute();
m_pName->SetSelection(Selection(0,sCurrentText.getLength()));
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index b9b085b..5afa7cc 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -551,8 +551,8 @@ void ColorConfigWindow_Impl::CreateEntries()
long nCheckBoxLabelOffset = 0;
{
OUString sSampleText("X");
- ScopedVclPtr<CheckBox> aCheckBox(new CheckBox(this));
- ScopedVclPtr<FixedText> aFixedText(new FixedText(this));
+ ScopedVclPtrInstance< CheckBox > aCheckBox(this);
+ ScopedVclPtrInstance< FixedText > aFixedText(this);
aCheckBox->SetText(sSampleText);
aFixedText->SetText(sSampleText);
Size aCheckSize(aCheckBox->CalcMinimumSize(0x7fffffff));
@@ -626,7 +626,7 @@ void ColorConfigWindow_Impl::SetAppearance ()
OSL_ENSURE( vEntries.size() >= sizeof vEntryInfo / sizeof vEntryInfo[0], "wrong number of helpIDs for color listboxes" );
// creating a sample color listbox with the color entries
- ScopedVclPtr<ColorListBox> aSampleColorList(new ColorListBox(this));
+ ScopedVclPtrInstance< ColorListBox > aSampleColorList(this);
{
XColorListRef const xColorTable = XColorList::CreateStdColorList();
for (sal_Int32 i = 0; i != xColorTable->Count(); ++i)
@@ -1203,7 +1203,7 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, PushButton*, pButton )
else
{
DBG_ASSERT(m_pColorSchemeLB->GetEntryCount() > 1, "don't delete the last scheme");
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aQuery(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
aQuery->SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE_TITLE));
if(RET_YES == aQuery->Execute())
{
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 4740036..a22857b3 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -476,7 +476,7 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl)
if ( nLang != nOldLang )
{
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aBox(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
OUString sTxt(aBox->get_primary_text());
sTxt = sTxt.replaceFirst( "%1", pAllDictsLB->GetSelectEntry() );
aBox->set_primary_text(sTxt);
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index d1f41a8..7f8e477 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1342,7 +1342,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
xProp->setPropertyValue(sUserLocaleKey, makeAny(aLangString));
Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
// display info
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_LANGUAGE_RESTART), VCL_MESSAGE_INFO));
+ ScopedVclPtrInstance< MessageDialog > aBox(this, CUI_RES(RID_SVXSTR_LANGUAGE_RESTART), VCL_MESSAGE_INFO);
aBox->Execute();
// tell quickstarter to stop being a veto listener
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index e1e750c..eb402eb 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -697,7 +697,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl)
}
else
{
- ScopedVclPtr<QueryBox> aQuery(new QueryBox( this, WB_YES_NO|WB_DEF_NO, m_sPasswordStoringDeactivateStr ));
+ ScopedVclPtrInstance< QueryBox > aQuery( this, WB_YES_NO|WB_DEF_NO, m_sPasswordStoringDeactivateStr );
sal_uInt16 nRet = aQuery->Execute();
if( RET_YES == nRet )
@@ -794,7 +794,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, ShowPasswordsHdl)
if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->authorizateWithMasterPassword( Reference< task::XInteractionHandler>() ) )
{
- ScopedVclPtr<svx::WebConnectionInfoDialog> aDlg( new svx::WebConnectionInfoDialog(this) );
+ ScopedVclPtrInstance< svx::WebConnectionInfoDialog > aDlg(this);
aDlg->Execute();
}
}
@@ -813,7 +813,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, CertPathPBHdl)
if (nRet == RET_OK && sOrig != mpCertPathDlg->getDirectory())
{
- ScopedVclPtr<MessageDialog> aWarnBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO));
+ ScopedVclPtrInstance< MessageDialog > aWarnBox(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO);
aWarnBox->Execute();
}
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index c661d82c..16a0adf 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -336,7 +336,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl)
(void)eErr;
if ( bRunning )
{
- ScopedVclPtr<MessageDialog> aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO ));
+ ScopedVclPtrInstance< MessageDialog > aWarnBox( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO );
aWarnBox->Execute();
}
}
@@ -381,7 +381,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl)
(void)eErr;
if ( bRunning )
{
- ScopedVclPtr<MessageDialog> aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO ));
+ ScopedVclPtrInstance< MessageDialog > aWarnBox( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO );
aWarnBox->Execute();
}
}
@@ -437,7 +437,7 @@ IMPL_LINK( SvxJavaOptionsPage, DialogClosedHdl, DialogClosedEvent*, pEvt )
IMPL_LINK_NOARG( SvxJavaOptionsPage, ExpertConfigHdl_Impl )
{
- ScopedVclPtr<CuiAboutConfigTabPage> m_pExpertConfigDlg( new CuiAboutConfigTabPage(this) );
+ ScopedVclPtrInstance< CuiAboutConfigTabPage > m_pExpertConfigDlg(this);
m_pExpertConfigDlg->Reset();//initialize and reset function
if( RET_OK == m_pExpertConfigDlg->Execute() )
@@ -630,12 +630,12 @@ void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder )
}
else if ( JFW_E_NOT_RECOGNIZED == eErr )
{
- ScopedVclPtr<MessageDialog> aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_NOT_RECOGNIZED ) ));
+ ScopedVclPtrInstance< MessageDialog > aErrBox( this, CUI_RES( RID_SVXSTR_JRE_NOT_RECOGNIZED ) );
aErrBox->Execute();
}
else if ( JFW_E_FAILED_VERSION == eErr )
{
- ScopedVclPtr<MessageDialog> aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_FAILED_VERSION ) ));
+ ScopedVclPtrInstance< MessageDialog > aErrBox( this, CUI_RES( RID_SVXSTR_JRE_FAILED_VERSION ) );
aErrBox->Execute();
}
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 00f747f..d616bc9 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1610,7 +1610,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn )
pLinguData = new SvxLinguData_Impl;
SvxLinguData_Impl aOldLinguData( *pLinguData );
- ScopedVclPtr<SvxEditModulesDlg> aDlg(new SvxEditModulesDlg( this, *pLinguData ));
+ ScopedVclPtrInstance< SvxEditModulesDlg > aDlg( this, *pLinguData );
if (aDlg->Execute() != RET_OK)
*pLinguData = aOldLinguData;
@@ -1759,7 +1759,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn )
if(aData.HasNumericValue())
{
sal_uInt16 nRID = aData.GetEntryId();
- ScopedVclPtr<OptionsBreakSet> aDlg( new OptionsBreakSet(this, nRID) );
+ ScopedVclPtrInstance< OptionsBreakSet > aDlg(this, nRID);
aDlg->GetNumericFld().SetValue( aData.GetNumericValue() );
if (RET_OK == aDlg->Execute() )
{
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index d5e2034..56396f4 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -253,7 +253,7 @@ IMPL_LINK(ListEntryDialog, EditModifiedHdl, Edit*, pEdit)
void openListDialog(SvxOpenCLTabPage* pTabPage, OpenCLConfig::ImplMatcher& rEntry, const OString& rTag)
{
- ScopedVclPtr<ListEntryDialog> aDlg(new ListEntryDialog(pTabPage, rEntry, rTag));
+ ScopedVclPtrInstance< ListEntryDialog > aDlg(pTabPage, rEntry, rTag);
if (aDlg->Execute() == RET_OK)
rEntry = aDlg->maEntry;
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index e2c90a0..acb290e 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -476,7 +476,7 @@ void SvxPersonalizationTabPage::LoadExtensionThemes()
IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, PushButton*, /*pButton*/ )
{
- ScopedVclPtr<SelectPersonaDialog> aDialog( new SelectPersonaDialog(NULL) );
+ ScopedVclPtrInstance< SelectPersonaDialog > aDialog(nullptr);
while ( aDialog->Execute() == RET_OK )
{
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 0bf92c3..ce91d65 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -731,7 +731,7 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl)
if( nSelEntryPos == REPLACE_BULLETS ||
nSelEntryPos == APPLY_NUMBERING)
{
- ScopedVclPtr<SvxCharacterMap> pMapDlg(new SvxCharacterMap(this));
+ ScopedVclPtrInstance< SvxCharacterMap > pMapDlg(this);
ImpUserData* pUserData = (ImpUserData*)m_pCheckLB->FirstSelected()->GetUserData();
pMapDlg->SetCharFont(*pUserData->pFont);
pMapDlg->SetChar( (*pUserData->pString)[0] );
@@ -748,7 +748,7 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl)
else if( MERGE_SINGLE_LINE_PARA == nSelEntryPos )
{
// dialog for per cent settings
- ScopedVclPtr<OfaAutoFmtPrcntSet> aDlg(new OfaAutoFmtPrcntSet(this));
+ ScopedVclPtrInstance< OfaAutoFmtPrcntSet > aDlg(this);
aDlg->GetPrcntFld().SetValue(nPercent);
if(RET_OK == aDlg->Execute())
{
@@ -2061,7 +2061,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn )
else if (pBtn == m_pDblEndQuotePB)
nMode = DBL_END;
// start character selection dialog
- ScopedVclPtr<SvxCharacterMap> pMap(new SvxCharacterMap( this, true ));
+ ScopedVclPtrInstance< SvxCharacterMap > pMap( this, true );
pMap->SetCharFont( OutputDevice::GetDefaultFont(DEFAULTFONT_LATIN_TEXT,
LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE, 0 ));
pMap->SetText(nMode < SGL_END ? m_sStartQuoteDlg : m_sEndQuoteDlg );
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index abf0352..23c11fa 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -3467,7 +3467,7 @@ void SvxCharTwoLinesPage::Initialize()
void SvxCharTwoLinesPage::SelectCharacter( ListBox* pBox )
{
bool bStart = pBox == m_pStartBracketLB;
- VclPtr<SvxCharacterMap> aDlg(new SvxCharacterMap( this ));
+ VclPtrInstance< SvxCharacterMap > aDlg( this );
aDlg->DisableFontSelection();
if ( aDlg->Execute() == RET_OK )
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 9714288..2bfe57f 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -699,7 +699,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound )
// display original size
const FieldUnit eMetric = GetModuleFieldUnit( GetItemSet() );
- ScopedVclPtr<MetricField> aFld(new MetricField(this, WB_HIDE));
+ ScopedVclPtrInstance< MetricField > aFld(this, WB_HIDE);
SetFieldUnit( *aFld.get(), eMetric );
aFld->SetDecimalDigits( m_pWidthMF->GetDecimalDigits() );
aFld->SetMax( LONG_MAX - 1 );
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index a9c0c5f..228db21 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2095,7 +2095,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, PopupActivateHdl_Impl)
IMPL_LINK_NOARG(SvxNumOptionsTabPage, BulletHdl_Impl)
{
- VclPtr<SvxCharacterMap> pMap(new SvxCharacterMap( this, true ));
+ VclPtrInstance< SvxCharacterMap > pMap( this, true );
sal_uInt16 nMask = 1;
const vcl::Font* pFmtFont = 0;
@@ -2379,7 +2379,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
const Color aBackColor = rStyleSettings.GetFieldColor();
const Color aTextColor = rStyleSettings.GetFieldTextColor();
- ScopedVclPtr<VirtualDevice> pVDev(new VirtualDevice(*this));
+ ScopedVclPtrInstance< VirtualDevice > pVDev(*this);
pVDev->EnableRTL( IsRTLEnabled() );
pVDev->SetMapMode(GetMapMode());
pVDev->SetOutputSize( aSize );
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 36a7c6a..97010d8 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -747,7 +747,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl_Impl)
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
- ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelBitmapDialog","cui/ui/querydeletebitmapdialog.ui" ));
+ ScopedVclPtrInstance< MessageDialog > aQueryBox( GetParentDialog(),"AskDelBitmapDialog","cui/ui/querydeletebitmapdialog.ui" );
if( aQueryBox->Execute() == RET_YES )
{
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index e28adc7a..b8a9842 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -872,7 +872,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickDeleteHdl_Impl)
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
- ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelColorDialog","cui/ui/querydeletecolordialog.ui"));
+ ScopedVclPtrInstance< MessageDialog > aQueryBox( GetParentDialog(),"AskDelColorDialog","cui/ui/querydeletecolordialog.ui");
if( aQueryBox->Execute() == RET_YES )
{
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 4692f06..f00ce1a 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -608,7 +608,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickDeleteHdl_Impl)
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
- ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelGradientDialog","cui/ui/querydeletegradientdialog.ui"));
+ ScopedVclPtrInstance< MessageDialog > aQueryBox( GetParentDialog(),"AskDelGradientDialog","cui/ui/querydeletegradientdialog.ui");
if ( aQueryBox->Execute() == RET_YES )
{
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index a2d40ff..bb9604d 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -645,7 +645,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickDeleteHdl_Impl)
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
- ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelHatchDialog","cui/ui/querydeletehatchdialog.ui"));
+ ScopedVclPtrInstance< MessageDialog > aQueryBox( GetParentDialog(),"AskDelHatchDialog","cui/ui/querydeletehatchdialog.ui");
if( aQueryBox->Execute() == RET_YES )
{
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index f64eddb..4b5b43b 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -360,7 +360,7 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton)
if(!pButton->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ) && pSymbolList)
{
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->SetMapMode(MapMode(MAP_100TH_MM));
boost::scoped_ptr<SdrModel> pModel(new SdrModel);
pModel->GetItemPool().FreezeIdRanges();
@@ -1155,7 +1155,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
}
else if(nSymType >= 0)
{
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->SetMapMode(MapMode(MAP_100TH_MM));
boost::scoped_ptr<SdrModel> pModel(new SdrModel);
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
index c6041a0..b778fd6 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
@@ -406,7 +406,7 @@ namespace dbmm
// check that the backup location isn't the same as the document itself
if ( lcl_equalURLs_nothrow( m_pData->aContext, sBackupLocation, m_pData->xDocumentModel->getURL() ) )
{
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog( const_cast< MacroMigrationDialog* >( this ), MacroMigrationResId( STR_INVALID_BACKUP_LOCATION ) ));
+ ScopedVclPtrInstance< MessageDialog > aErrorBox( const_cast< MacroMigrationDialog* >( this ), MacroMigrationResId( STR_INVALID_BACKUP_LOCATION ) );
aErrorBox->Execute();
rBackupPage.grabLocationFocus();
return false;
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 4c33f61..ff29d54 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -175,7 +175,7 @@ void OApplicationController::deleteTables(const ::std::vector< OUString>& _rList
else
{
OUString sMessage(ModuleRes(STR_MISSING_TABLES_XDROP));
- ScopedVclPtr<MessageDialog> aError(new MessageDialog(getView(), sMessage));
+ ScopedVclPtrInstance< MessageDialog > aError(getView(), sMessage);
aError->Execute();
}
}
@@ -210,7 +210,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
if ( eResult != svtools::QUERYDELETE_ALL )
{
- ScopedVclPtr<svtools::QueryDeleteDlg_Impl> aDlg( new svtools::QueryDeleteDlg_Impl(getView(), *aThisRound) );
+ ScopedVclPtrInstance< svtools::QueryDeleteDlg_Impl > aDlg(getView(), *aThisRound);
if ( !sDialogPosition.isEmpty() )
aDlg->SetWindowState( sDialogPosition );
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index dd2685b..2a844ff 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -111,7 +111,7 @@ void OApplicationController::convertToView(const OUString& _sName)
OUString aDefaultName = ::dbaui::createDefaultName(xMeta,xTables,aName);
DynamicTableOrQueryNameCheck aNameChecker( xConnection, CommandType::TABLE );
- ScopedVclPtr<OSaveAsDlg> aDlg(new OSaveAsDlg( getView(), CommandType::TABLE, getORB(), xConnection, aDefaultName, aNameChecker ) );
+ ScopedVclPtrInstance< OSaveAsDlg > aDlg( getView(), CommandType::TABLE, getORB(), xConnection, aDefaultName, aNameChecker );
if ( aDlg->Execute() == RET_OK )
{
OUString sName = aDlg->getName();
@@ -534,7 +534,7 @@ void OApplicationController::askToReconnect()
bool bClear = true;
if ( !m_pSubComponentManager->empty() )
{
- ScopedVclPtr<MessageDialog> aQry(new MessageDialog(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aQry(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
switch (aQry->Execute())
{
case RET_YES:
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 21f9dad..decc5f2 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1271,7 +1271,7 @@ IMPL_LINK( SbaXDataBrowserController, OnAsyncDisplayError, void*, /* _pNotIntere
{
if ( m_aCurrentError.isValid() )
{
- ScopedVclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox( getBrowserView(), m_aCurrentError ));
+ ScopedVclPtrInstance< OSQLMessageBox > aDlg( getBrowserView(), m_aCurrentError );
aDlg->Execute();
}
return 0L;
@@ -1764,14 +1764,14 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(bool bFilter)
Reference< XConnection> xCon(xFormSet->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY);
if(bFilter)
{
- ScopedVclPtr<DlgFilterCrit> aDlg(new DlgFilterCrit( getBrowserView(), getORB(), xCon, xParser, xSup->getColumns() ) );
+ ScopedVclPtrInstance< DlgFilterCrit > aDlg( getBrowserView(), getORB(), xCon, xParser, xSup->getColumns() );
if ( !aDlg->Execute() )
return; // if so we don't need to update the grid
aDlg->BuildWherePart();
}
else
{
- ScopedVclPtr<DlgOrderCrit> aDlg(new DlgOrderCrit( getBrowserView(),xCon,xParser,xSup->getColumns() ) );
+ ScopedVclPtrInstance< DlgOrderCrit > aDlg( getBrowserView(),xCon,xParser,xSup->getColumns() );
if(!aDlg->Execute())
{
return; // if so we don't need to actualize the grid
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index a1f789d..8a05652 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -792,7 +792,7 @@ void SbaGridControl::SetColWidth(sal_uInt16 nColId)
Any aWidth = xAffectedCol->getPropertyValue(PROPERTY_WIDTH);
sal_Int32 nCurWidth = aWidth.hasValue() ? ::comphelper::getINT32(aWidth) : -1;
- ScopedVclPtr<DlgSize> aDlgColWidth(new DlgSize(this, nCurWidth, false));
+ ScopedVclPtrInstance< DlgSize > aDlgColWidth(this, nCurWidth, false);
if (aDlgColWidth->Execute())
{
sal_Int32 nValue = aDlgColWidth->GetValue();
@@ -821,7 +821,7 @@ void SbaGridControl::SetRowHeight()
Any aHeight = xCols->getPropertyValue(PROPERTY_ROW_HEIGHT);
sal_Int32 nCurHeight = aHeight.hasValue() ? ::comphelper::getINT32(aHeight) : -1;
- ScopedVclPtr<DlgSize> aDlgRowHeight(new DlgSize(this, nCurHeight, true));
+ ScopedVclPtrInstance< DlgSize > aDlgRowHeight(this, nCurHeight, true);
if (aDlgRowHeight->Execute())
{
sal_Int32 nValue = aDlgRowHeight->GetValue();
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx
index 292277e..620f8dd 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -180,7 +180,7 @@ IMPL_LINK_NOARG(OCollectionView, Save_Click)
Reference< XContent> xContent;
if ( xNameContainer->hasByName(sName) )
{
- ScopedVclPtr<QueryBox> aBox(new QueryBox( this, WB_YES_NO, ModuleRes( STR_ALREADYEXISTOVERWRITE ) ) );
+ ScopedVclPtrInstance< QueryBox > aBox( this, WB_YES_NO, ModuleRes( STR_ALREADYEXISTOVERWRITE ) );
if ( aBox->Execute() != RET_YES )
return 0;
}
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 159eeea..d3cff03 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -307,7 +307,7 @@ namespace dbaui
aProfiles.insert(pArray[index]);
// execute the select dialog
- ScopedVclPtr<ODatasourceSelectDialog> aSelector(new ODatasourceSelectDialog(GetParent(), aProfiles));
+ ScopedVclPtrInstance< ODatasourceSelectDialog > aSelector(GetParent(), aProfiles);
OUString sOldProfile=getURLNoPrefix();
if (!sOldProfile.isEmpty())
@@ -477,7 +477,7 @@ namespace dbaui
sQuery = sQuery.replaceFirst("$path$", aTransformer.get(OFileNotation::N_SYSTEM));
m_bUserGrabFocus = false;
- ScopedVclPtr<QueryBox> aQuery(new QueryBox(GetParent(), WB_YES_NO | WB_DEF_YES, sQuery));
+ ScopedVclPtrInstance< QueryBox > aQuery(GetParent(), WB_YES_NO | WB_DEF_YES, sQuery);
sal_Int32 nQueryResult = aQuery->Execute();
m_bUserGrabFocus = true;
@@ -494,7 +494,7 @@ namespace dbaui
sQuery = sQuery.replaceFirst("$name$", aTransformer.get(OFileNotation::N_SYSTEM));
m_bUserGrabFocus = false;
- ScopedVclPtr<QueryBox> aWhatToDo(new QueryBox(GetParent(), WB_RETRY_CANCEL | WB_DEF_RETRY, sQuery));
+ ScopedVclPtrInstance< QueryBox > aWhatToDo(GetParent(), WB_RETRY_CANCEL | WB_DEF_RETRY, sQuery);
nQueryResult = aWhatToDo->Execute();
m_bUserGrabFocus = true;
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index 923925c..7267361 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -308,7 +308,7 @@ namespace dbaui
const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error;
- ScopedVclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ) );
+ ScopedVclPtrInstance< OSQLMessageBox > aMsg( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt );
aMsg->Execute();
return 0L;
}
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index c25df28..d1fcf17 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -563,7 +563,7 @@ using namespace ::com::sun::star;
#endif
const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error;
- ScopedVclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ) );
+ ScopedVclPtrInstance< OSQLMessageBox > aMsg( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt );
aMsg->Execute();
return 0L;
}
@@ -685,7 +685,7 @@ using namespace ::com::sun::star;
}
#endif
sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
- ScopedVclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString() ) );
+ ScopedVclPtrInstance< OSQLMessageBox > aMsg( this, OUString( ModuleRes( nMessage ) ), OUString() );
aMsg->Execute();
return 0L;
}
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index b84ca1e..c126c56 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -102,7 +102,7 @@ IMPL_LINK_NOARG(OPasswordDialog, OKHdl_Impl)
else
{
OUString aErrorMsg( ModuleRes( STR_ERROR_PASSWORDS_NOT_IDENTICAL));
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(this, aErrorMsg));
+ ScopedVclPtrInstance< MessageDialog > aErrorBox(this, aErrorMsg);
aErrorBox->Execute();
m_pEDPassword->SetText( OUString() );
m_pEDPasswordRepeat->SetText( OUString() );
@@ -213,7 +213,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
{
if(pButton == m_pNEWUSER)
{
- ScopedVclPtr<SfxPasswordDialog> aPwdDlg(new SfxPasswordDialog(this));
+ ScopedVclPtrInstance< SfxPasswordDialog > aPwdDlg(this);
aPwdDlg->ShowExtras(SHOWEXTRAS_ALL);
if(aPwdDlg->Execute())
{
@@ -240,7 +240,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
if(xUser.is())
{
OUString sNewPassword,sOldPassword;
- ScopedVclPtr<OPasswordDialog> aDlg(new OPasswordDialog(this,sName));
+ ScopedVclPtrInstance< OPasswordDialog > aDlg(this,sName);
if(aDlg->Execute() == RET_OK)
{
sNewPassword = aDlg->GetNewPassword();
@@ -259,7 +259,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
Reference<XDrop> xDrop(m_xUsers,UNO_QUERY);
if(xDrop.is())
{
- ScopedVclPtr<MessageDialog> aQry(new MessageDialog(this, ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aQry(this, ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
if(aQry->Execute() == RET_YES)
xDrop->dropByName(GetUser());
}
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index b837888..fbeedcf 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -117,7 +117,7 @@ namespace dbaui
// show an error message
OUString sError( ModuleRes( STR_COULD_NOT_LOAD_ODBC_LIB ) );
sError = sError.replaceFirst("#lib#", aEnumeration.getLibraryName());
- ScopedVclPtr<MessageDialog> aDialog(new MessageDialog(this, sError));
+ ScopedVclPtrInstance< MessageDialog > aDialog(this, sError);
aDialog->Execute();
return false;
}
@@ -125,7 +125,7 @@ namespace dbaui
{
aEnumeration.getDatasourceNames(aOdbcDatasources);
// execute the select dialog
- ScopedVclPtr<ODatasourceSelectDialog> aSelector(new ODatasourceSelectDialog(GetParent(), aOdbcDatasources));
+ ScopedVclPtrInstance< ODatasourceSelectDialog > aSelector(GetParent(), aOdbcDatasources);
if (!_sCurr.isEmpty())
aSelector->Select(_sCurr);
if ( RET_OK == aSelector->Execute() )
@@ -242,7 +242,7 @@ namespace dbaui
eImage = OSQLMessageBox::Error;
aMessage = ModuleRes(STR_CONNECTION_NO_SUCCESS);
}
- ScopedVclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, sTitle, aMessage, WB_OK, eImage ) );
+ ScopedVclPtrInstance< OSQLMessageBox > aMsg( this, sTitle, aMessage, WB_OK, eImage );
aMsg->Execute();
}
if ( !bSuccess )
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 210bf45..aa9969c 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -248,7 +248,7 @@ namespace dbaui
{
if (m_pIndexes == pButton)
{
- ScopedVclPtr<ODbaseIndexDialog> aIndexDialog(new ODbaseIndexDialog(this, m_sDsn));
+ ScopedVclPtrInstance< ODbaseIndexDialog > aIndexDialog(this, m_sDsn);
aIndexDialog->Execute();
}
else
@@ -541,7 +541,7 @@ namespace dbaui
#endif
const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error;
- ScopedVclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ) );
+ ScopedVclPtrInstance< OSQLMessageBox > aMsg( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt );
aMsg->Execute();
return 0L;
}
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index 8d4b91c..6ab06bc 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -106,7 +106,7 @@ namespace dbaui
{
OUString sMessage(ModuleRes(STR_DIRECTSQL_CONNECTIONLOST));
- ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMessage));
+ ScopedVclPtrInstance< MessageDialog > aError(this, sMessage);
aError->Execute();
}
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 79546d4..ca17ec5 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -738,7 +738,7 @@ namespace dbaui
if ( aFileDlg.GetCurrentFilter() != pFilter->GetUIName() || !pFilter->GetWildcard().Matches(sPath) )
{
OUString sMessage(ModuleRes(STR_ERR_USE_CONNECT_TO));
- ScopedVclPtr<InfoBox> aError(new InfoBox(this, sMessage));
+ ScopedVclPtrInstance< InfoBox > aError(this, sMessage);
aError->Execute();
m_pRB_ConnectDatabase->Check();
OnSetupModeSelected( m_pRB_ConnectDatabase );
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 68d2a1c..9270dca 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -422,7 +422,7 @@ namespace dbaui
{
OUString sConfirm(ModuleRes(STR_CONFIRM_DROP_INDEX));
sConfirm = sConfirm.replaceFirst("$name$", m_pIndexList->GetEntryText(pSelected));
- ScopedVclPtr<MessageDialog> aConfirm(new MessageDialog(this, sConfirm, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aConfirm(this, sConfirm, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
if (RET_YES != aConfirm->Execute())
return;
}
@@ -630,7 +630,7 @@ namespace dbaui
{
OUString sError(ModuleRes(STR_INDEX_NAME_ALREADY_USED));
sError = sError.replaceFirst("$name$", sNewName);
- ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sError));
+ ScopedVclPtrInstance< MessageDialog > aError(this, sError);
aError->Execute();
updateToolbox();
@@ -691,7 +691,7 @@ namespace dbaui
// need at least one field
if (0 == _rPos->aFields.size())
{
- ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, ModuleRes(STR_NEED_INDEX_FIELDS)));
+ ScopedVclPtrInstance< MessageDialog > aError(this, ModuleRes(STR_NEED_INDEX_FIELDS));
aError->Execute();
m_pFields->GrabFocus();
return false;
@@ -709,7 +709,7 @@ namespace dbaui
// a column is specified twice ... won't work anyway, so prevent this here and now
OUString sMessage(ModuleRes(STR_INDEXDESIGN_DOUBLE_COLUMN_NAME));
sMessage = sMessage.replaceFirst("$name$", aFieldCheck->sFieldName);
- ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMessage));
+ ScopedVclPtrInstance< MessageDialog > aError(this, sMessage);
aError->Execute();
m_pFields->GrabFocus();
return false;
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 3218da1..25123ee 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -712,7 +712,7 @@ void OSQLMessageBox::dispose()
IMPL_LINK( OSQLMessageBox, ButtonClickHdl, Button *, /*pButton*/ )
{
- ScopedVclPtr<OExceptionChainDialog> aDlg(new OExceptionChainDialog( this, m_pImpl->aDisplayInfo ) );
+ ScopedVclPtrInstance< OExceptionChainDialog > aDlg( this, m_pImpl->aDisplayInfo );
aDlg->Execute();
return 0;
}
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 171e237..1e5a4e2 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -326,7 +326,7 @@ namespace dbaui
if (aErrorInfo.isValid())
{
// establishing the connection failed. Show an error window and exit.
- ScopedVclPtr<OSQLMessageBox> aMessageBox(new OSQLMessageBox( GetParentDialog(), aErrorInfo ));
+ ScopedVclPtrInstance< OSQLMessageBox > aMessageBox( GetParentDialog(), aErrorInfo );
aMessageBox->Execute();
m_pTables->Enable(false);
m_pTablesList->Clear();
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 7f7f51a..67d464a 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -754,7 +754,7 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException
OUString aMsg(e.Message);
aMsg += "\n";
aMsg += ModuleRes( STR_QRY_CONTINUE );
- ScopedVclPtr<OSQLWarningBox> aBox(new OSQLWarningBox( NULL, aMsg, WB_YES_NO | WB_DEF_NO ) );
+ ScopedVclPtrInstance< OSQLWarningBox > aBox( nullptr, aMsg, WB_YES_NO | WB_DEF_NO );
if (aBox->Execute() == RET_YES)
m_bDontAskAgain = true;
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index a107c94..1d2316a 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -241,7 +241,7 @@ bool ORowSetImportExport::insertNewRow()
if(!m_bAlreadyAsked)
{
OUString sAskIfContinue = ModuleRes(STR_ERROR_OCCURRED_WHILE_COPYING);
- ScopedVclPtr<OSQLWarningBox> aDlg(new OSQLWarningBox( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES ) );
+ ScopedVclPtrInstance< OSQLWarningBox > aDlg( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES );
if(aDlg->Execute() == RET_YES)
m_bAlreadyAsked = true;
else
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index dcb6c25..905408c 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -852,7 +852,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent,
}
{ // want the dialog to be destroyed before our set
- ScopedVclPtr<SbaSbAttrDlg> aDlg(new SbaSbAttrDlg(_pParent, pFormatDescriptor, _pFormatter, _bHasFormat));
+ ScopedVclPtrInstance< SbaSbAttrDlg > aDlg(_pParent, pFormatDescriptor, _pFormatter, _bHasFormat);
if (RET_OK == aDlg->Execute())
{
// ItemSet->UNO
@@ -997,7 +997,7 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId
Size aDefaultMM = _pBox->PixelToLogic( Size( nDefaultWidth, 0 ), MapMode( MAP_MM ) );
- ScopedVclPtr<DlgSize> aColumnSizeDlg(new DlgSize( _pBox, nColSize, false, aDefaultMM.Width() * 10 ) );
+ ScopedVclPtrInstance< DlgSize > aColumnSizeDlg( _pBox, nColSize, false, aDefaultMM.Width() * 10 );
if ( aColumnSizeDlg->Execute() )
{
sal_Int32 nValue = aColumnSizeDlg->GetValue();
@@ -1286,7 +1286,7 @@ sal_Int32 askForUserAction(vcl::Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _
SolarMutexGuard aGuard;
OUString aMsg = ModuleRes(_nText);
aMsg = aMsg.replaceFirst("%1", _sName);
- ScopedVclPtr<OSQLMessageBox> aAsk(new OSQLMessageBox(_pParent, ModuleRes(_nTitle ), aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query));
+ ScopedVclPtrInstance< OSQLMessageBox > aAsk(_pParent, ModuleRes(_nTitle ), aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query);
if ( _bAll )
{
aAsk->AddButton(ModuleRes(STR_BUTTON_TEXT_ALL), RET_ALL, 0);
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index e9fed42..0540c4a 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -308,7 +308,7 @@ namespace dbaui
bool bReConnect = true;
if ( _bUI )
{
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aQuery(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
bReConnect = ( RET_YES == aQuery->Execute() );
}
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 097c89a..aae1218 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -158,7 +158,7 @@ namespace
}
}
- ScopedVclPtr<OQueryTableConnection> aInfo(new OQueryTableConnection(pTableView, aInfoData));
+ ScopedVclPtrInstance< OQueryTableConnection > aInfo(pTableView, aInfoData);
// Because OQueryTableConnection never takes ownership of the data passed to it, but only remembers the pointer,
// this pointer to a local variable is not critical, as aInfoData and aInfo have the same lifetime
pTableView->NotifyTabConnection( *aInfo.get() );
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 23563fd..e60cebf 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -118,7 +118,7 @@ namespace
{
OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pConnectionData.get());
- ScopedVclPtr<DlgQryJoin> aDlg(new DlgQryJoin(_pView,_pConnectionData,&_pView->GetTabWinMap(),_pView->getDesignView()->getController().getConnection(),_bSelectableTables));
+ ScopedVclPtrInstance< DlgQryJoin > aDlg(_pView,_pConnectionData,&_pView->GetTabWinMap(),_pView->getDesignView()->getController().getConnection(),_bSelectableTables);
bool bOk = aDlg->Execute() == RET_OK;
if( bOk )
{
@@ -208,7 +208,7 @@ namespace
pNewConnData->AppendConnLine(*pIter,sRelatedColumn);
// now add the Conn itself
- ScopedVclPtr<OQueryTableConnection> aNewConn(new OQueryTableConnection(_pView, aNewConnData));
+ ScopedVclPtrInstance< OQueryTableConnection > aNewConn(_pView, aNewConnData);
// referring to the local variable is not important, as NotifyQueryTabConn creates a new copy
// to add me (if not existent)
_pView->NotifyTabConnection(*aNewConn.get(), false);
@@ -621,7 +621,7 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ
pNewConnectionData->AppendConnLine( aSourceFieldName,aDestFieldName );
- ScopedVclPtr<OQueryTableConnection> aNewConnection(new OQueryTableConnection(this, aNewConnectionData));
+ ScopedVclPtrInstance< OQueryTableConnection > aNewConnection(this, aNewConnectionData);
NotifyTabConnection(*aNewConnection.get());
// As usual with NotifyTabConnection, using a local variable is fine because a copy is made
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 61d23d9..9a5406e 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -987,7 +987,7 @@ void OQueryController::impl_initialize()
OUString aTitle( ModuleRes( STR_QUERYDESIGN_NO_VIEW_SUPPORT ) );
OUString aMessage( ModuleRes( STR_QUERYDESIGN_NO_VIEW_ASK ) );
ODataView* pWindow = getView();
- ScopedVclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox( pWindow, aTitle, aMessage, WB_YES_NO | WB_DEF_YES, OSQLMessageBox::Query ));
+ ScopedVclPtrInstance< OSQLMessageBox > aDlg( pWindow, aTitle, aMessage, WB_YES_NO | WB_DEF_YES, OSQLMessageBox::Query );
bClose = aDlg->Execute() == RET_NO;
}
if ( bClose )
@@ -1802,7 +1802,7 @@ short OQueryController::saveModified()
)
{
OUString sMessageText( lcl_getObjectResourceString( STR_QUERY_SAVEMODIFIED, m_nCommandType ) );
- ScopedVclPtr<QueryBox> aQry(new QueryBox( getView(), WB_YES_NO_CANCEL | WB_DEF_YES, sMessageText ) );
+ ScopedVclPtrInstance< QueryBox > aQry( getView(), WB_YES_NO_CANCEL | WB_DEF_YES, sMessageText );
nRet = aQry->Execute();
if ( ( nRet == RET_YES )
@@ -1914,7 +1914,7 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings
if ( !i_bForceCurrentControllerSettings && !editingView() )
{
OUString aTitle(ModuleRes(STR_SVT_SQL_SYNTAX_ERROR));
- ScopedVclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox(getView(),aTitle,aErrorMsg));
+ ScopedVclPtrInstance< OSQLMessageBox > aDlg(getView(),aTitle,aErrorMsg);
aDlg->Execute();
}
bError = true;
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index f9a9dcf..c1aa00d 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -205,7 +205,7 @@ void ORelationController::impl_initialize()
{
OUString sTitle(ModuleRes(STR_RELATIONDESIGN));
sTitle = sTitle.copy(3);
- ScopedVclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox(NULL,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE)));
+ ScopedVclPtrInstance< OSQLMessageBox > aDlg(nullptr,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE));
aDlg->Execute();
}
disconnect();
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index ddebbd8..bec4a27 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -223,7 +223,7 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
void ORelationTableView::ConnDoubleClicked( OTableConnection* pConnection )
{
- ScopedVclPtr<ORelationDialog> aRelDlg(new ORelationDialog( this, pConnection->GetData() ));
+ ScopedVclPtrInstance< ORelationDialog > aRelDlg( this, pConnection->GetData() );
switch (aRelDlg->Execute())
{
case RET_OK:
@@ -251,7 +251,7 @@ void ORelationTableView::AddNewRelation()
{
TTableConnectionData::value_type pNewConnData( new ORelationTableConnectionData() );
- ScopedVclPtr<ORelationDialog> aRelDlg(new ORelationDialog(this, pNewConnData, true));
+ ScopedVclPtrInstance< ORelationDialog > aRelDlg(this, pNewConnData, true);
bool bSuccess = (aRelDlg->Execute() == RET_OK);
if (bSuccess)
@@ -326,7 +326,7 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin
void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin )
{
- ScopedVclPtr<OSQLWarningBox> aDlg(new OSQLWarningBox( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES ));
+ ScopedVclPtrInstance< OSQLWarningBox > aDlg( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES );
if ( m_bInRemove || aDlg->Execute() == RET_YES )
{
m_pView->getController().ClearUndoManager();
@@ -344,7 +344,7 @@ void ORelationTableView::lookForUiActivities()
{
OUString sTitle(ModuleRes(STR_RELATIONDESIGN));
sTitle = sTitle.copy(3);
- ScopedVclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox(this,ModuleRes(STR_QUERY_REL_EDIT_RELATION),OUString(),0));
+ ScopedVclPtrInstance< OSQLMessageBox > aDlg(this,ModuleRes(STR_QUERY_REL_EDIT_RELATION),OUString(),0);
aDlg->SetText(sTitle);
aDlg->RemoveButton(aDlg->GetButtonId(0));
aDlg->AddButton( ModuleRes(STR_QUERY_REL_EDIT), RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
@@ -364,7 +364,7 @@ void ORelationTableView::lookForUiActivities()
}
if(m_pCurrentlyTabConnData)
{
- ScopedVclPtr<ORelationDialog> aRelDlg(new ORelationDialog( this, m_pCurrentlyTabConnData ) );
+ ScopedVclPtrInstance< ORelationDialog > aRelDlg( this, m_pCurrentlyTabConnData );
if (aRelDlg->Execute() == RET_OK)
{
// already updated by the dialog
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 6b1225a..10a6b16 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -318,7 +318,7 @@ bool OTableController::doSaveDoc(bool _bSaveAs)
}
DynamicTableOrQueryNameCheck aNameChecker( getConnection(), CommandType::TABLE );
- ScopedVclPtr<OSaveAsDlg> aDlg(new OSaveAsDlg( getView(), CommandType::TABLE, getORB(), getConnection(), aDefaultName, aNameChecker ) );
+ ScopedVclPtrInstance< OSaveAsDlg > aDlg( getView(), CommandType::TABLE, getORB(), getConnection(), aDefaultName, aNameChecker );
if ( aDlg->Execute() != RET_OK )
return false;
@@ -415,7 +415,7 @@ bool OTableController::doSaveDoc(bool _bSaveAs)
{
OUString sText( ModuleRes( STR_NAME_ALREADY_EXISTS ) );
sText = sText.replaceFirst( "#" , m_sName);
- ScopedVclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox( getView(), OUString( ModuleRes( STR_ERROR_DURING_CREATION ) ), sText, WB_OK, OSQLMessageBox::Error ) );
+ ScopedVclPtrInstance< OSQLMessageBox > aDlg( getView(), OUString( ModuleRes( STR_ERROR_DURING_CREATION ) ), sText, WB_OK, OSQLMessageBox::Error );
aDlg->Execute();
bError = true;
@@ -447,7 +447,7 @@ void OTableController::doEditIndexes()
// table needs to be saved before editing indexes
if (m_bNew || isModified())
{
- ScopedVclPtr<MessageDialog> aAsk(new MessageDialog(getView(), ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aAsk(getView(), ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
if (RET_YES != aAsk->Execute())
return;
@@ -490,7 +490,7 @@ void OTableController::doEditIndexes()
if (!xIndexes.is())
return;
- ScopedVclPtr<DbaIndexDialog> aDialog(new DbaIndexDialog(getView(), aFieldNames, xIndexes, getConnection(), getORB(), isConnected() && getConnection()->getMetaData().is() ? getConnection()->getMetaData()->getMaxColumnsInIndex() : 0));
+ ScopedVclPtrInstance< DbaIndexDialog > aDialog(getView(), aFieldNames, xIndexes, getConnection(), getORB(), isConnected() && getConnection()->getMetaData().is() ? getConnection()->getMetaData()->getMaxColumnsInIndex() : 0);
if (RET_OK != aDialog->Execute())
return;
@@ -957,7 +957,7 @@ bool OTableController::checkColumns(bool _bNew)
{
OUString sTitle(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY_HEAD));
OUString sMsg(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY));
- ScopedVclPtr<OSQLMessageBox> aBox(new OSQLMessageBox(getView(), sTitle,sMsg, WB_YES_NO_CANCEL | WB_DEF_YES));
+ ScopedVclPtrInstance< OSQLMessageBox > aBox(getView(), sTitle,sMsg, WB_YES_NO_CANCEL | WB_DEF_YES);
switch ( aBox->Execute() )
{
@@ -1086,7 +1086,7 @@ void OTableController::alterColumns()
aMessage = aMessage.replaceFirst( "$column$", pField->GetName() );
SQLExceptionInfo aError( ::cppu::getCaughtException() );
- ScopedVclPtr<OSQLWarningBox> aMsg(new OSQLWarningBox( getView(), aMessage, WB_YES_NO | WB_DEF_YES , &aError ) );
+ ScopedVclPtrInstance< OSQLWarningBox > aMsg( getView(), aMessage, WB_YES_NO | WB_DEF_YES , &aError );
bNotOk = aMsg->Execute() == RET_YES;
}
else
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list