[Libreoffice-commits] core.git: Branch 'feature/vclref' - basctl/source basic/source chart2/source compilerplugins/clang cui/source dbaccess/source desktop/source extensions/source reportdesign/source sc/source sd/source sfx2/source starmath/source svtools/source svx/source sw/source uui/source vcl/source vcl/unx vcl/workben

Noel Grandin noel at peralex.com
Tue Mar 17 06:24:18 PDT 2015


 basctl/source/basicide/basidesh.cxx                        |   16 ++++-----
 basctl/source/basicide/basobj2.cxx                         |    2 -
 basctl/source/basicide/macrodlg.cxx                        |    2 -
 basctl/source/basicide/moduldl2.cxx                        |    4 +-
 basic/source/runtime/inputbox.cxx                          |    2 -
 basic/source/runtime/methods.cxx                           |    2 -
 chart2/source/controller/main/ShapeController.cxx          |    8 ++--
 compilerplugins/clang/vclwidgets.cxx                       |   23 +++++++++++++
 cui/source/customize/cfg.cxx                               |   18 +++++-----
 cui/source/customize/macropg.cxx                           |    4 +-
 cui/source/dialogs/SpellDialog.cxx                         |    2 -
 cui/source/dialogs/scriptdlg.cxx                           |    4 +-
 cui/source/factory/init.cxx                                |    2 -
 cui/source/tabpages/autocdlg.cxx                           |    4 +-
 cui/source/tabpages/chardlg.cxx                            |    2 -
 cui/source/tabpages/numpages.cxx                           |    2 -
 cui/source/tabpages/tpbitmap.cxx                           |    6 +--
 cui/source/tabpages/tpcolor.cxx                            |    2 -
 cui/source/tabpages/tpgradnt.cxx                           |    4 +-
 cui/source/tabpages/tphatch.cxx                            |    4 +-
 cui/source/tabpages/tplnedef.cxx                           |    2 -
 dbaccess/source/ui/app/AppController.cxx                   |    5 --
 dbaccess/source/ui/app/AppTitleWindow.cxx                  |    1 
 dbaccess/source/ui/browser/genericcontroller.cxx           |    1 
 dbaccess/source/ui/control/FieldDescControl.cxx            |    9 -----
 dbaccess/source/ui/querydesign/JoinController.cxx          |    5 --
 dbaccess/source/ui/querydesign/JoinTableView.cxx           |    1 
 dbaccess/source/ui/querydesign/QueryViewSwitch.cxx         |    8 ----
 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx |    4 +-
 desktop/source/deployment/gui/dp_gui_service.cxx           |    2 -
 desktop/source/deployment/gui/license_dialog.cxx           |    2 -
 extensions/source/bibliography/datman.cxx                  |    4 +-
 extensions/source/propctrlr/formcomponenthandler.cxx       |    2 -
 reportdesign/source/ui/dlg/Formula.cxx                     |    3 -
 reportdesign/source/ui/report/DesignView.cxx               |   10 -----
 reportdesign/source/ui/report/ReportController.cxx         |    1 
 sc/source/ui/condformat/condformatmgr.cxx                  |    4 +-
 sc/source/ui/dbgui/pvfundlg.cxx                            |    2 -
 sc/source/ui/docshell/docsh4.cxx                           |    2 -
 sc/source/ui/miscdlgs/optsolver.cxx                        |    2 -
 sc/source/ui/miscdlgs/scuiautofmt.cxx                      |    4 +-
 sc/source/ui/pagedlg/tphf.cxx                              |    2 -
 sc/source/ui/view/cellsh1.cxx                              |    2 -
 sc/source/ui/view/tabvwsh3.cxx                             |    8 ++--
 sc/source/ui/view/tabvwshh.cxx                             |    2 -
 sd/source/ui/animations/CustomAnimationPane.cxx            |    4 +-
 sd/source/ui/dlg/sdpreslt.cxx                              |    2 -
 sd/source/ui/slidesorter/view/SlideSorterView.cxx          |    4 +-
 sd/source/ui/table/TableDesignPane.cxx                     |    2 -
 sfx2/source/dialog/dinfdlg.cxx                             |    2 -
 sfx2/source/dialog/templdlg.cxx                            |    2 -
 sfx2/source/dialog/versdlg.cxx                             |    6 +--
 sfx2/source/doc/objserv.cxx                                |   12 +++---
 starmath/source/document.cxx                               |    8 ++--
 svtools/source/control/roadmap.cxx                         |   14 -------
 svtools/source/misc/ehdl.cxx                               |    2 -
 svx/source/dialog/docrecovery.cxx                          |    6 +--
 svx/source/form/fmtextcontrolshell.cxx                     |    6 +--
 svx/source/unodraw/recoveryui.cxx                          |    4 +-
 sw/source/ui/dbui/addresslistdialog.cxx                    |    6 +--
 sw/source/ui/dbui/createaddresslistdialog.cxx              |    2 -
 sw/source/ui/dbui/mmaddressblockpage.cxx                   |    8 ++--
 sw/source/ui/dbui/mmdocselectpage.cxx                      |    2 -
 sw/source/ui/dbui/mmgreetingspage.cxx                      |    4 +-
 sw/source/ui/dbui/mmoutputpage.cxx                         |    4 +-
 sw/source/ui/dbui/mmoutputtypepage.cxx                     |    2 -
 sw/source/ui/dbui/selectdbtabledialog.cxx                  |    2 -
 sw/source/ui/envelp/envfmt.cxx                             |    2 -
 sw/source/ui/envelp/envprt.cxx                             |    2 -
 sw/source/ui/envelp/labfmt.cxx                             |    2 -
 sw/source/ui/envelp/labprt.cxx                             |    2 -
 sw/source/ui/index/cnttab.cxx                              |    4 +-
 sw/source/ui/index/swuiidxmrk.cxx                          |    2 -
 sw/source/ui/misc/glossary.cxx                             |    4 +-
 sw/source/ui/misc/outline.cxx                              |    2 -
 sw/source/ui/table/tautofmt.cxx                            |    6 +--
 sw/source/uibase/app/docsh2.cxx                            |    2 -
 sw/source/uibase/app/docst.cxx                             |    2 -
 sw/source/uibase/docvw/frmsidebarwincontainer.cxx          |    2 -
 uui/source/iahndl-authentication.cxx                       |   10 ++---
 uui/source/iahndl-errorhandler.cxx                         |    2 -
 uui/source/iahndl-filter.cxx                               |    3 -
 uui/source/iahndl-locking.cxx                              |   10 ++---
 uui/source/iahndl-ssl.cxx                                  |    6 +--
 vcl/source/app/svapp.cxx                                   |    2 -
 vcl/unx/gtk/a11y/atkutil.cxx                               |    2 -
 vcl/workben/vcldemo.cxx                                    |    4 +-
 87 files changed, 171 insertions(+), 205 deletions(-)

New commits:
commit 222709e361ddc0e8158fc54c81c27e134d8352e7
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Mar 17 15:13:34 2015 +0200

    vclwidget: fix more places that should be wrapping in VclPtr
    
    Change-Id: I31c9115662da2f81e1b22be91ee58e2862076b8e

diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index e1d92e1..d161f50 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -297,7 +297,7 @@ void Shell::onDocumentClosed( const ScriptDocument& _rDocument )
 
     bool bSetCurWindow = false;
     bool bSetCurLib = ( _rDocument == m_aCurDocument );
-    std::vector<BaseWindow*> aDeleteVec;
+    std::vector<VclPtr<BaseWindow> > aDeleteVec;
 
     // remove all windows which belong to this document
     for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
@@ -318,7 +318,7 @@ void Shell::onDocumentClosed( const ScriptDocument& _rDocument )
         }
     }
     // delete windows outside main loop so we don't invalidate the original iterator
-    for (std::vector<BaseWindow*>::const_iterator it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it)
+    for (auto it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it)
     {
         BaseWindow* pWin = *it;
         pWin->StoreData();
@@ -599,14 +599,14 @@ void Shell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&,
 void Shell::CheckWindows()
 {
     bool bSetCurWindow = false;
-    std::vector<BaseWindow*> aDeleteVec;
+    std::vector<VclPtr<BaseWindow> > aDeleteVec;
     for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
     {
         BaseWindow* pWin = it->second;
         if ( pWin->GetStatus() & BASWIN_TOBEKILLED )
             aDeleteVec.push_back( pWin );
     }
-    for ( std::vector<BaseWindow*>::const_iterator it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it )
+    for ( auto it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it )
     {
         BaseWindow* pWin = *it;
         pWin->StoreData();
@@ -623,14 +623,14 @@ void Shell::CheckWindows()
 void Shell::RemoveWindows( const ScriptDocument& rDocument, const OUString& rLibName, bool bDestroy )
 {
     bool bChangeCurWindow = pCurWin ? false : true;
-    std::vector<BaseWindow*> aDeleteVec;
+    std::vector<VclPtr<BaseWindow> > aDeleteVec;
     for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
     {
         BaseWindow* pWin = it->second;
         if ( pWin->IsDocument( rDocument ) && pWin->GetLibName() == rLibName )
             aDeleteVec.push_back( pWin );
     }
-    for ( std::vector<BaseWindow*>::const_iterator it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it )
+    for ( auto it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it )
     {
         BaseWindow* pWin = *it;
         if ( pWin == pCurWin )
@@ -650,7 +650,7 @@ void Shell::UpdateWindows()
     bool bChangeCurWindow = pCurWin ? false : true;
     if ( !m_aCurLibName.isEmpty() )
     {
-        std::vector<BaseWindow*> aDeleteVec;
+        std::vector<VclPtr<BaseWindow> > aDeleteVec;
         for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
         {
             BaseWindow* pWin = it->second;
@@ -666,7 +666,7 @@ void Shell::UpdateWindows()
                     aDeleteVec.push_back( pWin );
             }
         }
-        for ( std::vector<BaseWindow*>::const_iterator it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it )
+        for ( auto it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it )
         {
             RemoveWindow( *it, false, false );
         }
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index bd4a67b..e4460b2 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -242,7 +242,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument,
     OUString aScriptURL;
     SbMethod* pMethod = NULL;
 
-    boost::scoped_ptr< MacroChooser > pChooser( new MacroChooser( NULL, true ) );
+    VclPtr< MacroChooser > pChooser( new MacroChooser( NULL, true ) );
     if ( bChooseOnly || !SvtModuleOptions().IsBasicIDE() )
         pChooser->SetMode(MacroChooser::ChooseOnly);
 
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index af715f5..f294df2 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());
-        boost::scoped_ptr<OrganizeDialog> pDlg(new OrganizeDialog( this, 0, aDesc ));
+        VclPtr<OrganizeDialog> pDlg(new OrganizeDialog( 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 0d5b23b..07a6149 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -687,7 +687,7 @@ IMPL_LINK( LibPage, ButtonHdl, Button *, pButton )
                 bool const bProtected = xPasswd->isLibraryPasswordProtected( aLibName );
 
                 // change password dialog
-                boost::scoped_ptr<SvxPasswordDialog> pDlg(new SvxPasswordDialog( this, true, !bProtected ));
+                VclPtr<SvxPasswordDialog> pDlg(new SvxPasswordDialog( this, true, !bProtected ));
                 pDlg->SetCheckPasswordHdl( LINK( this, LibPage, CheckPasswordHdl ) );
 
                 if ( pDlg->Execute() == RET_OK )
@@ -825,7 +825,7 @@ void LibPage::InsertLib()
 
         if ( xModLibContImport.is() || xDlgLibContImport.is() )
         {
-            boost::scoped_ptr<LibDialog> pLibDlg;
+            VclPtr<LibDialog> pLibDlg;
 
             Reference< script::XLibraryContainer > xModLibContImp( xModLibContImport, UNO_QUERY );
             Reference< script::XLibraryContainer > xDlgLibContImp( xDlgLibContImport, UNO_QUERY );
diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx
index 94d0693..eef9ae6 100644
--- a/basic/source/runtime/inputbox.cxx
+++ b/basic/source/runtime/inputbox.cxx
@@ -183,7 +183,7 @@ RTLFUNC(InputBox)
             nX = rPar.Get(4)->GetLong();
             nY = rPar.Get(5)->GetLong();
         }
-        boost::scoped_ptr<SvRTLInputBox> pDlg(new SvRTLInputBox(Application::GetDefDialogParent(),
+        VclPtr<SvRTLInputBox> pDlg(new SvRTLInputBox(Application::GetDefDialogParent(),
                     rPrompt,aTitle,aDefault,nX,nY));
         pDlg->Execute();
         rPar.Get(0)->PutString( pDlg->GetText() );
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 6bf3a93..94aed57 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -4601,7 +4601,7 @@ RTLFUNC(MsgBox)
     }
 
     nType &= (16+32+64);
-    boost::scoped_ptr<MessBox> pBox;
+    VclPtr<MessBox> pBox;
 
     SolarMutexGuard aSolarGuard;
 
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index afea410..c5606f9 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -549,8 +549,8 @@ void ShapeController::executeDispatch_FontDialog()
             SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
             pDrawViewWrapper->GetAttributes( aAttr );
             ViewElementListProvider aViewElementListProvider( pDrawModelWrapper );
-            ::boost::scoped_ptr< ShapeFontDialog > pDlg( new ShapeFontDialog( pParent, &aAttr, &aViewElementListProvider ) );
-            if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+            VclPtr< ShapeFontDialog > pDlg( new ShapeFontDialog( pParent, &aAttr, &aViewElementListProvider ) );
+            if ( pDlg->Execute() == RET_OK )
             {
                 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
                 pDrawViewWrapper->SetAttributes( *pOutAttr );
@@ -587,8 +587,8 @@ void ShapeController::executeDispatch_ParagraphDialog()
             aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) );
             aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) );
 
-            ::boost::scoped_ptr< ShapeParagraphDialog > pDlg( new ShapeParagraphDialog( pParent, &aNewAttr ) );
-            if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
+            VclPtr< ShapeParagraphDialog > pDlg( new ShapeParagraphDialog( pParent, &aNewAttr ) );
+            if ( pDlg->Execute() == RET_OK )
             {
                 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
                 pDrawViewWrapper->SetAttributes( *pOutAttr );
diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx
index 9de6af8..a88eb2b 100644
--- a/compilerplugins/clang/vclwidgets.cxx
+++ b/compilerplugins/clang/vclwidgets.cxx
@@ -215,6 +215,29 @@ bool VCLWidgets::VisitVarDecl(const VarDecl * pVarDecl) {
             pVarDecl->getLocation())
           << pVarDecl->getSourceRange();
     }
+    if (   !startsWith(pVarDecl->getType().getAsString(), "std::vector<vcl::Window *>")
+        && !startsWith(pVarDecl->getType().getAsString(), "std::map<vcl::Window *, Size>")
+        && !startsWith(pVarDecl->getType().getAsString(), "std::map<vcl::Window *, class Size>")
+        && !startsWith(pVarDecl->getType().getAsString(), "::std::vector<class Button *>")
+        && !startsWith(pVarDecl->getType().getAsString(), "::std::vector<Button *>")
+        && !startsWith(pVarDecl->getType().getAsString(), "::std::mem_fun1_t<")
+        && !startsWith(pVarDecl->getType().getAsString(), "::comphelper::mem_fun1_t<")
+        && !startsWith(pVarDecl->getType().getAsString(), "::std::pair<formula::RefButton *, formula::RefEdit *>")
+        && !startsWith(pVarDecl->getType().getAsString(), "::std::pair<RefButton *, RefEdit *>")
+        && !startsWith(pVarDecl->getType().getAsString(), "std::list<SwSidebarWin *>")
+        && !startsWith(pVarDecl->getType().getAsString(), "::std::map<OTableWindow *, sal_Int32>")
+        && !startsWith(pVarDecl->getType().getAsString(), "::std::map<class OTableWindow *, sal_Int32>")
+        && !startsWith(pVarDecl->getType().getAsString(), "::std::multimap<sal_Int32, OTableWindow *>")
+        && !startsWith(pVarDecl->getType().getAsString(), "::std::multimap<sal_Int32, class OTableWindow *>")
+        && !startsWith(pVarDecl->getType().getAsString(), "::dbp::OMultiInstanceAutoRegistration< ::dbp::OUnoAutoPilot<")
+        && containsWindowSubclass(pVarDecl->getType()))
+    {
+        report(
+            DiagnosticsEngine::Warning,
+            "vcl::Window subclass should be wrapped in VclPtr. " + pVarDecl->getType().getAsString(),
+            pVarDecl->getLocation())
+          << pVarDecl->getSourceRange();
+    }
     return true;
 }
 
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 09a1705..c252385 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 );
 
-        boost::scoped_ptr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
+        VclPtr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
         pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU );
         pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_RENAME_MENU ) );
 
@@ -2460,7 +2460,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton )
     {
         SvxConfigEntry* pMenuData = GetTopLevelSelection();
 
-        boost::scoped_ptr<SvxMainMenuOrganizerDialog> pDialog(
+        VclPtr<SvxMainMenuOrganizerDialog> pDialog(
             new SvxMainMenuOrganizerDialog( this,
                 GetSaveInData()->GetEntries(), pMenuData ));
 
@@ -2486,7 +2486,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton )
         OUString aNewName;
         OUString aDesc = CUI_RESSTR( RID_SVXSTR_SUBMENU_NAME );
 
-        boost::scoped_ptr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
+        VclPtr<SvxNameDialog> pNameDialog(new SvxNameDialog( 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 );
 
-        boost::scoped_ptr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
+        VclPtr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
         pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU_ITEM );
         pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_RENAME_MENU ) );
 
@@ -2563,7 +2563,7 @@ IMPL_LINK( SvxMenuConfigPage, NewMenuHdl, Button *, pButton )
 {
     (void)pButton;
 
-    boost::scoped_ptr<SvxMainMenuOrganizerDialog> pDialog(
+    VclPtr<SvxMainMenuOrganizerDialog> pDialog(
         new SvxMainMenuOrganizerDialog( 0,
             GetSaveInData()->GetEntries(), NULL, true ));
 
@@ -3103,7 +3103,7 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton )
             OUString aNewName( stripHotKey( pToolbar->GetName() ) );
             OUString aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME );
 
-            boost::scoped_ptr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
+            VclPtr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
             pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR );
             pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_RENAME_TOOLBAR ) );
 
@@ -3189,7 +3189,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
             OUString aNewName( stripHotKey( pEntry->GetName() ) );
             OUString aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME );
 
-            boost::scoped_ptr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
+            VclPtr<SvxNameDialog> pNameDialog(new SvxNameDialog( this, aNewName, aDesc ));
             pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM );
             pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_RENAME_TOOLBAR ) );
 
@@ -3319,7 +3319,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
                 }
             }
 
-            boost::scoped_ptr<SvxIconSelectorDialog> pIconDialog(
+            VclPtr<SvxIconSelectorDialog> pIconDialog(
                 new SvxIconSelectorDialog( 0,
                     GetSaveInData()->GetImageManager(),
                     GetSaveInData()->GetParentImageManager() ));
@@ -4449,7 +4449,7 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton )
     OUString aNewURL =
         generateCustomURL( GetSaveInData()->GetEntries() );
 
-    boost::scoped_ptr<SvxNewToolbarDialog> pNameDialog(new SvxNewToolbarDialog( 0, aNewName ));
+    VclPtr<SvxNewToolbarDialog> pNameDialog(new SvxNewToolbarDialog( 0, aNewName ));
 
     sal_uInt16 nInsertPos;
     for ( sal_uInt16 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i )
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 4fb963b..73a451d 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -659,7 +659,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton*
                 )
             )
     {
-        boost::scoped_ptr<AssignComponentDialog> pAssignDlg(new AssignComponentDialog( pThis, sEventURL ));
+        VclPtr<AssignComponentDialog> pAssignDlg(new AssignComponentDialog( pThis, sEventURL ));
 
         short ret = pAssignDlg->Execute();
         if( ret )
@@ -673,7 +673,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton*
     else if( bAssEnabled )
     {
         // assign pressed
-        boost::scoped_ptr<SvxScriptSelectorDialog> pDlg(new SvxScriptSelectorDialog( pThis, false, pThis->GetFrame() ));
+        VclPtr<SvxScriptSelectorDialog> pDlg(new SvxScriptSelectorDialog( 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 d627bc4..a820741 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -522,7 +522,7 @@ void SpellDialog::StartSpellOptDlg_Impl()
     };
     SfxItemSet aSet( SfxGetpApp()->GetPool(), aSpellInfos);
     aSet.Put(SfxSpellCheckItem( xSpell, SID_ATTR_SPELL ));
-    boost::scoped_ptr<SfxSingleTabDialog> pDlg(
+    VclPtr<SfxSingleTabDialog> pDlg(
         new SfxSingleTabDialog(this, aSet, "SpellOptionsDialog", "cui/ui/spelloptionsdialog.ui"));
     SfxTabPage* pPage = SvxLinguTabPage::Create( pDlg->get_content_area(), &aSet );
     static_cast<SvxLinguTabPage*>(pPage)->HideGroups( GROUP_MODULES );
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 9217d84..8df83e6 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -911,7 +911,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
             }
         }
 
-        boost::scoped_ptr< CuiInputDialog > xNewDlg( new CuiInputDialog( static_cast<vcl::Window*>(this), nMode ) );
+        VclPtr< CuiInputDialog > xNewDlg( new CuiInputDialog( static_cast<vcl::Window*>(this), nMode ) );
         xNewDlg->SetObjectName( aNewName );
 
         do
@@ -1034,7 +1034,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
         }
         sal_uInt16 nMode = INPUTMODE_RENAME;
 
-        boost::scoped_ptr< CuiInputDialog > xNewDlg( new CuiInputDialog( static_cast<vcl::Window*>(this), nMode ) );
+        VclPtr< CuiInputDialog > xNewDlg( new CuiInputDialog( static_cast<vcl::Window*>(this), nMode ) );
         xNewDlg->SetObjectName( aNewName );
 
         bool bValid;
diff --git a/cui/source/factory/init.cxx b/cui/source/factory/init.cxx
index eb24820..2d179a3 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;
-    boost::scoped_ptr<SvxCharacterMap> aDlg(new SvxCharacterMap( i_pParent ));
+    VclPtr<SvxCharacterMap> aDlg(new SvxCharacterMap( i_pParent ));
     aDlg->DisableFontSelection();
     aDlg->SetCharFont(i_rFont);
     if ( aDlg->Execute() == RET_OK )
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 5edbfa5..01e8eef 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)
     {
-        boost::scoped_ptr<SvxCharacterMap> pMapDlg(new SvxCharacterMap(this));
+        VclPtr<SvxCharacterMap> pMapDlg(new SvxCharacterMap(this));
         ImpUserData* pUserData = (ImpUserData*)m_pCheckLB->FirstSelected()->GetUserData();
         pMapDlg->SetCharFont(*pUserData->pFont);
         pMapDlg->SetChar( (*pUserData->pString)[0] );
@@ -2061,7 +2061,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn )
     else if (pBtn == m_pDblEndQuotePB)
         nMode = DBL_END;
     // start character selection dialog
-    boost::scoped_ptr<SvxCharacterMap> pMap(new SvxCharacterMap( this, true ));
+    VclPtr<SvxCharacterMap> pMap(new SvxCharacterMap( 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 96b7791..abf0352 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -3467,7 +3467,7 @@ void SvxCharTwoLinesPage::Initialize()
 void SvxCharTwoLinesPage::SelectCharacter( ListBox* pBox )
 {
     bool bStart = pBox == m_pStartBracketLB;
-    boost::scoped_ptr<SvxCharacterMap> aDlg(new SvxCharacterMap( this ));
+    VclPtr<SvxCharacterMap> aDlg(new SvxCharacterMap( this ));
     aDlg->DisableFontSelection();
 
     if ( aDlg->Execute() == RET_OK )
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 548011f..bc71774 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)
 {
-    boost::scoped_ptr<SvxCharacterMap> pMap(new SvxCharacterMap( this, true ));
+    VclPtr<SvxCharacterMap> pMap(new SvxCharacterMap( this, true ));
 
     sal_uInt16 nMask = 1;
     const vcl::Font* pFmtFont = 0;
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 1a0602e..8c892c5 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -446,7 +446,7 @@ long SvxBitmapTabPage::CheckChanges_Impl()
         {
             ResMgr& rMgr = CUI_MGR();
             Image aWarningBoxImage = WarningBox::GetStandardImage();
-            boost::scoped_ptr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
+            VclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
                                                         SVX_RES( RID_SVXSTR_BITMAP ),
                                                         CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ),
                                                         &aWarningBoxImage  ));
@@ -510,7 +510,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl)
     DBG_ASSERT(pFact, "Dialog creation failed!");
     boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ));
     DBG_ASSERT(pDlg, "Dialog creation failed!");
-    boost::scoped_ptr<MessageDialog> pWarnBox;
+    VclPtr<MessageDialog> pWarnBox;
     sal_uInt16         nError(1);
 
     while( pDlg->Execute() == RET_OK )
@@ -610,7 +610,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl)
         if( !nError )
         {
             OUString aDesc( ResId(RID_SVXSTR_DESC_EXT_BITMAP, rMgr) );
-            boost::scoped_ptr<MessageDialog> pWarnBox;
+            VclPtr<MessageDialog> pWarnBox;
 
             // convert file URL to UI name
             OUString        aName;
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 9e38104..eac2abc 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -539,7 +539,7 @@ long SvxColorTabPage::CheckChanges_Impl()
         {
             ResMgr& rMgr = CUI_MGR();
             Image aWarningBoxImage = WarningBox::GetStandardImage();
-            boost::scoped_ptr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
+            VclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
                                                         SVX_RESSTR( RID_SVXSTR_COLOR ),
                                                         ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ),
                                                         &aWarningBoxImage ));
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 2edb5e6..b1e7e65 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -291,7 +291,7 @@ long SvxGradientTabPage::CheckChanges_Impl()
         {
             ResMgr& rMgr = CUI_MGR();
             Image aWarningBoxImage = WarningBox::GetStandardImage();
-            boost::scoped_ptr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
+            VclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
                                                         SVX_RESSTR( RID_SVXSTR_GRADIENT ),
                                                         CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_GRADIENT ),
                                                         &aWarningBoxImage ));
@@ -457,7 +457,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl)
     DBG_ASSERT(pFact, "Dialog creation failed!");
     boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ));
     DBG_ASSERT(pDlg, "Dialog creation failed!");
-    boost::scoped_ptr<MessageDialog> pWarnBox;
+    VclPtr<MessageDialog> pWarnBox;
     sal_uInt16         nError   = 1;
 
     while( pDlg->Execute() == RET_OK )
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 17fa590..7567e1b 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -261,7 +261,7 @@ long SvxHatchTabPage::CheckChanges_Impl()
     {
         ResMgr& rMgr = CUI_MGR();
         Image aWarningBoxImage = WarningBox::GetStandardImage();
-        boost::scoped_ptr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
+        VclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
                                                         SVX_RESSTR( RID_SVXSTR_HATCH ),
                                                         CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_HATCH ),
                                                         &aWarningBoxImage ));
@@ -500,7 +500,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl)
     DBG_ASSERT(pFact, "Dialog creation failed!");
     boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ));
     DBG_ASSERT(pDlg, "Dialog creation failed!");
-    boost::scoped_ptr<MessageDialog> pWarnBox;
+    VclPtr<MessageDialog> pWarnBox;
     sal_uInt16         nError   = 1;
 
     while( pDlg->Execute() == RET_OK )
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 735fd10..9bef1c7 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -246,7 +246,7 @@ void SvxLineDefTabPage::CheckChanges_Impl()
     {
         ResMgr& rMgr = CUI_MGR();
         Image aWarningBoxImage = WarningBox::GetStandardImage();
-        boost::scoped_ptr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
+        VclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
                                                     SVX_RESSTR( RID_SVXSTR_LINESTYLE ),
                                                     OUString( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, rMgr ) ),
                                                     &aWarningBoxImage ));
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 9d45476..300900f 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -309,9 +309,7 @@ OApplicationController::~OApplicationController()
         osl_atomic_increment( &m_refCount );
         dispose();
     }
-    ::std::unique_ptr< vcl::Window> aTemp( getView() );
     clearView();
-
 }
 
 IMPLEMENT_FORWARD_XTYPEPROVIDER2(OApplicationController,OApplicationController_CBASE,OApplicationController_Base)
@@ -447,7 +445,6 @@ bool OApplicationController::Construct(vcl::Window* _pParent)
 
     if ( !bSuccess )
     {
-        ::std::unique_ptr< vcl::Window> aTemp( getView() );
         clearView();
         return false;
     }
@@ -2048,7 +2045,7 @@ void OApplicationController::renameEntry()
         if ( xContainer.is() )
         {
             ::std::unique_ptr< IObjectNameCheck > pNameChecker;
-            ::std::unique_ptr< OSaveAsDlg > aDialog;
+            VclPtr< OSaveAsDlg > aDialog;
 
             Reference<XRename> xRename;
             const ElementType eType = getContainer()->getElementType();
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index ffd713d..f8e9ffd 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -55,7 +55,6 @@ void OTitleWindow::dispose()
     if ( m_pChild )
     {
         m_pChild->Hide();
-        boost::scoped_ptr<vcl::Window> aTemp(m_pChild);
     }
     m_pChild.disposeAndClear();
     m_aSpace1.disposeAndClear();
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 81cf9c6..5ff94cc 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -312,7 +312,6 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen
     catch(Exception&)
     {
         // no one clears my view if I won't
-        boost::scoped_ptr<vcl::Window> aTemp(m_pView);
         m_pView = NULL;
         throw;
     }
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 1e0dddd..1161728 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -164,17 +164,8 @@ OFieldDescControl::~OFieldDescControl()
 
 void OFieldDescControl::dispose()
 {
-    {
-        boost::scoped_ptr<vcl::Window> aTemp(m_pVertScroll);
-        m_pVertScroll    = NULL;
-    }
-    {
-        boost::scoped_ptr<vcl::Window> aTemp(m_pHorzScroll);
-        m_pHorzScroll    = NULL;
-    }
     if ( m_bAdded )
         ::dbaui::notifySystemWindow(this,this,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
-    pLastFocusWindow = NULL;
 
     // Destroy children
     DeactivateAggregate( tpDefault );
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index 9aab0ce..c5a3cad 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -170,10 +170,7 @@ OJoinDesignView* OJoinController::getJoinView()
 
 void OJoinController::disposing()
 {
-    {
-        boost::scoped_ptr< vcl::Window > pEnsureDelete( m_pAddTableDialog );
-        m_pAddTableDialog   = NULL;
-    }
+    m_pAddTableDialog   = NULL;
 
     OJoinController_BASE::disposing();
 
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index cb146be..d55b937 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -1537,7 +1537,6 @@ void OJoinTableView::clearLayoutInformation()
     {
         if ( aIter->second )
             aIter->second->clearListBox();
-        boost::scoped_ptr<vcl::Window> aTemp(aIter->second);
         aIter->second = NULL;
     }
 
diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
index e506dbe..600f6db 100644
--- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
+++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
@@ -42,14 +42,6 @@ OQueryViewSwitch::OQueryViewSwitch(OQueryContainerWindow* _pParent, OQueryContro
 
 OQueryViewSwitch::~OQueryViewSwitch()
 {
-    {
-        boost::scoped_ptr<vcl::Window> aTemp(m_pTextView);
-        m_pTextView = NULL;
-    }
-    {
-        boost::scoped_ptr<vcl::Window> aTemp(m_pDesignView);
-        m_pDesignView = NULL;
-    }
 }
 
 void OQueryViewSwitch::Construct()
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index c92b74b..8bd1af5 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -571,7 +571,7 @@ void ProgressCmdEnv::update_( uno::Any const & rStatus )
             text = ::comphelper::anyToString( rStatus ); // fallback
 
         const SolarMutexGuard aGuard;
-        const boost::scoped_ptr<MessageDialog> aBox(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, text));
+        VclPtr<MessageDialog> aBox(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, text));
         aBox->Execute();
     }
     ++m_nCurrentProgress;
@@ -813,7 +813,7 @@ void ExtensionCmdQueue::Thread::execute()
                     msg = ::comphelper::anyToString(exc);
 
                 const SolarMutexGuard guard;
-                boost::scoped_ptr<MessageDialog> box(
+                VclPtr<MessageDialog> box(
                     new MessageDialog(currentCmdEnv->activeDialog(), msg));
                 if ( m_pDialogHelper )
                     box->SetText( m_pDialogHelper->getWindow()->GetText() );
diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx
index 1063f7c..9170628 100644
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -223,7 +223,7 @@ void ServiceImpl::startExecuteModal(
         catch (const Exception & exc) {
             if (bAppUp) {
                 const SolarMutexGuard guard;
-                boost::scoped_ptr<MessageDialog> box(
+                VclPtr<MessageDialog> box(
                     new MessageDialog(Application::GetActiveTopWindow(),
                                       exc.Message));
                 box->Execute();
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index 6926d2e..cea6f8c 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -329,7 +329,7 @@ sal_Int16 LicenseDialog::execute() throw (RuntimeException, std::exception)
 
 sal_Int16 LicenseDialog::solar_execute()
 {
-    std::unique_ptr<LicenseDialogImpl> dlg(
+    VclPtr<LicenseDialogImpl> dlg(
         new LicenseDialogImpl(
             VCLUnoHelper::GetWindow(m_parent),
             m_xComponentContext, m_sExtensionName, m_sLicenseText));
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index b02159e..d1828a1 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -1484,7 +1484,7 @@ void BibDataManager::RemoveMeAsUidListener()
 
 void BibDataManager::CreateMappingDialog(vcl::Window* pParent)
 {
-    boost::scoped_ptr<MappingDialog_Impl> pDlg(new MappingDialog_Impl(pParent, this));
+    VclPtr<MappingDialog_Impl> pDlg(new MappingDialog_Impl(pParent, this));
     if(RET_OK == pDlg->Execute() && pBibView)
     {
         reload();
@@ -1494,7 +1494,7 @@ void BibDataManager::CreateMappingDialog(vcl::Window* pParent)
 OUString BibDataManager::CreateDBChangeDialog(vcl::Window* pParent)
 {
     OUString uRet;
-    boost::scoped_ptr<DBChangeDialog_Impl> pDlg(new DBChangeDialog_Impl(pParent, this ));
+    VclPtr<DBChangeDialog_Impl> pDlg(new DBChangeDialog_Impl(pParent, this ));
     if(RET_OK == pDlg->Execute())
     {
         OUString sNewURL = pDlg->GetCurrentURL();
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 82e5d9e..8a4bedc 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2722,7 +2722,7 @@ namespace pcr
             aCoreSet.Put( aFormatter );
 
             // a tab dialog with a single page
-            boost::scoped_ptr< SfxSingleTabDialog > xDialog(new SfxSingleTabDialog(
+            VclPtr< SfxSingleTabDialog > xDialog(new SfxSingleTabDialog(
                 impl_getDefaultDialogParent_nothrow(), aCoreSet,
                 "FormatNumberDialog", "cui/ui/formatnumberdialog.ui"));
             SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index 5d2032e..1883b66 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -96,9 +96,6 @@ void FormulaDialog::dispose()
     {
         SvtViewOptions aDlgOpt( E_WINDOW, OUString( HID_RPT_FIELD_SEL_WIN ) );
         aDlgOpt.SetWindowState(OStringToOUString(m_pAddField->GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)), RTL_TEXTENCODING_ASCII_US));
-
-        boost::scoped_ptr<vcl::Window> aTemp2(m_pAddField);
-        m_pAddField = NULL;
     }
 
     StoreFormEditData( m_pFormulaData );
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index b6bf640..f9c3a72 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -139,28 +139,18 @@ void ODesignView::dispose()
     if ( m_pPropWin )
     {
         notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
-        ::std::unique_ptr<vcl::Window> aTemp2(m_pPropWin);
-        m_pPropWin = NULL;
     }
     if ( m_pAddField )
     {
         SvtViewOptions aDlgOpt( E_WINDOW, OUString( UID_RPT_RPT_APP_VIEW ) );
         aDlgOpt.SetWindowState(OStringToOUString(m_pAddField->GetWindowState(WINDOWSTATE_MASK_ALL), RTL_TEXTENCODING_ASCII_US));
         notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
-        ::std::unique_ptr<vcl::Window> aTemp2(m_pAddField);
-        m_pAddField = NULL;
     }
     if ( m_pReportExplorer )
     {
         SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pReportExplorer->GetHelpId(), RTL_TEXTENCODING_UTF8));
         aDlgOpt.SetWindowState(OStringToOUString(m_pReportExplorer->GetWindowState(WINDOWSTATE_MASK_ALL), RTL_TEXTENCODING_ASCII_US));
         notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
-        ::std::unique_ptr<vcl::Window> aTemp2(m_pReportExplorer);
-        m_pReportExplorer = NULL;
-    }
-    {
-        ::std::unique_ptr<vcl::Window> aTemp2(m_pTaskPane);
-        m_pTaskPane = NULL;
     }
 
     m_aSplitWin.disposeAndClear();
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index aa47270..2876ffd 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -339,7 +339,6 @@ void OReportController::disposing()
     {
         SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pGroupsFloater->GetHelpId(), RTL_TEXTENCODING_UTF8));
         aDlgOpt.SetWindowState(OStringToOUString(m_pGroupsFloater->GetWindowState(WINDOWSTATE_MASK_ALL), RTL_TEXTENCODING_ASCII_US));
-        ::std::unique_ptr<FloatingWindow> aTemp(m_pGroupsFloater);
         m_pGroupsFloater = NULL;
     }
 
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index 08d64eb..d75a39d 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -175,7 +175,7 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, EditBtnHdl)
     sal_uInt16 nId = 1;
     ScModule* pScMod = SC_MOD();
     pScMod->SetRefDialog( nId, true );
-    boost::scoped_ptr<ScCondFormatDlg> pDlg(new ScCondFormatDlg(this, mpDoc, pFormat, pFormat->GetRange(),
+    VclPtr<ScCondFormatDlg> pDlg(new ScCondFormatDlg(this, mpDoc, pFormat, pFormat->GetRange(),
                                                pFormat->GetRange().GetTopLeftCorner(), condformat::dialog::NONE));
     Show(false, 0);
     if(pDlg->Execute() == RET_OK)
@@ -221,7 +221,7 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, AddBtnHdl)
     sal_uInt16 nId = 1;
     ScModule* pScMod = SC_MOD();
     pScMod->SetRefDialog( nId, true );
-    boost::scoped_ptr<ScCondFormatDlg> pDlg(new ScCondFormatDlg(this, mpDoc, NULL, ScRangeList(),
+    VclPtr<ScCondFormatDlg> pDlg(new ScCondFormatDlg(this, mpDoc, NULL, ScRangeList(),
                                                maPos, condformat::dialog::CONDITION));
     Show(false, 0);
     if(pDlg->Execute() == RET_OK)
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 68c2299..c33b22e 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -537,7 +537,7 @@ IMPL_LINK( ScDPSubtotalDlg, ClickHdl, PushButton*, pBtn )
 {
     if (pBtn == mpBtnOptions)
     {
-        boost::scoped_ptr<ScDPSubtotalOptDlg> pDlg(new ScDPSubtotalOptDlg( this, mrDPObj, maLabelData, mrDataFields, mbEnableLayout ));
+        VclPtr<ScDPSubtotalOptDlg> pDlg(new ScDPSubtotalOptDlg( this, mrDPObj, maLabelData, mrDataFields, mbEnableLayout ));
         if( pDlg->Execute() == RET_OK )
             pDlg->FillLabelData( maLabelData );
     }
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 3f323c8..c6ebcb4 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1130,7 +1130,7 @@ bool ScDocShell::ExecuteChangeProtectionDialog( vcl::Window* _pParent, bool bJus
         OUString aText( ScResId( SCSTR_PASSWORD ) );
         OUString aPassword;
 
-        boost::scoped_ptr<SfxPasswordDialog> pDlg(new SfxPasswordDialog(
+        VclPtr<SfxPasswordDialog> pDlg(new SfxPasswordDialog(
             _pParent ? _pParent : GetActiveDialogParent(), &aText ));
         pDlg->SetText( aTitle );
         pDlg->SetMinLen( 1 );
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 5a5f546..6f13c78 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -636,7 +636,7 @@ IMPL_LINK( ScOptSolverDlg, BtnHdl, PushButton*, pBtn )
     else if ( pBtn == m_pBtnOpt )
     {
         //! move options dialog to UI lib?
-        boost::scoped_ptr<ScSolverOptionsDialog> pOptDlg(
+        VclPtr<ScSolverOptionsDialog> pOptDlg(
             new ScSolverOptionsDialog( this, maImplNames, maDescriptions, maEngine, maProperties ));
         if ( pOptDlg->Execute() == RET_OK )
         {
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index fec61f2..a170233 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -224,7 +224,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, AddHdl)
 
         while ( !bOk )
         {
-            boost::scoped_ptr<ScStringInputDlg> pDlg(new ScStringInputDlg( this,
+            VclPtr<ScStringInputDlg> pDlg(new ScStringInputDlg( this,
                                          aStrTitle,
                                          aStrLabel,
                                          aFormatName,
@@ -331,7 +331,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, RenameHdl)
         OUString aFormatName = m_pLbFormat->GetSelectEntry();
         OUString aEntry;
 
-        boost::scoped_ptr<ScStringInputDlg> pDlg(new ScStringInputDlg( this,
+        VclPtr<ScStringInputDlg> pDlg(new ScStringInputDlg( this,
                                          aStrRename,
                                          aStrLabel,
                                          aFormatName,
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index a7cee6c..bd017c8 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -201,7 +201,7 @@ IMPL_LINK_NOARG(ScHFPage, HFEditHdl)
     else
     {
         OUString  aText;
-        boost::scoped_ptr<SfxSingleTabDialog> pDlg(new SfxSingleTabDialog(this, aDataSet));
+        VclPtr<SfxSingleTabDialog> pDlg(new SfxSingleTabDialog(this, aDataSet));
         const int nSettingsId = 42;
         bool bRightPage =   m_pCntSharedBox->IsChecked()
                          || ( SVX_PAGE_LEFT != SvxPageUsage(nPageUsage) );
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 552a107..f2d7660 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1931,7 +1931,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                 const ScPatternAttr* pPattern = pDoc->GetPattern(aPos.Col(), aPos.Row(), aPos.Tab());
                 const std::vector<sal_uInt32>& rCondFormats = static_cast<const ScCondFormatItem&>(pPattern->GetItem(ATTR_CONDITIONAL)).GetCondFormatData();
                 bool bContainsCondFormat = !rCondFormats.empty();
-                boost::scoped_ptr<ScCondFormatDlg> pCondFormatDlg;
+                VclPtr<ScCondFormatDlg> pCondFormatDlg;
                 if(bContainsCondFormat)
                 {
                     bool bContainsExistingCondFormat = false;
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 8253b37..1c30d74 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -975,7 +975,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
                     {
                         OUString aText(ScResId(SCSTR_PASSWORD));
 
-                        boost::scoped_ptr<SfxPasswordDialog> pDlg(new SfxPasswordDialog(GetDialogParent(), &aText));
+                        VclPtr<SfxPasswordDialog> pDlg(new SfxPasswordDialog(GetDialogParent(), &aText));
                         pDlg->SetText( ScResId(SCSTR_UNPROTECTDOC) );
                         pDlg->SetMinLen( 0 );
                         pDlg->SetHelpId( GetStaticInterface()->GetSlot(FID_PROTECT_DOC)->GetCommand() );
@@ -997,7 +997,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
                 {
                     OUString aText(ScResId(SCSTR_PASSWORDOPT));
 
-                    boost::scoped_ptr<SfxPasswordDialog> pDlg(new SfxPasswordDialog(GetDialogParent(), &aText));
+                    VclPtr<SfxPasswordDialog> pDlg(new SfxPasswordDialog(GetDialogParent(), &aText));
                     pDlg->SetText( ScResId(SCSTR_PROTECTDOC) );
                     pDlg->SetMinLen( 0 );
                     pDlg->SetHelpId( GetStaticInterface()->GetSlot(FID_PROTECT_DOC)->GetCommand() );
@@ -1043,7 +1043,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
                 if (pProtect && pProtect->isProtectedWithPass())
                 {
                     OUString aText( ScResId(SCSTR_PASSWORDOPT) );
-                    boost::scoped_ptr<SfxPasswordDialog> pDlg(new SfxPasswordDialog(GetDialogParent(), &aText));
+                    VclPtr<SfxPasswordDialog> pDlg(new SfxPasswordDialog(GetDialogParent(), &aText));
                     pDlg->SetText( ScResId(SCSTR_UNPROTECTTAB) );
                     pDlg->SetMinLen( 0 );
                     pDlg->SetHelpId( GetStaticInterface()->GetSlot(FID_PROTECT_TABLE)->GetCommand() );
@@ -1069,7 +1069,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
             {
                 // Protect a current sheet.
 
-                boost::scoped_ptr<ScTableProtectionDlg> pDlg(new ScTableProtectionDlg(GetDialogParent()));
+                VclPtr<ScTableProtectionDlg> pDlg(new ScTableProtectionDlg(GetDialogParent()));
 
                 ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
                 if (pProtect)
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index c5264dd..0a5ed83 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -263,7 +263,7 @@ bool ScTabViewShell::ExecuteRetypePassDlg(ScPasswordHash eDesiredHash)
 {
     ScDocument* pDoc = GetViewData().GetDocument();
 
-    boost::scoped_ptr<ScRetypePassDlg> pDlg(new ScRetypePassDlg(GetDialogParent()));
+    VclPtr<ScRetypePassDlg> pDlg(new ScRetypePassDlg(GetDialogParent()));
     pDlg->SetDataFromDocument(*pDoc);
     pDlg->SetDesiredHash(eDesiredHash);
     if (pDlg->Execute() != RET_OK)
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 9e36c0f..b7b5d06 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1573,7 +1573,7 @@ void CustomAnimationPane::showOptions(const OString& sPage)
 {
     STLPropertySet* pSet = createSelectionSet();
 
-    boost::scoped_ptr<CustomAnimationDialog> pDlg(new CustomAnimationDialog(this, pSet, sPage));
+    VclPtr<CustomAnimationDialog> pDlg(new CustomAnimationDialog(this, pSet, sPage));
     if( pDlg->Execute() )
     {
         addUndo();
@@ -1752,7 +1752,7 @@ void CustomAnimationPane::onChange( bool bCreate )
         }
     }
 
-    boost::scoped_ptr<CustomAnimationCreateDialog> pDlg(new CustomAnimationCreateDialog( this, this, aTargets, bHasText, sPresetId, fDuration ));
+    VclPtr<CustomAnimationCreateDialog> pDlg(new CustomAnimationCreateDialog( this, this, aTargets, bHasText, sPresetId, fDuration ));
     if( pDlg->Execute() )
     {
         addUndo();
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index b3340d2..9bdb16e 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -179,7 +179,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLayoutHdl)
  */
 IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl)
 {
-    boost::scoped_ptr<SfxNewFileDialog> pDlg(new SfxNewFileDialog(this, SFXWB_PREVIEW));
+    VclPtr<SfxNewFileDialog> pDlg(new SfxNewFileDialog(this, SFXWB_PREVIEW));
     pDlg->SetText(SD_RESSTR(STR_LOAD_PRESENTATION_LAYOUT));
 
     if(!IsReallyVisible())
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 6555019..0fc55ed 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -765,8 +765,8 @@ void SlideSorterView::Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint
 
 void SlideSorterView::UpdatePageUnderMouse ()
 {
-    ::boost::shared_ptr<ScrollBar> pVScrollBar (mrSlideSorter.GetVerticalScrollBar());
-    ::boost::shared_ptr<ScrollBar> pHScrollBar (mrSlideSorter.GetHorizontalScrollBar());
+    VclPtr<ScrollBar> pVScrollBar (mrSlideSorter.GetVerticalScrollBar());
+    VclPtr<ScrollBar> pHScrollBar (mrSlideSorter.GetHorizontalScrollBar());
     if ((pVScrollBar && pVScrollBar->IsVisible() && pVScrollBar->IsTracking())
         || (pHScrollBar && pHScrollBar->IsVisible() && pHScrollBar->IsTracking()))
     {
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 5be0d54..8a7a0de 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -813,7 +813,7 @@ short TableDesignDialog::Execute()
 
 void showTableDesignDialog( ::vcl::Window* pParent, ViewShellBase& rBase )
 {
-    boost::scoped_ptr< TableDesignDialog > xDialog( new TableDesignDialog( pParent, rBase ) );
+    VclPtr< TableDesignDialog > xDialog( new TableDesignDialog( pParent, rBase ) );
     xDialog->Execute();
 }
 
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 2d3205c..60aa827 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1410,7 +1410,7 @@ CustomPropertiesEditButton::CustomPropertiesEditButton( vcl::Window* pParent, co
 
 IMPL_LINK_NOARG(CustomPropertiesEditButton, ClickHdl)
 {
-    boost::scoped_ptr<DurationDialog_Impl> pDurationDlg(new DurationDialog_Impl( this, m_pLine->m_aDurationField->GetDuration() ));
+    VclPtr<DurationDialog_Impl> pDurationDlg(new DurationDialog_Impl( this, m_pLine->m_aDurationField->GetDuration() ));
     if ( RET_OK == pDurationDlg->Execute() )
         m_pLine->m_aDurationField->SetDuration( pDurationDlg->GetDuration() );
     return 1;
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 24e3ca2..87d3c37 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1761,7 +1761,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(sal_uInt16 nEntry)
                     nFilter=pStyleSheetPool->GetSearchMask();
                 pStyleSheetPool->SetSearchMask( eFam, SFXSTYLEBIT_USERDEF );
 
-                boost::scoped_ptr<SfxNewStyleDlg> pDlg(new SfxNewStyleDlg(pWindow, *pStyleSheetPool));
+                VclPtr<SfxNewStyleDlg> pDlg(new SfxNewStyleDlg(pWindow, *pStyleSheetPool));
                     // why? : FloatingWindow must not be parent of a modal dialog
                 if(RET_OK == pDlg->Execute())
                 {
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 0162c28..1e7df56 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -413,7 +413,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
     {
         SfxVersionInfo aInfo;
         aInfo.aAuthor = SvtUserOptions().GetFullName();
-        boost::scoped_ptr<SfxViewVersionDialog_Impl> pDlg(new SfxViewVersionDialog_Impl(this, aInfo, true));
+        VclPtr<SfxViewVersionDialog_Impl> pDlg(new SfxViewVersionDialog_Impl(this, aInfo, true));
         short nRet = pDlg->Execute();
         if ( nRet == RET_OK )
         {
@@ -445,7 +445,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
     else if (pButton == m_pViewButton && pEntry)
     {
         SfxVersionInfo* pInfo = (SfxVersionInfo*) pEntry->GetUserData();
-        boost::scoped_ptr<SfxViewVersionDialog_Impl> pDlg(new SfxViewVersionDialog_Impl(this, *pInfo, false));
+        VclPtr<SfxViewVersionDialog_Impl> pDlg(new SfxViewVersionDialog_Impl(this, *pInfo, false));
         pDlg->Execute();
     }
     else if (pEntry && pButton == m_pCompareButton)
@@ -468,7 +468,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
     }
     else if (pButton == m_pCmisButton)
     {
-        boost::scoped_ptr<SfxCmisVersionsDialog> pDlg(new SfxCmisVersionsDialog(pViewFrame, false));
+        VclPtr<SfxCmisVersionsDialog> pDlg(new SfxCmisVersionsDialog(pViewFrame, false));
         pDlg->Execute();
     }
 
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 6a452b6..9e35c22 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -335,7 +335,7 @@ void SfxObjectShell::CheckOut( )
     }
     catch ( const uno::RuntimeException& e )
     {
-        boost::scoped_ptr<MessageDialog> pErrorBox(new MessageDialog( &GetFrame()->GetWindow(), e.Message ));
+        VclPtr<MessageDialog> pErrorBox(new MessageDialog( &GetFrame()->GetWindow(), e.Message ));
         pErrorBox->Execute( );
     }
 }
@@ -353,7 +353,7 @@ void SfxObjectShell::CancelCheckOut( )
     }
     catch ( const uno::RuntimeException& e )
     {
-        boost::scoped_ptr<MessageDialog> pErrorBox(new MessageDialog(&GetFrame()->GetWindow(), e.Message));
+        VclPtr<MessageDialog> pErrorBox(new MessageDialog(&GetFrame()->GetWindow(), e.Message));
         pErrorBox->Execute( );
     }
 }
@@ -377,7 +377,7 @@ void SfxObjectShell::CheckIn( )
     }
     catch ( const uno::RuntimeException& e )
     {
-        boost::scoped_ptr<MessageDialog> pErrorBox(new MessageDialog(&GetFrame()->GetWindow(), e.Message));
+        VclPtr<MessageDialog> pErrorBox(new MessageDialog(&GetFrame()->GetWindow(), e.Message));
         pErrorBox->Execute( );
     }
 }
@@ -391,7 +391,7 @@ uno::Sequence< document::CmisVersion > SfxObjectShell::GetCmisVersions( )
     }
     catch ( const uno::RuntimeException& e )
     {
-        boost::scoped_ptr<MessageDialog> pErrorBox(new MessageDialog(&GetFrame()->GetWindow(), e.Message));
+        VclPtr<MessageDialog> pErrorBox(new MessageDialog(&GetFrame()->GetWindow(), e.Message));
         pErrorBox->Execute( );
     }
     return uno::Sequence< document::CmisVersion > ( );
@@ -439,7 +439,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
             if ( !IsOwnStorageFormat_Impl( *GetMedium() ) )
                 return;
 
-            boost::scoped_ptr<SfxVersionDialog> pDlg(new SfxVersionDialog( pFrame, IsSaveVersionOnClose() ));
+            VclPtr<SfxVersionDialog> pDlg(new SfxVersionDialog( pFrame, IsSaveVersionOnClose() ));
             pDlg->Execute();
             SetSaveVersionOnClose( pDlg->IsSaveVersionOnClose() );
             rReq.Done();
@@ -499,7 +499,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
 
                 // creating dialog is done via virtual method; application will
                 // add its own statistics page
-                boost::scoped_ptr<SfxDocumentInfoDialog> pDlg(CreateDocumentInfoDialog(0, aSet));
+                VclPtr<SfxDocumentInfoDialog> pDlg(CreateDocumentInfoDialog(0, aSet));
                 if ( RET_OK == pDlg->Execute() )
                 {
                     SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pDocInfoItem, SfxDocumentInfoItem, SID_DOCINFO, false);
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 5f1948c..84e2d51 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -997,7 +997,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
                 pDev = &SM_MOD()->GetDefaultVirtualDev();
             OSL_ENSURE (pDev, "device for font list missing" );
 
-            boost::scoped_ptr<SmFontTypeDialog> pFontTypeDialog(new SmFontTypeDialog( NULL, pDev ));
+            VclPtr<SmFontTypeDialog> pFontTypeDialog(new SmFontTypeDialog( NULL, pDev ));
 
             SmFormat aOldFormat  = GetFormat();
             pFontTypeDialog->ReadFrom( aOldFormat );
@@ -1019,7 +1019,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
 
         case SID_FONTSIZE:
         {
-            boost::scoped_ptr<SmFontSizeDialog> pFontSizeDialog(new SmFontSizeDialog(NULL));
+            VclPtr<SmFontSizeDialog> pFontSizeDialog(new SmFontSizeDialog(NULL));
 
             SmFormat aOldFormat  = GetFormat();
             pFontSizeDialog->ReadFrom( aOldFormat );
@@ -1042,7 +1042,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
 
         case SID_DISTANCE:
         {
-            boost::scoped_ptr<SmDistanceDialog> pDistanceDialog(new SmDistanceDialog(NULL));
+            VclPtr<SmDistanceDialog> pDistanceDialog(new SmDistanceDialog(NULL));
 
             SmFormat aOldFormat  = GetFormat();
             pDistanceDialog->ReadFrom( aOldFormat );
@@ -1065,7 +1065,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
 
         case SID_ALIGN:
         {
-            boost::scoped_ptr<SmAlignDialog> pAlignDialog(new SmAlignDialog(NULL));
+            VclPtr<SmAlignDialog> pAlignDialog(new SmAlignDialog(NULL));
 
             SmFormat aOldFormat  = GetFormat();
             pAlignDialog->ReadFrom( aOldFormat );
diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index 903cd28..00b6dc8 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -57,7 +57,6 @@ namespace svt
 
     public:
         RoadmapItem( ORoadmap& _rParent, const Size& _rItemPlayground );
-        ~RoadmapItem( );
 
         void                    SetID( sal_Int16 _ID );
         sal_Int16               GetID() const;
@@ -832,19 +831,6 @@ namespace svt
     }
 
 
-    RoadmapItem::~RoadmapItem( )
-    {
-        {
-            boost::scoped_ptr<Control> xTakeOnership(mpID);
-            mpID = NULL;
-        }
-        {
-            boost::scoped_ptr<Control> xTakeOnership(mpDescription);
-            mpDescription = NULL;
-        }
-    }
-
-
     void RoadmapItem::SetClickHdl( const Link& rLink )
     {
         if ( mpDescription )
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index 05d8b3a..429de05 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -89,7 +89,7 @@ static sal_uInt16 aWndFunc(
     aErr = aErr.replaceAll("$(ACTION)", aAction);
     aErr = aErr.replaceAll("$(ERROR)", rErr);
 
-    boost::scoped_ptr<MessBox> pBox;
+    VclPtr<MessBox> pBox;
     switch ( nFlags & 0xf000 )
     {
         case ERRCODE_MSG_ERROR:
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index a722170..9bcb28e 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -682,7 +682,7 @@ void SaveDialog::dispose()
 IMPL_LINK_NOARG(SaveDialog, OKButtonHdl)
 {
     // start crash-save with progress
-    boost::scoped_ptr<SaveProgressDialog> pProgress(new SaveProgressDialog(this, m_pCore));
+    VclPtr<SaveProgressDialog> pProgress(new SaveProgressDialog(this, m_pCore));
     short nResult = pProgress->Execute();
     pProgress.reset();
 
@@ -988,7 +988,7 @@ short RecoveryDialog::execute()
                  // failed recovery documents. They must be saved to
                  // a user selected directrory.
                  short                 nRet                  = DLG_RET_UNKNOWN;
-                 boost::scoped_ptr<BrokenRecoveryDialog> pBrokenRecoveryDialog(new BrokenRecoveryDialog(this, m_pCore, !m_bWasRecoveryStarted));
+                 VclPtr<BrokenRecoveryDialog> pBrokenRecoveryDialog(new BrokenRecoveryDialog(this, m_pCore, !m_bWasRecoveryStarted));
                  OUString              sSaveDir              = pBrokenRecoveryDialog->getSaveDirURL(); // get the default dir
                  if (pBrokenRecoveryDialog->isExecutionNeeded())
                  {
@@ -1057,7 +1057,7 @@ short RecoveryDialog::execute()
                  // If no temp files exists or user decided to ignore it ...
                  // we have to remove all recovery/session data anyway!
                  short                 nRet                  = DLG_RET_UNKNOWN;
-                 boost::scoped_ptr<BrokenRecoveryDialog> pBrokenRecoveryDialog(new BrokenRecoveryDialog(this, m_pCore, !m_bWasRecoveryStarted));
+                 VclPtr<BrokenRecoveryDialog> pBrokenRecoveryDialog(new BrokenRecoveryDialog(this, m_pCore, !m_bWasRecoveryStarted));
                  OUString              sSaveDir              = pBrokenRecoveryDialog->getSaveDirURL(); // get the default save location
 
                  // dialog itself checks if there is a need to copy files for this mode.
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index b080786..14d1372 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -655,9 +655,9 @@ namespace svx
         fillFeatureDispatchers( m_xActiveControl, pDialogSlots, aAdditionalFestures );
         transferFeatureStatesToItemSet( aAdditionalFestures, *xCurrentItems, true );
 
-        boost::scoped_ptr<SfxTabDialog> xDialog ( _eSet == eCharAttribs
-                                                ? static_cast< SfxTabDialog* >( new TextControlCharAttribDialog( NULL, *xCurrentItems, *pFontList ) )
-                                                : static_cast< SfxTabDialog* >( new TextControlParaAttribDialog( NULL, *xCurrentItems ) ) );
+        VclPtr<SfxTabDialog> xDialog ( _eSet == eCharAttribs
+                                       ? static_cast< SfxTabDialog* >( new TextControlCharAttribDialog( NULL, *xCurrentItems, *pFontList ) )
+                                       : static_cast< SfxTabDialog* >( new TextControlParaAttribDialog( NULL, *xCurrentItems ) ) );
         if ( RET_OK == xDialog->Execute() )
         {
             const SfxItemSet& rModifiedItems = *xDialog->GetOutputItemSet();
diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index 4f59d59..49ffb40 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
-    boost::scoped_ptr<Dialog> xDialog(new svxdr::SaveDialog(m_pParentWindow, pCore));
+    VclPtr<Dialog> xDialog(new svxdr::SaveDialog(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
-    boost::scoped_ptr<Dialog> xDialog(new svxdr::RecoveryDialog(m_pParentWindow, pCore));
+    VclPtr<Dialog> xDialog(new svxdr::RecoveryDialog(m_pParentWindow, pCore));
 
     // start the dialog
     xDialog->Execute();
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 687c01e..745f1a9 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -358,7 +358,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, LoadHdl_Impl)
 IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton)
 {
     OUString sInputURL;
-    boost::scoped_ptr<SwCreateAddressListDialog> pDlg(
+    VclPtr<SwCreateAddressListDialog> pDlg(
             new SwCreateAddressListDialog(
                     pButton,
                     sInputURL,
@@ -457,7 +457,7 @@ IMPL_LINK(SwAddressListDialog, EditHdl_Impl, PushButton*, pButton)
         pUserData->xColumnsSupplier.clear();
         pUserData->xConnection.clear();
             // will automatically close if it was the las reference
-        boost::scoped_ptr<SwCreateAddressListDialog> pDlg(
+        VclPtr<SwCreateAddressListDialog> pDlg(
                 new SwCreateAddressListDialog(
                         pButton,
                         pUserData->sURL,
@@ -576,7 +576,7 @@ void SwAddressListDialog::DetectTablesAndQueries(
             if(nTables > 1 && bWidthDialog)
             {
                 //now call the table select dialog - if more than one table exists
-                boost::scoped_ptr<SwSelectDBTableDialog> pDlg(new SwSelectDBTableDialog(this, pUserData->xConnection));
+                VclPtr<SwSelectDBTableDialog> pDlg(new SwSelectDBTableDialog(this, pUserData->xConnection));
                 const OUString sTable = m_pListLB->GetEntryText(pSelect, ITEMID_TABLE - 1);
                 if(!sTable.isEmpty())
                     pDlg->SetSelectedTable(sTable, pUserData->nCommandType == CommandType::TABLE);
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 4b3352b..78e8c88 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -570,7 +570,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, FindHdl_Impl)
 
 IMPL_LINK(SwCreateAddressListDialog, CustomizeHdl_Impl, PushButton*, pButton)
 {
-    boost::scoped_ptr<SwCustomizeAddressListDialog> pDlg(new SwCustomizeAddressListDialog(pButton, *m_pCSVData));
+    VclPtr<SwCustomizeAddressListDialog> pDlg(new SwCustomizeAddressListDialog(pButton, *m_pCSVData));
     if(RET_OK == pDlg->Execute())
     {
         delete m_pCSVData;
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index e3a04d2..36684c9 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -163,7 +163,7 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl)
 {
     try
     {
-        boost::scoped_ptr<SwAddressListDialog> xAddrDialog(new SwAddressListDialog(this));
+        VclPtr<SwAddressListDialog> xAddrDialog(new SwAddressListDialog(this));
         if(RET_OK == xAddrDialog->Execute())
         {
             SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
@@ -189,7 +189,7 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl)
 
 IMPL_LINK(SwMailMergeAddressBlockPage, SettingsHdl_Impl, PushButton*, pButton)
 {
-    boost::scoped_ptr<SwSelectAddressBlockDialog> pDlg(
+    VclPtr<SwSelectAddressBlockDialog> pDlg(
                 new SwSelectAddressBlockDialog(pButton, m_pWizard->GetConfigItem()));
     SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem();
     pDlg->SetAddressBlocks(rConfig.GetAddressBlocks(), m_pSettingsWIN->GetSelectedAddress());
@@ -219,7 +219,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, AssignHdl_Impl, PushButton*, pButton)
     SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
     const sal_uInt16 nSel = m_pSettingsWIN->GetSelectedAddress();
     const uno::Sequence< OUString> aBlocks = rConfigItem.GetAddressBlocks();
-    boost::scoped_ptr<SwAssignFieldsDialog> pDlg(
+    VclPtr<SwAssignFieldsDialog> pDlg(
             new SwAssignFieldsDialog(pButton, m_pWizard->GetConfigItem(), aBlocks[nSel], true));
     if(RET_OK == pDlg->Execute())
     {
@@ -453,7 +453,7 @@ IMPL_LINK(SwSelectAddressBlockDialog, NewCustomizeHdl_Impl, PushButton*, pButton
     SwCustomizeAddressBlockDialog::DialogType nType = bCustomize ?
         SwCustomizeAddressBlockDialog::ADDRESSBLOCK_EDIT :
         SwCustomizeAddressBlockDialog::ADDRESSBLOCK_NEW;
-    boost::scoped_ptr<SwCustomizeAddressBlockDialog> pDlg(
+    VclPtr<SwCustomizeAddressBlockDialog> pDlg(
         new SwCustomizeAddressBlockDialog(pButton,m_rConfig,nType));
     if(bCustomize)
     {
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 212c48e..a249c87 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -126,7 +126,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
     if(bTemplate)
     {
         m_pLoadTemplateRB->Check();
-        boost::scoped_ptr<SfxNewFileDialog> pNewFileDlg(new SfxNewFileDialog(this, 0));
+        VclPtr<SfxNewFileDialog> pNewFileDlg(new SfxNewFileDialog(this, 0));
         sal_uInt16 nRet = pNewFileDlg->Execute();
         if(RET_TEMPLATE_LOAD == nRet)
             bTemplate = false;
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 5b5bcd1..ec82691 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -106,7 +106,7 @@ IMPL_LINK_NOARG(SwGreetingsHandler, IndividualHdl_Impl)
 
 IMPL_LINK(SwGreetingsHandler, GreetingHdl_Impl, PushButton*, pButton)
 {
-    boost::scoped_ptr<SwCustomizeAddressBlockDialog> pDlg(
+    VclPtr<SwCustomizeAddressBlockDialog> pDlg(
             new SwCustomizeAddressBlockDialog(pButton, m_pWizard->GetConfigItem(),
                         pButton == m_pMalePB ?
                         SwCustomizeAddressBlockDialog::GREETING_MALE :
@@ -133,7 +133,7 @@ void    SwGreetingsHandler::UpdatePreview()
 IMPL_LINK(SwMailMergeGreetingsPage, AssignHdl_Impl, PushButton*, pButton)
 {
     const OUString sPreview(m_pFemaleLB->GetSelectEntry() + "\n" + m_pMaleLB->GetSelectEntry());
-    boost::scoped_ptr<SwAssignFieldsDialog> pDlg(
+    VclPtr<SwAssignFieldsDialog> pDlg(
             new SwAssignFieldsDialog(pButton, m_pWizard->GetConfigItem(), sPreview, false));
     if(RET_OK == pDlg->Execute())
     {
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 2d8a55e..19a7ba2 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -540,7 +540,7 @@ IMPL_LINK(SwMailMergeOutputPage, DocumentSelectionHdl_Impl, RadioButton*, pButto
 
 IMPL_LINK(SwMailMergeOutputPage, CopyToHdl_Impl, PushButton*, pButton)
 {
-    boost::scoped_ptr<SwCopyToDialog> pDlg(new SwCopyToDialog(pButton));
+    VclPtr<SwCopyToDialog> pDlg(new SwCopyToDialog(pButton));
     pDlg->SetCC(m_sCC );
     pDlg->SetBCC(m_sBCC);
     if(RET_OK == pDlg->Execute())
@@ -988,7 +988,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
         if(RET_YES == nRet )
         {
             SfxAllItemSet aSet(pTargetView->GetPool());
-            boost::scoped_ptr<SwMailConfigDlg> pDlg(new SwMailConfigDlg(pButton, aSet));
+            VclPtr<SwMailConfigDlg> pDlg(new SwMailConfigDlg(pButton, aSet));
             nRet = pDlg->Execute();
         }
 
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 2d84b9e..453fc37 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -581,7 +581,7 @@ void SwSendMailDialog::DocumentSent( uno::Reference< mail::XMailMessage> xMessag
 
     if (pError)
     {
-        boost::scoped_ptr<SwSendWarningBox_Impl> pDlg(new SwSendWarningBox_Impl(0, *pError));
+        VclPtr<SwSendWarningBox_Impl> pDlg(new SwSendWarningBox_Impl(0, *pError));
         pDlg->Execute();
     }
 }
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 3e9f05b..243b751 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -187,7 +187,7 @@ IMPL_LINK(SwSelectDBTableDialog, PreviewHdl, PushButton*, pButton)
         pProperties[4].Name = "ShowTreeViewButton";
         pProperties[4].Value <<= sal_False;
 
-        boost::scoped_ptr<SwDBTablePreviewDialog> pDlg(new SwDBTablePreviewDialog(pButton, aProperties));
+        VclPtr<SwDBTablePreviewDialog> pDlg(new SwDBTablePreviewDialog(pButton, aProperties));
         pDlg->Execute();
     }
 
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index c908ac6..4e6a4fc 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -319,7 +319,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
         ::PrepareBoxInfo( aTmpSet, *pSh );
 
         const OUString sFmtStr = pColl->GetName();
-        boost::scoped_ptr<SwParaDlg> pDlg(new SwParaDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFmtStr));
+        VclPtr<SwParaDlg> pDlg(new SwParaDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFmtStr));
 
         if ( pDlg->Execute() == RET_OK )
         {
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index 9a1a838..98e64ff 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -116,7 +116,7 @@ IMPL_LINK( SwEnvPrtPage, ButtonHdl, Button *, pBtn )
         // Call printer setup
         if (pPrt)
         {
-            boost::scoped_ptr<PrinterSetupDialog> pDlg(new PrinterSetupDialog(this));
+            VclPtr<PrinterSetupDialog> pDlg(new PrinterSetupDialog(this));
             pDlg->SetPrinter(pPrt);
             pDlg->Execute();
             pDlg.reset();
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 40d7af7c..36ea8ef 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -579,7 +579,7 @@ IMPL_LINK_NOARG(SwLabFmtPage, SaveHdl)
     aRec.lPWidth  = static_cast< long >(GETFLDVAL(*m_pPWidthField ));
     aRec.lPHeight = static_cast< long >(GETFLDVAL(*m_pPHeightField));
     aRec.bCont = aItem.bCont;
-    boost::scoped_ptr<SwSaveLabelDlg> pSaveDlg(new SwSaveLabelDlg(this, aRec));
+    VclPtr<SwSaveLabelDlg> pSaveDlg(new SwSaveLabelDlg(this, aRec));
     pSaveDlg->SetLabel(aItem.aLstMake, aItem.aLstType);
     pSaveDlg->Execute();
     if(pSaveDlg->GetLabel(aItem))
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index 974de29..d018db5 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -88,7 +88,7 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton )
         if (!pPrinter)
             pPrinter = new Printer;
 
-        boost::scoped_ptr<PrinterSetupDialog> pDlg(new PrinterSetupDialog(this));
+        VclPtr<PrinterSetupDialog> pDlg(new PrinterSetupDialog(this));
         pDlg->SetPrinter(pPrinter);
         pDlg->Execute();
         pDlg.reset();
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 90aeb98..49e2eee 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1477,7 +1477,7 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox)
 
 IMPL_LINK(SwTOXSelectTabPage, AddStylesHdl, PushButton*, pButton)
 {
-    boost::scoped_ptr<SwAddStylesDlg_Impl> pDlg(new SwAddStylesDlg_Impl(pButton,
+    VclPtr<SwAddStylesDlg_Impl> pDlg(new SwAddStylesDlg_Impl(pButton,
         static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(),
         aStyleArr));
     pDlg->Execute();
@@ -1513,7 +1513,7 @@ IMPL_LINK(SwTOXSelectTabPage, MenuExecuteHdl, Menu*, pMenu)
                 return 0;
         }
 
-        boost::scoped_ptr<SwAutoMarkDlg_Impl> pAutoMarkDlg(new SwAutoMarkDlg_Impl(
+        VclPtr<SwAutoMarkDlg_Impl> pAutoMarkDlg(new SwAutoMarkDlg_Impl(
                 m_pAutoMarkPB, sAutoMarkURL, bNew ));
 
         if( RET_OK != pAutoMarkDlg->Execute() && bNew )
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 419d835..c4d9e38 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -588,7 +588,7 @@ IMPL_LINK( SwNewUserIdxDlg, ModifyHdl, Edit*, pEdit)
 
 IMPL_LINK_NOARG(SwIndexMarkPane, NewUserIdxHdl)
 {
-    boost::scoped_ptr<SwNewUserIdxDlg> pDlg(new SwNewUserIdxDlg(this));
+    VclPtr<SwNewUserIdxDlg> pDlg(new SwNewUserIdxDlg(this));
     if(RET_OK == pDlg->Execute())
     {
         OUString sNewName(pDlg->GetName());
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index b1e7783..f1f0d49 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -503,7 +503,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
     else if (sItemIdent == "rename")
     {
         m_pShortNameEdit->SetText(pGlossaryHdl->GetGlossaryShortName(m_pNameED->GetText()));
-        boost::scoped_ptr<SwNewGlosNameDlg> pNewNameDlg(new SwNewGlosNameDlg(this, m_pNameED->GetText(),
+        VclPtr<SwNewGlosNameDlg> pNewNameDlg(new SwNewGlosNameDlg(this, m_pNameED->GetText(),
                                                                              m_pShortNameEdit->GetText() ));
         if( RET_OK == pNewNameDlg->Execute() &&
             pGlossaryHdl->Rename( m_pShortNameEdit->GetText(),
@@ -651,7 +651,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl)
         if(bIsWritable)
         {
 
-            boost::scoped_ptr<SwGlossaryGroupDlg> pDlg(new SwGlossaryGroupDlg( this, pGloss->GetPathArray(), pGlossaryHdl ));
+            VclPtr<SwGlossaryGroupDlg> pDlg(new SwGlossaryGroupDlg( this, pGloss->GetPathArray(), pGlossaryHdl ));
             if ( RET_OK == pDlg->Execute() )
             {
                 Init();
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 15a8217..3416710 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -287,7 +287,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
         nLevelNo = 9;
     else if (sIdent == "saveas")
     {
-        boost::scoped_ptr<SwNumNamesDlg> pDlg(new SwNumNamesDlg(this));
+        VclPtr<SwNumNamesDlg> pDlg(new SwNumNamesDlg(this));
         const OUString *aStrArr[SwChapterNumRules::nMaxRules];
         for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i)
         {
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index d0df659..e3fbc07 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -315,7 +315,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl)
     bool bOk = false, bFmtInserted = false;
     while( !bOk )
     {
-        boost::scoped_ptr<SwStringInputDlg> pDlg(new SwStringInputDlg( this,
+        VclPtr<SwStringInputDlg> pDlg(new SwStringInputDlg( this,
                                                        aStrTitle,
                                                        aStrLabel,
                                                        OUString() ));
@@ -377,7 +377,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl)
     aMessage += m_pLbFormat->GetSelectEntry();
     aMessage += "\n";
 
-    boost::scoped_ptr<MessBox> pBox(new MessBox( this, WinBits( WB_OK_CANCEL ),
+    VclPtr<MessBox> pBox(new MessBox( this, WinBits( WB_OK_CANCEL ),
                                                  aStrDelTitle, aMessage));
 
     if ( pBox->Execute() == RET_OK )
@@ -412,7 +412,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl)
     bool bOk = false;
     while( !bOk )
     {
-        boost::scoped_ptr<SwStringInputDlg> pDlg(new SwStringInputDlg( this,
+        VclPtr<SwStringInputDlg> pDlg(new SwStringInputDlg( this,
                                                        aStrRenameTitle,
                                                        m_pLbFormat->GetSelectEntry(),
                                                        OUString() ));
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 64b6168..9b964f3 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -494,7 +494,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                 if ( aFileName.isEmpty() )
                 {
                     SvtPathOptions aPathOpt;
-                    boost::scoped_ptr<SfxNewFileDialog> pNewFileDlg(
+                    VclPtr<SfxNewFileDialog> pNewFileDlg(
                         new SfxNewFileDialog(&GetView()->GetViewFrame()->GetWindow(), SFXWB_LOAD_TEMPLATE));
                     pNewFileDlg->SetTemplateFlags(nFlags);
 
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 05914a7..af60dad 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:
                     {
-                        boost::scoped_ptr<SfxNewStyleDlg> pDlg(new SfxNewStyleDlg( 0,
+                        VclPtr<SfxNewStyleDlg> pDlg(new SfxNewStyleDlg( 0,
                                                     *GetStyleSheetPool()));
                         if(RET_OK == pDlg->Execute())
                         {
diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
index 75ab9e9..2c037ff 100644
--- a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
+++ b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
@@ -48,7 +48,7 @@ namespace {
         }
     };
 
-    typedef ::std::map < SidebarWinKey, sw::sidebarwindows::SwSidebarWin*, SidebarWinOrder > SidebarWinContainer;
+    typedef ::std::map < SidebarWinKey, VclPtr<sw::sidebarwindows::SwSidebarWin>, SidebarWinOrder > SidebarWinContainer;
 
     struct FrmKey
     {
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index fc5ea18..89847aa 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -88,7 +88,7 @@ executeLoginDialog(
         if (!bCanUseSysCreds)
             nFlags |= LF_NO_USESYSCREDS;
 
-        boost::scoped_ptr< LoginDialog > xDialog(
+        VclPtr< LoginDialog > xDialog(
                 new LoginDialog(pParent, nFlags, rInfo.GetServer(), rRealm));
         if (!rInfo.GetErrorText().isEmpty())
             xDialog->SetErrorText(rInfo.GetErrorText());
@@ -417,7 +417,7 @@ executeMasterPasswordDialog(
         boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
         if( nMode == task::PasswordRequestMode_PASSWORD_CREATE )
         {
-            boost::scoped_ptr< MasterPasswordCreateDialog > xDialog(
+            VclPtr< MasterPasswordCreateDialog > xDialog(
                 new MasterPasswordCreateDialog(pParent, xManager.get()));
             rInfo.SetResult(xDialog->Execute()
                 == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL);
@@ -426,7 +426,7 @@ executeMasterPasswordDialog(
         }
         else
         {
-            boost::scoped_ptr< MasterPasswordDialog > xDialog(
+            VclPtr< MasterPasswordDialog > xDialog(
                 new MasterPasswordDialog(pParent, nMode, xManager.get()));
             rInfo.SetResult(xDialog->Execute()
                 == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL);
@@ -517,7 +517,7 @@ executePasswordDialog(
         {
             if (bIsSimplePasswordRequest)
             {
-                boost::scoped_ptr< PasswordDialog > pDialog(
+                VclPtr< PasswordDialog > pDialog(
                     new PasswordDialog( pParent, nMode, xManager.get(), aDocName,
                     bIsPasswordToModify, bIsSimplePasswordRequest ) );
                 pDialog->SetMinLen(0);
@@ -541,7 +541,7 @@ executePasswordDialog(
         }
         else // enter password or reenter password
         {
-            boost::scoped_ptr< PasswordDialog > pDialog(
+            VclPtr< PasswordDialog > pDialog(
                 new PasswordDialog( pParent, nMode, xManager.get(), aDocName,
                 bIsPasswordToModify, bIsSimplePasswordRequest ) );
             pDialog->SetMinLen(0);
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index 68b0938..db209cb 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -55,7 +55,7 @@ executeErrorDialog(
             //TODO! must be internationalized
     aText.append(rMessage);
 
-    boost::scoped_ptr< MessBox > xBox;
+    VclPtr< MessBox > xBox;
     try
     {
         switch (eClassification)
diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx
index 6291553..0ad2633 100644
--- a/uui/source/iahndl-filter.cxx
+++ b/uui/source/iahndl-filter.cxx
@@ -55,8 +55,7 @@ executeFilterDialog(
     {
         SolarMutexGuard aGuard;
 
-        boost::scoped_ptr< uui::FilterDialog > xDialog(
-            new uui::FilterDialog(pParent));
+        VclPtr< uui::FilterDialog > xDialog(new uui::FilterDialog(pParent));
 
         xDialog->SetURL(rURL);
         xDialog->ChangeFilters(&rFilters);
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx
index e7e911b..1dd10cb 100644
--- a/uui/source/iahndl-locking.cxx
+++ b/uui/source/iahndl-locking.cxx
@@ -93,7 +93,7 @@ handleLockedDocumentRequest_(
             aMessage = UUIInteractionHelper::replaceMessageWithArguments(
                 aMessage, aArguments );
 
-            boost::scoped_ptr< OpenLockedQueryBox > xDialog(new OpenLockedQueryBox(
+            VclPtr< OpenLockedQueryBox > xDialog(new OpenLockedQueryBox(
                             pParent, xManager.get(), aMessage ) );
             nResult = xDialog->Execute();
         }
@@ -107,7 +107,7 @@ handleLockedDocumentRequest_(
             aMessage = UUIInteractionHelper::replaceMessageWithArguments(
                 aMessage, aArguments );
 
-            boost::scoped_ptr< TryLaterQueryBox > xDialog(
+            VclPtr< TryLaterQueryBox > xDialog(
                 new TryLaterQueryBox( pParent, xManager.get(), aMessage ) );
             nResult = xDialog->Execute();
         }
@@ -122,7 +122,7 @@ handleLockedDocumentRequest_(
             aMessage = UUIInteractionHelper::replaceMessageWithArguments(
                 aMessage, aArguments );
 
-            boost::scoped_ptr< AlreadyOpenQueryBox > xDialog(
+            VclPtr< AlreadyOpenQueryBox > xDialog(
                 new AlreadyOpenQueryBox( pParent,
                                          xManager.get(),
                                          aMessage,
@@ -163,7 +163,7 @@ handleChangedByOthersRequest_(
         if (!xManager.get())
             return;
 
-        boost::scoped_ptr< FileChangedQueryBox > xDialog(
+        VclPtr< FileChangedQueryBox > xDialog(
             new FileChangedQueryBox( pParent, xManager.get() ) );
         sal_Int32 nResult = xDialog->Execute();
 
@@ -198,7 +198,7 @@ handleLockFileIgnoreRequest_(
         if (!xManager.get())
             return;
 
-        boost::scoped_ptr< LockFailedQueryBox > xDialog(
+        VclPtr< LockFailedQueryBox > xDialog(
             new LockFailedQueryBox( pParent, xManager.get() ) );
         sal_Int32 nResult = xDialog->Execute();
 
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index 6178536..3ae4fd2 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -145,8 +145,7 @@ executeUnknownAuthDialog(
     {
         SolarMutexGuard aGuard;
 
-        boost::scoped_ptr< UnknownAuthDialog > xDialog(
-            new UnknownAuthDialog(pParent, rXCert, xContext));
+        VclPtr< UnknownAuthDialog > xDialog(new UnknownAuthDialog(pParent, rXCert, xContext));
 
         // Get correct resource string
         OUString aMessage;
@@ -187,8 +186,7 @@ executeSSLWarnDialog(
     {
         SolarMutexGuard aGuard;
 
-        boost::scoped_ptr< SSLWarnDialog > xDialog(
-           new SSLWarnDialog(pParent, rXCert, xContext));
+        VclPtr< SSLWarnDialog > xDialog(new SSLWarnDialog(pParent, rXCert, xContext));
 
         // Get correct resource string
         OUString aMessage_1;
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index e106f32..9d7d6f1 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -176,7 +176,7 @@ struct ImplPostEventData
     ~ImplPostEventData() {}
 };
 
-typedef ::std::pair< vcl::Window*, ImplPostEventData* > ImplPostEventPair;
+typedef ::std::pair< VclPtr<vcl::Window>, ImplPostEventData* > ImplPostEventPair;
 
 static ::std::list< ImplPostEventPair > aPostedEventList;
 
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index fb0d258..42804e3 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -497,7 +497,7 @@ static void handle_toolbox_buttonchange(VclWindowEvent const *pEvent)
 
 /*****************************************************************************/
 
-static std::set< vcl::Window * > g_aWindowList;
+static std::set< VclPtr<vcl::Window> > g_aWindowList;
 
 static void handle_get_focus(::VclWindowEvent const * pEvent)
 {
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 60d9ec1..7e94358 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1358,12 +1358,12 @@ public:
             }
 
             VclPtr<DemoWin> aMainWin(new DemoWin(aRenderer));
-            boost::scoped_ptr<DemoWidgets> aWidgets;
+            VclPtr<DemoWidgets> aWidgets;
 
             aMainWin->SetText("Interactive VCL demo #1");
 
             if (bWidgets)
-                aWidgets.reset(new DemoWidgets());
+                aWidgets = new DemoWidgets();
             else
                 aMainWin->Show();
 


More information about the Libreoffice-commits mailing list