sc/source/ui/view/cellsh1.cxx                                  |    4 +-
 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/viewfun2.cxx                                 |    8 ++--
 sc/source/ui/view/viewfun3.cxx                                 |    4 +-
 sd/source/filter/html/pubdlg.cxx                               |    4 +-
 sd/source/ui/dlg/LayerTabBar.cxx                               |    4 +-
 sd/source/ui/func/fulinend.cxx                                 |    4 +-
 sd/source/ui/func/fupage.cxx                                   |    4 +-
 sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx |    6 +--
 sd/source/ui/view/DocumentRenderer.cxx                         |    4 +-
 sd/source/ui/view/Outliner.cxx                                 |    8 ++--
 sd/source/ui/view/ViewShellBase.cxx                            |    4 +-
 sd/source/ui/view/drviews2.cxx                                 |    8 ++--
 sd/source/ui/view/drviewsi.cxx                                 |    4 +-
 sfx2/source/appl/appopen.cxx                                   |    4 +-
 sfx2/source/appl/openuriexternally.cxx                         |    4 +-
 sfx2/source/appl/sfxhelp.cxx                                   |    2 -
 sfx2/source/dialog/securitypage.cxx                            |    4 +-
 sfx2/source/dialog/templdlg.cxx                                |    8 ++--
 sfx2/source/doc/guisaveas.cxx                                  |    4 +-
 sfx2/source/doc/templatedlg.cxx                                |    2 -
 sfx2/source/view/viewfrm.cxx                                   |   12 +++----
 sfx2/source/view/viewprn.cxx                                   |    6 +--
 starmath/source/dialog.cxx                                     |    4 +-
 starmath/source/unomodel.cxx                                   |    2 -
 svtools/source/java/javainteractionhandler.cxx                 |    4 +-
 svx/source/dialog/_contdlg.cxx                                 |    5 +-
 svx/source/form/datanavi.cxx                                   |   12 +++----
 svx/source/form/fmshell.cxx                                    |    4 +-
 svx/source/tbxctrls/grafctrl.cxx                               |    4 +-
 svx/source/unodraw/recoveryui.cxx                              |    4 +-
 sw/source/core/view/viewsh.cxx                                 |    4 +-
 sw/source/ui/config/optcomp.cxx                                |    4 +-
 sw/source/ui/dbui/mmoutputpage.cxx                             |    8 ++--
 sw/source/ui/envelp/labfmt.cxx                                 |    4 +-
 sw/source/ui/index/cnttab.cxx                                  |   10 ++---
 sw/source/ui/index/swuiidxmrk.cxx                              |    4 +-
 sw/source/ui/misc/glossary.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/shells/tabsh.cxx                              |    4 +-
 sw/source/uibase/shells/textsh1.cxx                            |    4 +-
 sw/source/uibase/uiview/view2.cxx                              |    8 ++--
 sw/source/uibase/uiview/viewprt.cxx                            |    4 +-
 sw/source/uibase/uno/SwXDocumentSettings.cxx                   |    2 -
 uui/source/iahndl.cxx                                          |    8 ++--
 xmlsecurity/source/component/documentdigitalsignatures.cxx     |    4 +-
 50 files changed, 126 insertions(+), 133 deletions(-)

New commits:
commit 361ebd503eb130a0f29f098568f5f20495ec7771
Author: Michael Meeks <michael.me...@collabora.com>
Date:   Tue Mar 31 21:06:51 2015 +0100

    second half of non-scriptable, Instance constructor conversion.
    
    Change-Id: I616c8c28255e0d90ae90033a128bd34d7570530c

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 9b3e4b4..953941e 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2652,9 +2652,9 @@ void ScCellShell::ExecuteDataPilotDialog()
                     {
                         //  confirm selection if it contains SubTotal cells
 
-                        ScopedVclPtr<QueryBox> aBox(new QueryBox( 
pTabViewShell->GetDialogParent(),
+                        ScopedVclPtrInstance<QueryBox> aBox( 
pTabViewShell->GetDialogParent(),
                                         WinBits(WB_YES_NO | WB_DEF_YES),
-                                        
ScGlobal::GetRscString(STR_DATAPILOT_SUBTOTAL) ) );
+                                        
ScGlobal::GetRscString(STR_DATAPILOT_SUBTOTAL) );
                         if (aBox->Execute() == RET_NO)
                             bOK = false;
                     }
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 3e1c5f1..dd1b299 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -422,8 +422,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
                     }
                     else if( ! rReq.IsAPI() )
                     {
-                        ScopedVclPtr<MessageDialog> aErrorBox(new 
MessageDialog(pTabViewShell->GetDialogParent(),
-                                            
ScGlobal::GetRscString(STR_NOAREASELECTED)));
+                        ScopedVclPtrInstance<MessageDialog> 
aErrorBox(pTabViewShell->GetDialogParent(),
+                                            
ScGlobal::GetRscString(STR_NOAREASELECTED));
                         aErrorBox->Execute();
                     }
                 }
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index a248608..83224c9 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -383,8 +383,8 @@ void ScDBFunc::ToggleAutoFilter()
         }
         else
         {
-            ScopedVclPtr<MessageDialog> aErrorBox(new 
MessageDialog(GetViewData().GetDialogParent(),
-                                ScGlobal::GetRscString(STR_ERR_AUTOFILTER)));
+            ScopedVclPtrInstance<MessageDialog> 
aErrorBox(GetViewData().GetDialogParent(),
+                                ScGlobal::GetRscString(STR_ERR_AUTOFILTER));
             aErrorBox->Execute();
         }
     }
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 77b9731..3ea3d0d 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -305,9 +305,9 @@ bool ScSpellingEngine::ShowTableWrapDialog()
 {
     vcl::Window* pParent = GetDialogParent();
     ScWaitCursorOff aWaitOff( pParent );
-    ScopedVclPtr<MessBox> aMsgBox(new MessBox( pParent, WinBits( WB_YES_NO | 
WB_DEF_YES ),
+    ScopedVclPtrInstance<MessBox> aMsgBox( pParent, WinBits( WB_YES_NO | 
WB_DEF_YES ),
         ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ),
-        ScGlobal::GetRscString( STR_SPELLING_BEGIN_TAB) ) );
+        ScGlobal::GetRscString( STR_SPELLING_BEGIN_TAB) );
     return aMsgBox->Execute() == RET_YES;
 }
 
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 1a780a3..127ec02 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1074,10 +1074,10 @@ bool ScViewFunc::MergeCells( bool bApi, bool& 
rDoContents, bool bRecord, bool bC
     {
         if (!bApi)
         {
-            ScopedVclPtr<MessBox> aBox(new MessBox( 
GetViewData().GetDialogParent(),
+            ScopedVclPtrInstance<MessBox> aBox( 
GetViewData().GetDialogParent(),
                             WinBits(WB_YES_NO_CANCEL | WB_DEF_NO),
                             ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ),
-                            ScGlobal::GetRscString( STR_MERGE_NOTEMPTY ) ) );
+                            ScGlobal::GetRscString( STR_MERGE_NOTEMPTY ) );
             sal_uInt16 nRetVal = aBox->Execute();
 
             if ( nRetVal == RET_YES )
@@ -1771,9 +1771,9 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
             aMsgStr += ScGlobal::GetRscString( STR_MSSG_SOLVE_4 );
         }
 
-        ScopedVclPtr<MessBox> aBox(new MessBox( 
GetViewData().GetDialogParent(),
+        ScopedVclPtrInstance<MessBox> aBox( GetViewData().GetDialogParent(),
                         WinBits(WB_YES_NO | WB_DEF_NO),
-                        ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), 
aMsgStr ) );
+                        ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), 
aMsgStr );
         sal_uInt16 nRetVal = aBox->Execute();
 
         if ( RET_YES == nRetVal )
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index b7568dd..652c7d2 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1009,8 +1009,8 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, 
ScDocument* pClipDoc,
         {
             ScWaitCursorOff aWaitOff( GetFrameWin() );
             OUString aMessage = ScGlobal::GetRscString( STR_PASTE_BIGGER );
-            ScopedVclPtr<QueryBox> aBox(new QueryBox( 
GetViewData().GetDialogParent(),
-                            WinBits(WB_YES_NO | WB_DEF_NO), aMessage ) );
+            ScopedVclPtrInstance<QueryBox> aBox( 
GetViewData().GetDialogParent(),
+                            WinBits(WB_YES_NO | WB_DEF_NO), aMessage );
             if ( aBox->Execute() != RET_YES )
             {
                 return false;
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index f8de10a..e798226 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -1177,8 +1177,8 @@ IMPL_LINK_NOARG(SdPublishingDlg, FinishHdl)
 
                 if (iter != m_aDesignList.end())
                 {
-                    ScopedVclPtr<MessageDialog> aErrorBox(new 
MessageDialog(this, SD_RESSTR(STR_PUBDLG_SAMENAME),
-                        VCL_MESSAGE_ERROR, VCL_BUTTONS_YES_NO));
+                    ScopedVclPtrInstance<MessageDialog> aErrorBox(this, 
SD_RESSTR(STR_PUBDLG_SAMENAME),
+                        VCL_MESSAGE_ERROR, VCL_BUTTONS_YES_NO);
                     bRetry = aErrorBox->Execute() == RET_NO;
 
                     if(!bRetry)
diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index 9558543..ffe4099 100644
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -203,8 +203,8 @@ TabBarAllowRenamingReturnCode LayerTabBar::AllowRenaming()
         (rLayerAdmin.GetLayer( aNewName, false ) && aLayerName != aNewName) )
     {
         // Name already exists
-        ScopedVclPtr<WarningBox> aWarningBox(new WarningBox( 
&pDrViewSh->GetViewFrame()->GetWindow(), WinBits( WB_OK ),
-                                SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ));
+        ScopedVclPtrInstance<WarningBox> aWarningBox( 
&pDrViewSh->GetViewFrame()->GetWindow(), WinBits( WB_OK ),
+                                SD_RESSTR( STR_WARN_NAME_DUPLICATE ) );
         aWarningBox->Execute();
         bOK = false;
     }
diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index 16a3bae..b963b06 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -138,8 +138,8 @@ void FuLineEnd::DoExecute( SfxRequest& )
                 }
                 else
                 {
-                    ScopedVclPtr<WarningBox> aWarningBox(new WarningBox( 
mpWindow, WinBits( WB_OK ),
-                            SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ) );
+                    ScopedVclPtrInstance<WarningBox> aWarningBox( mpWindow, 
WinBits( WB_OK ),
+                            SD_RESSTR( STR_WARN_NAME_DUPLICATE ) );
                     aWarningBox->Execute();
                 }
             }
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 4143f0c..f7d355f 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -351,11 +351,11 @@ const SfxItemSet* FuPage::ExecuteDialog( ::vcl::Window* 
pParent )
                 // notice-masterpage (at the moment)
                 if( ePageKind != PK_NOTES )
                 {
-                    ScopedVclPtr<MessBox> aQuestionBox (new MessBox(
+                    ScopedVclPtrInstance<MessBox> aQuestionBox (
                         pParent,
                         WB_YES_NO | WB_DEF_YES,
                         SD_RESSTR(STR_PAGE_BACKGROUND_TITLE),
-                        SD_RESSTR(STR_PAGE_BACKGROUND_TXT) ) );
+                        SD_RESSTR(STR_PAGE_BACKGROUND_TXT) );
                     aQuestionBox->SetImage( QueryBox::GetStandardImage() );
                     bSetToAllPages = ( RET_YES == aQuestionBox->Execute() );
                 }
diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx 
b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
index 1984f2d..fde8cda 100644
--- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
+++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
@@ -134,10 +134,8 @@ void InsertionIndicatorOverlay::Create (
 
     // Create virtual devices for bitmap and mask whose bitmaps later be
     // combined to form the BitmapEx of the icon.
-    ScopedVclPtr<VirtualDevice> pContent( new VirtualDevice (
-        *mrSlideSorter.GetContentWindow(),
-        0,
-        0) );
+    ScopedVclPtrInstance<VirtualDevice> pContent(
+        *mrSlideSorter.GetContentWindow(), 0, 0);
     pContent->SetOutputSizePixel(aIconSize);
 
     pContent->SetFillColor();
diff --git a/sd/source/ui/view/DocumentRenderer.cxx 
b/sd/source/ui/view/DocumentRenderer.cxx
index b08f253..6df3d4b 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1295,10 +1295,10 @@ public:
                 // Show warning that the orientation could not be set.
                 if (pViewShell)
                 {
-                    ScopedVclPtr<WarningBox> aWarnBox(new WarningBox(
+                    ScopedVclPtrInstance<WarningBox> aWarnBox(
                         pViewShell->GetActiveWindow(),
                         (WinBits)(WB_OK_CANCEL | WB_DEF_CANCEL),
-                        SD_RESSTR(STR_WARN_PRINTFORMAT_FAILURE)));
+                        SD_RESSTR(STR_WARN_PRINTFORMAT_FAILURE));
                     if (aWarnBox->Execute() != RET_OK)
                         return;
                 }
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 81a32e5..ea82d42 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1109,10 +1109,10 @@ 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.
-        ScopedVclPtr<QueryBox> aQuestionBox (new QueryBox(
+        ScopedVclPtrInstance<QueryBox> aQuestionBox (
             NULL,
             WB_YES_NO | WB_DEF_YES,
-            SD_RESSTR(nStringId)));
+            SD_RESSTR(nStringId));
         aQuestionBox->SetImage (QueryBox::GetStandardImage());
         sal_uInt16 nBoxResult = ShowModalMessageBox(*aQuestionBox.get());
         bDoWrapArround = (nBoxResult == RET_YES);
@@ -1157,8 +1157,8 @@ void Outliner::PrepareSpellCheck (void)
     {
         mbError = true;
         mbEndOfSearch = true;
-        ScopedVclPtr<MessageDialog> aErrorBox (new MessageDialog(NULL,
-            SD_RESSTR(STR_NOLANGUAGE)));
+        ScopedVclPtrInstance<MessageDialog> aErrorBox (nullptr
+                                                       
SD_RESSTR(STR_NOLANGUAGE));
         ShowModalMessageBox (*aErrorBox.get());
     }
     else if (eState != EE_SPELL_OK)
diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index 27ecd29..79fbef0 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -533,10 +533,10 @@ sal_uInt16 ViewShellBase::SetPrinter (
         bool bScaleAll = false;
         if ( bIsAPI )
         {
-            ScopedVclPtr<WarningBox> aWarnBox (new WarningBox(
+            ScopedVclPtrInstance<WarningBox> aWarnBox (
                 GetWindow(),
                 (WinBits)(WB_YES_NO | WB_DEF_YES),
-                SD_RESSTR(STR_SCALE_OBJS_TO_PAGE)));
+                SD_RESSTR(STR_SCALE_OBJS_TO_PAGE));
             bScaleAll = (aWarnBox->Execute() == RET_YES);
         }
 
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 412e279..6f02fd3 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1447,10 +1447,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
                             || aLayerName.isEmpty() )
                         {
                             // name already exists
-                            ScopedVclPtr<WarningBox> aWarningBox (new 
WarningBox(
+                            ScopedVclPtrInstance<WarningBox> aWarningBox (
                                 GetParentWindow(),
                                 WinBits( WB_OK ),
-                                SD_RESSTR(STR_WARN_NAME_DUPLICATE)));
+                                SD_RESSTR(STR_WARN_NAME_DUPLICATE));
                             aWarningBox->Execute();
                         }
                         else
@@ -1616,10 +1616,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
                              aLayerName != aOldLayerName) || 
aLayerName.isEmpty() )
                         {
                             // name already exists
-                            ScopedVclPtr<WarningBox> aWarningBox (new 
WarningBox(
+                            ScopedVclPtrInstance<WarningBox> aWarningBox (
                                 GetParentWindow(),
                                 WinBits( WB_OK ),
-                                SD_RESSTR(STR_WARN_NAME_DUPLICATE)));
+                                SD_RESSTR(STR_WARN_NAME_DUPLICATE));
                             aWarningBox->Execute();
                         }
                         else
diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx
index f926b7e..930e9b0 100644
--- a/sd/source/ui/view/drviewsi.cxx
+++ b/sd/source/ui/view/drviewsi.cxx
@@ -164,9 +164,9 @@ void DrawViewShell::AssignFrom3DWindow()
             }
             else
             {
-                ScopedVclPtr<InfoBox> aInfoBox (new InfoBox(
+                ScopedVclPtrInstance<InfoBox> aInfoBox (
                     GetActiveWindow(),
-                    SD_RESSTR(STR_ACTION_NOTPOSSIBLE)));
+                    SD_RESSTR(STR_ACTION_NOTPOSSIBLE));
                 aInfoBox->Execute();
             }
 
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 5ff35ce..8de19dc6 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -832,9 +832,9 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
                 SolarMutexGuard aGuard;
                 vcl::Window *pWindow = SfxGetpApp()->GetTopWindow();
 
-                ScopedVclPtr<MessageDialog> aSecurityWarningBox(new 
MessageDialog(pWindow,
+                ScopedVclPtrInstance<MessageDialog> 
aSecurityWarningBox(pWindow,
                                                   
SfxResId(STR_SECURITY_WARNING_NO_HYPERLINKS),
-                                                  VCL_MESSAGE_WARNING));
+                                                  VCL_MESSAGE_WARNING);
                 aSecurityWarningBox->SetText( 
SfxResId(RID_SECURITY_WARNING_TITLE).toString() );
                 aSecurityWarningBox->Execute();
                 return;
diff --git a/sfx2/source/appl/openuriexternally.cxx 
b/sfx2/source/appl/openuriexternally.cxx
index 4dc04f2..beb4dee 100644
--- a/sfx2/source/appl/openuriexternally.cxx
+++ b/sfx2/source/appl/openuriexternally.cxx
@@ -44,8 +44,8 @@ bool sfx2::openUriExternally(
                 "unexpected IllegalArgumentException: " + e.Message);
         }
         SolarMutexGuard g;
-        ScopedVclPtr<MessageDialog> eb(new MessageDialog(
-            SfxGetpApp()->GetTopWindow(), SfxResId(STR_NO_ABS_URI_REF)));
+        ScopedVclPtrInstance<MessageDialog> eb(
+            SfxGetpApp()->GetTopWindow(), SfxResId(STR_NO_ABS_URI_REF));
         eb->set_primary_text(eb->get_primary_text().replaceFirst("$(ARG1)", 
uri));
         eb->Execute();
     } catch (css::system::SystemShellExecuteException &) {
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 4809a1d..52f7664 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -404,7 +404,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame2 >& 
rHelpTask   ,
     // create all internal windows and sub frames ...
     Reference< ::com::sun::star::awt::XWindow > xParentWindow = 
xHelpTask->getContainerWindow();
     vcl::Window*                                pParentWindow = 
VCLUnoHelper::GetWindow( xParentWindow );
-    VclPtr<SfxHelpWindow_Impl>                  pHelpWindow   = new 
SfxHelpWindow_Impl( xHelpTask, pParentWindow, WB_DOCKBORDER );
+    VclPtrInstance<SfxHelpWindow_Impl>          pHelpWindow( xHelpTask, 
pParentWindow, WB_DOCKBORDER );
     Reference< ::com::sun::star::awt::XWindow > xHelpWindow   = 
VCLUnoHelper::GetInterface( pHelpWindow );
 
     Reference< XFrame > xHelpContent;
diff --git a/sfx2/source/dialog/securitypage.cxx 
b/sfx2/source/dialog/securitypage.cxx
index 12574cb..ec4cafd 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -336,8 +336,8 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, 
RecordChangesCBToggleHdl)
         bool bAlreadyDone = false;
         if (!m_bEndRedliningWarningDone)
         {
-            ScopedVclPtr<WarningBox> aBox(new 
WarningBox(m_rMyTabPage.GetParent(), WinBits(WB_YES_NO | WB_DEF_NO),
-                    m_aEndRedliningWarning ));
+            ScopedVclPtrInstance<WarningBox> aBox(m_rMyTabPage.GetParent(), 
WinBits(WB_YES_NO | WB_DEF_NO),
+                    m_aEndRedliningWarning );
             if (aBox->Execute() != RET_YES)
                 bAlreadyDone = true;
             else
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 4ad4402..37d8c21 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1975,11 +1975,11 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
         if ( bUsedStyle )
         {
         #if defined UNX
-            ScopedVclPtr<MessageDialog> aBox(new 
MessageDialog(SfxGetpApp()->GetTopWindow(), aMsg,
-                               VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+            ScopedVclPtrInstance<MessageDialog> 
aBox(SfxGetpApp()->GetTopWindow(), aMsg,
+                               VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
         #else
-            ScopedVclPtr<MessageDialog> aBox(new MessageDialog(GetWindow(), 
aMsg,
-                               VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+            ScopedVclPtrInstance<MessageDialog> aBox(GetWindow(), aMsg,
+                               VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
         #endif
             aApproved = aBox->Execute() == RET_YES;
         }
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 8251656..e35a7b1 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -666,8 +666,8 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 
nCurStatus )
         {
             // notify the user that SaveAs is going to be done
             vcl::Window* pWin = SfxStoringHelper::GetModelWindow( m_xModel );
-            ScopedVclPtr<MessageDialog> aMessageBox(new MessageDialog(pWin, 
SfxResId(STR_NEW_FILENAME_SAVE),
-                                      VCL_MESSAGE_QUESTION, 
VCL_BUTTONS_OK_CANCEL));
+            ScopedVclPtrInstance<MessageDialog> aMessageBox(pWin, 
SfxResId(STR_NEW_FILENAME_SAVE),
+                                      VCL_MESSAGE_QUESTION, 
VCL_BUTTONS_OK_CANCEL);
             if ( aMessageBox->Execute() == RET_OK )
                 nResult = STATUS_SAVEAS;
             else
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 5a38284..8516e71 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -638,7 +638,7 @@ IMPL_LINK(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, 
Menu*, pMenu)
             {
                 OUString 
aMsg(SfxResId(STR_MSG_ERROR_REPOSITORY_NAME).toString());
                 aMsg = aMsg.replaceFirst("$1",pPlace->GetName());
-                ScopedVclPtr<MessageDialog>(new MessageDialog(this, 
aMsg))->Execute();
+                ScopedVclPtrInstance<MessageDialog>(this, aMsg)->Execute();
             }
         }
     }
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 5a49f48..1c2ca06 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -498,8 +498,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
                     if ( nOpenMode == SFX_STREAM_READWRITE && !rReq.IsAPI() )
                     {
                         // ::com::sun::star::sdbcx::User offering to open it 
as a template
-                        ScopedVclPtr<MessageDialog> aBox(new 
MessageDialog(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
-                                           VCL_MESSAGE_QUESTION, 
VCL_BUTTONS_YES_NO));
+                        ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), 
SfxResId(STR_QUERY_OPENASTEMPLATE),
+                                           VCL_MESSAGE_QUESTION, 
VCL_BUTTONS_YES_NO);
                         if ( RET_YES == aBox->Execute() )
                         {
                             SfxApplication* pApp = SfxGetpApp();
@@ -582,8 +582,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
             if ( bDo && GetFrame().DocIsModified_Impl() &&
                  !rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) 
)
             {
-                ScopedVclPtr<MessageDialog> aBox(new 
MessageDialog(&GetWindow(), SfxResId(STR_QUERY_LASTVERSION),
-                                   VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+                ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), 
SfxResId(STR_QUERY_LASTVERSION),
+                                   VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
                 bDo = ( RET_YES == aBox->Execute() );
             }
 
@@ -759,8 +759,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
                     if ( bForEdit && SID_EDITDOC == rReq.GetSlot() )
                     {
                         // ask user for opening as template
-                        ScopedVclPtr<MessageDialog> aBox(new 
MessageDialog(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
-                                           VCL_MESSAGE_QUESTION, 
VCL_BUTTONS_YES_NO));
+                        ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), 
SfxResId(STR_QUERY_OPENASTEMPLATE),
+                                           VCL_MESSAGE_QUESTION, 
VCL_BUTTONS_YES_NO);
                         if ( RET_YES == aBox->Execute() )
                         {
                             SfxAllItemSet aSet( pApp->GetPool() );
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 44f2731..8d09395 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -453,8 +453,8 @@ IMPL_LINK_NOARG(SfxDialogExecutor_Impl, Execute)
         return 0;
 
     // Create Dialog
-    VclPtr<SfxPrintOptionsDialog> pDlg(new SfxPrintOptionsDialog( 
static_cast<vcl::Window*>(_pSetupParent),
-                                                                  _pViewSh, 
_pOptions ));
+    VclPtrInstance<SfxPrintOptionsDialog> pDlg( 
static_cast<vcl::Window*>(_pSetupParent),
+                                                _pViewSh, _pOptions );
     if ( _bHelpDisabled )
         pDlg->DisableHelp();
     if ( pDlg->Execute() == RET_OK )
@@ -811,7 +811,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
                 nDialogRet = 0;
 
                 // execute PrinterSetupDialog
-                VclPtr<PrinterSetupDialog> pPrintSetupDlg = new 
PrinterSetupDialog( GetWindow() );
+                VclPtrInstance<PrinterSetupDialog> pPrintSetupDlg( GetWindow() 
);
                 SfxDialogExecutor_Impl* pExecutor = 0;
 
                 if (pImp->m_bHasPrintOptions && HasPrintOptionsPage())
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index c1865a6..f8b8b10 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -547,7 +547,7 @@ IMPL_LINK( SmFontTypeDialog, MenuSelectHdl, Menu *, pMenu )
 
     if (pActiveListBox)
     {
-        VclPtr<SmFontDialog> pFontDialog = new SmFontDialog(this, 
pFontListDev, bHideCheckboxes);
+        VclPtrInstance<SmFontDialog> pFontDialog(this, pFontListDev, 
bHideCheckboxes);
 
         pActiveListBox->WriteTo(*pFontDialog);
         if (pFontDialog->Execute() == RET_OK)
@@ -1505,7 +1505,7 @@ IMPL_LINK_NOARG( SmSymbolDialog, SymbolChangeHdl )
 
 IMPL_LINK_NOARG(SmSymbolDialog, EditClickHdl)
 {
-    VclPtr<SmSymDefineDialog> pDialog = new SmSymDefineDialog(this, 
pFontListDev, rSymbolMgr);
+    VclPtrInstance<SmSymDefineDialog> pDialog(this, pFontListDev, rSymbolMgr);
 
     // set current symbol and SymbolSet for the new dialog
     const OUString  aSymSetName (m_pSymbolSets->GetSelectEntry()),
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index dfd260a..4238a00 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -621,7 +621,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** 
ppEntries, const Any*
                         {
                             if ( !sPrinterName.isEmpty() )
                             {
-                                VclPtr<SfxPrinter> pNewPrinter = new 
SfxPrinter ( pPrinter->GetOptions().Clone(), sPrinterName );
+                                VclPtrInstance<SfxPrinter> pNewPrinter( 
pPrinter->GetOptions().Clone(), sPrinterName );
                                 if (pNewPrinter->IsKnown())
                                     pDocSh->SetPrinter ( pNewPrinter );
                                 else
diff --git a/svtools/source/java/javainteractionhandler.cxx 
b/svtools/source/java/javainteractionhandler.cxx
index d280de9..c2d4ad2 100644
--- a/svtools/source/java/javainteractionhandler.cxx
+++ b/svtools/source/java/javainteractionhandler.cxx
@@ -158,8 +158,8 @@ void SAL_CALL JavaInteractionHandler::handle( const 
Reference< XInteractionReque
             SolarMutexGuard aSolarGuard;
             m_bJavaDisabled_Handled = true;
             // Java disabled. Give user a chance to enable Java inside Office.
-            ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog(NULL, 
"JavaDisabledDialog",
-                                    "svt/ui/javadisableddialog.ui"));
+            ScopedVclPtrInstance<MessageDialog> aQueryBox(nullptr , 
"JavaDisabledDialog",
+                                                          
"svt/ui/javadisableddialog.ui");
             nResult = aQueryBox->Execute();
             if ( nResult == RET_YES )
             {
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 3a54fe1..a67b91f 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -520,9 +520,8 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx 
)
             m_pStbStatus->Invalidate();
         else if ( bGraphicLinked )
         {
-            ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this, 
"QueryUnlinkGraphicsDialog",
-                "svx/ui/queryunlinkgraphicsdialog.ui"));
-
+            ScopedVclPtrInstance<MessageDialog> aQBox(this, 
"QueryUnlinkGraphicsDialog",
+                                                      
"svx/ui/queryunlinkgraphicsdialog.ui");
             if (aQBox->Execute() != RET_YES)
             {
                 bPipette = false;
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 43bd847..8d7a35b 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -1001,8 +1001,8 @@ namespace svxform
                 {
                     SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): 
exception caught" );
                 }
-                ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this, 
SVX_RES(nResId),
-                                    VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+                ScopedVclPtrInstance<MessageDialog> aQBox(this, 
SVX_RES(nResId),
+                                                          
VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
                 OUString sMessText = aQBox->get_primary_text();
                 sMessText = sMessText.replaceFirst( sSearch, sName);
                 aQBox->set_primary_text(sMessText);
@@ -1607,8 +1607,8 @@ namespace svxform
             }
             else if (sIdent == "modelsremove")
             {
-                ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this, 
SVX_RES( RID_STR_QRY_REMOVE_MODEL),
-                                    VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+                ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES( 
RID_STR_QRY_REMOVE_MODEL),
+                                    VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
                 OUString sText = aQBox->get_primary_text();
                 sText = sText.replaceFirst( MODELNAME, sSelectedModel );
                 aQBox->set_primary_text(sText);
@@ -1708,8 +1708,8 @@ namespace svxform
                 if ( pPage )
                 {
                     OUString sInstName = pPage->GetInstanceName();
-                    ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this, 
SVX_RES(RID_STR_QRY_REMOVE_INSTANCE),
-                                        VCL_MESSAGE_QUESTION, 
VCL_BUTTONS_YES_NO));
+                    ScopedVclPtrInstance<MessageDialog> aQBox(this, 
SVX_RES(RID_STR_QRY_REMOVE_INSTANCE),
+                                                              
VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
                     OUString sMessText = aQBox->get_primary_text();
                     sMessText = sMessText.replaceFirst( INSTANCENAME, 
sInstName );
                     aQBox->set_primary_text(sMessText);
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 329ec96..408cf3f 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -269,8 +269,8 @@ bool FmFormShell::PrepareClose(bool bUI)
 
                     if ( bModified && bUI )
                     {
-                        ScopedVclPtr<MessageDialog> aQry(new 
MessageDialog(NULL, "SaveModifiedDialog",
-                                           "svx/ui/savemodifieddialog.ui"));
+                        ScopedVclPtr<MessageDialog> aQry(nullptr, 
"SaveModifiedDialog",
+                                                         
"svx/ui/savemodifieddialog.ui");
                         switch (aQry->Execute())
                         {
                             case RET_NO:
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 8de6f1e..c9c1aef 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -731,9 +731,9 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, 
SdrView& rView )
                     aCropDlgAttr.Put( SdrGrafCropItem( aLTSize.Width(), 
aLTSize.Height(),
                                                     aRBSize.Width(), 
aRBSize.Height() ) );
 
-                    ScopedVclPtr<SfxSingleTabDialog>  aCropDialog(new 
SfxSingleTabDialog(
+                    ScopedVclPtrInstance<SfxSingleTabDialog> aCropDialog(
                         SfxViewShell::Current() ? 
SfxViewShell::Current()->GetWindow() : NULL,
-                        aCropDlgAttr));
+                        aCropDlgAttr);
                     const OUString aCropStr(SVX_RESSTR(RID_SVXSTR_GRAFCROP));
 
                     SfxAbstractDialogFactory* pFact = 
SfxAbstractDialogFactory::Create();
diff --git a/svx/source/unodraw/recoveryui.cxx 
b/svx/source/unodraw/recoveryui.cxx
index 49ffb40..d51938e 100644
--- a/svx/source/unodraw/recoveryui.cxx
+++ b/svx/source/unodraw/recoveryui.cxx
@@ -281,7 +281,7 @@ bool RecoveryUI::impl_doEmergencySave()
     css::uno::Reference< css::frame::XStatusListener > xCore(pCore);
 
     // create dialog for this operation and bind it to the used core service
-    VclPtr<Dialog> xDialog(new svxdr::SaveDialog(m_pParentWindow, pCore));
+    VclPtrInstance<svxdr::SaveDialog> xDialog(m_pParentWindow, pCore);
 
     // start the dialog
     short nRet = xDialog->Execute();
@@ -296,7 +296,7 @@ void RecoveryUI::impl_doRecovery()
 
     // create all needed dialogs for this operation
     // and bind it to the used core service
-    VclPtr<Dialog> xDialog(new svxdr::RecoveryDialog(m_pParentWindow, pCore));
+    VclPtrInstance<svxdr::RecoveryDialog> xDialog(m_pParentWindow, pCore);
 
     // start the dialog
     xDialog->Execute();
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 466f2433..68d85f6 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -443,7 +443,7 @@ void SwViewShell::ImplUnlockPaint( bool bVirDev )
         if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() )
         {
             //Refresh with virtual device to avoid flickering.
-            VclPtr<VirtualDevice> pVout = new VirtualDevice( *mpOut );
+            VclPtrInstance<VirtualDevice> pVout( *mpOut );
             pVout->SetMapMode( mpOut->GetMapMode() );
             Size aSize( VisArea().SSize() );
             aSize.Width() += 20;
@@ -1176,7 +1176,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, 
const Rectangle *pRect
 
         //create virtual device and set.
         const Size aPixSz = GetWin()->PixelToLogic(Size(1,1));
-        VclPtr<VirtualDevice> pVout = new VirtualDevice( *GetWin() );
+        VclPtrInstance<VirtualDevice> pVout( *GetWin() );
         pVout->SetLineColor( GetWin()->GetLineColor() );
         pVout->SetFillColor( GetWin()->GetFillColor() );
         MapMode aMapMode( GetWin()->GetMapMode() );
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 2cbf0b1..4088913 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -319,8 +319,8 @@ IMPL_LINK_NOARG(SwCompatibilityOptPage, SelectHdl)
 
 IMPL_LINK_NOARG(SwCompatibilityOptPage, UseAsDefaultHdl)
 {
-    ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, 
"QueryDefaultCompatDialog",
-        "modules/swriter/ui/querydefaultcompatdialog.ui"));
+    ScopedVclPtrInstance<MessageDialog> aQuery(this, 
"QueryDefaultCompatDialog",
+                                               
"modules/swriter/ui/querydefaultcompatdialog.ui");
     if (aQuery->Execute() == RET_YES)
     {
         for ( vector< CompatibilityItem >::iterator pItem = 
m_pImpl->m_aList.begin();
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx 
b/sw/source/ui/dbui/mmoutputpage.cxx
index 4e29af3..2a49ade 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -1077,8 +1077,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, 
PushButton*, pButton)
 
     if(m_pSubjectED->GetText().isEmpty())
     {
-        ScopedVclPtr<SwSendQueryBox_Impl> aQuery(new 
SwSendQueryBox_Impl(pButton, "SubjectDialog",
-         "modules/swriter/ui/subjectdialog.ui"));
+        ScopedVclPtrInstance<SwSendQueryBox_Impl> aQuery(pButton, 
"SubjectDialog",
+                                                         
"modules/swriter/ui/subjectdialog.ui");
         aQuery->SetIsEmptyTextAllowed(true);
         aQuery->SetValue(m_sNoSubjectST);
         if(RET_OK == aQuery->Execute())
@@ -1091,8 +1091,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, 
PushButton*, pButton)
     }
     if(!bAsBody && m_pAttachmentED->GetText().isEmpty())
     {
-        ScopedVclPtr<SwSendQueryBox_Impl> aQuery(new 
SwSendQueryBox_Impl(pButton, "AttachNameDialog",
-         "modules/swriter/ui/attachnamedialog.ui"));
+        ScopedVclPtrInstance<SwSendQueryBox_Impl> aQuery(pButton, 
"AttachNameDialog",
+                                                         
"modules/swriter/ui/attachnamedialog.ui");
         aQuery->SetIsEmptyTextAllowed(false);
         if(RET_OK == aQuery->Execute())
         {
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index d06fb67..a28c364 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -649,8 +649,8 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl)
             return 0;
         }
 
-        ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, 
"QuerySaveLabelDialog",
-            "modules/swriter/ui/querysavelabeldialog.ui"));
+        ScopedVclPtrInstance<MessageDialog> aQuery(this, 
"QuerySaveLabelDialog",
+                                                   
"modules/swriter/ui/querysavelabeldialog.ui");
 
         aQuery->set_primary_text(aQuery->get_primary_text().
             replaceAll("%1", sMake).replaceAll("%2", sType));
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 2cdf9d2..89bc03bb 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1477,9 +1477,9 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox)
 
 IMPL_LINK(SwTOXSelectTabPage, AddStylesHdl, PushButton*, pButton)
 {
-    VclPtr<SwAddStylesDlg_Impl> pDlg(new SwAddStylesDlg_Impl(pButton,
-        static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(),
-        aStyleArr));
+    VclPtr<SwAddStylesDlg_Impl> pDlg(pButton,
+                                     
static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(),
+                                     aStyleArr);
     pDlg->Execute();
     pDlg.reset();
     ModifyHdl(0);
@@ -1513,8 +1513,8 @@ IMPL_LINK(SwTOXSelectTabPage, MenuExecuteHdl, Menu*, 
pMenu)
                 return 0;
         }
 
-        VclPtr<SwAutoMarkDlg_Impl> pAutoMarkDlg(new SwAutoMarkDlg_Impl(
-                m_pAutoMarkPB, sAutoMarkURL, bNew ));
+        VclPtrInstance<SwAutoMarkDlg_Impl> pAutoMarkDlg(
+                m_pAutoMarkPB, sAutoMarkURL, bNew );
 
         if( RET_OK != pAutoMarkDlg->Execute() && bNew )
             sAutoMarkURL = sSaveAutoMarkURL;
diff --git a/sw/source/ui/index/swuiidxmrk.cxx 
b/sw/source/ui/index/swuiidxmrk.cxx
index a276bea..70fe193 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1252,9 +1252,9 @@ IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, PushButton*, 
pButton)
     OUString sOldId = m_sCreatedEntry[0];
     for(int i = 0; i < AUTH_FIELD_END; i++)
         m_sCreatedEntry[i] = bCreate ? OUString() : m_sFields[i];
-    ScopedVclPtr<SwCreateAuthEntryDlg_Impl> aDlg(new 
SwCreateAuthEntryDlg_Impl(pButton,
+    ScopedVclPtrInstance<SwCreateAuthEntryDlg_Impl> aDlg(pButton,
                 bCreate ? m_sCreatedEntry : m_sFields,
-                *pSh, bNewEntry, bCreate));
+                *pSh, bNewEntry, bCreate);
     if(bNewEntry)
     {
         aDlg->SetCheckNameHdl(LINK(this, SwAuthorMarkPane, IsEntryAllowedHdl));
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 62a0e21..99cf93a 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -503,8 +503,8 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
     else if (sItemIdent == "rename")
     {
         
m_pShortNameEdit->SetText(pGlossaryHdl->GetGlossaryShortName(m_pNameED->GetText()));
-        ScopedVclPtr<SwNewGlosNameDlg> pNewNameDlg(new SwNewGlosNameDlg(this, 
m_pNameED->GetText(),
-                                                                             
m_pShortNameEdit->GetText() ));
+        ScopedVclPtrInstance<SwNewGlosNameDlg> pNewNameDlg(this, 
m_pNameED->GetText(),
+                                                           
m_pShortNameEdit->GetText());
         if( RET_OK == pNewNameDlg->Execute() &&
             pGlossaryHdl->Rename( m_pShortNameEdit->GetText(),
                                     pNewNameDlg->GetNewShort(),
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 4098ed0..07623b0 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -315,10 +315,8 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl)
     bool bOk = false, bFmtInserted = false;
     while( !bOk )
     {
-        VclPtr<SwStringInputDlg> pDlg(new SwStringInputDlg( this,
-                                                       aStrTitle,
-                                                       aStrLabel,
-                                                       OUString() ));
+        VclPtrInstance<SwStringInputDlg> pDlg( this, aStrTitle,
+                                               aStrLabel, OUString() );
         if( RET_OK == pDlg->Execute() )
         {
             const OUString aFormatName( pDlg->GetInputString() );
@@ -377,8 +375,8 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl)
     aMessage += m_pLbFormat->GetSelectEntry();
     aMessage += "\n";
 
-    VclPtr<MessBox> pBox(new MessBox( this, WinBits( WB_OK_CANCEL ),
-                                                 aStrDelTitle, aMessage));
+    VclPtrInstance<MessBox> pBox( this, WinBits( WB_OK_CANCEL ),
+                                  aStrDelTitle, aMessage );
 
     if ( pBox->Execute() == RET_OK )
     {
@@ -412,10 +410,9 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl)
     bool bOk = false;
     while( !bOk )
     {
-        VclPtr<SwStringInputDlg> pDlg(new SwStringInputDlg( this,
-                                                       aStrRenameTitle,
-                                                       
m_pLbFormat->GetSelectEntry(),
-                                                       OUString() ));
+        VclPtrInstance<SwStringInputDlg> pDlg( this, aStrRenameTitle,
+                                               m_pLbFormat->GetSelectEntry(),
+                                               OUString() );
         if( pDlg->Execute() == RET_OK )
         {
             bool bFmtRenamed = false;
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 11ead33..df761da 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -602,8 +602,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
                         const SfxFilter* pFlt = GetMedium()->GetFilter();
                         if(!pFlt || pFlt->GetUserData() != 
pHtmlFlt->GetUserData())
                         {
-                            ScopedVclPtr<MessageDialog> aQuery(new 
MessageDialog(&pViewFrm->GetWindow(),
-                                "SaveAsHTMLDialog", 
"modules/swriter/ui/saveashtmldialog.ui"));
+                            ScopedVclPtrInstance<MessageDialog> 
aQuery(&pViewFrm->GetWindow(),
+                                                                       
"SaveAsHTMLDialog", "modules/swriter/ui/saveashtmldialog.ui");
 
                             if(RET_YES == aQuery->Execute())
                                 bLocalHasName = false;
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index af60dad..f467d4b 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -356,8 +356,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
                 {
                     case SID_STYLE_NEW_BY_EXAMPLE:
                     {
-                        VclPtr<SfxNewStyleDlg> pDlg(new SfxNewStyleDlg( 0,
-                                                    *GetStyleSheetPool()));
+                        VclPtrInstance<SfxNewStyleDlg> pDlg( 0, 
*GetStyleSheetPool());
                         if(RET_OK == pDlg->Execute())
                         {
                             aParam = pDlg->GetName();
diff --git a/sw/source/uibase/shells/tabsh.cxx 
b/sw/source/uibase/shells/tabsh.cxx
index 499896f..620c818 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -736,8 +736,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
                         break;
                     case TBLMERGE_TOOCOMPLEX:
                     {
-                        ScopedVclPtr<MessageDialog> aInfoBox(new 
MessageDialog( GetView().GetWindow(),
-                                    SW_RES( STR_ERR_TABLE_MERGE ), 
VCL_MESSAGE_INFO ) );
+                        ScopedVclPtrInstance<MessageDialog> aInfoBox( 
GetView().GetWindow(),
+                                    SW_RES( STR_ERR_TABLE_MERGE ), 
VCL_MESSAGE_INFO );
                         aInfoBox->Execute();
                         break;
                     }
diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index bc915d2..9e6ed5b 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -259,9 +259,9 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, 
sal_uInt16 nSlot,const
 
 static short lcl_AskRedlineMode(vcl::Window *pWin)
 {
-    ScopedVclPtr<MessBox> aQBox(new MessBox( pWin, 0,
+    ScopedVclPtrInstance<MessBox> aQBox( pWin, 0,
                     OUString( SW_RES( STR_REDLINE_TITLE ) ),
-                    OUString( SW_RES( STR_REDLINE_MSG ) ) ) );
+                    OUString( SW_RES( STR_REDLINE_MSG ) ) );
     aQBox->SetImage( QueryBox::GetStandardImage() );
     const sal_uInt16 nBtnFlags = BUTTONDIALOG_DEFBUTTON |
                         BUTTONDIALOG_OKBUTTON |
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index b12ce65..076b62d3 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -2281,9 +2281,9 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
             if ( lcl_NeedAdditionalDataSource( xDBContext ) )
             {
                 // no data sources are available - create a new one
-                ScopedVclPtr<MessageDialog> aQuery(new 
MessageDialog(&GetViewFrame()->GetWindow(),
+                ScopedVclPtrInstance<MessageDialog> 
aQuery(&GetViewFrame()->GetWindow(),
                     "DataSourcesUnavailableDialog",
-                    "modules/swriter/ui/datasourcesunavailabledialog.ui"));
+                    "modules/swriter/ui/datasourcesunavailabledialog.ui");
                 // no cancel allowed
                 if (RET_OK != aQuery->Execute())
                     return;
@@ -2330,9 +2330,9 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
             OUString sSource;
             if(!GetWrtShell().IsFieldDataSourceAvailable(sSource))
             {
-                ScopedVclPtr<MessageDialog> aWarning(new 
MessageDialog(&GetViewFrame()->GetWindow(),
+                ScopedVclPtrInstance<MessageDialog> 
aWarning(&GetViewFrame()->GetWindow(),
                     "WarnDataSourceDialog",
-                    "modules/swriter/ui/warndatasourcedialog.ui"));
+                    "modules/swriter/ui/warndatasourcedialog.ui");
                 OUString sTmp(aWarning->get_primary_text());
                 aWarning->set_primary_text(sTmp.replaceFirst("%1", sSource));
                 if (RET_OK == aWarning->Execute())
diff --git a/sw/source/uibase/uiview/viewprt.cxx 
b/sw/source/uibase/uiview/viewprt.cxx
index 450b33a..5e533f5 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -201,8 +201,8 @@ void SwView::ExecutePrint(SfxRequest& rReq)
             if(!bSilent && !bFromMerge &&
                     SW_MOD()->GetModuleConfig()->IsAskForMailMerge() && 
pSh->IsAnyDatabaseFieldInDoc())
             {
-                ScopedVclPtr<MessageDialog> aBox(new 
MessageDialog(&GetEditWin(), "PrintMergeDialog",
-                                   "modules/swriter/ui/printmergedialog.ui"));
+                ScopedVclPtrInstance<MessageDialog> aBox(&GetEditWin(), 
"PrintMergeDialog",
+                                   "modules/swriter/ui/printmergedialog.ui");
                 short nRet = aBox->Execute();
                 if(RET_YES == nRet)
                 {
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx 
b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 8715422..70a109c 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -388,7 +388,7 @@ void SwXDocumentSettings::_setSingleValue( const 
comphelper::PropertyInfo & rInf
                     SfxPrinter* pPrinter = 
mpDoc->getIDocumentDeviceAccess().getPrinter( true );
                     if ( OUString ( pPrinter->GetName()) != sPrinterName )
                     {
-                        VclPtr<SfxPrinter> pNewPrinter = new SfxPrinter ( 
pPrinter->GetOptions().Clone(), sPrinterName );
+                        VclPtrInstance<SfxPrinter> pNewPrinter( 
pPrinter->GetOptions().Clone(), sPrinterName );
                         assert (! pNewPrinter->isDisposed() );
                         if( pNewPrinter->IsKnown() )
                         {
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index dc70e16..aed0d29 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -1061,8 +1061,8 @@ NameClashResolveDialogResult 
executeSimpleNameClashResolveDialog( vcl::Window *p
     if ( !xManager.get() )
         return ABORT;
 
-    ScopedVclPtr<NameClashDialog> aDialog(new NameClashDialog(pParent, 
xManager.get(), rTargetFolderURL,
-                             rClashingName, rProposedNewName, bAllowOverwrite) 
);
+    ScopedVclPtrInstance<NameClashDialog> aDialog(pParent, xManager.get(), 
rTargetFolderURL,
+                                                  rClashingName, 
rProposedNewName, bAllowOverwrite);
 
     NameClashResolveDialogResult eResult = (NameClashResolveDialogResult) 
aDialog->Execute();
     rProposedNewName = aDialog->getNewName();
@@ -1209,8 +1209,8 @@ UUIInteractionHelper::handleMacroConfirmRequest(
     if ( pResMgr.get() )
     {
         bool bShowSignatures = aSignInfo.getLength() > 0;
-        ScopedVclPtr<MacroWarning> aWarning(new MacroWarning(
-            getParentProperty(), bShowSignatures, *pResMgr.get()) );
+        ScopedVclPtrInstance<MacroWarning> aWarning(
+            getParentProperty(), bShowSignatures, *pResMgr.get() );
 
         aWarning->SetDocumentURL( aDocumentURL );
         if ( aSignInfo.getLength() > 1 )
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx 
b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 0ccfad7..3526be9 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -202,8 +202,8 @@ bool DocumentDigitalSignatures::ImplViewSignatures(
     DocumentSignatureMode eMode, bool bReadOnly ) throw (RuntimeException, 
std::exception)
 {
     bool bChanges = false;
-    ScopedVclPtr<DigitalSignaturesDialog> aSignaturesDialog(new 
DigitalSignaturesDialog(
-        NULL, mxCtx, eMode, bReadOnly, m_sODFVersion, 
m_bHasDocumentSignature));
+    ScopedVclPtrInstance<DigitalSignaturesDialog> aSignaturesDialog(
+        NULL, mxCtx, eMode, bReadOnly, m_sODFVersion, m_bHasDocumentSignature);
     bool bInit = aSignaturesDialog->Init();
     DBG_ASSERT( bInit, "Error initializing security context!" );
     if ( bInit )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to