[Libreoffice-commits] core.git: Branch 'feature/vclptr' - 9 commits - avmedia/source basctl/source basic/source canvas/source chart2/source cppcanvas/qa cppcanvas/source cui/source dbaccess/source desktop/source drawinglayer/source editeng/source extensions/source filter/source forms/source fpicker/source framework/source include/vcl 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 vcl/generic vcl/qa vcl/source vcl/workben writerperfect/source xmlsecurity/source

Michael Meeks michael.meeks at collabora.com
Fri Apr 10 05:35:30 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/inputbox.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_Insert.cxx          |   26 ++--
 chart2/source/controller/main/ChartController_Properties.cxx      |    9 +
 chart2/source/view/main/3DChartObjects.cxx                        |    2 
 chart2/source/view/main/DummyXShape.cxx                           |    2 
 chart2/source/view/main/OpenGLRender.cxx                          |    2 
 cppcanvas/qa/unit/test.cxx                                        |    2 
 cppcanvas/source/mtfrenderer/implrenderer.cxx                     |    2 
 cppcanvas/source/mtfrenderer/transparencygroupaction.cxx          |    4 
 cui/source/customize/cfg.cxx                                      |   25 ++--
 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                                   |    2 
 cui/source/dialogs/hltpbase.cxx                                   |    2 
 cui/source/dialogs/linkdlg.cxx                                    |    4 
 cui/source/dialogs/passwdomdlg.cxx                                |    6 -
 cui/source/dialogs/scriptdlg.cxx                                  |   13 +-
 cui/source/factory/init.cxx                                       |    2 
 cui/source/options/dbregister.cxx                                 |    4 
 cui/source/options/doclinkdialog.cxx                              |    6 -
 cui/source/options/optchart.cxx                                   |    4 
 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                                   |    8 -
 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                                  |   15 +-
 cui/source/tabpages/tpcolor.cxx                                   |   22 ++--
 cui/source/tabpages/tpgradnt.cxx                                  |   16 +-
 cui/source/tabpages/tphatch.cxx                                   |   16 +-
 cui/source/tabpages/tpline.cxx                                    |    4 
 cui/source/tabpages/tplnedef.cxx                                  |   27 ++---
 cui/source/tabpages/tplneend.cxx                                  |   25 ++--
 dbaccess/source/ext/macromigration/macromigrationdialog.cxx       |    2 
 dbaccess/source/ui/app/AppControllerDnD.cxx                       |    9 -
 dbaccess/source/ui/app/AppControllerGen.cxx                       |    4 
 dbaccess/source/ui/browser/brwctrlr.cxx                           |   12 +-
 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                            |   12 +-
 dbaccess/source/ui/dlg/sqlmessage.cxx                             |    2 
 dbaccess/source/ui/dlg/tablespage.cxx                             |    2 
 dbaccess/source/ui/misc/DExport.cxx                               |    8 -
 dbaccess/source/ui/misc/RowSetDrop.cxx                            |    2 
 dbaccess/source/ui/misc/UITools.cxx                               |   11 +-
 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                |   14 +-
 dbaccess/source/ui/relationdesign/RelationController.cxx          |    6 -
 dbaccess/source/ui/relationdesign/RelationTableView.cxx           |   10 -
 dbaccess/source/ui/tabledesign/TableController.cxx                |   30 ++---
 dbaccess/source/ui/uno/dbinteraction.cxx                          |    6 -
 desktop/source/app/app.cxx                                        |    4 
 desktop/source/app/lockfile2.cxx                                  |    4 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx                  |   21 +--
 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx        |    8 -
 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              |   12 +-
 extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx      |    4 
 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                         |    4 
 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 -
 framework/source/services/autorecovery.cxx                        |    6 -
 include/vcl/vclptr.hxx                                            |   11 +-
 lotuswordpro/source/filter/lwppagelayout.cxx                      |    2 
 reportdesign/source/ui/misc/UITools.cxx                           |    7 -
 reportdesign/source/ui/report/ReportController.cxx                |   13 +-
 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/oox/workbookhelper.cxx                           |    4 
 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/condformat/condformatmgr.cxx                         |    8 -
 sc/source/ui/dbgui/dbnamdlg.cxx                                   |    2 
 sc/source/ui/dbgui/pvfundlg.cxx                                   |    2 
 sc/source/ui/docshell/arealink.cxx                                |    4 
 sc/source/ui/docshell/dbdocfun.cxx                                |   16 +-
 sc/source/ui/docshell/dbdocimp.cxx                                |    2 
 sc/source/ui/docshell/docfunc.cxx                                 |    4 
 sc/source/ui/docshell/docsh.cxx                                   |   20 +--
 sc/source/ui/docshell/docsh3.cxx                                  |   10 -
 sc/source/ui/docshell/docsh4.cxx                                  |   50 +++++----
 sc/source/ui/docshell/docsh5.cxx                                  |   14 +-
 sc/source/ui/docshell/docsh6.cxx                                  |    2 
 sc/source/ui/docshell/documentlinkmgr.cxx                         |    2 
 sc/source/ui/docshell/externalrefmgr.cxx                          |    4 
 sc/source/ui/docshell/impex.cxx                                   |    6 -
 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/scuiautofmt.cxx                             |   20 +--
 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/confuno.cxx                                   |    2 
 sc/source/ui/unoobj/styleuno.cxx                                  |    8 -
 sc/source/ui/view/cellsh1.cxx                                     |   10 -
 sc/source/ui/view/cellsh2.cxx                                     |    2 
 sc/source/ui/view/cellsh3.cxx                                     |    4 
 sc/source/ui/view/dbfunc.cxx                                      |    4 
 sc/source/ui/view/spelleng.cxx                                    |    4 
 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/viewfun2.cxx                                    |    8 -
 sc/source/ui/view/viewfun3.cxx                                    |    6 -
 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                                  |    6 -
 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/LayerTabBar.cxx                                  |    4 
 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/func/fulinend.cxx                                    |    4 
 sd/source/ui/func/fupage.cxx                                      |    4 
 sd/source/ui/slideshow/showwin.cxx                                |    2 
 sd/source/ui/slidesorter/controller/SlsClipboard.cxx              |    2 
 sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx    |    6 -
 sd/source/ui/view/DocumentRenderer.cxx                            |    4 
 sd/source/ui/view/Outliner.cxx                                    |   14 +-
 sd/source/ui/view/ViewShellBase.cxx                               |    4 
 sd/source/ui/view/drviews2.cxx                                    |   10 -
 sd/source/ui/view/drviews6.cxx                                    |    2 
 sd/source/ui/view/drviews9.cxx                                    |    2 
 sd/source/ui/view/drviewsi.cxx                                    |    4 
 sfx2/source/appl/appopen.cxx                                      |    6 -
 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/openuriexternally.cxx                            |    4 
 sfx2/source/appl/sfxhelp.cxx                                      |    4 
 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                               |    6 -
 sfx2/source/dialog/templdlg.cxx                                   |   10 -
 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                                     |    6 -
 sfx2/source/doc/objcont.cxx                                       |    4 
 sfx2/source/doc/objserv.cxx                                       |   14 +-
 sfx2/source/doc/objstor.cxx                                       |    2 
 sfx2/source/doc/templatedlg.cxx                                   |   22 ++--
 sfx2/source/view/viewfrm.cxx                                      |   12 +-
 sfx2/source/view/viewprn.cxx                                      |    6 -
 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 -
 starmath/source/unomodel.cxx                                      |    2 
 svtools/source/contnr/fileview.cxx                                |    2 
 svtools/source/graphic/grfmgr2.cxx                                |    2 
 svtools/source/graphic/provider.cxx                               |    2 
 svtools/source/java/javainteractionhandler.cxx                    |   14 +-
 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                                    |   15 +-
 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                                      |   54 +++++-----
 svx/source/form/fmshell.cxx                                       |    5 
 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/grafctrl.cxx                                  |    4 
 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/recoveryui.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/core/view/viewsh.cxx                                    |    4 
 sw/source/ui/config/mailconfigpage.cxx                            |    2 
 sw/source/ui/config/optcomp.cxx                                   |    4 
 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                                |   18 +--
 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                                    |    6 -
 sw/source/ui/envelp/labprt.cxx                                    |    2 
 sw/source/ui/fmtui/tmpdlg.cxx                                     |    2 
 sw/source/ui/frmdlg/cption.cxx                                    |    6 -
 sw/source/ui/index/cnttab.cxx                                     |   14 +-
 sw/source/ui/index/swuiidxmrk.cxx                                 |    8 -
 sw/source/ui/misc/glosbib.cxx                                     |    2 
 sw/source/ui/misc/glossary.cxx                                    |   10 -
 sw/source/ui/misc/num.cxx                                         |    2 
 sw/source/ui/misc/outline.cxx                                     |    4 
 sw/source/ui/table/tautofmt.cxx                                   |   17 +--
 sw/source/uibase/app/docsh2.cxx                                   |    4 
 sw/source/uibase/app/docst.cxx                                    |    3 
 sw/source/uibase/dochdl/swdtflvr.cxx                              |    4 
 sw/source/uibase/lingu/olmenu.cxx                                 |    2 
 sw/source/uibase/shells/grfsh.cxx                                 |    2 
 sw/source/uibase/shells/tabsh.cxx                                 |    4 
 sw/source/uibase/shells/textsh1.cxx                               |    4 
 sw/source/uibase/uiview/view2.cxx                                 |   20 +--
 sw/source/uibase/uiview/viewdraw.cxx                              |    2 
 sw/source/uibase/uiview/viewling.cxx                              |    2 
 sw/source/uibase/uiview/viewprt.cxx                               |    6 -
 sw/source/uibase/uno/SwXDocumentSettings.cxx                      |    2 
 sw/source/uibase/utlui/gloslst.cxx                                |    2 
 uui/source/iahndl.cxx                                             |   10 -
 uui/source/masterpasscrtdlg.cxx                                   |    2 
 uui/source/masterpassworddlg.cxx                                  |    2 
 uui/source/nameclashdlg.cxx                                       |    2 
 uui/source/passworddlg.cxx                                        |    4 
 vcl/generic/print/genprnpsp.cxx                                   |    2 
 vcl/generic/print/prtsetup.cxx                                    |    2 
 vcl/qa/cppunit/lifecycle.cxx                                      |   43 +++----
 vcl/qa/cppunit/outdev.cxx                                         |    2 
 vcl/source/app/dbggui.cxx                                         |    4 
 vcl/source/app/stdtext.cxx                                        |    2 
 vcl/source/app/svdata.cxx                                         |    2 
 vcl/source/control/edit.cxx                                       |    4 
 vcl/source/filter/graphicfilter.cxx                               |    2 
 vcl/source/filter/sgfbram.cxx                                     |    2 
 vcl/source/filter/sgvmain.cxx                                     |    2 
 vcl/source/filter/sgvtext.cxx                                     |    2 
 vcl/source/filter/wmf/winmtf.cxx                                  |   11 --
 vcl/source/gdi/bitmapex.cxx                                       |    2 
 vcl/source/gdi/cvtsvm.cxx                                         |    6 -
 vcl/source/gdi/gdimetafiletools.cxx                               |    2 
 vcl/source/gdi/gdimtf.cxx                                         |   14 +-
 vcl/source/gdi/impgraph.cxx                                       |    2 
 vcl/source/gdi/impvect.cxx                                        |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                                 |    2 
 vcl/source/gdi/pdfwriter_impl2.cxx                                |    2 
 vcl/source/gdi/print2.cxx                                         |    2 
 vcl/source/gdi/print3.cxx                                         |    4 
 vcl/source/outdev/bitmap.cxx                                      |    2 
 vcl/source/outdev/outdev.cxx                                      |    1 
 vcl/source/outdev/text.cxx                                        |    4 
 vcl/source/outdev/transparent.cxx                                 |    4 
 vcl/source/outdev/wallpaper.cxx                                   |    2 
 vcl/source/uipreviewer/previewer.cxx                              |    3 
 vcl/source/window/builder.cxx                                     |    2 
 vcl/source/window/dialog.cxx                                      |    2 
 vcl/source/window/toolbox.cxx                                     |    3 
 vcl/source/window/window.cxx                                      |    1 
 vcl/workben/svdem.cxx                                             |    2 
 vcl/workben/svpclient.cxx                                         |    2 
 vcl/workben/svptest.cxx                                           |    2 
 writerperfect/source/writer/WordPerfectImportFilter.cxx           |    4 
 xmlsecurity/source/component/documentdigitalsignatures.cxx        |   13 +-
 xmlsecurity/source/dialogs/certificatechooser.cxx                 |    2 
 xmlsecurity/source/dialogs/certificateviewer.cxx                  |    5 
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx            |    6 -
 xmlsecurity/source/dialogs/macrosecurity.cxx                      |    2 
 372 files changed, 971 insertions(+), 966 deletions(-)

New commits:
commit 663d673a07d76607679525b376cec400857dbc8e
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Apr 1 13:36:01 2015 +0100

    Remove erroneous disposeAndClear.
    
    Change-Id: Ibc091cefab7fb0b628db0896af077a03fcda4094

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index b434061..d2e330b 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1615,6 +1615,9 @@ void ToolBox::dispose()
 
 ImplToolItem* ToolBox::ImplGetItem( sal_uInt16 nItemId ) const
 {
+    if (!mpData)
+        return NULL;
+
     std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
     while ( it != mpData->m_aItems.end() )
     {
commit fa705935937b77e1f8b3859b848a2faccf5d88af
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Apr 1 10:51:07 2015 +0100

    missing nullptr.
    
    Change-Id: Iea2124d0b485e051df1136f63ba4113b2dbc6f84

diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx
index b60e592..8d484dd 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx
@@ -303,7 +303,7 @@ throw (RuntimeException, std::exception)
         int unsuccessfulAttempts = 0;
         while (true)
         {
-            ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg(0);
+            ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg(nullptr);
             aPasswdDlg->SetMinLen(0);
             if (!aPasswdDlg->Execute())
                 return com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
commit 4ff758fea152d6de492d472fba1f889592a3f696
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Apr 1 09:27:07 2015 +0100

    Manual cleanup of misc. issues.
    
    Change-Id: Ib0b9b17010f7c1b0814b48f6fb0144e5296418df

diff --git a/cppcanvas/qa/unit/test.cxx b/cppcanvas/qa/unit/test.cxx
index fa7b21e..6b909e0 100644
--- a/cppcanvas/qa/unit/test.cxx
+++ b/cppcanvas/qa/unit/test.cxx
@@ -43,7 +43,7 @@ public:
 void CanvasTest::testComposite()
 {
 #ifdef LINUX
-    VclPtrInstance<WorkWindow> pWin( nullptr );
+    VclPtrInstance<WorkWindow> pWin( nullptr, WB_STDWORK );
 
     uno::Reference<rendering::XCanvas> xCanvas = pWin->GetCanvas ();
     if( !xCanvas.is() )
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 8de41a4..05c5b55 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2563,8 +2563,8 @@ IMPL_LINK( SvxMenuConfigPage, NewMenuHdl, Button *, pButton )
 {
     (void)pButton;
 
-    VclPtrInstance<SvxMainMenuOrganizerDialog> pDialog( nullptr,
-            GetSaveInData()->GetEntries(), NULL, true );
+    VclPtrInstance<SvxMainMenuOrganizerDialog> pDialog(
+        nullptr, GetSaveInData()->GetEntries(), nullptr, true );
 
     if ( pDialog->Execute() == RET_OK )
     {
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index e5dd36a..b44242d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -606,7 +606,7 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
 #ifndef IOS
     InitSvpForLibreOfficeKit();
 
-    ScopedVclPtrInstance< VirtualDevice > pDevice(0, Size(1, 1), (sal_uInt16)32) ;
+    ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), (sal_uInt16)32) ;
     boost::shared_array< sal_uInt8 > aBuffer( pBuffer, NoDelete< sal_uInt8 >() );
     pDevice->SetOutputSizePixelScaleOffsetAndBuffer(
                 Size(nCanvasWidth, nCanvasHeight), Fraction(1.0), Point(),
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 5ead4fc..5973750 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -4206,7 +4206,7 @@ void AutoRecovery::impl_showFullDiscError()
         sBackupPath = sBackupURL;
 
     ScopedVclPtrInstance<ErrorBox> dlgError(
-        0, WB_OK,
+        nullptr, WB_OK,
         sMsg.replaceAll("%PATH", sBackupPath));
     dlgError->SetButtonText(dlgError->GetButtonId(0), sBtn);
     dlgError->Execute();
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 7ba2540..10a51a0 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2480,9 +2480,10 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
         }
 
         {   // want the dialog to be destroyed before our set
-            ScopedVclPtr<ORptPageDialog> aDlg(getView(), pDescriptor.get(),_xSection.is()
-                ? OUString("BackgroundDialog")
-                : OUString("PageDialog"));
+            ScopedVclPtrInstance<ORptPageDialog> aDlg(
+                getView(), pDescriptor.get(),_xSection.is()
+                           ? OUString("BackgroundDialog")
+                           : OUString("PageDialog"));
             if (RET_OK == aDlg->Execute())
             {
 
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index da874ef..98846c9 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -217,7 +217,7 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, AddBtnHdl)
     sal_uInt16 nId = 1;
     ScModule* pScMod = SC_MOD();
     pScMod->SetRefDialog( nId, true );
-    VclPtrInstance<ScCondFormatDlg> pDlg(this, mpDoc, NULL, ScRangeList(),
+    VclPtrInstance<ScCondFormatDlg> pDlg(this, mpDoc, nullptr, ScRangeList(),
                                          maPos, condformat::dialog::CONDITION);
     Show(false, 0);
     if(pDlg->Execute() == RET_OK)
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 714919b..69d725a 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -924,7 +924,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
                             bool bContinue = true;
                             if ( HasName() )
                             {
-                                ScopedVclPtrInstance<QueryBox> aBox(new QueryBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ),
+                                ScopedVclPtrInstance<QueryBox> aBox(
+                                    GetActiveDialogParent(),
+                                    WinBits( WB_YES_NO | WB_DEF_YES ),
                                     ScGlobal::GetRscString( STR_DOC_WILLBESAVED ) );
                                 if ( aBox->Execute() == RET_NO )
                                 {
@@ -1021,7 +1023,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
                                     }
                                     else
                                     {
-                                        ScopedVclPtrInstance<WarningBox> aBox(new WarningBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ),
+                                        ScopedVclPtrInstance<WarningBox> aBox(
+                                            GetActiveDialogParent(),
+                                            WinBits( WB_YES_NO | WB_DEF_YES ),
                                             ScGlobal::GetRscString( STR_DOC_DISABLESHARED ) );
                                         if ( aBox->Execute() == RET_YES )
                                         {
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 7dfde4e..ce5ab7a 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1110,9 +1110,7 @@ bool Outliner::ShowWrapArroundDialog (void)
         // Pop up question box that asks the user whether to wrap around.
         // The dialog is made modal with respect to the whole application.
         ScopedVclPtrInstance<QueryBox> aQuestionBox (
-            NULL,
-            WB_YES_NO | WB_DEF_YES,
-            SD_RESSTR(nStringId));
+            nullptr, WB_YES_NO | WB_DEF_YES, SD_RESSTR(nStringId));
         aQuestionBox->SetImage (QueryBox::GetStandardImage());
         sal_uInt16 nBoxResult = ShowModalMessageBox(*aQuestionBox.get());
         bDoWrapArround = (nBoxResult == RET_YES);
@@ -1157,8 +1155,8 @@ void Outliner::PrepareSpellCheck (void)
     {
         mbError = true;
         mbEndOfSearch = true;
-        ScopedVclPtrInstance<MessageDialog> aErrorBox (nullptr
-                                                       SD_RESSTR(STR_NOLANGUAGE));
+        ScopedVclPtrInstance<MessageDialog> aErrorBox (
+            nullptr, SD_RESSTR(STR_NOLANGUAGE));
         ShowModalMessageBox (*aErrorBox.get());
     }
     else if (eState != EE_SPELL_OK)
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 69514c7..c471415 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -269,8 +269,9 @@ bool FmFormShell::PrepareClose(bool bUI)
 
                     if ( bModified && bUI )
                     {
-                        ScopedVclPtr<MessageDialog> aQry(nullptr, "SaveModifiedDialog",
-                                                         "svx/ui/savemodifieddialog.ui");
+                        ScopedVclPtrInstance<MessageDialog> aQry(
+                            nullptr, "SaveModifiedDialog",
+                            "svx/ui/savemodifieddialog.ui");
                         switch (aQry->Execute())
                         {
                             case RET_NO:
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index bde80c4..912b8d8 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -583,7 +583,7 @@ void ExtrusionBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rB
                 double fDepth = static_cast<const SvxDoubleItem*>(rReq.GetArgs()->GetItem(SID_EXTRUSION_DEPTH))->GetValue();
                 FieldUnit eUnit = (FieldUnit)static_cast<const SfxUInt16Item*>(rReq.GetArgs()->GetItem(SID_ATTR_METRIC))->GetValue();
 
-                ScopedVclPtrInstance< ExtrusionDepthDialog > aDlg(0L, fDepth, eUnit);
+                ScopedVclPtrInstance< ExtrusionDepthDialog > aDlg(nullptr, fDepth, eUnit);
                 sal_uInt16 nRet = aDlg->Execute();
                 if( nRet != 0 )
                 {
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index 575cdc8..72b2661 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -491,7 +491,7 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi
             if( rReq.GetArgs() && ( rReq.GetArgs()->GetItemState( SID_FONTWORK_CHARACTER_SPACING ) == SfxItemState::SET ) )
             {
                 sal_Int32 nCharSpacing = static_cast<const SfxInt32Item*>(rReq.GetArgs()->GetItem(SID_FONTWORK_CHARACTER_SPACING))->GetValue();
-                ScopedVclPtrInstance< FontworkCharacterSpacingDialog > aDlg( 0L, nCharSpacing );
+                ScopedVclPtrInstance< FontworkCharacterSpacingDialog > aDlg( nullptr, nCharSpacing );
                 sal_uInt16 nRet = aDlg->Execute();
                 if( nRet != 0 )
                 {
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index a274cbd..be99a7d 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1478,11 +1478,11 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox)
 
 IMPL_LINK(SwTOXSelectTabPage, AddStylesHdl, PushButton*, pButton)
 {
-    VclPtr<SwAddStylesDlg_Impl> pDlg(pButton,
-                                     static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(),
-                                     aStyleArr);
+    ScopedVclPtrInstance<SwAddStylesDlg_Impl> pDlg(
+        pButton, static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(),
+        aStyleArr);
     pDlg->Execute();
-    pDlg.reset();
+    pDlg.disposeAndClear();
     ModifyHdl(0);
     return 0;
 }
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 83640f5..492472e 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -356,7 +356,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
                 {
                     case SID_STYLE_NEW_BY_EXAMPLE:
                     {
-                        VclPtrInstance<SfxNewStyleDlg> pDlg( 0, *GetStyleSheetPool());
+                        VclPtrInstance<SfxNewStyleDlg> pDlg( nullptr, *GetStyleSheetPool());
                         if(RET_OK == pDlg->Execute())
                         {
                             aParam = pDlg->GetName();
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index f6924e7..5398063 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -158,7 +158,7 @@ bool SwGlossaryList::GetShortName(const OUString& rLongName,
     }
     else if(1 < nCount)
     {
-        ScopedVclPtrInstance< SwGlossDecideDlg > aDlg(0);
+        ScopedVclPtrInstance< SwGlossDecideDlg > aDlg(nullptr);
         OUString sTitle = aDlg->GetText() + " " + aTripleStrings.front().sBlock;
         aDlg->SetText(sTitle);
 
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx
index 54c6712..b60e592 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx
@@ -119,7 +119,7 @@ throw (RuntimeException, std::exception)
         int unsuccessfulAttempts = 0;
         while (true)
         {
-            ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg(0);
+            ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg(nullptr);
             aPasswdDlg->SetMinLen(0);
             if (!aPasswdDlg->Execute())
                 return false;
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 57c338d..287b5cf 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -223,7 +223,8 @@ bool DocumentDigitalSignatures::ImplViewSignatures(
 {
     bool bChanges = false;
     ScopedVclPtrInstance<DigitalSignaturesDialog> aSignaturesDialog(
-        NULL, mxCtx, eMode, bReadOnly, m_sODFVersion, m_bHasDocumentSignature);
+        nullptr, mxCtx, eMode, bReadOnly, m_sODFVersion,
+        m_bHasDocumentSignature);
     bool bInit = aSignaturesDialog->Init();
     DBG_ASSERT( bInit, "Error initializing security context!" );
     if ( bInit )
commit 8a65284fe31e6c0a927cb88b75df7845cd248572
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 be2f4cf..4023447 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 25c3b5c..df27e30 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 3456cfd..e7784af 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1520,7 +1520,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();
@@ -1535,7 +1535,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 52d173b..fb497e1 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 139b1a3..49d5a1c 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 f816937..81b22ce 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 e7a7f05..0634b86 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 67d4c54..1736307 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 ce39d72..eb5677a 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 5735249..a4abe70 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -688,7 +688,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 )
@@ -1128,7 +1128,7 @@ void LibPage::Export( void )
             return;
     }
 
-    ScopedVclPtr<ExportDialog> aNewDlg(new ExportDialog(this));
+    ScopedVclPtrInstance< ExportDialog > aNewDlg(this);
     if (aNewDlg->Execute() == RET_OK)
     {
         try
@@ -1504,7 +1504,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 67e3915..2e63351 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 a3ee649..eb46323 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 5b4adda..45a273f 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 dd428a1..03d31947 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -179,7 +179,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 6a75c8f..501e7f8 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 935c13b..e185eca 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1271,7 +1271,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();
@@ -1292,7 +1292,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_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 100644
--- 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 6701de1..7d81b55 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 0dbecc1..1b64ef1 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 129f539..2e4ffce 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 44228cb..8de41a4 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 ) );
 
@@ -4356,7 +4355,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();
 }
@@ -4447,7 +4446,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 )
@@ -4593,7 +4592,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 );
@@ -5298,7 +5297,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 0dc55db..a54a29b 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -658,7 +658,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 )
@@ -672,7 +672,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 0cee25d..45d1a93 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -2055,7 +2055,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 40239ca..1250e09 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -143,7 +143,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 593db19..539c1e5 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1541,7 +1541,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 9811a85..efa51d3 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -611,7 +611,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 6d1a69a..9a92381 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 85e7f27..6a62347 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -271,7 +271,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;
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index d341bc6..9260c68 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -333,7 +333,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 5a83bbe..123f04c 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -444,7 +444,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() )
         {
@@ -475,7 +475,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 0727f44..28c97b2 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -922,7 +922,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 );
@@ -1004,7 +1004,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();
     }
@@ -1080,7 +1080,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();
     }
@@ -1091,7 +1091,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 )
     {
@@ -1126,7 +1126,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 2170afb..aa90f37 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 3a5aa67..52e0350 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 852d027..59ba76f 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -553,8 +553,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));
@@ -628,7 +628,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)
@@ -1205,7 +1205,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 10620f3..5c25b4d 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -477,7 +477,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 24bfe05..e33ee96 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1356,7 +1356,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 f7758fa..ee3e99a 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -706,7 +706,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 )
@@ -803,7 +803,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();
         }
     }
@@ -822,7 +822,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 c088d48..3e050b1 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 4ad9c38..48a326b 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1596,7 +1596,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;
 
@@ -1745,7 +1745,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 fd029b6..9304c36 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -312,7 +312,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 6b61f78..eeabbcd 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);
 
     if ( aDialog->Execute() == RET_OK )
     {
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 5e592b7..0d8b428 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 16f0038..fd8e5dd 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -3446,7 +3446,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 7fefce5..9d1a662 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 2670836..5e7ee87 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 fb789dc..315ad1b 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 ff32378..ff8d23a 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 daec497..36a3318 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 800c18b..cf939b8 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 94a616c..79ec9d3 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 8b9d89c..104cf4b 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 237a31f..e942450 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 8ade09f..5b174bf 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 c581844..74e6691 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 a7e9e8b..c39dd5b 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 d07c04e..8bf6989 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -309,7 +309,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())
@@ -479,7 +479,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;
 
@@ -496,7 +496,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 dde8917..eca7659 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 f202e90..fef583f 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 032d337..a98dafd 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 ecf9537..47a0c2084 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 c7d1634..c5ceccb 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 5e58d86..4ece504 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 d1a4981..a033fab 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 1c63cb0..d86fbda 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 eb14533..051144d 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -327,7 +327,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 e03f808..cfb5df6 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 ) );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list