[Libreoffice-commits] core.git: Branch 'feature/vclref' - 13 commits - compilerplugins/clang extensions/source filter/source formula/source fpicker/source include/formula include/vcl reportdesign/source sc/source sd/source starmath/inc starmath/source svtools/source svx/source sw/inc sw/source vcl/source xmlsecurity/inc xmlsecurity/source

Noel Grandin noel at peralex.com
Mon Jan 26 03:39:46 PST 2015


 compilerplugins/clang/vclwidgets.cxx                    |  161 ++-
 extensions/source/abpilot/abpfinalpage.cxx              |    6 
 extensions/source/abpilot/abpfinalpage.hxx              |    1 
 extensions/source/abpilot/abspilot.cxx                  |    5 
 extensions/source/abpilot/abspilot.hxx                  |    2 
 extensions/source/abpilot/typeselectionpage.cxx         |    6 
 extensions/source/abpilot/typeselectionpage.hxx         |    1 
 extensions/source/bibliography/bibbeam.cxx              |   14 
 extensions/source/bibliography/bibbeam.hxx              |    1 
 extensions/source/bibliography/bibcont.cxx              |   21 
 extensions/source/bibliography/bibcont.hxx              |    6 
 extensions/source/bibliography/bibshortcuthandler.hxx   |    2 
 extensions/source/bibliography/bibview.cxx              |    6 
 extensions/source/bibliography/bibview.hxx              |    1 
 extensions/source/bibliography/general.cxx              |    6 
 extensions/source/bibliography/general.hxx              |    1 
 extensions/source/bibliography/toolbar.cxx              |   78 -
 extensions/source/bibliography/toolbar.hxx              |   13 
 extensions/source/propctrlr/browserline.cxx             |   24 
 extensions/source/propctrlr/browserline.hxx             |    8 
 extensions/source/propctrlr/browserlistbox.cxx          |  113 +-
 extensions/source/propctrlr/browserlistbox.hxx          |    5 
 extensions/source/propctrlr/browserpage.cxx             |   22 
 extensions/source/propctrlr/browserpage.hxx             |    7 
 extensions/source/propctrlr/browserview.cxx             |    7 
 extensions/source/propctrlr/browserview.hxx             |    1 
 extensions/source/propctrlr/inspectorhelpwindow.cxx     |   47 
 extensions/source/propctrlr/inspectorhelpwindow.hxx     |    6 
 extensions/source/propctrlr/propertyeditor.cxx          |  117 +-
 extensions/source/propctrlr/propertyeditor.hxx          |    4 
 extensions/source/propctrlr/selectlabeldialog.cxx       |    7 
 extensions/source/propctrlr/selectlabeldialog.hxx       |    1 
 extensions/source/propctrlr/standardcontrol.cxx         |   29 
 extensions/source/propctrlr/standardcontrol.hxx         |    1 
 extensions/source/propctrlr/taborder.cxx                |    7 
 extensions/source/propctrlr/taborder.hxx                |    1 
 extensions/source/scanner/grid.cxx                      |    7 
 extensions/source/scanner/sanedlg.cxx                   |    6 
 extensions/source/scanner/sanedlg.hxx                   |    1 
 filter/source/pdf/impdialog.cxx                         |   12 
 filter/source/pdf/impdialog.hxx                         |    2 
 filter/source/svg/impsvgdialog.cxx                      |   91 +
 filter/source/svg/impsvgdialog.hxx                      |   19 
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx    |    6 
 filter/source/xsltdialog/xmlfiltersettingsdialog.hxx    |    1 
 filter/source/xsltdialog/xmlfiltertabdialog.cxx         |    6 
 filter/source/xsltdialog/xmlfiltertabdialog.hxx         |    1 
 filter/source/xsltdialog/xmlfiltertestdialog.cxx        |    6 
 filter/source/xsltdialog/xmlfiltertestdialog.hxx        |    1 
 formula/source/ui/dlg/ControlHelper.hxx                 |    1 
 formula/source/ui/dlg/funcutl.cxx                       |   12 
 formula/source/ui/dlg/parawin.cxx                       |    6 
 formula/source/ui/dlg/parawin.hxx                       |    1 
 fpicker/source/office/PlacesListBox.cxx                 |   12 
 fpicker/source/office/PlacesListBox.hxx                 |    2 
 fpicker/source/office/iodlg.cxx                         |    6 
 fpicker/source/office/iodlg.hxx                         |    1 
 fpicker/source/office/iodlgimp.cxx                      |    6 
 fpicker/source/office/iodlgimp.hxx                      |    1 
 include/formula/funcutl.hxx                             |    1 
 include/vcl/dialog.hxx                                  |    2 
 include/vcl/layout.hxx                                  |    2 
 reportdesign/source/ui/dlg/AddField.cxx                 |   77 -
 reportdesign/source/ui/dlg/Condition.cxx                |   59 -
 reportdesign/source/ui/dlg/Condition.hxx                |    1 
 reportdesign/source/ui/dlg/Formula.cxx                  |    6 
 reportdesign/source/ui/dlg/GroupsSorting.cxx            |   14 
 reportdesign/source/ui/dlg/Navigator.cxx                |    7 
 reportdesign/source/ui/inc/AddField.hxx                 |   15 
 reportdesign/source/ui/inc/DesignView.hxx               |   11 
 reportdesign/source/ui/inc/Formula.hxx                  |    1 
 reportdesign/source/ui/inc/GroupsSorting.hxx            |    1 
 reportdesign/source/ui/inc/ReportSection.hxx            |    1 
 reportdesign/source/ui/inc/ReportWindow.hxx             |    7 
 reportdesign/source/ui/inc/ScrollHelper.hxx             |   23 
 reportdesign/source/ui/inc/SectionWindow.hxx            |   17 
 reportdesign/source/ui/inc/StartMarker.hxx              |    7 
 reportdesign/source/ui/inc/ViewsWindow.hxx              |    1 
 reportdesign/source/ui/inc/propbrw.hxx                  |    1 
 reportdesign/source/ui/report/DesignView.cxx            |  117 +-
 reportdesign/source/ui/report/ReportSection.cxx         |    6 
 reportdesign/source/ui/report/ReportWindow.cxx          |  142 +-
 reportdesign/source/ui/report/ScrollHelper.cxx          |  131 +-
 reportdesign/source/ui/report/SectionWindow.cxx         |  132 +-
 reportdesign/source/ui/report/StartMarker.cxx           |   93 +
 reportdesign/source/ui/report/ViewsWindow.cxx           |    6 
 reportdesign/source/ui/report/propbrw.cxx               |    6 
 sc/source/ui/app/inputwin.cxx                           |  162 +--
 sc/source/ui/cctrl/checklistmenu.cxx                    |  198 ++--
 sc/source/ui/cctrl/tbzoomsliderctrl.cxx                 |    6 
 sc/source/ui/condformat/condformatdlgentry.cxx          |  778 +++++++++-------
 sc/source/ui/condformat/condformatmgr.cxx               |    6 
 sc/source/ui/dbgui/consdlg.cxx                          |    6 
 sc/source/ui/dbgui/csvcontrol.cxx                       |    6 
 sc/source/ui/dbgui/csvgrid.cxx                          |    6 
 sc/source/ui/dbgui/csvruler.cxx                         |    6 
 sc/source/ui/dbgui/csvtablebox.cxx                      |  155 +--
 sc/source/ui/dbgui/dbnamdlg.cxx                         |    6 
 sc/source/ui/dbgui/filtdlg.cxx                          |    6 
 sc/source/ui/dbgui/pfiltdlg.cxx                         |    6 
 sc/source/ui/dbgui/scuiasciiopt.cxx                     |    6 
 sc/source/ui/dbgui/scuiimoptdlg.cxx                     |    6 
 sc/source/ui/dbgui/sfiltdlg.cxx                         |    6 
 sc/source/ui/dbgui/tpsort.cxx                           |    6 
 sc/source/ui/dbgui/tpsubt.cxx                           |    6 
 sc/source/ui/dialogs/searchresults.cxx                  |    6 
 sc/source/ui/formdlg/dwfunctr.cxx                       |  256 ++---
 sc/source/ui/formdlg/formula.cxx                        |    6 
 sc/source/ui/inc/acredlin.hxx                           |    1 
 sc/source/ui/inc/areasdlg.hxx                           |    2 
 sc/source/ui/inc/autofmt.hxx                            |    1 
 sc/source/ui/inc/checklistmenu.hxx                      |   16 
 sc/source/ui/inc/condformatdlgentry.hxx                 |   99 +-
 sc/source/ui/inc/condformatmgr.hxx                      |    1 
 sc/source/ui/inc/consdlg.hxx                            |    1 
 sc/source/ui/inc/csvcontrol.hxx                         |    1 
 sc/source/ui/inc/csvgrid.hxx                            |    1 
 sc/source/ui/inc/csvruler.hxx                           |    1 
 sc/source/ui/inc/csvtablebox.hxx                        |   15 
 sc/source/ui/inc/dbnamdlg.hxx                           |    1 
 sc/source/ui/inc/dwfunctr.hxx                           |   13 
 sc/source/ui/inc/filtdlg.hxx                            |    2 
 sc/source/ui/inc/formula.hxx                            |    1 
 sc/source/ui/inc/gridwin.hxx                            |    1 
 sc/source/ui/inc/highred.hxx                            |    1 
 sc/source/ui/inc/inputwin.hxx                           |   20 
 sc/source/ui/inc/inscodlg.hxx                           |    1 
 sc/source/ui/inc/instbdlg.hxx                           |    1 
 sc/source/ui/inc/namedlg.hxx                            |    1 
 sc/source/ui/inc/namepast.hxx                           |    1 
 sc/source/ui/inc/navipi.hxx                             |   24 
 sc/source/ui/inc/olinewin.hxx                           |    1 
 sc/source/ui/inc/pfiltdlg.hxx                           |    1 
 sc/source/ui/inc/preview.hxx                            |    1 
 sc/source/ui/inc/scuiasciiopt.hxx                       |    1 
 sc/source/ui/inc/scuiimoptdlg.hxx                       |    1 
 sc/source/ui/inc/searchresults.hxx                      |    1 
 sc/source/ui/inc/sharedocdlg.hxx                        |    1 
 sc/source/ui/inc/solveroptions.hxx                      |    1 
 sc/source/ui/inc/tabview.hxx                            |   14 
 sc/source/ui/inc/tbzoomsliderctrl.hxx                   |    1 
 sc/source/ui/inc/tpcalc.hxx                             |    1 
 sc/source/ui/inc/tphfedit.hxx                           |    1 
 sc/source/ui/inc/tpsort.hxx                             |    1 
 sc/source/ui/inc/tpsubt.hxx                             |    1 
 sc/source/ui/inc/tpusrlst.hxx                           |    1 
 sc/source/ui/inc/tpview.hxx                             |    1 
 sc/source/ui/inc/validate.hxx                           |    4 
 sc/source/ui/miscdlgs/acredlin.cxx                      |    6 
 sc/source/ui/miscdlgs/autofmt.cxx                       |    6 
 sc/source/ui/miscdlgs/highred.cxx                       |    6 
 sc/source/ui/miscdlgs/inscodlg.cxx                      |    6 
 sc/source/ui/miscdlgs/instbdlg.cxx                      |    6 
 sc/source/ui/miscdlgs/sharedocdlg.cxx                   |    6 
 sc/source/ui/miscdlgs/solveroptions.cxx                 |    6 
 sc/source/ui/namedlg/namedlg.cxx                        |    6 
 sc/source/ui/namedlg/namepast.cxx                       |    6 
 sc/source/ui/navipi/navcitem.cxx                        |    2 
 sc/source/ui/navipi/navipi.cxx                          |  205 ++--
 sc/source/ui/navipi/scenwnd.cxx                         |   50 -
 sc/source/ui/optdlg/tpcalc.cxx                          |    6 
 sc/source/ui/optdlg/tpusrlst.cxx                        |    6 
 sc/source/ui/optdlg/tpview.cxx                          |    6 
 sc/source/ui/pagedlg/areasdlg.cxx                       |    6 
 sc/source/ui/pagedlg/tphfedit.cxx                       |    6 
 sc/source/ui/sidebar/CellBorderStyleControl.cxx         |  119 +-
 sc/source/ui/sidebar/CellBorderStyleControl.hxx         |   13 
 sc/source/ui/sidebar/CellLineStyleControl.cxx           |   78 -
 sc/source/ui/sidebar/CellLineStyleControl.hxx           |   10 
 sc/source/ui/sidebar/CellLineStyleValueSet.cxx          |    6 
 sc/source/ui/sidebar/CellLineStyleValueSet.hxx          |    1 
 sc/source/ui/view/gridwin.cxx                           |   13 
 sc/source/ui/view/olinewin.cxx                          |    6 
 sc/source/ui/view/preview.cxx                           |    6 
 sc/source/ui/view/tabview.cxx                           |  114 +-
 sc/source/ui/view/tabview4.cxx                          |   16 
 sc/source/ui/view/tabview5.cxx                          |    8 
 sd/source/ui/animations/CustomAnimationCreateDialog.cxx |    6 
 sd/source/ui/animations/CustomAnimationCreateDialog.hxx |    1 
 sd/source/ui/animations/CustomAnimationDialog.cxx       |   25 
 sd/source/ui/animations/CustomAnimationDialog.hxx       |    2 
 sd/source/ui/animations/CustomAnimationList.cxx         |    6 
 sd/source/ui/animations/CustomAnimationList.hxx         |    1 
 sd/source/ui/animations/CustomAnimationPane.cxx         |    6 
 sd/source/ui/animations/CustomAnimationPane.hxx         |    1 
 sd/source/ui/animations/SlideTransitionPane.cxx         |    6 
 sd/source/ui/animations/SlideTransitionPane.hxx         |    1 
 sd/source/ui/annotations/annotationwindow.cxx           |    6 
 sd/source/ui/annotations/annotationwindow.hxx           |    1 
 sd/source/ui/dlg/RemoteDialogClientBox.cxx              |   88 +
 sd/source/ui/dlg/RemoteDialogClientBox.hxx              |   11 
 sd/source/ui/dlg/animobjs.cxx                           |    7 
 sd/source/ui/dlg/brkdlg.cxx                             |    6 
 sd/source/ui/dlg/copydlg.cxx                            |    7 
 sd/source/ui/dlg/dlgass.cxx                             |    6 
 sd/source/ui/dlg/dlgassim.cxx                           |    6 
 sd/source/ui/dlg/dlgassim.hxx                           |    1 
 sd/source/ui/dlg/dlgctrls.cxx                           |    6 
 sd/source/ui/dlg/dlgolbul.cxx                           |    6 
 sd/source/ui/dlg/docprev.cxx                            |    6 
 sd/source/ui/dlg/headerfooterdlg.cxx                    |    6 
 sd/source/ui/dlg/navigatr.cxx                           |  253 ++---
 sd/source/ui/dlg/prltempl.cxx                           |    6 
 sd/source/ui/dlg/sdtreelb.cxx                           |    6 
 sd/source/ui/inc/BreakDlg.hxx                           |    1 
 sd/source/ui/inc/DrawViewShell.hxx                      |    6 
 sd/source/ui/inc/OutlineBulletDlg.hxx                   |    1 
 sd/source/ui/inc/Ruler.hxx                              |    1 
 sd/source/ui/inc/Window.hxx                             |    1 
 sd/source/ui/inc/animobjs.hxx                           |    1 
 sd/source/ui/inc/copydlg.hxx                            |    1 
 sd/source/ui/inc/dlgass.hxx                             |    1 
 sd/source/ui/inc/dlgctrls.hxx                           |    1 
 sd/source/ui/inc/docprev.hxx                            |    1 
 sd/source/ui/inc/headerfooterdlg.hxx                    |    1 
 sd/source/ui/inc/navigatr.hxx                           |    7 
 sd/source/ui/inc/prltempl.hxx                           |    1 
 sd/source/ui/inc/sdtreelb.hxx                           |    1 
 sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx     |    7 
 sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx     |    1 
 sd/source/ui/sidebar/LayoutMenu.cxx                     |    6 
 sd/source/ui/sidebar/LayoutMenu.hxx                     |    1 
 sd/source/ui/sidebar/MasterPagesSelector.cxx            |    6 
 sd/source/ui/sidebar/MasterPagesSelector.hxx            |    1 
 sd/source/ui/sidebar/NavigatorWrapper.cxx               |   23 
 sd/source/ui/sidebar/NavigatorWrapper.hxx               |    3 
 sd/source/ui/sidebar/PanelBase.cxx                      |    6 
 sd/source/ui/sidebar/PanelBase.hxx                      |    1 
 sd/source/ui/slideshow/showwin.cxx                      |    6 
 sd/source/ui/slideshow/showwindow.hxx                   |    1 
 sd/source/ui/view/ViewShellBase.cxx                     |    7 
 sd/source/ui/view/drviews1.cxx                          |   62 -
 sd/source/ui/view/drviews2.cxx                          |    6 
 sd/source/ui/view/drviews3.cxx                          |    2 
 sd/source/ui/view/drviews4.cxx                          |    2 
 sd/source/ui/view/drviews5.cxx                          |    4 
 sd/source/ui/view/drviews7.cxx                          |    2 
 sd/source/ui/view/drviewsa.cxx                          |    6 
 sd/source/ui/view/drviewsb.cxx                          |    4 
 sd/source/ui/view/drviewse.cxx                          |    2 
 sd/source/ui/view/sdruler.cxx                           |    6 
 sd/source/ui/view/sdwindow.cxx                          |    6 
 starmath/inc/ElementsDockingWindow.hxx                  |    1 
 starmath/inc/dialog.hxx                                 |   18 
 starmath/inc/edit.hxx                                   |    1 
 starmath/inc/toolbox.hxx                                |    1 
 starmath/inc/view.hxx                                   |   12 
 starmath/source/ElementsDockingWindow.cxx               |    6 
 starmath/source/dialog.cxx                              |   38 
 starmath/source/edit.cxx                                |    6 
 starmath/source/toolbox.cxx                             |    6 
 starmath/source/view.cxx                                |   53 -
 svtools/source/toolpanel/toolpaneldrawer.cxx            |    9 
 svtools/source/toolpanel/toolpaneldrawer.hxx            |    2 
 svx/source/sidebar/EmptyPanel.cxx                       |    1 
 svx/source/sidebar/text/TextUnderlineControl.cxx        |   12 
 svx/source/sidebar/text/TextUnderlineControl.hxx        |    2 
 svx/source/tbxctrls/grafctrl.cxx                        |    2 
 sw/inc/AnnotationWin.hxx                                |    1 
 sw/inc/SidebarWin.hxx                                   |    1 
 sw/source/ui/chrdlg/chardlg.cxx                         |    6 
 sw/source/ui/chrdlg/drpcps.cxx                          |    7 
 sw/source/ui/chrdlg/swuiccoll.cxx                       |    7 
 sw/source/ui/config/mailconfigpage.cxx                  |    6 
 sw/source/ui/config/optcomp.cxx                         |    6 
 sw/source/ui/config/optload.cxx                         |    6 
 sw/source/ui/config/optpage.cxx                         |    6 
 sw/source/ui/dbui/addresslistdialog.cxx                 |    6 
 sw/source/ui/dbui/addresslistdialog.hxx                 |    1 
 sw/source/ui/dbui/createaddresslistdialog.cxx           |   13 
 sw/source/ui/dbui/createaddresslistdialog.hxx           |    1 
 sw/source/ui/dbui/dbinsdlg.cxx                          |    6 
 sw/source/ui/dbui/dbtablepreviewdialog.cxx              |    6 
 sw/source/ui/dbui/dbtablepreviewdialog.hxx              |    1 
 sw/source/ui/dbui/mmaddressblockpage.cxx                |  101 +-
 sw/source/ui/dbui/mmlayoutpage.cxx                      |    7 
 sw/source/ui/dbui/mmlayoutpage.hxx                      |    1 
 sw/source/ui/dbui/mmoutputpage.cxx                      |    6 
 sw/source/ui/dbui/mmoutputpage.hxx                      |    2 
 sw/source/ui/dbui/mmoutputtypepage.cxx                  |    6 
 sw/source/ui/dbui/selectdbtabledialog.cxx               |    6 
 sw/source/ui/dbui/selectdbtabledialog.hxx               |    1 
 sw/source/ui/dialog/uiregionsw.cxx                      |   12 
 sw/source/ui/dialog/wordcountdialog.cxx                 |    6 
 sw/source/ui/envelp/envlop1.cxx                         |    6 
 sw/source/ui/envelp/label1.cxx                          |   12 
 sw/source/ui/envelp/labprt.cxx                          |    6 
 sw/source/ui/envelp/labprt.hxx                          |    1 
 sw/source/ui/envelp/mailmrge.cxx                        |    6 
 sw/source/ui/envelp/swuilabimp.hxx                      |    1 
 sw/source/ui/fldui/changedb.cxx                         |    7 
 sw/source/ui/fldui/fldedt.cxx                           |    6 
 sw/source/ui/fldui/javaedit.cxx                         |    6 
 sw/source/ui/frmdlg/column.cxx                          |   12 
 sw/source/ui/frmdlg/cption.cxx                          |    6 
 sw/source/ui/frmdlg/frmpage.cxx                         |    6 
 sw/source/ui/index/cnttab.cxx                           |   66 +
 sw/source/ui/index/swuiidxmrk.cxx                       |    7 
 sw/source/ui/misc/glossary.cxx                          |    6 
 sw/source/ui/misc/insfnote.cxx                          |    7 
 sw/source/ui/misc/num.cxx                               |    6 
 sw/source/ui/misc/outline.cxx                           |    6 
 sw/source/ui/misc/srtdlg.cxx                            |    6 
 sw/source/ui/misc/swmodalredlineacceptdlg.cxx           |    6 
 sw/source/ui/misc/titlepage.cxx                         |    6 
 sw/source/ui/table/convert.cxx                          |    6 
 sw/source/ui/table/instable.cxx                         |    6 
 sw/source/ui/table/tautofmt.cxx                         |   13 
 sw/source/uibase/dbui/dbtree.cxx                        |    6 
 sw/source/uibase/dbui/mailmergehelper.cxx               |   47 
 sw/source/uibase/docvw/AnnotationWin.cxx                |    6 
 sw/source/uibase/docvw/HeaderFooterWin.cxx              |    6 
 sw/source/uibase/docvw/PageBreakWin.cxx                 |    6 
 sw/source/uibase/docvw/SidebarWin.cxx                   |    6 
 sw/source/uibase/docvw/edtwin.cxx                       |    6 
 sw/source/uibase/docvw/srcedtw.cxx                      |    8 
 sw/source/uibase/frmdlg/colex.cxx                       |    6 
 sw/source/uibase/inc/HeaderFooterWin.hxx                |    1 
 sw/source/uibase/inc/PageBreakWin.hxx                   |    1 
 sw/source/uibase/inc/changedb.hxx                       |    1 
 sw/source/uibase/inc/chrdlg.hxx                         |    1 
 sw/source/uibase/inc/colex.hxx                          |    1 
 sw/source/uibase/inc/column.hxx                         |    2 
 sw/source/uibase/inc/conttree.hxx                       |    2 
 sw/source/uibase/inc/convert.hxx                        |    1 
 sw/source/uibase/inc/cption.hxx                         |    1 
 sw/source/uibase/inc/dbinsdlg.hxx                       |    1 
 sw/source/uibase/inc/dbtree.hxx                         |    1 
 sw/source/uibase/inc/edtwin.hxx                         |    1 
 sw/source/uibase/inc/envlop.hxx                         |    1 
 sw/source/uibase/inc/fldedt.hxx                         |    1 
 sw/source/uibase/inc/formedt.hxx                        |   35 
 sw/source/uibase/inc/frmpage.hxx                        |    1 
 sw/source/uibase/inc/glossary.hxx                       |    1 
 sw/source/uibase/inc/inputwin.hxx                       |    5 
 sw/source/uibase/inc/insfnote.hxx                       |    1 
 sw/source/uibase/inc/instable.hxx                       |    1 
 sw/source/uibase/inc/javaedit.hxx                       |    1 
 sw/source/uibase/inc/label.hxx                          |    1 
 sw/source/uibase/inc/mailconfigpage.hxx                 |    1 
 sw/source/uibase/inc/mailmergehelper.hxx                |    4 
 sw/source/uibase/inc/mailmrge.hxx                       |    1 
 sw/source/uibase/inc/navipi.hxx                         |   13 
 sw/source/uibase/inc/num.hxx                            |    1 
 sw/source/uibase/inc/numberingtypelistbox.hxx           |    1 
 sw/source/uibase/inc/numfmtlb.hxx                       |    1 
 sw/source/uibase/inc/optcomp.hxx                        |    1 
 sw/source/uibase/inc/optload.hxx                        |    1 
 sw/source/uibase/inc/optpage.hxx                        |    1 
 sw/source/uibase/inc/outline.hxx                        |    9 
 sw/source/uibase/inc/redlndlg.hxx                       |    6 
 sw/source/uibase/inc/regionsw.hxx                       |    2 
 sw/source/uibase/inc/srcedtw.hxx                        |    1 
 sw/source/uibase/inc/srcview.hxx                        |    6 
 sw/source/uibase/inc/srtdlg.hxx                         |    1 
 sw/source/uibase/inc/swmodalredlineacceptdlg.hxx        |    1 
 sw/source/uibase/inc/swuiccoll.hxx                      |    1 
 sw/source/uibase/inc/swuicnttab.hxx                     |    4 
 sw/source/uibase/inc/tautofmt.hxx                       |    1 
 sw/source/uibase/inc/titlepage.hxx                      |    1 
 sw/source/uibase/inc/unotools.hxx                       |    2 
 sw/source/uibase/inc/wordcountdialog.hxx                |    1 
 sw/source/uibase/inc/workctrl.hxx                       |    1 
 sw/source/uibase/misc/numberingtypelistbox.cxx          |    6 
 sw/source/uibase/misc/redlndlg.cxx                      |   26 
 sw/source/uibase/ribbar/inputwin.cxx                    |   77 -
 sw/source/uibase/ribbar/workctrl.cxx                    |    6 
 sw/source/uibase/sidebar/PageColumnControl.cxx          |   13 
 sw/source/uibase/sidebar/PageColumnControl.hxx          |    5 
 sw/source/uibase/sidebar/PageMarginControl.cxx          |  149 +--
 sw/source/uibase/sidebar/PageMarginControl.hxx          |   27 
 sw/source/uibase/sidebar/PageOrientationControl.cxx     |    6 
 sw/source/uibase/sidebar/PageOrientationControl.hxx     |    3 
 sw/source/uibase/sidebar/PagePropertyPanel.cxx          |    6 
 sw/source/uibase/sidebar/PagePropertyPanel.hxx          |    3 
 sw/source/uibase/sidebar/PageSizeControl.cxx            |   46 
 sw/source/uibase/sidebar/PageSizeControl.hxx            |    7 
 sw/source/uibase/uiview/srcview.cxx                     |   66 -
 sw/source/uibase/uiview/viewling.cxx                    |   29 
 sw/source/uibase/utlui/content.cxx                      |   26 
 sw/source/uibase/utlui/glbltree.cxx                     |   16 
 sw/source/uibase/utlui/navipi.cxx                       |  324 +++---
 sw/source/uibase/utlui/numfmtlb.cxx                     |    6 
 sw/source/uibase/utlui/unotools.cxx                     |   16 
 vcl/source/control/edit.cxx                             |    1 
 xmlsecurity/inc/xmlsecurity/certificatechooser.hxx      |    1 
 xmlsecurity/inc/xmlsecurity/certificateviewer.hxx       |    2 
 xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx |    3 
 xmlsecurity/inc/xmlsecurity/macrosecurity.hxx           |    2 
 xmlsecurity/source/dialogs/certificatechooser.cxx       |    6 
 xmlsecurity/source/dialogs/certificateviewer.cxx        |   12 
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx  |    6 
 xmlsecurity/source/dialogs/macrosecurity.cxx            |   12 
 393 files changed, 4389 insertions(+), 2480 deletions(-)

New commits:
commit b76b6ea812c7237904057484dbcc44d235125f1e
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jan 26 13:26:36 2015 +0200

    vcl: some VclPtr fixes found by the new plugin code
    
    Change-Id: Ib4f591aaa88d8710fdb9b672533cfa8bb024160f

diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 722fc1a..4619e1a 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -63,7 +63,6 @@ private:
 protected:
     using Window::ImplInit;
     SAL_DLLPRIVATE void    ImplInit( vcl::Window* pParent, WinBits nStyle );
-    virtual        void    dispose() SAL_OVERRIDE;
 
 public:
     SAL_DLLPRIVATE bool    IsInClose() const { return mbInClose; }
@@ -84,6 +83,7 @@ public:
     explicit        Dialog( vcl::Window* pParent, WinBits nStyle = WB_STDDIALOG );
     explicit        Dialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription );
     virtual         ~Dialog();
+    virtual void    dispose() SAL_OVERRIDE;
 
     virtual bool    Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     virtual void    StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 8f57140..3830f03 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -572,7 +572,7 @@ protected:
     DECL_LINK(ScrollBarHdl, void *);
     void InitScrollBars(const Size &rRequest);
     virtual bool Notify(NotifyEvent& rNEvt) SAL_OVERRIDE;
-    void dispose() SAL_OVERRIDE { m_pVScroll.disposeAndClear(); m_pHScroll.disposeAndClear(); VclBin::dispose(); }
+    void dispose() SAL_OVERRIDE { m_pVScroll.disposeAndClear(); m_pHScroll.disposeAndClear(); m_aScrollBarBox.disposeAndClear(); VclBin::dispose(); }
 private:
     bool m_bUserManagedScrolling;
     VclPtr<ScrollBar> m_pVScroll;
diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx
index 83d5018..ad81a22 100644
--- a/svtools/source/toolpanel/toolpaneldrawer.cxx
+++ b/svtools/source/toolpanel/toolpaneldrawer.cxx
@@ -87,7 +87,16 @@ namespace svt
         m_aVisualization->SetAccessibleDescription( i_rTitle );
     }
 
+    ToolPanelDrawer::~ToolPanelDrawer()
+    {
+        dispose();
+    }
 
+    void ToolPanelDrawer::dispose()
+    {
+        m_aVisualization.disposeAndClear();
+        vcl::Window::dispose();
+    }
 
     long ToolPanelDrawer::GetPreferredHeightPixel() const
     {
diff --git a/svtools/source/toolpanel/toolpaneldrawer.hxx b/svtools/source/toolpanel/toolpaneldrawer.hxx
index a1d1a94..1f66263 100644
--- a/svtools/source/toolpanel/toolpaneldrawer.hxx
+++ b/svtools/source/toolpanel/toolpaneldrawer.hxx
@@ -63,6 +63,8 @@ namespace svt
     {
     public:
         ToolPanelDrawer( vcl::Window& i_rParent, const OUString& i_rTitle );
+        virtual ~ToolPanelDrawer();
+        virtual void dispose() SAL_OVERRIDE;
 
         long    GetPreferredHeightPixel() const;
         void    SetExpanded( const bool i_bExpanded );
diff --git a/svx/source/sidebar/EmptyPanel.cxx b/svx/source/sidebar/EmptyPanel.cxx
index 3a25381..e1639bf 100644
--- a/svx/source/sidebar/EmptyPanel.cxx
+++ b/svx/source/sidebar/EmptyPanel.cxx
@@ -53,6 +53,7 @@ EmptyPanel::~EmptyPanel()
 
 void EmptyPanel::dispose()
 {
+    maMessageControl.disposeAndClear();
     Control::dispose();
 }
 
diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx
index 9d8ea5b..b90ff4c 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.cxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.cxx
@@ -65,6 +65,18 @@ TextUnderlineControl::TextUnderlineControl (
     FreeResource();
 }
 
+TextUnderlineControl::~TextUnderlineControl()
+{
+    dispose();
+}
+
+void TextUnderlineControl::dispose()
+{
+    maVSUnderline.disposeAndClear();
+    maPBOptions.disposeAndClear();
+    svx::sidebar::PopupControl::dispose();
+}
+
 void TextUnderlineControl::initial()
 {
     maVSUnderline->SetColor(GetSettings().GetStyleSettings().GetHighContrastMode() ?
diff --git a/svx/source/sidebar/text/TextUnderlineControl.hxx b/svx/source/sidebar/text/TextUnderlineControl.hxx
index 8f4192e..441e157 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.hxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.hxx
@@ -36,6 +36,8 @@ public:
         vcl::Window* pParent,
         svx::sidebar::TextPropertyPanel& rPanel,
         SfxBindings* pBindings);
+    virtual ~TextUnderlineControl();
+    virtual void dispose() SAL_OVERRIDE;
     void Rearrange(FontUnderline eLine);
 
 private:
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index eb6b4fa..c28dc42 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -300,6 +300,8 @@ ImplGrafControl::~ImplGrafControl()
 
 void ImplGrafControl::dispose()
 {
+    maImage.disposeAndClear();
+    maField.disposeAndClear();
     Control::dispose();
 }
 
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 0ba3df2..96889dc 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -280,6 +280,7 @@ void Edit::dispose()
 
     SetType(WINDOW_WINDOW);
 
+    mpSubEdit.disposeAndClear();
     Control::dispose();
 }
 
commit 146826049f4101f47ae36db859099a10bf9c1aa7
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jan 26 13:25:18 2015 +0200

    vcl: VclPtr conversion in xmlsecurity
    
    Change-Id: I90ab1b6a9474169bb2e328518527cad6afd9ec48

diff --git a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx
index 40bafdd..811889c 100644
--- a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx
@@ -65,6 +65,7 @@ private:
 public:
     CertificateChooser( vcl::Window* pParent, css::uno::Reference< css::uno::XComponentContext>& rxCtx, css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment, const SignatureInformations& rCertsToIgnore );
     virtual ~CertificateChooser();
+    virtual void dispose() SAL_OVERRIDE;
 
     short Execute() SAL_OVERRIDE;
 
diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
index 4e91886..6c64af6 100644
--- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
@@ -58,6 +58,7 @@ private:
 public:
     CertificateViewer( vcl::Window* pParent, const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment, const css::uno::Reference< css::security::XCertificate >& rXCert, bool bCheckForPrivateKey );
     virtual             ~CertificateViewer();
+    virtual void        dispose() SAL_OVERRIDE;
 };
 
 
@@ -108,6 +109,7 @@ private:
 public:
                         CertificateViewerDetailsTP( vcl::Window* pParent, CertificateViewer* _pDlg );
     virtual             ~CertificateViewerDetailsTP();
+    virtual void        dispose() SAL_OVERRIDE;
 
     virtual void        ActivatePage() SAL_OVERRIDE;
 };
diff --git a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
index c73fc3b..9ab5126 100644
--- a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
@@ -66,7 +66,7 @@ private:
     FixedText*          m_pHintDocFT;
     FixedText*          m_pHintBasicFT;
     FixedText*          m_pHintPackageFT;
-    SvSimpleTable*     m_pSignaturesLB;
+    SvSimpleTable*      m_pSignaturesLB;
     FixedImage*         m_pSigsValidImg;
     FixedText*          m_pSigsValidFI;
     FixedImage*         m_pSigsInvalidImg;
@@ -117,6 +117,7 @@ public:
         css::uno::XComponentContext >& rxCtx, DocumentSignatureMode eMode,
         bool bReadOnly, const OUString& sODFVersion, bool bHasDocumentSignature);
     virtual ~DigitalSignaturesDialog();
+    virtual void dispose() SAL_OVERRIDE;
 
     // Initialize the dialog and the security environment, returns TRUE on success
     bool    Init();
diff --git a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
index 63c16d7..a56ce78 100644
--- a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
+++ b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
@@ -67,6 +67,7 @@ public:
         const css::uno::Reference< css::uno::XComponentContext>& rxCtx,
         const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment);
     virtual ~MacroSecurity();
+    virtual void dispose() SAL_OVERRIDE;
 
     inline void EnableReset(bool _bEnable = true)
     {
@@ -140,6 +141,7 @@ private:
 public:
     MacroSecurityTrustedSourcesTP(vcl::Window* pParent, MacroSecurity* _pDlg);
     virtual ~MacroSecurityTrustedSourcesTP();
+    virtual void        dispose() SAL_OVERRIDE;
 
     virtual void        ActivatePage() SAL_OVERRIDE;
     virtual void        ClosePage( void ) SAL_OVERRIDE;
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index c475a3c..dfd3a54 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -81,7 +81,13 @@ CertificateChooser::CertificateChooser( vcl::Window* _pParent, uno::Reference< u
 
 CertificateChooser::~CertificateChooser()
 {
+    dispose();
+}
+
+void CertificateChooser::dispose()
+{
     delete m_pCertLB;
+    ModalDialog::dispose();
 }
 
 short CertificateChooser::Execute()
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index d4f0f5a..c5dec9b 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -61,9 +61,15 @@ CertificateViewer::CertificateViewer(
 
 CertificateViewer::~CertificateViewer()
 {
+    dispose();
+}
+
+void CertificateViewer::dispose()
+{
     delete mpTabCtrl->GetTabPage(mnGeneralId);
     delete mpTabCtrl->GetTabPage(mnDetailsId);
     delete mpTabCtrl->GetTabPage(mnPathId);
+    TabDialog::dispose();
 }
 
 CertificateViewerTP::CertificateViewerTP( vcl::Window* _pParent, const OString& rID,
@@ -256,8 +262,14 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, C
 
 CertificateViewerDetailsTP::~CertificateViewerDetailsTP()
 {
+    dispose();
+}
+
+void CertificateViewerDetailsTP::dispose()
+{
     Clear();
     delete m_pElementsLB;
+    CertificateViewerTP::dispose();
 }
 
 void CertificateViewerDetailsTP::ActivatePage()
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 835dc00..d8206d1 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -232,7 +232,13 @@ DigitalSignaturesDialog::DigitalSignaturesDialog(
 
 DigitalSignaturesDialog::~DigitalSignaturesDialog()
 {
+    dispose();
+}
+
+void DigitalSignaturesDialog::dispose()
+{
     delete m_pSignaturesLB;
+    ModalDialog::dispose();
 }
 
 bool DigitalSignaturesDialog::Init()
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 33c37ba..1072952 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -84,8 +84,14 @@ MacroSecurity::MacroSecurity( vcl::Window* _pParent,
 
 MacroSecurity::~MacroSecurity()
 {
+    dispose();
+}
+
+void MacroSecurity::dispose()
+{
     delete m_pTabCtrl->GetTabPage(m_nSecTrustId);
     delete m_pTabCtrl->GetTabPage(m_nSecLevelId);
+    TabDialog::dispose();
 }
 
 MacroSecurityTP::MacroSecurityTP(vcl::Window* _pParent, const OString& rID,
@@ -394,7 +400,13 @@ MacroSecurityTrustedSourcesTP::MacroSecurityTrustedSourcesTP(vcl::Window* _pPare
 
 MacroSecurityTrustedSourcesTP::~MacroSecurityTrustedSourcesTP()
 {
+    dispose();
+}
+
+void MacroSecurityTrustedSourcesTP::dispose()
+{
     delete m_pTrustCertLB;
+    MacroSecurityTP::dispose();
 }
 
 void MacroSecurityTrustedSourcesTP::ActivatePage()
commit 0052572dc0f5c845c6370acbfb1035b5e10d3f8e
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jan 26 13:23:37 2015 +0200

    vcl: VclPtr conversion in sw
    
    Change-Id: Ie084a4b14f8371ff81fe6a95e73660e38cd376f2

diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index b0c527a..8533cfe 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -37,6 +37,7 @@ class SwAnnotationWin : public sw::sidebarwindows::SwSidebarWin
                          SwSidebarItem& rSidebarItem,
                          SwFmtFld* aField );
         virtual ~SwAnnotationWin();
+        virtual void dispose() SAL_OVERRIDE;
 
         virtual void    UpdateData() SAL_OVERRIDE;
         virtual void    SetPostItText() SAL_OVERRIDE;
diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
index 290f8bb..53c1da1 100644
--- a/sw/inc/SidebarWin.hxx
+++ b/sw/inc/SidebarWin.hxx
@@ -66,6 +66,7 @@ class SwSidebarWin : public vcl::Window
                       SwPostItBits aBits,
                       SwSidebarItem& rSidebarItem );
         virtual ~SwSidebarWin();
+        virtual void dispose() SAL_OVERRIDE;
 
         void SetSize( const Size& rNewSize );
         void SetPosSizePixelRect( long nX,
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index f2f19af..dd55c5a 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -185,7 +185,13 @@ SwCharURLPage::SwCharURLPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
 
 SwCharURLPage::~SwCharURLPage()
 {
+    dispose();
+}
+
+void SwCharURLPage::dispose()
+{
     delete pINetItem;
+    SfxTabPage::dispose();
 }
 
 void SwCharURLPage::Reset(const SfxItemSet* rSet)
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index fd9c893..30af9aa 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -117,6 +117,7 @@ public:
     void SetDropCapsPage(SwDropCapsPage* pPage) { mpPage = pPage; }
 
     virtual ~SwDropCapsPict();
+    virtual void dispose() SAL_OVERRIDE;
 
     void UpdatePaintSettings( void );       // also invalidates control!
 
@@ -202,8 +203,14 @@ static void calcFontHeightAnyAscent( OutputDevice* _pWin, vcl::Font& _rFont, lon
 
 SwDropCapsPict::~SwDropCapsPict()
 {
+    dispose();
+}
+
+void SwDropCapsPict::dispose()
+{
      if( mbDelPrinter )
          delete mpPrinter;
+     Control::dispose();
 }
 
 /// Get the details of the first script change.
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 1cce4bc..2759ac2 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -124,9 +124,14 @@ SwCondCollPage::SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet)
 
 SwCondCollPage::~SwCondCollPage()
 {
+    dispose();
+}
+
+void SwCondCollPage::dispose()
+{
     for(sal_Int32 i = 0; i < m_pFilterLB->GetEntryCount(); ++i)
         delete (sal_uInt16*)m_pFilterLB->GetEntryData(i);
-
+    SfxTabPage::dispose();
 }
 
 int SwCondCollPage::DeactivatePage(SfxItemSet * _pSet)
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 37da1bf..7a70e37 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -135,7 +135,13 @@ SwMailConfigPage::SwMailConfigPage( vcl::Window* pParent, const SfxItemSet& rSet
 
 SwMailConfigPage::~SwMailConfigPage()
 {
+    dispose();
+}
+
+void SwMailConfigPage::dispose()
+{
     delete m_pConfigItem;
+    SfxTabPage::dispose();
 }
 
 SfxTabPage*  SwMailConfigPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet)
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 2006fd5..e19dfbb 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -128,7 +128,13 @@ SwCompatibilityOptPage::SwCompatibilityOptPage(vcl::Window* pParent, const SfxIt
 
 SwCompatibilityOptPage::~SwCompatibilityOptPage()
 {
+    dispose();
+}
+
+void SwCompatibilityOptPage::dispose()
+{
     delete m_pImpl;
+    SfxTabPage::dispose();
 }
 
 sal_uLong convertBools2Ulong_Impl
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index b9cb029..f5f7fbc 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -518,8 +518,14 @@ SwCaptionOptPage::SwCaptionOptPage( vcl::Window* pParent, const SfxItemSet& rSet
 
 SwCaptionOptPage::~SwCaptionOptPage()
 {
+    dispose();
+}
+
+void SwCaptionOptPage::dispose()
+{
     DelUserData();
     delete pMgr;
+    SfxTabPage::dispose();
 }
 
 SfxTabPage* SwCaptionOptPage::Create( vcl::Window* pParent,
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 1a3dad1..95075f3 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -580,11 +580,17 @@ SwStdFontTabPage::SwStdFontTabPage( vcl::Window* pParent,
 
 SwStdFontTabPage::~SwStdFontTabPage()
 {
+    dispose();
+}
+
+void SwStdFontTabPage::dispose()
+{
     delete pFontList;
     if (bDeletePrinter)
     {
         delete pPrt;
     }
+    SfxTabPage::dispose();
 }
 
 SfxTabPage* SwStdFontTabPage::Create( vcl::Window* pParent,
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 188c99b..0ea517b 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -265,6 +265,11 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
 
 SwAddressListDialog::~SwAddressListDialog()
 {
+    dispose();
+}
+
+void SwAddressListDialog::dispose()
+{
     SvTreeListEntry* pEntry = m_pListLB->First();
     while(pEntry)
     {
@@ -273,6 +278,7 @@ SwAddressListDialog::~SwAddressListDialog()
         pEntry = m_pListLB->Next( pEntry );
     }
     delete m_pListLB;
+    SfxModalDialog::dispose();
 }
 
 IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl)
diff --git a/sw/source/ui/dbui/addresslistdialog.hxx b/sw/source/ui/dbui/addresslistdialog.hxx
index 50812ef..59d2c40 100644
--- a/sw/source/ui/dbui/addresslistdialog.hxx
+++ b/sw/source/ui/dbui/addresslistdialog.hxx
@@ -87,6 +87,7 @@ class SwAddressListDialog : public SfxModalDialog
 public:
     SwAddressListDialog(SwMailMergeAddressBlockPage* pParent);
     virtual ~SwAddressListDialog();
+    virtual void dispose() SAL_OVERRIDE;
 
     ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>
                         GetSource();
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index b331a8e..5b0327c 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -74,6 +74,7 @@ class SwAddressControl_Impl : public Control
 public:
     SwAddressControl_Impl(vcl::Window* pParent , WinBits nBits );
     virtual ~SwAddressControl_Impl();
+    virtual void dispose() SAL_OVERRIDE;
 
     void        SetData(SwCSVData& rDBData);
 
@@ -113,6 +114,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSwAddressControlImpl(v
 
 SwAddressControl_Impl::~SwAddressControl_Impl()
 {
+    dispose();
+}
+
+void SwAddressControl_Impl::dispose()
+{
     ::std::vector<FixedText*>::iterator aTextIter;
     for(aTextIter = m_aFixedTexts.begin(); aTextIter != m_aFixedTexts.end(); ++aTextIter)
         delete *aTextIter;
@@ -121,6 +127,7 @@ SwAddressControl_Impl::~SwAddressControl_Impl()
         delete *aEditIter;
     delete m_pScrollBar;
     delete m_pWindow;
+    Control::dispose();
 }
 
 void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
@@ -495,8 +502,14 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
 
 SwCreateAddressListDialog::~SwCreateAddressListDialog()
 {
+    dispose();
+}
+
+void SwCreateAddressListDialog::dispose()
+{
     delete m_pCSVData;
     delete m_pFindDlg;
+    SfxModalDialog::dispose();
 }
 
 IMPL_LINK_NOARG(SwCreateAddressListDialog, NewHdl_Impl)
diff --git a/sw/source/ui/dbui/createaddresslistdialog.hxx b/sw/source/ui/dbui/createaddresslistdialog.hxx
index 393c5a7..dec027a 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.hxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.hxx
@@ -76,6 +76,7 @@ public:
     SwCreateAddressListDialog(
             vcl::Window* pParent, const OUString& rURL, SwMailMergeConfigItem& rConfig);
     virtual ~SwCreateAddressListDialog();
+    virtual void dispose() SAL_OVERRIDE;
 
     const OUString&         GetURL() const {    return m_sURL;    }
     void                    Find( const OUString& rSearch, sal_Int32 nColumn);
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index e257496..5d1ffaa 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -412,10 +412,16 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
 
 SwInsertDBColAutoPilot::~SwInsertDBColAutoPilot()
 {
+    dispose();
+}
+
+void SwInsertDBColAutoPilot::dispose()
+{
     delete pTblSet;
     delete pRep;
 
     delete pTAutoFmt;
+    SfxModalDialog::dispose();
 }
 
 IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton )
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
index 4eb019a..76c66c7 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
@@ -81,11 +81,17 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(vcl::Window* pParent, uno::Sequen
 
 SwDBTablePreviewDialog::~SwDBTablePreviewDialog()
 {
+    dispose();
+}
+
+void SwDBTablePreviewDialog::dispose()
+{
     if(m_xFrame.is())
     {
         m_xFrame->setComponent(NULL, NULL);
         m_xFrame->dispose();
     }
+    SfxModalDialog::dispose();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.hxx b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
index e99b7f4..a1d9dce 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.hxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
@@ -39,6 +39,7 @@ public:
     SwDBTablePreviewDialog(vcl::Window* pParent,
             ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rValues  );
     virtual ~SwDBTablePreviewDialog();
+    virtual void dispose() SAL_OVERRIDE;
 
 };
 #endif
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index f0868a7..4698f3d 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -746,9 +746,9 @@ OUString SwCustomizeAddressBlockDialog::GetAddress()
 class SwAssignFieldsControl : public Control
 {
     friend class SwAssignFieldsDialog;
-    ScrollBar                   m_aVScroll;
-    HeaderBar                   m_aHeaderHB;
-    Window                      m_aWindow;
+    VclPtr<ScrollBar>           m_aVScroll;
+    VclPtr<HeaderBar>           m_aHeaderHB;
+    VclPtr<Window>              m_aWindow;
 
     ::std::vector<FixedText*>   m_aFieldNames;
     ::std::vector<ListBox*>     m_aMatches;
@@ -773,6 +773,7 @@ class SwAssignFieldsControl : public Control
 public:
     SwAssignFieldsControl(vcl::Window* pParent, WinBits nBits);
     virtual ~SwAssignFieldsControl();
+    virtual void dispose() SAL_OVERRIDE;
 
     void        Init(SwMailMergeConfigItem& rConfigItem);
     void        SetModifyHdl(const Link& rModifyHdl)
@@ -791,23 +792,23 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSwAssignFieldsControl(
 
 SwAssignFieldsControl::SwAssignFieldsControl(vcl::Window* pParent, WinBits nBits) :
     Control(pParent, nBits | WB_DIALOGCONTROL | WB_TABSTOP | WB_DIALOGCONTROL),
-    m_aVScroll(this),
-    m_aHeaderHB(this, WB_BUTTONSTYLE | WB_BOTTOMBORDER),
-    m_aWindow(this, WB_BORDER | WB_DIALOGCONTROL),
+    m_aVScroll(new ScrollBar(this)),
+    m_aHeaderHB(new HeaderBar(this, WB_BUTTONSTYLE | WB_BOTTOMBORDER)),
+    m_aWindow(new vcl::Window(this, WB_BORDER | WB_DIALOGCONTROL)),
     m_rConfigItem(NULL),
     m_nLBStartTopPos(0),
     m_nYOffset(0),
     m_nFirstYPos(0)
 {
-    long nHBHeight = m_aHeaderHB.CalcWindowSizePixel().Height();
+    long nHBHeight = m_aHeaderHB->CalcWindowSizePixel().Height();
     Size aOutputSize(GetOutputSize());
-    m_aVScroll.Show();
-    m_aHeaderHB.SetSizePixel(
+    m_aVScroll->Show();
+    m_aHeaderHB->SetSizePixel(
         Size(aOutputSize.Width(), nHBHeight));
-    m_aHeaderHB.Show();
-    m_aWindow.SetPosPixel(Point( 0, nHBHeight) );
-    m_aWindow.SetSizePixel(Size(aOutputSize.Width() - m_aVScroll.GetSizePixel().Width(), aOutputSize.Height() - nHBHeight));
-    m_aWindow.Show();
+    m_aHeaderHB->Show();
+    m_aWindow->SetPosPixel(Point( 0, nHBHeight) );
+    m_aWindow->SetSizePixel(Size(aOutputSize.Width() - m_aVScroll->GetSizePixel().Width(), aOutputSize.Height() - nHBHeight));
+    m_aWindow->Show();
 }
 
 Size SwAssignFieldsControl::GetOptimalSize() const
@@ -819,7 +820,7 @@ void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem)
 {
     m_rConfigItem = &rConfigItem;
     Size aOutputSize(GetOutputSize());
-    long nHBHeight = m_aHeaderHB.CalcWindowSizePixel().Height();
+    long nHBHeight = m_aHeaderHB->CalcWindowSizePixel().Height();
 
     //get the name of the default headers
     const ResStringArray& rHeaders = rConfigItem.GetDefaultAddressHeaders();
@@ -845,9 +846,9 @@ void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem)
     for(sal_uInt32 i = 0; i < rHeaders.Count(); ++i)
     {
         const OUString rHeader = rHeaders.GetString( i );
-        FixedText* pNewText = new FixedText(&m_aWindow, WB_VCENTER);
+        FixedText* pNewText = new FixedText(m_aWindow.get(), WB_VCENTER);
         pNewText->SetText("<" + rHeader + ">");
-        ListBox* pNewLB = new ListBox(&m_aWindow, WB_DROPDOWN | WB_VCENTER | WB_TABSTOP);
+        ListBox* pNewLB = new ListBox(m_aWindow.get(), WB_DROPDOWN | WB_VCENTER | WB_TABSTOP);
         pNewText->set_mnemonic_widget(pNewLB);
         pNewLB->InsertEntry(SW_RESSTR(SW_STR_NONE));
         pNewLB->SelectEntryPos(0);
@@ -861,7 +862,7 @@ void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem)
 
         for(sal_Int32 nField = 0; nField < aFields.getLength(); ++nField)
             pNewLB->InsertEntry(pFields[nField]);
-        FixedText* pNewPreview = new FixedText(&m_aWindow, WB_VCENTER);
+        FixedText* pNewPreview = new FixedText(m_aWindow.get(), WB_VCENTER);
         pNewText->SetSizePixel(Size(nControlWidth - 6, nControlHeight));
         pNewLB->SetSizePixel(Size(nControlWidth - 6, nControlHeight));
         pNewPreview->SetSizePixel(Size(aOutputSize.Width() - 2 * nControlWidth, nControlHeight));
@@ -911,18 +912,23 @@ void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem)
         pNewPreview->Show();
         pNewPreview->SetPosPixel(Point(2 * nControlWidth + 6, nMove));
     }
-    m_aVScroll.SetRange(Range(0, rHeaders.Count()));
-    m_aVScroll.SetPageSize((aOutputSize.Height() - nHBHeight - m_nLBStartTopPos)/ m_nYOffset);
-    m_aVScroll.EnableDrag();
-    m_aVScroll.SetVisibleSize(m_aVScroll.GetPageSize());
-    m_aVScroll.SetScrollHdl(LINK(this, SwAssignFieldsControl, ScrollHdl_Impl));
+    m_aVScroll->SetRange(Range(0, rHeaders.Count()));
+    m_aVScroll->SetPageSize((aOutputSize.Height() - nHBHeight - m_nLBStartTopPos)/ m_nYOffset);
+    m_aVScroll->EnableDrag();
+    m_aVScroll->SetVisibleSize(m_aVScroll->GetPageSize());
+    m_aVScroll->SetScrollHdl(LINK(this, SwAssignFieldsControl, ScrollHdl_Impl));
 
-    m_aVScroll.SetPosPixel(Point(aOutputSize.Width() - m_aVScroll.GetSizePixel().Width(), nHBHeight));
-    m_aVScroll.SetSizePixel(Size(m_aVScroll.GetSizePixel().Width(), aOutputSize.Height() - nHBHeight));
+    m_aVScroll->SetPosPixel(Point(aOutputSize.Width() - m_aVScroll->GetSizePixel().Width(), nHBHeight));
+    m_aVScroll->SetSizePixel(Size(m_aVScroll->GetSizePixel().Width(), aOutputSize.Height() - nHBHeight));
 }
 
 SwAssignFieldsControl::~SwAssignFieldsControl()
 {
+    dispose();
+}
+
+void SwAssignFieldsControl::dispose()
+{
     ::std::vector<FixedText*>::iterator aFIIter;
     for(aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter)
         delete *aFIIter;
@@ -931,6 +937,11 @@ SwAssignFieldsControl::~SwAssignFieldsControl()
         delete *aLBIter;
     for(aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter)
         delete *aFIIter;
+
+    m_aVScroll.disposeAndClear();
+    m_aHeaderHB.disposeAndClear();
+    m_aWindow.disposeAndClear();
+    Control::dispose();
 }
 
 void SwAssignFieldsControl::Resize()
@@ -938,22 +949,22 @@ void SwAssignFieldsControl::Resize()
     Window::Resize();
 
     Size aOutputSize = GetOutputSize();
-    long nHBHeight = m_aHeaderHB.CalcWindowSizePixel().Height();
+    long nHBHeight = m_aHeaderHB->CalcWindowSizePixel().Height();
 
-    m_aWindow.SetSizePixel(Size(aOutputSize.Width() - m_aVScroll.GetSizePixel().Width(), aOutputSize.Height() - nHBHeight));
+    m_aWindow->SetSizePixel(Size(aOutputSize.Width() - m_aVScroll->GetSizePixel().Width(), aOutputSize.Height() - nHBHeight));
 
-    m_aVScroll.SetPosPixel(Point(aOutputSize.Width() - m_aVScroll.GetSizePixel().Width(), nHBHeight));
-    m_aVScroll.SetSizePixel(Size(m_aVScroll.GetSizePixel().Width(), aOutputSize.Height() - nHBHeight));
+    m_aVScroll->SetPosPixel(Point(aOutputSize.Width() - m_aVScroll->GetSizePixel().Width(), nHBHeight));
+    m_aVScroll->SetSizePixel(Size(m_aVScroll->GetSizePixel().Width(), aOutputSize.Height() - nHBHeight));
     if(m_nYOffset)
-        m_aVScroll.SetPageSize((aOutputSize.Height() - nHBHeight - m_nLBStartTopPos)/ m_nYOffset);
-    m_aVScroll.SetVisibleSize(m_aVScroll.GetPageSize());
-    m_aVScroll.DoScroll(0);
+        m_aVScroll->SetPageSize((aOutputSize.Height() - nHBHeight - m_nLBStartTopPos)/ m_nYOffset);
+    m_aVScroll->SetVisibleSize(m_aVScroll->GetPageSize());
+    m_aVScroll->DoScroll(0);
 
     sal_Int32 nColWidth = aOutputSize.Width() / 3;
-    m_aHeaderHB.SetSizePixel(Size(aOutputSize.Width(), nHBHeight));
-    m_aHeaderHB.SetItemSize(1, nColWidth);
-    m_aHeaderHB.SetItemSize(2, nColWidth);
-    m_aHeaderHB.SetItemSize(3, nColWidth);
+    m_aHeaderHB->SetSizePixel(Size(aOutputSize.Width(), nHBHeight));
+    m_aHeaderHB->SetItemSize(1, nColWidth);
+    m_aHeaderHB->SetItemSize(2, nColWidth);
+    m_aHeaderHB->SetItemSize(3, nColWidth);
 
     if (m_aFieldNames.empty() || m_aMatches.empty())
         return;
@@ -988,7 +999,7 @@ void SwAssignFieldsControl::Command( const CommandEvent& rCEvt )
             const CommandWheelData* pWheelData = rCEvt.GetWheelData();
             if(pWheelData && !pWheelData->IsHorz() && CommandWheelMode::ZOOM != pWheelData->GetMode())
             {
-                HandleScrollCommand( rCEvt, 0, &m_aVScroll );
+                HandleScrollCommand( rCEvt, 0, m_aVScroll.get() );
             }
         }
         break;
@@ -1014,15 +1025,15 @@ bool SwAssignFieldsControl::PreNotify( NotifyEvent& rNEvt )
 
 void SwAssignFieldsControl::MakeVisible( sal_Int32 nIndex )
 {
-    long nThumb = m_aVScroll.GetThumbPos();
-    long nPage = m_aVScroll.GetPageSize();
+    long nThumb = m_aVScroll->GetThumbPos();
+    long nPage = m_aVScroll->GetPageSize();
     if(nThumb > nIndex)
-        m_aVScroll.SetThumbPos( nIndex );
+        m_aVScroll->SetThumbPos( nIndex );
     else if( (nThumb + nPage) < nIndex)
-        m_aVScroll.SetThumbPos( nIndex - nPage );
+        m_aVScroll->SetThumbPos( nIndex - nPage );
     else
         return;
-    ScrollHdl_Impl( &m_aVScroll );
+    ScrollHdl_Impl( m_aVScroll.get() );
 }
 
 IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
@@ -1132,13 +1143,13 @@ SwAssignFieldsDialog::SwAssignFieldsDialog(
         sAddressElement = SW_RESSTR(ST_SALUTATIONELEMENT);
     }
 
-    Size aOutputSize(m_pFieldsControl->m_aHeaderHB.GetSizePixel());
+    Size aOutputSize(m_pFieldsControl->m_aHeaderHB->GetSizePixel());
     sal_Int32 nFirstWidth;
     sal_Int32 nSecondWidth = nFirstWidth = aOutputSize.Width() / 3;
     const WinBits nHeadBits = HIB_VCENTER | HIB_FIXED| HIB_FIXEDPOS;
-    m_pFieldsControl->m_aHeaderHB.InsertItem( 1, sAddressElement, nFirstWidth, nHeadBits|HIB_LEFT);
-    m_pFieldsControl->m_aHeaderHB.InsertItem( 2, sMatchesTo,      nSecondWidth, nHeadBits|HIB_LEFT);
-    m_pFieldsControl->m_aHeaderHB.InsertItem( 3, sPreview,
+    m_pFieldsControl->m_aHeaderHB->InsertItem( 1, sAddressElement, nFirstWidth, nHeadBits|HIB_LEFT);
+    m_pFieldsControl->m_aHeaderHB->InsertItem( 2, sMatchesTo,      nSecondWidth, nHeadBits|HIB_LEFT);
+    m_pFieldsControl->m_aHeaderHB->InsertItem( 3, sPreview,
             aOutputSize.Width() - nFirstWidth - nSecondWidth, nHeadBits|HIB_LEFT);
 
     m_pFieldsControl->SetModifyHdl(LINK(this, SwAssignFieldsDialog, AssignmentModifyHdl_Impl ));
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index a89ed65..67b1245 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -155,9 +155,14 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
 
 SwMailMergeLayoutPage::~SwMailMergeLayoutPage()
 {
+    dispose();
+}
+
+void SwMailMergeLayoutPage::dispose()
+{
     delete m_pExampleFrame;
     File::remove( m_sExampleURL );
-
+    svt::OWizardPage::dispose();
 }
 
 void SwMailMergeLayoutPage::ActivatePage()
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx
index c770705..69e534b 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -84,6 +84,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage
 public:
         SwMailMergeLayoutPage( SwMailMergeWizard* _pParent);
         virtual ~SwMailMergeLayoutPage();
+    virtual void            dispose() SAL_OVERRIDE;
 
     static SwFrmFmt*        InsertAddressAndGreeting(SwView* pView,
                                             SwMailMergeConfigItem& rConfigItem,
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index b5af544..9713a7c 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -300,7 +300,13 @@ SwMailMergeOutputPage::SwMailMergeOutputPage(SwMailMergeWizard* _pParent)
 
 SwMailMergeOutputPage::~SwMailMergeOutputPage()
 {
+    dispose();
+}
+
+void SwMailMergeOutputPage::dispose()
+{
     delete m_pTempPrinter;
+    svt::OWizardPage::dispose();
 }
 
 void SwMailMergeOutputPage::ActivatePage()
diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx
index a31ddea..37cc92c 100644
--- a/sw/source/ui/dbui/mmoutputpage.hxx
+++ b/sw/source/ui/dbui/mmoutputpage.hxx
@@ -126,6 +126,7 @@ protected:
 public:
         SwMailMergeOutputPage( SwMailMergeWizard* _pParent);
         virtual ~SwMailMergeOutputPage();
+    virtual void dispose() SAL_OVERRIDE;
 
 };
 
@@ -192,6 +193,7 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog
 public:
     SwSendMailDialog( vcl::Window* pParent, SwMailMergeConfigItem& );
     virtual ~SwSendMailDialog();
+    virtual void        dispose() SAL_OVERRIDE;
 
     void                AddDocument( SwMailDescriptor& rDesc );
     void                SetDocumentCount( sal_Int32 nAllDocuments );
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 57abcde..aa3aa83 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -282,6 +282,11 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem&
 
 SwSendMailDialog::~SwSendMailDialog()
 {
+    dispose();
+}
+
+void SwSendMailDialog::dispose()
+{
     if(m_pImpl->xMailDispatcher.is())
     {
         try
@@ -307,6 +312,7 @@ SwSendMailDialog::~SwSendMailDialog()
     }
     delete m_pStatus;
     delete m_pImpl;
+    ModelessDialog::dispose();
 }
 
 void SwSendMailDialog::AddDocument( SwMailDescriptor& rDesc )
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 9978bd2..3fe0f55 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -147,7 +147,13 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent,
 
 SwSelectDBTableDialog::~SwSelectDBTableDialog()
 {
+    dispose();
+}
+
+void SwSelectDBTableDialog::dispose()
+{
     delete m_pTable;
+    SfxModalDialog::dispose();
 }
 
 IMPL_LINK(SwSelectDBTableDialog, PreviewHdl, PushButton*, pButton)
diff --git a/sw/source/ui/dbui/selectdbtabledialog.hxx b/sw/source/ui/dbui/selectdbtabledialog.hxx
index 729675e..52c8c05 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.hxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.hxx
@@ -50,6 +50,7 @@ public:
     SwSelectDBTableDialog(vcl::Window* pParent,
         const css::uno::Reference<css::sdbc::XConnection>& xConnection);
     virtual ~SwSelectDBTableDialog();
+    virtual void dispose() SAL_OVERRIDE;
 
     OUString    GetSelectedTable(bool& bIsTable);
     void        SetSelectedTable(const OUString& rTable, bool bIsTable);
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index ecf9f93..3f75456 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -516,6 +516,11 @@ sal_uInt16 SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
 
 SwEditRegionDlg::~SwEditRegionDlg( )
 {
+    dispose();
+}
+
+void SwEditRegionDlg::dispose()
+{
     SvTreeListEntry* pEntry = m_pTree->First();
     while( pEntry )
     {
@@ -524,6 +529,7 @@ SwEditRegionDlg::~SwEditRegionDlg( )
     }
 
     delete m_pDocInserter;
+    SfxModalDialog::dispose();
 }
 
 void    SwEditRegionDlg::SelectSection(const OUString& rSectionName)
@@ -1533,7 +1539,13 @@ SwInsertSectionTabPage::SwInsertSectionTabPage(
 
 SwInsertSectionTabPage::~SwInsertSectionTabPage()
 {
+    dispose();
+}
+
+void SwInsertSectionTabPage::dispose()
+{
     delete m_pDocInserter;
+    SfxTabPage::dispose();
 }
 
 void    SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx
index 2a7392e..9f5f562 100644
--- a/sw/source/ui/dialog/wordcountdialog.cxx
+++ b/sw/source/ui/dialog/wordcountdialog.cxx
@@ -46,7 +46,13 @@ IMPL_LINK_NOARG(SwWordCountFloatDlg, CloseHdl)
 
 SwWordCountFloatDlg::~SwWordCountFloatDlg()
 {
+    dispose();
+}
+
+void SwWordCountFloatDlg::dispose()
+{
     SwViewShell::SetCareWin( 0 );
+    SfxModelessDialog::dispose();
 }
 
 namespace
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 908d873..5e36eb0 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -153,8 +153,14 @@ SwEnvDlg::SwEnvDlg(vcl::Window* pParent, const SfxItemSet& rSet,
 
 SwEnvDlg::~SwEnvDlg()
 {
+    dispose();
+}
+
+void SwEnvDlg::dispose()
+{
     delete pAddresseeSet;
     delete pSenderSet;
+    SfxTabDialog::dispose();
 }
 
 void SwEnvDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index f217acd..7f1e76b 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -170,7 +170,13 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet,
 
 SwLabDlg::~SwLabDlg()
 {
+    dispose();
+}
+
+void SwLabDlg::dispose()
+{
     delete pRecs;
+    SfxTabDialog::dispose();
 }
 
 void SwLabDlg::GetLabItem(SwLabItem &rItem)
@@ -586,12 +592,18 @@ SwVisitingCardPage::SwVisitingCardPage(vcl::Window* pParent, const SfxItemSet& r
 
 SwVisitingCardPage::~SwVisitingCardPage()
 {
+    dispose();
+}
+
+void SwVisitingCardPage::dispose()
+{
     for(sal_Int32 i = 0; i < m_pAutoTextGroupLB->GetEntryCount(); ++i)
         delete (OUString*)m_pAutoTextGroupLB->GetEntryData( i );
     m_xAutoText = 0;
 
     ClearUserData();
     delete pExampleFrame;
+    SfxTabPage::dispose();
 }
 
 SfxTabPage* SwVisitingCardPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index 469085f..dab2e8a 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -62,7 +62,13 @@ SwLabPrtPage::SwLabPrtPage(vcl::Window* pParent, const SfxItemSet& rSet)
 
 SwLabPrtPage::~SwLabPrtPage()
 {
+    dispose();
+}
+
+void SwLabPrtPage::dispose()
+{
     delete pPrinter;
+    SfxTabPage::dispose();
 }
 
 IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton )
diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx
index 67e92d2..e998d5b 100644
--- a/sw/source/ui/envelp/labprt.hxx
+++ b/sw/source/ui/envelp/labprt.hxx
@@ -46,6 +46,7 @@ class SwLabPrtPage : public SfxTabPage
 
      SwLabPrtPage(vcl::Window* pParent, const SfxItemSet& rSet);
     virtual ~SwLabPrtPage();
+    virtual void dispose() SAL_OVERRIDE;
 
     DECL_LINK( CountHdl, Button * );
 
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 9adfbb8..b7a0b63 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -389,6 +389,11 @@ SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell,
 
 SwMailMergeDlg::~SwMailMergeDlg()
 {
+    dispose();
+}
+
+void SwMailMergeDlg::dispose()
+{
     if(m_xFrame.is())
     {
         m_xFrame->setComponent(NULL, NULL);
@@ -401,6 +406,7 @@ SwMailMergeDlg::~SwMailMergeDlg()
         delete pData;
     }
     delete pImpl;
+    SvxStandardDialog::dispose();
 }
 
 void SwMailMergeDlg::Apply()
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index d7b3a5d..126c1a7 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -110,6 +110,7 @@ class SwVisitingCardPage : public SfxTabPage
 
     SwVisitingCardPage(vcl::Window* pParent, const SfxItemSet& rSet);
     virtual ~SwVisitingCardPage();
+    virtual void dispose() SAL_OVERRIDE;
 
     using TabPage::ActivatePage;
     using TabPage::DeactivatePage;
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index c76c889..7abf908 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -163,8 +163,15 @@ SvTreeListEntry* SwChangeDBDlg::Insert(const OUString& rDBName)
 // destroy dialog
 SwChangeDBDlg::~SwChangeDBDlg()
 {
+    dispose();
+}
+
+void SwChangeDBDlg::dispose()
+{
     delete pMgr;
+    SvxStandardDialog::dispose();
 }
+
 // close
 void SwChangeDBDlg::Apply()
 {
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 8a1eb1e..84c8b39 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -192,8 +192,14 @@ SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup)
 
 SwFldEditDlg::~SwFldEditDlg()
 {
+    dispose();
+}
+
+void SwFldEditDlg::dispose()
+{
     SwViewShell::SetCareWin(NULL);
     pSh->EnterStdMode();
+    SfxSingleTabDialog::dispose();
 }
 
 void SwFldEditDlg::EnableInsert(bool bEnable)
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index e67d532..9f6293f 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -88,9 +88,15 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) :
 
 SwJavaEditDialog::~SwJavaEditDialog()
 {
+    dispose();
+}
+
+void SwJavaEditDialog::dispose()
+{
     delete pMgr;
     delete pFileDlg;
     Application::SetDefDialogParent( pOldDefDlgParent );
+    SvxStandardDialog::dispose();
 }
 
 IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, PrevHdl)
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index d616f06..f3d5ace 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -214,10 +214,16 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh)
 
 SwColumnDlg::~SwColumnDlg()
 {
+    dispose();
+}
+
+void SwColumnDlg::dispose()
+{
     delete pTabPage;
     delete pPageSet;
     delete pSectionSet;
     delete pSelectionSet;
+    SfxModalDialog::dispose();
 }
 
 IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox)
@@ -543,7 +549,13 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
 
 SwColumnPage::~SwColumnPage()
 {
+    dispose();
+}
+
+void SwColumnPage::dispose()
+{
     delete pColMgr;
+    SfxTabPage::dispose();
 }
 
 void SwColumnPage::SetPageWidth(long nPageWidth)
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index ac174be..5515982 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -410,7 +410,13 @@ void SwCaptionDialog::DrawSample()
 
 SwCaptionDialog::~SwCaptionDialog()
 {
+    dispose();
+}
+
+void SwCaptionDialog::dispose()
+{
     delete pMgr;
+    SvxStandardDialog::dispose();
 }
 
 SwSequenceOptionDialog::SwSequenceOptionDialog( vcl::Window *pParent, SwView &rV,
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 460b894..eb0943a 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2369,7 +2369,13 @@ SwGrfExtPage::SwGrfExtPage(vcl::Window *pParent, const SfxItemSet &rSet)
 
 SwGrfExtPage::~SwGrfExtPage()
 {
+    dispose();
+}
+
+void SwGrfExtPage::dispose()
+{
     delete pGrfDlg;
+    SfxTabPage::dispose();
 }
 
 SfxTabPage* SwGrfExtPage::Create( vcl::Window *pParent, const SfxItemSet *rSet )
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 325ed0f..9cc4f25 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -140,8 +140,8 @@ typedef ::svt::EditBrowseBox SwEntryBrowseBox_Base;
 
 class SwEntryBrowseBox : public SwEntryBrowseBox_Base
 {
-    Edit                    aCellEdit;
-    ::svt::CheckBoxControl  aCellCheckBox;
+    VclPtr<Edit>                    aCellEdit;
+    VclPtr<::svt::CheckBoxControl>  aCellCheckBox;
 
     OUString  sSearch;
     OUString  sAlternative;
@@ -174,6 +174,8 @@ protected:
 
 public:
     SwEntryBrowseBox(vcl::Window* pParent, VclBuilderContainer* pBuilder);
+    virtual ~SwEntryBrowseBox();
+    virtual void                    dispose() SAL_OVERRIDE;
     void                            ReadEntries(SvStream& rInStr);
     void                            WriteEntries(SvStream& rOutStr);
 
@@ -199,6 +201,7 @@ public:
     SwAutoMarkDlg_Impl(vcl::Window* pParent, const OUString& rAutoMarkURL,
                        bool bCreate);
     virtual ~SwAutoMarkDlg_Impl();
+    virtual void dispose() SAL_OVERRIDE;
 
 };
 
@@ -319,6 +322,11 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
 
 SwMultiTOXTabDialog::~SwMultiTOXTabDialog()
 {
+    dispose();
+}
+
+void SwMultiTOXTabDialog::dispose()
+{
     SW_MOD()->GetModuleConfig()->SetShowIndexPreview(m_pShowExampleCB->IsChecked());
 
     // fdo#38515 Avoid setting focus on deleted controls in the destructors
@@ -336,6 +344,7 @@ SwMultiTOXTabDialog::~SwMultiTOXTabDialog()
     delete[] pDescArr;
     delete pMgr;
     delete pExampleFrame;
+    SfxTabDialog::dispose();
 }
 
 void SwMultiTOXTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
@@ -632,6 +641,7 @@ class SwAddStylesDlg_Impl : public SfxModalDialog
 public:
     SwAddStylesDlg_Impl(vcl::Window* pParent, SwWrtShell& rWrtSh, OUString rStringArr[]);
     virtual ~SwAddStylesDlg_Impl();
+    virtual void dispose() SAL_OVERRIDE;
 };
 
 SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(vcl::Window* pParent,
@@ -706,7 +716,13 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(vcl::Window* pParent,
 
 SwAddStylesDlg_Impl::~SwAddStylesDlg_Impl()
 {
+    dispose();
+}
+
+void SwAddStylesDlg_Impl::dispose()
+{
     delete m_pHeaderTree;
+    SfxModalDialog::dispose();
 }
 
 IMPL_LINK_NOARG(SwAddStylesDlg_Impl, OkHdl)
@@ -880,8 +896,14 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r
 
 SwTOXSelectTabPage::~SwTOXSelectTabPage()
 {
+    dispose();
+}
+
+void SwTOXSelectTabPage::dispose()
+{
     delete pIndexRes;
     delete pIndexEntryWrapper;
+    SfxTabPage::dispose();
 }
 
 void SwTOXSelectTabPage::SetWrtShell(SwWrtShell& rSh)
@@ -2626,6 +2648,11 @@ void SwTokenWindow::setAllocation(const Size &rAllocation)
 
 SwTokenWindow::~SwTokenWindow()
 {
+    dispose();
+}
+
+void SwTokenWindow::dispose()
+{
     for (ctrl_iterator it = aControlList.begin(); it != aControlList.end(); ++it)
     {
         Control* pControl = (*it);
@@ -2633,6 +2660,7 @@ SwTokenWindow::~SwTokenWindow()
         pControl->SetLoseFocusHdl( Link() );
         delete pControl;
     }
+    VclHBox::dispose();
 }
 
 void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
@@ -3507,7 +3535,13 @@ SwTOXStylesTabPage::SwTOXStylesTabPage(vcl::Window* pParent, const SfxItemSet& r
 
 SwTOXStylesTabPage::~SwTOXStylesTabPage()
 {
+    dispose();
+}
+
+void SwTOXStylesTabPage::dispose()
+{
     delete m_pCurrentForm;
+    SfxTabPage::dispose();
 }
 
 bool SwTOXStylesTabPage::FillItemSet( SfxItemSet* )
@@ -3705,8 +3739,8 @@ SwEntryBrowseBox::SwEntryBrowseBox(vcl::Window* pParent, VclBuilderContainer* pB
                            BROWSER_VLINESFULL |
                            BROWSER_AUTO_VSCROLL|
                            BROWSER_HIDECURSOR   )
-    , aCellEdit(&GetDataWindow(), 0)
-    , aCellCheckBox(&GetDataWindow())
+    , aCellEdit(new Edit(&GetDataWindow(), 0))
+    , aCellCheckBox(new ::svt::CheckBoxControl(&GetDataWindow()))
     , nCurrentRow(0)
     , bModified(false)
 {
@@ -3720,9 +3754,9 @@ SwEntryBrowseBox::SwEntryBrowseBox(vcl::Window* pParent, VclBuilderContainer* pB
     sYes = pBuilder->get<vcl::Window>("yes")->GetText();
     sNo = pBuilder->get<vcl::Window>("no")->GetText();
 
-    aCellCheckBox.GetBox().EnableTriState(false);
-    xController = new ::svt::EditCellController(&aCellEdit);
-    xCheckController = new ::svt::CheckBoxCellController(&aCellCheckBox);
+    aCellCheckBox->GetBox().EnableTriState(false);
+    xController = new ::svt::EditCellController(aCellEdit.get());
+    xCheckController = new ::svt::CheckBoxCellController(aCellCheckBox.get());
 
     // HACK: BrowseBox doesn't invalidate its children, how it should be.
     // That's why WB_CLIPCHILDREN is reset in order to enforce the
@@ -3753,6 +3787,18 @@ SwEntryBrowseBox::SwEntryBrowseBox(vcl::Window* pParent, VclBuilderContainer* pB
                           HIB_STDSTYLE, HEADERBAR_APPEND );
 }
 
+SwEntryBrowseBox::~SwEntryBrowseBox()
+{
+    dispose();
+}
+
+void SwEntryBrowseBox::dispose()
+{
+    aCellEdit.disposeAndClear();
+    aCellCheckBox.disposeAndClear();
+    SwEntryBrowseBox_Base::dispose();
+}
+
 void SwEntryBrowseBox::Resize()
 {
     SwEntryBrowseBox_Base::Resize();
@@ -4042,7 +4088,13 @@ SwAutoMarkDlg_Impl::SwAutoMarkDlg_Impl(vcl::Window* pParent, const OUString& rAu
 
 SwAutoMarkDlg_Impl::~SwAutoMarkDlg_Impl()
 {
+    dispose();
+}
+
+void SwAutoMarkDlg_Impl::dispose()
+{
     delete m_pEntriesBB;
+    ModalDialog::dispose();
 }
 
 IMPL_LINK_NOARG(SwAutoMarkDlg_Impl, OkHdl)
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 6e76ef3..84015dc 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1011,6 +1011,7 @@ public:
                             bool bNewEntry,
                             bool bCreate);
     virtual ~SwCreateAuthEntryDlg_Impl();
+    virtual void    dispose() SAL_OVERRIDE;
 
     OUString        GetEntryText(ToxAuthorityField eField) const;
 
@@ -1523,6 +1524,11 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(vcl::Window* pParent,
 
 SwCreateAuthEntryDlg_Impl::~SwCreateAuthEntryDlg_Impl()
 {
+    dispose();
+}
+
+void SwCreateAuthEntryDlg_Impl::dispose()
+{
     for(int i = 0; i < AUTH_FIELD_END; i++)
     {
         delete pFixedTexts[i];
@@ -1530,6 +1536,7 @@ SwCreateAuthEntryDlg_Impl::~SwCreateAuthEntryDlg_Impl()
     }
     delete pTypeListBox;
     delete pIdentifierBox;
+    ModalDialog::dispose();
 }
 
 OUString  SwCreateAuthEntryDlg_Impl::GetEntryText(ToxAuthorityField eField) const
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index db61233..307754c 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -232,8 +232,14 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame,
 
 SwGlossaryDlg::~SwGlossaryDlg()
 {
+    dispose();
+}
+
+void SwGlossaryDlg::dispose()
+{
     m_pCategoryBox->Clear();
     delete pExampleFrame;
+    SvxStandardDialog::dispose();
 }
 
 // select new group
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 2d6ba9e..e9c76c4 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -204,10 +204,17 @@ SwInsFootNoteDlg::SwInsFootNoteDlg(vcl::Window *pParent, SwWrtShell &rShell, boo
 
 SwInsFootNoteDlg::~SwInsFootNoteDlg()
 {
+    dispose();
+}
+
+void SwInsFootNoteDlg::dispose()
+{
     SwViewShell::SetCareWin(0);
 
     if (bEdit)
         rSh.ResetSelect(0, false);
+
+    SvxStandardDialog::dispose();
 }
 
 void SwInsFootNoteDlg::Init()
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index ae35a00..87b535d 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -163,7 +163,13 @@ SwNumPositionTabPage::SwNumPositionTabPage(vcl::Window* pParent,
 
 SwNumPositionTabPage::~SwNumPositionTabPage()
 {
+    dispose();
+}
+
+void SwNumPositionTabPage::dispose()
+{
     delete pActNum;
+    SfxTabPage::dispose();
 }
 
 void SwNumPositionTabPage::InitControls()
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 930c737..0230c94 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -193,7 +193,13 @@ SwOutlineTabDialog::SwOutlineTabDialog(vcl::Window* pParent, const SfxItemSet* p
 
 SwOutlineTabDialog::~SwOutlineTabDialog()
 {
+    dispose();
+}
+
+void SwOutlineTabDialog::dispose()
+{
     delete pNumRule;
+    SfxTabDialog::dispose();
 }
 
 void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index 084c73b..9e44c7d 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -250,10 +250,16 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell)
 
 SwSortDlg::~SwSortDlg()
 {
+    dispose();
+}
+
+void SwSortDlg::dispose()
+{
     ::lcl_ClearLstBoxAndDelUserData(*m_pTypDLB1);
     ::lcl_ClearLstBoxAndDelUserData(*m_pTypDLB2);
     ::lcl_ClearLstBoxAndDelUserData(*m_pTypDLB3);
     delete pColRes;
+    SvxStandardDialog::dispose();
 }
 
 sal_Unicode SwSortDlg::GetDelimChar() const
diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
index 153bbc1..cb8a89e92 100644
--- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
+++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
@@ -55,10 +55,16 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(vcl::Window *pParent)
 
 SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg()
 {
+    dispose();
+}
+
+void SwModalRedlineAcceptDlg::dispose()
+{
     AcceptAll(false);   // refuse everything remaining
     pImplDlg->FillInfo(GetExtraData());
 
     delete pImplDlg;
+    SfxModalDialog::dispose();
 }
 
 void SwModalRedlineAcceptDlg::Activate()
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 2dbd5ec..76fe927 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -270,7 +270,13 @@ IMPL_LINK_NOARG(SwTitlePageDlg, StartPageHdl)
 
 SwTitlePageDlg::~SwTitlePageDlg()
 {
+    dispose();
+}
+
+void SwTitlePageDlg::dispose()
+{
     delete mpPageFmtDesc;
+    SfxModalDialog::dispose();
 }
 
 IMPL_LINK_NOARG(SwTitlePageDlg, EditHdl)
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index cb31042..5d0567d 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -174,7 +174,13 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
 
 SwConvertTableDlg:: ~SwConvertTableDlg()
 {
+    dispose();
+}
+
+void SwConvertTableDlg::dispose()
+{
     delete pTAutoFmt;
+    SfxModalDialog::dispose();
 }
 
 IMPL_LINK( SwConvertTableDlg, AutoFmtHdl, PushButton*, pButton )
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index 56e6c02..817667f 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -137,7 +137,13 @@ IMPL_LINK_NOARG(SwInsTableDlg, OKHdl)
 
 SwInsTableDlg::~SwInsTableDlg()
 {
+    dispose();
+}
+
+void SwInsTableDlg::dispose()
+{
     delete pTAutoFmt;
+    SfxModalDialog::dispose();
 }
 
 IMPL_LINK_INLINE_START( SwInsTableDlg, ModifyName, Edit *, pEdit )
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 763208a..752acaa 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -49,6 +49,7 @@ class AutoFmtPreview : public vcl::Window
 public:
     AutoFmtPreview(vcl::Window* pParent, WinBits nStyle);
     virtual ~AutoFmtPreview();
+    virtual void dispose() SAL_OVERRIDE;
 
     void NotifyChange( const SwTableAutoFmt& rNewData );
 
@@ -174,9 +175,15 @@ SwAutoFormatDlg::SwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pWrtShell,
 
 SwAutoFormatDlg::~SwAutoFormatDlg()
 {
+    dispose();
+}
+
+void SwAutoFormatDlg::dispose()
+{
     if (bCoreDataChanged)
         pTableTbl->Save();
     delete pTableTbl;
+    SfxModalDialog::dispose();
 }
 
 void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt )
@@ -537,7 +544,13 @@ void AutoFmtPreview::DetectRTL(SwWrtShell* pWrtShell)
 
 AutoFmtPreview::~AutoFmtPreview()
 {
+    dispose();
+}
+
+void AutoFmtPreview::dispose()
+{
     delete pNumFmt;
+    vcl::Window::dispose();
 }
 
 static void lcl_SetFontProperties(
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 0e1275a..6c4a8ffa 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -196,7 +196,13 @@ Size SwDBTreeList::GetOptimalSize() const
 
 SwDBTreeList::~SwDBTreeList()
 {
+    dispose();
+}
+
+void SwDBTreeList::dispose()
+{
     delete pImpl;
+    SvTreeListBox::dispose();
 }
 
 void SwDBTreeList::InitTreeList()
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index 8590b1f..0cfa54c 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -187,14 +187,25 @@ struct  SwAddressPreview_Impl
 
 SwAddressPreview::SwAddressPreview(vcl::Window* pParent, WinBits nStyle)
     : Window( pParent, nStyle )
-    , aVScrollBar(this, WB_VSCROLL)
+    , aVScrollBar(new ScrollBar(this, WB_VSCROLL))
     , pImpl(new SwAddressPreview_Impl())
 {
-    aVScrollBar.SetScrollHdl(LINK(this, SwAddressPreview, ScrollHdl));
+    aVScrollBar->SetScrollHdl(LINK(this, SwAddressPreview, ScrollHdl));
     positionScrollBar();
     Show();
 }
 
+SwAddressPreview::~SwAddressPreview()
+{
+    dispose();
+}
+
+void SwAddressPreview::dispose()
+{
+    aVScrollBar.disposeAndClear();
+    vcl::Window::dispose();
+}
+
 extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSwAddressPreview(vcl::Window *pParent, VclBuilder::stringmap &rMap)
 {
     WinBits nWinStyle = WB_DIALOGCONTROL;
@@ -207,10 +218,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSwAddressPreview(vcl::
 void SwAddressPreview::positionScrollBar()
 {
     Size aSize(GetOutputSizePixel());
-    Size aScrollSize(aVScrollBar.get_preferred_size().Width(), aSize.Height());
-    aVScrollBar.SetSizePixel(aScrollSize);
+    Size aScrollSize(aVScrollBar->get_preferred_size().Width(), aSize.Height());
+    aVScrollBar->SetSizePixel(aScrollSize);
     Point aSrollPos(aSize.Width() - aScrollSize.Width(), 0);
-    aVScrollBar.SetPosPixel(aSrollPos);
+    aVScrollBar->SetPosPixel(aSrollPos);
 }
 
 void SwAddressPreview::Resize()
@@ -235,7 +246,7 @@ void SwAddressPreview::SetAddress(const OUString& rAddress)
 {
     pImpl->aAddresses.clear();
     pImpl->aAddresses.push_back(rAddress);
-    aVScrollBar.Show(false);
+    aVScrollBar->Show(false);
     Invalidate();
 }
 
@@ -251,9 +262,9 @@ void SwAddressPreview::SelectAddress(sal_uInt16 nSelect)
     pImpl->nSelectedAddress = nSelect;
     // now make it visible..
     sal_uInt16 nSelectRow = nSelect / pImpl->nColumns;
-    sal_uInt16 nStartRow = (sal_uInt16)aVScrollBar.GetThumbPos();
+    sal_uInt16 nStartRow = (sal_uInt16)aVScrollBar->GetThumbPos();
     if( (nSelectRow < nStartRow) || (nSelectRow >= (nStartRow + pImpl->nRows) ))
-        aVScrollBar.SetThumbPos( nSelectRow );
+        aVScrollBar->SetThumbPos( nSelectRow );
 }
 
 void SwAddressPreview::Clear()
@@ -294,13 +305,13 @@ void SwAddressPreview::UpdateScrollBar()
 {
     if(pImpl->nColumns)
     {
-        aVScrollBar.SetVisibleSize(pImpl->nRows);
+        aVScrollBar->SetVisibleSize(pImpl->nRows);
         sal_uInt16 nResultingRows = (sal_uInt16)(pImpl->aAddresses.size() + pImpl->nColumns - 1) / pImpl->nColumns;
         ++nResultingRows;
-        aVScrollBar.Show(pImpl->bEnableScrollBar && nResultingRows > pImpl->nRows);
-        aVScrollBar.SetRange(Range(0, nResultingRows));
-        if(aVScrollBar.GetThumbPos() > nResultingRows)
-            aVScrollBar.SetThumbPos(nResultingRows);
+        aVScrollBar->Show(pImpl->bEnableScrollBar && nResultingRows > pImpl->nRows);
+        aVScrollBar->SetRange(Range(0, nResultingRows));
+        if(aVScrollBar->GetThumbPos() > nResultingRows)
+            aVScrollBar->SetThumbPos(nResultingRows);
     }
 }
 
@@ -318,10 +329,10 @@ void SwAddressPreview::Paint(const Rectangle&)
 
     Size aSize = GetOutputSizePixel();
     sal_uInt16 nStartRow = 0;
-    if(aVScrollBar.IsVisible())
+    if(aVScrollBar->IsVisible())
     {
-        aSize.Width() -= aVScrollBar.GetSizePixel().Width();
-        nStartRow = (sal_uInt16)aVScrollBar.GetThumbPos();
+        aSize.Width() -= aVScrollBar->GetSizePixel().Width();
+        nStartRow = (sal_uInt16)aVScrollBar->GetThumbPos();
     }
     Size aPartSize( aSize.Width()/pImpl->nColumns, aSize.Height()/pImpl->nRows );
     aPartSize.Width() -= 2;
@@ -358,9 +369,9 @@ void  SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
         Size aSize(GetOutputSizePixel());
         Size aPartSize( aSize.Width()/pImpl->nColumns, aSize.Height()/pImpl->nRows );
         sal_uInt32 nRow = rMousePos.Y() / aPartSize.Height() ;
-        if(aVScrollBar.IsVisible())
+        if(aVScrollBar->IsVisible())
         {
-            nRow += (sal_uInt16)aVScrollBar.GetThumbPos();
+            nRow += (sal_uInt16)aVScrollBar->GetThumbPos();
         }
         sal_uInt32 nCol = rMousePos.X() / aPartSize.Width();
         sal_uInt32 nSelect = nRow * pImpl->nColumns + nCol;
diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx
index 539b5ba..372fa81 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -70,7 +70,13 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin,
 
 SwAnnotationWin::~SwAnnotationWin()
 {
+    dispose();
+}
+
+void SwAnnotationWin::dispose()
+{
     delete mpButtonPopup;
+    sw::sidebarwindows::SwSidebarWin::dispose();
 }
 
 void SwAnnotationWin::SetPostItText()
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index 6ac23cc..de97028 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -169,8 +169,14 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag
 
 SwHeaderFooterWin::~SwHeaderFooterWin( )
 {
+    dispose();
+}
+
+void SwHeaderFooterWin::dispose()
+{
     delete m_pPopupMenu;
     delete m_pLine;
+    MenuButton::dispose();
 }
 
 const SwPageFrm* SwHeaderFooterWin::GetPageFrame( )
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx
index c8b8574..6c8d3d3 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -116,12 +116,18 @@ SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm )
 
 SwPageBreakWin::~SwPageBreakWin( )
 {
+    dispose();
+}
+
+void SwPageBreakWin::dispose()
+{
     m_bDestroyed = true;
     m_aFadeTimer.Stop();
 
     delete m_pPopupMenu;
     delete m_pLine;
     delete m_pMousePt;
+    MenuButton::dispose();
 }
 
 void SwPageBreakWin::Paint( const Rectangle& )
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index e6f4a91..c540473 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -137,6 +137,11 @@ SwSidebarWin::SwSidebarWin( SwEditWin& rEditWin,
 
 SwSidebarWin::~SwSidebarWin()
 {
+    dispose();
+}
+
+void SwSidebarWin::dispose()
+{
     mrMgr.DisconnectSidebarWinFromFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm),
                                        *this );
 
@@ -201,6 +206,7 @@ SwSidebarWin::~SwSidebarWin()
 
     if (mnEventId)
         Application::RemoveUserEvent( mnEventId );
+    vcl::Window::dispose();
 }
 
 void SwSidebarWin::Paint( const Rectangle& rRect)
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index dfa4306..819c2bc 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5017,6 +5017,11 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView):
 
 SwEditWin::~SwEditWin()
 {
+    dispose();
+}
+
+void SwEditWin::dispose()
+{
     m_aKeyInputTimer.Stop();
     delete m_pShadCrsr;
     delete m_pRowColumnSelectionStart;
@@ -5028,6 +5033,7 @@ SwEditWin::~SwEditWin()
 
     delete m_pUserMarker;
     delete m_pAnchorMarker;
+    vcl::Window::dispose();
 }
 
 /**
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 34ca992..4082e15 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -268,7 +268,12 @@ SwSrcEditWindow::SwSrcEditWindow( vcl::Window* pParent, SwSrcView* pParentView )
     n->addPropertiesChangeListener(s, listener_.get());
 }
 
- SwSrcEditWindow::~SwSrcEditWindow()
+SwSrcEditWindow::~SwSrcEditWindow()
+{
+    dispose();
+}
+
+void SwSrcEditWindow::dispose()
 {
     css::uno::Reference< css::beans::XMultiPropertySet > n;
     {
@@ -291,6 +296,7 @@ SwSrcEditWindow::SwSrcEditWindow( vcl::Window* pParent, SwSrcView* pParentView )
         delete pTextEngine;
     }
     delete pOutWin;
+    vcl::Window::dispose();
 }
 
 void SwSrcEditWindow::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 8943c09..d6ebcce 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -488,7 +488,13 @@ Size SwColumnOnlyExample::GetOptimalSize() const
 
 SwPageGridExample::~SwPageGridExample()
 {
+    dispose();
+}
+
+void SwPageGridExample::dispose()
+{
     delete pGridItem;
+    SwPageExample::dispose();
 }
 
 void SwPageGridExample::DrawPage( const Point& rOrg,
diff --git a/sw/source/uibase/inc/HeaderFooterWin.hxx b/sw/source/uibase/inc/HeaderFooterWin.hxx
index 6f151fd..78005bd 100644
--- a/sw/source/uibase/inc/HeaderFooterWin.hxx
+++ b/sw/source/uibase/inc/HeaderFooterWin.hxx
@@ -31,6 +31,7 @@ class SwHeaderFooterWin : public MenuButton, public SwFrameControl
 public:
     SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm, bool bHeader );
     virtual ~SwHeaderFooterWin( );
+    virtual void dispose() SAL_OVERRIDE;
 
     void SetOffset( Point aOffset, long nXLineStart, long nXLineEnd );
 
diff --git a/sw/source/uibase/inc/PageBreakWin.hxx b/sw/source/uibase/inc/PageBreakWin.hxx
index ff28df1..1c6987b 100644
--- a/sw/source/uibase/inc/PageBreakWin.hxx
+++ b/sw/source/uibase/inc/PageBreakWin.hxx
@@ -35,6 +35,7 @@ class SwPageBreakWin : public MenuButton, public SwFrameControl
 public:
     SwPageBreakWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm );
     virtual ~SwPageBreakWin( );
+    virtual void dispose() SAL_OVERRIDE;
 
     virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
     virtual void Select( ) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/changedb.hxx b/sw/source/uibase/inc/changedb.hxx
index 128d7aa..558ea2f 100644
--- a/sw/source/uibase/inc/changedb.hxx
+++ b/sw/source/uibase/inc/changedb.hxx
@@ -59,6 +59,7 @@ class SwChangeDBDlg: public SvxStandardDialog
 public:
     SwChangeDBDlg(SwView& rVw);
     virtual ~SwChangeDBDlg();
+    virtual void dispose() SAL_OVERRIDE;
 };
 
 #endif
diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx
index 7c0520a..27e394ce 100644
--- a/sw/source/uibase/inc/chrdlg.hxx
+++ b/sw/source/uibase/inc/chrdlg.hxx
@@ -82,6 +82,7 @@ public:
                                            const SfxItemSet& rSet );
 
                         virtual ~SwCharURLPage();
+    virtual void        dispose() SAL_OVERRIDE;
     static SfxTabPage*  Create( vcl::Window* pParent,
                                 const SfxItemSet* rAttrSet);
 
diff --git a/sw/source/uibase/inc/colex.hxx b/sw/source/uibase/inc/colex.hxx
index ce03ddc..638b3c7 100644
--- a/sw/source/uibase/inc/colex.hxx
+++ b/sw/source/uibase/inc/colex.hxx
@@ -57,6 +57,7 @@ public:
                                 m_bVertical(false){}
 
     virtual ~SwPageGridExample();
+    virtual void dispose() SAL_OVERRIDE;
     void UpdateExample( const SfxItemSet& rSet );
 };
 
diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx
index d9b2397..c4d7d6d 100644
--- a/sw/source/uibase/inc/column.hxx
+++ b/sw/source/uibase/inc/column.hxx
@@ -66,6 +66,7 @@ class SwColumnDlg : public SfxModalDialog
 public:
     SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh);
     virtual ~SwColumnDlg();
+    virtual void dispose() SAL_OVERRIDE;
 
     SwWrtShell&     GetWrtShell()   { return rWrtShell; }
 };
@@ -171,6 +172,7 @@ class SwColumnPage : public SfxTabPage
 
 public:
     virtual ~SwColumnPage();
+    virtual void dispose() SAL_OVERRIDE;
 
     static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
     static const sal_uInt16* GetRanges();
diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx
index 43d76b3..c81eda6 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -145,6 +145,7 @@ protected:
 public:
     SwContentTree(vcl::Window* pParent, const ResId& rResId);
     virtual ~SwContentTree();
+    virtual void dispose() SAL_OVERRIDE;
     OUString        GetEntryAltText( SvTreeListEntry* pEntry ) const SAL_OVERRIDE;
     OUString        GetEntryLongDescription( SvTreeListEntry* pEntry ) const SAL_OVERRIDE;
     SdrObject*      GetDrawingObjectsByContent(const SwContent *pCnt);
@@ -316,6 +317,7 @@ protected:
 public:
     SwGlobalTree(vcl::Window* pParent, const ResId& rResId);
     virtual ~SwGlobalTree();
+    virtual void        dispose() SAL_OVERRIDE;
 
     void                TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox);
     void                InsertRegion( const SwGlblDocContent* pCont,
diff --git a/sw/source/uibase/inc/convert.hxx b/sw/source/uibase/inc/convert.hxx
index 8b803bf..0831037 100644
--- a/sw/source/uibase/inc/convert.hxx
+++ b/sw/source/uibase/inc/convert.hxx
@@ -63,6 +63,7 @@ class SwConvertTableDlg: public SfxModalDialog
 public:
     SwConvertTableDlg( SwView& rView, bool bToTable );
     virtual ~SwConvertTableDlg();
+    virtual void dispose() SAL_OVERRIDE;
 
     void GetValues( sal_Unicode& rDelim,
                     SwInsertTableOptions& rInsTblOpts,
diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx
index 08f31a4..a44c059 100644
--- a/sw/source/uibase/inc/cption.hxx
+++ b/sw/source/uibase/inc/cption.hxx
@@ -105,6 +105,7 @@ class SwCaptionDialog : public SvxStandardDialog
 public:
      SwCaptionDialog( vcl::Window *pParent, SwView &rV );
     virtual ~SwCaptionDialog();
+    virtual void dispose() SAL_OVERRIDE;
 };
 
 #endif
diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx
index f156ebe..0810df1 100644
--- a/sw/source/uibase/inc/dbinsdlg.hxx
+++ b/sw/source/uibase/inc/dbinsdlg.hxx
@@ -158,6 +158,7 @@ public:
         const SwDBData& rData  );
 
     virtual ~SwInsertDBColAutoPilot();
+    virtual void dispose() SAL_OVERRIDE;
 
     void DataToDoc( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rSelection,
         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> rxSource,
diff --git a/sw/source/uibase/inc/dbtree.hxx b/sw/source/uibase/inc/dbtree.hxx
index e41d911..94179d4 100644
--- a/sw/source/uibase/inc/dbtree.hxx
+++ b/sw/source/uibase/inc/dbtree.hxx
@@ -54,6 +54,7 @@ class SW_DLLPUBLIC SwDBTreeList : public SvTreeListBox
 public:
     SwDBTreeList(vcl::Window* pParent, WinBits nStyle);
     virtual ~SwDBTreeList();
+    virtual void dispose() SAL_OVERRIDE;
     virtual Size GetOptimalSize() const SAL_OVERRIDE;
 
     OUString GetDBName( OUString& rTableName, OUString& rColumnName, sal_Bool* pbIsTable = 0);
diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx
index e08e237..e317f4a 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -295,6 +295,7 @@ public:
 
     SwEditWin(vcl::Window *pParent, SwView &);
     virtual ~SwEditWin();
+    virtual void dispose() SAL_OVERRIDE;
     virtual void SwitchView();
 };
 
diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx
index 466ca75..9245e9e 100644
--- a/sw/source/uibase/inc/envlop.hxx
+++ b/sw/source/uibase/inc/envlop.hxx
@@ -73,6 +73,7 @@ friend class SwEnvPreview;
 public:
      SwEnvDlg(vcl::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, bool bInsert);
     virtual ~SwEnvDlg();
+    virtual void dispose() SAL_OVERRIDE;
 };
 
 class SwEnvPage : public SfxTabPage
diff --git a/sw/source/uibase/inc/fldedt.hxx b/sw/source/uibase/inc/fldedt.hxx
index 0c859e9..66960d1 100644
--- a/sw/source/uibase/inc/fldedt.hxx
+++ b/sw/source/uibase/inc/fldedt.hxx
@@ -41,6 +41,7 @@ public:
 
      SwFldEditDlg(SwView& rVw);
     virtual ~SwFldEditDlg();
+    virtual void dispose() SAL_OVERRIDE;
 
     DECL_LINK(OKHdl, void *);
 
diff --git a/sw/source/uibase/inc/formedt.hxx b/sw/source/uibase/inc/formedt.hxx
index 118869e..32f6d8e 100644
--- a/sw/source/uibase/inc/formedt.hxx
+++ b/sw/source/uibase/inc/formedt.hxx
@@ -50,23 +50,23 @@ class SwIdxFormDlg : public SvxStandardDialog
     void            UpdatePattern();
     void            Apply() SAL_OVERRIDE;
 
-    ListBox         aEntryLB;
-    OKButton        aOKBtn;
-    CancelButton    aCancelBT;
-    FixedText       aLevelFT;
-    Edit            aEntryED;
-    PushButton      aEntryBT;
-    PushButton      aTabBT;
-    PushButton      aPageBT;
-    PushButton      aJumpBT;
-    FixedLine       aEntryFL;
-    FixedText       aLevelFT2;
-    ListBox         aLevelLB;
-    FixedText       aTemplateFT;
-    ListBox         aParaLayLB;
-    PushButton      aStdBT;
-    PushButton      aAssignBT;
-    FixedLine       aFormatFL;
+    VclPtr<ListBox>         aEntryLB;
+    VclPtr<OKButton>        aOKBtn;
+    VclPtr<CancelButton>    aCancelBT;
+    VclPtr<FixedText>       aLevelFT;
+    VclPtr<Edit>            aEntryED;
+    VclPtr<PushButton>      aEntryBT;
+    VclPtr<PushButton>      aTabBT;
+    VclPtr<PushButton>      aPageBT;
+    VclPtr<PushButton>      aJumpBT;
+    VclPtr<FixedLine>       aEntryFL;
+    VclPtr<FixedText>       aLevelFT2;
+    VclPtr<ListBox>         aLevelLB;
+    VclPtr<FixedText>       aTemplateFT;
+    VclPtr<ListBox>         aParaLayLB;
+    VclPtr<PushButton>      aStdBT;
+    VclPtr<PushButton>      aAssignBT;
+    VclPtr<FixedLine>       aFormatFL;
 
     SwWrtShell     &rSh;
     SwForm         *pForm;
@@ -76,6 +76,7 @@ class SwIdxFormDlg : public SvxStandardDialog
 public:
     SwIdxFormDlg( vcl::Window* pParent, SwWrtShell &rShell, const SwForm& rForm );
     virtual ~SwIdxFormDlg();
+    virtual void dispose() SAL_OVERRIDE;
 
     const SwForm&   GetTOXForm();
 };
diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx
index e2eab71..498b65a 100644
--- a/sw/source/uibase/inc/frmpage.hxx
+++ b/sw/source/uibase/inc/frmpage.hxx
@@ -225,6 +225,7 @@ class SwGrfExtPage: public SfxTabPage
     virtual void    ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
     SwGrfExtPage(vcl::Window *pParent, const SfxItemSet &rSet);
     virtual ~SwGrfExtPage();
+    virtual void dispose() SAL_OVERRIDE;
 
     using SfxTabPage::ActivatePage;
     using SfxTabPage::DeactivatePage;
diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx
index 7fad065..53b1d5c 100644
--- a/sw/source/uibase/inc/glossary.hxx
+++ b/sw/source/uibase/inc/glossary.hxx
@@ -149,6 +149,7 @@ class SwGlossaryDlg : public SvxStandardDialog
 public:
     SwGlossaryDlg(SfxViewFrame* pViewFrame, SwGlossaryHdl* pGlosHdl, SwWrtShell *pWrtShell);
     virtual ~SwGlossaryDlg();
+    virtual void dispose() SAL_OVERRIDE;
     OUString GetCurrGrpName() const;
     OUString GetCurrLongName() const
     {
diff --git a/sw/source/uibase/inc/inputwin.hxx b/sw/source/uibase/inc/inputwin.hxx
index f5a9e28..c4af0b0 100644
--- a/sw/source/uibase/inc/inputwin.hxx
+++ b/sw/source/uibase/inc/inputwin.hxx
@@ -47,8 +47,8 @@ class SwInputWindow : public ToolBox
 {
 friend class InputEdit;
 
-    Edit            aPos;
-    InputEdit       aEdit;
+    VclPtr<Edit>        aPos;
+    VclPtr<InputEdit>   aEdit;
     PopupMenu       aPopMenu;
     SwFldMgr*       pMgr;
     SwWrtShell*     pWrtShell;
@@ -82,6 +82,7 @@ protected:
 public:
                     SwInputWindow( vcl::Window* pParent, SfxBindings* pBindings );
     virtual         ~SwInputWindow();
+    virtual void    dispose() SAL_OVERRIDE;
 
     virtual void    DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
 
diff --git a/sw/source/uibase/inc/insfnote.hxx b/sw/source/uibase/inc/insfnote.hxx
index 3974758..05aace7 100644
--- a/sw/source/uibase/inc/insfnote.hxx
+++ b/sw/source/uibase/inc/insfnote.hxx
@@ -67,6 +67,7 @@ class SwInsFootNoteDlg: public SvxStandardDialog
 public:
     SwInsFootNoteDlg(vcl::Window * pParent, SwWrtShell &rSh, bool bEd = false);
     virtual ~SwInsFootNoteDlg();
+    virtual void dispose() SAL_OVERRIDE;
 
     rtl_TextEncoding GetCharSet() { return eCharSet; }
     bool        IsExtCharAvailable() { return bExtCharAvailable; }
diff --git a/sw/source/uibase/inc/instable.hxx b/sw/source/uibase/inc/instable.hxx
index d61de33..9965924 100644
--- a/sw/source/uibase/inc/instable.hxx
+++ b/sw/source/uibase/inc/instable.hxx
@@ -66,6 +66,7 @@ class SwInsTableDlg : public SfxModalDialog
 public:
     SwInsTableDlg( SwView& rView );
     virtual ~SwInsTableDlg();
+    virtual void dispose() SAL_OVERRIDE;
 
     void GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol,
                     SwInsertTableOptions& rInsTblOpts, OUString& rTableAutoFmtName,
diff --git a/sw/source/uibase/inc/javaedit.hxx b/sw/source/uibase/inc/javaedit.hxx
index 5649e5e..9768f41 100644
--- a/sw/source/uibase/inc/javaedit.hxx
+++ b/sw/source/uibase/inc/javaedit.hxx
@@ -71,6 +71,7 @@ private:
 public:
     SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh);
     virtual ~SwJavaEditDialog();
+    virtual void dispose() SAL_OVERRIDE;
 
     OUString GetScriptText() const { return aText; }
 
diff --git a/sw/source/uibase/inc/label.hxx b/sw/source/uibase/inc/label.hxx
index 61b452d..8369daa 100644
--- a/sw/source/uibase/inc/label.hxx
+++ b/sw/source/uibase/inc/label.hxx
@@ -56,6 +56,7 @@ public:
      SwLabDlg( vcl::Window* pParent, const SfxItemSet& rSet,
                  SwDBManager* pDBManager, bool bLabel);
     virtual ~SwLabDlg();
+    virtual void dispose() SAL_OVERRIDE;
 
     SwLabRec*   GetRecord(const OUString &rRecName, bool bCont);
     void        GetLabItem(SwLabItem &rItem);
diff --git a/sw/source/uibase/inc/mailconfigpage.hxx b/sw/source/uibase/inc/mailconfigpage.hxx
index a343c30..3e98da5 100644
--- a/sw/source/uibase/inc/mailconfigpage.hxx
+++ b/sw/source/uibase/inc/mailconfigpage.hxx
@@ -57,6 +57,7 @@ class SwMailConfigPage : public SfxTabPage
 public:
     SwMailConfigPage( vcl::Window* pParent, const SfxItemSet& rSet );
     virtual ~SwMailConfigPage();
+    virtual void        dispose() SAL_OVERRIDE;
 
     static SfxTabPage*  Create( vcl::Window* pParent,
                                 const SfxItemSet* rAttrSet);
diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx
index b542f96..bdb2a75 100644
--- a/sw/source/uibase/inc/mailmergehelper.hxx
+++ b/sw/source/uibase/inc/mailmergehelper.hxx
@@ -60,7 +60,7 @@ struct SwAddressPreview_Impl;
 // and also the resulting address filled with database data
 class SW_DLLPUBLIC SwAddressPreview : public vcl::Window
 {
-    ScrollBar               aVScrollBar;
+    VclPtr<ScrollBar>       aVScrollBar;
     SwAddressPreview_Impl*  pImpl;
     Link                    m_aSelectHdl;
 
@@ -77,6 +77,8 @@ class SW_DLLPUBLIC SwAddressPreview : public vcl::Window
 
 public:
     SwAddressPreview(vcl::Window* pParent, WinBits nStyle=WB_BORDER);
+    virtual ~SwAddressPreview();
+    virtual void dispose() SAL_OVERRIDE;
 
     void positionScrollBar();
 
diff --git a/sw/source/uibase/inc/mailmrge.hxx b/sw/source/uibase/inc/mailmrge.hxx
index f3d67ee..615fb03 100644
--- a/sw/source/uibase/inc/mailmrge.hxx
+++ b/sw/source/uibase/inc/mailmrge.hxx
@@ -122,6 +122,7 @@ public:
         const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& xConnection,
         ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >* pSelection = 0);
     virtual ~SwMailMergeDlg();
+    virtual void dispose() SAL_OVERRIDE;
 
     inline DBManagerOptions GetMergeType() { return nMergeType; }
 
diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index 386213b..64ba7ce 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -54,12 +54,12 @@ class SwNavigationPI : public vcl::Window,
     friend class SwContentTree;
     friend class SwGlobalTree;
 
-    SwNavHelpToolBox    aContentToolBox;
-    SwHelpToolBox       aGlobalToolBox;
-    ImageList           aContentImageList;
-    SwContentTree       aContentTree;
-    SwGlobalTree        aGlobalTree;
-    ListBox             aDocListBox;
+    VclPtr<SwNavHelpToolBox>    aContentToolBox;
+    VclPtr<SwHelpToolBox>       aGlobalToolBox;
+    ImageList                   aContentImageList;
+    VclPtr<SwContentTree>       aContentTree;
+    VclPtr<SwGlobalTree>        aGlobalTree;
+    VclPtr<ListBox>             aDocListBox;
     Idle                aPageChgIdle;
     OUString            sContentFileName;
     OUString            aContextArr[3];
@@ -139,6 +139,7 @@ public:
 
     SwNavigationPI(SfxBindings*, SfxChildWindowContext*, vcl::Window*);
     virtual ~SwNavigationPI();
+    virtual void    dispose() SAL_OVERRIDE;
 
     void            GotoPage(); // jump to page; bindable function
 
diff --git a/sw/source/uibase/inc/num.hxx b/sw/source/uibase/inc/num.hxx
index 09875a9..d82be02 100644
--- a/sw/source/uibase/inc/num.hxx
+++ b/sw/source/uibase/inc/num.hxx
@@ -118,6 +118,7 @@ public:
     SwNumPositionTabPage(vcl::Window* pParent,
                                const SfxItemSet& rSet);
     virtual ~SwNumPositionTabPage();
+    virtual void        dispose() SAL_OVERRIDE;
 
     virtual void        ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
     virtual int         DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/numberingtypelistbox.hxx b/sw/source/uibase/inc/numberingtypelistbox.hxx
index bedbc72..b1968d7 100644
--- a/sw/source/uibase/inc/numberingtypelistbox.hxx
+++ b/sw/source/uibase/inc/numberingtypelistbox.hxx
@@ -37,6 +37,7 @@ class SW_DLLPUBLIC SwNumberingTypeListBox : public ListBox
 public:
     SwNumberingTypeListBox( vcl::Window* pWin, WinBits nStyle = WB_BORDER );
     virtual ~SwNumberingTypeListBox();
+    virtual void dispose() SAL_OVERRIDE;
 
     virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
 
diff --git a/sw/source/uibase/inc/numfmtlb.hxx b/sw/source/uibase/inc/numfmtlb.hxx
index 8dd0394..ede0731 100644
--- a/sw/source/uibase/inc/numfmtlb.hxx
+++ b/sw/source/uibase/inc/numfmtlb.hxx
@@ -48,6 +48,7 @@ public:
     NumFormatListBox(vcl::Window* pWin, WinBits nStyle);
 
     virtual ~NumFormatListBox();
+    virtual void    dispose() SAL_OVERRIDE;
 
     void            Clear();
 
diff --git a/sw/source/uibase/inc/optcomp.hxx b/sw/source/uibase/inc/optcomp.hxx
index 8a16751..d33d2222 100644
--- a/sw/source/uibase/inc/optcomp.hxx
+++ b/sw/source/uibase/inc/optcomp.hxx
@@ -62,6 +62,7 @@ private:
 public:
     SwCompatibilityOptPage( vcl::Window* pParent, const SfxItemSet& rSet );
     virtual ~SwCompatibilityOptPage();
+    virtual void            dispose() SAL_OVERRIDE;
 
     static SfxTabPage*      Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
 
diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx
index 451b30c..71c1759 100644
--- a/sw/source/uibase/inc/optload.hxx
+++ b/sw/source/uibase/inc/optload.hxx
@@ -165,6 +165,7 @@ public:
                         SwCaptionOptPage( vcl::Window* pParent,
                                          const SfxItemSet& rSet );
                         virtual ~SwCaptionOptPage();
+    virtual void        dispose() SAL_OVERRIDE;
 
     static SfxTabPage*  Create( vcl::Window* pParent,
                                 const SfxItemSet* rAttrSet);
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index d623923..b58deaa 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -189,6 +189,7 @@ class SwStdFontTabPage : public SfxTabPage
             SwStdFontTabPage( vcl::Window* pParent,
                                        const SfxItemSet& rSet );
             virtual ~SwStdFontTabPage();
+     virtual void       dispose() SAL_OVERRIDE;
 
 public:
     static SfxTabPage*  Create( vcl::Window* pParent,
diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx
index 1581918..45317fb 100644
--- a/sw/source/uibase/inc/outline.hxx
+++ b/sw/source/uibase/inc/outline.hxx
@@ -58,7 +58,7 @@ class SwOutlineTabDialog : public SfxTabDialog
 
     bool                bModified : 1;
 
-    protected:
+protected:
     DECL_LINK(CancelHdl, void *);
     DECL_LINK( FormHdl, Button * );
     DECL_LINK( MenuSelectHdl, Menu * );
@@ -66,17 +66,18 @@ class SwOutlineTabDialog : public SfxTabDialog
         virtual void    PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) SAL_OVERRIDE;
         virtual short   Ok() SAL_OVERRIDE;
 
-    public:
+public:
         SwOutlineTabDialog(vcl::Window* pParent,
                     const SfxItemSet* pSwItemSet,
                     SwWrtShell &);
         virtual ~SwOutlineTabDialog();
+    virtual void        dispose() SAL_OVERRIDE;
 
     SwNumRule*          GetNumRule() {return pNumRule;}
-    sal_uInt16              GetLevel(const OUString &rFmtName) const;
+    sal_uInt16          GetLevel(const OUString &rFmtName) const;
     OUString*           GetCollNames() {return aCollNames;}
 
-    static sal_uInt16       GetActNumLevel() {return nNumLevel;}
+    static sal_uInt16   GetActNumLevel() {return nNumLevel;}
     static void         SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;}
 };
 
diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx
index f26b023..5182a37 100644
--- a/sw/source/uibase/inc/redlndlg.hxx
+++ b/sw/source/uibase/inc/redlndlg.hxx
@@ -71,7 +71,7 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg
     SwRedlineDataParentArr  aRedlineParents;
     SwRedlineDataChildArr   aRedlineChildren;
     SwRedlineDataParentSortArr aUsedSeqNo;
-    SvxAcceptChgCtr         aTabPagesCTRL;
+    VclPtr<SvxAcceptChgCtr>    aTabPagesCTRL;
     PopupMenu               aPopup;
     Timer                   aDeselectTimer;
     Timer                   aSelectTimer;
@@ -119,7 +119,7 @@ public:
 
     DECL_LINK( FilterChangedHdl, void *pDummy = 0 );
 
-    inline SvxAcceptChgCtr& GetChgCtrl()        { return aTabPagesCTRL; }
+    inline SvxAcceptChgCtr& GetChgCtrl()        { return *aTabPagesCTRL.get(); }
     inline bool     HasRedlineAutoFmt() const   { return bRedlnAutoFmt; }
 
     void            Init(sal_uInt16 nStart = 0);
@@ -139,6 +139,7 @@ class SwModelessRedlineAcceptDlg : public SfxModelessDialog
 public:
     SwModelessRedlineAcceptDlg(SfxBindings*, SwChildWinWrapper*, vcl::Window *pParent);
     virtual ~SwModelessRedlineAcceptDlg();
+    virtual void dispose() SAL_OVERRIDE;
 
     virtual void    Activate() SAL_OVERRIDE;
     virtual void    FillInfo(SfxChildWinInfo&) const SAL_OVERRIDE;
@@ -165,6 +166,7 @@ class SwRedlineAcceptPanel : public PanelLayout, public SfxListener
 public:
     SwRedlineAcceptPanel(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame);
     virtual ~SwRedlineAcceptPanel();
+    virtual void dispose() SAL_OVERRIDE;
 
     /// We need to be a SfxListener to be able to update the list of changes when we get SFX_HINT_DOCCHANGED.
     using Control::Notify;
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index e50a6d8..21e4440 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -131,6 +131,7 @@ class SwEditRegionDlg : public SfxModalDialog
 public:
     SwEditRegionDlg( vcl::Window* pParent, SwWrtShell& rWrtSh );
     virtual ~SwEditRegionDlg();
+    virtual void dispose() SAL_OVERRIDE;
 
     void    SelectSection(const OUString& rSectionName);
 
@@ -184,6 +185,7 @@ class SwInsertSectionTabPage : public SfxTabPage
 public:
     SwInsertSectionTabPage(vcl::Window *pParent, const SfxItemSet &rAttrSet);
     virtual ~SwInsertSectionTabPage();
+    virtual void dispose() SAL_OVERRIDE;
 
     void    SetWrtShell(SwWrtShell& rSh);
 
diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx
index 3a53386..99362de 100644
--- a/sw/source/uibase/inc/srcedtw.hxx
+++ b/sw/source/uibase/inc/srcedtw.hxx
@@ -117,6 +117,7 @@ protected:
 public:
                     SwSrcEditWindow( vcl::Window* pParent, SwSrcView* pParentView );
                     virtual ~SwSrcEditWindow();
+    virtual void    dispose() SAL_OVERRIDE;
 
     void            SetScrollBarRanges();
     void            InitScrollBars();
diff --git a/sw/source/uibase/inc/srcview.hxx b/sw/source/uibase/inc/srcview.hxx
index 8ec289d..ff240b1 100644
--- a/sw/source/uibase/inc/srcview.hxx
+++ b/sw/source/uibase/inc/srcview.hxx
@@ -32,7 +32,7 @@ class SfxMedium;
 
 class SwSrcView: public SfxViewShell
 {
-    SwSrcEditWindow     aEditWin;
+    VclPtr<SwSrcEditWindow> aEditWin;
 
     SvxSearchItem*      pSearchItem;
 
@@ -64,11 +64,11 @@ public:
     virtual ~SwSrcView();
 
     SwDocShell*         GetDocShell();
-    SwSrcEditWindow&    GetEditWin() {return aEditWin;}
+    SwSrcEditWindow&    GetEditWin() { return *aEditWin.get(); }
     void                SaveContent(const OUString& rTmpFile);
     void                SaveContentTo(SfxMedium& rMed);
 
-    bool                IsModified() {return aEditWin.IsModified();}
+    bool                IsModified() {return aEditWin->IsModified();}
 
     void            Execute(SfxRequest&);
     void            GetState(SfxItemSet&);
diff --git a/sw/source/uibase/inc/srtdlg.hxx b/sw/source/uibase/inc/srtdlg.hxx
index c42a4cc..909b3e3 100644
--- a/sw/source/uibase/inc/srtdlg.hxx
+++ b/sw/source/uibase/inc/srtdlg.hxx
@@ -85,6 +85,7 @@ class SwSortDlg : public SvxStandardDialog
 public:
     SwSortDlg(vcl::Window * pParent, SwWrtShell &rSh);
     virtual ~SwSortDlg();
+    virtual void dispose() SAL_OVERRIDE;
 };
 
 #endif
diff --git a/sw/source/uibase/inc/swmodalredlineacceptdlg.hxx b/sw/source/uibase/inc/swmodalredlineacceptdlg.hxx
index 06ccac7..2a4728a 100644
--- a/sw/source/uibase/inc/swmodalredlineacceptdlg.hxx
+++ b/sw/source/uibase/inc/swmodalredlineacceptdlg.hxx
@@ -30,6 +30,7 @@ class SwModalRedlineAcceptDlg : public SfxModalDialog
 public:
     SwModalRedlineAcceptDlg(vcl::Window *pParent);
     virtual ~SwModalRedlineAcceptDlg();
+    virtual void    dispose() SAL_OVERRIDE;
 
     void            AcceptAll( bool bAccept );
     virtual void    Activate() SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx
index 2095dad..3979685 100644
--- a/sw/source/uibase/inc/swuiccoll.hxx
+++ b/sw/source/uibase/inc/swuiccoll.hxx
@@ -49,6 +49,7 @@ class SwCondCollPage : public SfxTabPage
 
     SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet);
     virtual ~SwCondCollPage();
+    virtual void dispose() SAL_OVERRIDE;
 
     virtual int     DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE;
 
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index 3a230b9..47cfee6 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -102,6 +102,7 @@ public:
                         SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX,
                         bool bGlobal = false);
     virtual ~SwMultiTOXTabDialog();
+    virtual void        dispose() SAL_OVERRIDE;
 
     virtual void        PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SAL_OVERRIDE;
 
@@ -221,6 +222,7 @@ class SwTOXSelectTabPage : public SfxTabPage
 public:
     SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& rAttrSet);
     virtual ~SwTOXSelectTabPage();
+    virtual void        dispose() SAL_OVERRIDE;
 
     virtual bool        FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
     virtual void        Reset( const SfxItemSet* ) SAL_OVERRIDE;
@@ -283,6 +285,7 @@ class SwTokenWindow : public VclHBox, public VclBuilderContainer
 public:
     SwTokenWindow(vcl::Window* pParent);
     virtual ~SwTokenWindow();
+    virtual void dispose() SAL_OVERRIDE;
 
     void SetTabPage(SwTOXEntryTabPage *pParent) { m_pParent = pParent; }
 
@@ -480,6 +483,7 @@ class SwTOXStylesTabPage : public SfxTabPage
 public:
     SwTOXStylesTabPage(vcl::Window* pParent, const SfxItemSet& rAttrSet);
     virtual ~SwTOXStylesTabPage();
+    virtual void        dispose() SAL_OVERRIDE;
 
     virtual bool        FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
     virtual void        Reset( const SfxItemSet* ) SAL_OVERRIDE;
diff --git a/sw/source/uibase/inc/tautofmt.hxx b/sw/source/uibase/inc/tautofmt.hxx
index 603301b..019de41 100644
--- a/sw/source/uibase/inc/tautofmt.hxx
+++ b/sw/source/uibase/inc/tautofmt.hxx
@@ -82,6 +82,7 @@ public:
                         bool bSetAutoFmt = true,
                         const SwTableAutoFmt* pSelFmt = 0 );
     virtual ~SwAutoFormatDlg();
+    virtual void dispose() SAL_OVERRIDE;
 
     void FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const;
 };
diff --git a/sw/source/uibase/inc/titlepage.hxx b/sw/source/uibase/inc/titlepage.hxx
index 598b582..59ee2e1 100644
--- a/sw/source/uibase/inc/titlepage.hxx
+++ b/sw/source/uibase/inc/titlepage.hxx
@@ -63,6 +63,7 @@ private:
 public:
     SwTitlePageDlg( vcl::Window *pParent );
     virtual ~SwTitlePageDlg();
+    virtual void dispose() SAL_OVERRIDE;
 };
 
 #endif
diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx
index cd4574f..ce256fd 100644
--- a/sw/source/uibase/inc/unotools.hxx
+++ b/sw/source/uibase/inc/unotools.hxx
@@ -72,7 +72,7 @@ class SW_DLLPUBLIC SwOneExampleFrame
     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >    _xController;
     ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor >     _xCursor;
 
-    SwFrmCtrlWindow aTopWindow;
+    VclPtr<SwFrmCtrlWindow> aTopWindow;
     Idle            aLoadedIdle;
     Link            aInitializedLink;
 
diff --git a/sw/source/uibase/inc/wordcountdialog.hxx b/sw/source/uibase/inc/wordcountdialog.hxx
index 6048a83..faf67d4 100644
--- a/sw/source/uibase/inc/wordcountdialog.hxx
+++ b/sw/source/uibase/inc/wordcountdialog.hxx
@@ -57,6 +57,7 @@ public:
                              vcl::Window *pParent,
                              SfxChildWinInfo* pInfo);
     virtual ~SwWordCountFloatDlg();
+    virtual void dispose() SAL_OVERRIDE;
     void    UpdateCounts();
 
     void    SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat);
diff --git a/sw/source/uibase/inc/workctrl.hxx b/sw/source/uibase/inc/workctrl.hxx
index 493b164..1c2fcfc 100644
--- a/sw/source/uibase/inc/workctrl.hxx
+++ b/sw/source/uibase/inc/workctrl.hxx
@@ -139,6 +139,7 @@ protected:
 public:
         SwScrollNaviPopup( sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, vcl::Window *pParent );
         virtual ~SwScrollNaviPopup();
+    virtual void dispose() SAL_OVERRIDE;
 
     static OUString         GetQuickHelpText(bool bNext);
 
diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx
index e6eb6a8..14c81b6 100644
--- a/sw/source/uibase/misc/numberingtypelistbox.cxx
+++ b/sw/source/uibase/misc/numberingtypelistbox.cxx
@@ -63,7 +63,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSwNumberingTypeListBox
 
 SwNumberingTypeListBox::~SwNumberingTypeListBox()
 {
+    dispose();
+}
+
+void SwNumberingTypeListBox::dispose()
+{
     delete pImpl;
+    ListBox::dispose();
 }
 
 void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index ef6c96a..e5b09b4 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -138,13 +138,19 @@ void SwModelessRedlineAcceptDlg::FillInfo(SfxChildWinInfo& rInfo) const
 
 SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg()
 {
+    dispose();
+}
+
+void SwModelessRedlineAcceptDlg::dispose()
+{
     delete pImplDlg;
+    SfxModelessDialog::dispose();
 }
 
 SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer *pBuilder,
                                        vcl::Window *pContentArea, bool bAutoFmt) :
     pParentDlg      (pParent),
-    aTabPagesCTRL   (pContentArea, pBuilder),
+    aTabPagesCTRL   (new SvxAcceptChgCtr(pContentArea, pBuilder)),
     aPopup          (SW_RES(MN_REDLINE_POPUP)),
     sInserted       (SW_RES(STR_REDLINE_INSERTED)),
     sDeleted        (SW_RES(STR_REDLINE_DELETED)),
@@ -157,8 +163,8 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer
     bRedlnAutoFmt   (bAutoFmt),
     bInhibitActivate( false )
 {
-    aTabPagesCTRL.SetHelpId(HID_REDLINE_CTRL);
-    pTPView = aTabPagesCTRL.GetViewPage();
+    aTabPagesCTRL->SetHelpId(HID_REDLINE_CTRL);
+    pTPView = aTabPagesCTRL->GetViewPage();
     pTable = pTPView->GetTableControl();
 
     pTPView->InsertWriterHeader();
@@ -168,9 +174,9 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer
     pTPView->SetRejectAllClickHdl(LINK(this, SwRedlineAcceptDlg, RejectAllHdl));
     pTPView->SetUndoClickHdl(LINK(this, SwRedlineAcceptDlg, UndoHdl));
 
-    aTabPagesCTRL.GetFilterPage()->SetReadyHdl(LINK(this, SwRedlineAcceptDlg, FilterChangedHdl));
+    aTabPagesCTRL->GetFilterPage()->SetReadyHdl(LINK(this, SwRedlineAcceptDlg, FilterChangedHdl));
 
-    ListBox *pActLB = aTabPagesCTRL.GetFilterPage()->GetLbAction();
+    ListBox *pActLB = aTabPagesCTRL->GetFilterPage()->GetLbAction();
     pActLB->InsertEntry(sInserted);
     pActLB->InsertEntry(sDeleted);
     pActLB->InsertEntry(sFormated);
@@ -249,7 +255,7 @@ void SwRedlineAcceptDlg::InitAuthors()
 {

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list