summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx3
-rw-r--r--accessibility/inc/accessibility/extended/accessibletabbarbase.hxx3
-rw-r--r--accessibility/inc/accessibility/extended/accessibletablistbox.hxx2
-rw-r--r--accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx2
-rw-r--r--accessibility/inc/accessibility/extended/listboxaccessible.hxx5
-rw-r--r--accessibility/inc/accessibility/extended/textwindowaccessibility.hxx2
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx3
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx3
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx8
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx3
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx3
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx5
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx13
-rw-r--r--accessibility/source/extended/AccessibleToolPanelDeck.cxx6
-rw-r--r--accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx4
-rw-r--r--accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx4
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrlentry.cxx2
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx6
-rw-r--r--accessibility/source/standard/vclxaccessibleradiobutton.cxx6
-rw-r--r--accessibility/source/standard/vclxaccessibletabpagewindow.cxx2
-rw-r--r--avmedia/inc/mediacontrol.hxx2
-rw-r--r--avmedia/source/framework/mediacontrol.cxx3
-rw-r--r--avmedia/source/framework/mediaplayer.cxx2
-rw-r--r--avmedia/source/viewer/mediaevent_impl.cxx14
-rw-r--r--avmedia/source/viewer/mediaevent_impl.hxx3
-rw-r--r--avmedia/source/viewer/mediawindow_impl.cxx3
-rw-r--r--avmedia/source/viewer/mediawindow_impl.hxx2
-rw-r--r--basctl/source/basicide/basicrenderable.hxx2
-rw-r--r--basctl/source/basicide/baside2.cxx1
-rw-r--r--basctl/source/basicide/baside2.hxx12
-rw-r--r--basctl/source/basicide/baside2b.cxx15
-rw-r--r--basctl/source/basicide/baside3.cxx6
-rw-r--r--basctl/source/basicide/basides1.cxx28
-rw-r--r--basctl/source/basicide/basides2.cxx8
-rw-r--r--basctl/source/basicide/basides3.cxx4
-rw-r--r--basctl/source/basicide/basidesh.cxx12
-rw-r--r--basctl/source/basicide/bastypes.cxx15
-rw-r--r--basctl/source/basicide/brkdlg.cxx15
-rw-r--r--basctl/source/basicide/brkdlg.hxx14
-rw-r--r--basctl/source/basicide/layout.cxx11
-rw-r--r--basctl/source/basicide/layout.hxx7
-rw-r--r--basctl/source/basicide/linenumberwindow.cxx11
-rw-r--r--basctl/source/basicide/linenumberwindow.hxx4
-rw-r--r--basctl/source/basicide/macrodlg.cxx14
-rw-r--r--basctl/source/basicide/macrodlg.hxx30
-rw-r--r--basctl/source/basicide/moduldl2.cxx46
-rw-r--r--basctl/source/basicide/moduldlg.cxx33
-rw-r--r--basctl/source/basicide/moduldlg.hxx62
-rw-r--r--basctl/source/dlged/managelang.cxx20
-rw-r--r--basctl/source/inc/accessibledialogcontrolshape.hxx3
-rw-r--r--basctl/source/inc/accessibledialogwindow.hxx3
-rw-r--r--basctl/source/inc/baside3.hxx4
-rw-r--r--basctl/source/inc/basidesh.hxx8
-rw-r--r--basctl/source/inc/bastypes.hxx9
-rw-r--r--basctl/source/inc/dlged.hxx5
-rw-r--r--basctl/source/inc/managelang.hxx22
-rw-r--r--chart2/inc/ChartModel.hxx2
-rw-r--r--chart2/source/controller/accessibility/AccessibleViewForwarder.hxx3
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.hxx4
-rw-r--r--chart2/source/controller/dialogs/dlg_ChartType.cxx3
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx12
-rw-r--r--chart2/source/controller/dialogs/dlg_DataEditor.cxx1
-rw-r--r--chart2/source/controller/dialogs/dlg_DataSource.cxx10
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx17
-rw-r--r--chart2/source/controller/dialogs/dlg_View3D.cxx14
-rw-r--r--chart2/source/controller/dialogs/res_BarGeometry.hxx4
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.hxx38
-rw-r--r--chart2/source/controller/dialogs/res_Trendline.hxx46
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx14
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx10
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx18
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx16
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx15
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx32
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.cxx17
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.hxx34
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.cxx24
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.hxx38
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx63
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.hxx6
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx28
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.hxx42
-rw-r--r--chart2/source/controller/dialogs/tp_LegendPosition.cxx12
-rw-r--r--chart2/source/controller/dialogs/tp_LegendPosition.hxx4
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.cxx16
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.hxx14
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.cxx24
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.hxx28
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.cxx35
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.hxx66
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.cxx24
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.hxx36
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.cxx7
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.hxx14
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx13
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx8
-rw-r--r--chart2/source/controller/inc/dlg_ChartType.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_DataEditor.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_DataSource.hxx8
-rw-r--r--chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx14
-rw-r--r--chart2/source/controller/inc/dlg_View3D.hxx8
-rw-r--r--chart2/source/controller/inc/res_ErrorBar.hxx54
-rw-r--r--chart2/source/controller/inc/res_LegendPosition.hxx10
-rw-r--r--chart2/source/controller/inc/res_Titles.hxx28
-rw-r--r--chart2/source/controller/main/ChartController.hxx2
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx5
-rw-r--r--chart2/source/controller/main/ChartWindow.hxx2
-rw-r--r--chart2/source/controller/main/ShapeController.cxx12
-rw-r--r--chart2/source/view/charttypes/GL3DBarChart.cxx2
-rw-r--r--chart2/source/view/inc/GL3DBarChart.hxx2
-rw-r--r--chart2/source/view/main/ChartView.cxx2
-rw-r--r--compilerplugins/clang/vclwidgets.cxx205
-rw-r--r--cui/source/customize/acccfg.cxx23
-rw-r--r--cui/source/customize/cfg.cxx115
-rw-r--r--cui/source/customize/cfgutil.cxx1
-rw-r--r--cui/source/customize/eventdlg.cxx1
-rw-r--r--cui/source/customize/eventdlg.hxx2
-rw-r--r--cui/source/customize/macropg.cxx12
-rw-r--r--cui/source/customize/macropg_impl.hxx14
-rw-r--r--cui/source/customize/selector.cxx17
-rw-r--r--cui/source/dialogs/SpellDialog.cxx20
-rw-r--r--cui/source/dialogs/about.cxx17
-rw-r--r--cui/source/dialogs/colorpicker.cxx82
-rw-r--r--cui/source/dialogs/cuicharmap.cxx19
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx30
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx86
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx72
-rw-r--r--cui/source/dialogs/cuiimapwnd.cxx15
-rw-r--r--cui/source/dialogs/cuitbxform.cxx11
-rw-r--r--cui/source/dialogs/dlgname.cxx41
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx84
-rw-r--r--cui/source/dialogs/hldocntp.cxx5
-rw-r--r--cui/source/dialogs/hldoctp.cxx15
-rw-r--r--cui/source/dialogs/hlinettp.cxx21
-rw-r--r--cui/source/dialogs/hlmailtp.cxx14
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx15
-rw-r--r--cui/source/dialogs/hltpbase.cxx14
-rw-r--r--cui/source/dialogs/hyphen.cxx18
-rw-r--r--cui/source/dialogs/iconcdlg.cxx20
-rw-r--r--cui/source/dialogs/insdlg.cxx45
-rw-r--r--cui/source/dialogs/insrc.cxx13
-rw-r--r--cui/source/dialogs/linkdlg.cxx20
-rw-r--r--cui/source/dialogs/multipat.cxx21
-rw-r--r--cui/source/dialogs/newtabledlg.cxx12
-rw-r--r--cui/source/dialogs/passwdomdlg.cxx18
-rw-r--r--cui/source/dialogs/pastedlg.cxx13
-rw-r--r--cui/source/dialogs/postdlg.cxx7
-rw-r--r--cui/source/dialogs/scriptdlg.cxx18
-rw-r--r--cui/source/dialogs/showcols.cxx11
-rw-r--r--cui/source/dialogs/splitcelldlg.cxx14
-rw-r--r--cui/source/dialogs/srchxtra.cxx25
-rw-r--r--cui/source/dialogs/thesdlg.cxx39
-rw-r--r--cui/source/dialogs/zoom.cxx13
-rw-r--r--cui/source/factory/cuiexp.cxx29
-rw-r--r--cui/source/factory/dlgfact.cxx2
-rw-r--r--cui/source/factory/dlgfact.hxx5
-rw-r--r--cui/source/inc/ControlFocusHelper.hxx4
-rw-r--r--cui/source/inc/SpellDialog.hxx40
-rw-r--r--cui/source/inc/about.hxx16
-rw-r--r--cui/source/inc/acccfg.hxx26
-rw-r--r--cui/source/inc/align.hxx52
-rw-r--r--cui/source/inc/autocdlg.hxx114
-rw-r--r--cui/source/inc/backgrnd.hxx58
-rw-r--r--cui/source/inc/border.hxx66
-rw-r--r--cui/source/inc/cfg.hxx77
-rw-r--r--cui/source/inc/cfgutil.hxx2
-rw-r--r--cui/source/inc/chardlg.hxx180
-rw-r--r--cui/source/inc/connect.hxx26
-rw-r--r--cui/source/inc/cuicharmap.hxx22
-rw-r--r--cui/source/inc/cuifmsearch.hxx54
-rw-r--r--cui/source/inc/cuigaldlg.hxx70
-rw-r--r--cui/source/inc/cuigrfflt.hxx34
-rw-r--r--cui/source/inc/cuihyperdlg.hxx2
-rw-r--r--cui/source/inc/cuiimapwnd.hxx12
-rw-r--r--cui/source/inc/cuioptgenrl.hxx4
-rw-r--r--cui/source/inc/cuisrchdlg.hxx4
-rw-r--r--cui/source/inc/cuitabarea.hxx280
-rw-r--r--cui/source/inc/cuitabline.hxx110
-rw-r--r--cui/source/inc/cuitbxform.hxx4
-rw-r--r--cui/source/inc/dbregister.hxx10
-rw-r--r--cui/source/inc/dlgname.hxx29
-rw-r--r--cui/source/inc/dstribut.hxx26
-rw-r--r--cui/source/inc/grfpage.hxx42
-rw-r--r--cui/source/inc/hangulhanjadlg.hxx92
-rw-r--r--cui/source/inc/hldocntp.hxx10
-rw-r--r--cui/source/inc/hldoctp.hxx12
-rw-r--r--cui/source/inc/hlinettp.hxx20
-rw-r--r--cui/source/inc/hlmailtp.hxx10
-rw-r--r--cui/source/inc/hlmarkwn.hxx12
-rw-r--r--cui/source/inc/hltpbase.hxx14
-rw-r--r--cui/source/inc/hyphen.hxx18
-rw-r--r--cui/source/inc/iconcdlg.hxx26
-rw-r--r--cui/source/inc/insdlg.hxx54
-rw-r--r--cui/source/inc/insrc.hxx8
-rw-r--r--cui/source/inc/labdlg.hxx22
-rw-r--r--cui/source/inc/linkdlg.hxx22
-rw-r--r--cui/source/inc/measure.hxx36
-rw-r--r--cui/source/inc/multipat.hxx12
-rw-r--r--cui/source/inc/newtabledlg.hxx6
-rw-r--r--cui/source/inc/numfmt.hxx60
-rw-r--r--cui/source/inc/numpages.hxx128
-rw-r--r--cui/source/inc/optasian.hxx26
-rw-r--r--cui/source/inc/optdict.hxx30
-rw-r--r--cui/source/inc/optlingu.hxx36
-rw-r--r--cui/source/inc/optpath.hxx8
-rw-r--r--cui/source/inc/page.hxx58
-rw-r--r--cui/source/inc/paragrph.hxx130
-rw-r--r--cui/source/inc/pastedlg.hxx10
-rw-r--r--cui/source/inc/postdlg.hxx14
-rw-r--r--cui/source/inc/scriptdlg.hxx20
-rw-r--r--cui/source/inc/selector.hxx16
-rw-r--r--cui/source/inc/showcols.hxx6
-rw-r--r--cui/source/inc/splitcelldlg.hxx10
-rw-r--r--cui/source/inc/srchxtra.hxx16
-rw-r--r--cui/source/inc/swpossizetabpage.hxx54
-rw-r--r--cui/source/inc/tabstpge.hxx56
-rw-r--r--cui/source/inc/textanim.hxx37
-rw-r--r--cui/source/inc/textattr.hxx35
-rw-r--r--cui/source/inc/thesdlg.hxx23
-rw-r--r--cui/source/inc/transfrm.hxx62
-rw-r--r--cui/source/inc/treeopt.hxx10
-rw-r--r--cui/source/inc/zoom.hxx26
-rw-r--r--cui/source/options/certpath.cxx6
-rw-r--r--cui/source/options/certpath.hxx8
-rw-r--r--cui/source/options/connpooloptions.cxx17
-rw-r--r--cui/source/options/connpooloptions.hxx18
-rw-r--r--cui/source/options/cuisrchdlg.cxx11
-rw-r--r--cui/source/options/dbregister.cxx7
-rw-r--r--cui/source/options/doclinkdialog.cxx14
-rw-r--r--cui/source/options/doclinkdialog.hxx10
-rw-r--r--cui/source/options/fontsubs.cxx12
-rw-r--r--cui/source/options/fontsubs.hxx24
-rw-r--r--cui/source/options/optaboutconfig.cxx26
-rw-r--r--cui/source/options/optaboutconfig.hxx16
-rw-r--r--cui/source/options/optaccessibility.cxx9
-rw-r--r--cui/source/options/optaccessibility.hxx18
-rw-r--r--cui/source/options/optasian.cxx13
-rw-r--r--cui/source/options/optbasic.cxx16
-rw-r--r--cui/source/options/optbasic.hxx14
-rw-r--r--cui/source/options/optchart.cxx5
-rw-r--r--cui/source/options/optchart.hxx10
-rw-r--r--cui/source/options/optcolor.cxx61
-rw-r--r--cui/source/options/optcolor.hxx8
-rw-r--r--cui/source/options/optctl.cxx16
-rw-r--r--cui/source/options/optctl.hxx14
-rw-r--r--cui/source/options/optdict.cxx31
-rw-r--r--cui/source/options/optfltr.cxx23
-rw-r--r--cui/source/options/optfltr.hxx22
-rw-r--r--cui/source/options/optgdlg.cxx54
-rw-r--r--cui/source/options/optgdlg.hxx92
-rw-r--r--cui/source/options/optgenrl.cxx14
-rw-r--r--cui/source/options/opthtml.cxx26
-rw-r--r--cui/source/options/opthtml.hxx34
-rw-r--r--cui/source/options/optinet2.cxx49
-rw-r--r--cui/source/options/optinet2.hxx72
-rw-r--r--cui/source/options/optjava.cxx35
-rw-r--r--cui/source/options/optjava.hxx44
-rw-r--r--cui/source/options/optjsearch.cxx28
-rw-r--r--cui/source/options/optjsearch.hxx42
-rw-r--r--cui/source/options/optlingu.cxx35
-rw-r--r--cui/source/options/optmemory.cxx17
-rw-r--r--cui/source/options/optmemory.hxx16
-rw-r--r--cui/source/options/optopencl.cxx49
-rw-r--r--cui/source/options/optopencl.hxx41
-rw-r--r--cui/source/options/optpath.cxx6
-rw-r--r--cui/source/options/optsave.cxx17
-rw-r--r--cui/source/options/optsave.hxx38
-rw-r--r--cui/source/options/optupdt.cxx19
-rw-r--r--cui/source/options/optupdt.hxx22
-rw-r--r--cui/source/options/personalization.cxx39
-rw-r--r--cui/source/options/personalization.hxx36
-rw-r--r--cui/source/options/securityoptions.cxx18
-rw-r--r--cui/source/options/securityoptions.hxx18
-rw-r--r--cui/source/options/treeopt.cxx21
-rw-r--r--cui/source/options/webconninfo.cxx6
-rw-r--r--cui/source/options/webconninfo.hxx8
-rw-r--r--cui/source/tabpages/align.cxx24
-rw-r--r--cui/source/tabpages/autocdlg.cxx113
-rw-r--r--cui/source/tabpages/backgrnd.cxx27
-rw-r--r--cui/source/tabpages/border.cxx34
-rw-r--r--cui/source/tabpages/chardlg.cxx116
-rw-r--r--cui/source/tabpages/connect.cxx22
-rw-r--r--cui/source/tabpages/dstribut.cxx32
-rw-r--r--cui/source/tabpages/grfpage.cxx18
-rw-r--r--cui/source/tabpages/labdlg.cxx20
-rw-r--r--cui/source/tabpages/macroass.cxx20
-rw-r--r--cui/source/tabpages/measure.cxx25
-rw-r--r--cui/source/tabpages/numfmt.cxx26
-rw-r--r--cui/source/tabpages/numpages.cxx61
-rw-r--r--cui/source/tabpages/page.cxx29
-rw-r--r--cui/source/tabpages/paragrph.cxx99
-rw-r--r--cui/source/tabpages/swpossizetabpage.cxx37
-rw-r--r--cui/source/tabpages/tabstpge.cxx35
-rw-r--r--cui/source/tabpages/textanim.cxx26
-rw-r--r--cui/source/tabpages/textattr.cxx24
-rw-r--r--cui/source/tabpages/tparea.cxx72
-rw-r--r--cui/source/tabpages/tpbitmap.cxx15
-rw-r--r--cui/source/tabpages/tpcolor.cxx32
-rw-r--r--cui/source/tabpages/tpgradnt.cxx28
-rw-r--r--cui/source/tabpages/tphatch.cxx21
-rw-r--r--cui/source/tabpages/tpline.cxx29
-rw-r--r--cui/source/tabpages/tplnedef.cxx25
-rw-r--r--cui/source/tabpages/tplneend.cxx18
-rw-r--r--cui/source/tabpages/tpshadow.cxx17
-rw-r--r--cui/source/tabpages/transfrm.cxx58
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationpages.cxx42
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationpages.hxx34
-rw-r--r--dbaccess/source/ext/macromigration/rangeprogressbar.hxx2
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx1
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx3
-rw-r--r--dbaccess/source/ui/app/AppDetailView.hxx4
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.cxx2
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.hxx2
-rw-r--r--dbaccess/source/ui/app/AppView.cxx14
-rw-r--r--dbaccess/source/ui/app/AppView.hxx8
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.cxx1
-rw-r--r--dbaccess/source/ui/browser/brwview.cxx23
-rw-r--r--dbaccess/source/ui/browser/dbtreeview.cxx3
-rw-r--r--dbaccess/source/ui/browser/dbtreeview.hxx2
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx10
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx109
-rw-r--r--dbaccess/source/ui/control/TableGrantCtrl.cxx4
-rw-r--r--dbaccess/source/ui/control/VertSplitView.cxx4
-rw-r--r--dbaccess/source/ui/control/curledit.cxx6
-rw-r--r--dbaccess/source/ui/control/sqledit.cxx1
-rw-r--r--dbaccess/source/ui/dlg/CollectionView.cxx16
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx12
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.hxx9
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx19
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.hxx24
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx12
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.hxx6
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx114
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx109
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.hxx3
-rw-r--r--dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx13
-rw-r--r--dbaccess/source/ui/dlg/RelationDlg.cxx20
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.cxx31
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.hxx40
-rw-r--r--dbaccess/source/ui/dlg/UserAdmin.cxx24
-rw-r--r--dbaccess/source/ui/dlg/UserAdmin.hxx8
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.cxx22
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.hxx27
-rw-r--r--dbaccess/source/ui/dlg/adminpages.hxx2
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx6
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx88
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.hxx56
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.cxx19
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.hxx20
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx11
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx102
-rw-r--r--dbaccess/source/ui/dlg/detailpages.hxx80
-rw-r--r--dbaccess/source/ui/dlg/directsql.cxx7
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.cxx16
-rw-r--r--dbaccess/source/ui/dlg/dlgsize.cxx13
-rw-r--r--dbaccess/source/ui/dlg/dsselect.cxx14
-rw-r--r--dbaccess/source/ui/dlg/dsselect.hxx11
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx30
-rw-r--r--dbaccess/source/ui/dlg/generalpage.hxx26
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx9
-rw-r--r--dbaccess/source/ui/dlg/indexfieldscontrol.cxx4
-rw-r--r--dbaccess/source/ui/dlg/paramdialog.cxx5
-rw-r--r--dbaccess/source/ui/dlg/queryfilter.cxx21
-rw-r--r--dbaccess/source/ui/dlg/queryorder.cxx18
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx11
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx3
-rw-r--r--dbaccess/source/ui/dlg/tablespage.hxx6
-rw-r--r--dbaccess/source/ui/dlg/textconnectionsettings.cxx11
-rw-r--r--dbaccess/source/ui/inc/CollectionView.hxx15
-rw-r--r--dbaccess/source/ui/inc/ConnectionLine.hxx3
-rw-r--r--dbaccess/source/ui/inc/ConnectionLineAccess.hxx3
-rw-r--r--dbaccess/source/ui/inc/FieldDescControl.hxx70
-rw-r--r--dbaccess/source/ui/inc/JAccess.hxx3
-rw-r--r--dbaccess/source/ui/inc/JoinController.hxx2
-rw-r--r--dbaccess/source/ui/inc/JoinDesignView.hxx4
-rw-r--r--dbaccess/source/ui/inc/JoinTableView.hxx26
-rw-r--r--dbaccess/source/ui/inc/QueryDesignView.hxx2
-rw-r--r--dbaccess/source/ui/inc/QueryPropertiesDialog.hxx9
-rw-r--r--dbaccess/source/ui/inc/QueryTextView.hxx2
-rw-r--r--dbaccess/source/ui/inc/QueryViewSwitch.hxx4
-rw-r--r--dbaccess/source/ui/inc/RelationControl.hxx6
-rw-r--r--dbaccess/source/ui/inc/RelationDlg.hxx20
-rw-r--r--dbaccess/source/ui/inc/RelationTableView.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableConnection.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableDesignHelpBar.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableDesignView.hxx6
-rw-r--r--dbaccess/source/ui/inc/TableFieldDescription.hxx3
-rw-r--r--dbaccess/source/ui/inc/TableGrantCtrl.hxx4
-rw-r--r--dbaccess/source/ui/inc/TableWindow.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableWindowAccess.hxx3
-rw-r--r--dbaccess/source/ui/inc/TableWindowListBox.hxx4
-rw-r--r--dbaccess/source/ui/inc/TableWindowTitle.hxx2
-rw-r--r--dbaccess/source/ui/inc/TokenWriter.hxx2
-rw-r--r--dbaccess/source/ui/inc/VertSplitView.hxx6
-rw-r--r--dbaccess/source/ui/inc/WCPage.hxx24
-rw-r--r--dbaccess/source/ui/inc/WColumnSelect.hxx12
-rw-r--r--dbaccess/source/ui/inc/WCopyTable.hxx10
-rw-r--r--dbaccess/source/ui/inc/WNameMatch.hxx23
-rw-r--r--dbaccess/source/ui/inc/WTabPage.hxx4
-rw-r--r--dbaccess/source/ui/inc/WTypeSelect.hxx22
-rw-r--r--dbaccess/source/ui/inc/adtabdlg.hxx12
-rw-r--r--dbaccess/source/ui/inc/brwview.hxx10
-rw-r--r--dbaccess/source/ui/inc/curledit.hxx2
-rw-r--r--dbaccess/source/ui/inc/datasourceconnector.hxx7
-rw-r--r--dbaccess/source/ui/inc/dbwizsetup.hxx6
-rw-r--r--dbaccess/source/ui/inc/directsql.hxx14
-rw-r--r--dbaccess/source/ui/inc/dlgsize.hxx6
-rw-r--r--dbaccess/source/ui/inc/indexdialog.hxx18
-rw-r--r--dbaccess/source/ui/inc/indexfieldscontrol.hxx4
-rw-r--r--dbaccess/source/ui/inc/linkeddocuments.hxx3
-rw-r--r--dbaccess/source/ui/inc/paramdialog.hxx10
-rw-r--r--dbaccess/source/ui/inc/querycontainerwindow.hxx4
-rw-r--r--dbaccess/source/ui/inc/queryfilter.hxx24
-rw-r--r--dbaccess/source/ui/inc/queryorder.hxx18
-rw-r--r--dbaccess/source/ui/inc/sqledit.hxx2
-rw-r--r--dbaccess/source/ui/inc/textconnectionsettings.hxx4
-rw-r--r--dbaccess/source/ui/inc/undosqledit.hxx3
-rw-r--r--dbaccess/source/ui/inc/unodatbr.hxx10
-rw-r--r--dbaccess/source/ui/misc/ToolBoxHelper.cxx2
-rw-r--r--dbaccess/source/ui/misc/WCPage.cxx23
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx17
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx10
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx20
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx54
-rw-r--r--dbaccess/source/ui/misc/singledoccontroller.cxx1
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx9
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/JoinDesignView.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx50
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindow.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx3
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx59
-rw-r--r--dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx18
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx6
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx54
-rw-r--r--dbaccess/source/ui/querydesign/QueryTextView.cxx3
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx22
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx12
-rw-r--r--dbaccess/source/ui/querydesign/TableConnection.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/TableFieldDescription.cxx1
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowAccess.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowListBox.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowTitle.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/limitboxcontroller.cxx3
-rw-r--r--dbaccess/source/ui/querydesign/limitboxcontroller.hxx3
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.hxx10
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx5
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx3
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx9
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.hxx12
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx3
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignView.cxx17
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx15
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx6
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.hxx7
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx2
-rw-r--r--dbaccess/source/ui/uno/composerdialogs.cxx6
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx2
-rw-r--r--desktop/source/app/cmdlinehelp.hxx8
-rw-r--r--desktop/source/deployment/gui/dp_gui_dependencydialog.cxx10
-rw-r--r--desktop/source/deployment/gui/dp_gui_dependencydialog.hxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx43
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx42
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx14
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.hxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx17
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.hxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx16
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.hxx30
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx7
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx14
-rw-r--r--desktop/source/deployment/gui/license_dialog.cxx29
-rw-r--r--editeng/source/editeng/impedit.hxx3
-rw-r--r--editeng/source/editeng/textconv.hxx3
-rw-r--r--editeng/source/misc/hangulhanja.cxx2
-rw-r--r--editeng/source/misc/splwrap.cxx4
-rw-r--r--extensions/source/abpilot/abpfinalpage.cxx6
-rw-r--r--extensions/source/abpilot/abpfinalpage.hxx13
-rw-r--r--extensions/source/abpilot/admininvokationimpl.hxx3
-rw-r--r--extensions/source/abpilot/admininvokationpage.cxx11
-rw-r--r--extensions/source/abpilot/admininvokationpage.hxx7
-rw-r--r--extensions/source/abpilot/fieldmappingpage.cxx12
-rw-r--r--extensions/source/abpilot/fieldmappingpage.hxx8
-rw-r--r--extensions/source/abpilot/tableselectionpage.cxx10
-rw-r--r--extensions/source/abpilot/tableselectionpage.hxx6
-rw-r--r--extensions/source/abpilot/typeselectionpage.cxx11
-rw-r--r--extensions/source/abpilot/typeselectionpage.hxx25
-rw-r--r--extensions/source/abpilot/unodialogabp.cxx2
-rw-r--r--extensions/source/bibliography/bibbeam.cxx7
-rw-r--r--extensions/source/bibliography/bibbeam.hxx4
-rw-r--r--extensions/source/bibliography/bibcont.cxx7
-rw-r--r--extensions/source/bibliography/bibcont.hxx4
-rw-r--r--extensions/source/bibliography/bibmod.cxx1
-rw-r--r--extensions/source/bibliography/bibshortcuthandler.hxx2
-rw-r--r--extensions/source/bibliography/bibview.cxx27
-rw-r--r--extensions/source/bibliography/bibview.hxx34
-rw-r--r--extensions/source/bibliography/datman.cxx120
-rw-r--r--extensions/source/bibliography/datman.hxx5
-rw-r--r--extensions/source/bibliography/framectr.cxx1
-rw-r--r--extensions/source/bibliography/general.cxx62
-rw-r--r--extensions/source/bibliography/general.hxx98
-rw-r--r--extensions/source/bibliography/toolbar.cxx1
-rw-r--r--extensions/source/bibliography/toolbar.hxx4
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx39
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.hxx28
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx12
-rw-r--r--extensions/source/dbpilots/controlwizard.hxx13
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx15
-rw-r--r--extensions/source/dbpilots/gridwizard.hxx14
-rw-r--r--extensions/source/dbpilots/groupboxwiz.cxx50
-rw-r--r--extensions/source/dbpilots/groupboxwiz.hxx28
-rw-r--r--extensions/source/dbpilots/listcombowizard.cxx33
-rw-r--r--extensions/source/dbpilots/listcombowizard.hxx18
-rw-r--r--extensions/source/plugin/inc/plugin/plctrl.hxx13
-rw-r--r--extensions/source/propctrlr/browserline.cxx7
-rw-r--r--extensions/source/propctrlr/browserline.hxx8
-rw-r--r--extensions/source/propctrlr/browserview.cxx4
-rw-r--r--extensions/source/propctrlr/browserview.hxx2
-rw-r--r--extensions/source/propctrlr/commoncontrol.cxx9
-rw-r--r--extensions/source/propctrlr/commoncontrol.hxx2
-rw-r--r--extensions/source/propctrlr/controlfontdialog.cxx2
-rw-r--r--extensions/source/propctrlr/formlinkdialog.cxx27
-rw-r--r--extensions/source/propctrlr/formlinkdialog.hxx11
-rw-r--r--extensions/source/propctrlr/listselectiondlg.cxx11
-rw-r--r--extensions/source/propctrlr/listselectiondlg.hxx4
-rw-r--r--extensions/source/propctrlr/newdatatype.cxx11
-rw-r--r--extensions/source/propctrlr/newdatatype.hxx6
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx1
-rw-r--r--extensions/source/propctrlr/propcontroller.hxx4
-rw-r--r--extensions/source/propctrlr/propertyeditor.cxx6
-rw-r--r--extensions/source/propctrlr/propertyeditor.hxx2
-rw-r--r--extensions/source/propctrlr/selectlabeldialog.cxx3
-rw-r--r--extensions/source/propctrlr/selectlabeldialog.hxx6
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx16
-rw-r--r--extensions/source/propctrlr/standardcontrol.hxx4
-rw-r--r--extensions/source/propctrlr/taborder.cxx5
-rw-r--r--extensions/source/propctrlr/taborder.hxx10
-rw-r--r--extensions/source/scanner/grid.cxx14
-rw-r--r--extensions/source/scanner/grid.hxx11
-rw-r--r--extensions/source/scanner/sanedlg.cxx32
-rw-r--r--extensions/source/scanner/sanedlg.hxx48
-rw-r--r--filter/source/flash/impswfdialog.cxx13
-rw-r--r--filter/source/flash/impswfdialog.hxx17
-rw-r--r--filter/source/flash/swfdialog.cxx2
-rw-r--r--filter/source/pdf/impdialog.cxx124
-rw-r--r--filter/source/pdf/impdialog.hxx192
-rw-r--r--filter/source/pdf/pdfdialog.cxx2
-rw-r--r--filter/source/pdf/pdffilter.cxx4
-rw-r--r--filter/source/svg/svgdialog.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfilterdialogcomponent.cxx10
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx31
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.hxx30
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.cxx6
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.hxx8
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagebasic.cxx12
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagebasic.hxx11
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagexslt.cxx14
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagexslt.hxx17
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx16
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.hxx30
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx19
-rw-r--r--forms/source/richtext/richtextimplcontrol.hxx14
-rw-r--r--forms/source/solar/control/navtoolbar.cxx10
-rw-r--r--forms/source/solar/inc/navtoolbar.hxx4
-rw-r--r--formula/source/ui/dlg/ControlHelper.hxx18
-rw-r--r--formula/source/ui/dlg/formula.cxx66
-rw-r--r--formula/source/ui/dlg/funcpage.cxx12
-rw-r--r--formula/source/ui/dlg/funcpage.hxx6
-rw-r--r--formula/source/ui/dlg/funcutl.cxx55
-rw-r--r--formula/source/ui/dlg/parawin.cxx20
-rw-r--r--formula/source/ui/dlg/parawin.hxx50
-rw-r--r--formula/source/ui/dlg/structpg.cxx11
-rw-r--r--formula/source/ui/dlg/structpg.hxx4
-rw-r--r--fpicker/source/office/OfficeControlAccess.hxx2
-rw-r--r--fpicker/source/office/PlacesListBox.cxx14
-rw-r--r--fpicker/source/office/PlacesListBox.hxx12
-rw-r--r--fpicker/source/office/QueryFolderName.hxx8
-rw-r--r--fpicker/source/office/asyncfilepicker.hxx5
-rw-r--r--fpicker/source/office/commonpicker.cxx10
-rw-r--r--fpicker/source/office/commonpicker.hxx3
-rw-r--r--fpicker/source/office/iodlg.cxx43
-rw-r--r--fpicker/source/office/iodlg.hxx22
-rw-r--r--fpicker/source/office/iodlgimp.cxx5
-rw-r--r--fpicker/source/office/iodlgimp.hxx52
-rw-r--r--framework/inc/classes/fwktabwindow.hxx6
-rw-r--r--framework/inc/dispatch/closedispatcher.hxx3
-rw-r--r--framework/inc/helper/vclstatusindicator.hxx2
-rw-r--r--framework/inc/uielement/buttontoolbarcontroller.hxx7
-rw-r--r--framework/inc/uielement/comboboxtoolbarcontroller.hxx2
-rw-r--r--framework/inc/uielement/complextoolbarcontroller.hxx5
-rw-r--r--framework/inc/uielement/dropdownboxtoolbarcontroller.hxx3
-rw-r--r--framework/inc/uielement/edittoolbarcontroller.hxx2
-rw-r--r--framework/inc/uielement/generictoolbarcontroller.hxx11
-rw-r--r--framework/inc/uielement/spinfieldtoolbarcontroller.hxx3
-rw-r--r--framework/inc/uielement/statusbaritem.hxx3
-rw-r--r--framework/inc/uielement/statusbarmanager.hxx11
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx2
-rw-r--r--framework/inc/uielement/toolbarmerger.hxx2
-rw-r--r--framework/source/helper/vclstatusindicator.cxx3
-rw-r--r--framework/source/services/tabwindowservice.cxx8
-rw-r--r--framework/source/uielement/buttontoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/comboboxtoolbarcontroller.cxx4
-rw-r--r--framework/source/uielement/complextoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/dropdownboxtoolbarcontroller.cxx4
-rw-r--r--framework/source/uielement/edittoolbarcontroller.cxx4
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/spinfieldtoolbarcontroller.cxx4
-rw-r--r--framework/source/uielement/statusbarmanager.cxx51
-rw-r--r--framework/source/uielement/toolbarmanager.cxx8
-rw-r--r--include/dbaccess/ToolBoxHelper.hxx3
-rw-r--r--include/dbaccess/genericcontroller.hxx7
-rw-r--r--include/editeng/splwrap.hxx3
-rw-r--r--include/formula/funcutl.hxx6
-rw-r--r--include/sfx2/basedlgs.hxx16
-rw-r--r--include/sfx2/checkin.hxx8
-rw-r--r--include/sfx2/childwin.hxx8
-rw-r--r--include/sfx2/dinfdlg.hxx86
-rw-r--r--include/sfx2/fcontnr.hxx5
-rw-r--r--include/sfx2/frame.hxx3
-rw-r--r--include/sfx2/infobar.hxx17
-rw-r--r--include/sfx2/ipclient.hxx2
-rw-r--r--include/sfx2/mgetempl.hxx24
-rw-r--r--include/sfx2/newstyle.hxx4
-rw-r--r--include/sfx2/passwd.hxx30
-rw-r--r--include/sfx2/printopt.hxx43
-rw-r--r--include/sfx2/prnmon.hxx2
-rw-r--r--include/sfx2/sidebar/SidebarPanelBase.hxx3
-rw-r--r--include/sfx2/stbitem.hxx6
-rw-r--r--include/sfx2/tabdlg.hxx20
-rw-r--r--include/sfx2/templatedlg.hxx20
-rw-r--r--include/sfx2/templateinfodlg.hxx8
-rw-r--r--include/sfx2/thumbnailview.hxx2
-rw-r--r--include/sfx2/thumbnailviewitem.hxx2
-rw-r--r--include/sfx2/viewsh.hxx3
-rw-r--r--include/svtools/GraphicExportOptionsDialog.hxx9
-rw-r--r--include/svtools/PlaceEditDialog.hxx13
-rw-r--r--include/svtools/ServerDetailsControls.hxx26
-rw-r--r--include/svtools/accessibleruler.hxx3
-rw-r--r--include/svtools/addresstemplate.hxx8
-rw-r--r--include/svtools/brwbox.hxx16
-rw-r--r--include/svtools/brwhead.hxx5
-rw-r--r--include/svtools/calendar.hxx8
-rw-r--r--include/svtools/colrdlg.hxx8
-rw-r--r--include/svtools/editbrowsebox.hxx10
-rw-r--r--include/svtools/fileview.hxx4
-rw-r--r--include/svtools/generictoolboxcontroller.hxx4
-rw-r--r--include/svtools/genericunodialog.hxx3
-rw-r--r--include/svtools/prnsetup.hxx14
-rw-r--r--include/svtools/simptabl.hxx4
-rw-r--r--include/svtools/tabbar.hxx2
-rw-r--r--include/svtools/treelistbox.hxx4
-rw-r--r--include/svtools/wizardmachine.hxx13
-rw-r--r--include/svtools/wizdlg.hxx10
-rw-r--r--include/svx/AccessibleShapeTreeInfo.hxx3
-rw-r--r--include/svx/bmpmask.hxx50
-rw-r--r--include/svx/compressgraphicdialog.hxx34
-rw-r--r--include/svx/contdlg.hxx6
-rw-r--r--include/svx/ctredlin.hxx56
-rw-r--r--include/svx/dialcontrol.hxx2
-rw-r--r--include/svx/fillctrl.hxx10
-rw-r--r--include/svx/fmshell.hxx2
-rw-r--r--include/svx/fontworkgallery.hxx10
-rw-r--r--include/svx/hdft.hxx32
-rw-r--r--include/svx/imapdlg.hxx18
-rw-r--r--include/svx/lboxctrl.hxx2
-rw-r--r--include/svx/linkwarn.hxx2
-rw-r--r--include/svx/optgrid.hxx40
-rw-r--r--include/svx/passwd.hxx14
-rw-r--r--include/svx/rubydialog.hxx46
-rw-r--r--include/svx/ruler.hxx2
-rw-r--r--include/svx/sidebar/Popup.hxx3
-rw-r--r--include/svx/srchdlg.hxx100
-rw-r--r--include/svx/svdedxv.hxx4
-rw-r--r--include/svx/svdpntv.hxx4
-rw-r--r--include/svx/tbxcolorupdate.hxx7
-rw-r--r--include/tools/errinf.hxx5
-rw-r--r--include/vcl/builder.hxx20
-rw-r--r--include/vcl/button.hxx4
-rw-r--r--include/vcl/combobox.hxx6
-rw-r--r--include/vcl/controllayout.hxx4
-rw-r--r--include/vcl/cursor.hxx3
-rw-r--r--include/vcl/dialog.hxx2
-rw-r--r--include/vcl/dockwin.hxx14
-rw-r--r--include/vcl/event.hxx3
-rw-r--r--include/vcl/field.hxx2
-rw-r--r--include/vcl/fixed.hxx2
-rw-r--r--include/vcl/floatwin.hxx4
-rw-r--r--include/vcl/fltcall.hxx2
-rw-r--r--include/vcl/layout.hxx30
-rw-r--r--include/vcl/lstbox.hxx8
-rw-r--r--include/vcl/menu.hxx2
-rw-r--r--include/vcl/msgbox.hxx16
-rw-r--r--include/vcl/opengl/OpenGLContext.hxx8
-rw-r--r--include/vcl/seleng.hxx2
-rw-r--r--include/vcl/split.hxx2
-rw-r--r--include/vcl/syswin.hxx2
-rw-r--r--include/vcl/tabdlg.hxx4
-rw-r--r--include/vcl/tabpage.hxx2
-rw-r--r--include/vcl/taskpanelist.hxx2
-rw-r--r--include/vcl/toolbox.hxx4
-rw-r--r--include/vcl/vclevent.hxx7
-rw-r--r--include/vcl/vclptr.hxx40
-rw-r--r--include/vcl/waitobj.hxx2
-rw-r--r--include/vcl/window.hxx4
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx9
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.cxx9
-rw-r--r--reportdesign/source/ui/dlg/Condition.cxx17
-rw-r--r--reportdesign/source/ui/dlg/Condition.hxx32
-rw-r--r--reportdesign/source/ui/dlg/DateTime.cxx13
-rw-r--r--reportdesign/source/ui/dlg/Formula.cxx2
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx75
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx2
-rw-r--r--reportdesign/source/ui/dlg/PageNumber.cxx12
-rw-r--r--reportdesign/source/ui/inc/CondFormat.hxx12
-rw-r--r--reportdesign/source/ui/inc/DateTime.hxx15
-rw-r--r--reportdesign/source/ui/inc/DesignView.hxx8
-rw-r--r--reportdesign/source/ui/inc/Formula.hxx6
-rw-r--r--reportdesign/source/ui/inc/GroupsSorting.hxx20
-rw-r--r--reportdesign/source/ui/inc/PageNumber.hxx13
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx2
-rw-r--r--reportdesign/source/ui/inc/ReportSection.hxx2
-rw-r--r--reportdesign/source/ui/inc/ReportWindow.hxx8
-rw-r--r--reportdesign/source/ui/inc/ScrollHelper.hxx2
-rw-r--r--reportdesign/source/ui/inc/SectionView.hxx4
-rw-r--r--reportdesign/source/ui/inc/SectionWindow.hxx2
-rw-r--r--reportdesign/source/ui/inc/StartMarker.hxx2
-rw-r--r--reportdesign/source/ui/inc/ViewsWindow.hxx12
-rw-r--r--reportdesign/source/ui/inc/dlgedfunc.hxx2
-rw-r--r--reportdesign/source/ui/inc/propbrw.hxx2
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx12
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx1
-rw-r--r--reportdesign/source/ui/report/ReportWindow.cxx2
-rw-r--r--reportdesign/source/ui/report/ScrollHelper.cxx1
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx1
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx1
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx1
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx1
-rw-r--r--sc/inc/AccessibleFilterMenu.hxx3
-rw-r--r--sc/inc/AccessibleFilterMenuItem.hxx3
-rw-r--r--sc/inc/scmod.hxx4
-rw-r--r--sc/inc/scopetools.hxx3
-rw-r--r--sc/inc/waitoff.hxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx24
-rw-r--r--sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx13
-rw-r--r--sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx10
-rw-r--r--sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx10
-rw-r--r--sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx28
-rw-r--r--sc/source/ui/StatisticsDialogs/SamplingDialog.cxx25
-rw-r--r--sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx19
-rw-r--r--sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx24
-rw-r--r--sc/source/ui/app/inputhdl.cxx5
-rw-r--r--sc/source/ui/app/scmod.cxx14
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx6
-rw-r--r--sc/source/ui/attrdlg/scuiexp.cxx30
-rw-r--r--sc/source/ui/attrdlg/tabpages.cxx14
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx18
-rw-r--r--sc/source/ui/condformat/colorformat.cxx23
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx24
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx5
-rw-r--r--sc/source/ui/dbgui/PivotLayoutDialog.cxx40
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx12
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx2
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx17
-rw-r--r--sc/source/ui/dbgui/dapidata.cxx13
-rw-r--r--sc/source/ui/dbgui/dapitype.cxx23
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx15
-rw-r--r--sc/source/ui/dbgui/dpgroupdlg.cxx39
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx32
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx18
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx78
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx18
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx22
-rw-r--r--sc/source/ui/dbgui/scuiimoptdlg.cxx12
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx19
-rw-r--r--sc/source/ui/dbgui/sortdlg.cxx13
-rw-r--r--sc/source/ui/dbgui/subtdlg.cxx11
-rw-r--r--sc/source/ui/dbgui/textimportoptions.cxx12
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx30
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx18
-rw-r--r--sc/source/ui/dbgui/validate.cxx59
-rw-r--r--sc/source/ui/dialogs/searchresults.cxx2
-rw-r--r--sc/source/ui/docshell/tablink.cxx6
-rw-r--r--sc/source/ui/docshell/tpstat.cxx10
-rw-r--r--sc/source/ui/drawfunc/fupoor.cxx2
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx1
-rw-r--r--sc/source/ui/inc/AccessibleCsvControl.hxx3
-rw-r--r--sc/source/ui/inc/AccessibleEditObject.hxx2
-rw-r--r--sc/source/ui/inc/AccessibleText.hxx4
-rw-r--r--sc/source/ui/inc/AnalysisOfVarianceDialog.hxx9
-rw-r--r--sc/source/ui/inc/ExponentialSmoothingDialog.hxx3
-rw-r--r--sc/source/ui/inc/MovingAverageDialog.hxx3
-rw-r--r--sc/source/ui/inc/PivotLayoutDialog.hxx55
-rw-r--r--sc/source/ui/inc/PivotLayoutTreeListBase.hxx3
-rw-r--r--sc/source/ui/inc/RandomNumberGeneratorDialog.hxx31
-rw-r--r--sc/source/ui/inc/SamplingDialog.hxx29
-rw-r--r--sc/source/ui/inc/StatisticsInputOutputDialog.hxx21
-rw-r--r--sc/source/ui/inc/StatisticsTwoVariableDialog.hxx27
-rw-r--r--sc/source/ui/inc/acredlin.hxx8
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx18
-rw-r--r--sc/source/ui/inc/areasdlg.hxx24
-rw-r--r--sc/source/ui/inc/checklistmenu.hxx13
-rw-r--r--sc/source/ui/inc/colorformat.hxx29
-rw-r--r--sc/source/ui/inc/condformatdlg.hxx19
-rw-r--r--sc/source/ui/inc/condformatmgr.hxx8
-rw-r--r--sc/source/ui/inc/conflictsdlg.hxx11
-rw-r--r--sc/source/ui/inc/consdlg.hxx34
-rw-r--r--sc/source/ui/inc/content.hxx3
-rw-r--r--sc/source/ui/inc/corodlg.hxx11
-rw-r--r--sc/source/ui/inc/crdlg.hxx10
-rw-r--r--sc/source/ui/inc/crnrdlg.hxx25
-rw-r--r--sc/source/ui/inc/dapidata.hxx8
-rw-r--r--sc/source/ui/inc/dapitype.hxx23
-rw-r--r--sc/source/ui/inc/datafdlg.hxx19
-rw-r--r--sc/source/ui/inc/datastreamdlg.hxx36
-rw-r--r--sc/source/ui/inc/dbnamdlg.hxx36
-rw-r--r--sc/source/ui/inc/delcldlg.hxx10
-rw-r--r--sc/source/ui/inc/delcodlg.hxx19
-rw-r--r--sc/source/ui/inc/dpgroupdlg.hxx55
-rw-r--r--sc/source/ui/inc/dwfunctr.hxx2
-rw-r--r--sc/source/ui/inc/filldlg.hxx41
-rw-r--r--sc/source/ui/inc/filtdlg.hxx120
-rw-r--r--sc/source/ui/inc/foptmgr.hxx24
-rw-r--r--sc/source/ui/inc/fupoor.hxx4
-rw-r--r--sc/source/ui/inc/gridwin.hxx4
-rw-r--r--sc/source/ui/inc/groupdlg.hxx6
-rw-r--r--sc/source/ui/inc/highred.hxx16
-rw-r--r--sc/source/ui/inc/inputhdl.hxx9
-rw-r--r--sc/source/ui/inc/inscldlg.hxx9
-rw-r--r--sc/source/ui/inc/inscodlg.hxx52
-rw-r--r--sc/source/ui/inc/instbdlg.hxx26
-rw-r--r--sc/source/ui/inc/lbseldlg.hxx4
-rw-r--r--sc/source/ui/inc/linkarea.hxx15
-rw-r--r--sc/source/ui/inc/mtrindlg.hxx6
-rw-r--r--sc/source/ui/inc/mvtabdlg.hxx15
-rw-r--r--sc/source/ui/inc/namecrea.hxx11
-rw-r--r--sc/source/ui/inc/namedefdlg.hxx25
-rw-r--r--sc/source/ui/inc/namedlg.hxx28
-rw-r--r--sc/source/ui/inc/namepast.hxx8
-rw-r--r--sc/source/ui/inc/navipi.hxx2
-rw-r--r--sc/source/ui/inc/notemark.hxx8
-rw-r--r--sc/source/ui/inc/opredlin.hxx10
-rw-r--r--sc/source/ui/inc/optsolver.hxx127
-rw-r--r--sc/source/ui/inc/pfiltdlg.hxx42
-rw-r--r--sc/source/ui/inc/prevwsh.hxx10
-rw-r--r--sc/source/ui/inc/protectiondlg.hxx15
-rw-r--r--sc/source/ui/inc/pvfundlg.hxx88
-rw-r--r--sc/source/ui/inc/reffact.hxx2
-rw-r--r--sc/source/ui/inc/retypepassdlg.hxx26
-rw-r--r--sc/source/ui/inc/scendlg.hxx19
-rw-r--r--sc/source/ui/inc/scuiasciiopt.hxx44
-rw-r--r--sc/source/ui/inc/scuiautofmt.hxx28
-rw-r--r--sc/source/ui/inc/scuiimoptdlg.hxx24
-rw-r--r--sc/source/ui/inc/scuitphfedit.hxx43
-rw-r--r--sc/source/ui/inc/searchresults.hxx2
-rw-r--r--sc/source/ui/inc/sharedocdlg.hxx6
-rw-r--r--sc/source/ui/inc/shtabdlg.hxx6
-rw-r--r--sc/source/ui/inc/simpref.hxx11
-rw-r--r--sc/source/ui/inc/solveroptions.hxx18
-rw-r--r--sc/source/ui/inc/solvrdlg.hxx21
-rw-r--r--sc/source/ui/inc/sortdlg.hxx8
-rw-r--r--sc/source/ui/inc/sortkeydlg.hxx12
-rw-r--r--sc/source/ui/inc/strindlg.hxx7
-rw-r--r--sc/source/ui/inc/subtdlg.hxx4
-rw-r--r--sc/source/ui/inc/tabbgcolordlg.hxx11
-rw-r--r--sc/source/ui/inc/tabopdlg.hxx25
-rw-r--r--sc/source/ui/inc/tabpages.hxx11
-rw-r--r--sc/source/ui/inc/tabview.hxx10
-rw-r--r--sc/source/ui/inc/textimportoptions.hxx12
-rw-r--r--sc/source/ui/inc/tpcalc.hxx32
-rw-r--r--sc/source/ui/inc/tpcompatibility.hxx6
-rw-r--r--sc/source/ui/inc/tpdefaults.hxx5
-rw-r--r--sc/source/ui/inc/tpformula.hxx24
-rw-r--r--sc/source/ui/inc/tphf.hxx13
-rw-r--r--sc/source/ui/inc/tpprint.hxx10
-rw-r--r--sc/source/ui/inc/tpsort.hxx34
-rw-r--r--sc/source/ui/inc/tpstat.hxx10
-rw-r--r--sc/source/ui/inc/tpsubt.hxx26
-rw-r--r--sc/source/ui/inc/tptable.hxx48
-rw-r--r--sc/source/ui/inc/tpusrlst.hxx24
-rw-r--r--sc/source/ui/inc/tpview.hxx88
-rw-r--r--sc/source/ui/inc/validate.hxx62
-rw-r--r--sc/source/ui/inc/xmlsourcedlg.hxx20
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx5
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx18
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx11
-rw-r--r--sc/source/ui/miscdlgs/crdlg.cxx15
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx20
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx14
-rw-r--r--sc/source/ui/miscdlgs/datastreamdlg.cxx27
-rw-r--r--sc/source/ui/miscdlgs/delcldlg.cxx15
-rw-r--r--sc/source/ui/miscdlgs/delcodlg.cxx23
-rw-r--r--sc/source/ui/miscdlgs/filldlg.cxx26
-rw-r--r--sc/source/ui/miscdlgs/groupdlg.cxx14
-rw-r--r--sc/source/ui/miscdlgs/highred.cxx8
-rw-r--r--sc/source/ui/miscdlgs/inscldlg.cxx18
-rw-r--r--sc/source/ui/miscdlgs/inscodlg.cxx22
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx13
-rw-r--r--sc/source/ui/miscdlgs/lbseldlg.cxx12
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx13
-rw-r--r--sc/source/ui/miscdlgs/mtrindlg.cxx12
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx13
-rw-r--r--sc/source/ui/miscdlgs/namecrea.cxx14
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx95
-rw-r--r--sc/source/ui/miscdlgs/protectiondlg.cxx13
-rw-r--r--sc/source/ui/miscdlgs/retypepassdlg.cxx25
-rw-r--r--sc/source/ui/miscdlgs/scuiautofmt.cxx23
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/shtabdlg.cxx12
-rw-r--r--sc/source/ui/miscdlgs/simpref.cxx11
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx27
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx18
-rw-r--r--sc/source/ui/miscdlgs/strindlg.cxx12
-rw-r--r--sc/source/ui/miscdlgs/tabbgcolordlg.cxx23
-rw-r--r--sc/source/ui/miscdlgs/tabopdlg.cxx19
-rw-r--r--sc/source/ui/namedlg/namedefdlg.cxx21
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx15
-rw-r--r--sc/source/ui/namedlg/namepast.cxx5
-rw-r--r--sc/source/ui/navipi/content.cxx7
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.cxx22
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.hxx33
-rw-r--r--sc/source/ui/optdlg/opredlin.cxx10
-rw-r--r--sc/source/ui/optdlg/tpcalc.cxx16
-rw-r--r--sc/source/ui/optdlg/tpcompatibility.cxx7
-rw-r--r--sc/source/ui/optdlg/tpdefaults.cxx8
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx17
-rw-r--r--sc/source/ui/optdlg/tpprint.cxx9
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx12
-rw-r--r--sc/source/ui/optdlg/tpview.cxx43
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx12
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx26
-rw-r--r--sc/source/ui/pagedlg/tphf.cxx8
-rw-r--r--sc/source/ui/pagedlg/tptable.cxx27
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx14
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.hxx20
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx10
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx12
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx12
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx15
-rw-r--r--sc/source/ui/vba/vbaeventshelper.cxx8
-rw-r--r--sc/source/ui/view/gridwin.cxx27
-rw-r--r--sc/source/ui/view/gridwin2.cxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx8
-rw-r--r--sc/source/ui/view/reffact.cxx30
-rw-r--r--sc/source/ui/view/tabview.cxx2
-rw-r--r--sc/source/ui/view/tabview5.cxx7
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx21
-rw-r--r--sd/inc/Outliner.hxx2
-rw-r--r--sd/source/filter/html/pubdlg.cxx108
-rw-r--r--sd/source/ui/accessibility/AccessibleSlideSorterView.cxx16
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.cxx24
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.hxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx178
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.hxx8
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx23
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.hxx34
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx15
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.hxx26
-rw-r--r--sd/source/ui/annotations/annotationtag.hxx2
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx13
-rw-r--r--sd/source/ui/annotations/annotationwindow.hxx9
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx13
-rw-r--r--sd/source/ui/dlg/PaneChildWindows.cxx4
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx17
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.hxx24
-rw-r--r--sd/source/ui/dlg/RemoteDialog.cxx13
-rw-r--r--sd/source/ui/dlg/RemoteDialog.hxx8
-rw-r--r--sd/source/ui/dlg/RemoteDialogClientBox.hxx2
-rw-r--r--sd/source/ui/dlg/animobjs.cxx22
-rw-r--r--sd/source/ui/dlg/brkdlg.cxx6
-rw-r--r--sd/source/ui/dlg/copydlg.cxx36
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx29
-rw-r--r--sd/source/ui/dlg/dlgass.cxx122
-rw-r--r--sd/source/ui/dlg/dlgfield.cxx15
-rw-r--r--sd/source/ui/dlg/dlgsnap.cxx19
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx66
-rw-r--r--sd/source/ui/dlg/ins_paste.cxx12
-rw-r--r--sd/source/ui/dlg/inspagob.cxx9
-rw-r--r--sd/source/ui/dlg/layeroptionsdlg.cxx16
-rw-r--r--sd/source/ui/dlg/masterlayoutdlg.cxx15
-rw-r--r--sd/source/ui/dlg/morphdlg.cxx9
-rw-r--r--sd/source/ui/dlg/paragr.cxx16
-rw-r--r--sd/source/ui/dlg/present.cxx33
-rw-r--r--sd/source/ui/dlg/prntopts.cxx27
-rw-r--r--sd/source/ui/dlg/sddlgfact.cxx14
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx3
-rw-r--r--sd/source/ui/dlg/sdpreslt.cxx10
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx4
-rw-r--r--sd/source/ui/dlg/sduiexp.cxx15
-rw-r--r--sd/source/ui/dlg/tpaction.cxx19
-rw-r--r--sd/source/ui/dlg/tpoption.cxx42
-rw-r--r--sd/source/ui/dlg/vectdlg.cxx16
-rw-r--r--sd/source/ui/framework/factories/ChildWindowPane.cxx2
-rw-r--r--sd/source/ui/framework/factories/FullScreenPane.cxx12
-rw-r--r--sd/source/ui/framework/factories/Pane.cxx2
-rw-r--r--sd/source/ui/func/fupoor.cxx8
-rw-r--r--sd/source/ui/inc/AccessibleDocumentViewBase.hxx2
-rw-r--r--sd/source/ui/inc/AccessibleSlideSorterView.hxx3
-rw-r--r--sd/source/ui/inc/BreakDlg.hxx8
-rw-r--r--sd/source/ui/inc/FormShellManager.hxx3
-rw-r--r--sd/source/ui/inc/Ruler.hxx2
-rw-r--r--sd/source/ui/inc/ViewShell.hxx4
-rw-r--r--sd/source/ui/inc/Window.hxx2
-rw-r--r--sd/source/ui/inc/WindowUpdater.hxx3
-rw-r--r--sd/source/ui/inc/animobjs.hxx46
-rw-r--r--sd/source/ui/inc/copydlg.hxx22
-rw-r--r--sd/source/ui/inc/custsdlg.hxx41
-rw-r--r--sd/source/ui/inc/dlgfield.hxx11
-rw-r--r--sd/source/ui/inc/dlgsnap.hxx20
-rw-r--r--sd/source/ui/inc/framework/Pane.hxx3
-rw-r--r--sd/source/ui/inc/fupoor.hxx6
-rw-r--r--sd/source/ui/inc/headerfooterdlg.hxx12
-rw-r--r--sd/source/ui/inc/ins_paste.hxx6
-rw-r--r--sd/source/ui/inc/inspagob.hxx7
-rw-r--r--sd/source/ui/inc/layeroptionsdlg.hxx15
-rw-r--r--sd/source/ui/inc/masterlayoutdlg.hxx12
-rw-r--r--sd/source/ui/inc/morphdlg.hxx9
-rw-r--r--sd/source/ui/inc/navigatr.hxx4
-rw-r--r--sd/source/ui/inc/present.hxx48
-rw-r--r--sd/source/ui/inc/prntopts.hxx39
-rw-r--r--sd/source/ui/inc/pubdlg.hxx169
-rw-r--r--sd/source/ui/inc/sdpreslt.hxx11
-rw-r--r--sd/source/ui/inc/sdtreelb.hxx4
-rw-r--r--sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx2
-rw-r--r--sd/source/ui/inc/tpaction.hxx31
-rw-r--r--sd/source/ui/inc/tpoption.hxx62
-rw-r--r--sd/source/ui/inc/vectdlg.hxx21
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx14
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.hxx12
-rw-r--r--sd/source/ui/table/TableDesignPane.hxx4
-rw-r--r--sd/source/ui/view/FormShellManager.cxx4
-rw-r--r--sd/source/ui/view/sdruler.cxx1
-rw-r--r--sd/source/ui/view/sdview2.cxx2
-rw-r--r--sd/source/ui/view/sdwindow.cxx1
-rw-r--r--sd/source/ui/view/viewshe2.cxx2
-rw-r--r--sd/source/ui/view/viewshel.cxx2
-rw-r--r--sfx2/inc/srchdlg.hxx12
-rw-r--r--sfx2/source/appl/childwin.cxx18
-rw-r--r--sfx2/source/appl/fileobj.hxx2
-rw-r--r--sfx2/source/appl/helpinterceptor.hxx3
-rw-r--r--sfx2/source/appl/impldde.cxx24
-rw-r--r--sfx2/source/appl/lnkbase2.cxx4
-rw-r--r--sfx2/source/appl/newhelp.cxx79
-rw-r--r--sfx2/source/appl/newhelp.hxx58
-rw-r--r--sfx2/source/appl/workwin.cxx16
-rw-r--r--sfx2/source/control/thumbnailview.cxx2
-rw-r--r--sfx2/source/control/thumbnailviewacc.cxx2
-rw-r--r--sfx2/source/control/thumbnailviewacc.hxx5
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx5
-rw-r--r--sfx2/source/dialog/alienwarn.cxx2
-rw-r--r--sfx2/source/dialog/backingwindow.cxx27
-rw-r--r--sfx2/source/dialog/backingwindow.hxx58
-rw-r--r--sfx2/source/dialog/basedlgs.cxx13
-rw-r--r--sfx2/source/dialog/checkin.cxx13
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx102
-rw-r--r--sfx2/source/dialog/dockwin.cxx10
-rw-r--r--sfx2/source/dialog/documentfontsdialog.cxx11
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx2
-rw-r--r--sfx2/source/dialog/infobar.cxx31
-rw-r--r--sfx2/source/dialog/inputdlg.cxx14
-rw-r--r--sfx2/source/dialog/mgetempl.cxx12
-rw-r--r--sfx2/source/dialog/navigat.cxx2
-rw-r--r--sfx2/source/dialog/newstyle.cxx2
-rw-r--r--sfx2/source/dialog/partwnd.cxx8
-rw-r--r--sfx2/source/dialog/passwd.cxx22
-rw-r--r--sfx2/source/dialog/printopt.cxx30
-rw-r--r--sfx2/source/dialog/recfloat.cxx3
-rw-r--r--sfx2/source/dialog/securitypage.cxx8
-rw-r--r--sfx2/source/dialog/splitwin.cxx19
-rw-r--r--sfx2/source/dialog/srchdlg.cxx6
-rw-r--r--sfx2/source/dialog/tabdlg.cxx44
-rw-r--r--sfx2/source/dialog/templateinfodlg.cxx6
-rw-r--r--sfx2/source/dialog/templdlg.cxx9
-rw-r--r--sfx2/source/dialog/versdlg.cxx31
-rw-r--r--sfx2/source/doc/new.cxx22
-rw-r--r--sfx2/source/doc/templatedlg.cxx14
-rw-r--r--sfx2/source/inc/alienwarn.hxx4
-rw-r--r--sfx2/source/inc/documentfontsdialog.hxx4
-rw-r--r--sfx2/source/inc/inputdlg.hxx10
-rw-r--r--sfx2/source/inc/recfloat.hxx2
-rw-r--r--sfx2/source/inc/splitwin.hxx10
-rw-r--r--sfx2/source/inc/templdgi.hxx10
-rw-r--r--sfx2/source/inc/versdlg.hxx40
-rw-r--r--sfx2/source/inc/workwin.hxx12
-rw-r--r--sfx2/source/sidebar/FocusManager.cxx24
-rw-r--r--sfx2/source/sidebar/FocusManager.hxx10
-rw-r--r--sfx2/source/sidebar/PanelTitleBar.cxx19
-rw-r--r--sfx2/source/sidebar/PanelTitleBar.hxx4
-rw-r--r--sfx2/source/sidebar/SidebarChildWindow.cxx2
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx18
-rw-r--r--sfx2/source/sidebar/SidebarController.hxx4
-rw-r--r--sfx2/source/sidebar/SidebarPanelBase.cxx16
-rw-r--r--sfx2/source/statbar/stbitem.cxx2
-rw-r--r--sfx2/source/toolbox/imgmgr.cxx2
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx26
-rw-r--r--sfx2/source/view/frame.cxx2
-rw-r--r--sfx2/source/view/frame2.cxx2
-rw-r--r--sfx2/source/view/impframe.hxx14
-rw-r--r--sfx2/source/view/impviewframe.hxx4
-rw-r--r--sfx2/source/view/printer.cxx2
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx4
-rw-r--r--sfx2/source/view/viewprn.cxx4
-rw-r--r--starmath/inc/ElementsDockingWindow.hxx4
-rw-r--r--starmath/inc/dialog.hxx156
-rw-r--r--starmath/inc/edit.hxx6
-rw-r--r--starmath/inc/toolbox.hxx6
-rw-r--r--starmath/inc/view.hxx2
-rw-r--r--starmath/source/ElementsDockingWindow.cxx3
-rw-r--r--starmath/source/accessibility.hxx4
-rw-r--r--starmath/source/dialog.cxx141
-rw-r--r--starmath/source/edit.cxx10
-rw-r--r--starmath/source/toolbox.cxx8
-rw-r--r--starmath/source/view.cxx2
-rw-r--r--svtools/inc/vclxaccessibleheaderbar.hxx2
-rw-r--r--svtools/inc/vclxaccessibleheaderbaritem.hxx3
-rw-r--r--svtools/source/brwbox/brwbox1.cxx28
-rw-r--r--svtools/source/brwbox/brwbox2.cxx32
-rw-r--r--svtools/source/brwbox/brwhead.cxx12
-rw-r--r--svtools/source/brwbox/datwin.cxx12
-rw-r--r--svtools/source/brwbox/datwin.hxx10
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx2
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx6
-rw-r--r--svtools/source/contnr/fileview.cxx19
-rw-r--r--svtools/source/contnr/imivctl.hxx4
-rw-r--r--svtools/source/contnr/imivctl1.cxx4
-rw-r--r--svtools/source/contnr/simptabl.cxx11
-rw-r--r--svtools/source/contnr/svtabbx.cxx2
-rw-r--r--svtools/source/contnr/treelistbox.cxx2
-rw-r--r--svtools/source/control/calendar.cxx42
-rw-r--r--svtools/source/control/inettbc.cxx8
-rw-r--r--svtools/source/control/roadmap.cxx4
-rw-r--r--svtools/source/control/tabbar.cxx36
-rw-r--r--svtools/source/control/toolbarmenu.cxx12
-rw-r--r--svtools/source/control/toolbarmenuimp.hxx2
-rw-r--r--svtools/source/control/valueacc.cxx2
-rw-r--r--svtools/source/control/valueimp.hxx4
-rw-r--r--svtools/source/dialogs/PlaceEditDialog.cxx16
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx4
-rw-r--r--svtools/source/dialogs/colrdlg.cxx1
-rw-r--r--svtools/source/dialogs/prnsetup.cxx8
-rw-r--r--svtools/source/dialogs/restartdialog.cxx15
-rw-r--r--svtools/source/dialogs/roadmapwizard.cxx7
-rw-r--r--svtools/source/dialogs/wizardmachine.cxx10
-rw-r--r--svtools/source/dialogs/wizdlg.cxx8
-rw-r--r--svtools/source/filter/GraphicExportOptionsDialog.cxx13
-rw-r--r--svtools/source/filter/exportdialog.cxx33
-rw-r--r--svtools/source/filter/exportdialog.hxx66
-rw-r--r--svtools/source/hatchwindow/hatchwindow.cxx2
-rw-r--r--svtools/source/inc/hatchwindow.hxx2
-rw-r--r--svtools/source/inc/svimpbox.hxx4
-rw-r--r--svtools/source/misc/dialogcontrolling.cxx4
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx20
-rw-r--r--svtools/source/table/tablecontrol_impl.hxx6
-rw-r--r--svtools/source/toolpanel/paneltabbarpeer.cxx4
-rw-r--r--svtools/source/toolpanel/paneltabbarpeer.hxx2
-rw-r--r--svtools/source/toolpanel/toolpaneldeckpeer.cxx4
-rw-r--r--svtools/source/toolpanel/toolpaneldeckpeer.hxx2
-rw-r--r--svtools/source/uno/addrtempuno.cxx2
-rw-r--r--svtools/source/uno/generictoolboxcontroller.cxx6
-rw-r--r--svtools/source/uno/genericunodialog.cxx3
-rw-r--r--svtools/source/uno/popupwindowcontroller.cxx6
-rw-r--r--svtools/source/uno/treecontrolpeer.hxx2
-rw-r--r--svtools/source/uno/wizard/unowizard.cxx20
-rw-r--r--svtools/source/uno/wizard/wizardshell.hxx2
-rw-r--r--svx/inc/extrusiondepthdialog.hxx4
-rw-r--r--svx/inc/galbrws2.hxx6
-rw-r--r--svx/inc/svdibrow.hxx2
-rw-r--r--svx/inc/tbunosearchcontrollers.hxx4
-rw-r--r--svx/source/accessibility/AccessibleShapeTreeInfo.cxx1
-rw-r--r--svx/source/accessibility/GraphCtlAccessibleContext.cxx6
-rw-r--r--svx/source/dialog/_bmpmask.cxx33
-rw-r--r--svx/source/dialog/_contdlg.cxx21
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx25
-rw-r--r--svx/source/dialog/contimp.hxx8
-rw-r--r--svx/source/dialog/ctredlin.cxx52
-rw-r--r--svx/source/dialog/docrecovery.cxx47
-rw-r--r--svx/source/dialog/fontwork.cxx332
-rw-r--r--svx/source/dialog/hdft.cxx16
-rw-r--r--svx/source/dialog/imapdlg.cxx12
-rw-r--r--svx/source/dialog/linkwarn.cxx1
-rw-r--r--svx/source/dialog/optgrid.cxx27
-rw-r--r--svx/source/dialog/orienthelper.cxx2
-rw-r--r--svx/source/dialog/passwd.cxx15
-rw-r--r--svx/source/dialog/rubydialog.cxx33
-rw-r--r--svx/source/dialog/srchdlg.cxx44
-rw-r--r--svx/source/dialog/svxruler.cxx1
-rw-r--r--svx/source/fmcomp/gridcell.cxx321
-rw-r--r--svx/source/fmcomp/gridctrl.cxx6
-rw-r--r--svx/source/form/datanavi.cxx121
-rw-r--r--svx/source/form/filtnav.cxx4
-rw-r--r--svx/source/form/fmPropBrw.cxx3
-rw-r--r--svx/source/form/fmexpl.cxx4
-rw-r--r--svx/source/form/tabwin.cxx15
-rw-r--r--svx/source/form/xfm_addcondition.cxx2
-rw-r--r--svx/source/gallery2/galbrws1.cxx3
-rw-r--r--svx/source/gallery2/galbrws1.hxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx16
-rw-r--r--svx/source/inc/AccessibleFrameSelector.hxx3
-rw-r--r--svx/source/inc/GraphCtlAccessibleContext.hxx2
-rw-r--r--svx/source/inc/charmapacc.hxx2
-rw-r--r--svx/source/inc/datalistener.hxx3
-rw-r--r--svx/source/inc/datanavi.hxx134
-rw-r--r--svx/source/inc/docrecovery.hxx38
-rw-r--r--svx/source/inc/filtnav.hxx2
-rw-r--r--svx/source/inc/fmexch.hxx2
-rw-r--r--svx/source/inc/fmexpl.hxx2
-rw-r--r--svx/source/inc/fmvwimp.hxx3
-rw-r--r--svx/source/inc/gridcell.hxx12
-rw-r--r--svx/source/inc/svxrectctaccessiblecontext.hxx3
-rw-r--r--svx/source/inc/tabwin.hxx6
-rw-r--r--svx/source/inc/tbxform.hxx2
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.cxx17
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.hxx20
-rw-r--r--svx/source/sidebar/graphic/GraphicPropertyPanel.cxx17
-rw-r--r--svx/source/sidebar/graphic/GraphicPropertyPanel.hxx19
-rw-r--r--svx/source/sidebar/insert/InsertPropertyPanel.cxx6
-rw-r--r--svx/source/sidebar/insert/InsertPropertyPanel.hxx4
-rw-r--r--svx/source/sidebar/line/LinePropertyPanel.cxx23
-rw-r--r--svx/source/sidebar/line/LinePropertyPanel.hxx29
-rw-r--r--svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx29
-rw-r--r--svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx20
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.cxx20
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.hxx23
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx23
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.hxx31
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.cxx15
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.hxx13
-rw-r--r--svx/source/sidebar/tools/Popup.cxx6
-rw-r--r--svx/source/svdraw/sdrpaintwindow.cxx12
-rw-r--r--svx/source/svdraw/svdedxv.cxx22
-rw-r--r--svx/source/svdraw/svdibrow.cxx17
-rw-r--r--svx/source/svdraw/svdmrkv.cxx2
-rw-r--r--svx/source/svdraw/svdpntv.cxx20
-rw-r--r--svx/source/svdraw/svdview.cxx4
-rw-r--r--svx/source/tbxctrls/bulletsnumbering.cxx15
-rw-r--r--svx/source/tbxctrls/colorwindow.hxx14
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx33
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.hxx8
-rw-r--r--svx/source/tbxctrls/fillctrl.cxx4
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx22
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx23
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx16
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx5
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx6
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx31
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx40
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx3
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx3
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx7
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx12
-rw-r--r--svx/source/unodraw/recoveryui.cxx2
-rw-r--r--svx/source/unodraw/unoshtxt.cxx2
-rw-r--r--sw/inc/PostItMgr.hxx5
-rw-r--r--sw/inc/SidebarWin.hxx10
-rw-r--r--sw/inc/colwd.hxx6
-rw-r--r--sw/inc/hhcwrp.hxx2
-rw-r--r--sw/inc/postithelper.hxx2
-rw-r--r--sw/inc/viewsh.hxx2
-rw-r--r--sw/qa/tiledrendering/tiledrendering.cxx31
-rw-r--r--sw/source/core/access/accdoc.hxx2
-rw-r--r--sw/source/core/access/accfrmobj.cxx2
-rw-r--r--sw/source/core/access/accfrmobj.hxx3
-rw-r--r--sw/source/core/view/viewsh.cxx2
-rw-r--r--sw/source/ui/chrdlg/break.cxx21
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx10
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx22
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx20
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx10
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx127
-rw-r--r--sw/source/ui/config/optcomp.cxx4
-rw-r--r--sw/source/ui/config/optload.cxx42
-rw-r--r--sw/source/ui/config/optpage.cxx165
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx10
-rw-r--r--sw/source/ui/dbui/addresslistdialog.hxx18
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx62
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.hxx38
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx33
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.hxx20
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx33
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx2
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.hxx4
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx144
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx99
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx15
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hxx19
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx21
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx52
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx11
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hxx22
-rw-r--r--sw/source/ui/dbui/mmmergepage.cxx19
-rw-r--r--sw/source/ui/dbui/mmmergepage.hxx18
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx44
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hxx84
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx36
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.hxx12
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.cxx18
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hxx18
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx3
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.hxx4
-rw-r--r--sw/source/ui/dialog/abstract.cxx12
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx15
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx19
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx1
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx5
-rw-r--r--sw/source/ui/dialog/swmessdialog.cxx15
-rw-r--r--sw/source/ui/dialog/swuiexp.cxx25
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx74
-rw-r--r--sw/source/ui/dialog/wordcountdialog.cxx13
-rw-r--r--sw/source/ui/dochdl/selglos.cxx11
-rw-r--r--sw/source/ui/envelp/envfmt.cxx21
-rw-r--r--sw/source/ui/envelp/envfmt.hxx22
-rw-r--r--sw/source/ui/envelp/envlop1.cxx14
-rw-r--r--sw/source/ui/envelp/envprt.cxx17
-rw-r--r--sw/source/ui/envelp/envprt.hxx16
-rw-r--r--sw/source/ui/envelp/label1.cxx80
-rw-r--r--sw/source/ui/envelp/labfmt.cxx35
-rw-r--r--sw/source/ui/envelp/labfmt.hxx41
-rw-r--r--sw/source/ui/envelp/labprt.cxx9
-rw-r--r--sw/source/ui/envelp/labprt.hxx22
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx54
-rw-r--r--sw/source/ui/envelp/swuilabimp.hxx110
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx14
-rw-r--r--sw/source/ui/fldui/changedb.cxx5
-rw-r--r--sw/source/ui/fldui/flddb.cxx18
-rw-r--r--sw/source/ui/fldui/flddb.hxx25
-rw-r--r--sw/source/ui/fldui/flddinf.cxx12
-rw-r--r--sw/source/ui/fldui/flddinf.hxx13
-rw-r--r--sw/source/ui/fldui/flddok.cxx21
-rw-r--r--sw/source/ui/fldui/flddok.hxx29
-rw-r--r--sw/source/ui/fldui/fldedt.cxx3
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx31
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx51
-rw-r--r--sw/source/ui/fldui/fldref.cxx15
-rw-r--r--sw/source/ui/fldui/fldref.hxx19
-rw-r--r--sw/source/ui/fldui/fldvar.cxx22
-rw-r--r--sw/source/ui/fldui/fldvar.hxx33
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx14
-rw-r--r--sw/source/ui/fldui/javaedit.cxx10
-rw-r--r--sw/source/ui/frmdlg/column.cxx26
-rw-r--r--sw/source/ui/frmdlg/cption.cxx37
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx95
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx20
-rw-r--r--sw/source/ui/index/cnttab.cxx174
-rw-r--r--sw/source/ui/index/multmrk.cxx13
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx30
-rw-r--r--sw/source/ui/misc/bookmark.cxx9
-rw-r--r--sw/source/ui/misc/docfnote.cxx31
-rw-r--r--sw/source/ui/misc/glosbib.cxx12
-rw-r--r--sw/source/ui/misc/glossary.cxx41
-rw-r--r--sw/source/ui/misc/impfnote.hxx35
-rw-r--r--sw/source/ui/misc/insfnote.cxx10
-rw-r--r--sw/source/ui/misc/linenum.cxx22
-rw-r--r--sw/source/ui/misc/num.cxx28
-rw-r--r--sw/source/ui/misc/outline.cxx39
-rw-r--r--sw/source/ui/misc/pgfnote.cxx17
-rw-r--r--sw/source/ui/misc/pggrid.cxx29
-rw-r--r--sw/source/ui/misc/srtdlg.cxx30
-rw-r--r--sw/source/ui/misc/titlepage.cxx12
-rw-r--r--sw/source/ui/table/colwd.cxx12
-rw-r--r--sw/source/ui/table/convert.cxx14
-rw-r--r--sw/source/ui/table/instable.cxx11
-rw-r--r--sw/source/ui/table/mergetbl.cxx12
-rw-r--r--sw/source/ui/table/rowht.cxx12
-rw-r--r--sw/source/ui/table/splittbl.cxx14
-rw-r--r--sw/source/ui/table/tabledlg.cxx72
-rw-r--r--sw/source/ui/table/tautofmt.cxx23
-rw-r--r--sw/source/ui/utlui/swrenamexnameddlg.cxx12
-rw-r--r--sw/source/uibase/dbui/dbui.cxx33
-rw-r--r--sw/source/uibase/dbui/mailmergechildwindow.cxx13
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx2
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx7
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx11
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx17
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx7
-rw-r--r--sw/source/uibase/envelp/syncbtn.cxx13
-rw-r--r--sw/source/uibase/inc/DropDownFieldDialog.hxx10
-rw-r--r--sw/source/uibase/inc/FrameControl.hxx2
-rw-r--r--sw/source/uibase/inc/FrameControlsManager.hxx2
-rw-r--r--sw/source/uibase/inc/HeaderFooterWin.hxx4
-rw-r--r--sw/source/uibase/inc/PageBreakWin.hxx2
-rw-r--r--sw/source/uibase/inc/abstract.hxx8
-rw-r--r--sw/source/uibase/inc/ascfldlg.hxx17
-rw-r--r--sw/source/uibase/inc/bookmark.hxx7
-rw-r--r--sw/source/uibase/inc/break.hxx15
-rw-r--r--sw/source/uibase/inc/changedb.hxx10
-rw-r--r--sw/source/uibase/inc/chrdlg.hxx22
-rw-r--r--sw/source/uibase/inc/column.hxx56
-rw-r--r--sw/source/uibase/inc/conttree.hxx6
-rw-r--r--sw/source/uibase/inc/convert.hxx28
-rw-r--r--sw/source/uibase/inc/cption.hxx30
-rw-r--r--sw/source/uibase/inc/dbinsdlg.hxx50
-rw-r--r--sw/source/uibase/inc/dbui.hxx20
-rw-r--r--sw/source/uibase/inc/docstdlg.hxx23
-rw-r--r--sw/source/uibase/inc/drawbase.hxx2
-rw-r--r--sw/source/uibase/inc/drpcps.hxx33
-rw-r--r--sw/source/uibase/inc/envlop.hxx19
-rw-r--r--sw/source/uibase/inc/fldedt.hxx6
-rw-r--r--sw/source/uibase/inc/fldmgr.hxx3
-rw-r--r--sw/source/uibase/inc/frmpage.hxx163
-rw-r--r--sw/source/uibase/inc/glosbib.hxx13
-rw-r--r--sw/source/uibase/inc/glossary.hxx24
-rw-r--r--sw/source/uibase/inc/inpdlg.hxx10
-rw-r--r--sw/source/uibase/inc/inputwin.hxx4
-rw-r--r--sw/source/uibase/inc/insfnote.hxx20
-rw-r--r--sw/source/uibase/inc/instable.hxx22
-rw-r--r--sw/source/uibase/inc/javaedit.hxx20
-rw-r--r--sw/source/uibase/inc/label.hxx2
-rw-r--r--sw/source/uibase/inc/linenum.hxx31
-rw-r--r--sw/source/uibase/inc/mailconfigpage.hxx20
-rw-r--r--sw/source/uibase/inc/mailmergechildwindow.hxx4
-rw-r--r--sw/source/uibase/inc/mailmergehelper.hxx2
-rw-r--r--sw/source/uibase/inc/mailmrge.hxx89
-rw-r--r--sw/source/uibase/inc/mergetbl.hxx4
-rw-r--r--sw/source/uibase/inc/multmrk.hxx5
-rw-r--r--sw/source/uibase/inc/navipi.hxx4
-rw-r--r--sw/source/uibase/inc/num.hxx48
-rw-r--r--sw/source/uibase/inc/numpara.hxx29
-rw-r--r--sw/source/uibase/inc/optcomp.hxx8
-rw-r--r--sw/source/uibase/inc/optload.hxx74
-rw-r--r--sw/source/uibase/inc/optpage.hxx268
-rw-r--r--sw/source/uibase/inc/outline.hxx23
-rw-r--r--sw/source/uibase/inc/pgfnote.hxx25
-rw-r--r--sw/source/uibase/inc/pggrid.hxx46
-rw-r--r--sw/source/uibase/inc/prcntfld.hxx2
-rw-r--r--sw/source/uibase/inc/pview.hxx12
-rw-r--r--sw/source/uibase/inc/redlndlg.hxx6
-rw-r--r--sw/source/uibase/inc/regionsw.hxx128
-rw-r--r--sw/source/uibase/inc/rowht.hxx6
-rw-r--r--sw/source/uibase/inc/selglos.hxx5
-rw-r--r--sw/source/uibase/inc/shdwcrsr.hxx2
-rw-r--r--sw/source/uibase/inc/splittbl.hxx10
-rw-r--r--sw/source/uibase/inc/srcedtw.hxx6
-rw-r--r--sw/source/uibase/inc/srtdlg.hxx64
-rw-r--r--sw/source/uibase/inc/swmessdialog.hxx12
-rw-r--r--sw/source/uibase/inc/swrenamexnameddlg.hxx6
-rw-r--r--sw/source/uibase/inc/swruler.hxx3
-rw-r--r--sw/source/uibase/inc/swuiccoll.hxx18
-rw-r--r--sw/source/uibase/inc/swuicnttab.hxx214
-rw-r--r--sw/source/uibase/inc/swuiidxmrk.hxx90
-rw-r--r--sw/source/uibase/inc/syncbtn.hxx4
-rw-r--r--sw/source/uibase/inc/tautofmt.hxx26
-rw-r--r--sw/source/uibase/inc/titlepage.hxx24
-rw-r--r--sw/source/uibase/inc/view.hxx20
-rw-r--r--sw/source/uibase/inc/wordcountdialog.hxx26
-rw-r--r--sw/source/uibase/inc/workctrl.hxx4
-rw-r--r--sw/source/uibase/inc/wrap.hxx29
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx2
-rw-r--r--sw/source/uibase/misc/swruler.cxx7
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx2
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx3
-rw-r--r--sw/source/uibase/shells/txtattr.cxx1
-rw-r--r--sw/source/uibase/shells/txtcrsr.cxx1
-rw-r--r--sw/source/uibase/sidebar/PageColumnControl.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageColumnControl.hxx2
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.hxx2
-rw-r--r--sw/source/uibase/sidebar/PageOrientationControl.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageOrientationControl.hxx2
-rw-r--r--sw/source/uibase/sidebar/PagePropertyPanel.cxx4
-rw-r--r--sw/source/uibase/sidebar/PagePropertyPanel.hxx8
-rw-r--r--sw/source/uibase/sidebar/PageSizeControl.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageSizeControl.hxx2
-rw-r--r--sw/source/uibase/sidebar/WrapPropertyPanel.cxx12
-rw-r--r--sw/source/uibase/sidebar/WrapPropertyPanel.hxx15
-rw-r--r--sw/source/uibase/table/tablepg.hxx87
-rw-r--r--sw/source/uibase/uiview/pview.cxx37
-rw-r--r--sw/source/uibase/uiview/view.cxx14
-rw-r--r--sw/source/uibase/uiview/viewling.cxx6
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx16
-rw-r--r--sw/source/uibase/utlui/content.cxx1
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx1
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx23
-rw-r--r--sw/source/uibase/utlui/navipi.cxx5
-rw-r--r--tools/source/ref/errinf.cxx1
-rw-r--r--uui/source/authfallbackdlg.cxx15
-rw-r--r--uui/source/authfallbackdlg.hxx12
-rw-r--r--uui/source/fltdlg.cxx12
-rw-r--r--uui/source/fltdlg.hxx6
-rw-r--r--uui/source/logindlg.cxx25
-rw-r--r--uui/source/logindlg.hxx32
-rw-r--r--uui/source/masterpasscrtdlg.cxx13
-rw-r--r--uui/source/masterpasscrtdlg.hxx8
-rw-r--r--uui/source/masterpassworddlg.cxx12
-rw-r--r--uui/source/masterpassworddlg.hxx6
-rw-r--r--uui/source/nameclashdlg.cxx15
-rw-r--r--uui/source/nameclashdlg.hxx12
-rw-r--r--uui/source/passworddlg.cxx15
-rw-r--r--uui/source/passworddlg.hxx12
-rw-r--r--uui/source/secmacrowarnings.cxx15
-rw-r--r--uui/source/secmacrowarnings.hxx19
-rw-r--r--uui/source/unknownauthdlg.cxx14
-rw-r--r--uui/source/unknownauthdlg.hxx10
-rw-r--r--vcl/generic/print/genprnpsp.cxx16
-rw-r--r--vcl/generic/print/prtsetup.cxx42
-rw-r--r--vcl/generic/print/prtsetup.hxx44
-rw-r--r--vcl/inc/brdwin.hxx6
-rw-r--r--vcl/inc/dndevdis.hxx4
-rw-r--r--vcl/inc/ilstbox.hxx13
-rw-r--r--vcl/inc/printdlg.hxx109
-rw-r--r--vcl/inc/salframe.hxx9
-rw-r--r--vcl/inc/svdata.hxx41
-rw-r--r--vcl/inc/toolbox.h2
-rw-r--r--vcl/inc/unx/i18n_status.hxx3
-rw-r--r--vcl/inc/window.h58
-rw-r--r--vcl/source/app/salvtables.cxx9
-rw-r--r--vcl/source/app/svapp.cxx30
-rw-r--r--vcl/source/app/svdata.cxx2
-rw-r--r--vcl/source/app/vclevent.cxx9
-rw-r--r--vcl/source/control/button.cxx28
-rw-r--r--vcl/source/control/combobox.cxx8
-rw-r--r--vcl/source/control/ctrl.cxx4
-rw-r--r--vcl/source/control/fixed.cxx1
-rw-r--r--vcl/source/control/ilstbox.cxx18
-rw-r--r--vcl/source/control/lstbox.cxx16
-rw-r--r--vcl/source/control/tabctrl.cxx28
-rw-r--r--vcl/source/edit/textview.cxx2
-rw-r--r--vcl/source/edit/vclmedit.cxx23
-rw-r--r--vcl/source/gdi/print3.cxx6
-rw-r--r--vcl/source/window/accel.cxx1
-rw-r--r--vcl/source/window/accessibility.cxx5
-rw-r--r--vcl/source/window/brdwin.cxx2
-rw-r--r--vcl/source/window/btndlg.cxx22
-rw-r--r--vcl/source/window/builder.cxx27
-rw-r--r--vcl/source/window/clipping.cxx2
-rw-r--r--vcl/source/window/cursor.cxx4
-rw-r--r--vcl/source/window/dialog.cxx3
-rw-r--r--vcl/source/window/dlgctrl.cxx20
-rw-r--r--vcl/source/window/dndevdis.cxx6
-rw-r--r--vcl/source/window/dockmgr.cxx17
-rw-r--r--vcl/source/window/dockwin.cxx16
-rw-r--r--vcl/source/window/event.cxx23
-rw-r--r--vcl/source/window/floatwin.cxx6
-rw-r--r--vcl/source/window/introwin.cxx6
-rw-r--r--vcl/source/window/layout.cxx35
-rw-r--r--vcl/source/window/menu.cxx20
-rw-r--r--vcl/source/window/menubarwindow.cxx6
-rw-r--r--vcl/source/window/menufloatingwindow.cxx4
-rw-r--r--vcl/source/window/mouse.cxx22
-rw-r--r--vcl/source/window/msgbox.cxx23
-rw-r--r--vcl/source/window/paint.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx63
-rw-r--r--vcl/source/window/split.cxx1
-rw-r--r--vcl/source/window/splitwin.cxx6
-rw-r--r--vcl/source/window/stacking.cxx37
-rw-r--r--vcl/source/window/syswin.cxx1
-rw-r--r--vcl/source/window/tabdlg.cxx3
-rw-r--r--vcl/source/window/taskpanelist.cxx19
-rw-r--r--vcl/source/window/toolbox.cxx9
-rw-r--r--vcl/source/window/window.cxx43
-rw-r--r--vcl/source/window/window2.cxx34
-rw-r--r--vcl/source/window/winproc.cxx14
-rw-r--r--vcl/unx/generic/app/i18n_status.cxx4
-rw-r--r--vcl/unx/generic/printer/cupsmgr.cxx22
-rw-r--r--vcl/workben/icontest.cxx5
-rw-r--r--vcl/workben/mtfdemo.cxx2
-rw-r--r--vcl/workben/vcldemo.cxx19
-rw-r--r--xmlsecurity/inc/xmlsecurity/certificatechooser.hxx6
-rw-r--r--xmlsecurity/inc/xmlsecurity/certificateviewer.hxx39
-rw-r--r--xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx36
-rw-r--r--xmlsecurity/inc/xmlsecurity/macrosecurity.hxx40
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx4
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx45
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx17
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx39
1576 files changed, 20932 insertions, 10073 deletions
diff --git a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx
index 098c8e5d0d43..363a54450e52 100644
--- a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx
+++ b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx
@@ -35,6 +35,7 @@
#include <comphelper/broadcasthelper.hxx>
#include <comphelper/accessibletexthelper.hxx>
#include <tools/gen.hxx>
+#include <vcl/vclptr.hxx>
// forward
@@ -63,7 +64,7 @@ namespace accessibility
{
private:
/** The treelistbox control */
- SvtIconChoiceCtrl* m_pIconCtrl;
+ VclPtr<SvtIconChoiceCtrl> m_pIconCtrl;
sal_Int32 m_nIndex;
protected:
diff --git a/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx b/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx
index 81401f177564..ed920c89399d 100644
--- a/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx
+++ b/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx
@@ -22,6 +22,7 @@
#include <comphelper/accessiblecomponenthelper.hxx>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
class TabBar;
class VCLExternalSolarLock;
@@ -57,7 +58,7 @@ private:
protected:
VCLExternalSolarLock* m_pExternalLock;
- TabBar* m_pTabBar;
+ VclPtr<TabBar> m_pTabBar;
};
diff --git a/accessibility/inc/accessibility/extended/accessibletablistbox.hxx b/accessibility/inc/accessibility/extended/accessibletablistbox.hxx
index e5e16809b038..f6e1d416bf30 100644
--- a/accessibility/inc/accessibility/extended/accessibletablistbox.hxx
+++ b/accessibility/inc/accessibility/extended/accessibletablistbox.hxx
@@ -43,7 +43,7 @@ class AccessibleTabListBox
,public ::svt::IAccessibleTabListBox
{
private:
- SvHeaderTabListBox* m_pTabListBox;
+ VclPtr<SvHeaderTabListBox> m_pTabListBox;
public:
/** ctor()
diff --git a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx
index 92e6fe996706..89bfd7ef437c 100644
--- a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx
+++ b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx
@@ -37,7 +37,7 @@ typedef ::cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleSelecti
class AccessibleTabListBoxTable : public AccessibleBrowseBoxTable, public AccessibleTabListBoxTableImplHelper
{
private:
- SvHeaderTabListBox* m_pTabListBox;
+ VclPtr<SvHeaderTabListBox> m_pTabListBox;
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xCurChild;
diff --git a/accessibility/inc/accessibility/extended/listboxaccessible.hxx b/accessibility/inc/accessibility/extended/listboxaccessible.hxx
index fc3bb245b2c4..4ce38c5090b6 100644
--- a/accessibility/inc/accessibility/extended/listboxaccessible.hxx
+++ b/accessibility/inc/accessibility/extended/listboxaccessible.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/uno/RuntimeException.hpp>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
class SvTreeListBox;
class VclSimpleEvent;
@@ -41,7 +42,7 @@ namespace accessibility
class ListBoxAccessibleBase
{
private:
- SvTreeListBox* m_pWindow;
+ VclPtr<SvTreeListBox> m_pWindow;
protected:
inline SvTreeListBox* getListBox() const
@@ -49,7 +50,7 @@ namespace accessibility
return const_cast< ListBoxAccessibleBase* >( this )->m_pWindow;
}
- inline bool isAlive() const { return NULL != m_pWindow; }
+ inline bool isAlive() const { return nullptr != m_pWindow; }
public:
ListBoxAccessibleBase( SvTreeListBox& _rWindow );
diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
index a24e8c94af77..2846113057a2 100644
--- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
+++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
@@ -99,7 +99,7 @@ public:
private:
::Link m_aListener;
- vcl::Window * m_pNotifier;
+ VclPtr<vcl::Window> m_pNotifier;
};
class ParagraphInfo
diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx
index 2ca6def7ba42..b6dc89864fec 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENUBAR_HXX
#include <accessibility/standard/accessiblemenucomponent.hxx>
+#include <vcl/vclptr.hxx>
class VclSimpleEvent;
class VclWindowEvent;
@@ -34,7 +35,7 @@ namespace vcl { class Window; }
class VCLXAccessibleMenuBar : public OAccessibleMenuComponent
{
protected:
- vcl::Window* m_pWindow;
+ VclPtr<vcl::Window> m_pWindow;
virtual bool IsFocused() SAL_OVERRIDE;
diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx
index a07e4502c111..249f5cafa6ec 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLESTATUSBAR_HXX
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <vcl/vclptr.hxx>
#include <vector>
@@ -36,7 +37,7 @@ private:
typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren;
AccessibleChildren m_aAccessibleChildren;
- StatusBar* m_pStatusBar;
+ VclPtr<StatusBar> m_pStatusBar;
protected:
void UpdateShowing( sal_Int32 i, bool bShowing );
diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx
index f720374f3af5..0432abc9db7a 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx
@@ -24,7 +24,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <comphelper/accessibletexthelper.hxx>
#include <cppuhelper/implbase2.hxx>
-
+#include <vcl/vclptr.hxx>
class StatusBar;
class VCLExternalSolarLock;
@@ -51,14 +51,14 @@ class VCLXAccessibleStatusBarItem : public AccessibleTextHelper_BASE,
private:
VCLExternalSolarLock* m_pExternalLock;
- StatusBar* m_pStatusBar;
+ VclPtr<StatusBar> m_pStatusBar;
sal_uInt16 m_nItemId;
OUString m_sItemName;
OUString m_sItemText;
- bool m_bShowing;
+ bool m_bShowing;
protected:
- bool IsShowing();
+ bool IsShowing();
void SetShowing( bool bShowing );
void SetItemName( const OUString& sItemName );
OUString GetItemName();
diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx
index b4e7b54fd197..358213855df2 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx
@@ -22,6 +22,7 @@
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <vcl/vclptr.hxx>
#include <vector>
@@ -42,7 +43,7 @@ private:
typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren;
AccessibleChildren m_aAccessibleChildren;
- TabControl* m_pTabControl;
+ VclPtr<TabControl> m_pTabControl;
protected:
void UpdateFocused();
diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx
index 182235a0ad12..8c0aa5dcac5b 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <comphelper/accessibletexthelper.hxx>
#include <cppuhelper/implbase2.hxx>
+#include <vcl/vclptr.hxx>
class TabControl;
@@ -51,7 +52,7 @@ class VCLXAccessibleTabPage : public AccessibleTextHelper_BASE,
private:
VCLExternalSolarLock* m_pExternalLock;
- TabControl* m_pTabControl;
+ VclPtr<TabControl> m_pTabControl;
sal_uInt16 m_nPageId;
bool m_bFocused;
bool m_bSelected;
diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx
index 0fb8f614bd0c..9393579b6883 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABPAGEWINDOW_HXX
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <vcl/vclptr.hxx>
class TabControl;
@@ -34,8 +35,8 @@ class TabPage;
class VCLXAccessibleTabPageWindow : public VCLXAccessibleComponent
{
private:
- TabControl* m_pTabControl;
- TabPage* m_pTabPage;
+ VclPtr<TabControl> m_pTabControl;
+ VclPtr<TabPage> m_pTabPage;
sal_uInt16 m_nPageId;
protected:
diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx
index b7d3c15fd3f8..a05f31b89d1f 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx
@@ -30,6 +30,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase4.hxx>
#include <comphelper/accessibletexthelper.hxx>
+#include <vcl/vclptr.hxx>
class ToolBox;
@@ -46,13 +47,13 @@ class VCLXAccessibleToolBoxItem : public AccessibleTextHelper_BASE,
{
private:
OUString m_sOldName;
- ToolBox* m_pToolBox;
+ VclPtr<ToolBox> m_pToolBox;
VCLExternalSolarLock* m_pExternalLock;
sal_Int32 m_nIndexInParent;
sal_Int16 m_nRole;
- sal_uInt16 m_nItemId;
- bool m_bHasFocus;
- bool m_bIsChecked;
+ sal_uInt16 m_nItemId;
+ bool m_bHasFocus;
+ bool m_bIsChecked;
bool m_bIndeterminate;
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xChild;
@@ -80,9 +81,9 @@ public:
VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_Int32 _nPos );
void SetFocus( bool _bFocus );
- inline bool HasFocus() const { return m_bHasFocus; }
+ inline bool HasFocus() const { return m_bHasFocus; }
void SetChecked( bool _bCheck );
- inline bool IsChecked() const { return m_bIsChecked; }
+ inline bool IsChecked() const { return m_bIsChecked; }
void SetIndeterminate( bool _bIndeterminate );
inline bool IsIndeterminate() const { return m_bIndeterminate; }
inline void ReleaseToolBox() { m_pToolBox = NULL; }
diff --git a/accessibility/source/extended/AccessibleToolPanelDeck.cxx b/accessibility/source/extended/AccessibleToolPanelDeck.cxx
index dfb8ede26120..4f69764bcf29 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeck.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeck.cxx
@@ -76,7 +76,7 @@ namespace accessibility
);
void checkDisposed();
- bool isDisposed() const { return m_pPanelDeck == NULL; }
+ bool isDisposed() const { return m_pPanelDeck == nullptr; }
void dispose();
virtual ~AccessibleToolPanelDeck_Impl();
@@ -95,7 +95,7 @@ namespace accessibility
public:
AccessibleToolPanelDeck& m_rAntiImpl;
Reference< XAccessible > m_xAccessibleParent;
- ::svt::ToolPanelDeck* m_pPanelDeck;
+ VclPtr<::svt::ToolPanelDeck> m_pPanelDeck;
Reference< XAccessible > m_xActivePanelAccessible;
};
@@ -141,7 +141,7 @@ namespace accessibility
{
ENSURE_OR_RETURN_VOID( !isDisposed(), "disposed twice" );
m_pPanelDeck->RemoveListener( *this );
- m_pPanelDeck = NULL;
+ m_pPanelDeck.clear();
m_xAccessibleParent.clear();
}
diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
index 757c45257c6e..1700aed946b1 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
@@ -120,7 +120,7 @@ namespace accessibility
AccessibleToolPanelTabBar& m_rAntiImpl;
Reference< XAccessible > m_xAccessibleParent;
::svt::IToolPanelDeck* m_pPanelDeck;
- ::svt::PanelTabBar* m_pTabBar;
+ VclPtr<::svt::PanelTabBar> m_pTabBar;
::std::vector< Reference< XAccessible > > m_aChildren;
};
@@ -163,7 +163,7 @@ namespace accessibility
m_pTabBar->GetScrollButton( true ).RemoveEventListener( LINK( this, AccessibleToolPanelTabBar_Impl, OnWindowEvent ) );
m_pTabBar->GetScrollButton( false ).RemoveEventListener( LINK( this, AccessibleToolPanelTabBar_Impl, OnWindowEvent ) );
- m_pTabBar = NULL;
+ m_pTabBar.clear();
m_xAccessibleParent.clear();
}
diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
index 33bca93ae759..f89cb3d7f807 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
@@ -105,7 +105,7 @@ namespace accessibility
AccessibleToolPanelDeckTabBarItem& m_rAntiImpl;
Reference< XAccessible > m_xAccessibleParent;
::svt::IToolPanelDeck* m_pPanelDeck;
- ::svt::PanelTabBar* m_pTabBar;
+ VclPtr<::svt::PanelTabBar> m_pTabBar;
size_t m_nItemPos;
};
@@ -139,7 +139,7 @@ namespace accessibility
m_xAccessibleParent.clear();
m_pPanelDeck->RemoveListener( *this );
m_pPanelDeck = NULL;
- m_pTabBar = NULL;
+ m_pTabBar.clear();
}
Reference< XAccessibleComponent > AccessibleToolPanelDeckTabBarItem_Impl::getParentAccessibleComponent() const
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index a24d05bc9135..794524017735 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -91,7 +91,7 @@ throw(RuntimeException, std::exception)
if ( _rSource.Source == m_xParent )
{
dispose();
- OSL_ENSURE( !m_xParent.is() && ( NULL == m_pIconCtrl ), "" );
+ OSL_ENSURE( !m_xParent.is() && ( nullptr == m_pIconCtrl ), "" );
}
}
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 2dd16ace0380..fbe72a0e9d07 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -47,17 +47,17 @@ void SfxListenerGuard::endListening()
void WindowListenerGuard::startListening(vcl::Window & rNotifier)
{
- OSL_ENSURE(m_pNotifier == 0, "called more than once");
+ OSL_ENSURE(m_pNotifier == nullptr, "called more than once");
m_pNotifier = &rNotifier;
m_pNotifier->AddEventListener(m_aListener);
}
void WindowListenerGuard::endListening()
{
- if (m_pNotifier != 0)
+ if (m_pNotifier)
{
m_pNotifier->RemoveEventListener(m_aListener);
- m_pNotifier = 0;
+ m_pNotifier = nullptr;
}
}
diff --git a/accessibility/source/standard/vclxaccessibleradiobutton.cxx b/accessibility/source/standard/vclxaccessibleradiobutton.cxx
index baabdd5555f1..c76babf32697 100644
--- a/accessibility/source/standard/vclxaccessibleradiobutton.cxx
+++ b/accessibility/source/standard/vclxaccessibleradiobutton.cxx
@@ -93,13 +93,13 @@ void VCLXAccessibleRadioButton::FillAccessibleRelationSet( utl::AccessibleRelati
RadioButton* pRadioButton = dynamic_cast< RadioButton* >( GetWindow() );
if ( pRadioButton )
{
- ::std::vector< RadioButton* > aGroup(pRadioButton->GetRadioButtonGroup(true));
+ ::std::vector< VclPtr<RadioButton> > aGroup(pRadioButton->GetRadioButtonGroup(true));
if (!aGroup.empty())
{
sal_Int32 i = 0;
Sequence< Reference< XInterface > > aSequence( static_cast< sal_Int32 >( aGroup.size() ) );
- ::std::vector< RadioButton* >::const_iterator aEndItr = aGroup.end();
- for ( ::std::vector< RadioButton* >::const_iterator aItr = aGroup.begin(); aItr < aEndItr; ++aItr )
+ auto aEndItr = aGroup.end();
+ for ( auto aItr = aGroup.begin(); aItr < aEndItr; ++aItr )
{
aSequence[i++] = (*aItr)->GetAccessible();
}
diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
index 6b43aa3d4b2c..d8d47320f9c9 100644
--- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
@@ -50,7 +50,7 @@ VCLXAccessibleTabPageWindow::VCLXAccessibleTabPageWindow( VCLXWindow* pVCLXWindo
for ( sal_uInt16 i = 0, nCount = m_pTabControl->GetPageCount(); i < nCount; ++i )
{
sal_uInt16 nPageId = m_pTabControl->GetPageId( i );
- if ( m_pTabControl->GetTabPage( nPageId ) == m_pTabPage )
+ if ( m_pTabControl->GetTabPage( nPageId ) == m_pTabPage.get() )
m_nPageId = nPageId;
}
}
diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx
index 9a1933b7e0a8..b24e1a590ee7 100644
--- a/avmedia/inc/mediacontrol.hxx
+++ b/avmedia/inc/mediacontrol.hxx
@@ -95,7 +95,7 @@ private:
VclPtr<ToolBox> maMuteToolBox;
VclPtr<Slider> maVolumeSlider;
VclPtr<ToolBox> maZoomToolBox;
- ListBox* mpZoomListBox;
+ VclPtr<ListBox> mpZoomListBox;
VclPtr<Edit> maTimeEdit;
Size maMinSize;
MediaControlStyle meControlStyle;
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index 617bbc340e08..24defd8d3141 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -202,8 +202,7 @@ MediaControl::~MediaControl()
void MediaControl::dispose()
{
maZoomToolBox->SetItemWindow( AVMEDIA_TOOLBOXITEM_ZOOM, NULL );
- delete mpZoomListBox;
- mpZoomListBox = NULL;
+ mpZoomListBox.clear();
maTimeEdit.disposeAndClear();
maZoomToolBox.disposeAndClear();
maVolumeSlider.disposeAndClear();
diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx
index f9dee9a3bf16..deccd8f17ea4 100644
--- a/avmedia/source/framework/mediaplayer.cxx
+++ b/avmedia/source/framework/mediaplayer.cxx
@@ -42,7 +42,7 @@ MediaPlayer::MediaPlayer( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* _p
{
pWindow = new MediaFloater( _pBindings, this, _pParent );
eChildAlignment = SfxChildAlignment::NOALIGNMENT;
- static_cast< MediaFloater* >( pWindow )->Initialize( pInfo );
+ static_cast< MediaFloater* >( pWindow.get() )->Initialize( pInfo );
};
diff --git a/avmedia/source/viewer/mediaevent_impl.cxx b/avmedia/source/viewer/mediaevent_impl.cxx
index 86e18175101c..3e42ebb223b4 100644
--- a/avmedia/source/viewer/mediaevent_impl.cxx
+++ b/avmedia/source/viewer/mediaevent_impl.cxx
@@ -45,7 +45,7 @@ MediaEventListenersImpl::~MediaEventListenersImpl()
void MediaEventListenersImpl::cleanUp()
{
- Application::RemoveMouseAndKeyEvents( reinterpret_cast< vcl::Window* >( mpNotifyWindow ) );
+ Application::RemoveMouseAndKeyEvents( reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ) );
mpNotifyWindow = NULL;
}
@@ -72,7 +72,7 @@ void SAL_CALL MediaEventListenersImpl::keyPressed( const ::com::sun::star::awt::
( ( e.Modifiers & 4 ) ? KEY_MOD2 : 0 ) );
KeyEvent aVCLKeyEvt( e.KeyChar, aVCLKeyCode );
- Application::PostKeyEvent( VCLEVENT_WINDOW_KEYINPUT, reinterpret_cast< vcl::Window* >( mpNotifyWindow ), &aVCLKeyEvt );
+ Application::PostKeyEvent( VCLEVENT_WINDOW_KEYINPUT, reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ), &aVCLKeyEvt );
}
}
@@ -91,7 +91,7 @@ void SAL_CALL MediaEventListenersImpl::keyReleased( const ::com::sun::star::awt:
( ( e.Modifiers & 2 ) ? KEY_MOD1 : 0 ) |
( ( e.Modifiers & 4 ) ? KEY_MOD2 : 0 ) );
KeyEvent aVCLKeyEvt( e.KeyChar, aVCLKeyCode );
- Application::PostKeyEvent( VCLEVENT_WINDOW_KEYUP, reinterpret_cast< vcl::Window* >( mpNotifyWindow ), &aVCLKeyEvt );
+ Application::PostKeyEvent( VCLEVENT_WINDOW_KEYUP, reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ), &aVCLKeyEvt );
}
}
@@ -112,7 +112,7 @@ void SAL_CALL MediaEventListenersImpl::mousePressed( const ::com::sun::star::awt
( ( e.Buttons & 2 ) ? MOUSE_RIGHT : 0 ) |
( ( e.Buttons & 4 ) ? MOUSE_MIDDLE : 0 ),
e.Modifiers );
- Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, reinterpret_cast< vcl::Window* >( mpNotifyWindow ), &aVCLMouseEvt );
+ Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ), &aVCLMouseEvt );
}
}
@@ -133,7 +133,7 @@ void SAL_CALL MediaEventListenersImpl::mouseReleased( const ::com::sun::star::aw
( ( e.Buttons & 2 ) ? MOUSE_RIGHT : 0 ) |
( ( e.Buttons & 4 ) ? MOUSE_MIDDLE : 0 ),
e.Modifiers );
- Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONUP, reinterpret_cast< vcl::Window* >( mpNotifyWindow ), &aVCLMouseEvt );
+ Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONUP, reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ), &aVCLMouseEvt );
}
}
@@ -174,7 +174,7 @@ void SAL_CALL MediaEventListenersImpl::mouseDragged( const ::com::sun::star::awt
if( mpNotifyWindow )
{
MouseEvent aVCLMouseEvt( Point( e.X, e.Y ), 0, MouseEventModifiers::NONE, e.Buttons, e.Modifiers );
- Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEMOVE, reinterpret_cast< vcl::Window* >( mpNotifyWindow ), &aVCLMouseEvt );
+ Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEMOVE, reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ), &aVCLMouseEvt );
}
}
@@ -189,7 +189,7 @@ void SAL_CALL MediaEventListenersImpl::mouseMoved( const ::com::sun::star::awt::
if( mpNotifyWindow )
{
MouseEvent aVCLMouseEvt( Point( e.X, e.Y ), 0, MouseEventModifiers::NONE, e.Buttons, e.Modifiers );
- Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEMOVE, reinterpret_cast< vcl::Window* >( mpNotifyWindow ), &aVCLMouseEvt );
+ Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEMOVE, reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ), &aVCLMouseEvt );
}
}
diff --git a/avmedia/source/viewer/mediaevent_impl.hxx b/avmedia/source/viewer/mediaevent_impl.hxx
index 63e1a0d77ba2..27676c749d84 100644
--- a/avmedia/source/viewer/mediaevent_impl.hxx
+++ b/avmedia/source/viewer/mediaevent_impl.hxx
@@ -26,6 +26,7 @@
#include <com/sun/star/awt/XMouseListener.hpp>
#include <com/sun/star/awt/XMouseMotionListener.hpp>
#include <com/sun/star/awt/XFocusListener.hpp>
+#include <vcl/vclptr.hxx>
namespace avmedia
{
@@ -69,7 +70,7 @@ namespace avmedia
private:
- vcl::Window* mpNotifyWindow;
+ VclPtr<vcl::Window> mpNotifyWindow;
mutable ::osl::Mutex maMutex;
};
}
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index b2716eebf5cc..c43f6829955d 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -204,8 +204,7 @@ void MediaWindowImpl::dispose()
mpEmptyBmpEx = NULL;
delete mpAudioBmpEx;
mpAudioBmpEx = NULL;
- delete mpMediaWindowControl;
- mpMediaWindowControl = NULL;
+ mpMediaWindowControl.clear();
Control::dispose();
}
diff --git a/avmedia/source/viewer/mediawindow_impl.hxx b/avmedia/source/viewer/mediawindow_impl.hxx
index 1311a2b4855f..40131c3c6fe2 100644
--- a/avmedia/source/viewer/mediawindow_impl.hxx
+++ b/avmedia/source/viewer/mediawindow_impl.hxx
@@ -173,7 +173,7 @@ namespace avmedia
MediaEventListenersImpl* mpEvents;
bool mbEventTransparent;
std::unique_ptr<MediaChildWindow> mpChildWindow;
- MediaWindowControl* mpMediaWindowControl;
+ VclPtr<MediaWindowControl> mpMediaWindowControl;
BitmapEx* mpEmptyBmpEx;
BitmapEx* mpAudioBmpEx;
};
diff --git a/basctl/source/basicide/basicrenderable.hxx b/basctl/source/basicide/basicrenderable.hxx
index f91a5ef8a9d3..db96dfc66ea5 100644
--- a/basctl/source/basicide/basicrenderable.hxx
+++ b/basctl/source/basicide/basicrenderable.hxx
@@ -33,7 +33,7 @@ class Renderable :
public cppu::WeakComponentImplHelper1< com::sun::star::view::XRenderable >,
public vcl::PrinterOptionsHelper
{
- BaseWindow* mpWindow;
+ VclPtr<BaseWindow> mpWindow;
osl::Mutex maMutex;
Printer* getPrinter();
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 9b4837673dbe..33ddae459da9 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1484,6 +1484,7 @@ void ModulWindowLayout::dispose()
{
aWatchWindow.disposeAndClear();
aStackWindow.disposeAndClear();
+ pChild.clear();
Layout::dispose();
}
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 48874b01c69b..addef49f60a9 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -445,7 +445,7 @@ protected:
private:
// main child window
- ModulWindow* pChild;
+ VclPtr<ModulWindow> pChild;
// dockable windows
VclPtr<WatchWindow> aWatchWindow;
VclPtr<StackWindow> aStackWindow;
@@ -475,7 +475,7 @@ private:
// the configuration
svtools::ColorConfig aConfig;
// the active editor
- EditorWindow* pEditor;
+ VclPtr<EditorWindow> pEditor;
} aSyntaxColors;
};
@@ -489,7 +489,7 @@ private:
/* a buffer to build up function name when typing
* a function name, used for showing/hiding listbox values
* */
- CodeCompleteWindow* pCodeCompleteWindow; // parent window
+ VclPtr<CodeCompleteWindow> pCodeCompleteWindow; // parent window
void SetMatchingEntries(); // sets the visible entries based on aFuncBuffer variable
void HideAndRestoreFocus();
@@ -497,6 +497,8 @@ private:
public:
CodeCompleteListBox( CodeCompleteWindow* pPar );
+ virtual ~CodeCompleteListBox();
+ virtual void dispose() SAL_OVERRIDE;
void InsertSelectedEntry(); //insert the selected entry
DECL_LINK(ImplDoubleClickHdl, void*);
@@ -510,9 +512,9 @@ class CodeCompleteWindow: public vcl::Window
{
friend class CodeCompleteListBox;
private:
- EditorWindow* pParent; // parent window
+ VclPtr<EditorWindow> pParent; // parent window
TextSelection aTextSelection;
- CodeCompleteListBox* pListBox;
+ VclPtr<CodeCompleteListBox> pListBox;
void InitListBox(); // initialize the ListBox
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 4afce39c3dfc..f405491cce56 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2685,6 +2685,17 @@ pCodeCompleteWindow( pPar )
SetSelectHdl(LINK(this, CodeCompleteListBox, ImplSelectHdl));
}
+CodeCompleteListBox::~CodeCompleteListBox()
+{
+ dispose();
+}
+
+void CodeCompleteListBox::dispose()
+{
+ pCodeCompleteWindow.clear();
+ ListBox::dispose();
+}
+
IMPL_LINK_NOARG(CodeCompleteListBox, ImplDoubleClickHdl)
{
InsertSelectedEntry();
@@ -2863,8 +2874,8 @@ CodeCompleteWindow::~CodeCompleteWindow()
void CodeCompleteWindow::dispose()
{
- delete pListBox;
- pListBox = NULL;
+ pListBox.clear();
+ pParent.clear();
vcl::Window::dispose();
}
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index a85d0e0fd67f..4c08dcbb770e 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -1413,12 +1413,12 @@ DialogWindowLayout::~DialogWindowLayout()
void DialogWindowLayout::dispose()
{
- if (pPropertyBrowser != 0)
+ if (pPropertyBrowser)
{
Remove(pPropertyBrowser);
- delete pPropertyBrowser;
- pPropertyBrowser = 0;
}
+ pPropertyBrowser.clear();
+ pChild.clear();
Layout::dispose();
}
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index c6374bf8e43d..c9aaa23447c7 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -126,7 +126,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq )
break;
if (it != aWindowTable.end())
++it;
- BaseWindow* pWin = it != aWindowTable.end() ? it->second : 0;
+ BaseWindow* pWin = it != aWindowTable.end() ? it->second.get() : 0;
bool bSearchedFromStart = false;
while ( !nFound && !bCanceled && ( pWin || !bSearchedFromStart ) )
@@ -166,7 +166,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq )
{
if ( it != aWindowTable.end() )
++it;
- pWin = it != aWindowTable.end() ? it->second : 0;
+ pWin = it != aWindowTable.end() ? it->second.get() : 0;
}
else
pWin = 0;
@@ -202,7 +202,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICSTOP:
{
// maybe do not simply stop if on breakpoint!
- if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin))
+ if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin.get()))
pMCurWin->BasicStop();
StopBasic();
}
@@ -769,7 +769,7 @@ void Shell::GetState(SfxItemSet &rSet)
case SID_BASICSAVEAS:
case SID_BASICIDE_MATCHGROUP:
{
- if (!dynamic_cast<ModulWindow*>(pCurWin))
+ if (!dynamic_cast<ModulWindow*>(pCurWin.get()))
rSet.DisableItem( nWh );
else if ( ( nWh == SID_BASICLOAD ) && ( StarBASIC::IsRunning() || ( pCurWin && pCurWin->IsReadOnly() ) ) )
rSet.DisableItem( nWh );
@@ -782,7 +782,7 @@ void Shell::GetState(SfxItemSet &rSet)
case SID_BASICIDE_TOGGLEBRKPNT:
case SID_BASICIDE_MANAGEBRKPNTS:
{
- if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin))
+ if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin.get()))
{
if (StarBASIC::IsRunning() && !pMCurWin->GetBasicStatus().bIsInReschedule)
rSet.DisableItem(nWh);
@@ -793,7 +793,7 @@ void Shell::GetState(SfxItemSet &rSet)
break;
case SID_BASICCOMPILE:
{
- if (StarBASIC::IsRunning() || !dynamic_cast<ModulWindow*>(pCurWin))
+ if (StarBASIC::IsRunning() || !dynamic_cast<ModulWindow*>(pCurWin.get()))
rSet.DisableItem( nWh );
}
break;
@@ -814,7 +814,7 @@ void Shell::GetState(SfxItemSet &rSet)
case SID_INSERT_FORM_HSCROLL:
case SID_INSERT_FORM_SPIN:
{
- if (!dynamic_cast<DialogWindow*>(pCurWin))
+ if (!dynamic_cast<DialogWindow*>(pCurWin.get()))
rSet.DisableItem( nWh );
}
break;
@@ -945,7 +945,7 @@ void Shell::GetState(SfxItemSet &rSet)
// if this is not a module window hide the
// setting, doesn't make sense for example if the
// dialog editor is open
- if (pCurWin && !dynamic_cast<ModulWindow*>(pCurWin))
+ if (pCurWin && !dynamic_cast<ModulWindow*>(pCurWin.get()))
{
rSet.DisableItem( nWh );
rSet.Put(SfxVisibilityItem(nWh, false));
@@ -968,7 +968,7 @@ bool Shell::HasUIFeature( sal_uInt32 nFeature )
if ( (nFeature & BASICIDE_UI_FEATURE_SHOW_BROWSER) == BASICIDE_UI_FEATURE_SHOW_BROWSER )
{
// fade out (in) property browser in module (dialog) windows
- if (dynamic_cast<DialogWindow*>(pCurWin) && !pCurWin->IsReadOnly())
+ if (dynamic_cast<DialogWindow*>(pCurWin.get()) && !pCurWin->IsReadOnly())
bResult = true;
}
@@ -1035,7 +1035,7 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe
aObjectCatalog->SetCurrentEntry(pCurWin);
SetUndoManager( pCurWin ? pCurWin->GetUndoManager() : 0 );
InvalidateBasicIDESlots();
- EnableScrollbars(pCurWin != 0);
+ EnableScrollbars(pCurWin != nullptr);
if ( m_pCurLocalizationMgr )
m_pCurLocalizationMgr->handleTranslationbar();
@@ -1067,7 +1067,7 @@ void Shell::ManageToolbars()
if ( xLayoutManager.is() )
{
xLayoutManager->lock();
- if (dynamic_cast<DialogWindow*>(pCurWin))
+ if (dynamic_cast<DialogWindow*>(pCurWin.get()))
{
xLayoutManager->destroyElement( aMacroBarResName );
@@ -1213,7 +1213,7 @@ void Shell::AdjustPosSizePixel( const Point &rPos, const Size &rSize )
}
if (pLayout)
- pLayout->SetPosSizePixel(rPos, dynamic_cast<DialogWindow*>(pCurWin) ? aSz : aOutSz);
+ pLayout->SetPosSizePixel(rPos, dynamic_cast<DialogWindow*>(pCurWin.get()) ? aSz : aOutSz);
}
Reference< XModel > Shell::GetCurrentDocument() const
@@ -1230,7 +1230,7 @@ void Shell::Activate( bool bMDI )
if ( bMDI )
{
- if (DialogWindow* pDCurWin = dynamic_cast<DialogWindow*>(pCurWin))
+ if (DialogWindow* pDCurWin = dynamic_cast<DialogWindow*>(pCurWin.get()))
pDCurWin->UpdateBrowser();
}
}
@@ -1241,7 +1241,7 @@ void Shell::Deactivate( bool bMDI )
// deactivate due to a MessageBox bMDI is false
if ( bMDI )
{
- if (DialogWindow* pXDlgWin = dynamic_cast<DialogWindow*>(pCurWin))
+ if (DialogWindow* pXDlgWin = dynamic_cast<DialogWindow*>(pCurWin.get()))
{
pXDlgWin->DisableBrowser();
if( pXDlgWin->IsModified() )
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 70cda63abde1..3e88d55a9e98 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -44,7 +44,7 @@ Reference< view::XRenderable > Shell::GetRenderable()
bool Shell::HasSelection( bool /* bText */ ) const
{
- if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin))
+ if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin.get()))
{
TextView* pEditView = pMCurWin->GetEditView();
if ( pEditView && pEditView->HasSelection() )
@@ -56,7 +56,7 @@ bool Shell::HasSelection( bool /* bText */ ) const
OUString Shell::GetSelectionText( bool bWholeWord )
{
OUString aText;
- if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin))
+ if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin.get()))
{
if (TextView* pEditView = pMCurWin->GetEditView())
{
@@ -220,14 +220,14 @@ void Shell::Move()
void Shell::ShowCursor( bool bOn )
{
- if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin))
+ if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin.get()))
pMCurWin->ShowCursor(bOn);
}
// only if basic window above:
void Shell::ExecuteBasic( SfxRequest& rReq )
{
- if (dynamic_cast<ModulWindow*>(pCurWin))
+ if (dynamic_cast<ModulWindow*>(pCurWin.get()))
{
pCurWin->ExecuteCommand( rReq );
if (nShellCount)
diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx
index 8112a1790d5c..5b2f93d3beca 100644
--- a/basctl/source/basicide/basides3.cxx
+++ b/basctl/source/basicide/basides3.cxx
@@ -128,7 +128,7 @@ sal_uInt16 Shell::GetWindowId(const BaseWindow* pWin) const
SdrView* Shell::GetCurDlgView() const
{
- if (DialogWindow* pDCurWin = dynamic_cast<DialogWindow*>(pCurWin))
+ if (DialogWindow* pDCurWin = dynamic_cast<DialogWindow*>(pCurWin.get()))
return &pDCurWin->GetView();
else
return 0;
@@ -137,7 +137,7 @@ SdrView* Shell::GetCurDlgView() const
// only if dialogue window above:
void Shell::ExecuteDialog( SfxRequest& rReq )
{
- if (pCurWin && (dynamic_cast<DialogWindow*>(pCurWin) || rReq.GetSlot() == SID_IMPORT_DIALOG))
+ if (pCurWin && (dynamic_cast<DialogWindow*>(pCurWin.get()) || rReq.GetSlot() == SID_IMPORT_DIALOG))
pCurWin->ExecuteCommand(rReq);
}
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index bf9af424fe6f..e1d92e1e88b2 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -232,11 +232,8 @@ Shell::~Shell()
SetWindow( 0 );
SetCurWindow( 0 );
- for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
- {
- // no store; does already happen when the BasicManagers are destroyed
- delete it->second;
- }
+ // no store; does already happen when the BasicManagers are destroyed
+ aWindowTable.clear();
// Destroy all ContainerListeners for Basic Container.
if (ContainerListenerImpl* pListener = static_cast<ContainerListenerImpl*>(m_xLibListener.get()))
@@ -255,7 +252,10 @@ void Shell::onDocumentCreated( const ScriptDocument& /*_rDocument*/ )
// for VBA documents, show a warning that we can save them only in ODF
if (pCurWin->GetDocument().isInVBAMode())
- GetViewFrame()->AppendInfoBar("vba_save", IDE_RESSTR(RID_STR_CANNOTSAVEVBA));
+ {
+ std::vector< VclPtr<PushButton> > aButtons;
+ GetViewFrame()->AppendInfoBar("vba_save", IDE_RESSTR(RID_STR_CANNOTSAVEVBA), aButtons);
+ }
}
UpdateWindows();
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 3a6be366accc..7e0bfeafe149 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -64,6 +64,8 @@ void BaseWindow::dispose()
pShellVScrollBar->SetScrollHdl( Link() );
if ( pShellHScrollBar )
pShellHScrollBar->SetScrollHdl( Link() );
+ pShellVScrollBar.clear();
+ pShellHScrollBar.clear();
vcl::Window::dispose();
}
@@ -279,6 +281,17 @@ DockingWindow::DockingWindow (Layout* pParent) :
nShowCount(0)
{ }
+DockingWindow::~DockingWindow()
+{
+ dispose();
+}
+
+void DockingWindow::dispose()
+{
+ pLayout.clear();
+ ::DockingWindow::dispose();
+}
+
// Sets the position and the size of the docking window. This property is saved
// when the window is floating. Called by Layout.
void DockingWindow::ResizeIfDocking (Point const& rPos, Size const& rSize)
@@ -526,7 +539,7 @@ void TabBar::Command( const CommandEvent& rCEvt )
{
Shell::WindowTable& aWindowTable = pShell->GetWindowTable();
Shell::WindowTableIt it = aWindowTable.find( GetCurPageId() );
- if (it != aWindowTable.end() && dynamic_cast<ModulWindow*>(it->second))
+ if (it != aWindowTable.end() && dynamic_cast<ModulWindow*>(it->second.get()))
{
SbModule* pActiveModule = pBasic->FindModule( it->second->GetName() );
if( pActiveModule && ( pActiveModule->GetModuleType() == script::ModuleType::DOCUMENT ) )
diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx
index b5b2ef17d9dc..321f68bd9a9d 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -106,6 +106,21 @@ BreakPointDialog::BreakPointDialog( vcl::Window* pParent, BreakPointList& rBrkPn
CheckButtons();
}
+BreakPointDialog::~BreakPointDialog()
+{
+ dispose();
+}
+
+void BreakPointDialog::dispose()
+{
+ m_pComboBox.clear();
+ m_pOKButton.clear();
+ m_pNewButton.clear();
+ m_pDelButton.clear();
+ m_pNumericField.clear();
+ ModalDialog::dispose();
+}
+
void BreakPointDialog::SetCurrentBreakPoint( BreakPoint* pBrk )
{
OUString aStr( "# " + OUString::number(pBrk->nLine) );
diff --git a/basctl/source/basicide/brkdlg.hxx b/basctl/source/basicide/brkdlg.hxx
index 703744efd345..5c78e7ce6674 100644
--- a/basctl/source/basicide/brkdlg.hxx
+++ b/basctl/source/basicide/brkdlg.hxx
@@ -31,12 +31,12 @@ namespace basctl
class BreakPointDialog : public ModalDialog
{
private:
- ComboBox* m_pComboBox;
- OKButton* m_pOKButton;
- PushButton* m_pNewButton;
- PushButton* m_pDelButton;
- ::CheckBox* m_pCheckBox;
- NumericField* m_pNumericField;
+ VclPtr<ComboBox> m_pComboBox;
+ VclPtr<OKButton> m_pOKButton;
+ VclPtr<PushButton> m_pNewButton;
+ VclPtr<PushButton> m_pDelButton;
+ ::VclPtr<CheckBox> m_pCheckBox;
+ VclPtr<NumericField> m_pNumericField;
BreakPointList & m_rOriginalBreakPointList;
BreakPointList m_aModifiedBreakPointList;
@@ -53,6 +53,8 @@ protected:
public:
BreakPointDialog( vcl::Window* pParent, BreakPointList& rBrkList );
+ virtual ~BreakPointDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetCurrentBreakPoint( BreakPoint* pBrk );
};
diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx
index 58db3a74dbb1..14a3b54af1a0 100644
--- a/basctl/source/basicide/layout.cxx
+++ b/basctl/source/basicide/layout.cxx
@@ -53,6 +53,17 @@ Layout::Layout (vcl::Window* pParent) :
SetFont(aFont);
}
+Layout::~Layout()
+{
+ dispose();
+}
+
+void Layout::dispose()
+{
+ pChild.clear();
+ Window::dispose();
+}
+
// removes a docking window
void Layout::Remove (DockingWindow* pWin)
{
diff --git a/basctl/source/basicide/layout.hxx b/basctl/source/basicide/layout.hxx
index 56e69a2f28f9..ad19ad93e5f1 100644
--- a/basctl/source/basicide/layout.hxx
+++ b/basctl/source/basicide/layout.hxx
@@ -50,6 +50,9 @@ public:
virtual void GetState (SfxItemSet&, unsigned nWhich) = 0;
virtual void UpdateDebug (bool bBasicStopped ) = 0;
+ virtual ~Layout();
+ virtual void dispose() SAL_OVERRIDE;
+
protected:
Layout (vcl::Window* pParent);
@@ -67,7 +70,7 @@ protected:
private:
// the main child window (either ModulWindow or DialogWindow)
- BaseWindow* pChild;
+ VclPtr<BaseWindow> pChild;
// when this window has at first (nonempty) size
bool bFirstSize;
@@ -101,7 +104,7 @@ private:
struct Item
{
// pointer to the dockable window
- DockingWindow* pWin;
+ VclPtr<DockingWindow> pWin;
// starting and ending position in the strip
// They may be different from the actual window position, because
// the window may fill the space of the adjacent currently
diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx
index e3b49bf2dc39..97c1fd9e9b77 100644
--- a/basctl/source/basicide/linenumberwindow.cxx
+++ b/basctl/source/basicide/linenumberwindow.cxx
@@ -25,6 +25,17 @@ LineNumberWindow::LineNumberWindow (vcl::Window* pParent, ModulWindow* pModulWin
m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2;
}
+LineNumberWindow::~LineNumberWindow()
+{
+ dispose();
+}
+
+void LineNumberWindow::dispose()
+{
+ m_pModulWindow.clear();
+ Window::dispose();
+}
+
void LineNumberWindow::Paint( const Rectangle& )
{
if(SyncYOffset())
diff --git a/basctl/source/basicide/linenumberwindow.hxx b/basctl/source/basicide/linenumberwindow.hxx
index 6a6bcd201714..65498937eda8 100644
--- a/basctl/source/basicide/linenumberwindow.hxx
+++ b/basctl/source/basicide/linenumberwindow.hxx
@@ -19,7 +19,7 @@ class ModulWindow;
class LineNumberWindow : public vcl::Window
{
private:
- ModulWindow* m_pModulWindow;
+ VclPtr<ModulWindow> m_pModulWindow;
int m_nWidth;
long m_nCurYOffset;
int m_nBaseWidth;
@@ -30,6 +30,8 @@ protected:
public:
LineNumberWindow (vcl::Window* pParent, ModulWindow* pModulWin);
+ virtual ~LineNumberWindow();
+ virtual void dispose() SAL_OVERRIDE;
void DoScroll( long nHorzScroll, long nVertScroll );
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 31d8bccecd19..104d3650ac96 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -122,6 +122,20 @@ void MacroChooser::dispose()
SfxGetpApp()->SaveBasicAndDialogContainer();
bForceStoreBasic = false;
}
+ m_pMacroNameEdit.clear();
+ m_pMacroFromTxT.clear();
+ m_pMacrosSaveInTxt.clear();
+ m_pBasicBox.clear();
+ m_pMacrosInTxt.clear();
+ m_pMacroBox.clear();
+ m_pRunButton.clear();
+ m_pCloseButton.clear();
+ m_pAssignButton.clear();
+ m_pEditButton.clear();
+ m_pDelButton.clear();
+ m_pOrganizeButton.clear();
+ m_pNewLibButton.clear();
+ m_pNewModButton.clear();
SfxModalDialog::dispose();
}
diff --git a/basctl/source/basicide/macrodlg.hxx b/basctl/source/basicide/macrodlg.hxx
index 71892b3ea1a8..d8388204904c 100644
--- a/basctl/source/basicide/macrodlg.hxx
+++ b/basctl/source/basicide/macrodlg.hxx
@@ -45,22 +45,22 @@ public:
};
private:
- Edit* m_pMacroNameEdit;
- FixedText* m_pMacroFromTxT;
- FixedText* m_pMacrosSaveInTxt;
- TreeListBox* m_pBasicBox;
- FixedText* m_pMacrosInTxt;
+ VclPtr<Edit> m_pMacroNameEdit;
+ VclPtr<FixedText> m_pMacroFromTxT;
+ VclPtr<FixedText> m_pMacrosSaveInTxt;
+ VclPtr<TreeListBox> m_pBasicBox;
+ VclPtr<FixedText> m_pMacrosInTxt;
OUString m_aMacrosInTxtBaseStr;
- SvTreeListBox* m_pMacroBox;
-
- PushButton* m_pRunButton;
- CloseButton* m_pCloseButton;
- PushButton* m_pAssignButton;
- PushButton* m_pEditButton;
- PushButton* m_pDelButton;
- PushButton* m_pOrganizeButton;
- PushButton* m_pNewLibButton;
- PushButton* m_pNewModButton;
+ VclPtr<SvTreeListBox> m_pMacroBox;
+
+ VclPtr<PushButton> m_pRunButton;
+ VclPtr<CloseButton> m_pCloseButton;
+ VclPtr<PushButton> m_pAssignButton;
+ VclPtr<PushButton> m_pEditButton;
+ VclPtr<PushButton> m_pDelButton;
+ VclPtr<PushButton> m_pOrganizeButton;
+ VclPtr<PushButton> m_pNewLibButton;
+ VclPtr<PushButton> m_pNewModButton;
bool bNewDelIsDel;
bool bForceStoreBasic;
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index f7cfbb5adfd2..9174328463cc 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -392,6 +392,18 @@ NewObjectDialog::NewObjectDialog(vcl::Window * pParent, ObjectMode::Mode eMode,
m_pOKButton->SetClickHdl(LINK(this, NewObjectDialog, OkButtonHandler));
}
+NewObjectDialog::~NewObjectDialog()
+{
+ dispose();
+}
+
+void NewObjectDialog::dispose()
+{
+ m_pEdit.clear();
+ m_pOKButton.clear();
+ ModalDialog::dispose();
+}
+
// GotoLineDialog
GotoLineDialog::GotoLineDialog(vcl::Window * pParent )
: ModalDialog(pParent, "GotoLineDialog",
@@ -403,6 +415,18 @@ GotoLineDialog::GotoLineDialog(vcl::Window * pParent )
m_pOKButton->SetClickHdl(LINK(this, GotoLineDialog, OkButtonHandler));
}
+GotoLineDialog::~GotoLineDialog()
+{
+ dispose();
+}
+
+void GotoLineDialog::dispose()
+{
+ m_pEdit.clear();
+ m_pOKButton.clear();
+ ModalDialog::dispose();
+}
+
sal_Int32 GotoLineDialog::GetLineNumber() const
{
return m_pEdit->GetText().toInt32();
@@ -437,6 +461,18 @@ ExportDialog::ExportDialog(vcl::Window * pParent)
m_pOKButton->SetClickHdl(LINK(this, ExportDialog, OkButtonHandler));
}
+ExportDialog::~ExportDialog()
+{
+ dispose();
+}
+
+void ExportDialog::dispose()
+{
+ m_pExportAsPackageButton.clear();
+ m_pOKButton.clear();
+ ModalDialog::dispose();
+}
+
// LibPage
LibPage::LibPage(vcl::Window * pParent)
: TabPage(pParent, "LibPage",
@@ -497,8 +533,16 @@ void LibPage::dispose()
DocumentEntry* pEntry = static_cast<DocumentEntry*>(m_pBasicsBox->GetEntryData( i ));
delete pEntry;
}
- m_pBasicsBox = NULL;
}
+ m_pBasicsBox.clear();
+ m_pLibBox.clear();
+ m_pEditButton.clear();
+ m_pPasswordButton.clear();
+ m_pNewLibButton.clear();
+ m_pInsertLibButton.clear();
+ m_pExportButton.clear();
+ m_pDelButton.clear();
+ pTabDlg.clear();
TabPage::dispose();
}
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 216fb1d3c92b..d80dbc18ba98 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -495,8 +495,8 @@ void OrganizeDialog::dispose()
{
for ( sal_uInt16 i = 0; i < m_pTabCtrl->GetPageCount(); i++ )
delete m_pTabCtrl->GetTabPage( m_pTabCtrl->GetPageId( i ) );
- m_pTabCtrl = NULL;
}
+ m_pTabCtrl.clear();
TabDialog::dispose();
};
@@ -598,6 +598,22 @@ ObjectPage::ObjectPage(vcl::Window *pParent, const OString &rName, sal_uInt16 nM
CheckButtons();
}
+ObjectPage::~ObjectPage()
+{
+ dispose();
+}
+
+void ObjectPage::dispose()
+{
+ m_pBasicBox.clear();
+ m_pEditButton.clear();
+ m_pNewModButton.clear();
+ m_pNewDlgButton.clear();
+ m_pDelButton.clear();
+ pTabDlg.clear();
+ TabPage::dispose();
+}
+
void ObjectPage::SetCurrentEntry (EntryDescriptor& rDesc)
{
m_pBasicBox->SetCurrentEntry( rDesc );
@@ -927,6 +943,21 @@ LibDialog::LibDialog( vcl::Window* pParent )
m_pLibBox->set_width_request(m_pLibBox->approximate_char_width() * 32);
}
+LibDialog::~LibDialog()
+{
+ dispose();
+}
+
+void LibDialog::dispose()
+{
+ m_pStorageFrame.clear();
+ m_pLibBox.clear();
+ m_pReferenceBox.clear();
+ m_pReplaceBox.clear();
+ ModalDialog::dispose();
+}
+
+
void LibDialog::SetStorageName( const OUString& rName )
{
OUString aName( IDE_RESSTR(RID_STR_FILENAME) );
diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx
index 00abbe158ca9..12907c0c2342 100644
--- a/basctl/source/basicide/moduldlg.hxx
+++ b/basctl/source/basicide/moduldlg.hxx
@@ -48,12 +48,14 @@ namespace ObjectMode
class NewObjectDialog : public ModalDialog
{
private:
- Edit* m_pEdit;
- OKButton* m_pOKButton;
+ VclPtr<Edit> m_pEdit;
+ VclPtr<OKButton> m_pOKButton;
DECL_LINK(OkButtonHandler, void *);
public:
NewObjectDialog (vcl::Window* pParent, ObjectMode::Mode, bool bCheckName = false);
+ virtual ~NewObjectDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetObjectName() const { return m_pEdit->GetText(); }
void SetObjectName( const OUString& rName )
{
@@ -64,19 +66,21 @@ public:
class GotoLineDialog : public ModalDialog
{
- Edit* m_pEdit;
- OKButton* m_pOKButton;
+ VclPtr<Edit> m_pEdit;
+ VclPtr<OKButton> m_pOKButton;
DECL_LINK(OkButtonHandler, void *);
public:
GotoLineDialog(vcl::Window * pParent);
+ virtual ~GotoLineDialog();
+ virtual void dispose() SAL_OVERRIDE;
sal_Int32 GetLineNumber() const;
};
class ExportDialog : public ModalDialog
{
private:
- RadioButton* m_pExportAsPackageButton;
- OKButton* m_pOKButton;
+ VclPtr<RadioButton> m_pExportAsPackageButton;
+ VclPtr<OKButton> m_pOKButton;
bool mbExportAsPackage;
@@ -84,6 +88,8 @@ private:
public:
ExportDialog( vcl::Window * pParent );
+ virtual ~ExportDialog();
+ virtual void dispose() SAL_OVERRIDE;
bool isExportAsPackage () const { return mbExportAsPackage; }
};
@@ -141,13 +147,15 @@ public:
class LibDialog: public ModalDialog
{
private:
- VclFrame* m_pStorageFrame;
- CheckBox* m_pLibBox;
- ::CheckBox* m_pReferenceBox;
- ::CheckBox* m_pReplaceBox;
+ VclPtr<VclFrame> m_pStorageFrame;
+ VclPtr<CheckBox> m_pLibBox;
+ VclPtr<::CheckBox> m_pReferenceBox;
+ VclPtr<::CheckBox> m_pReplaceBox;
public:
LibDialog( vcl::Window* pParent );
+ virtual ~LibDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetStorageName( const OUString& rName );
@@ -162,7 +170,7 @@ public:
class OrganizeDialog : public TabDialog
{
private:
- TabControl* m_pTabCtrl;
+ VclPtr<TabControl> m_pTabCtrl;
EntryDescriptor m_aCurEntry;
public:
@@ -178,11 +186,11 @@ public:
class ObjectPage: public TabPage
{
protected:
- ExtTreeListBox* m_pBasicBox;
- PushButton* m_pEditButton;
- PushButton* m_pNewModButton;
- PushButton* m_pNewDlgButton;
- PushButton* m_pDelButton;
+ VclPtr<ExtTreeListBox> m_pBasicBox;
+ VclPtr<PushButton> m_pEditButton;
+ VclPtr<PushButton> m_pNewModButton;
+ VclPtr<PushButton> m_pNewDlgButton;
+ VclPtr<PushButton> m_pDelButton;
DECL_LINK( BasicBoxHighlightHdl, TreeListBox * );
DECL_LINK( ButtonHdl, Button * );
@@ -193,13 +201,15 @@ protected:
void NewDialog();
void EndTabDialog( sal_uInt16 nRet );
- TabDialog* pTabDlg;
+ VclPtr<TabDialog> pTabDlg;
virtual void ActivatePage() SAL_OVERRIDE;
virtual void DeactivatePage() SAL_OVERRIDE;
public:
ObjectPage(vcl::Window* pParent, const OString& rName, sal_uInt16 nMode);
+ virtual ~ObjectPage();
+ virtual void dispose() SAL_OVERRIDE;
void SetCurrentEntry( EntryDescriptor& rDesc );
void SetTabDlg( TabDialog* p ) { pTabDlg = p;}
@@ -209,14 +219,14 @@ public:
class LibPage: public TabPage
{
protected:
- ListBox* m_pBasicsBox;
- CheckBox* m_pLibBox;
- PushButton* m_pEditButton;
- PushButton* m_pPasswordButton;
- PushButton* m_pNewLibButton;
- PushButton* m_pInsertLibButton;
- PushButton* m_pExportButton;
- PushButton* m_pDelButton;
+ VclPtr<ListBox> m_pBasicsBox;
+ VclPtr<CheckBox> m_pLibBox;
+ VclPtr<PushButton> m_pEditButton;
+ VclPtr<PushButton> m_pPasswordButton;
+ VclPtr<PushButton> m_pNewLibButton;
+ VclPtr<PushButton> m_pInsertLibButton;
+ VclPtr<PushButton> m_pExportButton;
+ VclPtr<PushButton> m_pDelButton;
ScriptDocument m_aCurDocument;
LibraryLocation m_eCurLocation;
@@ -242,7 +252,7 @@ protected:
virtual void ActivatePage() SAL_OVERRIDE;
virtual void DeactivatePage() SAL_OVERRIDE;
- TabDialog* pTabDlg;
+ VclPtr<TabDialog> pTabDlg;
public:
LibPage( vcl::Window* pParent );
diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx
index 953f96b92316..cb0ec81910fd 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -81,6 +81,10 @@ ManageLanguageDialog::~ManageLanguageDialog()
void ManageLanguageDialog::dispose()
{
ClearLanguageBox();
+ m_pLanguageLB.clear();
+ m_pAddPB.clear();
+ m_pDeletePB.clear();
+ m_pMakeDefPB.clear();
ModalDialog::dispose();
}
@@ -253,6 +257,22 @@ SetDefaultLanguageDialog::SetDefaultLanguageDialog(vcl::Window* pParent, boost::
FillLanguageBox();
}
+SetDefaultLanguageDialog::~SetDefaultLanguageDialog()
+{
+ dispose();
+}
+
+void SetDefaultLanguageDialog::dispose()
+{
+ m_pLanguageFT.clear();
+ m_pLanguageLB.clear();
+ m_pCheckLangFT.clear();
+ m_pCheckLangLB.clear();
+ m_pDefinedFT.clear();
+ m_pAddedFT.clear();
+ ModalDialog::dispose();
+}
+
void SetDefaultLanguageDialog::FillLanguageBox()
{
// fill list with all languages
diff --git a/basctl/source/inc/accessibledialogcontrolshape.hxx b/basctl/source/inc/accessibledialogcontrolshape.hxx
index 7192763c27dc..bc0d52b33eec 100644
--- a/basctl/source/inc/accessibledialogcontrolshape.hxx
+++ b/basctl/source/inc/accessibledialogcontrolshape.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <comphelper/accessiblecomponenthelper.hxx>
#include <cppuhelper/implbase3.hxx>
+#include <vcl/vclptr.hxx>
namespace vcl { class Window; }
class VCLExternalSolarLock;
@@ -56,7 +57,7 @@ class AccessibleDialogControlShape : public AccessibleExtendedComponentHelper
private:
VCLExternalSolarLock* m_pExternalLock;
- DialogWindow* m_pDialogWindow;
+ VclPtr<DialogWindow> m_pDialogWindow;
DlgEdObj* m_pDlgEdObj;
bool m_bFocused;
bool m_bSelected;
diff --git a/basctl/source/inc/accessibledialogwindow.hxx b/basctl/source/inc/accessibledialogwindow.hxx
index c57b2590ae71..bd2739440160 100644
--- a/basctl/source/inc/accessibledialogwindow.hxx
+++ b/basctl/source/inc/accessibledialogwindow.hxx
@@ -26,6 +26,7 @@
#include <cppuhelper/implbase3.hxx>
#include <svl/lstner.hxx>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
class VCLExternalSolarLock;
class VclSimpleEvent;
@@ -80,7 +81,7 @@ private:
AccessibleChildren m_aAccessibleChildren;
VCLExternalSolarLock* m_pExternalLock;
- basctl::DialogWindow* m_pDialogWindow;
+ VclPtr<basctl::DialogWindow> m_pDialogWindow;
DlgEditor* m_pDlgEditor;
DlgEdModel* m_pDlgEdModel;
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
index 644ccbad2721..de17eb08403c 100644
--- a/basctl/source/inc/baside3.hxx
+++ b/basctl/source/inc/baside3.hxx
@@ -146,12 +146,12 @@ protected:
private:
// child window
- DialogWindow* pChild;
+ VclPtr<DialogWindow> pChild;
// dockable windows:
// object catalog (owned by Shell)
ObjectCatalog& rObjectCatalog;
// property browser (created by this, deleted by toolkit)
- PropBrw* pPropertyBrowser;
+ VclPtr<PropBrw> pPropertyBrowser;
private:
void AddPropertyBrowser ();
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index 216f06518316..0baeb579dda1 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -56,7 +56,7 @@ class Shell :
public DocumentEventListener
{
public:
- typedef std::map<sal_uInt16, BaseWindow*> WindowTable;
+ typedef std::map<sal_uInt16, VclPtr<BaseWindow> > WindowTable;
typedef WindowTable::const_iterator WindowTableIt;
private:
@@ -64,9 +64,9 @@ private:
friend class LocalizationMgr;
friend bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const ScriptDocument& rDocument, const OUString& aLibName ); // defined in baside3.cxx
- WindowTable aWindowTable;
+ WindowTable aWindowTable;
sal_uInt16 nCurKey;
- BaseWindow* pCurWin;
+ VclPtr<BaseWindow> pCurWin;
ScriptDocument m_aCurDocument;
OUString m_aCurLibName;
boost::shared_ptr<LocalizationMgr> m_pCurLocalizationMgr;
@@ -81,7 +81,7 @@ private:
boost::scoped_ptr<ModulWindowLayout> pModulLayout;
boost::scoped_ptr<DialogWindowLayout> pDialogLayout;
// the active layout window
- Layout* pLayout;
+ VclPtr<Layout> pLayout;
// common object catalog window
VclPtr<ObjectCatalog> aObjectCatalog;
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 37e11306111d..8423874c19a9 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -80,7 +80,8 @@ class DockingWindow : public ::DockingWindow
public:
DockingWindow (vcl::Window* pParent);
DockingWindow (Layout* pParent);
-public:
+ virtual ~DockingWindow();
+ virtual void dispose() SAL_OVERRIDE;
void ResizeIfDocking (Point const&, Size const&);
void ResizeIfDocking (Size const&);
Size GetDockingSize () const { return aDockingRect.GetSize(); }
@@ -102,7 +103,7 @@ private:
// the position and the size of the docking window
Rectangle aDockingRect;
// the parent layout window (only when docking)
- Layout* pLayout;
+ VclPtr<Layout> pLayout;
// > 0: shown, <= 0: hidden, ++ by Show() and -- by Hide()
int nShowCount;
@@ -148,8 +149,8 @@ class EntryDescriptor;
class BaseWindow : public vcl::Window
{
private:
- ScrollBar* pShellHScrollBar;
- ScrollBar* pShellVScrollBar;
+ VclPtr<ScrollBar> pShellHScrollBar;
+ VclPtr<ScrollBar> pShellVScrollBar;
DECL_LINK( ScrollHdl, ScrollBar * );
int nStatus;
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 6371ac67b72f..18883daa3854 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -30,6 +30,7 @@
#include <tools/gen.hxx>
#include <vcl/timer.hxx>
#include <vcl/idle.hxx>
+#include <vcl/vclptr.hxx>
#include <boost/scoped_ptr.hpp>
@@ -106,8 +107,8 @@ private:
void Print( Printer* pPrinter, const OUString& rTitle );
private:
- ScrollBar* pHScroll;
- ScrollBar* pVScroll;
+ VclPtr<ScrollBar> pHScroll;
+ VclPtr<ScrollBar> pVScroll;
boost::scoped_ptr<DlgEdModel> pDlgEdModel; // never nullptr
DlgEdPage* pDlgEdPage; // never nullptr
boost::scoped_ptr<DlgEdView> pDlgEdView; // never nullptr
diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx
index ab6fb62ceab9..f7b9335e5e24 100644
--- a/basctl/source/inc/managelang.hxx
+++ b/basctl/source/inc/managelang.hxx
@@ -52,10 +52,10 @@ extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft,
class ManageLanguageDialog : public ModalDialog
{
private:
- ListBox* m_pLanguageLB;
- PushButton* m_pAddPB;
- PushButton* m_pDeletePB;
- PushButton* m_pMakeDefPB;
+ VclPtr<ListBox> m_pLanguageLB;
+ VclPtr<PushButton> m_pAddPB;
+ VclPtr<PushButton> m_pDeletePB;
+ VclPtr<PushButton> m_pMakeDefPB;
boost::shared_ptr<LocalizationMgr> m_xLocalizationMgr;
@@ -80,12 +80,12 @@ public:
class SetDefaultLanguageDialog : public ModalDialog
{
private:
- FixedText* m_pLanguageFT;
- SvxLanguageBox* m_pLanguageLB;
- FixedText* m_pCheckLangFT;
- SvxCheckListBox* m_pCheckLangLB;
- FixedText* m_pDefinedFT;
- FixedText* m_pAddedFT;
+ VclPtr<FixedText> m_pLanguageFT;
+ VclPtr<SvxLanguageBox> m_pLanguageLB;
+ VclPtr<FixedText> m_pCheckLangFT;
+ VclPtr<SvxCheckListBox> m_pCheckLangLB;
+ VclPtr<FixedText> m_pDefinedFT;
+ VclPtr<FixedText> m_pAddedFT;
boost::shared_ptr<LocalizationMgr> m_xLocalizationMgr;
@@ -93,6 +93,8 @@ private:
public:
SetDefaultLanguageDialog(vcl::Window* pParent, boost::shared_ptr<LocalizationMgr> xLMgr);
+ virtual ~SetDefaultLanguageDialog();
+ virtual void dispose() SAL_OVERRIDE;
::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > GetLocales() const;
};
diff --git a/chart2/inc/ChartModel.hxx b/chart2/inc/ChartModel.hxx
index 1fe210fc2a43..529d9ed1769a 100644
--- a/chart2/inc/ChartModel.hxx
+++ b/chart2/inc/ChartModel.hxx
@@ -622,7 +622,7 @@ private:
sal_Int32 mnStart;
sal_Int32 mnEnd;
bool bSet;
- OpenGLWindow* mpOpenGLWindow;
+ VclPtr<OpenGLWindow> mpOpenGLWindow;
};
} // namespace chart
diff --git a/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx b/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx
index e0b65406b31e..b2d55cb8784f 100644
--- a/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx
+++ b/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_CHART2_SOURCE_CONTROLLER_ACCESSIBILITY_ACCESSIBLEVIEWFORWARDER_HXX
#include <vcl/mapmod.hxx>
+#include <vcl/vclptr.hxx>
#include <svx/IAccessibleViewForwarder.hxx>
namespace vcl { class Window; }
@@ -48,7 +49,7 @@ private:
AccessibleViewForwarder& operator=( AccessibleViewForwarder& ) SAL_DELETED_FUNCTION;
AccessibleChartView* m_pAccChartView;
- vcl::Window* m_pWindow;
+ VclPtr<vcl::Window> m_pWindow;
MapMode m_aMapMode;
};
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
index 14ce8e13b5da..7ea6c1c4b0c7 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
@@ -281,8 +281,8 @@ private:
DECL_LINK( ChangeLineCountHdl, void* );
private:
- FixedText* m_pFT_NumberOfLines;
- NumericField* m_pMF_NumberOfLines;
+ VclPtr<FixedText> m_pFT_NumberOfLines;
+ VclPtr<NumericField> m_pMF_NumberOfLines;
};
class BubbleChartDialogController : public ChartTypeDialogController
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx
index 33cf74763515..44436109dddd 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx
@@ -60,8 +60,7 @@ ChartTypeDialog::~ChartTypeDialog()
void ChartTypeDialog::dispose()
{
- delete m_pChartTypeTabPage;
- m_pChartTypeTabPage = NULL;
+ m_pChartTypeTabPage.clear();
ModalDialog::dispose();
}
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index 5a777db94004..66af10a37ccb 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -54,11 +54,7 @@ CreationWizardUnoDlg::CreationWizardUnoDlg( const uno::Reference< uno::XComponen
CreationWizardUnoDlg::~CreationWizardUnoDlg()
{
SolarMutexGuard aSolarGuard;
- if( m_pDialog )
- {
- delete m_pDialog;
- m_pDialog = 0;
- }
+ m_pDialog.clear();
}
// lang::XServiceInfo
OUString SAL_CALL CreationWizardUnoDlg::getImplementationName()
@@ -272,11 +268,7 @@ void SAL_CALL CreationWizardUnoDlg::disposing()
m_xParentWindow.clear();
SolarMutexGuard aSolarGuard;
- if( m_pDialog )
- {
- delete m_pDialog;
- m_pDialog = 0;
- }
+ m_pDialog.clear();
try
{
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index 02a5578b99a0..5230792f51f2 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -106,6 +106,7 @@ void DataEditor::dispose()
aMiscOptions.RemoveListenerLink( LINK( this, DataEditor, MiscHdl ) );
OSL_TRACE( "DataEditor: DTOR" );
+ m_pTbxData.clear();
ModalDialog::dispose();
}
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx
index 88c1a41f64fd..09e55375e734 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx
@@ -164,16 +164,14 @@ DataSourceDialog::~DataSourceDialog()
void DataSourceDialog::dispose()
{
- delete m_pRangeChooserTabePage;
- m_pRangeChooserTabePage = NULL;
- delete m_pDataSourceTabPage;
- m_pDataSourceTabPage = NULL;
if (m_pTabControl)
{
m_nLastPageId = m_pTabControl->GetCurPageId();
- delete m_pTabControl;
- m_pTabControl = NULL;
}
+ m_pRangeChooserTabePage.clear();
+ m_pDataSourceTabPage.clear();
+ m_pTabControl.clear();
+ m_pBtnOK.clear();
TabDialog::dispose();
}
diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
index 345a6d79f150..670979af96ee 100644
--- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
@@ -81,6 +81,23 @@ SchAxisDlg::SchAxisDlg(vcl::Window* pWindow,
m_pCbSecondaryZ->Enable( rInput.aPossibilityList[5] );
}
+SchAxisDlg::~SchAxisDlg()
+{
+ dispose();
+}
+
+void SchAxisDlg::dispose()
+{
+ m_pCbPrimaryX.clear();
+ m_pCbPrimaryY.clear();
+ m_pCbPrimaryZ.clear();
+ m_pCbSecondaryX.clear();
+ m_pCbSecondaryY.clear();
+ m_pCbSecondaryZ.clear();
+ ModalDialog::dispose();
+}
+
+
void SchAxisDlg::getResult( InsertAxisOrGridDialogData& rOutput )
{
rOutput.aExistenceList[0]=m_pCbPrimaryX->IsChecked();
diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx
index 3769f2ef91c6..bb28a878bbb3 100644
--- a/chart2/source/controller/dialogs/dlg_View3D.cxx
+++ b/chart2/source/controller/dialogs/dlg_View3D.cxx
@@ -71,14 +71,12 @@ View3DDialog::~View3DDialog()
void View3DDialog::dispose()
{
- delete m_pGeometry;
- m_pGeometry = NULL;
- delete m_pAppearance;
- m_pAppearance = NULL;
- delete m_pIllumination;
- m_pIllumination = NULL;
-
- m_nLastPageId = m_pTabControl->GetCurPageId();
+ if (m_pTabControl)
+ m_nLastPageId = m_pTabControl->GetCurPageId();
+ m_pGeometry.clear();
+ m_pAppearance.clear();
+ m_pIllumination.clear();
+ m_pTabControl.clear();
TabDialog::dispose();
}
diff --git a/chart2/source/controller/dialogs/res_BarGeometry.hxx b/chart2/source/controller/dialogs/res_BarGeometry.hxx
index 60af3af3ccd8..7a9eeb8c17f8 100644
--- a/chart2/source/controller/dialogs/res_BarGeometry.hxx
+++ b/chart2/source/controller/dialogs/res_BarGeometry.hxx
@@ -41,8 +41,8 @@ public:
void SetSelectHdl( const Link& rLink );
private:
- FixedText* m_pFT_Geometry;
- ListBox* m_pLB_Geometry;
+ VclPtr<FixedText> m_pFT_Geometry;
+ VclPtr<ListBox> m_pLB_Geometry;
};
} //namespace chart
diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx b/chart2/source/controller/dialogs/res_DataLabel.hxx
index 9d6d0e01cd90..cfb4758cc29b 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.hxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.hxx
@@ -45,28 +45,28 @@ public:
void SetNumberFormatter( SvNumberFormatter* pFormatter );
private:
- CheckBox* m_pCBNumber;
- PushButton* m_pPB_NumberFormatForValue;
- CheckBox* m_pCBPercent;
- PushButton* m_pPB_NumberFormatForPercent;
- FixedText* m_pFT_NumberFormatForPercent;
- CheckBox* m_pCBCategory;
- CheckBox* m_pCBSymbol;
-
- VclHBox* m_pSeparatorResources;
- ListBox* m_pLB_Separator;
+ VclPtr<CheckBox> m_pCBNumber;
+ VclPtr<PushButton> m_pPB_NumberFormatForValue;
+ VclPtr<CheckBox> m_pCBPercent;
+ VclPtr<PushButton> m_pPB_NumberFormatForPercent;
+ VclPtr<FixedText> m_pFT_NumberFormatForPercent;
+ VclPtr<CheckBox> m_pCBCategory;
+ VclPtr<CheckBox> m_pCBSymbol;
+
+ VclPtr<VclHBox> m_pSeparatorResources;
+ VclPtr<ListBox> m_pLB_Separator;
OUString m_aEntryMap[NUMBER_SEPARATORS];
- VclHBox* m_pBxLabelPlacement;
- ListBox* m_pLB_LabelPlacement;
+ VclPtr<VclHBox> m_pBxLabelPlacement;
+ VclPtr<ListBox> m_pLB_LabelPlacement;
- VclHBox* m_pBxOrientation;
- svx::DialControl* m_pDC_Dial;
- FixedText* m_pFT_Dial;
- NumericField* m_pNF_Degrees;
+ VclPtr<VclHBox> m_pBxOrientation;
+ VclPtr<svx::DialControl> m_pDC_Dial;
+ VclPtr<FixedText> m_pFT_Dial;
+ VclPtr<NumericField> m_pNF_Degrees;
- VclHBox* m_pBxTextDirection;
- TextDirectionListBox* m_pLB_TextDirection;
+ VclPtr<VclHBox> m_pBxTextDirection;
+ VclPtr<TextDirectionListBox> m_pLB_TextDirection;
::std::map< sal_Int32, sal_uInt16 > m_aPlacementToListBoxMap;
::std::map< sal_uInt16, sal_Int32 > m_aListBoxToPlacementMap;
@@ -82,7 +82,7 @@ private:
bool m_bSourceFormatForValue;
bool m_bSourceFormatForPercent;
- vcl::Window* m_pWindow;
+ VclPtr<vcl::Window> m_pWindow;
SfxItemPool* m_pPool;
DECL_LINK(NumberFormatDialogHdl, PushButton * );
diff --git a/chart2/source/controller/dialogs/res_Trendline.hxx b/chart2/source/controller/dialogs/res_Trendline.hxx
index 0d4be04cdf4d..03c3ebe3bd87 100644
--- a/chart2/source/controller/dialogs/res_Trendline.hxx
+++ b/chart2/source/controller/dialogs/res_Trendline.hxx
@@ -46,29 +46,29 @@ public:
void SetNbPoints( sal_Int32 nNbPoints );
private:
- RadioButton* m_pRB_Linear;
- RadioButton* m_pRB_Logarithmic;
- RadioButton* m_pRB_Exponential;
- RadioButton* m_pRB_Power;
- RadioButton* m_pRB_Polynomial;
- RadioButton* m_pRB_MovingAverage;
-
- FixedImage* m_pFI_Linear;
- FixedImage* m_pFI_Logarithmic;
- FixedImage* m_pFI_Exponential;
- FixedImage* m_pFI_Power;
- FixedImage* m_pFI_Polynomial;
- FixedImage* m_pFI_MovingAverage;
-
- NumericField* m_pNF_Degree;
- NumericField* m_pNF_Period;
- Edit* m_pEE_Name;
- FormattedField* m_pFmtFld_ExtrapolateForward;
- FormattedField* m_pFmtFld_ExtrapolateBackward;
- CheckBox* m_pCB_SetIntercept;
- FormattedField* m_pFmtFld_InterceptValue;
- CheckBox* m_pCB_ShowEquation;
- CheckBox* m_pCB_ShowCorrelationCoeff;
+ VclPtr<RadioButton> m_pRB_Linear;
+ VclPtr<RadioButton> m_pRB_Logarithmic;
+ VclPtr<RadioButton> m_pRB_Exponential;
+ VclPtr<RadioButton> m_pRB_Power;
+ VclPtr<RadioButton> m_pRB_Polynomial;
+ VclPtr<RadioButton> m_pRB_MovingAverage;
+
+ VclPtr<FixedImage> m_pFI_Linear;
+ VclPtr<FixedImage> m_pFI_Logarithmic;
+ VclPtr<FixedImage> m_pFI_Exponential;
+ VclPtr<FixedImage> m_pFI_Power;
+ VclPtr<FixedImage> m_pFI_Polynomial;
+ VclPtr<FixedImage> m_pFI_MovingAverage;
+
+ VclPtr<NumericField> m_pNF_Degree;
+ VclPtr<NumericField> m_pNF_Period;
+ VclPtr<Edit> m_pEE_Name;
+ VclPtr<FormattedField> m_pFmtFld_ExtrapolateForward;
+ VclPtr<FormattedField> m_pFmtFld_ExtrapolateBackward;
+ VclPtr<CheckBox> m_pCB_SetIntercept;
+ VclPtr<FormattedField> m_pFmtFld_InterceptValue;
+ VclPtr<CheckBox> m_pCB_ShowEquation;
+ VclPtr<CheckBox> m_pCB_ShowCorrelationCoeff;
SvxChartRegress m_eTrendLineType;
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
index ff20319c8eb9..d25e226fb19d 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
@@ -120,6 +120,20 @@ ThreeD_SceneAppearance_TabPage::ThreeD_SceneAppearance_TabPage(
initControlsFromModel();
}
+ThreeD_SceneAppearance_TabPage::~ThreeD_SceneAppearance_TabPage()
+{
+ dispose();
+}
+
+void ThreeD_SceneAppearance_TabPage::dispose()
+{
+ m_pLB_Scheme.clear();
+ m_pCB_Shading.clear();
+ m_pCB_ObjectLines.clear();
+ m_pCB_RoundedEdge.clear();
+ TabPage::dispose();
+}
+
void ThreeD_SceneAppearance_TabPage::ActivatePage()
{
updateScheme();
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
index 23749c9da5d3..80720d031e87 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
@@ -38,6 +38,8 @@ public:
vcl::Window* pWindow,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xChartModel,
ControllerLockHelper & rControllerLockHelper );
+ virtual ~ThreeD_SceneAppearance_TabPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual void ActivatePage() SAL_OVERRIDE;
@@ -55,11 +57,11 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
m_xChartModel;
- ListBox* m_pLB_Scheme;
+ VclPtr<ListBox> m_pLB_Scheme;
- CheckBox* m_pCB_Shading;
- CheckBox* m_pCB_ObjectLines;
- CheckBox* m_pCB_RoundedEdge;
+ VclPtr<CheckBox> m_pCB_Shading;
+ VclPtr<CheckBox> m_pCB_ObjectLines;
+ VclPtr<CheckBox> m_pCB_RoundedEdge;
bool m_bUpdateOtherControls;
bool m_bCommitToModel;
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
index 0428b2d892be..b1f4dba975b1 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
@@ -147,6 +147,24 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( vcl::Window* pWindow
m_pMFPerspective->SetAccessibleRelationLabeledBy(m_pCbxPerspective);
}
+ThreeD_SceneGeometry_TabPage::~ThreeD_SceneGeometry_TabPage()
+{
+ dispose();
+}
+
+void ThreeD_SceneGeometry_TabPage::dispose()
+{
+ m_pCbxRightAngledAxes.clear();
+ m_pMFXRotation.clear();
+ m_pMFYRotation.clear();
+ m_pFtZRotation.clear();
+ m_pMFZRotation.clear();
+ m_pCbxPerspective.clear();
+ m_pMFPerspective.clear();
+ TabPage::dispose();
+}
+
+
void ThreeD_SceneGeometry_TabPage::commitPendingChanges()
{
ControllerLockHelperGuard aGuard( m_rControllerLockHelper );
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
index bc19444f6403..cfd16ff23bd6 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
@@ -39,6 +39,8 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > & xSceneProperties,
ControllerLockHelper & rControllerLockHelper );
+ virtual ~ThreeD_SceneGeometry_TabPage();
+ virtual void dispose() SAL_OVERRIDE;
// has to be called in case the dialog was closed with OK
void commitPendingChanges();
@@ -63,17 +65,17 @@ private:
::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > m_xSceneProperties;
- CheckBox* m_pCbxRightAngledAxes;
+ VclPtr<CheckBox> m_pCbxRightAngledAxes;
- MetricField* m_pMFXRotation;
+ VclPtr<MetricField> m_pMFXRotation;
- MetricField* m_pMFYRotation;
+ VclPtr<MetricField> m_pMFYRotation;
- FixedText* m_pFtZRotation;
- MetricField* m_pMFZRotation;
+ VclPtr<FixedText> m_pFtZRotation;
+ VclPtr<MetricField> m_pMFZRotation;
- CheckBox* m_pCbxPerspective;
- MetricField* m_pMFPerspective;
+ VclPtr<CheckBox> m_pCbxPerspective;
+ VclPtr<MetricField> m_pMFPerspective;
//to keep old values when switching to right angled axes
sal_Int64 m_nXRotation;
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index 2c92a7521c1f..a4683a5b5cdb 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -78,7 +78,7 @@ struct LightSource
struct LightSourceInfo
{
- LightButton* pButton;
+ VclPtr<LightButton> pButton;
LightSource aLightSource;
LightSourceInfo();
@@ -301,6 +301,19 @@ void ThreeD_SceneIllumination_TabPage::dispose()
{
delete[] m_pLightSourceInfoList;
m_pLightSourceInfoList = NULL;
+ m_pBtn_Light1.clear();
+ m_pBtn_Light2.clear();
+ m_pBtn_Light3.clear();
+ m_pBtn_Light4.clear();
+ m_pBtn_Light5.clear();
+ m_pBtn_Light6.clear();
+ m_pBtn_Light7.clear();
+ m_pBtn_Light8.clear();
+ m_pLB_LightSource.clear();
+ m_pBtn_LightSource_Color.clear();
+ m_pLB_AmbientLight.clear();
+ m_pBtn_AmbientLight_Color.clear();
+ m_pCtl_Preview.clear();
TabPage::dispose();
}
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
index 06e27ae02650..b7f46f26e964 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
@@ -74,22 +74,22 @@ private:
void applyLightSourceToModel( sal_uInt32 nLightNumber );
void applyLightSourcesToModel();
- LightButton* m_pBtn_Light1;
- LightButton* m_pBtn_Light2;
- LightButton* m_pBtn_Light3;
- LightButton* m_pBtn_Light4;
- LightButton* m_pBtn_Light5;
- LightButton* m_pBtn_Light6;
- LightButton* m_pBtn_Light7;
- LightButton* m_pBtn_Light8;
-
- ColorLB* m_pLB_LightSource;
- PushButton* m_pBtn_LightSource_Color;
-
- ColorLB* m_pLB_AmbientLight;
- PushButton* m_pBtn_AmbientLight_Color;
-
- SvxLightCtl3D* m_pCtl_Preview;
+ VclPtr<LightButton> m_pBtn_Light1;
+ VclPtr<LightButton> m_pBtn_Light2;
+ VclPtr<LightButton> m_pBtn_Light3;
+ VclPtr<LightButton> m_pBtn_Light4;
+ VclPtr<LightButton> m_pBtn_Light5;
+ VclPtr<LightButton> m_pBtn_Light6;
+ VclPtr<LightButton> m_pBtn_Light7;
+ VclPtr<LightButton> m_pBtn_Light8;
+
+ VclPtr<ColorLB> m_pLB_LightSource;
+ VclPtr<PushButton> m_pBtn_LightSource_Color;
+
+ VclPtr<ColorLB> m_pLB_AmbientLight;
+ VclPtr<PushButton> m_pBtn_AmbientLight_Color;
+
+ VclPtr<SvxLightCtl3D> m_pCtl_Preview;
LightSourceInfo* m_pLightSourceInfoList;
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index 0cded264a300..06d810b47815 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -79,6 +79,23 @@ void SchAxisLabelTabPage::dispose()
{
delete m_pOrientHlp;
m_pOrientHlp = NULL;
+ m_pCbShowDescription.clear();
+ m_pFlOrder.clear();
+ m_pRbSideBySide.clear();
+ m_pRbUpDown.clear();
+ m_pRbDownUp.clear();
+ m_pRbAuto.clear();
+ m_pFlTextFlow.clear();
+ m_pCbTextOverlap.clear();
+ m_pCbTextBreak.clear();
+ m_pFtABCD.clear();
+ m_pFlOrient.clear();
+ m_pCtrlDial.clear();
+ m_pFtRotate.clear();
+ m_pNfRotate.clear();
+ m_pCbStacked.clear();
+ m_pFtTextDirection.clear();
+ m_pLbTextDirection.clear();
SfxTabPage::dispose();
}
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
index 95474b805941..2f01f32e5ae8 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
@@ -35,27 +35,27 @@ namespace chart
class SchAxisLabelTabPage : public SfxTabPage
{
private:
- CheckBox* m_pCbShowDescription;
+ VclPtr<CheckBox> m_pCbShowDescription;
- FixedText* m_pFlOrder;
- RadioButton* m_pRbSideBySide;
- RadioButton* m_pRbUpDown;
- RadioButton* m_pRbDownUp;
- RadioButton* m_pRbAuto;
+ VclPtr<FixedText> m_pFlOrder;
+ VclPtr<RadioButton> m_pRbSideBySide;
+ VclPtr<RadioButton> m_pRbUpDown;
+ VclPtr<RadioButton> m_pRbDownUp;
+ VclPtr<RadioButton> m_pRbAuto;
- FixedText* m_pFlTextFlow;
- CheckBox* m_pCbTextOverlap;
- CheckBox* m_pCbTextBreak;
- FixedText* m_pFtABCD;
- FixedText* m_pFlOrient;
- svx::DialControl* m_pCtrlDial;
- FixedText* m_pFtRotate;
- NumericField* m_pNfRotate;
- TriStateBox* m_pCbStacked;
+ VclPtr<FixedText> m_pFlTextFlow;
+ VclPtr<CheckBox> m_pCbTextOverlap;
+ VclPtr<CheckBox> m_pCbTextBreak;
+ VclPtr<FixedText> m_pFtABCD;
+ VclPtr<FixedText> m_pFlOrient;
+ VclPtr<svx::DialControl> m_pCtrlDial;
+ VclPtr<FixedText> m_pFtRotate;
+ VclPtr<NumericField> m_pNfRotate;
+ VclPtr<TriStateBox> m_pCbStacked;
svx::OrientationHelper* m_pOrientHlp;
- FixedText* m_pFtTextDirection;
- TextDirectionListBox* m_pLbTextDirection;
+ VclPtr<FixedText> m_pFtTextDirection;
+ VclPtr<TextDirectionListBox> m_pLbTextDirection;
bool m_bShowStaggeringControls;
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index 9bcb6e8e2938..0d33af228b69 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -84,6 +84,30 @@ AxisPositionsTabPage::AxisPositionsTabPage(vcl::Window* pWindow,const SfxItemSet
m_pLB_PlaceTicks->SetDropDownLineCount( m_pLB_PlaceTicks->GetEntryCount() );
}
+AxisPositionsTabPage::~AxisPositionsTabPage()
+{
+ dispose();
+}
+
+void AxisPositionsTabPage::dispose()
+{
+ m_pFL_AxisLine.clear();
+ m_pLB_CrossesAt.clear();
+ m_pED_CrossesAt.clear();
+ m_pED_CrossesAtCategory.clear();
+ m_pCB_AxisBetweenCategories.clear();
+ m_pFL_Labels.clear();
+ m_pLB_PlaceLabels.clear();
+ m_pED_LabelDistance.clear();
+ m_pCB_TicksInner.clear();
+ m_pCB_TicksOuter.clear();
+ m_pCB_MinorInner.clear();
+ m_pCB_MinorOuter.clear();
+ m_pBxPlaceTicks.clear();
+ m_pLB_PlaceTicks.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* AxisPositionsTabPage::Create(vcl::Window* pWindow,const SfxItemSet* rOutAttrs)
{
return new AxisPositionsTabPage(pWindow, *rOutAttrs);
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.hxx b/chart2/source/controller/dialogs/tp_AxisPositions.hxx
index 3dfeecd8f3ff..ee73d5240366 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.hxx
@@ -33,6 +33,8 @@ class AxisPositionsTabPage : public SfxTabPage
{
public:
AxisPositionsTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~AxisPositionsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
virtual bool FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE;
@@ -52,30 +54,30 @@ private: //methods:
DECL_LINK( PlaceLabelsSelectHdl, void* );
private: //member:
- VclFrame* m_pFL_AxisLine;
- ListBox* m_pLB_CrossesAt;
- FormattedField* m_pED_CrossesAt;
- ComboBox* m_pED_CrossesAtCategory;
- CheckBox* m_pCB_AxisBetweenCategories;
+ VclPtr<VclFrame> m_pFL_AxisLine;
+ VclPtr<ListBox> m_pLB_CrossesAt;
+ VclPtr<FormattedField> m_pED_CrossesAt;
+ VclPtr<ComboBox> m_pED_CrossesAtCategory;
+ VclPtr<CheckBox> m_pCB_AxisBetweenCategories;
- VclFrame* m_pFL_Labels;
- ListBox* m_pLB_PlaceLabels;
- FormattedField* m_pED_LabelDistance;
+ VclPtr<VclFrame> m_pFL_Labels;
+ VclPtr<ListBox> m_pLB_PlaceLabels;
+ VclPtr<FormattedField> m_pED_LabelDistance;
- CheckBox* m_pCB_TicksInner;
- CheckBox* m_pCB_TicksOuter;
+ VclPtr<CheckBox> m_pCB_TicksInner;
+ VclPtr<CheckBox> m_pCB_TicksOuter;
- CheckBox* m_pCB_MinorInner;
- CheckBox* m_pCB_MinorOuter;
+ VclPtr<CheckBox> m_pCB_MinorInner;
+ VclPtr<CheckBox> m_pCB_MinorOuter;
- VclBox* m_pBxPlaceTicks;
- ListBox* m_pLB_PlaceTicks;
+ VclPtr<VclBox> m_pBxPlaceTicks;
+ VclPtr<ListBox> m_pLB_PlaceTicks;
// Not implemented
-// CheckBox* m_pCB_MajorGrid;
-// PushButton* m_pPB_MajorGrid;
-// CheckBox* m_pCB_MinorGrid;
-// PushButton* m_pPB_MinorGrid;
+// VclPtr<CheckBox> m_pCB_MajorGrid;
+// VclPtr<PushButton> m_pPB_MajorGrid;
+// VclPtr<CheckBox> m_pCB_MinorGrid;
+// VclPtr<PushButton> m_pPB_MinorGrid;
SvNumberFormatter* m_pNumFormatter;
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index c7179039ae66..7618ef79adb0 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -56,8 +56,8 @@ private:
DECL_LINK( SelectSchemeHdl, void* );
private:
- CheckBox* m_pCB_3DLook;
- ListBox* m_pLB_Scheme;
+ VclPtr<CheckBox> m_pCB_3DLook;
+ VclPtr<ListBox> m_pLB_Scheme;
};
Dim3DLookResourceGroup::Dim3DLookResourceGroup(VclBuilderContainer* pWindow)
@@ -129,7 +129,7 @@ private:
DECL_LINK( SortByXValuesCheckHdl, void* );
private:
- CheckBox* m_pCB_XValueSorting;
+ VclPtr<CheckBox> m_pCB_XValueSorting;
};
SortByXValuesResourceGroup::SortByXValuesResourceGroup(VclBuilderContainer* pWindow )
@@ -176,10 +176,10 @@ private:
DECL_LINK( StackingEnableHdl, void* );
private:
- CheckBox* m_pCB_Stacked;
- RadioButton* m_pRB_Stack_Y;
- RadioButton* m_pRB_Stack_Y_Percent;
- RadioButton* m_pRB_Stack_Z;
+ VclPtr<CheckBox> m_pCB_Stacked;
+ VclPtr<RadioButton> m_pRB_Stack_Y;
+ VclPtr<RadioButton> m_pRB_Stack_Y_Percent;
+ VclPtr<RadioButton> m_pRB_Stack_Z;
bool m_bShowDeepStacking;
};
@@ -278,7 +278,7 @@ public:
private:
DECL_LINK( SettingChangedHdl, void* );
private:
- CheckBox* m_pCB_RoundedEdge;
+ VclPtr<CheckBox> m_pCB_RoundedEdge;
};
GL3DResourceGroup::GL3DResourceGroup( VclBuilderContainer* pWindow )
@@ -313,6 +313,8 @@ class SplinePropertiesDialog : public ModalDialog
{
public:
SplinePropertiesDialog( vcl::Window* pParent );
+ virtual ~SplinePropertiesDialog() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE;
void fillControls( const ChartTypeParameter& rParameter );
void fillParameter( ChartTypeParameter& rParameter, bool bSmoothLines );
@@ -323,11 +325,11 @@ private:
DECL_LINK( SplineTypeListBoxHdl, void* );
private:
- ListBox* m_pLB_Spline_Type;
+ VclPtr<ListBox> m_pLB_Spline_Type;
- NumericField* m_pMF_SplineResolution;
- FixedText* m_pFT_SplineOrder;
- NumericField* m_pMF_SplineOrder;
+ VclPtr<NumericField> m_pMF_SplineResolution;
+ VclPtr<FixedText> m_pFT_SplineOrder;
+ VclPtr<NumericField> m_pMF_SplineOrder;
};
const sal_uInt16 CUBIC_SPLINE_POS = 0;
@@ -346,6 +348,15 @@ SplinePropertiesDialog::SplinePropertiesDialog( vcl::Window* pParent )
m_pLB_Spline_Type->SetSelectHdl( LINK (this, SplinePropertiesDialog, SplineTypeListBoxHdl ) );
}
+void SplinePropertiesDialog::dispose()
+{
+ m_pLB_Spline_Type.clear();
+ m_pMF_SplineResolution.clear();
+ m_pFT_SplineOrder.clear();
+ m_pMF_SplineOrder.clear();
+ ModalDialog::dispose();
+}
+
void SplinePropertiesDialog::StateChanged( StateChangedType nType )
{
Dialog::StateChanged( nType );
@@ -395,6 +406,8 @@ class SteppedPropertiesDialog : public ModalDialog
{
public:
SteppedPropertiesDialog( vcl::Window* pParent );
+ virtual ~SteppedPropertiesDialog() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE;
void fillControls( const ChartTypeParameter& rParameter );
void fillParameter( ChartTypeParameter& rParameter, bool bSteppedLines );
@@ -404,10 +417,10 @@ public:
private:
private:
- RadioButton* m_pRB_Start;
- RadioButton* m_pRB_End;
- RadioButton* m_pRB_CenterX;
- RadioButton* m_pRB_CenterY;
+ VclPtr<RadioButton> m_pRB_Start;
+ VclPtr<RadioButton> m_pRB_End;
+ VclPtr<RadioButton> m_pRB_CenterX;
+ VclPtr<RadioButton> m_pRB_CenterY;
};
SteppedPropertiesDialog::SteppedPropertiesDialog( vcl::Window* pParent )
@@ -421,6 +434,15 @@ SteppedPropertiesDialog::SteppedPropertiesDialog( vcl::Window* pParent )
SetText(SCH_RESSTR(STR_DLG_STEPPED_LINE_PROPERTIES));
}
+void SteppedPropertiesDialog::dispose()
+{
+ m_pRB_Start.clear();
+ m_pRB_End.clear();
+ m_pRB_CenterX.clear();
+ m_pRB_CenterY.clear();
+ ModalDialog::dispose();
+}
+
void SteppedPropertiesDialog::StateChanged( StateChangedType nType )
{
Dialog::StateChanged( nType );
@@ -480,9 +502,9 @@ private:
SteppedPropertiesDialog& getSteppedPropertiesDialog();
private:
- FixedText* m_pFT_LineType;
- ListBox* m_pLB_LineType;
- PushButton* m_pPB_DetailsDialog;
+ VclPtr<FixedText> m_pFT_LineType;
+ VclPtr<ListBox> m_pLB_LineType;
+ VclPtr<PushButton> m_pPB_DetailsDialog;
boost::scoped_ptr< SplinePropertiesDialog > m_pSplinePropertiesDialog;
boost::scoped_ptr< SteppedPropertiesDialog > m_pSteppedPropertiesDialog;
};
@@ -791,6 +813,9 @@ void ChartTypeTabPage::dispose()
m_pSortByXValuesResourceGroup = NULL;
delete m_pGL3DResourceGroup;
m_pGL3DResourceGroup = NULL;
+ m_pFT_ChooseType.clear();
+ m_pMainTypeList.clear();
+ m_pSubTypeList.clear();
svt::OWizardPage::dispose();
}
diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx
index a8cb43c97703..4ed830b10535 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.hxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.hxx
@@ -78,9 +78,9 @@ protected:
DECL_LINK( SelectSubTypeHdl, void* );
protected:
- FixedText* m_pFT_ChooseType;
- ListBox* m_pMainTypeList;
- ValueSet* m_pSubTypeList;
+ VclPtr<FixedText> m_pFT_ChooseType;
+ VclPtr<ListBox> m_pMainTypeList;
+ VclPtr<ValueSet> m_pSubTypeList;
Dim3DLookResourceGroup* m_pDim3DLookResourceGroup;
StackingResourceGroup* m_pStackingResourceGroup;
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 0aec36a88576..f59465a4460c 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -273,6 +273,34 @@ DataSourceTabPage::DataSourceTabPage(
m_pBTN_DOWN->SetAccessibleName(SCH_RESSTR(STR_BUTTON_DOWN));
}
+DataSourceTabPage::~DataSourceTabPage()
+{
+ dispose();
+}
+
+void DataSourceTabPage::dispose()
+{
+ m_pFT_CAPTION.clear();
+ m_pFT_SERIES.clear();
+ m_pLB_SERIES.clear();
+ m_pBTN_ADD.clear();
+ m_pBTN_REMOVE.clear();
+ m_pBTN_UP.clear();
+ m_pBTN_DOWN.clear();
+ m_pFT_ROLE.clear();
+ m_pLB_ROLE.clear();
+ m_pFT_RANGE.clear();
+ m_pEDT_RANGE.clear();
+ m_pIMB_RANGE_MAIN.clear();
+ m_pFT_CATEGORIES.clear();
+ m_pFT_DATALABELS.clear();
+ m_pEDT_CATEGORIES.clear();
+ m_pIMB_RANGE_CAT.clear();
+ m_pCurrentRangeChoosingField.clear();
+ m_pParentDialog.clear();
+ ::svt::OWizardPage::dispose();
+}
+
void DataSourceTabPage::ActivatePage()
{
OWizardPage::ActivatePage();
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx
index b1ad81353d9e..59b92bf840c3 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.hxx
@@ -58,6 +58,8 @@ public:
ChartTypeTemplateProvider* pTemplateProvider,
Dialog * pParentDialog,
bool bHideDescription = false );
+ virtual ~DataSourceTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void commitPage();
@@ -117,34 +119,34 @@ protected:
void fillRoleListBox();
private:
- FixedText* m_pFT_CAPTION;
- FixedText* m_pFT_SERIES;
- SvTreeListBox* m_pLB_SERIES;
- PushButton* m_pBTN_ADD;
- PushButton* m_pBTN_REMOVE;
- PushButton* m_pBTN_UP;
- PushButton* m_pBTN_DOWN;
-
- FixedText* m_pFT_ROLE;
- SvTabListBox* m_pLB_ROLE;
- FixedText* m_pFT_RANGE;
- Edit* m_pEDT_RANGE;
- PushButton* m_pIMB_RANGE_MAIN;
-
- FixedText* m_pFT_CATEGORIES;
- FixedText* m_pFT_DATALABELS;//used for xy charts
- Edit* m_pEDT_CATEGORIES;
- PushButton* m_pIMB_RANGE_CAT;
+ VclPtr<FixedText> m_pFT_CAPTION;
+ VclPtr<FixedText> m_pFT_SERIES;
+ VclPtr<SvTreeListBox> m_pLB_SERIES;
+ VclPtr<PushButton> m_pBTN_ADD;
+ VclPtr<PushButton> m_pBTN_REMOVE;
+ VclPtr<PushButton> m_pBTN_UP;
+ VclPtr<PushButton> m_pBTN_DOWN;
+
+ VclPtr<FixedText> m_pFT_ROLE;
+ VclPtr<SvTabListBox> m_pLB_ROLE;
+ VclPtr<FixedText> m_pFT_RANGE;
+ VclPtr<Edit> m_pEDT_RANGE;
+ VclPtr<PushButton> m_pIMB_RANGE_MAIN;
+
+ VclPtr<FixedText> m_pFT_CATEGORIES;
+ VclPtr<FixedText> m_pFT_DATALABELS;//used for xy charts
+ VclPtr<Edit> m_pEDT_CATEGORIES;
+ VclPtr<PushButton> m_pIMB_RANGE_CAT;
OUString m_aFixedTextRange;
ChartTypeTemplateProvider * m_pTemplateProvider;
DialogModel & m_rDialogModel;
- Edit * m_pCurrentRangeChoosingField;
+ VclPtr<Edit> m_pCurrentRangeChoosingField;
bool m_bIsDirty;
sal_Int32 m_nLastChartTypeGroupIndex;
- Dialog * m_pParentDialog;
+ VclPtr<Dialog> m_pParentDialog;
TabPageNotifiable * m_pTabPageNotifiable;
};
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
index 707324fb8610..31aef92a297f 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
@@ -41,6 +41,18 @@ SchLegendPosTabPage::SchLegendPosTabPage(vcl::Window* pWindow, const SfxItemSet&
m_pLbTextDirection->SetDropDownLineCount(3);
}
+SchLegendPosTabPage::~SchLegendPosTabPage()
+{
+ dispose();
+}
+
+void SchLegendPosTabPage::dispose()
+{
+ m_pLbTextDirection.clear();
+ SfxTabPage::dispose();
+}
+
+
SfxTabPage* SchLegendPosTabPage::Create(vcl::Window* pWindow, const SfxItemSet* rOutAttrs)
{
return new SchLegendPosTabPage(pWindow, *rOutAttrs);
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.hxx b/chart2/source/controller/dialogs/tp_LegendPosition.hxx
index 0d4f4acf0d07..bbf8e1d54f2b 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.hxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.hxx
@@ -33,10 +33,12 @@ class SchLegendPosTabPage : public SfxTabPage
private:
LegendPositionResources m_aLegendPositionResources;
- TextDirectionListBox* m_pLbTextDirection;
+ VclPtr<TextDirectionListBox> m_pLbTextDirection;
public:
SchLegendPosTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs);
+ virtual ~SchLegendPosTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE;
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
index ff9db6088675..00fc6fe96a62 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
@@ -44,6 +44,22 @@ PolarOptionsTabPage::PolarOptionsTabPage( vcl::Window* pWindow,const SfxItemSet&
m_pAngleDial->SetLinkedField( m_pNF_StartingAngle );
}
+PolarOptionsTabPage::~PolarOptionsTabPage()
+{
+ dispose();
+}
+
+void PolarOptionsTabPage::dispose()
+{
+ m_pCB_Clockwise.clear();
+ m_pFL_StartingAngle.clear();
+ m_pAngleDial.clear();
+ m_pNF_StartingAngle.clear();
+ m_pFL_PlotOptions.clear();
+ m_pCB_IncludeHiddenCells.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* PolarOptionsTabPage::Create( vcl::Window* pWindow,const SfxItemSet* rOutAttrs )
{
return new PolarOptionsTabPage( pWindow, *rOutAttrs );
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.hxx b/chart2/source/controller/dialogs/tp_PolarOptions.hxx
index 4ade72189cf4..29e672857bb1 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.hxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.hxx
@@ -33,18 +33,20 @@ class PolarOptionsTabPage : public SfxTabPage
public:
PolarOptionsTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~PolarOptionsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE;
virtual void Reset(const SfxItemSet* rInAttrs) SAL_OVERRIDE;
private:
- CheckBox* m_pCB_Clockwise;
- VclFrame* m_pFL_StartingAngle;
- svx::DialControl* m_pAngleDial;
- NumericField* m_pNF_StartingAngle;
- VclFrame* m_pFL_PlotOptions;
- CheckBox* m_pCB_IncludeHiddenCells;
+ VclPtr<CheckBox> m_pCB_Clockwise;
+ VclPtr<VclFrame> m_pFL_StartingAngle;
+ VclPtr<svx::DialControl> m_pAngleDial;
+ VclPtr<NumericField> m_pNF_StartingAngle;
+ VclPtr<VclFrame> m_pFL_PlotOptions;
+ VclPtr<CheckBox> m_pCB_IncludeHiddenCells;
};
} //namespace chart
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 108aac0c77a8..700c3e04556f 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -122,6 +122,30 @@ RangeChooserTabPage::RangeChooserTabPage( vcl::Window* pParent
m_pEd_TimeEnd->SetModifyHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
}
+RangeChooserTabPage::~RangeChooserTabPage()
+{
+ dispose();
+}
+
+void RangeChooserTabPage::dispose()
+{
+ m_pFT_Caption.clear();
+ m_pFT_Range.clear();
+ m_pED_Range.clear();
+ m_pIB_Range.clear();
+ m_pRB_Rows.clear();
+ m_pRB_Columns.clear();
+ m_pCB_FirstRowAsLabel.clear();
+ m_pCB_FirstColumnAsLabel.clear();
+ m_pFTTitle.clear();
+ m_pCB_TimeBased.clear();
+ m_pEd_TimeStart.clear();
+ m_pEd_TimeEnd.clear();
+ m_pParentDialog.clear();
+ OWizardPage::dispose();
+}
+
+
void RangeChooserTabPage::ActivatePage()
{
OWizardPage::ActivatePage();
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
index f7a0791fd6ff..5bcda3593f8b 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
@@ -48,6 +48,8 @@ public:
, ChartTypeTemplateProvider* pTemplateProvider
, Dialog * pParentDialog
, bool bHideDescription = false );
+ virtual ~RangeChooserTabPage();
+ virtual void dispose() SAL_OVERRIDE;
//RangeSelectionListenerParent
virtual void listeningFinished( const OUString & rNewRange ) SAL_OVERRIDE;
@@ -75,21 +77,21 @@ protected: //methods
protected: //member
- FixedText* m_pFT_Caption;
- FixedText* m_pFT_Range;
- Edit* m_pED_Range;
- PushButton* m_pIB_Range;
+ VclPtr<FixedText> m_pFT_Caption;
+ VclPtr<FixedText> m_pFT_Range;
+ VclPtr<Edit> m_pED_Range;
+ VclPtr<PushButton> m_pIB_Range;
- RadioButton* m_pRB_Rows;
- RadioButton* m_pRB_Columns;
+ VclPtr<RadioButton> m_pRB_Rows;
+ VclPtr<RadioButton> m_pRB_Columns;
- CheckBox* m_pCB_FirstRowAsLabel;
- CheckBox* m_pCB_FirstColumnAsLabel;
- FixedText* m_pFTTitle;
+ VclPtr<CheckBox> m_pCB_FirstRowAsLabel;
+ VclPtr<CheckBox> m_pCB_FirstColumnAsLabel;
+ VclPtr<FixedText> m_pFTTitle;
- CheckBox* m_pCB_TimeBased;
- Edit* m_pEd_TimeStart;
- Edit* m_pEd_TimeEnd;
+ VclPtr<CheckBox> m_pCB_TimeBased;
+ VclPtr<Edit> m_pEd_TimeStart;
+ VclPtr<Edit> m_pEd_TimeEnd;
sal_Int32 m_nChangingControlCalls;
bool m_bIsDirty;
@@ -105,7 +107,7 @@ protected: //member
ChartTypeTemplateProvider* m_pTemplateProvider;
DialogModel & m_rDialogModel;
- Dialog * m_pParentDialog;
+ VclPtr<Dialog> m_pParentDialog;
TabPageNotifiable * m_pTabPageNotifiable;
};
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index bb92e78c095d..9db6bda24daf 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -122,6 +122,41 @@ ScaleTabPage::ScaleTabPage(vcl::Window* pWindow,const SfxItemSet& rInAttrs) :
HideAllControls();
}
+ScaleTabPage::~ScaleTabPage()
+{
+ dispose();
+}
+
+void ScaleTabPage::dispose()
+{
+ m_pCbxReverse.clear();
+ m_pCbxLogarithm.clear();
+ m_pBxType.clear();
+ m_pLB_AxisType.clear();
+ m_pBxMinMax.clear();
+ m_pFmtFldMin.clear();
+ m_pCbxAutoMin.clear();
+ m_pFmtFldMax.clear();
+ m_pCbxAutoMax.clear();
+ m_pBxResolution.clear();
+ m_pLB_TimeResolution.clear();
+ m_pCbx_AutoTimeResolution.clear();
+ m_pTxtMain.clear();
+ m_pFmtFldStepMain.clear();
+ m_pMt_MainDateStep.clear();
+ m_pLB_MainTimeUnit.clear();
+ m_pCbxAutoStepMain.clear();
+ m_pTxtHelpCount.clear();
+ m_pTxtHelp.clear();
+ m_pMtStepHelp.clear();
+ m_pLB_HelpTimeUnit.clear();
+ m_pCbxAutoStepHelp.clear();
+ m_pFmtFldOrigin.clear();
+ m_pCbxAutoOrigin.clear();
+ m_pBxOrigin.clear();
+ SfxTabPage::dispose();
+}
+
IMPL_LINK( ScaleTabPage, FmtFieldModifiedHdl, FormattedField*, pFmtFied )
{
if( pFmtFied )
diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx
index ff8bbe7e9d1b..529641da2a6e 100644
--- a/chart2/source/controller/dialogs/tp_Scale.hxx
+++ b/chart2/source/controller/dialogs/tp_Scale.hxx
@@ -33,6 +33,8 @@ class ScaleTabPage : public SfxTabPage
{
public:
ScaleTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~ScaleTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
virtual bool FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE;
@@ -48,38 +50,38 @@ public:
virtual void StateChanged( StateChangedType nType ) SAL_OVERRIDE;
private:
- CheckBox* m_pCbxReverse;
- CheckBox* m_pCbxLogarithm;
-
- VclBox* m_pBxType;
- ListBox* m_pLB_AxisType;
-
- VclGrid* m_pBxMinMax;
- FormattedField* m_pFmtFldMin;
- CheckBox* m_pCbxAutoMin;
-
- FormattedField* m_pFmtFldMax;
- CheckBox* m_pCbxAutoMax;
-
- VclBox* m_pBxResolution;
- ListBox* m_pLB_TimeResolution;
- CheckBox* m_pCbx_AutoTimeResolution;
-
- FixedText* m_pTxtMain;
- FormattedField* m_pFmtFldStepMain;
- MetricField* m_pMt_MainDateStep;
- ListBox* m_pLB_MainTimeUnit;
- CheckBox* m_pCbxAutoStepMain;
-
- FixedText* m_pTxtHelpCount;
- FixedText* m_pTxtHelp;
- MetricField* m_pMtStepHelp;
- ListBox* m_pLB_HelpTimeUnit;
- CheckBox* m_pCbxAutoStepHelp;
-
- FormattedField* m_pFmtFldOrigin;
- CheckBox* m_pCbxAutoOrigin;
- VclBox* m_pBxOrigin;
+ VclPtr<CheckBox> m_pCbxReverse;
+ VclPtr<CheckBox> m_pCbxLogarithm;
+
+ VclPtr<VclBox> m_pBxType;
+ VclPtr<ListBox> m_pLB_AxisType;
+
+ VclPtr<VclGrid> m_pBxMinMax;
+ VclPtr<FormattedField> m_pFmtFldMin;
+ VclPtr<CheckBox> m_pCbxAutoMin;
+
+ VclPtr<FormattedField> m_pFmtFldMax;
+ VclPtr<CheckBox> m_pCbxAutoMax;
+
+ VclPtr<VclBox> m_pBxResolution;
+ VclPtr<ListBox> m_pLB_TimeResolution;
+ VclPtr<CheckBox> m_pCbx_AutoTimeResolution;
+
+ VclPtr<FixedText> m_pTxtMain;
+ VclPtr<FormattedField> m_pFmtFldStepMain;
+ VclPtr<MetricField> m_pMt_MainDateStep;
+ VclPtr<ListBox> m_pLB_MainTimeUnit;
+ VclPtr<CheckBox> m_pCbxAutoStepMain;
+
+ VclPtr<FixedText> m_pTxtHelpCount;
+ VclPtr<FixedText> m_pTxtHelp;
+ VclPtr<MetricField> m_pMtStepHelp;
+ VclPtr<ListBox> m_pLB_HelpTimeUnit;
+ VclPtr<CheckBox> m_pCbxAutoStepHelp;
+
+ VclPtr<FormattedField> m_pFmtFldOrigin;
+ VclPtr<CheckBox> m_pCbxAutoOrigin;
+ VclPtr<VclBox> m_pBxOrigin;
double fMin;
double fMax;
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
index 4f4a986df57a..0a5b50485d71 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
@@ -63,6 +63,30 @@ SchOptionTabPage::SchOptionTabPage(vcl::Window* pWindow,const SfxItemSet& rInAtt
m_pRbtAxis2->SetClickHdl( LINK( this, SchOptionTabPage, EnableHdl ));
}
+SchOptionTabPage::~SchOptionTabPage()
+{
+ dispose();
+}
+
+void SchOptionTabPage::dispose()
+{
+ m_pGrpAxis.clear();
+ m_pRbtAxis1.clear();
+ m_pRbtAxis2.clear();
+ m_pGrpBar.clear();
+ m_pMTGap.clear();
+ m_pMTOverlap.clear();
+ m_pCBConnect.clear();
+ m_pCBAxisSideBySide.clear();
+ m_pGrpPlotOptions.clear();
+ m_pGridPlotOptions.clear();
+ m_pRB_DontPaint.clear();
+ m_pRB_AssumeZero.clear();
+ m_pRB_ContinueLine.clear();
+ m_pCBIncludeHiddenCells.clear();
+ SfxTabPage::dispose();
+}
+
IMPL_LINK_NOARG(SchOptionTabPage, EnableHdl)
{
if( m_nAllSeriesAxisIndex == 0 )
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
index f11c8e5ea24a..b50f90fff4fe 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
@@ -31,6 +31,8 @@ class SchOptionTabPage : public SfxTabPage
{
public:
SchOptionTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs);
+ virtual ~SchOptionTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE;
@@ -42,23 +44,23 @@ private: //methods
void AdaptControlPositionsAndVisibility();
private: //member
- VclFrame* m_pGrpAxis;
- RadioButton* m_pRbtAxis1;
- RadioButton* m_pRbtAxis2;
-
- VclFrame* m_pGrpBar;
- MetricField* m_pMTGap;
- MetricField* m_pMTOverlap;
- CheckBox* m_pCBConnect;
- CheckBox* m_pCBAxisSideBySide;
-
- VclFrame* m_pGrpPlotOptions;
- VclGrid* m_pGridPlotOptions;
- RadioButton* m_pRB_DontPaint;
- RadioButton* m_pRB_AssumeZero;
- RadioButton* m_pRB_ContinueLine;
-
- CheckBox* m_pCBIncludeHiddenCells;
+ VclPtr<VclFrame> m_pGrpAxis;
+ VclPtr<RadioButton> m_pRbtAxis1;
+ VclPtr<RadioButton> m_pRbtAxis2;
+
+ VclPtr<VclFrame> m_pGrpBar;
+ VclPtr<MetricField> m_pMTGap;
+ VclPtr<MetricField> m_pMTOverlap;
+ VclPtr<CheckBox> m_pCBConnect;
+ VclPtr<CheckBox> m_pCBAxisSideBySide;
+
+ VclPtr<VclGrid> m_pGrpPlotOptions;
+ VclPtr<VclGrid> m_pGridPlotOptions;
+ VclPtr<RadioButton> m_pRB_DontPaint;
+ VclPtr<RadioButton> m_pRB_AssumeZero;
+ VclPtr<RadioButton> m_pRB_ContinueLine;
+
+ VclPtr<CheckBox> m_pCBIncludeHiddenCells;
DECL_LINK(EnableHdl, void * );
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
index a83373dcbc8b..c69eb46a482b 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
@@ -64,6 +64,13 @@ void SchAlignmentTabPage::dispose()
{
delete m_pOrientHlp;
m_pOrientHlp = NULL;
+ m_pCtrlDial.clear();
+ m_pFtRotate.clear();
+ m_pNfRotate.clear();
+ m_pCbStacked.clear();
+ m_pFtTextDirection.clear();
+ m_pLbTextDirection.clear();
+ m_pFtABCD.clear();
SfxTabPage::dispose();
}
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.hxx b/chart2/source/controller/dialogs/tp_TitleRotation.hxx
index e5d2e240a153..8450d6a4a202 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.hxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx
@@ -31,14 +31,14 @@ namespace chart
class SchAlignmentTabPage : public SfxTabPage
{
private:
- svx::DialControl* m_pCtrlDial;
- FixedText* m_pFtRotate;
- NumericField* m_pNfRotate;
- TriStateBox* m_pCbStacked;
+ VclPtr<svx::DialControl> m_pCtrlDial;
+ VclPtr<FixedText> m_pFtRotate;
+ VclPtr<NumericField> m_pNfRotate;
+ VclPtr<TriStateBox> m_pCbStacked;
svx::OrientationHelper* m_pOrientHlp;
- FixedText* m_pFtTextDirection;
- TextDirectionListBox* m_pLbTextDirection;
- FixedText* m_pFtABCD;
+ VclPtr<FixedText> m_pFtTextDirection;
+ VclPtr<TextDirectionListBox> m_pLbTextDirection;
+ VclPtr<FixedText> m_pFtABCD;
public:
SchAlignmentTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs, bool bWithRotation = true);
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
index 90088b0b66ae..23986e1f2690 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
@@ -57,6 +57,19 @@ TitlesAndObjectsTabPage::TitlesAndObjectsTabPage( svt::OWizardMachine* pParent
m_pCB_Grid_Z->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl ));
}
+TitlesAndObjectsTabPage::~TitlesAndObjectsTabPage()
+{
+ dispose();
+}
+
+void TitlesAndObjectsTabPage::dispose()
+{
+ m_pCB_Grid_X.clear();
+ m_pCB_Grid_Y.clear();
+ m_pCB_Grid_Z.clear();
+ OWizardPage::dispose();
+}
+
void TitlesAndObjectsTabPage::initializePage()
{
m_bCommitToModel = false;
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
index 26e2cb2aebae..520453ce0452 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
@@ -44,6 +44,8 @@ public:
::com::sun::star::chart2::XChartDocument >& xChartModel
, const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& xContext );
+ virtual ~TitlesAndObjectsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual void initializePage() SAL_OVERRIDE;
virtual bool commitPage( ::svt::WizardTypes::CommitPageReason eReason ) SAL_OVERRIDE;
@@ -57,9 +59,9 @@ protected:
boost::scoped_ptr< TitleResources > m_xTitleResources;
boost::scoped_ptr< LegendPositionResources > m_xLegendPositionResources;
- CheckBox* m_pCB_Grid_X;
- CheckBox* m_pCB_Grid_Y;
- CheckBox* m_pCB_Grid_Z;
+ VclPtr<CheckBox> m_pCB_Grid_X;
+ VclPtr<CheckBox> m_pCB_Grid_Y;
+ VclPtr<CheckBox> m_pCB_Grid_Z;
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > m_xChartModel;
diff --git a/chart2/source/controller/inc/dlg_ChartType.hxx b/chart2/source/controller/inc/dlg_ChartType.hxx
index 008ba07b3310..d8fecf56782e 100644
--- a/chart2/source/controller/inc/dlg_ChartType.hxx
+++ b/chart2/source/controller/inc/dlg_ChartType.hxx
@@ -41,7 +41,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
private:
- ChartTypeTabPage* m_pChartTypeTabPage;
+ VclPtr<ChartTypeTabPage> m_pChartTypeTabPage;
::com::sun::star::uno::Reference<
::com::sun::star::frame::XModel > m_xChartModel;
diff --git a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
index ce4f638dd442..a71d86aaf3ac 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
@@ -119,7 +119,7 @@ private:
com::sun::star::uno::Reference<
com::sun::star::awt::XWindow > m_xParentWindow;
- CreationWizard* m_pDialog;
+ VclPtr<CreationWizard> m_pDialog;
bool m_bUnlockControllersOnExecute;
};
diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx
index 4432674fe6be..cff3f4fbbdc0 100644
--- a/chart2/source/controller/inc/dlg_DataEditor.hxx
+++ b/chart2/source/controller/inc/dlg_DataEditor.hxx
@@ -67,7 +67,7 @@ private:
bool m_bReadOnly;
boost::scoped_ptr<DataBrowser> m_xBrwData;
- ToolBox* m_pTbxData;
+ VclPtr<ToolBox> m_pTbxData;
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > m_xChartDoc;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx
index 5c6a60d72c36..bc3d22da9c8b 100644
--- a/chart2/source/controller/inc/dlg_DataSource.hxx
+++ b/chart2/source/controller/inc/dlg_DataSource.hxx
@@ -68,11 +68,11 @@ protected:
::std::unique_ptr< DialogModel > m_apDialogModel;
private:
- DataSourceTabControl* m_pTabControl;
- OKButton* m_pBtnOK;
+ VclPtr<DataSourceTabControl> m_pTabControl;
+ VclPtr<OKButton> m_pBtnOK;
- RangeChooserTabPage * m_pRangeChooserTabePage;
- DataSourceTabPage * m_pDataSourceTabPage;
+ VclPtr<RangeChooserTabPage> m_pRangeChooserTabePage;
+ VclPtr<DataSourceTabPage> m_pDataSourceTabPage;
bool m_bRangeChooserTabIsValid;
bool m_bDataSourceTabIsValid;
diff --git a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
index 960edffe422d..1ec0829f4eac 100644
--- a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
+++ b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
@@ -43,15 +43,17 @@ struct InsertAxisOrGridDialogData
class SchAxisDlg : public ModalDialog
{
protected:
- CheckBox* m_pCbPrimaryX;
- CheckBox* m_pCbPrimaryY;
- CheckBox* m_pCbPrimaryZ;
- CheckBox* m_pCbSecondaryX;
- CheckBox* m_pCbSecondaryY;
- CheckBox* m_pCbSecondaryZ;
+ VclPtr<CheckBox> m_pCbPrimaryX;
+ VclPtr<CheckBox> m_pCbPrimaryY;
+ VclPtr<CheckBox> m_pCbPrimaryZ;
+ VclPtr<CheckBox> m_pCbSecondaryX;
+ VclPtr<CheckBox> m_pCbSecondaryY;
+ VclPtr<CheckBox> m_pCbSecondaryZ;
public:
SchAxisDlg(vcl::Window* pParent, const InsertAxisOrGridDialogData& rInput, bool bAxisDlg=true);
+ virtual ~SchAxisDlg();
+ virtual void dispose() SAL_OVERRIDE;
void getResult( InsertAxisOrGridDialogData& rOutput );
};
diff --git a/chart2/source/controller/inc/dlg_View3D.hxx b/chart2/source/controller/inc/dlg_View3D.hxx
index 64228fe8ea85..0ef93e8d1fea 100644
--- a/chart2/source/controller/inc/dlg_View3D.hxx
+++ b/chart2/source/controller/inc/dlg_View3D.hxx
@@ -47,11 +47,11 @@ public:
virtual short Execute() SAL_OVERRIDE;
private:
- TabControl* m_pTabControl;
+ VclPtr<TabControl> m_pTabControl;
- ThreeD_SceneGeometry_TabPage* m_pGeometry;
- ThreeD_SceneAppearance_TabPage* m_pAppearance;
- ThreeD_SceneIllumination_TabPage* m_pIllumination;
+ VclPtr<ThreeD_SceneGeometry_TabPage> m_pGeometry;
+ VclPtr<ThreeD_SceneAppearance_TabPage> m_pAppearance;
+ VclPtr<ThreeD_SceneIllumination_TabPage> m_pIllumination;
ControllerLockHelper m_aControllerLocker;
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
index 0ad485c39990..85917809db48 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -67,36 +67,36 @@ public:
private:
// category
- RadioButton* m_pRbNone;
- RadioButton* m_pRbConst;
- RadioButton* m_pRbPercent;
- RadioButton* m_pRbFunction;
- RadioButton* m_pRbRange;
- ListBox* m_pLbFunction;
+ VclPtr<RadioButton> m_pRbNone;
+ VclPtr<RadioButton> m_pRbConst;
+ VclPtr<RadioButton> m_pRbPercent;
+ VclPtr<RadioButton> m_pRbFunction;
+ VclPtr<RadioButton> m_pRbRange;
+ VclPtr<ListBox> m_pLbFunction;
// parameters
- VclFrame* m_pFlParameters;
- VclBox* m_pBxPositive;
- MetricField* m_pMfPositive;
- Edit* m_pEdRangePositive;
- PushButton* m_pIbRangePositive;
- VclBox* m_pBxNegative;
- MetricField* m_pMfNegative;
- Edit* m_pEdRangeNegative;
- PushButton* m_pIbRangeNegative;
- CheckBox* m_pCbSyncPosNeg;
+ VclPtr<VclFrame> m_pFlParameters;
+ VclPtr<VclBox> m_pBxPositive;
+ VclPtr<MetricField> m_pMfPositive;
+ VclPtr<Edit> m_pEdRangePositive;
+ VclPtr<PushButton> m_pIbRangePositive;
+ VclPtr<VclBox> m_pBxNegative;
+ VclPtr<MetricField> m_pMfNegative;
+ VclPtr<Edit> m_pEdRangeNegative;
+ VclPtr<PushButton> m_pIbRangeNegative;
+ VclPtr<CheckBox> m_pCbSyncPosNeg;
// indicator
- RadioButton* m_pRbBoth;
- RadioButton* m_pRbPositive;
- RadioButton* m_pRbNegative;
- FixedImage* m_pFiBoth;
- FixedImage* m_pFiPositive;
- FixedImage* m_pFiNegative;
+ VclPtr<RadioButton> m_pRbBoth;
+ VclPtr<RadioButton> m_pRbPositive;
+ VclPtr<RadioButton> m_pRbNegative;
+ VclPtr<FixedImage> m_pFiBoth;
+ VclPtr<FixedImage> m_pFiPositive;
+ VclPtr<FixedImage> m_pFiNegative;
- FixedText* m_pUIStringPos;
- FixedText* m_pUIStringNeg;
- FixedText* m_pUIStringRbRange;
+ VclPtr<FixedText> m_pUIStringPos;
+ VclPtr<FixedText> m_pUIStringNeg;
+ VclPtr<FixedText> m_pUIStringRbRange;
SvxChartKindError m_eErrorKind;
SvxChartIndicate m_eIndicate;
@@ -116,9 +116,9 @@ private:
double m_fPlusValue;
double m_fMinusValue;
- Dialog * m_pParentDialog;
+ VclPtr<Dialog> m_pParentDialog;
boost::scoped_ptr< RangeSelectionHelper > m_apRangeSelectionHelper;
- Edit * m_pCurrentRangeChoosingField;
+ VclPtr<Edit> m_pCurrentRangeChoosingField;
bool m_bHasInternalDataProvider;
bool m_bEnableDataTableDialog;
diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx
index c8292db200af..7801895a6308 100644
--- a/chart2/source/controller/inc/res_LegendPosition.hxx
+++ b/chart2/source/controller/inc/res_LegendPosition.hxx
@@ -60,12 +60,12 @@ private:
::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext> m_xCC;
- CheckBox* m_pCbxShow;
+ VclPtr<CheckBox> m_pCbxShow;
- RadioButton* m_pRbtLeft;
- RadioButton* m_pRbtRight;
- RadioButton* m_pRbtTop;
- RadioButton* m_pRbtBottom;
+ VclPtr<RadioButton> m_pRbtLeft;
+ VclPtr<RadioButton> m_pRbtRight;
+ VclPtr<RadioButton> m_pRbtTop;
+ VclPtr<RadioButton> m_pRbtBottom;
Link m_aChangeLink;
};
diff --git a/chart2/source/controller/inc/res_Titles.hxx b/chart2/source/controller/inc/res_Titles.hxx
index 1e4e8c67cd91..396c87af598f 100644
--- a/chart2/source/controller/inc/res_Titles.hxx
+++ b/chart2/source/controller/inc/res_Titles.hxx
@@ -40,22 +40,22 @@ public:
void ClearModifyFlag();
private:
- FixedText* m_pFT_Main;
- FixedText* m_pFT_Sub;
- Edit* m_pEd_Main;
- Edit* m_pEd_Sub;
+ VclPtr<FixedText> m_pFT_Main;
+ VclPtr<FixedText> m_pFT_Sub;
+ VclPtr<Edit> m_pEd_Main;
+ VclPtr<Edit> m_pEd_Sub;
- FixedText* m_pFT_XAxis;
- FixedText* m_pFT_YAxis;
- FixedText* m_pFT_ZAxis;
- Edit* m_pEd_XAxis;
- Edit* m_pEd_YAxis;
- Edit* m_pEd_ZAxis;
+ VclPtr<FixedText> m_pFT_XAxis;
+ VclPtr<FixedText> m_pFT_YAxis;
+ VclPtr<FixedText> m_pFT_ZAxis;
+ VclPtr<Edit> m_pEd_XAxis;
+ VclPtr<Edit> m_pEd_YAxis;
+ VclPtr<Edit> m_pEd_ZAxis;
- FixedText* m_pFT_SecondaryXAxis;
- FixedText* m_pFT_SecondaryYAxis;
- Edit* m_pEd_SecondaryXAxis;
- Edit* m_pEd_SecondaryYAxis;
+ VclPtr<FixedText> m_pFT_SecondaryXAxis;
+ VclPtr<FixedText> m_pFT_SecondaryYAxis;
+ VclPtr<Edit> m_pEd_SecondaryXAxis;
+ VclPtr<Edit> m_pEd_SecondaryYAxis;
};
} //namespace chart
diff --git a/chart2/source/controller/main/ChartController.hxx b/chart2/source/controller/main/ChartController.hxx
index 81382eadaab1..827e549c8e6b 100644
--- a/chart2/source/controller/main/ChartController.hxx
+++ b/chart2/source/controller/main/ChartController.hxx
@@ -508,7 +508,7 @@ private:
TheModelRef m_aModel;
//view
- ChartWindow* m_pChartWindow;
+ VclPtr<ChartWindow> m_pChartWindow;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xViewWindow;
::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > m_xChartView;
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index 4a37ec38e583..d5275e1a0808 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -64,7 +64,7 @@ ChartWindow::ChartWindow( ChartController* pController, vcl::Window* pParent, Wi
{
m_pOpenGLWindow->Show();
uno::Reference< chart2::X3DChartWindowProvider > x3DWindowProvider(pController->getModel(), uno::UNO_QUERY_THROW);
- sal_uInt64 nWindowPtr = reinterpret_cast<sal_uInt64>(m_pOpenGLWindow);
+ sal_uInt64 nWindowPtr = reinterpret_cast<sal_uInt64>(m_pOpenGLWindow.get());
x3DWindowProvider->setWindow(nWindowPtr);
x3DWindowProvider->update();
}
@@ -83,8 +83,7 @@ void ChartWindow::dispose()
x3DWindowProvider->setWindow(0);
x3DWindowProvider->update();
}
- delete m_pOpenGLWindow;
- m_pOpenGLWindow = NULL;
+ m_pOpenGLWindow.clear();
vcl::Window::dispose();
}
diff --git a/chart2/source/controller/main/ChartWindow.hxx b/chart2/source/controller/main/ChartWindow.hxx
index 73be579f6d6d..cd0afaa07d0a 100644
--- a/chart2/source/controller/main/ChartWindow.hxx
+++ b/chart2/source/controller/main/ChartWindow.hxx
@@ -68,7 +68,7 @@ public:
private:
ChartController* m_pWindowController;
bool m_bInPaint;
- OpenGLWindow* m_pOpenGLWindow;
+ VclPtr<OpenGLWindow> m_pOpenGLWindow;
void adjustHighContrastMode();
};
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 52b5f1f6d4e4..afea41029282 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -252,7 +252,7 @@ void ShapeController::executeDispatch_FormatLine()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow );
+ vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() );
DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
@@ -292,7 +292,7 @@ void ShapeController::executeDispatch_FormatArea()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow );
+ vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() );
DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
@@ -335,7 +335,7 @@ void ShapeController::executeDispatch_TextAttributes()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow );
+ vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() );
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pParent && pDrawViewWrapper )
{
@@ -372,7 +372,7 @@ void ShapeController::executeDispatch_TransformDialog()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow );
+ vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() );
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pParent && pDrawViewWrapper )
{
@@ -541,7 +541,7 @@ void ShapeController::executeDispatch_FontDialog()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow );
+ vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() );
DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
@@ -564,7 +564,7 @@ void ShapeController::executeDispatch_ParagraphDialog()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow );
+ vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() );
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pParent && pDrawViewWrapper )
{
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 6b778138309c..3fe29b0d7c0b 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -1487,7 +1487,7 @@ IMPL_LINK_NOARG(GL3DBarChart, UpdateTimerHdl)
void GL3DBarChart::setOpenGLWindow(OpenGLWindow* pWindow)
{
- if (mpWindow != pWindow)
+ if (mpWindow.get() != pWindow)
{
mpWindow = pWindow;
Size aSize = mpWindow->GetSizePixel();
diff --git a/chart2/source/view/inc/GL3DBarChart.hxx b/chart2/source/view/inc/GL3DBarChart.hxx
index c68a38510d66..eaff13a4ed93 100644
--- a/chart2/source/view/inc/GL3DBarChart.hxx
+++ b/chart2/source/view/inc/GL3DBarChart.hxx
@@ -124,7 +124,7 @@ private:
boost::ptr_vector<opengl3D::Renderable3DObject> maShapes;
boost::scoped_ptr<opengl3D::OpenGL3DRenderer> mpRenderer;
- OpenGLWindow* mpWindow;
+ VclPtr<OpenGLWindow> mpWindow;
opengl3D::Camera* mpCamera;
bool mbValidContext;
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index b9a1e37f348e..9ac3ad84d253 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1090,7 +1090,7 @@ public:
private:
ChartView* mpView;
bool mbContextDestroyed;
- OpenGLWindow* mpWindow;
+ VclPtr<OpenGLWindow> mpWindow;
};
GL2DRenderer::GL2DRenderer(ChartView* pView):
diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx
index bf1f86e441d9..ba7da08dbc43 100644
--- a/compilerplugins/clang/vclwidgets.cxx
+++ b/compilerplugins/clang/vclwidgets.cxx
@@ -8,6 +8,7 @@
*/
#include <string>
+#include <iostream>
#include "plugin.hxx"
#include "compat.hxx"
@@ -41,6 +42,8 @@ public:
bool VisitCXXDestructorDecl(const CXXDestructorDecl *);
+ bool VisitCXXDeleteExpr(const CXXDeleteExpr *);
+
private:
bool isDisposeCallingSuperclassDispose(const CXXMethodDecl* pMethodDecl);
};
@@ -55,10 +58,11 @@ bool BaseCheckNotWindowSubclass(const CXXRecordDecl *BaseDefinition, void *) {
}
bool isDerivedFromWindow(const CXXRecordDecl *decl) {
- if (!decl->hasDefinition())
- return false;
if (decl->getQualifiedNameAsString().compare("vcl::Window") == 0)
return true;
+ if (!decl->hasDefinition()) {
+ return false;
+ }
if (// not sure what hasAnyDependentBases() does,
// but it avoids classes we don't want, e.g. WeakAggComponentImplHelper1
!decl->hasAnyDependentBases() &&
@@ -68,9 +72,11 @@ bool isDerivedFromWindow(const CXXRecordDecl *decl) {
return false;
}
-bool isPointerToWindowSubclass(const QualType& pType) {
- if (!pType->isPointerType())
+bool isPointerToWindowSubclass(const Type* pType0) {
+ const Type* pType = pType0->getUnqualifiedDesugaredType();
+ if (!pType->isPointerType()) {
return false;
+ }
QualType pointeeType = pType->getPointeeType();
const RecordType *recordType = pointeeType->getAs<RecordType>();
if (recordType == nullptr) {
@@ -80,7 +86,27 @@ bool isPointerToWindowSubclass(const QualType& pType) {
if (recordDecl == nullptr) {
return false;
}
- return isDerivedFromWindow(recordDecl);
+ bool b = isDerivedFromWindow(recordDecl);
+ return b;
+}
+
+bool containsPointerToWindowSubclass(const Type* pType0) {
+ const Type* pType = pType0->getUnqualifiedDesugaredType();
+ const CXXRecordDecl* pRecordDecl = pType->getAsCXXRecordDecl();
+ if (pRecordDecl) {
+ const ClassTemplateSpecializationDecl* pTemplate = dyn_cast<ClassTemplateSpecializationDecl>(pRecordDecl);
+ if (pTemplate) {
+ for(unsigned i=0; i<pTemplate->getTemplateArgs().size(); ++i) {
+ const TemplateArgument& rArg = pTemplate->getTemplateArgs()[i];
+ if (rArg.getKind() == TemplateArgument::ArgKind::Type &&
+ containsPointerToWindowSubclass(rArg.getAsType().getTypePtr()))
+ {
+ return true;
+ }
+ }
+ }
+ }
+ return isPointerToWindowSubclass(pType);
}
bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorDecl)
@@ -88,7 +114,7 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD
if (ignoreLocation(pCXXDestructorDecl)) {
return true;
}
- if (!pCXXDestructorDecl->hasBody()) {
+ if (!pCXXDestructorDecl->isThisDeclarationADefinition()) {
return true;
}
const CXXRecordDecl * pRecordDecl = pCXXDestructorDecl->getParent();
@@ -120,20 +146,20 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD
}
const CompoundStmt *pCompoundStatement = dyn_cast<CompoundStmt>(pCXXDestructorDecl->getBody());
// having an empty body and no dispose() method is fine
- if (!foundVclPtrField && !foundDispose && pCompoundStatement->size() == 0) {
+ if (!foundVclPtrField && !foundDispose && pCompoundStatement && pCompoundStatement->size() == 0) {
return true;
}
- if (foundVclPtrField && pCompoundStatement->size() == 0) {
+ if (foundVclPtrField && pCompoundStatement && pCompoundStatement->size() == 0) {
report(
DiagnosticsEngine::Warning,
"vcl::Window subclass with VclPtr field must call dispose() from it's destructor.",
- pCXXDestructorDecl->getBody()->getLocStart())
- << pCXXDestructorDecl->getBody()->getSourceRange();
+ pCXXDestructorDecl->getLocStart())
+ << pCXXDestructorDecl->getSourceRange();
return true;
}
// check that the destructor for a vcl::Window subclass does nothing except call into the dispose() method
bool ok = false;
- if (pCompoundStatement->size() == 1) {
+ if (pCompoundStatement && pCompoundStatement->size() == 1) {
const CXXMemberCallExpr *pCallExpr = dyn_cast<CXXMemberCallExpr>(*pCompoundStatement->body_begin());
if (pCallExpr) {
ok = true;
@@ -143,9 +169,8 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD
report(
DiagnosticsEngine::Warning,
"vcl::Window subclass should have nothing in it's destructor but a call to dispose().",
- pCXXDestructorDecl->getBody()->getLocStart())
- << pCXXDestructorDecl->getBody()->getSourceRange()
- << pCXXDestructorDecl->getCanonicalDecl()->getSourceRange();
+ pCXXDestructorDecl->getLocStart())
+ << pCXXDestructorDecl->getSourceRange();
return true;
}
return true;
@@ -183,13 +208,13 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) {
if (fieldDecl->isBitField()) {
return true;
}
- if (isPointerToWindowSubclass(fieldDecl->getType())) {
-/* report(
- DiagnosticsEngine::Remark,
+ if (containsPointerToWindowSubclass(fieldDecl->getType().getTypePtr())) {
+ report(
+ DiagnosticsEngine::Warning,
"vcl::Window subclass declared as a pointer field, should be wrapped in VclPtr.",
fieldDecl->getLocation())
<< fieldDecl->getSourceRange();
- return true;*/
+ return true;
}
const RecordType *recordType = fieldDecl->getType()->getAs<RecordType>();
@@ -245,7 +270,15 @@ bool VCLWidgets::VisitParmVarDecl(ParmVarDecl const * pvDecl)
&& pMethodDecl->getParent()->getQualifiedNameAsString().find("VclPtr") != std::string::npos) {
return true;
}
- if (pvDecl->getType().getAsString().find("VclPtr") != std::string::npos) {
+ // we exclude this method in VclBuilder because it's so useful to have it like this
+ if (pMethodDecl
+ && pMethodDecl->getNameAsString() == "get"
+ && (pMethodDecl->getParent()->getQualifiedNameAsString() == "VclBuilder"
+ || pMethodDecl->getParent()->getQualifiedNameAsString() == "VclBuilderContainer"))
+ {
+ return true;
+ }
+ if (!pvDecl->getType()->isReferenceType() && pvDecl->getType().getAsString().find("VclPtr") != std::string::npos) {
report(
DiagnosticsEngine::Warning,
"vcl::Window subclass passed as a VclPtr parameter, should be passed as a raw pointer.",
@@ -255,6 +288,43 @@ bool VCLWidgets::VisitParmVarDecl(ParmVarDecl const * pvDecl)
return true;
}
+static void findDisposeAndClearStatements2(std::vector<std::string>& aVclPtrFields, const Stmt *pStmt);
+
+static void findDisposeAndClearStatements(std::vector<std::string>& aVclPtrFields, const CompoundStmt *pCompoundStatement)
+{
+ for(const Stmt* pStmt : pCompoundStatement->body()) {
+ findDisposeAndClearStatements2(aVclPtrFields, pStmt);
+ }
+}
+
+static void findDisposeAndClearStatements2(std::vector<std::string>& aVclPtrFields, const Stmt *pStmt)
+{
+ if (isa<CompoundStmt>(pStmt)) {
+ findDisposeAndClearStatements(aVclPtrFields, dyn_cast<CompoundStmt>(pStmt));
+ return;
+ }
+ if (!isa<CallExpr>(pStmt)) return;
+ const CallExpr *pCallExpr = dyn_cast<CallExpr>(pStmt);
+
+ if (!pCallExpr->getDirectCallee()) return;
+ if (!isa<CXXMethodDecl>(pCallExpr->getDirectCallee())) return;
+ const CXXMethodDecl *pCalleeMethodDecl = dyn_cast<CXXMethodDecl>(pCallExpr->getDirectCallee());
+ if (pCalleeMethodDecl->getNameAsString() != "disposeAndClear") return;
+
+ if (!pCallExpr->getCallee()) return;
+
+ if (!isa<MemberExpr>(pCallExpr->getCallee())) return;
+ const MemberExpr *pCalleeMemberExpr = dyn_cast<MemberExpr>(pCallExpr->getCallee());
+
+ if (!pCalleeMemberExpr->getBase()) return;
+ if (!isa<MemberExpr>(pCalleeMemberExpr->getBase())) return;
+ const MemberExpr *pCalleeMemberExprBase = dyn_cast<MemberExpr>(pCalleeMemberExpr->getBase());
+
+ std::string xxx = pCalleeMemberExprBase->getMemberDecl()->getNameAsString();
+ aVclPtrFields.erase(std::remove(aVclPtrFields.begin(), aVclPtrFields.end(), xxx), aVclPtrFields.end());
+}
+
+
bool VCLWidgets::VisitFunctionDecl( const FunctionDecl* functionDecl )
{
if (ignoreLocation(functionDecl)) {
@@ -263,16 +333,16 @@ bool VCLWidgets::VisitFunctionDecl( const FunctionDecl* functionDecl )
// ignore the stuff in the VclPtr template class
const CXXMethodDecl *pMethodDecl = dyn_cast<CXXMethodDecl>(functionDecl);
if (pMethodDecl
- && pMethodDecl->getParent()->getQualifiedNameAsString().find("VclPtr") != std::string::npos) {
+ && pMethodDecl->getParent()->getQualifiedNameAsString() == "VclPtr") {
return true;
}
// ignore the vcl::Window::dispose() method
if (pMethodDecl
- && pMethodDecl->getParent()->getQualifiedNameAsString().compare("vcl::Window") == 0) {
+ && pMethodDecl->getParent()->getQualifiedNameAsString() == "vcl::Window") {
return true;
}
QualType t1 { compat::getReturnType(*functionDecl) };
- if (t1.getAsString().find("VclPtr") != std::string::npos) {
+ if (t1.getAsString().find("VclPtr") == 0) {
report(
DiagnosticsEngine::Warning,
"VclPtr declared as a return type from a method/function, should be passed as a raw pointer.",
@@ -286,55 +356,89 @@ bool VCLWidgets::VisitFunctionDecl( const FunctionDecl* functionDecl )
report(
DiagnosticsEngine::Warning,
"vcl::Window subclass dispose() method MUST call it's superclass dispose() as the last thing it does",
- functionDecl->getBody()->getLocStart())
- << functionDecl->getBody()->getSourceRange();
+ functionDecl->getLocStart())
+ << functionDecl->getSourceRange();
}
}
}
// check dispose method to make sure we are actually disposing all of the VclPtr fields
- if (pMethodDecl && pMethodDecl->isInstance() && pMethodDecl->getBody() && pMethodDecl->param_size()==0
- && pMethodDecl->getNameAsString() == "dispose")
+ if (pMethodDecl && pMethodDecl->isInstance() && pMethodDecl->getBody()
+ && pMethodDecl->param_size()==0
+ && pMethodDecl->getNameAsString() == "dispose"
+ && isDerivedFromWindow(pMethodDecl->getParent()) )
{
+ // exclude a couple of methods with hard-to-parse code
+ if (pMethodDecl->getQualifiedNameAsString() == "SvxRubyDialog::dispose")
+ return true;
+ if (pMethodDecl->getQualifiedNameAsString() == "SvxPersonalizationTabPage::dispose")
+ return true;
+ if (pMethodDecl->getQualifiedNameAsString() == "SelectPersonaDialog::dispose")
+ return true;
+ if (pMethodDecl->getQualifiedNameAsString() == "MappingDialog_Impl::dispose")
+ return true;
+ if (pMethodDecl->getQualifiedNameAsString() == "BibGeneralPage::dispose")
+ return true;
+ if (pMethodDecl->getQualifiedNameAsString() == "SwCreateAuthEntryDlg_Impl::dispose")
+ return true;
+ if (pMethodDecl->getQualifiedNameAsString() == "SwTableColumnPage::dispose")
+ return true;
+ if (pMethodDecl->getQualifiedNameAsString() == "SwAssignFieldsControl::dispose")
+ return true;
+ if (pMethodDecl->getQualifiedNameAsString() == "ScOptSolverDlg::dispose")
+ return true;
+ if (pMethodDecl->getQualifiedNameAsString() == "ScPivotFilterDlg::dispose")
+ return true;
+ if (pMethodDecl->getQualifiedNameAsString() == "SmToolBoxWindow::dispose")
+ return true;
+ if (pMethodDecl->getQualifiedNameAsString() == "dbaui::DlgOrderCrit::dispose")
+ return true;
+
std::vector<std::string> aVclPtrFields;
for(auto fieldDecl : pMethodDecl->getParent()->fields()) {
- const RecordType *pFieldRecordType = fieldDecl->getType()->getAs<RecordType>();
- if (pFieldRecordType) {
- const CXXRecordDecl *pFieldRecordTypeDecl = dyn_cast<CXXRecordDecl>(pFieldRecordType->getDecl());
- if (pFieldRecordTypeDecl->getQualifiedNameAsString().compare(0, strlen(sVclPtr), sVclPtr) == 0) {
- aVclPtrFields.push_back(fieldDecl->getNameAsString());
- }
- }
+ if (fieldDecl->getType().getAsString().compare(0, strlen(sVclPtr), sVclPtr) == 0) {
+ aVclPtrFields.push_back(fieldDecl->getNameAsString());
+ }
}
if (!aVclPtrFields.empty()) {
- const CompoundStmt *pCompoundStatement = dyn_cast<CompoundStmt>(pMethodDecl->getBody());
- for(const Stmt* pStmt : pCompoundStatement->body()) {
- const CallExpr *pCallExpr = dyn_cast<CallExpr>(pStmt);
- if (!pCallExpr) continue;
- if (!pCallExpr->getDirectCallee()) continue;
- const CXXMethodDecl *pCalleeMethodDecl = dyn_cast<CXXMethodDecl>(pCallExpr->getDirectCallee());
- if (!pCalleeMethodDecl) continue;
- if (pCalleeMethodDecl->getNameAsString() != "disposeAndClear") continue;
- const MemberExpr *pCalleeMemberExpr = dyn_cast<MemberExpr>(pCallExpr->getCallee());
- if (!pCalleeMemberExpr) continue;
- const MemberExpr *pCalleeMemberExprBase = dyn_cast<MemberExpr>(pCalleeMemberExpr->getBase());
- std::string xxx = pCalleeMemberExprBase->getMemberDecl()->getNameAsString();
- aVclPtrFields.erase(std::remove(aVclPtrFields.begin(), aVclPtrFields.end(), xxx), aVclPtrFields.end());
- }
+ if (pMethodDecl->getBody() && isa<CompoundStmt>(pMethodDecl->getBody()))
+ findDisposeAndClearStatements( aVclPtrFields, dyn_cast<CompoundStmt>(pMethodDecl->getBody()) );
if (!aVclPtrFields.empty()) {
+ //pMethodDecl->dump();
std::string aMessage = "vcl::Window subclass dispose() method does not call disposeAndClear() on the following field(s) ";
for(auto s : aVclPtrFields)
- aMessage += ", " + s;
+ aMessage += "\n " + s + ".clear();";
report(
DiagnosticsEngine::Warning,
aMessage,
- functionDecl->getBody()->getLocStart())
- << functionDecl->getBody()->getSourceRange();
+ functionDecl->getLocStart())
+ << functionDecl->getSourceRange();
}
}
}
return true;
}
+bool VCLWidgets::VisitCXXDeleteExpr(const CXXDeleteExpr *pCXXDeleteExpr)
+{
+ if (ignoreLocation(pCXXDeleteExpr)) {
+ return true;
+ }
+ const ImplicitCastExpr* pImplicitCastExpr = dyn_cast<ImplicitCastExpr>(pCXXDeleteExpr->getArgument());
+ if (!pImplicitCastExpr) {
+ return true;
+ }
+ if (pImplicitCastExpr->getCastKind() != CK_UserDefinedConversion) {
+ return true;
+ }
+ report(
+ DiagnosticsEngine::Warning,
+ "calling delete on instance of VclPtr, must rather call disposeAndClear()",
+ pCXXDeleteExpr->getLocStart())
+ << pCXXDeleteExpr->getSourceRange();
+ return true;
+}
+
+
/**
The AST looks like:
`-CXXMemberCallExpr 0xb06d8b0 'void'
@@ -347,6 +451,7 @@ bool VCLWidgets::isDisposeCallingSuperclassDispose(const CXXMethodDecl* pMethodD
{
const CompoundStmt *pCompoundStatement = dyn_cast<CompoundStmt>(pMethodDecl->getBody());
if (!pCompoundStatement) return false;
+ if (pCompoundStatement->size() == 0) return false;
// find the last statement
const CXXMemberCallExpr *pCallExpr = dyn_cast<CXXMemberCallExpr>(*pCompoundStatement->body_rbegin());
if (!pCallExpr) return false;
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index a65e56568cdb..82e314ed58bf 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -672,6 +672,17 @@ void SfxAccCfgTabListBox_Impl::InitEntry(SvTreeListEntry* pEntry,
SvTabListBox::InitEntry(pEntry, rText, rImage1, rImage2, eButtonKind);
}
+SfxAccCfgTabListBox_Impl::~SfxAccCfgTabListBox_Impl()
+{
+ dispose();
+}
+
+void SfxAccCfgTabListBox_Impl::dispose()
+{
+ m_pAccelConfigPage.clear();
+ SvTabListBox::dispose();
+}
+
/** select the entry, which match the current key input ... excepting
keys, which are used for the dialog itself.
*/
@@ -830,6 +841,18 @@ void SfxAcceleratorConfigPage::dispose()
delete m_pFileDlg;
m_pFileDlg = NULL;
+ m_pEntriesBox.clear();
+ m_pOfficeButton.clear();
+ m_pModuleButton.clear();
+ m_pChangeButton.clear();
+ m_pRemoveButton.clear();
+ m_pGroupLBox.clear();
+ m_pFunctionBox.clear();
+ m_pKeyBox.clear();
+ m_pLoadButton.clear();
+ m_pSaveButton.clear();
+ m_pResetButton.clear();
+
SfxTabPage::dispose();
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 8fc2b26db078..3d0462fb7300 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1395,6 +1395,17 @@ SvxMenuEntriesListBox::SvxMenuEntriesListBox(vcl::Window* pParent, SvxConfigPage
SV_DRAGDROP_APP_DROP);
}
+SvxMenuEntriesListBox::~SvxMenuEntriesListBox()
+{
+ dispose();
+}
+
+void SvxMenuEntriesListBox::dispose()
+{
+ pPage.clear();
+ SvTreeListBox::dispose();
+}
+
// drag and drop support
DragDropMode SvxMenuEntriesListBox::NotifyStartDrag(
TransferDataContainer& aTransferDataContainer, SvTreeListEntry* pEntry )
@@ -1542,6 +1553,32 @@ SvxConfigPage::SvxConfigPage(vcl::Window *pParent, const SfxItemSet& rSet)
m_pDescriptionField->EnableCursor( false );
}
+SvxConfigPage::~SvxConfigPage()
+{
+ dispose();
+}
+
+void SvxConfigPage::dispose()
+{
+ m_pTopLevel.clear();
+ m_pTopLevelLabel.clear();
+ m_pTopLevelListBox.clear();
+ m_pNewTopLevelButton.clear();
+ m_pModifyTopLevelButton.clear();
+ m_pContents.clear();
+ m_pContentsLabel.clear();
+ m_pEntries.clear();
+ m_pContentsListBox.clear();
+ m_pAddCommandsButton.clear();
+ m_pModifyCommandButton.clear();
+ m_pMoveUpButton.clear();
+ m_pMoveDownButton.clear();
+ m_pSaveInListBox.clear();
+ m_pDescriptionField.clear();
+ m_pSelectorDlg.clear();
+ SfxTabPage::dispose();
+}
+
void SvxConfigPage::Reset( const SfxItemSet* )
{
// If we haven't initialised our XMultiServiceFactory reference
@@ -2206,6 +2243,11 @@ SvxMenuConfigPage::SvxMenuConfigPage(vcl::Window *pParent, const SfxItemSet& rSe
LINK( this, SvxMenuConfigPage, EntrySelectHdl ) );
}
+SvxMenuConfigPage::~SvxMenuConfigPage()
+{
+ dispose();
+}
+
// Populates the Menu combo box
void SvxMenuConfigPage::Init()
{
@@ -2219,11 +2261,6 @@ void SvxMenuConfigPage::Init()
m_pTopLevelListBox->GetSelectHdl().Call(this);
}
-SvxMenuConfigPage::~SvxMenuConfigPage()
-{
- dispose();
-}
-
void SvxMenuConfigPage::dispose()
{
for ( sal_uInt16 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i )
@@ -2235,11 +2272,8 @@ void SvxMenuConfigPage::dispose()
}
m_pSaveInListBox->Clear();
- delete m_pSelectorDlg;
- m_pSelectorDlg = NULL;
- delete m_pContentsListBox;
- m_pContentsListBox = NULL;
-
+ m_pSelectorDlg.clear();
+ m_pContentsListBox.clear();
SvxConfigPage::dispose();
}
@@ -2547,7 +2581,7 @@ IMPL_LINK( SvxMenuConfigPage, AddCommandsHdl, Button *, pButton )
{
(void)pButton;
- if ( m_pSelectorDlg == NULL )
+ if ( m_pSelectorDlg == nullptr )
{
// Create Script Selector which also shows builtin commands
m_pSelectorDlg = new SvxScriptSelectorDialog( this, true, m_xFrame );
@@ -2660,6 +2694,21 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog(
LINK( this, SvxMainMenuOrganizerDialog, MoveHdl) );
}
+SvxMainMenuOrganizerDialog::~SvxMainMenuOrganizerDialog()
+{
+ dispose();
+}
+
+void SvxMainMenuOrganizerDialog::dispose()
+{
+ m_pMenuBox.clear();
+ m_pMenuNameEdit.clear();
+ m_pMenuListBox.clear();
+ m_pMoveUpButton.clear();
+ m_pMoveDownButton.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK(SvxMainMenuOrganizerDialog, ModifyHdl, Edit*, pEdit)
{
(void)pEdit;
@@ -2931,12 +2980,8 @@ void SvxToolbarConfigPage::dispose()
}
m_pSaveInListBox->Clear();
- delete m_pSelectorDlg;
- m_pSelectorDlg = NULL;
-
- delete m_pContentsListBox;
- m_pContentsListBox = NULL;
-
+ m_pSelectorDlg.clear();
+ m_pContentsListBox.clear();
SvxConfigPage::dispose();
}
@@ -4457,7 +4502,7 @@ IMPL_LINK( SvxToolbarConfigPage, AddCommandsHdl, Button *, pButton )
{
(void)pButton;
- if ( m_pSelectorDlg == NULL )
+ if ( m_pSelectorDlg == nullptr )
{
// Create Script Selector which shows slot commands
m_pSelectorDlg = new SvxScriptSelectorDialog( this, true, m_xFrame );
@@ -4537,6 +4582,7 @@ void SvxToolbarEntriesListBox::dispose()
delete m_pButtonData;
m_pButtonData = NULL;
+ pPage.clear();
SvxMenuEntriesListBox::dispose();
}
@@ -4688,7 +4734,7 @@ TriState SvxToolbarEntriesListBox::NotifyCopying(
if ( !m_bIsInternalDrag )
{
// if the target is NULL then add function to the start of the list
- static_cast<SvxToolbarConfigPage*>(pPage)->AddFunction( pTarget, pTarget == NULL );
+ static_cast<SvxToolbarConfigPage*>(pPage.get())->AddFunction( pTarget, pTarget == NULL );
// Instant Apply changes to UI
SvxConfigEntry* pToolbar = pPage->GetTopLevelSelection();
@@ -4720,6 +4766,20 @@ SvxNewToolbarDialog::SvxNewToolbarDialog(vcl::Window* pWindow, const OUString& r
m_pEdtName->SetModifyHdl(LINK(this, SvxNewToolbarDialog, ModifyHdl));
}
+SvxNewToolbarDialog::~SvxNewToolbarDialog()
+{
+ dispose();
+}
+
+void SvxNewToolbarDialog::dispose()
+{
+ m_pEdtName.clear();
+ m_pBtnOK.clear();
+ m_pSaveInListBox.clear();
+ ModalDialog::dispose();
+}
+
+
IMPL_LINK(SvxNewToolbarDialog, ModifyHdl, Edit*, pEdit)
{
(void)pEdit;
@@ -4940,9 +5000,12 @@ void SvxIconSelectorDialog::dispose()
if ( xi != NULL )
xi->release();
}
- pTbSymbol = NULL;
}
+ pTbSymbol.clear();
+ pFtNote.clear();
+ pBtnImport.clear();
+ pBtnDelete.clear();
ModalDialog::dispose();
}
@@ -5388,4 +5451,16 @@ SvxIconChangeDialog::SvxIconChangeDialog(
pLineEditDescription->SetText(aMessage);
}
+SvxIconChangeDialog::~SvxIconChangeDialog()
+{
+ dispose();
+}
+
+void SvxIconChangeDialog::dispose()
+{
+ pFImageInfo.clear();
+ pLineEditDescription.clear();
+ ModalDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 373f3b924421..0f399fda43f5 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -435,6 +435,7 @@ SfxConfigGroupListBox::~SfxConfigGroupListBox()
void SfxConfigGroupListBox::dispose()
{
ClearAll();
+ pFunctionListBox.clear();
SvTreeListBox::dispose();
}
diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx
index 79453fc1848d..3ab1816f37d5 100644
--- a/cui/source/customize/eventdlg.cxx
+++ b/cui/source/customize/eventdlg.cxx
@@ -118,6 +118,7 @@ void SvxEventConfigPage::dispose()
pE->SetUserData((void*)0);
pE = SvTreeListBox::NextSibling( pE );
}
+ m_pSaveInListBox.clear();
_SvxMacroTabPage::dispose();
}
diff --git a/cui/source/customize/eventdlg.hxx b/cui/source/customize/eventdlg.hxx
index 56ea3c41ddab..385df86d1bbb 100644
--- a/cui/source/customize/eventdlg.hxx
+++ b/cui/source/customize/eventdlg.hxx
@@ -29,7 +29,7 @@
class SvxEventConfigPage : public _SvxMacroTabPage
{
- ListBox* m_pSaveInListBox;
+ VclPtr<ListBox> m_pSaveInListBox;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > m_xAppEvents;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > m_xDocumentEvents;
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 13ae5f461a00..656a2414ddd1 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -888,6 +888,18 @@ AssignComponentDialog::AssignComponentDialog( vcl::Window * pParent, const OUStr
mpMethodEdit->SetText( aMethodName, Selection( 0, SELECTION_MAX ) );
}
+AssignComponentDialog::~AssignComponentDialog()
+{
+ dispose();
+}
+
+void AssignComponentDialog::dispose()
+{
+ mpMethodEdit.clear();
+ mpOKButton.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK( SvxMacroAssignSingleTabDialog, OKHdl_Impl, Button *, pButton )
{
(void)pButton; //unused
diff --git a/cui/source/customize/macropg_impl.hxx b/cui/source/customize/macropg_impl.hxx
index 6ec8709a971e..d99a9712e1ff 100644
--- a/cui/source/customize/macropg_impl.hxx
+++ b/cui/source/customize/macropg_impl.hxx
@@ -25,14 +25,14 @@ class _SvxMacroTabPage_Impl
public:
_SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet );
- PushButton* pAssignPB;
- PushButton* pAssignComponentPB;
- PushButton* pDeletePB;
+ VclPtr<PushButton> pAssignPB;
+ VclPtr<PushButton> pAssignComponentPB;
+ VclPtr<PushButton> pDeletePB;
Image aMacroImg;
Image aComponentImg;
OUString sStrEvent;
OUString sAssignedMacro;
- MacroEventListBox* pEventLB;
+ VclPtr<MacroEventListBox> pEventLB;
bool bReadOnly;
bool bIDEDialogMode;
};
@@ -40,8 +40,8 @@ public:
class AssignComponentDialog : public ModalDialog
{
private:
- Edit* mpMethodEdit;
- OKButton* mpOKButton;
+ VclPtr<Edit> mpMethodEdit;
+ VclPtr<OKButton> mpOKButton;
OUString maURL;
@@ -49,6 +49,8 @@ private:
public:
AssignComponentDialog( vcl::Window * pParent, const OUString& rURL );
+ virtual ~AssignComponentDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString getURL( void ) const
{ return maURL; }
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx
index 5d0ffe6a9209..3aefef32d24b 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -239,6 +239,7 @@ SvxConfigGroupListBox::~SvxConfigGroupListBox()
void SvxConfigGroupListBox::dispose()
{
ClearAll();
+ pFunctionListBox.clear();
SvTreeListBox::dispose();
}
@@ -918,6 +919,22 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
UpdateUI();
}
+SvxScriptSelectorDialog::~SvxScriptSelectorDialog()
+{
+ dispose();
+}
+
+void SvxScriptSelectorDialog::dispose()
+{
+ m_pDialogDescription.clear();
+ m_pCategories.clear();
+ m_pCommands.clear();
+ m_pOKButton.clear();
+ m_pCancelButton.clear();
+ m_pDescriptionText.clear();
+ ModelessDialog::dispose();
+}
+
IMPL_LINK( SvxScriptSelectorDialog, SelectHdl, Control*, pCtrl )
{
if (pCtrl == m_pCategories)
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 5c81f1c02206..ac8aca049c02 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -261,6 +261,26 @@ void SpellDialog::dispose()
delete pImpl;
pImpl = NULL;
}
+ m_pLanguageFT.clear();
+ m_pLanguageLB.clear();
+ m_pExplainFT.clear();
+ m_pExplainLink.clear();
+ m_pNotInDictFT.clear();
+ m_pSentenceED.clear();
+ m_pSuggestionFT.clear();
+ m_pSuggestionLB.clear();
+ m_pIgnorePB.clear();
+ m_pIgnoreAllPB.clear();
+ m_pIgnoreRulePB.clear();
+ m_pAddToDictPB.clear();
+ m_pAddToDictMB.clear();
+ m_pChangePB.clear();
+ m_pChangeAllPB.clear();
+ m_pAutoCorrPB.clear();
+ m_pCheckGrammarCB.clear();
+ m_pOptionsPB.clear();
+ m_pUndoPB.clear();
+ m_pClosePB.clear();
SfxModelessDialog::dispose();
}
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 867c8ce281e6..f146e698e49f 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -98,6 +98,23 @@ AboutDialog::AboutDialog(vcl::Window* pParent)
get<PushButton>("close")->GrabFocus();
}
+AboutDialog::~AboutDialog()
+{
+ dispose();
+}
+
+void AboutDialog::dispose()
+{
+ m_pVersion.clear();
+ m_pDescriptionText.clear();
+ m_pCopyrightText.clear();
+ m_pLogoImage.clear();
+ m_pLogoReplacement.clear();
+ m_pCreditsButton.clear();
+ m_pWebsiteButton.clear();
+ SfxModalDialog::dispose();
+}
+
IMPL_LINK( AboutDialog, HandleClick, PushButton*, pButton )
{
OUString sURL = "";
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index 7edff10bf399..ad1f3e0d8f81 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -973,6 +973,8 @@ class ColorPickerDialog : public ModalDialog
{
public:
ColorPickerDialog( vcl::Window* pParent, sal_Int32 nColor, sal_Int16 nMode );
+ virtual ~ColorPickerDialog() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE;
void update_color( sal_uInt16 n = UPDATE_ALL );
@@ -992,35 +994,35 @@ private:
double mdCyan, mdMagenta, mdYellow, mdKey;
private:
- ColorFieldControl* mpColorField;
- ColorSliderControl* mpColorSlider;
- ColorPreviewControl* mpColorPreview;
- ColorPreviewControl* mpColorPrevious;
+ VclPtr<ColorFieldControl> mpColorField;
+ VclPtr<ColorSliderControl> mpColorSlider;
+ VclPtr<ColorPreviewControl> mpColorPreview;
+ VclPtr<ColorPreviewControl> mpColorPrevious;
- FixedImage* mpFISliderLeft;
- FixedImage* mpFISliderRight;
+ VclPtr<FixedImage> mpFISliderLeft;
+ VclPtr<FixedImage> mpFISliderRight;
Image maSliderImage;
- RadioButton* mpRBRed;
- RadioButton* mpRBGreen;
- RadioButton* mpRBBlue;
- RadioButton* mpRBHue;
- RadioButton* mpRBSaturation;
- RadioButton* mpRBBrightness;
-
- MetricField* mpMFRed;
- MetricField* mpMFGreen;
- MetricField* mpMFBlue;
- HexColorControl* mpEDHex;
-
- MetricField* mpMFHue;
- MetricField* mpMFSaturation;
- MetricField* mpMFBrightness;
-
- MetricField* mpMFCyan;
- MetricField* mpMFMagenta;
- MetricField* mpMFYellow;
- MetricField* mpMFKey;
+ VclPtr<RadioButton> mpRBRed;
+ VclPtr<RadioButton> mpRBGreen;
+ VclPtr<RadioButton> mpRBBlue;
+ VclPtr<RadioButton> mpRBHue;
+ VclPtr<RadioButton> mpRBSaturation;
+ VclPtr<RadioButton> mpRBBrightness;
+
+ VclPtr<MetricField> mpMFRed;
+ VclPtr<MetricField> mpMFGreen;
+ VclPtr<MetricField> mpMFBlue;
+ VclPtr<HexColorControl> mpEDHex;
+
+ VclPtr<MetricField> mpMFHue;
+ VclPtr<MetricField> mpMFSaturation;
+ VclPtr<MetricField> mpMFBrightness;
+
+ VclPtr<MetricField> mpMFCyan;
+ VclPtr<MetricField> mpMFMagenta;
+ VclPtr<MetricField> mpMFYellow;
+ VclPtr<MetricField> mpMFKey;
};
ColorPickerDialog::ColorPickerDialog( vcl::Window* pParent, sal_Int32 nColor, sal_Int16 nMode )
@@ -1126,6 +1128,34 @@ ColorPickerDialog::ColorPickerDialog( vcl::Window* pParent, sal_Int32 nColor, sa
update_color();
}
+void ColorPickerDialog::dispose()
+{
+ mpColorField.clear();
+ mpColorSlider.clear();
+ mpColorPreview.clear();
+ mpColorPrevious.clear();
+ mpFISliderLeft.clear();
+ mpFISliderRight.clear();
+ mpRBRed.clear();
+ mpRBGreen.clear();
+ mpRBBlue.clear();
+ mpRBHue.clear();
+ mpRBSaturation.clear();
+ mpRBBrightness.clear();
+ mpMFRed.clear();
+ mpMFGreen.clear();
+ mpMFBlue.clear();
+ mpEDHex.clear();
+ mpMFHue.clear();
+ mpMFSaturation.clear();
+ mpMFBrightness.clear();
+ mpMFCyan.clear();
+ mpMFMagenta.clear();
+ mpMFYellow.clear();
+ mpMFKey.clear();
+ ModalDialog::dispose();
+}
+
static int toInt( double dValue, double dRange )
{
return static_cast< int >( std::floor((dValue * dRange) + 0.5 ) );
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index e992ab28d064..44f03fed1481 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -100,6 +100,25 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, bool bOne_, const SfxIte
CreateOutputItemSet( pSet ? *pSet->GetPool() : SfxGetpApp()->GetPool() );
}
+SvxCharacterMap::~SvxCharacterMap()
+{
+ dispose();
+}
+
+void SvxCharacterMap::dispose()
+{
+ m_pShowSet.clear();
+ m_pShowText.clear();
+ m_pOKBtn.clear();
+ m_pFontText.clear();
+ m_pFontLB.clear();
+ m_pSubsetText.clear();
+ m_pSubsetLB.clear();
+ m_pSymbolText.clear();
+ m_pShowChar.clear();
+ m_pCharCodeText.clear();
+ SfxModalDialog::dispose();
+}
void SvxCharacterMap::SetChar( sal_UCS4 c )
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index c8bbf0abab69..7e3a767a3bdd 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -176,6 +176,34 @@ void FmSearchDialog::dispose()
delete m_pSearchEngine;
m_pSearchEngine = NULL;
+ m_prbSearchForText.clear();
+ m_prbSearchForNull.clear();
+ m_prbSearchForNotNull.clear();
+ m_pcmbSearchText.clear();
+ m_pftForm.clear();
+ m_plbForm.clear();
+ m_prbAllFields.clear();
+ m_prbSingleField.clear();
+ m_plbField.clear();
+ m_pftPosition.clear();
+ m_plbPosition.clear();
+ m_pcbUseFormat.clear();
+ m_pcbCase.clear();
+ m_pcbBackwards.clear();
+ m_pcbStartOver.clear();
+ m_pcbWildCard.clear();
+ m_pcbRegular.clear();
+ m_pcbApprox.clear();
+ m_ppbApproxSettings.clear();
+ m_pHalfFullFormsCJK.clear();
+ m_pSoundsLikeCJK.clear();
+ m_pSoundsLikeCJKSettings.clear();
+ m_pftRecord.clear();
+ m_pftHint.clear();
+ m_pbSearchAgain.clear();
+ m_pbClose.clear();
+ m_pPreSearchFocus.clear();
+
ModalDialog::dispose();
}
@@ -609,7 +637,7 @@ void FmSearchDialog::EnableSearchUI(bool bEnable)
m_pPreSearchFocus->GrabFocus();
if ( WINDOW_EDIT == m_pPreSearchFocus->GetType() )
{
- Edit* pEdit = static_cast< Edit* >( m_pPreSearchFocus );
+ Edit* pEdit = static_cast< Edit* >( m_pPreSearchFocus.get() );
pEdit->SetSelection( Selection( 0, pEdit->GetText().getLength() ) );
}
}
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index ac330ae95173..87e8a6ae6921 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -215,6 +215,19 @@ SearchProgress::SearchProgress( vcl::Window* pParent, const INetURLObject& rStar
m_pBtnCancel->SetClickHdl( LINK( this, SearchProgress, ClickCancelBtn ) );
}
+SearchProgress::~SearchProgress()
+{
+ dispose();
+}
+
+void SearchProgress::dispose()
+{
+ m_pFtSearchDir.clear();
+ m_pFtSearchType.clear();
+ m_pBtnCancel.clear();
+ parent_.clear();
+ ModalDialog::dispose();
+}
void SearchProgress::Terminate()
@@ -260,7 +273,7 @@ void SearchProgress::StartExecuteModal( const Link& rEndDialogHdl )
{
assert(!maSearchThread.is());
maSearchThread = new SearchThread(
- this, static_cast< TPGalleryThemeProperties * >(parent_), startUrl_);
+ this, static_cast< TPGalleryThemeProperties * >(parent_.get()), startUrl_);
maSearchThread->launch();
ModalDialog::StartExecuteModal( rEndDialogHdl );
}
@@ -345,6 +358,19 @@ TakeProgress::TakeProgress(vcl::Window* pWindow)
m_pBtnCancel->SetClickHdl( LINK( this, TakeProgress, ClickCancelBtn ) );
}
+TakeProgress::~TakeProgress()
+{
+ dispose();
+}
+
+void TakeProgress::dispose()
+{
+ m_pFtTakeFile.clear();
+ m_pBtnCancel.clear();
+ window_.clear();
+ ModalDialog::dispose();
+}
+
void TakeProgress::Terminate()
{
if (maTakeThread.is())
@@ -425,7 +451,7 @@ void TakeProgress::StartExecuteModal( const Link& rEndDialogHdl )
{
assert(!maTakeThread.is());
maTakeThread = new TakeThread(
- this, static_cast< TPGalleryThemeProperties * >(window_), maTakenList);
+ this, static_cast< TPGalleryThemeProperties * >(window_.get()), maTakenList);
maTakeThread->launch();
ModalDialog::StartExecuteModal( rEndDialogHdl );
}
@@ -443,6 +469,18 @@ ActualizeProgress::ActualizeProgress(vcl::Window* pWindow, GalleryTheme* pThm)
m_pBtnCancel->SetClickHdl( LINK( this, ActualizeProgress, ClickCancelBtn ) );
}
+ActualizeProgress::~ActualizeProgress()
+{
+ dispose();
+}
+
+void ActualizeProgress::dispose()
+{
+ m_pFtActualizeFile.clear();
+ m_pBtnCancel.clear();
+ ModalDialog::dispose();
+}
+
short ActualizeProgress::Execute()
{
short nRet;
@@ -511,6 +549,17 @@ TitleDialog::TitleDialog(vcl::Window* pParent, const OUString& rOldTitle)
m_pEdit->GrabFocus();
}
+TitleDialog::~TitleDialog()
+{
+ dispose();
+}
+
+void TitleDialog::dispose()
+{
+ m_pEdit.clear();
+ ModalDialog::dispose();
+}
+
// - GalleryIdDialog -
@@ -532,7 +581,17 @@ GalleryIdDialog::GalleryIdDialog( vcl::Window* pParent, GalleryTheme* _pThm )
m_pBtnOk->SetClickHdl( LINK( this, GalleryIdDialog, ClickOkHdl ) );
}
+GalleryIdDialog::~GalleryIdDialog()
+{
+ dispose();
+}
+void GalleryIdDialog::dispose()
+{
+ m_pBtnOk.clear();
+ m_pLbResName.clear();
+ ModalDialog::dispose();
+}
IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl)
{
@@ -616,6 +675,22 @@ TPGalleryThemeGeneral::TPGalleryThemeGeneral(vcl::Window* pParent, const SfxItem
get(m_pFtMSShowChangeDate, "modified");
}
+TPGalleryThemeGeneral::~TPGalleryThemeGeneral()
+{
+ dispose();
+}
+
+void TPGalleryThemeGeneral::dispose()
+{
+ m_pFiMSImage.clear();
+ m_pEdtMSName.clear();
+ m_pFtMSShowType.clear();
+ m_pFtMSShowPath.clear();
+ m_pFtMSShowContent.clear();
+ m_pFtMSShowChangeDate.clear();
+ SfxTabPage::dispose();
+}
+
void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData )
{
pData = _pData;
@@ -769,6 +844,13 @@ void TPGalleryThemeProperties::dispose()
}
aFilterEntryList.clear();
+ m_pCbbFileType.clear();
+ m_pLbxFound.clear();
+ m_pBtnSearch.clear();
+ m_pBtnTake.clear();
+ m_pBtnTakeAll.clear();
+ m_pCbxPreview.clear();
+ m_pWndPreview.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 9eb47497865e..6fd0cf74a4c7 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -153,6 +153,16 @@ GraphicFilterDialog::GraphicFilterDialog(vcl::Window* pParent,
mpPreview->init(&rGraphic, maModifyHdl);
}
+GraphicFilterDialog::~GraphicFilterDialog()
+{
+ dispose();
+}
+
+void GraphicFilterDialog::dispose()
+{
+ mpPreview.clear();
+ ModalDialog::dispose();
+}
IMPL_LINK_NOARG(GraphicFilterDialog, ImplPreviewTimeoutHdl)
@@ -204,7 +214,18 @@ GraphicFilterMosaic::GraphicFilterMosaic( vcl::Window* pParent, const Graphic& r
mpMtrWidth->GrabFocus();
}
+GraphicFilterMosaic::~GraphicFilterMosaic()
+{
+ dispose();
+}
+void GraphicFilterMosaic::dispose()
+{
+ mpMtrWidth.clear();
+ mpMtrHeight.clear();
+ mpCbxEdges.clear();
+ GraphicFilterDialog::dispose();
+}
Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic,
double fScaleX, double fScaleY )
@@ -257,6 +278,16 @@ GraphicFilterSmooth::GraphicFilterSmooth( vcl::Window* pParent, const Graphic& r
mpMtrRadius->GrabFocus();
}
+GraphicFilterSmooth::~GraphicFilterSmooth()
+{
+ dispose();
+}
+
+void GraphicFilterSmooth::dispose()
+{
+ mpMtrRadius.clear();
+ GraphicFilterDialog::dispose();
+}
Graphic GraphicFilterSmooth::GetFilteredGraphic( const Graphic& rGraphic, double /*fScaleX*/, double /*fScaleY*/ )
@@ -305,6 +336,17 @@ GraphicFilterSolarize::GraphicFilterSolarize( vcl::Window* pParent, const Graphi
mpCbxInvert->SetToggleHdl( GetModifyHdl() );
}
+GraphicFilterSolarize::~GraphicFilterSolarize()
+{
+ dispose();
+}
+
+void GraphicFilterSolarize::dispose()
+{
+ mpMtrThreshold.clear();
+ mpCbxInvert.clear();
+ GraphicFilterDialog::dispose();
+}
Graphic GraphicFilterSolarize::GetFilteredGraphic( const Graphic& rGraphic,
@@ -356,6 +398,16 @@ GraphicFilterSepia::GraphicFilterSepia( vcl::Window* pParent, const Graphic& rGr
mpMtrSepia->SetModifyHdl( GetModifyHdl() );
}
+GraphicFilterSepia::~GraphicFilterSepia()
+{
+ dispose();
+}
+
+void GraphicFilterSepia::dispose()
+{
+ mpMtrSepia.clear();
+ GraphicFilterDialog::dispose();
+}
Graphic GraphicFilterSepia::GetFilteredGraphic( const Graphic& rGraphic,
@@ -399,6 +451,16 @@ GraphicFilterPoster::GraphicFilterPoster(vcl::Window* pParent, const Graphic& rG
mpNumPoster->SetModifyHdl( GetModifyHdl() );
}
+GraphicFilterPoster::~GraphicFilterPoster()
+{
+ dispose();
+}
+
+void GraphicFilterPoster::dispose()
+{
+ mpNumPoster.clear();
+ GraphicFilterDialog::dispose();
+}
Graphic GraphicFilterPoster::GetFilteredGraphic( const Graphic& rGraphic,
@@ -462,6 +524,16 @@ GraphicFilterEmboss::GraphicFilterEmboss(vcl::Window* pParent,
mpCtlLight->GrabFocus();
}
+GraphicFilterEmboss::~GraphicFilterEmboss()
+{
+ dispose();
+}
+
+void GraphicFilterEmboss::dispose()
+{
+ mpCtlLight.clear();
+ GraphicFilterDialog::dispose();
+}
Graphic GraphicFilterEmboss::GetFilteredGraphic( const Graphic& rGraphic,
diff --git a/cui/source/dialogs/cuiimapwnd.cxx b/cui/source/dialogs/cuiimapwnd.cxx
index 118da3fc5c50..d86558bccdba 100644
--- a/cui/source/dialogs/cuiimapwnd.cxx
+++ b/cui/source/dialogs/cuiimapwnd.cxx
@@ -73,4 +73,19 @@ URLDlg::URLDlg( vcl::Window* pWindow, const OUString& rURL, const OUString& rAlt
m_pCbbTargets->SetText( rTarget );
}
+URLDlg::~URLDlg()
+{
+ dispose();
+}
+
+void URLDlg::dispose()
+{
+ m_pEdtURL.clear();
+ m_pCbbTargets.clear();
+ m_pEdtName.clear();
+ m_pEdtAlternativeText.clear();
+ m_pEdtDescription.clear();
+ ModalDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/cuitbxform.cxx b/cui/source/dialogs/cuitbxform.cxx
index 46ae5b5e78d6..1670025e3195 100644
--- a/cui/source/dialogs/cuitbxform.cxx
+++ b/cui/source/dialogs/cuitbxform.cxx
@@ -41,4 +41,15 @@ FmInputRecordNoDialog::FmInputRecordNoDialog(vcl::Window * pParent)
m_pRecordNo->SetDecimalDigits(0);
}
+FmInputRecordNoDialog::~FmInputRecordNoDialog()
+{
+ dispose();
+}
+
+void FmInputRecordNoDialog::dispose()
+{
+ m_pRecordNo.clear();
+ ModalDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index 4a49494243d1..3aa778fac86f 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -45,6 +45,19 @@ SvxNameDialog::SvxNameDialog( vcl::Window* pWindow, const OUString& rName, const
pEdtName->SetModifyHdl(LINK(this, SvxNameDialog, ModifyHdl));
}
+SvxNameDialog::~SvxNameDialog()
+{
+ dispose();
+}
+
+void SvxNameDialog::dispose()
+{
+ pFtDescription.clear();
+ pEdtName.clear();
+ pBtnOK.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl)
{
if(aCheckNameHdl.IsSet())
@@ -73,6 +86,19 @@ SvxObjectNameDialog::SvxObjectNameDialog(
pEdtName->SetModifyHdl(LINK(this, SvxObjectNameDialog, ModifyHdl));
}
+SvxObjectNameDialog::~SvxObjectNameDialog()
+{
+ dispose();
+}
+
+void SvxObjectNameDialog::dispose()
+{
+ pEdtName.clear();
+ pBtnOK.clear();
+ ModalDialog::dispose();
+}
+
+
IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl)
{
if(aCheckNameHdl.IsSet())
@@ -105,6 +131,17 @@ SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(
pEdtTitle->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
}
+SvxObjectTitleDescDialog::~SvxObjectTitleDescDialog()
+{
+ dispose();
+}
+
+void SvxObjectTitleDescDialog::dispose()
+{
+ pEdtTitle.clear();
+ pEdtDescription.clear();
+ ModalDialog::dispose();
+}
/*************************************************************************
@@ -145,6 +182,10 @@ void SvxMessDialog::dispose()
{
delete pImage;
pImage = NULL;
+ pFtDescription.clear();
+ pBtn1.clear();
+ pBtn2.clear();
+ pFtImage.clear();
ModalDialog::dispose();
}
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 6d8e10123d7f..273bffaa70f9 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -605,6 +605,35 @@ namespace svx
m_pSuggestions->SetHelpIds();
}
+ HangulHanjaConversionDialog::~HangulHanjaConversionDialog()
+ {
+ dispose();
+ }
+
+ void HangulHanjaConversionDialog::dispose()
+ {
+ m_pFind.clear();
+ m_pIgnore.clear();
+ m_pIgnoreAll.clear();
+ m_pReplace.clear();
+ m_pReplaceAll.clear();
+ m_pOptions.clear();
+ m_pSuggestions.clear();
+ m_pSimpleConversion.clear();
+ m_pHangulBracketed.clear();
+ m_pHanjaBracketed.clear();
+ m_pWordInput.clear();
+ m_pOriginalWord.clear();
+ m_pHanjaAbove.clear();
+ m_pHanjaBelow.clear();
+ m_pHangulAbove.clear();
+ m_pHangulBelow.clear();
+ m_pHangulOnly.clear();
+ m_pHanjaOnly.clear();
+ m_pReplaceByChar.clear();
+ m_pIgnoreNonPrimary.clear();
+ ModalDialog::dispose();
+ }
void HangulHanjaConversionDialog::FillSuggestions( const ::com::sun::star::uno::Sequence< OUString >& _rSuggestions )
{
@@ -1139,17 +1168,28 @@ namespace svx
void HangulHanjaOptionsDialog::dispose()
{
- SvTreeListEntry* pEntry = m_pDictsLB->First();
- while( pEntry )
+ if (m_pDictsLB)
{
- delete static_cast<OUString const *>(pEntry->GetUserData());
- pEntry->SetUserData(NULL);
- pEntry = m_pDictsLB->Next( pEntry );
+ SvTreeListEntry* pEntry = m_pDictsLB->First();
+ while( pEntry )
+ {
+ delete static_cast<OUString const *>(pEntry->GetUserData());
+ pEntry->SetUserData( NULL );
+ pEntry = m_pDictsLB->Next( pEntry );
+ }
}
delete m_pCheckButtonData;
m_pCheckButtonData = NULL;
+ m_pDictsLB.clear();
+ m_pIgnorepostCB.clear();
+ m_pShowrecentlyfirstCB.clear();
+ m_pAutoreplaceuniqueCB.clear();
+ m_pNewPB.clear();
+ m_pEditPB.clear();
+ m_pDeletePB.clear();
+ m_pOkPB.clear();
ModalDialog::dispose();
}
@@ -1197,6 +1237,18 @@ namespace svx
m_pDictNameED->SetModifyHdl( LINK( this, HangulHanjaNewDictDialog, ModifyHdl ) );
}
+ HangulHanjaNewDictDialog::~HangulHanjaNewDictDialog()
+ {
+ dispose();
+ }
+
+ void HangulHanjaNewDictDialog::dispose()
+ {
+ m_pDictNameED.clear();
+ m_pOkBtn.clear();
+ ModalDialog::dispose();
+ }
+
bool HangulHanjaNewDictDialog::GetName( OUString& _rRetName ) const
{
if( m_bEntered )
@@ -1372,6 +1424,19 @@ namespace svx
{
}
+ SuggestionEdit::~SuggestionEdit()
+ {
+ dispose();
+ }
+
+ void SuggestionEdit::dispose()
+ {
+ m_pPrev.clear();
+ m_pNext.clear();
+ m_pScrollBar.clear();
+ Edit::dispose();
+ }
+
bool SuggestionEdit::PreNotify( NotifyEvent& rNEvt )
{
bool nHandled = false;
@@ -1787,6 +1852,15 @@ namespace svx
{
delete m_pSuggestions;
m_pSuggestions = NULL;
+ m_aBookLB.clear();
+ m_aOriginalLB.clear();
+ m_aEdit1.clear();
+ m_aEdit2.clear();
+ m_aEdit3.clear();
+ m_aEdit4.clear();
+ m_aScrollSB.clear();
+ m_aNewPB.clear();
+ m_aDeletePB.clear();
ModalDialog::dispose();
}
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index ad1e7fafc64b..a02ff7d2eccd 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -140,6 +140,11 @@ void SvxHyperlinkNewDocTp::dispose()
delete static_cast<DocumentTypeData*>(m_pLbDocTypes->GetEntryData ( n ));
m_pLbDocTypes = NULL;
}
+ m_pRbtEditNow.clear();
+ m_pRbtEditLater.clear();
+ m_pCbbPath.clear();
+ m_pBtCreate.clear();
+ m_pLbDocTypes.clear();
SvxHyperlinkTabPageBase::dispose();
}
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx
index 2e45746d7684..0a3f26922171 100644
--- a/cui/source/dialogs/hldoctp.cxx
+++ b/cui/source/dialogs/hldoctp.cxx
@@ -71,6 +71,21 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( vcl::Window *pParent, IconChoiceDialog* p
maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkDocTp, TimeoutHdl_Impl ) );
}
+SvxHyperlinkDocTp::~SvxHyperlinkDocTp()
+{
+ dispose();
+}
+
+void SvxHyperlinkDocTp::dispose()
+{
+ m_pCbbPath.clear();
+ m_pBtFileopen.clear();
+ m_pEdTarget.clear();
+ m_pFtFullURL.clear();
+ m_pBtBrowse.clear();
+ SvxHyperlinkTabPageBase::dispose();
+}
+
/*************************************************************************
|*
|* Fill all dialog-controls except controls in groupbox "more..."
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 73ea0ddc6220..61760d772156 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -81,6 +81,25 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( vcl::Window *pParent,
maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkInternetTp, TimeoutHdl_Impl ) );
}
+SvxHyperlinkInternetTp::~SvxHyperlinkInternetTp()
+{
+ dispose();
+}
+
+void SvxHyperlinkInternetTp::dispose()
+{
+ m_pRbtLinktypInternet.clear();
+ m_pRbtLinktypFTP.clear();
+ m_pCbbTarget.clear();
+ m_pBtBrowse.clear();
+ m_pFtLogin.clear();
+ m_pEdLogin.clear();
+ m_pFtPassword.clear();
+ m_pEdPassword.clear();
+ m_pCbAnonymous.clear();
+ SvxHyperlinkTabPageBase::dispose();
+}
+
/*************************************************************************
|*
|* Fill the all dialog-controls except controls in groupbox "more..."
@@ -397,7 +416,7 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ClickBrowseHdl_Impl)
SfxBoolItem aBrowse( SID_BROWSE, true );
const SfxPoolItem *ppItems[] = { &aName, &aNewView, &aSilent, &aReadOnly, &aRefererItem, &aBrowse, NULL };
- static_cast<SvxHpLinkDlg*>(mpDialog)->GetBindings()->Execute( SID_OPENDOC, ppItems, 0, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
+ static_cast<SvxHpLinkDlg*>(mpDialog.get())->GetBindings()->Execute( SID_OPENDOC, ppItems, 0, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
return 0L;
}
diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx
index d110b292a73d..6e1da44b6fe4 100644
--- a/cui/source/dialogs/hlmailtp.cxx
+++ b/cui/source/dialogs/hlmailtp.cxx
@@ -66,6 +66,20 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog*
m_pBtAdrBook->Hide();
}
+SvxHyperlinkMailTp::~SvxHyperlinkMailTp()
+{
+ dispose();
+}
+
+void SvxHyperlinkMailTp::dispose()
+{
+ m_pCbbReceiver.clear();
+ m_pBtAdrBook.clear();
+ m_pFtSubject.clear();
+ m_pEdSubject.clear();
+ SvxHyperlinkTabPageBase::dispose();
+}
+
/*************************************************************************
|*
|* Fill the all dialog-controls except controls in groupbox "more..."
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index 02058c78c0ed..bfe9c67a1d60 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -72,6 +72,17 @@ SvxHlmarkTreeLBox::SvxHlmarkTreeLBox(vcl::Window* pParent, WinBits nStyle)
SetNodeDefaultImages();
}
+SvxHlmarkTreeLBox::~SvxHlmarkTreeLBox()
+{
+ dispose();
+}
+
+void SvxHlmarkTreeLBox::dispose()
+{
+ mpParentWnd.clear();
+ SvTreeListBox::dispose();
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxHlmarkTreeLBox(vcl::Window *pParent, VclBuilder::stringmap &rMap)
{
WinBits nWinStyle = WB_TABSTOP;
@@ -156,6 +167,10 @@ SvxHlinkDlgMarkWnd::~SvxHlinkDlgMarkWnd()
void SvxHlinkDlgMarkWnd::dispose()
{
ClearTree();
+ mpBtApply.clear();
+ mpBtClose.clear();
+ mpLbTree.clear();
+ mpParent.clear();
ModalDialog::dispose();
}
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 804442321f1d..7bc162e4c3f8 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -114,9 +114,13 @@ void SvxHyperlinkTabPageBase::dispose()
{
maTimer.Stop();
- delete mpMarkWnd;
- mpMarkWnd = NULL;
-
+ mpCbbFrame.clear();
+ mpLbForm.clear();
+ mpEdIndication.clear();
+ mpEdText.clear();
+ mpBtScript.clear();
+ mpDialog.clear();
+ mpMarkWnd.clear();
IconChoicePage::dispose();
}
@@ -291,13 +295,13 @@ void SvxHyperlinkTabPageBase::SetInitFocus()
// Ask dialog whether the curretn doc is a HTML-doc
bool SvxHyperlinkTabPageBase::IsHTMLDoc() const
{
- return static_cast<SvxHpLinkDlg*>(mpDialog)->IsHTMLDoc();
+ return static_cast<SvxHpLinkDlg*>(mpDialog.get())->IsHTMLDoc();
}
// retrieve dispatcher
SfxDispatcher* SvxHyperlinkTabPageBase::GetDispatcher() const
{
- return static_cast<SvxHpLinkDlg*>(mpDialog)->GetDispatcher();
+ return static_cast<SvxHpLinkDlg*>(mpDialog.get())->GetDispatcher();
}
// Click on imagebutton : Script
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index af6d29876456..8c4ea99822f4 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -512,6 +512,24 @@ SvxHyphenWordDialog::SvxHyphenWordDialog(
Enable( false );
}
+SvxHyphenWordDialog::~SvxHyphenWordDialog()
+{
+ dispose();
+}
+
+void SvxHyphenWordDialog::dispose()
+{
+ m_pWordEdit.clear();
+ m_pLeftBtn.clear();
+ m_pRightBtn.clear();
+ m_pOkBtn.clear();
+ m_pContBtn.clear();
+ m_pDelBtn.clear();
+ m_pHyphAll.clear();
+ m_pCloseBtn.clear();
+ SfxModalDialog::dispose();
+}
+
void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang )
{
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 0a1c70e7d70b..712d78fa969f 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -52,6 +52,16 @@ IconChoicePage::IconChoicePage( vcl::Window *pParent, const OString& rID,
}
+IconChoicePage::~IconChoicePage()
+{
+ dispose();
+}
+
+void IconChoicePage::dispose()
+{
+ pDialog.clear();
+ TabPage::dispose();
+}
/**********************************************************************
|
@@ -246,7 +256,6 @@ void IconChoiceDialog::dispose()
SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry ( i );
delete static_cast<sal_uInt16*>(pEntry->GetUserData());
}
- m_pIconCtrl = NULL;
}
delete pRanges;
@@ -254,6 +263,13 @@ void IconChoiceDialog::dispose()
delete pOutSet;
pOutSet = NULL;
+ m_pIconCtrl.clear();
+ m_pOKBtn.clear();
+ m_pApplyBtn.clear();
+ m_pCancelBtn.clear();
+ m_pHelpBtn.clear();
+ m_pResetBtn.clear();
+ m_pTabContainer.clear();
ModalDialog::dispose();
}
@@ -540,7 +556,7 @@ bool IconChoiceDialog::DeActivatePageImpl ()
for ( size_t i = 0, nCount = maPageList.size(); i < nCount; ++i )
{
IconChoicePageData* pObj = maPageList[ i ];
- if ( pObj->pPage != pPage )
+ if ( pObj->pPage.get() != pPage )
pObj->bRefresh = true;
else
pObj->bRefresh = false;
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 4131c40c5c8a..db3bf1fef153 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -191,6 +191,24 @@ SvInsertOleDlg::SvInsertOleDlg
RadioHdl( NULL );
}
+SvInsertOleDlg::~SvInsertOleDlg()
+{
+ dispose();
+}
+
+void SvInsertOleDlg::dispose()
+{
+ m_pRbNewObject.clear();
+ m_pRbObjectFromfile.clear();
+ m_pObjectTypeFrame.clear();
+ m_pLbObjecttype.clear();
+ m_pFileFrame.clear();
+ m_pEdFilepath.clear();
+ m_pBtnFilepath.clear();
+ m_pCbFilelink.clear();
+ InsertObjectDialog_Impl::dispose();
+}
+
short SvInsertOleDlg::Execute()
{
short nRet = RET_OK;
@@ -402,6 +420,9 @@ void SvInsertPlugInDialog::dispose()
{
delete m_pURL;
m_pURL = NULL;
+ m_pEdFileurl.clear();
+ m_pBtnFileurl.clear();
+ m_pEdPluginsOptions.clear();
InsertObjectDialog_Impl::dispose();
}
@@ -494,6 +515,30 @@ SfxInsertFloatingFrameDialog::SfxInsertFloatingFrameDialog( vcl::Window *pParent
Init();
}
+SfxInsertFloatingFrameDialog::~SfxInsertFloatingFrameDialog()
+{
+ dispose();
+}
+
+void SfxInsertFloatingFrameDialog::dispose()
+{
+ m_pEDName.clear();
+ m_pEDURL.clear();
+ m_pBTOpen.clear();
+ m_pRBScrollingOn.clear();
+ m_pRBScrollingOff.clear();
+ m_pRBScrollingAuto.clear();
+ m_pRBFrameBorderOn.clear();
+ m_pRBFrameBorderOff.clear();
+ m_pFTMarginWidth.clear();
+ m_pNMMarginWidth.clear();
+ m_pCBMarginWidthDefault.clear();
+ m_pFTMarginHeight.clear();
+ m_pNMMarginHeight.clear();
+ m_pCBMarginHeightDefault.clear();
+ InsertObjectDialog_Impl::dispose();
+}
+
void SfxInsertFloatingFrameDialog::Init()
{
get(m_pEDName, "edname");
diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx
index c3c167cca62d..75e85733940b 100644
--- a/cui/source/dialogs/insrc.cxx
+++ b/cui/source/dialogs/insrc.cxx
@@ -45,6 +45,19 @@ SvxInsRowColDlg::SvxInsRowColDlg(vcl::Window* pParent, bool bCol, const OString&
SetHelpId( sHelpId );
}
+SvxInsRowColDlg::~SvxInsRowColDlg()
+{
+ dispose();
+}
+
+void SvxInsRowColDlg::dispose()
+{
+ m_pCountEdit.clear();
+ m_pBeforeBtn.clear();
+ m_pAfterBtn.clear();
+ ModalDialog::dispose();
+}
+
short SvxInsRowColDlg::Execute(void)
{
return ModalDialog::Execute();
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 95c348d0a364..68a9c19b375b 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -143,6 +143,26 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b
SetManager( pMgr );
}
+SvBaseLinksDlg::~SvBaseLinksDlg()
+{
+ dispose();
+}
+
+void SvBaseLinksDlg::dispose()
+{
+ m_pTbLinks.clear();
+ m_pFtFullFileName.clear();
+ m_pFtFullSourceName.clear();
+ m_pFtFullTypeName.clear();
+ m_pRbAutomatic.clear();
+ m_pRbManual.clear();
+ m_pPbUpdateNow.clear();
+ m_pPbOpenSource.clear();
+ m_pPbChangeSource.clear();
+ m_pPbBreakLink.clear();
+ ModalDialog::dispose();
+}
+
/*************************************************************************
|* SvBaseLinksDlg::Handler()
*************************************************************************/
diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index ebb8fcdca031..9cbbef5f2160 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -229,16 +229,19 @@ SvxMultiPathDialog::~SvxMultiPathDialog()
void SvxMultiPathDialog::dispose()
{
- sal_uInt16 nPos = (sal_uInt16)m_pRadioLB->GetEntryCount();
- while ( nPos-- )
+ if (m_pRadioLB)
{
- SvTreeListEntry* pEntry = m_pRadioLB->GetEntry( nPos );
- delete static_cast<OUString*>(pEntry->GetUserData());
+ sal_uInt16 nPos = (sal_uInt16)m_pRadioLB->GetEntryCount();
+ while ( nPos-- )
+ {
+ SvTreeListEntry* pEntry = m_pRadioLB->GetEntry( nPos );
+ delete static_cast<OUString*>(pEntry->GetUserData());
+ }
}
- delete m_pRadioLB;
- m_pRadioLB = NULL;
-
+ m_pRadioLB.clear();
+ m_pAddBtn.clear();
+ m_pDelBtn.clear();
ModalDialog::dispose();
}
@@ -254,8 +257,10 @@ void SvxPathSelectDialog::dispose()
sal_uInt16 nPos = m_pPathLB->GetEntryCount();
while ( nPos-- )
delete static_cast<OUString*>(m_pPathLB->GetEntryData(nPos));
- m_pPathLB = NULL;
}
+ m_pPathLB.clear();
+ m_pAddBtn.clear();
+ m_pDelBtn.clear();
ModalDialog::dispose();
}
diff --git a/cui/source/dialogs/newtabledlg.cxx b/cui/source/dialogs/newtabledlg.cxx
index ab9058c0c975..3c2cba513fef 100644
--- a/cui/source/dialogs/newtabledlg.cxx
+++ b/cui/source/dialogs/newtabledlg.cxx
@@ -28,6 +28,18 @@ SvxNewTableDialog::SvxNewTableDialog( vcl::Window* pParent )
get(mpNumColumns, "columns");
}
+SvxNewTableDialog::~SvxNewTableDialog()
+{
+ dispose();
+}
+
+void SvxNewTableDialog::dispose()
+{
+ mpNumColumns.clear();
+ mpNumRows.clear();
+ ModalDialog::dispose();
+}
+
short SvxNewTableDialog::Execute(void)
{
return ModalDialog::Execute();
diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx
index ccba00009552..ad4e26bfc711 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -31,15 +31,15 @@
struct PasswordToOpenModifyDialog_Impl
{
- PasswordToOpenModifyDialog * m_pParent;
-
- Edit* m_pPasswdToOpenED;
- Edit* m_pReenterPasswdToOpenED;
- VclExpander* m_pOptionsExpander;
- OKButton* m_pOk;
- CheckBox* m_pOpenReadonlyCB;
- Edit* m_pPasswdToModifyED;
- Edit* m_pReenterPasswdToModifyED;
+ VclPtr<PasswordToOpenModifyDialog> m_pParent;
+
+ VclPtr<Edit> m_pPasswdToOpenED;
+ VclPtr<Edit> m_pReenterPasswdToOpenED;
+ VclPtr<VclExpander> m_pOptionsExpander;
+ VclPtr<OKButton> m_pOk;
+ VclPtr<CheckBox> m_pOpenReadonlyCB;
+ VclPtr<Edit> m_pPasswdToModifyED;
+ VclPtr<Edit> m_pReenterPasswdToModifyED;
OUString m_aOneMismatch;
OUString m_aTwoMismatch;
diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx
index 90610557f6fb..f7ae8397c63b 100644
--- a/cui/source/dialogs/pastedlg.cxx
+++ b/cui/source/dialogs/pastedlg.cxx
@@ -52,6 +52,19 @@ SvPasteObjectDialog::SvPasteObjectDialog( vcl::Window* pParent )
ObjectLB().SetDoubleClickHdl( LINK( this, SvPasteObjectDialog, DoubleClickHdl ) );
}
+SvPasteObjectDialog::~SvPasteObjectDialog()
+{
+ dispose();
+}
+
+void SvPasteObjectDialog::dispose()
+{
+ m_pFtObjectSource.clear();
+ m_pLbInsertList.clear();
+ m_pOKButton.clear();
+ ModalDialog::dispose();
+}
+
void SvPasteObjectDialog::SelectObject()
{
if (m_pLbInsertList->GetEntryCount())
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index 86d0e5812f32..175d889a1e71 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -131,6 +131,13 @@ void SvxPostItDialog::dispose()
{
delete pOutSet;
pOutSet = 0;
+ m_pLastEditFT.clear();
+ m_pEditED.clear();
+ m_pInsertAuthor.clear();
+ m_pAuthorBtn.clear();
+ m_pOKBtn.clear();
+ m_pPrevBtn.clear();
+ m_pNextBtn.clear();
SfxModalDialog::dispose();
}
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 4013f71e6925..a5db7a283c0b 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -443,6 +443,17 @@ CuiInputDialog::CuiInputDialog(vcl::Window * pParent, sal_uInt16 nMode )
}
}
+CuiInputDialog::~CuiInputDialog()
+{
+ dispose();
+}
+
+void CuiInputDialog::dispose()
+{
+ m_pEdit.clear();
+ ModalDialog::dispose();
+}
+
// ScriptOrgDialog ------------------------------------------------------------
@@ -500,6 +511,13 @@ void SvxScriptOrgDialog::dispose()
{
// clear the SelectHdl so that it isn't called during the dtor
m_pScriptsBox->SetSelectHdl( Link() );
+ m_pScriptsBox.clear();
+ m_pRunButton.clear();
+ m_pCloseButton.clear();
+ m_pCreateButton.clear();
+ m_pEditButton.clear();
+ m_pRenameButton.clear();
+ m_pDelButton.clear();
SfxModalDialog::dispose();
};
diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx
index 94e286ecd92d..a58c9417bffa 100644
--- a/cui/source/dialogs/showcols.cxx
+++ b/cui/source/dialogs/showcols.cxx
@@ -39,6 +39,17 @@ FmShowColsDialog::FmShowColsDialog(vcl::Window* pParent)
m_pOK->SetClickHdl( LINK( this, FmShowColsDialog, OnClickedOk ) );
}
+FmShowColsDialog::~FmShowColsDialog()
+{
+ dispose();
+}
+
+void FmShowColsDialog::dispose()
+{
+ m_pList.clear();
+ m_pOK.clear();
+ ModalDialog::dispose();
+}
IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk)
{
diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx
index edce7998effe..171ea3a1bdc9 100644
--- a/cui/source/dialogs/splitcelldlg.cxx
+++ b/cui/source/dialogs/splitcelldlg.cxx
@@ -53,6 +53,20 @@ SvxSplitTableDlg::SvxSplitTableDlg( vcl::Window *pParent, bool bIsTableVertical,
}
}
+SvxSplitTableDlg::~SvxSplitTableDlg()
+{
+ dispose();
+}
+
+void SvxSplitTableDlg::dispose()
+{
+ m_pCountEdit.clear();
+ m_pHorzBox.clear();
+ m_pVertBox.clear();
+ m_pPropCB.clear();
+ SvxStandardDialog::dispose();
+}
+
IMPL_LINK( SvxSplitTableDlg, ClickHdl, Button *, pButton )
{
const bool bIsVert = pButton == m_pVertBox ;
diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index bb797e3d4dd8..4d1541347c71 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -178,6 +178,17 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog(vcl::Window* pParent,
m_pAttrLB->SelectEntryPos( 0 );
}
+SvxSearchAttributeDialog::~SvxSearchAttributeDialog()
+{
+ dispose();
+}
+
+void SvxSearchAttributeDialog::dispose()
+{
+ m_pAttrLB.clear();
+ m_pOKBtn.clear();
+ ModalDialog::dispose();
+}
IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl)
@@ -248,4 +259,18 @@ SvxSearchSimilarityDialog::SvxSearchSimilarityDialog
m_pRelaxBox->Check( bRelax );
}
+SvxSearchSimilarityDialog::~SvxSearchSimilarityDialog()
+{
+ dispose();
+}
+
+void SvxSearchSimilarityDialog::dispose()
+{
+ m_pOtherFld.clear();
+ m_pLongerFld.clear();
+ m_pShorterFld.clear();
+ m_pRelaxBox.clear();
+ ModalDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index c0afe2a2c430..8a47ac55a292 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -66,6 +66,17 @@ LookUpComboBox::LookUpComboBox(vcl::Window *pParent)
EnableAutocomplete( false );
}
+LookUpComboBox::~LookUpComboBox()
+{
+ dispose();
+}
+
+void LookUpComboBox::dispose()
+{
+ m_pDialog.clear();
+ ComboBox::dispose();
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeLookUpComboBox(vcl::Window *pParent, VclBuilder::stringmap &)
{
return new LookUpComboBox(pParent);
@@ -96,6 +107,18 @@ ReplaceEdit::ReplaceEdit(vcl::Window *pParent)
{
}
+ReplaceEdit::~ReplaceEdit()
+{
+ dispose();
+}
+
+void ReplaceEdit::dispose()
+{
+ m_pBtn.clear();
+ Edit::dispose();
+}
+
+
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeReplaceEdit(vcl::Window *pParent, VclBuilder::stringmap &)
{
return new ReplaceEdit(pParent);
@@ -176,6 +199,7 @@ ThesaurusAlternativesCtrl::~ThesaurusAlternativesCtrl()
void ThesaurusAlternativesCtrl::dispose()
{
ClearExtraData();
+ m_pDialog.clear();
SvxCheckListBox::dispose();
}
@@ -514,6 +538,21 @@ SvxThesaurusDialog::SvxThesaurusDialog(
Enable( false );
}
+SvxThesaurusDialog::~SvxThesaurusDialog()
+{
+ dispose();
+}
+
+void SvxThesaurusDialog::dispose()
+{
+ m_pLeftBtn.clear();
+ m_pWordCB.clear();
+ m_pAlternativesCT.clear();
+ m_pReplaceEdit.clear();
+ m_pLangLB.clear();
+ SvxStandardDialog::dispose();
+}
+
IMPL_LINK( SvxThesaurusDialog, ReplaceBtnHdl_Impl, Button *, EMPTYARG /*pBtn*/ )
{
EndDialog(RET_OK);
diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx
index 190a0619b7d7..451de5506da4 100644
--- a/cui/source/dialogs/zoom.cxx
+++ b/cui/source/dialogs/zoom.cxx
@@ -297,6 +297,19 @@ void SvxZoomDialog::dispose()
{
delete pOutSet;
pOutSet = 0;
+ m_pOptimalBtn.clear();
+ m_pWholePageBtn.clear();
+ m_pPageWidthBtn.clear();
+ m_p100Btn.clear();
+ m_pUserBtn.clear();
+ m_pUserEdit.clear();
+ m_pViewFrame.clear();
+ m_pAutomaticBtn.clear();
+ m_pSingleBtn.clear();
+ m_pColumnsBtn.clear();
+ m_pColumnsEdit.clear();
+ m_pBookModeChk.clear();
+ m_pOKBtn.clear();
SfxModalDialog::dispose();
}
diff --git a/cui/source/factory/cuiexp.cxx b/cui/source/factory/cuiexp.cxx
index 8bb9d51ef1f6..754d8b47a092 100644
--- a/cui/source/factory/cuiexp.cxx
+++ b/cui/source/factory/cuiexp.cxx
@@ -17,6 +17,35 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "sfx2/basedlgs.hxx"
+#include "cuigaldlg.hxx"
+#include "hlmarkwn.hxx"
+#include "srchxtra.hxx"
+#include "cuisrchdlg.hxx"
+#include "transfrm.hxx"
+#include "labdlg.hxx"
+#include "cuitbxform.hxx"
+#include "optdict.hxx"
+#include "dlgname.hxx"
+#include "cuiimapwnd.hxx"
+#include "multipat.hxx"
+#include "cuifmsearch.hxx"
+#include "cuigrfflt.hxx"
+#include "cuitabarea.hxx"
+#include "insdlg.hxx"
+#include "pastedlg.hxx"
+#include "linkdlg.hxx"
+#include "postdlg.hxx"
+#include "passwdomdlg.hxx"
+#include "cuihyperdlg.hxx"
+#include "selector.hxx"
+#include "SpellDialog.hxx"
+#include "zoom.hxx"
+#include "showcols.hxx"
+#include "hyphen.hxx"
+#include "thesdlg.hxx"
+#include "hangulhanjadlg.hxx"
+#include "dstribut.hxx"
#include "dlgfact.hxx"
#include "sal/types.h"
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index f2f368ad4dc1..4043f8c5f9ad 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -107,7 +107,6 @@ IMPL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl)
AbstractSvxZoomDialog_Impl::~AbstractSvxZoomDialog_Impl() \
{
- delete pDlg;
}
short AbstractSvxZoomDialog_Impl::Execute()
{
@@ -154,7 +153,6 @@ IMPL_ABSTDLG_BASE(AbstractPasswordToOpenModifyDialog_Impl);
// virtual
VclAbstractDialog2_Impl::~VclAbstractDialog2_Impl()
{
- delete m_pDlg;
}
// virtual
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index ffb15778c5e1..d356bbab2181 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -61,7 +61,7 @@ class HangulHanjaConversionDialog;
using namespace svx;
#define DECL_ABSTDLG_BASE(Class,DialogClass) \
- DialogClass* pDlg; \
+ VclPtr<DialogClass> pDlg; \
public: \
Class( DialogClass* p) \
: pDlg(p) \
@@ -72,7 +72,6 @@ public: \
#define IMPL_ABSTDLG_BASE(Class) \
Class::~Class() \
{ \
- delete pDlg; \
} \
short Class::Execute() \
{ \
@@ -81,7 +80,7 @@ short Class::Execute() \
class VclAbstractDialog2_Impl : public VclAbstractDialog2
{
- Dialog* m_pDlg;
+ VclPtr<Dialog> m_pDlg;
Link m_aEndDlgHdl;
public:
VclAbstractDialog2_Impl( Dialog* p ) : m_pDlg( p ) {}
diff --git a/cui/source/inc/ControlFocusHelper.hxx b/cui/source/inc/ControlFocusHelper.hxx
index b984838fa09c..6530f3cf6740 100644
--- a/cui/source/inc/ControlFocusHelper.hxx
+++ b/cui/source/inc/ControlFocusHelper.hxx
@@ -26,11 +26,13 @@
class SvxControlFocusHelper : public Control
{
private:
- Control* m_pFocusCtrl;
+ VclPtr<Control> m_pFocusCtrl;
public:
SvxControlFocusHelper( vcl::Window* pParent, const ResId& rId ) :
Control( pParent, rId ), m_pFocusCtrl( NULL ) {}
+ virtual ~SvxControlFocusHelper();
+ virtual void dispose() SAL_OVERRIDE;
void SetFocusControl( Control* pCtrl ) { m_pFocusCtrl = pCtrl; }
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index e24334bd14b6..411df36dd123 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -124,33 +124,33 @@ class SpellDialog : public SfxModelessDialog
friend class SentenceEditWindow_Impl;
private:
- FixedText* m_pLanguageFT;
- SvxLanguageBox* m_pLanguageLB;
+ VclPtr<FixedText> m_pLanguageFT;
+ VclPtr<SvxLanguageBox> m_pLanguageLB;
- FixedText* m_pExplainFT;
- FixedHyperlink* m_pExplainLink;
+ VclPtr<FixedText> m_pExplainFT;
+ VclPtr<FixedHyperlink> m_pExplainLink;
- FixedText* m_pNotInDictFT;
- SentenceEditWindow_Impl* m_pSentenceED;
+ VclPtr<FixedText> m_pNotInDictFT;
+ VclPtr<SentenceEditWindow_Impl> m_pSentenceED;
- FixedText* m_pSuggestionFT;
- ListBox* m_pSuggestionLB;
+ VclPtr<FixedText> m_pSuggestionFT;
+ VclPtr<ListBox> m_pSuggestionLB;
- PushButton* m_pIgnorePB;
- PushButton* m_pIgnoreAllPB;
- PushButton* m_pIgnoreRulePB;
- PushButton* m_pAddToDictPB;
- MenuButton* m_pAddToDictMB;
+ VclPtr<PushButton> m_pIgnorePB;
+ VclPtr<PushButton> m_pIgnoreAllPB;
+ VclPtr<PushButton> m_pIgnoreRulePB;
+ VclPtr<PushButton> m_pAddToDictPB;
+ VclPtr<MenuButton> m_pAddToDictMB;
- PushButton* m_pChangePB;
- PushButton* m_pChangeAllPB;
- PushButton* m_pAutoCorrPB;
+ VclPtr<PushButton> m_pChangePB;
+ VclPtr<PushButton> m_pChangeAllPB;
+ VclPtr<PushButton> m_pAutoCorrPB;
- CheckBox* m_pCheckGrammarCB;
+ VclPtr<CheckBox> m_pCheckGrammarCB;
- PushButton* m_pOptionsPB;
- PushButton* m_pUndoPB;
- CloseButton* m_pClosePB;
+ VclPtr<PushButton> m_pOptionsPB;
+ VclPtr<PushButton> m_pUndoPB;
+ VclPtr<CloseButton> m_pClosePB;
OUString m_sResumeST;
OUString m_sIgnoreOnceST;
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index 132ab541702e..82cfac00ee18 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -34,13 +34,13 @@ private:
BitmapEx aBackgroundBitmap;
BitmapEx aLogoBitmap;
- VclMultiLineEdit* m_pVersion;
- FixedText* m_pDescriptionText;
- FixedText* m_pCopyrightText;
- FixedImage* m_pLogoImage;
- FixedText* m_pLogoReplacement;
- PushButton* m_pCreditsButton;
- PushButton* m_pWebsiteButton;
+ VclPtr<VclMultiLineEdit> m_pVersion;
+ VclPtr<FixedText> m_pDescriptionText;
+ VclPtr<FixedText> m_pCopyrightText;
+ VclPtr<FixedImage> m_pLogoImage;
+ VclPtr<FixedText> m_pLogoReplacement;
+ VclPtr<PushButton> m_pCreditsButton;
+ VclPtr<PushButton> m_pWebsiteButton;
OUString m_aVersionTextStr;
OUString m_aVendorTextStr;
@@ -66,6 +66,8 @@ protected:
public:
AboutDialog(vcl::Window* pParent);
+ virtual ~AboutDialog();
+ virtual void dispose() SAL_OVERRIDE;
DECL_LINK( HandleClick, PushButton* );
};
diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx
index dc156cc914c6..6c487cabc80f 100644
--- a/cui/source/inc/acccfg.hxx
+++ b/cui/source/inc/acccfg.hxx
@@ -53,7 +53,7 @@ class SfxStringItem;
class SfxAccCfgTabListBox_Impl : public SvTabListBox
{
- SfxAcceleratorConfigPage* m_pAccelConfigPage;
+ VclPtr<SfxAcceleratorConfigPage> m_pAccelConfigPage;
void KeyInput( const KeyEvent &rKEvt ) SAL_OVERRIDE;
@@ -67,6 +67,8 @@ public:
, m_pAccelConfigPage(NULL)
{
}
+ virtual ~SfxAccCfgTabListBox_Impl();
+ virtual void dispose() SAL_OVERRIDE;
void SetAccelConfigPage(SfxAcceleratorConfigPage* pAccelConfigPage)
{
@@ -118,17 +120,17 @@ private:
const SfxStringItem* m_pFontItem;
sfx2::FileDialogHelper* m_pFileDlg;
- SfxAccCfgTabListBox_Impl* m_pEntriesBox;
- RadioButton* m_pOfficeButton;
- RadioButton* m_pModuleButton;
- PushButton* m_pChangeButton;
- PushButton* m_pRemoveButton;
- SfxConfigGroupListBox* m_pGroupLBox;
- SfxConfigFunctionListBox* m_pFunctionBox;
- SvTreeListBox* m_pKeyBox;
- PushButton* m_pLoadButton;
- PushButton* m_pSaveButton;
- PushButton* m_pResetButton;
+ VclPtr<SfxAccCfgTabListBox_Impl> m_pEntriesBox;
+ VclPtr<RadioButton> m_pOfficeButton;
+ VclPtr<RadioButton> m_pModuleButton;
+ VclPtr<PushButton> m_pChangeButton;
+ VclPtr<PushButton> m_pRemoveButton;
+ VclPtr<SfxConfigGroupListBox> m_pGroupLBox;
+ VclPtr<SfxConfigFunctionListBox> m_pFunctionBox;
+ VclPtr<SvTreeListBox> m_pKeyBox;
+ VclPtr<PushButton> m_pLoadButton;
+ VclPtr<PushButton> m_pSaveButton;
+ VclPtr<PushButton> m_pResetButton;
OUString aLoadAccelConfigStr;
OUString aSaveAccelConfigStr;
OUString aFilterAllStr;
diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
index 3f56d128e87b..0be6bc61d698 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -79,36 +79,36 @@ private:
DECL_LINK( UpdateEnableHdl, void* );
private:
- ListBox* m_pLbHorAlign;
- FixedText* m_pFtIndent;
- MetricField* m_pEdIndent;
- FixedText* m_pFtVerAlign;
- ListBox* m_pLbVerAlign;
-
- DialControl* m_pCtrlDial;
- FixedText* m_pFtRotate;
- NumericField* m_pNfRotate;
- FixedText* m_pFtRefEdge;
- ValueSet* m_pVsRefEdge;
- TriStateBox* m_pCbStacked;
- TriStateBox* m_pCbAsianMode;
+ VclPtr<ListBox> m_pLbHorAlign;
+ VclPtr<FixedText> m_pFtIndent;
+ VclPtr<MetricField> m_pEdIndent;
+ VclPtr<FixedText> m_pFtVerAlign;
+ VclPtr<ListBox> m_pLbVerAlign;
+
+ VclPtr<DialControl> m_pCtrlDial;
+ VclPtr<FixedText> m_pFtRotate;
+ VclPtr<NumericField> m_pNfRotate;
+ VclPtr<FixedText> m_pFtRefEdge;
+ VclPtr<ValueSet> m_pVsRefEdge;
+ VclPtr<TriStateBox> m_pCbStacked;
+ VclPtr<TriStateBox> m_pCbAsianMode;
OrientationHelper* m_pOrientHlp;
- VclHBox* m_pBoxDirection;
- TriStateBox* m_pBtnWrap;
- TriStateBox* m_pBtnHyphen;
- TriStateBox* m_pBtnShrink;
- FrameDirListBox* m_pLbFrameDir;
+ VclPtr<VclHBox> m_pBoxDirection;
+ VclPtr<TriStateBox> m_pBtnWrap;
+ VclPtr<TriStateBox> m_pBtnHyphen;
+ VclPtr<TriStateBox> m_pBtnShrink;
+ VclPtr<FrameDirListBox> m_pLbFrameDir;
// hidden labels/string
- FixedText* m_pFtBotLock;
- FixedText* m_pFtTopLock;
- FixedText* m_pFtCelLock;
- FixedText* m_pFtABCD;
-
- VclContainer* m_pAlignmentFrame;
- VclContainer* m_pOrientFrame;
- VclContainer* m_pPropertiesFrame;
+ VclPtr<FixedText> m_pFtBotLock;
+ VclPtr<FixedText> m_pFtTopLock;
+ VclPtr<FixedText> m_pFtCelLock;
+ VclPtr<FixedText> m_pFtABCD;
+
+ VclPtr<VclContainer> m_pAlignmentFrame;
+ VclPtr<VclContainer> m_pOrientFrame;
+ VclPtr<VclContainer> m_pPropertiesFrame;
};
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 17e2bb64b66f..bed9ffc9b533 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -43,8 +43,8 @@ namespace editeng { class SortedAutoCompleteStrings; }
class OfaAutoCorrDlg : public SfxTabDialog
{
- VclContainer* m_pLanguageBox;
- SvxLanguageBox* m_pLanguageLB;
+ VclPtr<VclContainer> m_pLanguageBox;
+ VclPtr<SvxLanguageBox> m_pLanguageLB;
sal_uInt16 m_nReplacePageId;
sal_uInt16 m_nExceptionsPageId;
@@ -53,6 +53,8 @@ class OfaAutoCorrDlg : public SfxTabDialog
public:
OfaAutoCorrDlg(vcl::Window* pParent, const SfxItemSet *pSet);
+ virtual ~OfaAutoCorrDlg();
+ virtual void dispose() SAL_OVERRIDE;
void EnableLanguage(bool bEnable);
};
@@ -94,7 +96,7 @@ class OfaAutocorrOptionsPage : public SfxTabPage
using TabPage::ActivatePage;
private:
- SvxCheckListBox *m_pCheckLB;
+ VclPtr<SvxCheckListBox> m_pCheckLB;
OUString m_sInput;
OUString m_sDoubleCaps;
@@ -107,6 +109,8 @@ private:
public:
OfaAutocorrOptionsPage(vcl::Window* pParent, const SfxItemSet& rSet);
+ virtual ~OfaAutocorrOptionsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
@@ -123,8 +127,8 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage
{
using TabPage::ActivatePage;
- OfaACorrCheckListBox* m_pCheckLB;
- PushButton* m_pEditPB;
+ VclPtr<OfaACorrCheckListBox> m_pCheckLB;
+ VclPtr<PushButton> m_pEditPB;
OUString sDeleteEmptyPara;
OUString sUseReplaceTbl;
@@ -225,12 +229,12 @@ private:
StringChangeTable aChangesTable;
- CheckBox* m_pTextOnlyCB;
- AutoCorrEdit* m_pShortED;
- AutoCorrEdit* m_pReplaceED;
- SvTabListBox* m_pReplaceTLB;
- PushButton* m_pNewReplacePB;
- PushButton* m_pDeleteReplacePB;
+ VclPtr<CheckBox> m_pTextOnlyCB;
+ VclPtr<AutoCorrEdit> m_pShortED;
+ VclPtr<AutoCorrEdit> m_pReplaceED;
+ VclPtr<SvTabListBox> m_pReplaceTLB;
+ VclPtr<PushButton> m_pNewReplacePB;
+ VclPtr<PushButton> m_pDeleteReplacePB;
OUString sModify;
OUString sNew;
@@ -291,17 +295,17 @@ class OfaAutocorrExceptPage : public SfxTabPage
using TabPage::DeactivatePage;
private:
- AutoCorrEdit* m_pAbbrevED;
- ListBox* m_pAbbrevLB;
- PushButton* m_pNewAbbrevPB;
- PushButton* m_pDelAbbrevPB;
- CheckBox* m_pAutoAbbrevCB;
-
- AutoCorrEdit* m_pDoubleCapsED;
- ListBox* m_pDoubleCapsLB;
- PushButton* m_pNewDoublePB;
- PushButton* m_pDelDoublePB;
- CheckBox* m_pAutoCapsCB;
+ VclPtr<AutoCorrEdit> m_pAbbrevED;
+ VclPtr<ListBox> m_pAbbrevLB;
+ VclPtr<PushButton> m_pNewAbbrevPB;
+ VclPtr<PushButton> m_pDelAbbrevPB;
+ VclPtr<CheckBox> m_pAutoAbbrevCB;
+
+ VclPtr<AutoCorrEdit> m_pDoubleCapsED;
+ VclPtr<ListBox> m_pDoubleCapsLB;
+ VclPtr<PushButton> m_pNewDoublePB;
+ VclPtr<PushButton> m_pDelDoublePB;
+ VclPtr<CheckBox> m_pAutoCapsCB;
StringsTable aStringsTable;
CollatorWrapper* pCompareClass;
@@ -338,29 +342,29 @@ class OfaQuoteTabPage : public SfxTabPage
private:
/// For anything but writer
- SvxCheckListBox* m_pCheckLB;
+ VclPtr<SvxCheckListBox> m_pCheckLB;
/// Just for writer
- OfaACorrCheckListBox* m_pSwCheckLB;
+ VclPtr<OfaACorrCheckListBox> m_pSwCheckLB;
OUString sNonBrkSpace;
OUString sOrdinal;
SvLBoxButtonData* pCheckButtonData;
- CheckBox* m_pSingleTypoCB;
- PushButton* m_pSglStartQuotePB;
- FixedText* m_pSglStartExFT;
- PushButton* m_pSglEndQuotePB;
- FixedText* m_pSglEndExFT;
- PushButton* m_pSglStandardPB;
+ VclPtr<CheckBox> m_pSingleTypoCB;
+ VclPtr<PushButton> m_pSglStartQuotePB;
+ VclPtr<FixedText> m_pSglStartExFT;
+ VclPtr<PushButton> m_pSglEndQuotePB;
+ VclPtr<FixedText> m_pSglEndExFT;
+ VclPtr<PushButton> m_pSglStandardPB;
- CheckBox* m_pDoubleTypoCB;
- PushButton* m_pDblStartQuotePB;
- FixedText* m_pDblStartExFT;
- PushButton* m_pDblEndQuotePB;
- FixedText* m_pDblEndExFT;
- PushButton* m_pDblStandardPB;
+ VclPtr<CheckBox> m_pDoubleTypoCB;
+ VclPtr<PushButton> m_pDblStartQuotePB;
+ VclPtr<FixedText> m_pDblStartExFT;
+ VclPtr<PushButton> m_pDblEndQuotePB;
+ VclPtr<FixedText> m_pDblEndExFT;
+ VclPtr<PushButton> m_pDblStandardPB;
OUString m_sStartQuoteDlg;
OUString m_sEndQuoteDlg;
@@ -401,31 +405,33 @@ class OfaAutoCompleteTabPage : public SfxTabPage
public:
class AutoCompleteMultiListBox : public MultiListBox
{
- OfaAutoCompleteTabPage* m_pPage;
+ VclPtr<OfaAutoCompleteTabPage> m_pPage;
public:
AutoCompleteMultiListBox(vcl::Window *pParent, WinBits nBits)
: MultiListBox(pParent, nBits)
, m_pPage(NULL)
{
}
+ virtual ~AutoCompleteMultiListBox();
+ virtual void dispose() SAL_OVERRIDE;
void SetPage(OfaAutoCompleteTabPage *pPage) { m_pPage = pPage; }
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
};
private:
using TabPage::ActivatePage;
- CheckBox* m_pCBActiv; ///<Enable word completion
- CheckBox* m_pCBAppendSpace;///<Append space
- CheckBox* m_pCBAsTip; ///<Show as tip
-
- CheckBox* m_pCBCollect;///<Collect words
- CheckBox* m_pCBRemoveList;///<...save the list for later use...
-
- ListBox* m_pDCBExpandKey;
- NumericField* m_pNFMinWordlen;
- NumericField* m_pNFMaxEntries;
- AutoCompleteMultiListBox* m_pLBEntries;
- PushButton* m_pPBEntries;
+ VclPtr<CheckBox> m_pCBActiv; ///<Enable word completion
+ VclPtr<CheckBox> m_pCBAppendSpace;///<Append space
+ VclPtr<CheckBox> m_pCBAsTip; ///<Show as tip
+
+ VclPtr<CheckBox> m_pCBCollect;///<Collect words
+ VclPtr<CheckBox> m_pCBRemoveList;///<...save the list for later use...
+
+ VclPtr<ListBox> m_pDCBExpandKey;
+ VclPtr<NumericField> m_pNFMinWordlen;
+ VclPtr<NumericField> m_pNFMaxEntries;
+ VclPtr<AutoCompleteMultiListBox> m_pLBEntries;
+ VclPtr<PushButton> m_pPBEntries;
editeng::SortedAutoCompleteStrings* m_pAutoCompleteList;
sal_uInt16 m_nAutoCmpltListCnt;
@@ -434,6 +440,8 @@ private:
OfaAutoCompleteTabPage( vcl::Window* pParent,
const SfxItemSet& rSet );
public:
+ virtual ~OfaAutoCompleteTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
@@ -458,9 +466,9 @@ class OfaSmartTagOptionsTabPage : public SfxTabPage
private:
// controls
- CheckBox* m_pMainCB;
- SvxCheckListBox* m_pSmartTagTypesLB;
- PushButton* m_pPropertiesPB;
+ VclPtr<CheckBox> m_pMainCB;
+ VclPtr<SvxCheckListBox> m_pSmartTagTypesLB;
+ VclPtr<PushButton> m_pPropertiesPB;
/// construction via Create()
OfaSmartTagOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
@@ -498,6 +506,8 @@ private:
DECL_LINK(SelectHdl, void *);
public:
+ virtual ~OfaSmartTagOptionsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 9a0b126e3d8c..57142af5ebf0 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -73,39 +73,39 @@ private:
virtual ~SvxBackgroundTabPage();
virtual void dispose() SAL_OVERRIDE;
- VclContainer* m_pAsGrid;
- FixedText* m_pSelectTxt;
- ListBox* m_pLbSelect;
- FixedText* m_pTblDesc;
- ListBox* m_pTblLBox;
- ListBox* m_pParaLBox;
+ VclPtr<VclContainer> m_pAsGrid;
+ VclPtr<FixedText> m_pSelectTxt;
+ VclPtr<ListBox> m_pLbSelect;
+ VclPtr<FixedText> m_pTblDesc;
+ VclPtr<ListBox> m_pTblLBox;
+ VclPtr<ListBox> m_pParaLBox;
- VclFrame* m_pBackGroundColorFrame;
- SvxColorValueSet* m_pBackgroundColorSet;
- BackgroundPreviewImpl* m_pPreviewWin1;
+ VclPtr<VclFrame> m_pBackGroundColorFrame;
+ VclPtr<SvxColorValueSet> m_pBackgroundColorSet;
+ VclPtr<BackgroundPreviewImpl> m_pPreviewWin1;
- FixedText* m_pColTransFT;///<color transparency
- MetricField* m_pColTransMF;
- CheckBox* m_pBtnPreview;
+ VclPtr<FixedText> m_pColTransFT;///<color transparency
+ VclPtr<MetricField> m_pColTransMF;
+ VclPtr<CheckBox> m_pBtnPreview;
// Background Bitmap ----------------------------------
- VclContainer* m_pBitmapContainer;
- VclContainer* m_pFileFrame;
- PushButton* m_pBtnBrowse;
- CheckBox* m_pBtnLink;
- FixedText* m_pFtUnlinked;
- FixedText* m_pFtFile;
-
- VclContainer* m_pTypeFrame;
- RadioButton* m_pBtnPosition;
- RadioButton* m_pBtnArea;
- RadioButton* m_pBtnTile;
- SvxRectCtl* m_pWndPosition;
-
- VclContainer* m_pGraphTransFrame;///<transparency of graphics
- MetricField* m_pGraphTransMF;
-
- BackgroundPreviewImpl* m_pPreviewWin2;
+ VclPtr<VclContainer> m_pBitmapContainer;
+ VclPtr<VclContainer> m_pFileFrame;
+ VclPtr<PushButton> m_pBtnBrowse;
+ VclPtr<CheckBox> m_pBtnLink;
+ VclPtr<FixedText> m_pFtUnlinked;
+ VclPtr<FixedText> m_pFtFile;
+
+ VclPtr<VclContainer> m_pTypeFrame;
+ VclPtr<RadioButton> m_pBtnPosition;
+ VclPtr<RadioButton> m_pBtnArea;
+ VclPtr<RadioButton> m_pBtnTile;
+ VclPtr<SvxRectCtl> m_pWndPosition;
+
+ VclPtr<VclContainer> m_pGraphTransFrame;///<transparency of graphics
+ VclPtr<MetricField> m_pGraphTransMF;
+
+ VclPtr<BackgroundPreviewImpl> m_pPreviewWin2;
// DDListBox for Writer -------------------------------
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index b05df65dd9f9..ff4b48ab3c7b 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -45,6 +45,8 @@ class SvxBorderTabPage : public SfxTabPage
static const sal_uInt16 pRanges[];
public:
+ virtual ~SvxBorderTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
static const sal_uInt16* GetRanges() { return pRanges; }
@@ -63,37 +65,37 @@ private:
SvxBorderTabPage( vcl::Window* pParent, const SfxItemSet& rCoreAttrs );
// Controls
- ValueSet* m_pWndPresets;
- FixedText* m_pUserDefFT;
- svx::FrameSelector* m_pFrameSel;
-
- LineListBox* m_pLbLineStyle;
- ColorListBox* m_pLbLineColor;
- MetricField* m_pLineWidthMF;
-
- VclContainer* m_pSpacingFrame;
- FixedText* m_pLeftFT;
- MetricField* m_pLeftMF;
- FixedText* m_pRightFT;
- MetricField* m_pRightMF;
- FixedText* m_pTopFT;
- MetricField* m_pTopMF;
- FixedText* m_pBottomFT;
- MetricField* m_pBottomMF;
- CheckBox* m_pSynchronizeCB;
-
- VclContainer* m_pShadowFrame;
- ValueSet* m_pWndShadows;
- FixedText* m_pFtShadowSize;
- MetricField* m_pEdShadowSize;
- FixedText* m_pFtShadowColor;
- ColorListBox* m_pLbShadowColor;
-
-
- VclContainer* m_pPropertiesFrame;///< properties - "Merge with next paragraph" in Writer
- CheckBox* m_pMergeWithNextCB;
+ VclPtr<ValueSet> m_pWndPresets;
+ VclPtr<FixedText> m_pUserDefFT;
+ VclPtr<svx::FrameSelector> m_pFrameSel;
+
+ VclPtr<LineListBox> m_pLbLineStyle;
+ VclPtr<ColorListBox> m_pLbLineColor;
+ VclPtr<MetricField> m_pLineWidthMF;
+
+ VclPtr<VclContainer> m_pSpacingFrame;
+ VclPtr<FixedText> m_pLeftFT;
+ VclPtr<MetricField> m_pLeftMF;
+ VclPtr<FixedText> m_pRightFT;
+ VclPtr<MetricField> m_pRightMF;
+ VclPtr<FixedText> m_pTopFT;
+ VclPtr<MetricField> m_pTopMF;
+ VclPtr<FixedText> m_pBottomFT;
+ VclPtr<MetricField> m_pBottomMF;
+ VclPtr<CheckBox> m_pSynchronizeCB;
+
+ VclPtr<VclContainer> m_pShadowFrame;
+ VclPtr<ValueSet> m_pWndShadows;
+ VclPtr<FixedText> m_pFtShadowSize;
+ VclPtr<MetricField> m_pEdShadowSize;
+ VclPtr<FixedText> m_pFtShadowColor;
+ VclPtr<ColorListBox> m_pLbShadowColor;
+
+
+ VclPtr<VclContainer> m_pPropertiesFrame;///< properties - "Merge with next paragraph" in Writer
+ VclPtr<CheckBox> m_pMergeWithNextCB;
// #i29550#
- CheckBox* m_pMergeAdjacentBordersCB;
+ VclPtr<CheckBox> m_pMergeAdjacentBordersCB;
ImageList aShadowImgLstH;
ImageList aShadowImgLst;
@@ -113,8 +115,8 @@ private:
std::set<sal_Int16> maUsedBorderStyles;
// Handler
- DECL_LINK( SelStyleHdl_Impl, ListBox* pLb );
- DECL_LINK( SelColHdl_Impl, ListBox* pLb );
+ DECL_LINK( SelStyleHdl_Impl, ListBox* );
+ DECL_LINK( SelColHdl_Impl, ListBox* );
DECL_LINK( SelPreHdl_Impl, void* );
DECL_LINK( SelSdwHdl_Impl, void* );
DECL_LINK( LinesChanged_Impl, void* );
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index fd9ef1a858f1..759b1406d3e6 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -315,13 +315,15 @@ public:
class SvxMenuEntriesListBox : public SvTreeListBox
{
private:
- SvxConfigPage* pPage;
+ VclPtr<SvxConfigPage> pPage;
protected:
bool m_bIsInternalDrag;
public:
SvxMenuEntriesListBox(vcl::Window*, SvxConfigPage*);
+ virtual ~SvxMenuEntriesListBox();
+ virtual void dispose() SAL_OVERRIDE;
virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) SAL_OVERRIDE;
@@ -358,30 +360,30 @@ protected:
// the top section of the tab page where top level menus and toolbars
// are displayed in a listbox
- VclFrame* m_pTopLevel;
- FixedText* m_pTopLevelLabel;
- ListBox* m_pTopLevelListBox;
- PushButton* m_pNewTopLevelButton;
- MenuButton* m_pModifyTopLevelButton;
+ VclPtr<VclFrame> m_pTopLevel;
+ VclPtr<FixedText> m_pTopLevelLabel;
+ VclPtr<ListBox> m_pTopLevelListBox;
+ VclPtr<PushButton> m_pNewTopLevelButton;
+ VclPtr<MenuButton> m_pModifyTopLevelButton;
// the contents section where the contents of the selected
// menu or toolbar are displayed
- VclFrame* m_pContents;
- FixedText* m_pContentsLabel;
- VclContainer* m_pEntries;
- SvTreeListBox* m_pContentsListBox;
+ VclPtr<VclFrame> m_pContents;
+ VclPtr<FixedText> m_pContentsLabel;
+ VclPtr<VclContainer> m_pEntries;
+ VclPtr<SvTreeListBox> m_pContentsListBox;
- PushButton* m_pAddCommandsButton;
- MenuButton* m_pModifyCommandButton;
+ VclPtr<PushButton> m_pAddCommandsButton;
+ VclPtr<MenuButton> m_pModifyCommandButton;
- PushButton* m_pMoveUpButton;
- PushButton* m_pMoveDownButton;
+ VclPtr<PushButton> m_pMoveUpButton;
+ VclPtr<PushButton> m_pMoveDownButton;
- ListBox* m_pSaveInListBox;
+ VclPtr<ListBox> m_pSaveInListBox;
- VclMultiLineEdit* m_pDescriptionField;
+ VclPtr<VclMultiLineEdit> m_pDescriptionField;
- SvxScriptSelectorDialog* m_pSelectorDlg;
+ VclPtr<SvxScriptSelectorDialog> m_pSelectorDlg;
/// the ResourceURL to select when opening the dialog
OUString m_aURLToSelect;
@@ -409,7 +411,7 @@ protected:
SvTreeListEntry* pTarget = NULL,
bool bFront = false );
- void AddSubMenusToUI( const OUString& rBaseTitle,
+ void AddSubMenusToUI( const OUString& rBaseTitle,
SvxConfigEntry* pParentData );
SvTreeListEntry* InsertEntryIntoUI ( SvxConfigEntry* pNewEntryData,
@@ -422,6 +424,9 @@ protected:
public:
+ virtual ~SvxConfigPage();
+ virtual void dispose() SAL_OVERRIDE;
+
static bool CanConfig( const OUString& rModuleId );
SaveInData* GetSaveInData() { return pCurrentSaveInData; }
@@ -495,11 +500,11 @@ public:
class SvxMainMenuOrganizerDialog : public ModalDialog
{
- VclContainer* m_pMenuBox;
- Edit* m_pMenuNameEdit;
- SvTreeListBox* m_pMenuListBox;
- PushButton* m_pMoveUpButton;
- PushButton* m_pMoveDownButton;
+ VclPtr<VclContainer> m_pMenuBox;
+ VclPtr<Edit> m_pMenuNameEdit;
+ VclPtr<SvTreeListBox> m_pMenuListBox;
+ VclPtr<PushButton> m_pMoveUpButton;
+ VclPtr<PushButton> m_pMoveDownButton;
SvxEntries* mpEntries;
SvTreeListEntry* pNewMenuEntry;
@@ -515,6 +520,8 @@ public:
SvxMainMenuOrganizerDialog (
vcl::Window*, SvxEntries*,
SvxConfigEntry*, bool bCreateMenu = false );
+ virtual ~SvxMainMenuOrganizerDialog();
+ virtual void dispose() SAL_OVERRIDE;
SvxEntries* GetEntries() { return mpEntries;}
void SetEntries( SvxEntries* );
@@ -526,7 +533,7 @@ class SvxToolbarEntriesListBox : public SvxMenuEntriesListBox
Size m_aCheckBoxImageSizePixel;
Link m_aChangedListener;
SvLBoxButtonData* m_pButtonData;
- SvxConfigPage* pPage;
+ VclPtr<SvxConfigPage> pPage;
void ChangeVisibility( SvTreeListEntry* pEntry );
@@ -662,8 +669,8 @@ public:
class SvxNewToolbarDialog : public ModalDialog
{
private:
- Edit* m_pEdtName;
- OKButton* m_pBtnOK;
+ VclPtr<Edit> m_pEdtName;
+ VclPtr<OKButton> m_pBtnOK;
Link aCheckNameHdl;
@@ -671,8 +678,10 @@ private:
public:
SvxNewToolbarDialog(vcl::Window* pWindow, const OUString& rName);
+ virtual ~SvxNewToolbarDialog();
+ virtual void dispose() SAL_OVERRIDE;
- ListBox* m_pSaveInListBox;
+ VclPtr<ListBox> m_pSaveInListBox;
OUString GetName()
{
@@ -702,10 +711,10 @@ struct SvxIconSelectorToolBoxItem
class SvxIconSelectorDialog : public ModalDialog
{
private:
- ToolBox* pTbSymbol;
- FixedText* pFtNote;
- PushButton* pBtnImport;
- PushButton* pBtnDelete;
+ VclPtr<ToolBox> pTbSymbol;
+ VclPtr<FixedText> pFtNote;
+ VclPtr<PushButton> pBtnImport;
+ VclPtr<PushButton> pBtnDelete;
Size aTbSize;
sal_uInt16 m_nNextId;
@@ -770,10 +779,12 @@ public:
class SvxIconChangeDialog : public ModalDialog
{
private:
- FixedImage* pFImageInfo;
- VclMultiLineEdit* pLineEditDescription;
+ VclPtr<FixedImage> pFImageInfo;
+ VclPtr<VclMultiLineEdit> pLineEditDescription;
public:
SvxIconChangeDialog(vcl::Window *pWindow, const OUString& aMessage);
+ virtual ~SvxIconChangeDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif // INCLUDED_CUI_SOURCE_INC_CFG_HXX
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index e4e557d5912d..984e8e9e4c80 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -128,7 +128,7 @@ struct SvxConfigGroupBoxResource_Impl;
class SfxConfigGroupListBox : public SvTreeListBox
{
SvxConfigGroupBoxResource_Impl* pImp;
- SfxConfigFunctionListBox* pFunctionListBox;
+ VclPtr<SfxConfigFunctionListBox> pFunctionListBox;
SfxGroupInfoArr_Impl aArr;
OUString m_sModuleLongName;
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index da60c36ab965..f1075a93dfd7 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -47,7 +47,7 @@ class FontList;
class SvxCharBasePage : public SfxTabPage
{
protected:
- SvxFontPrevWindow* m_pPreviewWin;
+ VclPtr<SvxFontPrevWindow> m_pPreviewWin;
bool m_bPreviewBackgroundToCharacter;
@@ -61,6 +61,9 @@ protected:
inline SvxFont& GetPreviewCTLFont();
public:
+ virtual ~SvxCharBasePage();
+ virtual void dispose() SAL_OVERRIDE;
+
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
@@ -77,38 +80,38 @@ class SvxCharNamePage : public SvxCharBasePage
private:
static const sal_uInt16 pNameRanges[];
- VclContainer* m_pWestFrame;
- FixedText* m_pWestFontNameFT;
- FontNameBox* m_pWestFontNameLB;
- FixedText* m_pWestFontStyleFT;
- FontStyleBox* m_pWestFontStyleLB;
- FixedText* m_pWestFontSizeFT;
- FontSizeBox* m_pWestFontSizeLB;
- FixedText* m_pWestFontLanguageFT;
- SvxLanguageComboBox* m_pWestFontLanguageLB;
- FixedText* m_pWestFontTypeFT;
-
- VclContainer* m_pEastFrame;
- FixedText* m_pEastFontNameFT;
- FontNameBox* m_pEastFontNameLB;
- FixedText* m_pEastFontStyleFT;
- FontStyleBox* m_pEastFontStyleLB;
- FixedText* m_pEastFontSizeFT;
- FontSizeBox* m_pEastFontSizeLB;
- FixedText* m_pEastFontLanguageFT;
- SvxLanguageBox* m_pEastFontLanguageLB;
- FixedText* m_pEastFontTypeFT;
-
- VclContainer* m_pCTLFrame;
- FixedText* m_pCTLFontNameFT;
- FontNameBox* m_pCTLFontNameLB;
- FixedText* m_pCTLFontStyleFT;
- FontStyleBox* m_pCTLFontStyleLB;
- FixedText* m_pCTLFontSizeFT;
- FontSizeBox* m_pCTLFontSizeLB;
- FixedText* m_pCTLFontLanguageFT;
- SvxLanguageBox* m_pCTLFontLanguageLB;
- FixedText* m_pCTLFontTypeFT;
+ VclPtr<VclContainer> m_pWestFrame;
+ VclPtr<FixedText> m_pWestFontNameFT;
+ VclPtr<FontNameBox> m_pWestFontNameLB;
+ VclPtr<FixedText> m_pWestFontStyleFT;
+ VclPtr<FontStyleBox> m_pWestFontStyleLB;
+ VclPtr<FixedText> m_pWestFontSizeFT;
+ VclPtr<FontSizeBox> m_pWestFontSizeLB;
+ VclPtr<FixedText> m_pWestFontLanguageFT;
+ VclPtr<SvxLanguageComboBox> m_pWestFontLanguageLB;
+ VclPtr<FixedText> m_pWestFontTypeFT;
+
+ VclPtr<VclContainer> m_pEastFrame;
+ VclPtr<FixedText> m_pEastFontNameFT;
+ VclPtr<FontNameBox> m_pEastFontNameLB;
+ VclPtr<FixedText> m_pEastFontStyleFT;
+ VclPtr<FontStyleBox> m_pEastFontStyleLB;
+ VclPtr<FixedText> m_pEastFontSizeFT;
+ VclPtr<FontSizeBox> m_pEastFontSizeLB;
+ VclPtr<FixedText> m_pEastFontLanguageFT;
+ VclPtr<SvxLanguageBox> m_pEastFontLanguageLB;
+ VclPtr<FixedText> m_pEastFontTypeFT;
+
+ VclPtr<VclContainer> m_pCTLFrame;
+ VclPtr<FixedText> m_pCTLFontNameFT;
+ VclPtr<FontNameBox> m_pCTLFontNameLB;
+ VclPtr<FixedText> m_pCTLFontStyleFT;
+ VclPtr<FontStyleBox> m_pCTLFontStyleLB;
+ VclPtr<FixedText> m_pCTLFontSizeFT;
+ VclPtr<FontSizeBox> m_pCTLFontSizeLB;
+ VclPtr<FixedText> m_pCTLFontLanguageFT;
+ VclPtr<SvxLanguageBox> m_pCTLFontLanguageLB;
+ VclPtr<FixedText> m_pCTLFontTypeFT;
SvxCharNamePage_Impl* m_pImpl;
@@ -175,37 +178,37 @@ class SvxCharEffectsPage : public SvxCharBasePage
private:
static const sal_uInt16 pEffectsRanges[];
- FixedText* m_pFontColorFT;
- ColorListBox* m_pFontColorLB;
+ VclPtr<FixedText> m_pFontColorFT;
+ VclPtr<ColorListBox> m_pFontColorLB;
- FixedText* m_pEffectsFT;
- ListBox* m_pEffectsLB;
+ VclPtr<FixedText> m_pEffectsFT;
+ VclPtr<ListBox> m_pEffectsLB;
- FixedText* m_pReliefFT;
- ListBox* m_pReliefLB;
+ VclPtr<FixedText> m_pReliefFT;
+ VclPtr<ListBox> m_pReliefLB;
- TriStateBox* m_pOutlineBtn;
- TriStateBox* m_pShadowBtn;
- TriStateBox* m_pBlinkingBtn;
- TriStateBox* m_pHiddenBtn;
+ VclPtr<TriStateBox> m_pOutlineBtn;
+ VclPtr<TriStateBox> m_pShadowBtn;
+ VclPtr<TriStateBox> m_pBlinkingBtn;
+ VclPtr<TriStateBox> m_pHiddenBtn;
- ListBox* m_pOverlineLB;
- FixedText* m_pOverlineColorFT;
- ColorListBox* m_pOverlineColorLB;
+ VclPtr<ListBox> m_pOverlineLB;
+ VclPtr<FixedText> m_pOverlineColorFT;
+ VclPtr<ColorListBox> m_pOverlineColorLB;
- ListBox* m_pStrikeoutLB;
+ VclPtr<ListBox> m_pStrikeoutLB;
- ListBox* m_pUnderlineLB;
- FixedText* m_pUnderlineColorFT;
- ColorListBox* m_pUnderlineColorLB;
+ VclPtr<ListBox> m_pUnderlineLB;
+ VclPtr<FixedText> m_pUnderlineColorFT;
+ VclPtr<ColorListBox> m_pUnderlineColorLB;
- CheckBox* m_pIndividualWordsBtn;
+ VclPtr<CheckBox> m_pIndividualWordsBtn;
- FixedText* m_pEmphasisFT;
- ListBox* m_pEmphasisLB;
+ VclPtr<FixedText> m_pEmphasisFT;
+ VclPtr<ListBox> m_pEmphasisLB;
- FixedText* m_pPositionFT;
- ListBox* m_pPositionLB;
+ VclPtr<FixedText> m_pPositionFT;
+ VclPtr<ListBox> m_pPositionLB;
sal_uInt16 m_nHtmlMode;
@@ -226,8 +229,10 @@ private:
DECL_LINK( ColorBoxSelectHdl_Impl, ColorListBox* );
public:
- using SfxTabPage::DeactivatePage;
+ virtual ~SvxCharEffectsPage();
+ virtual void dispose() SAL_OVERRIDE;
+ using SfxTabPage::DeactivatePage;
virtual int DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
public:
@@ -252,30 +257,30 @@ class SvxCharPositionPage : public SvxCharBasePage
static const sal_uInt16 pPositionRanges[];
private:
- RadioButton* m_pHighPosBtn;
- RadioButton* m_pNormalPosBtn;
- RadioButton* m_pLowPosBtn;
- FixedText* m_pHighLowFT;
- MetricField* m_pHighLowMF;
- CheckBox* m_pHighLowRB;
- FixedText* m_pFontSizeFT;
- MetricField* m_pFontSizeMF;
-
- VclContainer* m_pRotationContainer;
-
- FixedText* m_pScalingFT;
- FixedText* m_pScalingAndRotationFT;
- RadioButton* m_p0degRB;
- RadioButton* m_p90degRB;
- RadioButton* m_p270degRB;
- CheckBox* m_pFitToLineCB;
-
- MetricField* m_pScaleWidthMF;
-
- ListBox* m_pKerningLB;
- FixedText* m_pKerningFT;
- MetricField* m_pKerningMF;
- CheckBox* m_pPairKerningBtn;
+ VclPtr<RadioButton> m_pHighPosBtn;
+ VclPtr<RadioButton> m_pNormalPosBtn;
+ VclPtr<RadioButton> m_pLowPosBtn;
+ VclPtr<FixedText> m_pHighLowFT;
+ VclPtr<MetricField> m_pHighLowMF;
+ VclPtr<CheckBox> m_pHighLowRB;
+ VclPtr<FixedText> m_pFontSizeFT;
+ VclPtr<MetricField> m_pFontSizeMF;
+
+ VclPtr<VclContainer> m_pRotationContainer;
+
+ VclPtr<FixedText> m_pScalingFT;
+ VclPtr<FixedText> m_pScalingAndRotationFT;
+ VclPtr<RadioButton> m_p0degRB;
+ VclPtr<RadioButton> m_p90degRB;
+ VclPtr<RadioButton> m_p270degRB;
+ VclPtr<CheckBox> m_pFitToLineCB;
+
+ VclPtr<MetricField> m_pScaleWidthMF;
+
+ VclPtr<ListBox> m_pKerningLB;
+ VclPtr<FixedText> m_pKerningFT;
+ VclPtr<MetricField> m_pKerningMF;
+ VclPtr<CheckBox> m_pPairKerningBtn;
short m_nSuperEsc;
short m_nSubEsc;
@@ -304,6 +309,9 @@ private:
DECL_LINK(ScaleWidthModifyHdl_Impl, void *);
public:
+ virtual ~SvxCharPositionPage();
+ virtual void dispose() SAL_OVERRIDE;
+
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
@@ -328,10 +336,10 @@ class SvxCharTwoLinesPage : public SvxCharBasePage
{
private:
static const sal_uInt16 pTwoLinesRanges[];
- CheckBox* m_pTwoLinesBtn;
- VclContainer* m_pEnclosingFrame;
- ListBox* m_pStartBracketLB;
- ListBox* m_pEndBracketLB;
+ VclPtr<CheckBox> m_pTwoLinesBtn;
+ VclPtr<VclContainer> m_pEnclosingFrame;
+ VclPtr<ListBox> m_pStartBracketLB;
+ VclPtr<ListBox> m_pEndBracketLB;
sal_uInt16 m_nStartBracketPosition;
sal_uInt16 m_nEndBracketPosition;
@@ -347,13 +355,15 @@ private:
DECL_LINK( CharacterMapHdl_Impl, ListBox* );
public:
+ virtual ~SvxCharTwoLinesPage();
+ virtual void dispose() SAL_OVERRIDE;
+
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
virtual void ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
virtual int DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
-public:
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
static const sal_uInt16* GetRanges() { return pTwoLinesRanges; }
diff --git a/cui/source/inc/connect.hxx b/cui/source/inc/connect.hxx
index b079eef1c591..aae2744538ce 100644
--- a/cui/source/inc/connect.hxx
+++ b/cui/source/inc/connect.hxx
@@ -34,21 +34,21 @@ class SvxConnectionPage : public SfxTabPage
{
private:
static const sal_uInt16 pRanges[];
- ListBox* m_pLbType;
+ VclPtr<ListBox> m_pLbType;
- FixedText* m_pFtLine1;
- MetricField* m_pMtrFldLine1;
- FixedText* m_pFtLine2;
- MetricField* m_pMtrFldLine2;
- FixedText* m_pFtLine3;
- MetricField* m_pMtrFldLine3;
+ VclPtr<FixedText> m_pFtLine1;
+ VclPtr<MetricField> m_pMtrFldLine1;
+ VclPtr<FixedText> m_pFtLine2;
+ VclPtr<MetricField> m_pMtrFldLine2;
+ VclPtr<FixedText> m_pFtLine3;
+ VclPtr<MetricField> m_pMtrFldLine3;
- MetricField* m_pMtrFldHorz1;
- MetricField* m_pMtrFldVert1;
- MetricField* m_pMtrFldHorz2;
- MetricField* m_pMtrFldVert2;
+ VclPtr<MetricField> m_pMtrFldHorz1;
+ VclPtr<MetricField> m_pMtrFldVert1;
+ VclPtr<MetricField> m_pMtrFldHorz2;
+ VclPtr<MetricField> m_pMtrFldVert2;
- SvxXConnectionPreview* m_pCtlPreview;
+ VclPtr<SvxXConnectionPreview> m_pCtlPreview;
const SfxItemSet& rOutAttrs;
SfxItemSet aAttrSet;
@@ -62,6 +62,8 @@ private:
public:
SvxConnectionPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
+ virtual ~SvxConnectionPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pRanges; }
diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx
index dfe0d989b3af..596d3231443e 100644
--- a/cui/source/inc/cuicharmap.hxx
+++ b/cui/source/inc/cuicharmap.hxx
@@ -67,16 +67,16 @@ private:
void init();
- SvxShowCharSet* m_pShowSet;
- Edit* m_pShowText;
- PushButton* m_pOKBtn;
- FixedText* m_pFontText;
- ListBox* m_pFontLB;
- FixedText* m_pSubsetText;
- ListBox* m_pSubsetLB;
- FixedText* m_pSymbolText;
- SvxShowText* m_pShowChar;
- FixedText* m_pCharCodeText;
+ VclPtr<SvxShowCharSet> m_pShowSet;
+ VclPtr<Edit> m_pShowText;
+ VclPtr<PushButton> m_pOKBtn;
+ VclPtr<FixedText> m_pFontText;
+ VclPtr<ListBox> m_pFontLB;
+ VclPtr<FixedText> m_pSubsetText;
+ VclPtr<ListBox> m_pSubsetLB;
+ VclPtr<FixedText> m_pSymbolText;
+ VclPtr<SvxShowText> m_pShowChar;
+ VclPtr<FixedText> m_pCharCodeText;
vcl::Font aFont;
bool bOne;
const SubsetMap* pSubsetMap;
@@ -93,6 +93,8 @@ private:
public:
SvxCharacterMap( vcl::Window* pParent, bool bOne=true, const SfxItemSet* pSet=0 );
+ virtual ~SvxCharacterMap();
+ virtual void dispose() SAL_OVERRIDE;
void DisableFontSelection();
diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx
index 96dacaf1d5b4..d56c9d5ee2a4 100644
--- a/cui/source/inc/cuifmsearch.hxx
+++ b/cui/source/inc/cuifmsearch.hxx
@@ -47,36 +47,36 @@ class FmSearchDialog : public ModalDialog
friend class FmSearchEngine;
// my all Controls
- RadioButton *m_prbSearchForText;
- RadioButton *m_prbSearchForNull;
- RadioButton *m_prbSearchForNotNull;
- ComboBox *m_pcmbSearchText;
- FixedText *m_pftForm;
- ListBox *m_plbForm;
- RadioButton *m_prbAllFields;
- RadioButton *m_prbSingleField;
- ListBox *m_plbField;
- FixedText *m_pftPosition;
- ListBox *m_plbPosition;
- CheckBox *m_pcbUseFormat;
- CheckBox *m_pcbCase;
- CheckBox *m_pcbBackwards;
- CheckBox *m_pcbStartOver;
- CheckBox *m_pcbWildCard;
- CheckBox *m_pcbRegular;
- CheckBox *m_pcbApprox;
- PushButton *m_ppbApproxSettings;
- CheckBox *m_pHalfFullFormsCJK;
- CheckBox *m_pSoundsLikeCJK;
- PushButton *m_pSoundsLikeCJKSettings;
- FixedText *m_pftRecord;
- FixedText *m_pftHint;
- PushButton *m_pbSearchAgain;
- CancelButton *m_pbClose;
+ VclPtr<RadioButton> m_prbSearchForText;
+ VclPtr<RadioButton> m_prbSearchForNull;
+ VclPtr<RadioButton> m_prbSearchForNotNull;
+ VclPtr<ComboBox> m_pcmbSearchText;
+ VclPtr<FixedText> m_pftForm;
+ VclPtr<ListBox> m_plbForm;
+ VclPtr<RadioButton> m_prbAllFields;
+ VclPtr<RadioButton> m_prbSingleField;
+ VclPtr<ListBox> m_plbField;
+ VclPtr<FixedText> m_pftPosition;
+ VclPtr<ListBox> m_plbPosition;
+ VclPtr<CheckBox> m_pcbUseFormat;
+ VclPtr<CheckBox> m_pcbCase;
+ VclPtr<CheckBox> m_pcbBackwards;
+ VclPtr<CheckBox> m_pcbStartOver;
+ VclPtr<CheckBox> m_pcbWildCard;
+ VclPtr<CheckBox> m_pcbRegular;
+ VclPtr<CheckBox> m_pcbApprox;
+ VclPtr<PushButton> m_ppbApproxSettings;
+ VclPtr<CheckBox> m_pHalfFullFormsCJK;
+ VclPtr<CheckBox> m_pSoundsLikeCJK;
+ VclPtr<PushButton> m_pSoundsLikeCJKSettings;
+ VclPtr<FixedText> m_pftRecord;
+ VclPtr<FixedText> m_pftHint;
+ VclPtr<PushButton> m_pbSearchAgain;
+ VclPtr<CancelButton> m_pbClose;
OUString m_sSearch;
OUString m_sCancel;
- vcl::Window* m_pPreSearchFocus;
+ VclPtr<vcl::Window> m_pPreSearchFocus;
Link m_lnkFoundHandler; ///< Handler for "found"
Link m_lnkCanceledNotFoundHdl; ///< Handler for Positioning the Cursors
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 2c82170ea3a7..e02d6a1b5094 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -60,8 +60,8 @@ class SearchThread: public salhelper::Thread
{
private:
- SearchProgress* mpProgress;
- TPGalleryThemeProperties* mpBrowser;
+ VclPtr<SearchProgress> mpProgress;
+ VclPtr<TPGalleryThemeProperties> mpBrowser;
INetURLObject maStartURL;
void ImplSearch( const INetURLObject& rStartURL,
@@ -81,10 +81,10 @@ public:
class SearchProgress : public ModalDialog
{
private:
- FixedText* m_pFtSearchDir;
- FixedText* m_pFtSearchType;
- CancelButton* m_pBtnCancel;
- vcl::Window * parent_;
+ VclPtr<FixedText> m_pFtSearchDir;
+ VclPtr<FixedText> m_pFtSearchType;
+ VclPtr<CancelButton> m_pBtnCancel;
+ VclPtr<vcl::Window> parent_;
INetURLObject startUrl_;
rtl::Reference< SearchThread > maSearchThread;
@@ -93,6 +93,8 @@ private:
public:
SearchProgress( vcl::Window* pParent, const INetURLObject& rStartURL );
+ virtual ~SearchProgress();
+ virtual void dispose() SAL_OVERRIDE;
DECL_LINK( CleanUpHdl, void* );
@@ -106,8 +108,8 @@ class TakeThread: public salhelper::Thread
{
private:
- TakeProgress* mpProgress;
- TPGalleryThemeProperties* mpBrowser;
+ VclPtr<TakeProgress> mpProgress;
+ VclPtr<TPGalleryThemeProperties> mpBrowser;
TokenList_impl& mrTakenList;
virtual ~TakeThread();
@@ -125,9 +127,9 @@ public:
class TakeProgress : public ModalDialog
{
private:
- FixedText* m_pFtTakeFile;
- CancelButton* m_pBtnCancel;
- vcl::Window * window_;
+ VclPtr<FixedText> m_pFtTakeFile;
+ VclPtr<CancelButton> m_pBtnCancel;
+ VclPtr<vcl::Window> window_;
rtl::Reference< TakeThread > maTakeThread;
TokenList_impl maTakenList;
@@ -137,6 +139,8 @@ private:
public:
TakeProgress( vcl::Window* pWindow );
+ virtual ~TakeProgress();
+ virtual void dispose() SAL_OVERRIDE;
DECL_LINK( CleanUpHdl, void* );
@@ -148,8 +152,8 @@ public:
class ActualizeProgress : public ModalDialog
{
private:
- FixedText* m_pFtActualizeFile;
- CancelButton* m_pBtnCancel;
+ VclPtr<FixedText> m_pFtActualizeFile;
+ VclPtr<CancelButton> m_pBtnCancel;
Idle* pIdle;
GalleryTheme* pTheme;
GalleryProgress aStatusProgress;
@@ -160,6 +164,8 @@ private:
public:
ActualizeProgress( vcl::Window* pWindow, GalleryTheme* pThm );
+ virtual ~ActualizeProgress();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
};
@@ -167,23 +173,27 @@ public:
class TitleDialog : public ModalDialog
{
private:
- Edit* m_pEdit;
+ VclPtr<Edit> m_pEdit;
public:
TitleDialog(vcl::Window* pParent, const OUString& rOldText);
+ virtual ~TitleDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetTitle() const { return m_pEdit->GetText(); }
};
class GalleryIdDialog : public ModalDialog
{
private:
- OKButton* m_pBtnOk;
- ListBox* m_pLbResName;
+ VclPtr<OKButton> m_pBtnOk;
+ VclPtr<ListBox> m_pLbResName;
GalleryTheme* pThm;
DECL_LINK( ClickOkHdl, void* );
DECL_LINK( ClickResNameHdl, void* );
public:
GalleryIdDialog( vcl::Window* pParent, GalleryTheme* pThm );
+ virtual ~GalleryIdDialog();
+ virtual void dispose() SAL_OVERRIDE;
sal_uLong GetId() const { return m_pLbResName->GetSelectEntryPos(); }
};
@@ -204,12 +214,12 @@ class TPGalleryThemeGeneral : public SfxTabPage
{
private:
- FixedImage* m_pFiMSImage;
- Edit* m_pEdtMSName;
- FixedText* m_pFtMSShowType;
- FixedText* m_pFtMSShowPath;
- FixedText* m_pFtMSShowContent;
- FixedText* m_pFtMSShowChangeDate;
+ VclPtr<FixedImage> m_pFiMSImage;
+ VclPtr<Edit> m_pEdtMSName;
+ VclPtr<FixedText> m_pFtMSShowType;
+ VclPtr<FixedText> m_pFtMSShowPath;
+ VclPtr<FixedText> m_pFtMSShowContent;
+ VclPtr<FixedText> m_pFtMSShowChangeDate;
ExchangeData* pData;
virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE {}
@@ -219,6 +229,8 @@ private:
public:
TPGalleryThemeGeneral( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~TPGalleryThemeGeneral();
+ virtual void dispose() SAL_OVERRIDE;
void SetXChgData( ExchangeData* pData );
const ExchangeData* GetXChgData() const { return pData; }
@@ -234,13 +246,13 @@ class TPGalleryThemeProperties : public SfxTabPage
friend class TakeProgress;
friend class TakeThread;
- ComboBox* m_pCbbFileType;
- ListBox* m_pLbxFound;
- PushButton* m_pBtnSearch;
- PushButton* m_pBtnTake;
- PushButton* m_pBtnTakeAll;
- CheckBox* m_pCbxPreview;
- GalleryPreview* m_pWndPreview;
+ VclPtr<ComboBox> m_pCbbFileType;
+ VclPtr<ListBox> m_pLbxFound;
+ VclPtr<PushButton> m_pBtnSearch;
+ VclPtr<PushButton> m_pBtnTake;
+ VclPtr<PushButton> m_pBtnTakeAll;
+ VclPtr<CheckBox> m_pCbxPreview;
+ VclPtr<GalleryPreview> m_pWndPreview;
ExchangeData* pData;
StringList aFoundList;
diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx
index 1fb139375fd7..f43685d65fd2 100644
--- a/cui/source/inc/cuigrfflt.hxx
+++ b/cui/source/inc/cuigrfflt.hxx
@@ -77,7 +77,7 @@ private:
DECL_LINK( ImplModifyHdl, void* p );
protected:
- GraphicPreviewWindow* mpPreview;
+ VclPtr<GraphicPreviewWindow> mpPreview;
const Link& GetModifyHdl() const { return maModifyHdl; }
const Size& GetGraphicSizePixel() const { return maSizePixel; }
@@ -85,6 +85,8 @@ protected:
public:
GraphicFilterDialog(vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription, const Graphic& rGraphic);
+ virtual ~GraphicFilterDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) = 0;
};
@@ -97,11 +99,13 @@ public:
class GraphicFilterSmooth : public GraphicFilterDialog
{
private:
- NumericField* mpMtrRadius;
+ VclPtr<NumericField> mpMtrRadius;
public:
GraphicFilterSmooth( vcl::Window* pParent, const Graphic& rGraphic, double nRadius);
+ virtual ~GraphicFilterSmooth();
+ virtual void dispose() SAL_OVERRIDE;
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE;
double GetRadius() const { return mpMtrRadius->GetValue() / 10.0; }
@@ -114,14 +118,16 @@ public:
class GraphicFilterMosaic : public GraphicFilterDialog
{
private:
- MetricField* mpMtrWidth;
- MetricField* mpMtrHeight;
- CheckBox* mpCbxEdges;
+ VclPtr<MetricField> mpMtrWidth;
+ VclPtr<MetricField> mpMtrHeight;
+ VclPtr<CheckBox> mpCbxEdges;
public:
GraphicFilterMosaic(vcl::Window* pParent, const Graphic& rGraphic,
sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, bool bEnhanceEdges);
+ virtual ~GraphicFilterMosaic();
+ virtual void dispose() SAL_OVERRIDE;
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE;
long GetTileWidth() const { return static_cast<long>(mpMtrWidth->GetValue()); }
@@ -136,13 +142,15 @@ public:
class GraphicFilterSolarize : public GraphicFilterDialog
{
private:
- MetricField* mpMtrThreshold;
- CheckBox* mpCbxInvert;
+ VclPtr<MetricField> mpMtrThreshold;
+ VclPtr<CheckBox> mpCbxInvert;
public:
GraphicFilterSolarize( vcl::Window* pParent, const Graphic& rGraphic,
sal_uInt8 nGreyThreshold, bool bInvert );
+ virtual ~GraphicFilterSolarize();
+ virtual void dispose() SAL_OVERRIDE;
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE;
sal_uInt8 GetGreyThreshold() const { return( (sal_uInt8) FRound( mpMtrThreshold->GetValue() * 2.55 ) ); }
@@ -156,10 +164,12 @@ public:
class GraphicFilterSepia : public GraphicFilterDialog
{
private:
- MetricField* mpMtrSepia;
+ VclPtr<MetricField> mpMtrSepia;
public:
GraphicFilterSepia( vcl::Window* pParent, const Graphic& rGraphic,
sal_uInt16 nSepiaPercent );
+ virtual ~GraphicFilterSepia();
+ virtual void dispose() SAL_OVERRIDE;
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE;
sal_uInt16 GetSepiaPercent() const
{
@@ -174,10 +184,12 @@ public:
class GraphicFilterPoster : public GraphicFilterDialog
{
private:
- NumericField* mpNumPoster;
+ VclPtr<NumericField> mpNumPoster;
public:
GraphicFilterPoster( vcl::Window* pParent, const Graphic& rGraphic,
sal_uInt16 nPosterColorCount );
+ virtual ~GraphicFilterPoster();
+ virtual void dispose() SAL_OVERRIDE;
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE;
sal_uInt16 GetPosterColorCount() const { return( (sal_uInt16) mpNumPoster->GetValue() ); }
@@ -203,10 +215,12 @@ public:
class GraphicFilterEmboss : public GraphicFilterDialog
{
private:
- EmbossControl* mpCtlLight;
+ VclPtr<EmbossControl> mpCtlLight;
public:
GraphicFilterEmboss( vcl::Window* pParent, const Graphic& rGraphic,
RECT_POINT eLightSource );
+ virtual ~GraphicFilterEmboss();
+ virtual void dispose() SAL_OVERRIDE;
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE;
RECT_POINT GetLightSource() const { return mpCtlLight->GetActualRP(); }
diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx
index 93de02f161cc..b85633738ddf 100644
--- a/cui/source/inc/cuihyperdlg.hxx
+++ b/cui/source/inc/cuihyperdlg.hxx
@@ -38,7 +38,7 @@ class SvxHpLinkDlg;
class SvxHlinkCtrl : public SfxControllerItem
{
private :
- SvxHpLinkDlg *pParent;
+ VclPtr<SvxHpLinkDlg> pParent;
SfxStatusForwarder aRdOnlyForwarder;
diff --git a/cui/source/inc/cuiimapwnd.hxx b/cui/source/inc/cuiimapwnd.hxx
index 3266a2a3449c..87c7e546cc6a 100644
--- a/cui/source/inc/cuiimapwnd.hxx
+++ b/cui/source/inc/cuiimapwnd.hxx
@@ -33,11 +33,11 @@
class URLDlg : public ModalDialog
{
- Edit* m_pEdtURL;
- ComboBox* m_pCbbTargets;
- Edit* m_pEdtName;
- Edit* m_pEdtAlternativeText;
- VclMultiLineEdit* m_pEdtDescription;
+ VclPtr<Edit> m_pEdtURL;
+ VclPtr<ComboBox> m_pCbbTargets;
+ VclPtr<Edit> m_pEdtName;
+ VclPtr<Edit> m_pEdtAlternativeText;
+ VclPtr<VclMultiLineEdit> m_pEdtDescription;
public:
@@ -45,6 +45,8 @@ public:
const OUString& rURL, const OUString& rAlternativeText, const OUString& rDescription,
const OUString& rTarget, const OUString& rName,
TargetList& rTargetList );
+ virtual ~URLDlg();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetURL() const { return m_pEdtURL->GetText(); }
OUString GetAltText() const { return m_pEdtAlternativeText->GetText(); }
diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx
index 2febcb8d0976..2a4c295d60e4 100644
--- a/cui/source/inc/cuioptgenrl.hxx
+++ b/cui/source/inc/cuioptgenrl.hxx
@@ -40,7 +40,7 @@ class SvxGeneralTabPage : public SfxTabPage
using TabPage::DeactivatePage;
private:
// the "Use data for document properties" checkbox
- CheckBox* m_pUseDataCB;
+ VclPtr<CheckBox> m_pUseDataCB;
// rows
struct Row;
std::vector<boost::shared_ptr<Row> > vRows;
@@ -64,6 +64,8 @@ protected:
public:
SvxGeneralTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~SvxGeneralTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
diff --git a/cui/source/inc/cuisrchdlg.hxx b/cui/source/inc/cuisrchdlg.hxx
index 3dc19f0a1c97..376f9196a2d1 100644
--- a/cui/source/inc/cuisrchdlg.hxx
+++ b/cui/source/inc/cuisrchdlg.hxx
@@ -37,7 +37,7 @@ class SvxJSearchOptionsPage;
class SvxJSearchOptionsDialog : public SfxSingleTabDialog
{
sal_Int32 nInitialTlFlags;
- SvxJSearchOptionsPage *pPage;
+ VclPtr<SvxJSearchOptionsPage> pPage;
SvxJSearchOptionsDialog( const SvxJSearchOptionsDialog & ) SAL_DELETED_FUNCTION;
SvxJSearchOptionsDialog & operator == ( const SvxJSearchOptionsDialog & ) SAL_DELETED_FUNCTION;
@@ -45,6 +45,8 @@ class SvxJSearchOptionsDialog : public SfxSingleTabDialog
public:
SvxJSearchOptionsDialog(vcl::Window *pParent,
const SfxItemSet& rOptionsSet, sal_Int32 nInitialFlags);
+ virtual ~SvxJSearchOptionsDialog();
+ virtual void dispose() SAL_OVERRIDE;
// Window
virtual void Activate() SAL_OVERRIDE;
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index c3ebd3048dc3..42e668c31563 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -115,29 +115,29 @@ class SvxTransparenceTabPage : public SvxTabPage
sal_uInt16 nDlgType;
// main selection
- RadioButton* m_pRbtTransOff;
- RadioButton* m_pRbtTransLinear;
- RadioButton* m_pRbtTransGradient;
+ VclPtr<RadioButton> m_pRbtTransOff;
+ VclPtr<RadioButton> m_pRbtTransLinear;
+ VclPtr<RadioButton> m_pRbtTransGradient;
/// linear transparency
- MetricField* m_pMtrTransparent;
+ VclPtr<MetricField> m_pMtrTransparent;
// gradient transparency
- VclGrid* m_pGridGradient;
- ListBox* m_pLbTrgrGradientType;
- FixedText* m_pFtTrgrCenterX;
- MetricField* m_pMtrTrgrCenterX;
- FixedText* m_pFtTrgrCenterY;
- MetricField* m_pMtrTrgrCenterY;
- FixedText* m_pFtTrgrAngle;
- MetricField* m_pMtrTrgrAngle;
- MetricField* m_pMtrTrgrBorder;
- MetricField* m_pMtrTrgrStartValue;
- MetricField* m_pMtrTrgrEndValue;
+ VclPtr<VclGrid> m_pGridGradient;
+ VclPtr<ListBox> m_pLbTrgrGradientType;
+ VclPtr<FixedText> m_pFtTrgrCenterX;
+ VclPtr<MetricField> m_pMtrTrgrCenterX;
+ VclPtr<FixedText> m_pFtTrgrCenterY;
+ VclPtr<MetricField> m_pMtrTrgrCenterY;
+ VclPtr<FixedText> m_pFtTrgrAngle;
+ VclPtr<MetricField> m_pMtrTrgrAngle;
+ VclPtr<MetricField> m_pMtrTrgrBorder;
+ VclPtr<MetricField> m_pMtrTrgrStartValue;
+ VclPtr<MetricField> m_pMtrTrgrEndValue;
// preview
- SvxXRectPreview* m_pCtlBitmapPreview;
- SvxXRectPreview* m_pCtlXRectPreview;
+ VclPtr<SvxXRectPreview> m_pCtlBitmapPreview;
+ VclPtr<SvxXRectPreview> m_pCtlXRectPreview;
bool bBitmap;
XOutdevItemPool* pXPool;
@@ -160,6 +160,8 @@ class SvxTransparenceTabPage : public SvxTabPage
public:
SvxTransparenceTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs);
+ virtual ~SvxTransparenceTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window*, const SfxItemSet*);
static const sal_uInt16* GetRanges() { return pTransparenceRanges; }
@@ -183,48 +185,48 @@ class SvxAreaTabPage : public SvxTabPage
using TabPage::DeactivatePage;
static const sal_uInt16 pAreaRanges[];
private:
- ListBox* m_pTypeLB;
-
- VclBox* m_pFillLB;
- ColorLB* m_pLbColor;
- GradientLB* m_pLbGradient;
- HatchingLB* m_pLbHatching;
- BitmapLB* m_pLbBitmap;
- SvxXRectPreview* m_pCtlBitmapPreview;
-
- TriStateBox* m_pTsbStepCount;
- VclFrame* m_pFlStepCount;
- NumericField* m_pNumFldStepCount;
-
- VclFrame* m_pFlHatchBckgrd;
- CheckBox* m_pCbxHatchBckgrd;
- ColorLB* m_pLbHatchBckgrdColor;
-
- VclBox* m_pBxBitmap;
-
- VclFrame* m_pFlSize;
- TriStateBox* m_pTsbOriginal;
- TriStateBox* m_pTsbScale;
- VclGrid* m_pGridX_Y;
- FixedText* m_pFtXSize;
- MetricField* m_pMtrFldXSize;
- FixedText* m_pFtYSize;
- MetricField* m_pMtrFldYSize;
-
- VclFrame* m_pFlPosition;
- SvxRectCtl* m_pCtlPosition;
- VclGrid* m_pGridOffset;
- MetricField* m_pMtrFldXOffset;
- MetricField* m_pMtrFldYOffset;
- VclBox* m_pBxTile;
- TriStateBox* m_pTsbTile;
- TriStateBox* m_pTsbStretch;
- VclFrame* m_pFlOffset;
- RadioButton* m_pRbtRow;
- RadioButton* m_pRbtColumn;
- MetricField* m_pMtrFldOffset;
-
- SvxXRectPreview* m_pCtlXRectPreview;
+ VclPtr<ListBox> m_pTypeLB;
+
+ VclPtr<VclBox> m_pFillLB;
+ VclPtr<ColorLB> m_pLbColor;
+ VclPtr<GradientLB> m_pLbGradient;
+ VclPtr<HatchingLB> m_pLbHatching;
+ VclPtr<BitmapLB> m_pLbBitmap;
+ VclPtr<SvxXRectPreview> m_pCtlBitmapPreview;
+
+ VclPtr<TriStateBox> m_pTsbStepCount;
+ VclPtr<VclFrame> m_pFlStepCount;
+ VclPtr<NumericField> m_pNumFldStepCount;
+
+ VclPtr<VclFrame> m_pFlHatchBckgrd;
+ VclPtr<CheckBox> m_pCbxHatchBckgrd;
+ VclPtr<ColorLB> m_pLbHatchBckgrdColor;
+
+ VclPtr<VclBox> m_pBxBitmap;
+
+ VclPtr<VclFrame> m_pFlSize;
+ VclPtr<TriStateBox> m_pTsbOriginal;
+ VclPtr<TriStateBox> m_pTsbScale;
+ VclPtr<VclGrid> m_pGridX_Y;
+ VclPtr<FixedText> m_pFtXSize;
+ VclPtr<MetricField> m_pMtrFldXSize;
+ VclPtr<FixedText> m_pFtYSize;
+ VclPtr<MetricField> m_pMtrFldYSize;
+
+ VclPtr<VclFrame> m_pFlPosition;
+ VclPtr<SvxRectCtl> m_pCtlPosition;
+ VclPtr<VclGrid> m_pGridOffset;
+ VclPtr<MetricField> m_pMtrFldXOffset;
+ VclPtr<MetricField> m_pMtrFldYOffset;
+ VclPtr<VclBox> m_pBxTile;
+ VclPtr<TriStateBox> m_pTsbTile;
+ VclPtr<TriStateBox> m_pTsbStretch;
+ VclPtr<VclFrame> m_pFlOffset;
+ VclPtr<RadioButton> m_pRbtRow;
+ VclPtr<RadioButton> m_pRbtColumn;
+ VclPtr<MetricField> m_pMtrFldOffset;
+
+ VclPtr<SvxXRectPreview> m_pCtlXRectPreview;
const SfxItemSet& rOutAttrs;
RECT_POINT eRP;
@@ -264,7 +266,7 @@ private:
bool mbDirectGraphicSet;
Graphic maDirectGraphic;
OUString maDirectName;
- PushButton* m_pBtnImport;
+ VclPtr<PushButton> m_pBtnImport;
DECL_LINK(SelectDialogTypeHdl_Impl, void *);
DECL_LINK( ModifyColorHdl_Impl, void * );
@@ -288,6 +290,8 @@ private:
public:
SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~SvxAreaTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void Construct();
@@ -326,13 +330,13 @@ class SvxShadowTabPage : public SvxTabPage
static const sal_uInt16 pShadowRanges[];
private:
- TriStateBox* m_pTsbShowShadow;
- VclGrid* m_pGridShadow;
- SvxRectCtl* m_pCtlPosition;
- MetricField* m_pMtrDistance;
- ColorLB* m_pLbShadowColor;
- MetricField* m_pMtrTransparent;
- SvxXShadowPreview* m_pCtlXRectPreview;
+ VclPtr<TriStateBox> m_pTsbShowShadow;
+ VclPtr<VclGrid> m_pGridShadow;
+ VclPtr<SvxRectCtl> m_pCtlPosition;
+ VclPtr<MetricField> m_pMtrDistance;
+ VclPtr<ColorLB> m_pLbShadowColor;
+ VclPtr<MetricField> m_pMtrTransparent;
+ VclPtr<SvxXShadowPreview> m_pCtlXRectPreview;
const SfxItemSet& rOutAttrs;
RECT_POINT eRP;
@@ -355,6 +359,8 @@ private:
public:
SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~SvxShadowTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void Construct();
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
@@ -383,25 +389,25 @@ class SvxGradientTabPage : public SfxTabPage
using TabPage::DeactivatePage;
private:
- ListBox* m_pLbGradientType;
- FixedText* m_pFtCenterX;
- MetricField* m_pMtrCenterX;
- FixedText* m_pFtCenterY;
- MetricField* m_pMtrCenterY;
- FixedText* m_pFtAngle;
- MetricField* m_pMtrAngle;
- MetricField* m_pMtrBorder;
- ColorLB* m_pLbColorFrom;
- MetricField* m_pMtrColorFrom;
- ColorLB* m_pLbColorTo;
- MetricField* m_pMtrColorTo;
- GradientLB* m_pLbGradients;
- SvxXRectPreview* m_pCtlPreview;
- PushButton* m_pBtnAdd;
- PushButton* m_pBtnModify;
- PushButton* m_pBtnDelete;
- PushButton* m_pBtnLoad;
- PushButton* m_pBtnSave;
+ VclPtr<ListBox> m_pLbGradientType;
+ VclPtr<FixedText> m_pFtCenterX;
+ VclPtr<MetricField> m_pMtrCenterX;
+ VclPtr<FixedText> m_pFtCenterY;
+ VclPtr<MetricField> m_pMtrCenterY;
+ VclPtr<FixedText> m_pFtAngle;
+ VclPtr<MetricField> m_pMtrAngle;
+ VclPtr<MetricField> m_pMtrBorder;
+ VclPtr<ColorLB> m_pLbColorFrom;
+ VclPtr<MetricField> m_pMtrColorFrom;
+ VclPtr<ColorLB> m_pLbColorTo;
+ VclPtr<MetricField> m_pMtrColorTo;
+ VclPtr<GradientLB> m_pLbGradients;
+ VclPtr<SvxXRectPreview> m_pCtlPreview;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnModify;
+ VclPtr<PushButton> m_pBtnDelete;
+ VclPtr<PushButton> m_pBtnLoad;
+ VclPtr<PushButton> m_pBtnSave;
const SfxItemSet& rOutAttrs;
@@ -434,6 +440,8 @@ private:
public:
SvxGradientTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~SvxGradientTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void Construct();
@@ -465,18 +473,18 @@ class SvxHatchTabPage : public SvxTabPage
using TabPage::DeactivatePage;
private:
- MetricField* m_pMtrDistance;
- MetricField* m_pMtrAngle;
- SvxRectCtl* m_pCtlAngle;
- ListBox* m_pLbLineType;
- ColorLB* m_pLbLineColor;
- HatchingLB* m_pLbHatchings;
- SvxXRectPreview* m_pCtlPreview;
- PushButton* m_pBtnAdd;
- PushButton* m_pBtnModify;
- PushButton* m_pBtnDelete;
- PushButton* m_pBtnLoad;
- PushButton* m_pBtnSave;
+ VclPtr<MetricField> m_pMtrDistance;
+ VclPtr<MetricField> m_pMtrAngle;
+ VclPtr<SvxRectCtl> m_pCtlAngle;
+ VclPtr<ListBox> m_pLbLineType;
+ VclPtr<ColorLB> m_pLbLineColor;
+ VclPtr<HatchingLB> m_pLbHatchings;
+ VclPtr<SvxXRectPreview> m_pCtlPreview;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnModify;
+ VclPtr<PushButton> m_pBtnDelete;
+ VclPtr<PushButton> m_pBtnLoad;
+ VclPtr<PushButton> m_pBtnSave;
const SfxItemSet& rOutAttrs;
@@ -510,6 +518,8 @@ private:
public:
SvxHatchTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~SvxHatchTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void Construct();
@@ -545,19 +555,19 @@ class SvxBitmapTabPage : public SvxTabPage
using TabPage::DeactivatePage;
private:
- VclBox* m_pBxPixelEditor;
- SvxPixelCtl* m_pCtlPixel;
- ColorLB* m_pLbColor;
- ColorLB* m_pLbBackgroundColor;
- FixedText* m_pLbBitmapsHidden;
- BitmapLB* m_pLbBitmaps;
- SvxXRectPreview* m_pCtlPreview;
- PushButton* m_pBtnAdd;
- PushButton* m_pBtnModify;
- PushButton* m_pBtnImport;
- PushButton* m_pBtnDelete;
- PushButton* m_pBtnLoad;
- PushButton* m_pBtnSave;
+ VclPtr<VclBox> m_pBxPixelEditor;
+ VclPtr<SvxPixelCtl> m_pCtlPixel;
+ VclPtr<ColorLB> m_pLbColor;
+ VclPtr<ColorLB> m_pLbBackgroundColor;
+ VclPtr<FixedText> m_pLbBitmapsHidden;
+ VclPtr<BitmapLB> m_pLbBitmaps;
+ VclPtr<SvxXRectPreview> m_pCtlPreview;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnModify;
+ VclPtr<PushButton> m_pBtnImport;
+ VclPtr<PushButton> m_pBtnDelete;
+ VclPtr<PushButton> m_pBtnLoad;
+ VclPtr<PushButton> m_pBtnSave;
SvxBitmapCtl* m_pBitmapCtl;
@@ -642,11 +652,11 @@ class SvxColorTabPage : public SfxTabPage
private:
XPropertyListType meType;
- Window *mpTopDlg;
- CheckBox *m_pBoxEmbed;
- PushButton *m_pBtnLoad;
- PushButton *m_pBtnSave;
- FixedText *m_pTableName;
+ VclPtr<Window> mpTopDlg;
+ VclPtr<CheckBox> m_pBoxEmbed;
+ VclPtr<PushButton> m_pBtnLoad;
+ VclPtr<PushButton> m_pBtnSave;
+ VclPtr<FixedText> m_pTableName;
DECL_LINK( EmbedToggleHdl_Impl, void * );
DECL_LINK( ClickLoadHdl_Impl, void * );
@@ -660,31 +670,31 @@ private:
void EnableSave( bool bCanSave );
SvxColorTabPageShadow *pShadow;
- Edit* m_pEdtName;
- ColorLB* m_pLbColor;
+ VclPtr<Edit> m_pEdtName;
+ VclPtr<ColorLB> m_pLbColor;
- SvxColorValueSet* m_pValSetColorList;
+ VclPtr<SvxColorValueSet> m_pValSetColorList;
- SvxXRectPreview* m_pCtlPreviewOld;
- SvxXRectPreview* m_pCtlPreviewNew;
+ VclPtr<SvxXRectPreview> m_pCtlPreviewOld;
+ VclPtr<SvxXRectPreview> m_pCtlPreviewNew;
- ListBox* m_pLbColorModel;
+ VclPtr<ListBox> m_pLbColorModel;
- VclContainer* m_pRGB;
- NumericField* m_pR;
- NumericField* m_pG;
- NumericField* m_pB;
+ VclPtr<VclContainer> m_pRGB;
+ VclPtr<NumericField> m_pR;
+ VclPtr<NumericField> m_pG;
+ VclPtr<NumericField> m_pB;
- VclContainer* m_pCMYK;
- MetricField* m_pC;
- MetricField* m_pY;
- MetricField* m_pM;
- MetricField* m_pK;
+ VclPtr<VclContainer> m_pCMYK;
+ VclPtr<MetricField> m_pC;
+ VclPtr<MetricField> m_pY;
+ VclPtr<MetricField> m_pM;
+ VclPtr<MetricField> m_pK;
- PushButton* m_pBtnAdd;
- PushButton* m_pBtnModify;
- PushButton* m_pBtnWorkOn;
- PushButton* m_pBtnDelete;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnModify;
+ VclPtr<PushButton> m_pBtnWorkOn;
+ VclPtr<PushButton> m_pBtnDelete;
const SfxItemSet& rOutAttrs;
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index ca9f7b718d1a..6f19fb7eed04 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -91,34 +91,34 @@ class SvxLineTabPage : public SvxTabPage
using TabPage::DeactivatePage;
static const sal_uInt16 pLineRanges[];
private:
- VclBox* m_pBoxColor;
- LineLB* m_pLbLineStyle;
- ColorLB* m_pLbColor;
- VclBox* m_pBoxWidth;
- MetricField* m_pMtrLineWidth;
- VclBox* m_pBoxTransparency;
- MetricField* m_pMtrTransparent;
-
- VclFrame* m_pFlLineEnds;
- VclBox* m_pBoxArrowStyles;
- LineEndLB* m_pLbStartStyle;
- VclBox* m_pBoxStart;
- MetricField* m_pMtrStartWidth;
- TriStateBox* m_pTsbCenterStart;
- VclBox* m_pBoxEnd;
- LineEndLB* m_pLbEndStyle;
- MetricField* m_pMtrEndWidth;
- TriStateBox* m_pTsbCenterEnd;
- CheckBox* m_pCbxSynchronize;
- SvxXLinePreview* m_pCtlPreview;
+ VclPtr<VclBox> m_pBoxColor;
+ VclPtr<LineLB> m_pLbLineStyle;
+ VclPtr<ColorLB> m_pLbColor;
+ VclPtr<VclBox> m_pBoxWidth;
+ VclPtr<MetricField> m_pMtrLineWidth;
+ VclPtr<VclBox> m_pBoxTransparency;
+ VclPtr<MetricField> m_pMtrTransparent;
+
+ VclPtr<VclFrame> m_pFlLineEnds;
+ VclPtr<VclBox> m_pBoxArrowStyles;
+ VclPtr<LineEndLB> m_pLbStartStyle;
+ VclPtr<VclBox> m_pBoxStart;
+ VclPtr<MetricField> m_pMtrStartWidth;
+ VclPtr<TriStateBox> m_pTsbCenterStart;
+ VclPtr<VclBox> m_pBoxEnd;
+ VclPtr<LineEndLB> m_pLbEndStyle;
+ VclPtr<MetricField> m_pMtrEndWidth;
+ VclPtr<TriStateBox> m_pTsbCenterEnd;
+ VclPtr<CheckBox> m_pCbxSynchronize;
+ VclPtr<SvxXLinePreview> m_pCtlPreview;
// #116827#
- VclFrame* m_pFLEdgeStyle;
- VclGrid* m_pGridEdgeCaps;
- ListBox* m_pLBEdgeStyle;
+ VclPtr<VclFrame> m_pFLEdgeStyle;
+ VclPtr<VclGrid> m_pGridEdgeCaps;
+ VclPtr<ListBox> m_pLBEdgeStyle;
// LineCaps
- ListBox* m_pLBCapStyle;
+ VclPtr<ListBox> m_pLBCapStyle;
//#58425# symbols on a line (e. g. StarChart) ->
/** a list of symbols to be shown in menu. Symbol at position SID_ATTR_SYMBOLTYPE is to be shown in preview.
@@ -131,12 +131,12 @@ private:
long nSymbolType;
/// attributes for the shown symbols; only necessary if not equal to line properties
SfxItemSet* pSymbolAttr;
- VclFrame* m_pFlSymbol;
- VclGrid* m_pGridIconSize;
- MenuButton* m_pSymbolMB;
- MetricField* m_pSymbolWidthMF;
- MetricField* m_pSymbolHeightMF;
- CheckBox* m_pSymbolRatioCB;
+ VclPtr<VclFrame> m_pFlSymbol;
+ VclPtr<VclGrid> m_pGridIconSize;
+ VclPtr<MenuButton> m_pSymbolMB;
+ VclPtr<MetricField> m_pSymbolWidthMF;
+ VclPtr<MetricField> m_pSymbolHeightMF;
+ VclPtr<CheckBox> m_pSymbolRatioCB;
std::vector<OUString> aGrfNames;
SvxBmpItemInfoList aGrfBrushItems;
bool bLastWidthModified;
@@ -246,21 +246,21 @@ class SvxLineDefTabPage : public SfxTabPage
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
private:
- LineLB* m_pLbLineStyles;
- ListBox* m_pLbType1;
- ListBox* m_pLbType2;
- NumericField* m_pNumFldNumber1;
- NumericField* m_pNumFldNumber2;
- MetricField* m_pMtrLength1;
- MetricField* m_pMtrLength2;
- MetricField* m_pMtrDistance;
- CheckBox* m_pCbxSynchronize;
- PushButton* m_pBtnAdd;
- PushButton* m_pBtnModify;
- PushButton* m_pBtnDelete;
- PushButton* m_pBtnLoad;
- PushButton* m_pBtnSave;
- SvxXLinePreview* m_pCtlPreview;
+ VclPtr<LineLB> m_pLbLineStyles;
+ VclPtr<ListBox> m_pLbType1;
+ VclPtr<ListBox> m_pLbType2;
+ VclPtr<NumericField> m_pNumFldNumber1;
+ VclPtr<NumericField> m_pNumFldNumber2;
+ VclPtr<MetricField> m_pMtrLength1;
+ VclPtr<MetricField> m_pMtrLength2;
+ VclPtr<MetricField> m_pMtrDistance;
+ VclPtr<CheckBox> m_pCbxSynchronize;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnModify;
+ VclPtr<PushButton> m_pBtnDelete;
+ VclPtr<PushButton> m_pBtnLoad;
+ VclPtr<PushButton> m_pBtnSave;
+ VclPtr<SvxXLinePreview> m_pCtlPreview;
const SfxItemSet& rOutAttrs;
XDash aDash;
@@ -303,6 +303,8 @@ private:
public:
SvxLineDefTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~SvxLineDefTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void Construct();
@@ -333,14 +335,14 @@ class SvxLineEndDefTabPage : public SfxTabPage
using TabPage::DeactivatePage;
private:
- Edit* m_pEdtName;
- LineEndLB* m_pLbLineEnds;
- PushButton* m_pBtnAdd;
- PushButton* m_pBtnModify;
- PushButton* m_pBtnDelete;
- PushButton* m_pBtnLoad;
- PushButton* m_pBtnSave;
- SvxXLinePreview* m_pCtlPreview;
+ VclPtr<Edit> m_pEdtName;
+ VclPtr<LineEndLB> m_pLbLineEnds;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnModify;
+ VclPtr<PushButton> m_pBtnDelete;
+ VclPtr<PushButton> m_pBtnLoad;
+ VclPtr<PushButton> m_pBtnSave;
+ VclPtr<SvxXLinePreview> m_pCtlPreview;
const SfxItemSet& rOutAttrs;
const SdrObject* pPolyObj;
@@ -372,6 +374,8 @@ private:
public:
SvxLineEndDefTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~SvxLineEndDefTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void Construct();
diff --git a/cui/source/inc/cuitbxform.hxx b/cui/source/inc/cuitbxform.hxx
index 1f2b34d616db..4ee17070a5f5 100644
--- a/cui/source/inc/cuitbxform.hxx
+++ b/cui/source/inc/cuitbxform.hxx
@@ -29,10 +29,12 @@
class FmInputRecordNoDialog : public ModalDialog
{
public:
- NumericField* m_pRecordNo;
+ VclPtr<NumericField> m_pRecordNo;
public:
FmInputRecordNoDialog(vcl::Window * pParent);
+ virtual ~FmInputRecordNoDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetValue(long dNew) { m_pRecordNo->SetValue(dNew); }
long GetValue() const { return static_cast<long>(m_pRecordNo->GetValue()); }
diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx
index a665aabbf636..fa714753bd14 100644
--- a/cui/source/inc/dbregister.hxx
+++ b/cui/source/inc/dbregister.hxx
@@ -46,12 +46,12 @@ namespace svx
OUString aTypeText;
OUString aPathText;
- SvSimpleTableContainer* m_pPathCtrl;
- PushButton* m_pNew;
- PushButton* m_pEdit;
- PushButton* m_pDelete;
+ VclPtr<SvSimpleTableContainer> m_pPathCtrl;
+ VclPtr<PushButton> m_pNew;
+ VclPtr<PushButton> m_pEdit;
+ VclPtr<PushButton> m_pDelete;
- ::svx::OptHeaderTabListBox* pPathBox;
+ VclPtr<::svx::OptHeaderTabListBox> pPathBox;
SvTreeListEntry* m_pCurEntry;
sal_uLong m_nOldCount;
bool m_bModified;
diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx
index 46c971499c67..8615477f6618 100644
--- a/cui/source/inc/dlgname.hxx
+++ b/cui/source/inc/dlgname.hxx
@@ -30,9 +30,9 @@
class SvxNameDialog : public ModalDialog
{
private:
- FixedText* pFtDescription;
- Edit* pEdtName;
- OKButton* pBtnOK;
+ VclPtr<FixedText> pFtDescription;
+ VclPtr<Edit> pEdtName;
+ VclPtr<OKButton> pBtnOK;
Link aCheckNameHdl;
@@ -40,6 +40,8 @@ private:
public:
SvxNameDialog( vcl::Window* pWindow, const OUString& rName, const OUString& rDesc );
+ virtual ~SvxNameDialog();
+ virtual void dispose() SAL_OVERRIDE;
void GetName( OUString& rName ){rName = pEdtName->GetText();}
@@ -75,10 +77,10 @@ class SvxObjectNameDialog : public ModalDialog
{
private:
// name
- Edit* pEdtName;
+ VclPtr<Edit> pEdtName;
// buttons
- OKButton* pBtnOK;
+ VclPtr<OKButton> pBtnOK;
// callback link for name uniqueness
Link aCheckNameHdl;
@@ -88,6 +90,8 @@ private:
public:
// constructor
SvxObjectNameDialog(vcl::Window* pWindow, const OUString& rName);
+ virtual ~SvxObjectNameDialog();
+ virtual void dispose() SAL_OVERRIDE;
// data access
void GetName(OUString& rName) {rName = pEdtName->GetText(); }
@@ -110,15 +114,16 @@ class SvxObjectTitleDescDialog : public ModalDialog
{
private:
// title
- Edit* pEdtTitle;
+ VclPtr<Edit> pEdtTitle;
// description
- VclMultiLineEdit* pEdtDescription;
+ VclPtr<VclMultiLineEdit> pEdtDescription;
public:
// constructor
SvxObjectTitleDescDialog(vcl::Window* pWindow, const OUString& rTitle, const OUString& rDesc);
-
+ virtual ~SvxObjectTitleDescDialog();
+ virtual void dispose() SAL_OVERRIDE;
// data access
void GetTitle(OUString& rTitle) {rTitle = pEdtTitle->GetText(); }
void GetDescription(OUString& rDescription) {rDescription = pEdtDescription->GetText(); }
@@ -128,10 +133,10 @@ public:
class SvxMessDialog : public ModalDialog
{
private:
- FixedText* pFtDescription;
- PushButton* pBtn1;
- PushButton* pBtn2;
- FixedImage* pFtImage;
+ VclPtr<FixedText> pFtDescription;
+ VclPtr<PushButton> pBtn1;
+ VclPtr<PushButton> pBtn2;
+ VclPtr<FixedImage> pFtImage;
Image* pImage;
DECL_LINK(Button1Hdl, void *);
diff --git a/cui/source/inc/dstribut.hxx b/cui/source/inc/dstribut.hxx
index e0be5f3dd87e..0d07317c98ec 100644
--- a/cui/source/inc/dstribut.hxx
+++ b/cui/source/inc/dstribut.hxx
@@ -29,21 +29,23 @@ class SvxDistributePage : public SvxTabPage
SvxDistributeHorizontal m_eDistributeHor;
SvxDistributeVertical m_eDistributeVer;
- RadioButton* m_pBtnHorNone;
- RadioButton* m_pBtnHorLeft;
- RadioButton* m_pBtnHorCenter;
- RadioButton* m_pBtnHorDistance;
- RadioButton* m_pBtnHorRight;
- RadioButton* m_pBtnVerNone;
- RadioButton* m_pBtnVerTop;
- RadioButton* m_pBtnVerCenter;
- RadioButton* m_pBtnVerDistance;
- RadioButton* m_pBtnVerBottom;
+ VclPtr<RadioButton> m_pBtnHorNone;
+ VclPtr<RadioButton> m_pBtnHorLeft;
+ VclPtr<RadioButton> m_pBtnHorCenter;
+ VclPtr<RadioButton> m_pBtnHorDistance;
+ VclPtr<RadioButton> m_pBtnHorRight;
+ VclPtr<RadioButton> m_pBtnVerNone;
+ VclPtr<RadioButton> m_pBtnVerTop;
+ VclPtr<RadioButton> m_pBtnVerCenter;
+ VclPtr<RadioButton> m_pBtnVerDistance;
+ VclPtr<RadioButton> m_pBtnVerBottom;
public:
SvxDistributePage(vcl::Window* pWindow, const SfxItemSet& rInAttrs,
SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone,
SvxDistributeVertical eVer = SvxDistributeVerticalNone);
+ virtual ~SvxDistributePage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window*, const SfxItemSet&,
SvxDistributeHorizontal eHor, SvxDistributeVertical eVer);
@@ -57,12 +59,14 @@ public:
class SvxDistributeDialog : public SfxSingleTabDialog
{
- SvxDistributePage* mpPage;
+ VclPtr<SvxDistributePage> mpPage;
public:
SvxDistributeDialog(vcl::Window* pParent, const SfxItemSet& rAttr,
SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone,
SvxDistributeVertical eVer = SvxDistributeVerticalNone);
+ virtual ~SvxDistributeDialog();
+ virtual void dispose() SAL_OVERRIDE;
SvxDistributeHorizontal GetDistributeHor() const { return mpPage->GetDistributeHor(); }
SvxDistributeVertical GetDistributeVer() const { return mpPage->GetDistributeVer(); }
diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index 39cd21b26538..e52d39c92a01 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -56,28 +56,28 @@ class SvxGrfCropPage : public SfxTabPage
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
- VclContainer* m_pCropFrame;
- RadioButton* m_pZoomConstRB;
- RadioButton* m_pSizeConstRB;
- MetricField* m_pLeftMF;
- MetricField* m_pRightMF;
- MetricField* m_pTopMF;
- MetricField* m_pBottomMF;
-
- VclContainer* m_pScaleFrame;
- MetricField* m_pWidthZoomMF;
- MetricField* m_pHeightZoomMF;
-
- VclContainer* m_pSizeFrame;
- MetricField* m_pWidthMF;
- MetricField* m_pHeightMF;
-
- VclContainer* m_pOrigSizeGrid;
- FixedText* m_pOrigSizeFT;
- PushButton* m_pOrigSizePB;
+ VclPtr<VclContainer> m_pCropFrame;
+ VclPtr<RadioButton> m_pZoomConstRB;
+ VclPtr<RadioButton> m_pSizeConstRB;
+ VclPtr<MetricField> m_pLeftMF;
+ VclPtr<MetricField> m_pRightMF;
+ VclPtr<MetricField> m_pTopMF;
+ VclPtr<MetricField> m_pBottomMF;
+
+ VclPtr<VclContainer> m_pScaleFrame;
+ VclPtr<MetricField> m_pWidthZoomMF;
+ VclPtr<MetricField> m_pHeightZoomMF;
+
+ VclPtr<VclContainer> m_pSizeFrame;
+ VclPtr<MetricField> m_pWidthMF;
+ VclPtr<MetricField> m_pHeightMF;
+
+ VclPtr<VclContainer> m_pOrigSizeGrid;
+ VclPtr<FixedText> m_pOrigSizeFT;
+ VclPtr<PushButton> m_pOrigSizePB;
// Example
- SvxCropExample* m_pExampleWN;
+ VclPtr<SvxCropExample> m_pExampleWN;
Timer aTimer;
@@ -85,7 +85,7 @@ class SvxGrfCropPage : public SfxTabPage
Size aOrigSize;
Size aOrigPixelSize;
Size aPageSize;
- const MetricField* pLastCropField;
+ VclPtr<MetricField> pLastCropField;
long nOldWidth;
long nOldHeight;
bool bReset;
diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx
index 2cfd24d24b60..6018b0fa161a 100644
--- a/cui/source/inc/hangulhanjadlg.hxx
+++ b/cui/source/inc/hangulhanjadlg.hxx
@@ -104,27 +104,27 @@ namespace svx
{
private:
- PushButton* m_pFind;
- PushButton* m_pIgnore;
- PushButton* m_pIgnoreAll;
- PushButton* m_pReplace;
- PushButton* m_pReplaceAll;
- PushButton* m_pOptions;
- SuggestionDisplay* m_pSuggestions;
- RadioButton* m_pSimpleConversion;
- RadioButton* m_pHangulBracketed;
- RadioButton* m_pHanjaBracketed;
- Edit* m_pWordInput;
- FixedText* m_pOriginalWord;
- RubyRadioButton* m_pHanjaAbove;
- RubyRadioButton* m_pHanjaBelow;
- RubyRadioButton* m_pHangulAbove;
- RubyRadioButton* m_pHangulBelow;
- CheckBox* m_pHangulOnly;
- CheckBox* m_pHanjaOnly;
- CheckBox* m_pReplaceByChar;
-
- CheckBox* m_pIgnoreNonPrimary;
+ VclPtr<PushButton> m_pFind;
+ VclPtr<PushButton> m_pIgnore;
+ VclPtr<PushButton> m_pIgnoreAll;
+ VclPtr<PushButton> m_pReplace;
+ VclPtr<PushButton> m_pReplaceAll;
+ VclPtr<PushButton> m_pOptions;
+ VclPtr<SuggestionDisplay> m_pSuggestions;
+ VclPtr<RadioButton> m_pSimpleConversion;
+ VclPtr<RadioButton> m_pHangulBracketed;
+ VclPtr<RadioButton> m_pHanjaBracketed;
+ VclPtr<Edit> m_pWordInput;
+ VclPtr<FixedText> m_pOriginalWord;
+ VclPtr<RubyRadioButton> m_pHanjaAbove;
+ VclPtr<RubyRadioButton> m_pHanjaBelow;
+ VclPtr<RubyRadioButton> m_pHangulAbove;
+ VclPtr<RubyRadioButton> m_pHangulBelow;
+ VclPtr<CheckBox> m_pHangulOnly;
+ VclPtr<CheckBox> m_pHanjaOnly;
+ VclPtr<CheckBox> m_pReplaceByChar;
+
+ VclPtr<CheckBox> m_pIgnoreNonPrimary;
/** are we working for a document? This is normally true, but in case
the user uses the "find" functionality, we switch to working
with what the user entered, which then does not have any relation to
@@ -138,6 +138,8 @@ namespace svx
HangulHanjaConversionDialog(
vcl::Window* _pParent,
editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection );
+ virtual ~HangulHanjaConversionDialog();
+ virtual void dispose() SAL_OVERRIDE;
public:
void SetOptionsChangedHdl( const Link& _rHdl );
@@ -196,14 +198,14 @@ namespace svx
class HangulHanjaOptionsDialog : public ModalDialog
{
private:
- SvxCheckListBox* m_pDictsLB;
- CheckBox* m_pIgnorepostCB;
- CheckBox* m_pShowrecentlyfirstCB;
- CheckBox* m_pAutoreplaceuniqueCB;
- PushButton* m_pNewPB;
- PushButton* m_pEditPB;
- PushButton* m_pDeletePB;
- OKButton* m_pOkPB;
+ VclPtr<SvxCheckListBox> m_pDictsLB;
+ VclPtr<CheckBox> m_pIgnorepostCB;
+ VclPtr<CheckBox> m_pShowrecentlyfirstCB;
+ VclPtr<CheckBox> m_pAutoreplaceuniqueCB;
+ VclPtr<PushButton> m_pNewPB;
+ VclPtr<PushButton> m_pEditPB;
+ VclPtr<PushButton> m_pDeletePB;
+ VclPtr<OKButton> m_pOkPB;
SvLBoxButtonData* m_pCheckButtonData;
@@ -232,8 +234,8 @@ namespace svx
class HangulHanjaNewDictDialog : public ModalDialog
{
private:
- Edit* m_pDictNameED;
- OKButton* m_pOkBtn;
+ VclPtr<Edit> m_pDictNameED;
+ VclPtr<OKButton> m_pOkBtn;
bool m_bEntered;
@@ -241,6 +243,8 @@ namespace svx
DECL_LINK( ModifyHdl, void* );
public:
HangulHanjaNewDictDialog( vcl::Window* _pParent );
+ virtual ~HangulHanjaNewDictDialog();
+ virtual void dispose() SAL_OVERRIDE;
bool GetName( OUString& _rRetName ) const;
};
@@ -251,14 +255,16 @@ namespace svx
class SuggestionEdit : public Edit
{
private:
- SuggestionEdit* m_pPrev;
- SuggestionEdit* m_pNext;
- ScrollBar* m_pScrollBar;
+ VclPtr<SuggestionEdit> m_pPrev;
+ VclPtr<SuggestionEdit> m_pNext;
+ VclPtr<ScrollBar> m_pScrollBar;
bool ShouldScroll( bool _bUp ) const;
void DoJump( bool _bUp );
public:
SuggestionEdit( vcl::Window* pParent, WinBits nBits );
+ virtual ~SuggestionEdit();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
void init( ScrollBar* pScrollBar, SuggestionEdit* pPrev, SuggestionEdit* pNext);
};
@@ -274,15 +280,15 @@ namespace svx
OUString m_aOriginal;
SuggestionList* m_pSuggestions;
- ListBox* m_aBookLB;
- ComboBox* m_aOriginalLB;
- SuggestionEdit* m_aEdit1;
- SuggestionEdit* m_aEdit2;
- SuggestionEdit* m_aEdit3;
- SuggestionEdit* m_aEdit4;
- ScrollBar* m_aScrollSB;
- PushButton* m_aNewPB;
- PushButton* m_aDeletePB;
+ VclPtr<ListBox> m_aBookLB;
+ VclPtr<ComboBox> m_aOriginalLB;
+ VclPtr<SuggestionEdit> m_aEdit1;
+ VclPtr<SuggestionEdit> m_aEdit2;
+ VclPtr<SuggestionEdit> m_aEdit3;
+ VclPtr<SuggestionEdit> m_aEdit4;
+ VclPtr<ScrollBar> m_aScrollSB;
+ VclPtr<PushButton> m_aNewPB;
+ VclPtr<PushButton> m_aDeletePB;
sal_uInt16 m_nTopPos;
bool m_bModifiedSuggestions;
diff --git a/cui/source/inc/hldocntp.hxx b/cui/source/inc/hldocntp.hxx
index 186ce6a6fe9a..494b7a28d33a 100644
--- a/cui/source/inc/hldocntp.hxx
+++ b/cui/source/inc/hldocntp.hxx
@@ -30,11 +30,11 @@
class SvxHyperlinkNewDocTp : public SvxHyperlinkTabPageBase
{
private:
- RadioButton *m_pRbtEditNow;
- RadioButton *m_pRbtEditLater;
- SvxHyperURLBox *m_pCbbPath;
- PushButton *m_pBtCreate;
- ListBox *m_pLbDocTypes;
+ VclPtr<RadioButton> m_pRbtEditNow;
+ VclPtr<RadioButton> m_pRbtEditLater;
+ VclPtr<SvxHyperURLBox> m_pCbbPath;
+ VclPtr<PushButton> m_pBtCreate;
+ VclPtr<ListBox> m_pLbDocTypes;
bool ImplGetURLObject( const OUString& rPath, const OUString& rBase, INetURLObject& aURLObject ) const;
void FillDocumentList ();
diff --git a/cui/source/inc/hldoctp.hxx b/cui/source/inc/hldoctp.hxx
index 108df078dfa6..76dda781969a 100644
--- a/cui/source/inc/hldoctp.hxx
+++ b/cui/source/inc/hldoctp.hxx
@@ -30,12 +30,12 @@
class SvxHyperlinkDocTp : public SvxHyperlinkTabPageBase
{
private:
- SvxHyperURLBox *m_pCbbPath;
- PushButton *m_pBtFileopen;
+ VclPtr<SvxHyperURLBox> m_pCbbPath;
+ VclPtr<PushButton> m_pBtFileopen;
- Edit *m_pEdTarget;
- FixedText *m_pFtFullURL;
- PushButton *m_pBtBrowse;
+ VclPtr<Edit> m_pEdTarget;
+ VclPtr<FixedText> m_pFtFullURL;
+ VclPtr<PushButton> m_pBtBrowse;
OUString maStrURL;
@@ -67,6 +67,8 @@ protected:
public:
SvxHyperlinkDocTp ( vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet);
+ virtual ~SvxHyperlinkDocTp();
+ virtual void dispose() SAL_OVERRIDE;
static IconChoicePage* Create( vcl::Window* pWindow, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet );
diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx
index bc76625641e4..03b0132c1263 100644
--- a/cui/source/inc/hlinettp.hxx
+++ b/cui/source/inc/hlinettp.hxx
@@ -32,15 +32,15 @@
class SvxHyperlinkInternetTp : public SvxHyperlinkTabPageBase
{
private:
- RadioButton *m_pRbtLinktypInternet;
- RadioButton *m_pRbtLinktypFTP;
- SvxHyperURLBox *m_pCbbTarget;
- PushButton *m_pBtBrowse;
- FixedText *m_pFtLogin;
- Edit *m_pEdLogin;
- FixedText *m_pFtPassword;
- Edit *m_pEdPassword;
- CheckBox *m_pCbAnonymous;
+ VclPtr<RadioButton > m_pRbtLinktypInternet;
+ VclPtr<RadioButton> m_pRbtLinktypFTP;
+ VclPtr<SvxHyperURLBox> m_pCbbTarget;
+ VclPtr<PushButton> m_pBtBrowse;
+ VclPtr<FixedText> m_pFtLogin;
+ VclPtr<Edit> m_pEdLogin;
+ VclPtr<FixedText> m_pFtPassword;
+ VclPtr<Edit> m_pEdPassword;
+ VclPtr<CheckBox> m_pCbAnonymous;
OUString maStrOldUser;
OUString maStrOldPassword;
@@ -78,6 +78,8 @@ protected:
public:
SvxHyperlinkInternetTp ( vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet);
+ virtual ~SvxHyperlinkInternetTp();
+ virtual void dispose() SAL_OVERRIDE;
static IconChoicePage* Create( vcl::Window* pWindow, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet );
diff --git a/cui/source/inc/hlmailtp.hxx b/cui/source/inc/hlmailtp.hxx
index 1687e848156c..5eae01b5851a 100644
--- a/cui/source/inc/hlmailtp.hxx
+++ b/cui/source/inc/hlmailtp.hxx
@@ -30,10 +30,10 @@
class SvxHyperlinkMailTp : public SvxHyperlinkTabPageBase
{
private:
- SvxHyperURLBox *m_pCbbReceiver;
- PushButton *m_pBtAdrBook;
- FixedText *m_pFtSubject;
- Edit *m_pEdSubject;
+ VclPtr<SvxHyperURLBox> m_pCbbReceiver;
+ VclPtr<PushButton> m_pBtAdrBook;
+ VclPtr<FixedText> m_pFtSubject;
+ VclPtr<Edit> m_pEdSubject;
DECL_LINK (ClickAdrBookHdl_Impl , void * ); ///< Button : Address book
DECL_LINK (ModifiedReceiverHdl_Impl, void * ); ///< Combobox "receiver" modified
@@ -51,6 +51,8 @@ protected:
public:
SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet);
+ virtual ~SvxHyperlinkMailTp();
+ virtual void dispose() SAL_OVERRIDE;
static IconChoicePage* Create( vcl::Window* pWindow, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet );
diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx
index e9d8c32dac9c..9591a2a0f640 100644
--- a/cui/source/inc/hlmarkwn.hxx
+++ b/cui/source/inc/hlmarkwn.hxx
@@ -39,10 +39,12 @@ class SvxHlinkDlgMarkWnd;
class SvxHlmarkTreeLBox : public SvTreeListBox
{
private:
- SvxHlinkDlgMarkWnd* mpParentWnd;
+ VclPtr<SvxHlinkDlgMarkWnd> mpParentWnd;
public:
SvxHlmarkTreeLBox(vcl::Window* pParent, WinBits nStyle);
+ virtual ~SvxHlmarkTreeLBox();
+ virtual void dispose() SAL_OVERRIDE;
void SetParentWnd(SvxHlinkDlgMarkWnd* pParent)
{
@@ -62,13 +64,13 @@ class SvxHlinkDlgMarkWnd : public ModalDialog //FloatingWindow
private:
friend class SvxHlmarkTreeLBox;
- PushButton* mpBtApply;
- PushButton* mpBtClose;
- SvxHlmarkTreeLBox* mpLbTree;
+ VclPtr<PushButton> mpBtApply;
+ VclPtr<PushButton> mpBtClose;
+ VclPtr<SvxHlmarkTreeLBox> mpLbTree;
bool mbUserMoved;
- SvxHyperlinkTabPageBase* mpParent;
+ VclPtr<SvxHyperlinkTabPageBase> mpParent;
OUString maStrLastURL;
diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx
index 275d28b7afed..d155d6e42de7 100644
--- a/cui/source/inc/hltpbase.hxx
+++ b/cui/source/inc/hltpbase.hxx
@@ -67,11 +67,11 @@ public:
class SvxHyperlinkTabPageBase : public IconChoicePage
{
private:
- ComboBox *mpCbbFrame;
- ListBox *mpLbForm;
- Edit *mpEdIndication;
- Edit *mpEdText;
- PushButton *mpBtScript;
+ VclPtr<ComboBox> mpCbbFrame;
+ VclPtr<ListBox> mpLbForm;
+ VclPtr<Edit> mpEdIndication;
+ VclPtr<Edit> mpEdText;
+ VclPtr<PushButton> mpBtScript;
bool mbIsCloseDisabled;
@@ -79,7 +79,7 @@ private:
mxDocumentFrame;
protected:
- vcl::Window* mpDialog;
+ VclPtr<vcl::Window> mpDialog;
bool mbStdControlsInit;
@@ -87,7 +87,7 @@ protected:
Timer maTimer;
- SvxHlinkDlgMarkWnd* mpMarkWnd;
+ VclPtr<SvxHlinkDlgMarkWnd> mpMarkWnd;
void InitStdControls ();
void FillStandardDlgFields ( const SvxHyperlinkItem* pHyperlinkItem );
diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx
index 16821011e500..3bf97672b99b 100644
--- a/cui/source/inc/hyphen.hxx
+++ b/cui/source/inc/hyphen.hxx
@@ -42,14 +42,14 @@ protected:
class SvxHyphenWordDialog : public SfxModalDialog
{
- HyphenEdit* m_pWordEdit;
- PushButton* m_pLeftBtn;
- PushButton* m_pRightBtn;
- PushButton* m_pOkBtn;
- PushButton* m_pContBtn;
- PushButton* m_pDelBtn;
- PushButton* m_pHyphAll;
- CloseButton* m_pCloseBtn;
+ VclPtr<HyphenEdit> m_pWordEdit;
+ VclPtr<PushButton> m_pLeftBtn;
+ VclPtr<PushButton> m_pRightBtn;
+ VclPtr<PushButton> m_pOkBtn;
+ VclPtr<PushButton> m_pContBtn;
+ VclPtr<PushButton> m_pDelBtn;
+ VclPtr<PushButton> m_pHyphAll;
+ VclPtr<CloseButton> m_pCloseBtn;
OUString aLabel;
SvxSpellWrapper* pHyphWrapper;
css::uno::Reference< css::linguistic2::XHyphenator > xHyphenator;
@@ -85,6 +85,8 @@ public:
vcl::Window* pParent,
css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen,
SvxSpellWrapper* pWrapper );
+ virtual ~SvxHyphenWordDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetWindowTitle( LanguageType nLang );
void SelLeft();
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 21a8d5b1025a..62260e2e9dd2 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -49,7 +49,7 @@ struct IconChoicePageData
sal_uInt16 nId;
CreatePage fnCreatePage; ///< pointer to the factory
GetPageRanges fnGetRanges; ///< pointer to the ranges-function
- IconChoicePage* pPage; ///< the TabPage itself
+ VclPtr<IconChoicePage> pPage; ///< the TabPage itself
bool bOnDemand; ///< Flag: ItemSet onDemand
bool bRefresh; ///< Flag: page has to be newly initialized
@@ -73,7 +73,7 @@ private :
const SfxItemSet* pSet;
OUString aUserString;
bool bHasExchangeSupport;
- IconChoiceDialog* pDialog;
+ VclPtr<IconChoiceDialog> pDialog;
void SetDialog( IconChoiceDialog* pNew ) { pDialog = pNew; }
IconChoiceDialog* GetDialog() const { return pDialog; }
@@ -85,10 +85,12 @@ private :
protected :
IconChoicePage( vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet &rAttrSet );
- sal_uInt16 GetSlot( sal_uInt16 nWhich ) const { return pSet->GetPool()->GetSlotId( nWhich ); }
- sal_uInt16 GetWhich( sal_uInt16 nSlot ) const { return pSet->GetPool()->GetWhich( nSlot ); }
+ sal_uInt16 GetSlot( sal_uInt16 nWhich ) const { return pSet->GetPool()->GetSlotId( nWhich ); }
+ sal_uInt16 GetWhich( sal_uInt16 nSlot ) const { return pSet->GetPool()->GetWhich( nSlot ); }
public :
+ virtual ~IconChoicePage();
+ virtual void dispose() SAL_OVERRIDE;
const SfxItemSet& GetItemSet() const { return *pSet; }
@@ -124,18 +126,18 @@ private :
::std::vector< IconChoicePageData* > maPageList;
- SvtIconChoiceCtrl *m_pIconCtrl;
+ VclPtr<SvtIconChoiceCtrl> m_pIconCtrl;
sal_uInt16 mnCurrentPageId;
// Buttons
- OKButton *m_pOKBtn;
- PushButton *m_pApplyBtn;
- CancelButton *m_pCancelBtn;
- HelpButton *m_pHelpBtn;
- PushButton *m_pResetBtn;
+ VclPtr<OKButton> m_pOKBtn;
+ VclPtr<PushButton> m_pApplyBtn;
+ VclPtr<CancelButton> m_pCancelBtn;
+ VclPtr<HelpButton> m_pHelpBtn;
+ VclPtr<PushButton> m_pResetBtn;
- VclVBox *m_pTabContainer;
+ VclPtr<VclVBox> m_pTabContainer;
const SfxItemSet* pSet;
SfxItemSet* pOutSet;
SfxItemSet* pExampleSet;
@@ -166,7 +168,7 @@ protected :
SfxItemSet* CreateInputItemSet( sal_uInt16 nId );
inline SfxItemSet* GetInputSetImpl() { return const_cast<SfxItemSet*>(pSet); }
inline IconChoicePage* GetTabPage( sal_uInt16 nPageId )
- { return ( GetPageData (nPageId)->pPage?GetPageData (nPageId)->pPage:NULL); }
+ { return ( GetPageData (nPageId)->pPage?GetPageData (nPageId)->pPage.get():NULL); }
void RefreshInputSet();
void ActivatePageImpl ();
diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx
index 009174bbffcc..eda64bad3349 100644
--- a/cui/source/inc/insdlg.hxx
+++ b/cui/source/inc/insdlg.hxx
@@ -56,14 +56,14 @@ public:
class SvInsertOleDlg : public InsertObjectDialog_Impl
{
- RadioButton* m_pRbNewObject;
- RadioButton* m_pRbObjectFromfile;
- VclFrame* m_pObjectTypeFrame;
- ListBox* m_pLbObjecttype;
- VclFrame* m_pFileFrame;
- Edit* m_pEdFilepath;
- PushButton* m_pBtnFilepath;
- CheckBox* m_pCbFilelink;
+ VclPtr<RadioButton> m_pRbNewObject;
+ VclPtr<RadioButton> m_pRbObjectFromfile;
+ VclPtr<VclFrame> m_pObjectTypeFrame;
+ VclPtr<ListBox> m_pLbObjecttype;
+ VclPtr<VclFrame> m_pFileFrame;
+ VclPtr<Edit> m_pEdFilepath;
+ VclPtr<PushButton> m_pBtnFilepath;
+ VclPtr<CheckBox> m_pCbFilelink;
const SvObjectServerList* m_pServers;
::com::sun::star::uno::Sequence< sal_Int8 > m_aIconMetaFile;
@@ -86,6 +86,8 @@ public:
SvInsertOleDlg( vcl::Window* pParent,
const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage,
const SvObjectServerList* pServers = NULL );
+ virtual ~SvInsertOleDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
/// get replacement for the iconified embedded object and the mediatype of the replacement
@@ -95,9 +97,9 @@ public:
class SvInsertPlugInDialog : public InsertObjectDialog_Impl
{
private:
- Edit* m_pEdFileurl;
- PushButton* m_pBtnFileurl;
- VclMultiLineEdit* m_pEdPluginsOptions;
+ VclPtr<Edit> m_pEdFileurl;
+ VclPtr<PushButton> m_pBtnFileurl;
+ VclPtr<VclMultiLineEdit> m_pEdPluginsOptions;
INetURLObject* m_pURL;
OUString m_aCommands;
@@ -116,23 +118,23 @@ public:
class SfxInsertFloatingFrameDialog : public InsertObjectDialog_Impl
{
private:
- Edit* m_pEDName;
- Edit* m_pEDURL;
- PushButton* m_pBTOpen;
+ VclPtr<Edit> m_pEDName;
+ VclPtr<Edit> m_pEDURL;
+ VclPtr<PushButton> m_pBTOpen;
- RadioButton* m_pRBScrollingOn;
- RadioButton* m_pRBScrollingOff;
- RadioButton* m_pRBScrollingAuto;
+ VclPtr<RadioButton> m_pRBScrollingOn;
+ VclPtr<RadioButton> m_pRBScrollingOff;
+ VclPtr<RadioButton> m_pRBScrollingAuto;
- RadioButton* m_pRBFrameBorderOn;
- RadioButton* m_pRBFrameBorderOff;
+ VclPtr<RadioButton> m_pRBFrameBorderOn;
+ VclPtr<RadioButton> m_pRBFrameBorderOff;
- FixedText* m_pFTMarginWidth;
- NumericField* m_pNMMarginWidth;
- CheckBox* m_pCBMarginWidthDefault;
- FixedText* m_pFTMarginHeight;
- NumericField* m_pNMMarginHeight;
- CheckBox* m_pCBMarginHeightDefault;
+ VclPtr<FixedText> m_pFTMarginWidth;
+ VclPtr<NumericField> m_pNMMarginWidth;
+ VclPtr<CheckBox> m_pCBMarginWidthDefault;
+ VclPtr<FixedText> m_pFTMarginHeight;
+ VclPtr<NumericField> m_pNMMarginHeight;
+ VclPtr<CheckBox> m_pCBMarginHeightDefault;
DECL_STATIC_LINK(SfxInsertFloatingFrameDialog, OpenHdl, PushButton* );
DECL_STATIC_LINK(SfxInsertFloatingFrameDialog, CheckHdl, CheckBox* );
@@ -144,6 +146,8 @@ public:
const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage );
SfxInsertFloatingFrameDialog( vcl::Window* pParent,
const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObj );
+ virtual ~SfxInsertFloatingFrameDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
};
diff --git a/cui/source/inc/insrc.hxx b/cui/source/inc/insrc.hxx
index 012916b89423..f24467db07cd 100644
--- a/cui/source/inc/insrc.hxx
+++ b/cui/source/inc/insrc.hxx
@@ -31,10 +31,10 @@
class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog
{
- NumericField* m_pCountEdit;
+ VclPtr<NumericField> m_pCountEdit;
- RadioButton* m_pBeforeBtn;
- RadioButton* m_pAfterBtn;
+ VclPtr<RadioButton> m_pBeforeBtn;
+ VclPtr<RadioButton> m_pAfterBtn;
OUString aRow;
OUString aCol;
@@ -43,6 +43,8 @@ class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog
public:
SvxInsRowColDlg( vcl::Window* pParent, bool bCol, const OString& sHelpId );
+ virtual ~SvxInsRowColDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute(void) SAL_OVERRIDE;
diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx
index 446499f28887..7b20283f2ebc 100644
--- a/cui/source/inc/labdlg.hxx
+++ b/cui/source/inc/labdlg.hxx
@@ -34,16 +34,16 @@ class SvxCaptionTabPage : public SfxTabPage
{
private:
static const sal_uInt16 pCaptionRanges[];
- ValueSet* m_pCT_CAPTTYPE;
- MetricField* m_pMF_ABSTAND;
- ListBox* m_pLB_ANSATZ;
- FixedText* m_pFT_UM;
- MetricField* m_pMF_ANSATZ;
- FixedText* m_pFT_ANSATZ_REL;
- ListBox* m_pLB_ANSATZ_REL;
- FixedText* m_pFT_LAENGE;
- MetricField* m_pMF_LAENGE;
- CheckBox* m_pCB_LAENGE;
+ VclPtr<ValueSet> m_pCT_CAPTTYPE;
+ VclPtr<MetricField> m_pMF_ABSTAND;
+ VclPtr<ListBox> m_pLB_ANSATZ;
+ VclPtr<FixedText> m_pFT_UM;
+ VclPtr<MetricField> m_pMF_ANSATZ;
+ VclPtr<FixedText> m_pFT_ANSATZ_REL;
+ VclPtr<ListBox> m_pLB_ANSATZ_REL;
+ VclPtr<FixedText> m_pFT_LAENGE;
+ VclPtr<MetricField> m_pMF_LAENGE;
+ VclPtr<CheckBox> m_pCB_LAENGE;
Image m_aBmpCapTypes[CAPTYPE_BITMAPS_COUNT];
@@ -75,6 +75,8 @@ private:
public:
SvxCaptionTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~SvxCaptionTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pCaptionRanges; }
diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx
index 62afb0c54b80..7e953fcd747e 100644
--- a/cui/source/inc/linkdlg.hxx
+++ b/cui/source/inc/linkdlg.hxx
@@ -44,16 +44,16 @@ class SvBaseLinksDlg : public ModalDialog
{
using Window::SetType;
- SvTabListBox *m_pTbLinks;
- FixedText *m_pFtFullFileName;
- FixedText *m_pFtFullSourceName;
- FixedText *m_pFtFullTypeName;
- RadioButton *m_pRbAutomatic;
- RadioButton *m_pRbManual;
- PushButton *m_pPbUpdateNow;
- PushButton *m_pPbOpenSource;
- PushButton *m_pPbChangeSource;
- PushButton *m_pPbBreakLink;
+ VclPtr<SvTabListBox> m_pTbLinks;
+ VclPtr<FixedText> m_pFtFullFileName;
+ VclPtr<FixedText> m_pFtFullSourceName;
+ VclPtr<FixedText> m_pFtFullTypeName;
+ VclPtr<RadioButton> m_pRbAutomatic;
+ VclPtr<RadioButton> m_pRbManual;
+ VclPtr<PushButton> m_pPbUpdateNow;
+ VclPtr<PushButton> m_pPbOpenSource;
+ VclPtr<PushButton> m_pPbChangeSource;
+ VclPtr<PushButton> m_pPbBreakLink;
OUString aStrAutolink;
OUString aStrManuallink;
OUString aStrBrokenlink;
@@ -95,6 +95,8 @@ class SvBaseLinksDlg : public ModalDialog
public:
SvBaseLinksDlg( vcl::Window * pParent, sfx2::LinkManager*, bool bHtml = false );
+ virtual ~SvBaseLinksDlg();
+ virtual void dispose() SAL_OVERRIDE;
void SetActLink( sfx2::SvBaseLink * pLink );
};
diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx
index 7e7bc034cbbe..18b0fc6ce20d 100644
--- a/cui/source/inc/measure.hxx
+++ b/cui/source/inc/measure.hxx
@@ -33,23 +33,23 @@ class SvxMeasurePage : public SvxTabPage
private:
static const sal_uInt16 pRanges[];
- MetricField* m_pMtrFldLineDist;
- MetricField* m_pMtrFldHelplineOverhang;
- MetricField* m_pMtrFldHelplineDist;
- MetricField* m_pMtrFldHelpline1Len;
- MetricField* m_pMtrFldHelpline2Len;
- TriStateBox* m_pTsbBelowRefEdge;
- MetricField* m_pMtrFldDecimalPlaces;
-
- SvxRectCtl* m_pCtlPosition;
- TriStateBox* m_pTsbAutoPosV;
- TriStateBox* m_pTsbAutoPosH;
- TriStateBox* m_pTsbShowUnit;
- ListBox* m_pLbUnit;
- TriStateBox* m_pTsbParallel;
- FixedText* m_pFtAutomatic;
-
- SvxXMeasurePreview* m_pCtlPreview;
+ VclPtr<MetricField> m_pMtrFldLineDist;
+ VclPtr<MetricField> m_pMtrFldHelplineOverhang;
+ VclPtr<MetricField> m_pMtrFldHelplineDist;
+ VclPtr<MetricField> m_pMtrFldHelpline1Len;
+ VclPtr<MetricField> m_pMtrFldHelpline2Len;
+ VclPtr<TriStateBox> m_pTsbBelowRefEdge;
+ VclPtr<MetricField> m_pMtrFldDecimalPlaces;
+
+ VclPtr<SvxRectCtl> m_pCtlPosition;
+ VclPtr<TriStateBox> m_pTsbAutoPosV;
+ VclPtr<TriStateBox> m_pTsbAutoPosH;
+ VclPtr<TriStateBox> m_pTsbShowUnit;
+ VclPtr<ListBox> m_pLbUnit;
+ VclPtr<TriStateBox> m_pTsbParallel;
+ VclPtr<FixedText> m_pFtAutomatic;
+
+ VclPtr<SvxXMeasurePreview> m_pCtlPreview;
const SfxItemSet& rOutAttrs;
SfxItemSet aAttrSet;
@@ -66,6 +66,8 @@ private:
public:
SvxMeasurePage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
+ virtual ~SvxMeasurePage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pRanges; }
diff --git a/cui/source/inc/multipat.hxx b/cui/source/inc/multipat.hxx
index 685bbc32d96d..ecc1395f6cad 100644
--- a/cui/source/inc/multipat.hxx
+++ b/cui/source/inc/multipat.hxx
@@ -39,9 +39,9 @@
class SvxMultiPathDialog : public ModalDialog
{
private:
- svx::SvxRadioButtonListBox* m_pRadioLB;
- PushButton* m_pAddBtn;
- PushButton* m_pDelBtn;
+ VclPtr<svx::SvxRadioButtonListBox> m_pRadioLB;
+ VclPtr<PushButton> m_pAddBtn;
+ VclPtr<PushButton> m_pDelBtn;
DECL_LINK(AddHdl_Impl, void *);
DECL_LINK(DelHdl_Impl, void *);
@@ -60,9 +60,9 @@ public:
class SvxPathSelectDialog : public ModalDialog
{
private:
- ListBox* m_pPathLB;
- PushButton* m_pAddBtn;
- PushButton* m_pDelBtn;
+ VclPtr<ListBox> m_pPathLB;
+ VclPtr<PushButton> m_pAddBtn;
+ VclPtr<PushButton> m_pDelBtn;
DECL_LINK(AddHdl_Impl, void *);
DECL_LINK(DelHdl_Impl, void *);
diff --git a/cui/source/inc/newtabledlg.hxx b/cui/source/inc/newtabledlg.hxx
index 778457aec69e..f6be298f88d2 100644
--- a/cui/source/inc/newtabledlg.hxx
+++ b/cui/source/inc/newtabledlg.hxx
@@ -29,11 +29,13 @@
class SvxNewTableDialog : public SvxAbstractNewTableDialog, public ModalDialog
{
private:
- NumericField* mpNumColumns;
- NumericField* mpNumRows;
+ VclPtr<NumericField> mpNumColumns;
+ VclPtr<NumericField> mpNumRows;
public:
SvxNewTableDialog( vcl::Window* pWindow );
+ virtual ~SvxNewTableDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute(void) SAL_OVERRIDE;
diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index 7a633e325872..552f59249a3e 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -92,31 +92,31 @@ public:
private:
SvxNumberFormatTabPage( vcl::Window* pParent,
const SfxItemSet& rCoreAttrs );
- FixedText* m_pFtCategory;
- ListBox* m_pLbCategory;
- FixedText* m_pFtFormat;
- ListBox* m_pLbCurrency;
- SvxFontListBox* m_pLbFormat;
- FixedText* m_pFtLanguage;
- SvxLanguageBox* m_pLbLanguage;
- CheckBox* m_pCbSourceFormat;
- SvxNumberPreview* m_pWndPreview;
- FixedText* m_pFtOptions;
- FixedText* m_pFtDecimals;
- NumericField* m_pEdDecimals;
- CheckBox* m_pBtnNegRed;
- FixedText* m_pFtLeadZeroes;
- NumericField* m_pEdLeadZeroes;
- CheckBox* m_pBtnThousand;
-
- VclContainer* m_pFormatCodeFrame;
- Edit* m_pEdFormat;
- PushButton* m_pIbAdd;
- PushButton* m_pIbInfo;
- PushButton* m_pIbRemove;
-
- FixedText* m_pFtComment;
- Edit* m_pEdComment;
+ VclPtr<FixedText> m_pFtCategory;
+ VclPtr<ListBox> m_pLbCategory;
+ VclPtr<FixedText> m_pFtFormat;
+ VclPtr<ListBox> m_pLbCurrency;
+ VclPtr<SvxFontListBox> m_pLbFormat;
+ VclPtr<FixedText> m_pFtLanguage;
+ VclPtr<SvxLanguageBox> m_pLbLanguage;
+ VclPtr<CheckBox> m_pCbSourceFormat;
+ VclPtr<SvxNumberPreview> m_pWndPreview;
+ VclPtr<FixedText> m_pFtOptions;
+ VclPtr<FixedText> m_pFtDecimals;
+ VclPtr<NumericField> m_pEdDecimals;
+ VclPtr<CheckBox> m_pBtnNegRed;
+ VclPtr<FixedText> m_pFtLeadZeroes;
+ VclPtr<NumericField> m_pEdLeadZeroes;
+ VclPtr<CheckBox> m_pBtnThousand;
+
+ VclPtr<VclContainer> m_pFormatCodeFrame;
+ VclPtr<Edit> m_pEdFormat;
+ VclPtr<PushButton> m_pIbAdd;
+ VclPtr<PushButton> m_pIbInfo;
+ VclPtr<PushButton> m_pIbRemove;
+
+ VclPtr<FixedText> m_pFtComment;
+ VclPtr<Edit> m_pEdComment;
Timer aResetWinTimer;
@@ -131,7 +131,7 @@ private:
OUString sAutomaticEntry;
- vcl::Window* pLastActivWindow;
+ VclPtr<vcl::Window> pLastActivWindow;
void Init_Impl();
void FillCurrencyBox();
@@ -146,11 +146,11 @@ private:
void ChangePreviewText( sal_uInt16 nPos );
void AddAutomaticLanguage_Impl(LanguageType eAutoLang, bool bSelect);
// Handler
- DECL_LINK( LostFocusHdl_Impl, Edit* pEd );
- DECL_LINK( DoubleClickHdl_Impl, SvxFontListBox* pLb );
+ DECL_LINK( LostFocusHdl_Impl, Edit* );
+ DECL_LINK( DoubleClickHdl_Impl, SvxFontListBox* );
DECL_LINK( SelFormatHdl_Impl, void * );
- DECL_LINK( ClickHdl_Impl, PushButton* pIB );
- DECL_LINK( EditHdl_Impl, Edit* pEdFormat );
+ DECL_LINK( ClickHdl_Impl, PushButton* );
+ DECL_LINK( EditHdl_Impl, Edit* );
DECL_LINK( OptHdl_Impl, void * );
DECL_LINK(TimeHdl_Impl, void *);
};
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 9f9cca7bd9df..f2cb95c9c112 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -90,7 +90,7 @@ class SvxSingleNumPickTabPage : public SfxTabPage
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
- SvxNumValueSet* m_pExamplesVS;
+ VclPtr<SvxNumValueSet> m_pExamplesVS;
SvxNumSettingsArr_Impl aNumSettingsArr;
SvxNumRule* pActNum;
SvxNumRule* pSaveNum;
@@ -130,7 +130,7 @@ class SvxBulletPickTabPage : public SfxTabPage
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
- SvxNumValueSet* m_pExamplesVS;
+ VclPtr<SvxNumValueSet> m_pExamplesVS;
SvxNumRule* pActNum;
SvxNumRule* pSaveNum;
sal_uInt16 nActNumLvl;
@@ -168,7 +168,7 @@ class SvxNumPickTabPage : public SfxTabPage
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
- SvxNumValueSet* m_pExamplesVS;
+ VclPtr<SvxNumValueSet> m_pExamplesVS;
OUString sNumCharFmtName;
OUString sBulletCharFmtName;
@@ -213,8 +213,8 @@ class SvxBitmapPickTabPage : public SfxTabPage
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
- FixedText* m_pErrorText;
- SvxBmpNumValueSet* m_pExamplesVS;
+ VclPtr<FixedText> m_pErrorText;
+ VclPtr<SvxBmpNumValueSet> m_pExamplesVS;
std::vector<OUString> aGrfNames;
OUString sNumCharFmtName;
@@ -255,44 +255,44 @@ class SvxNumOptionsTabPage : public SfxTabPage
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
- ListBox* m_pLevelLB;
-
- ListBox* m_pFmtLB;
-
- FixedText* m_pSeparatorFT;
- FixedText* m_pPrefixFT;
- Edit* m_pPrefixED;
- FixedText* m_pSuffixFT;
- Edit* m_pSuffixED;
- FixedText* m_pCharFmtFT;
- ListBox* m_pCharFmtLB;
- FixedText* m_pBulColorFT;
- ColorListBox* m_pBulColLB;
- FixedText* m_pBulRelSizeFT;
- MetricField* m_pBulRelSizeMF;
- FixedText* m_pAllLevelFT;
- NumericField* m_pAllLevelNF;
- FixedText* m_pStartFT;
- NumericField* m_pStartED;
- FixedText* m_pBulletFT;
- PushButton* m_pBulletPB;
- FixedText* m_pAlignFT;
- ListBox* m_pAlignLB;
- FixedText* m_pBitmapFT;
- MenuButton* m_pBitmapMB;
+ VclPtr<ListBox> m_pLevelLB;
+
+ VclPtr<ListBox> m_pFmtLB;
+
+ VclPtr<FixedText> m_pSeparatorFT;
+ VclPtr<FixedText> m_pPrefixFT;
+ VclPtr<Edit> m_pPrefixED;
+ VclPtr<FixedText> m_pSuffixFT;
+ VclPtr<Edit> m_pSuffixED;
+ VclPtr<FixedText> m_pCharFmtFT;
+ VclPtr<ListBox> m_pCharFmtLB;
+ VclPtr<FixedText> m_pBulColorFT;
+ VclPtr<ColorListBox> m_pBulColLB;
+ VclPtr<FixedText> m_pBulRelSizeFT;
+ VclPtr<MetricField> m_pBulRelSizeMF;
+ VclPtr<FixedText> m_pAllLevelFT;
+ VclPtr<NumericField> m_pAllLevelNF;
+ VclPtr<FixedText> m_pStartFT;
+ VclPtr<NumericField> m_pStartED;
+ VclPtr<FixedText> m_pBulletFT;
+ VclPtr<PushButton> m_pBulletPB;
+ VclPtr<FixedText> m_pAlignFT;
+ VclPtr<ListBox> m_pAlignLB;
+ VclPtr<FixedText> m_pBitmapFT;
+ VclPtr<MenuButton> m_pBitmapMB;
sal_uInt16 m_nGalleryId;
- FixedText* m_pWidthFT;
- MetricField* m_pWidthMF;
- FixedText* m_pHeightFT;
- MetricField* m_pHeightMF;
- CheckBox* m_pRatioCB;
- FixedText* m_pOrientFT;
- ListBox* m_pOrientLB;
+ VclPtr<FixedText> m_pWidthFT;
+ VclPtr<MetricField> m_pWidthMF;
+ VclPtr<FixedText> m_pHeightFT;
+ VclPtr<MetricField> m_pHeightMF;
+ VclPtr<CheckBox> m_pRatioCB;
+ VclPtr<FixedText> m_pOrientFT;
+ VclPtr<ListBox> m_pOrientLB;
- VclContainer* m_pAllLevelsFrame;
- CheckBox* m_pSameLevelCB;
+ VclPtr<VclContainer> m_pAllLevelsFrame;
+ VclPtr<CheckBox> m_pSameLevelCB;
- SvxNumberingPreview* m_pPreviewWIN;
+ VclPtr<SvxNumberingPreview> m_pPreviewWIN;
OUString m_sNumCharFmtName;
OUString m_sBulletCharFmtName;
@@ -390,36 +390,36 @@ class SvxNumPositionTabPage : public SfxTabPage
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
- ListBox* m_pLevelLB;
+ VclPtr<ListBox> m_pLevelLB;
// former set of controls shown for numbering rules containing list level
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
- FixedText* m_pDistBorderFT;
- MetricField* m_pDistBorderMF;
- CheckBox* m_pRelativeCB;
- FixedText* m_pIndentFT;
- MetricField* m_pIndentMF;
- FixedText* m_pDistNumFT;
- MetricField* m_pDistNumMF;
- FixedText* m_pAlignFT;
- ListBox* m_pAlignLB;
+ VclPtr<FixedText> m_pDistBorderFT;
+ VclPtr<MetricField> m_pDistBorderMF;
+ VclPtr<CheckBox> m_pRelativeCB;
+ VclPtr<FixedText> m_pIndentFT;
+ VclPtr<MetricField> m_pIndentMF;
+ VclPtr<FixedText> m_pDistNumFT;
+ VclPtr<MetricField> m_pDistNumMF;
+ VclPtr<FixedText> m_pAlignFT;
+ VclPtr<ListBox> m_pAlignLB;
// new set of controls shown for numbering rules containing list level
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
- FixedText* m_pLabelFollowedByFT;
- ListBox* m_pLabelFollowedByLB;
- FixedText* m_pListtabFT;
- MetricField* m_pListtabMF;
- FixedText* m_pAlign2FT;
- ListBox* m_pAlign2LB;
- FixedText* m_pAlignedAtFT;
- MetricField* m_pAlignedAtMF;
- FixedText* m_pIndentAtFT;
- MetricField* m_pIndentAtMF;
-
- PushButton* m_pStandardPB;
-
- SvxNumberingPreview* m_pPreviewWIN;
+ VclPtr<FixedText> m_pLabelFollowedByFT;
+ VclPtr<ListBox> m_pLabelFollowedByLB;
+ VclPtr<FixedText> m_pListtabFT;
+ VclPtr<MetricField> m_pListtabMF;
+ VclPtr<FixedText> m_pAlign2FT;
+ VclPtr<ListBox> m_pAlign2LB;
+ VclPtr<FixedText> m_pAlignedAtFT;
+ VclPtr<MetricField> m_pAlignedAtMF;
+ VclPtr<FixedText> m_pIndentAtFT;
+ VclPtr<MetricField> m_pIndentAtMF;
+
+ VclPtr<PushButton> m_pStandardPB;
+
+ VclPtr<SvxNumberingPreview> m_pPreviewWIN;
SvxNumRule* pActNum;
SvxNumRule* pSaveNum;
diff --git a/cui/source/inc/optasian.hxx b/cui/source/inc/optasian.hxx
index 5dc19787d471..5be6d8034a51 100644
--- a/cui/source/inc/optasian.hxx
+++ b/cui/source/inc/optasian.hxx
@@ -29,22 +29,22 @@
struct SvxAsianLayoutPage_Impl;
class SvxAsianLayoutPage : public SfxTabPage
{
- RadioButton* m_pCharKerningRB;
- RadioButton* m_pCharPunctKerningRB;
+ VclPtr<RadioButton> m_pCharKerningRB;
+ VclPtr<RadioButton> m_pCharPunctKerningRB;
- RadioButton* m_pNoCompressionRB;
- RadioButton* m_pPunctCompressionRB;
- RadioButton* m_pPunctKanaCompressionRB;
+ VclPtr<RadioButton> m_pNoCompressionRB;
+ VclPtr<RadioButton> m_pPunctCompressionRB;
+ VclPtr<RadioButton> m_pPunctKanaCompressionRB;
- FixedText* m_pLanguageFT;
- SvxLanguageBox* m_pLanguageLB;
- CheckBox* m_pStandardCB;
+ VclPtr<FixedText> m_pLanguageFT;
+ VclPtr<SvxLanguageBox> m_pLanguageLB;
+ VclPtr<CheckBox> m_pStandardCB;
- FixedText* m_pStartFT;
- Edit* m_pStartED;
- FixedText* m_pEndFT;
- Edit* m_pEndED;
- FixedText* m_pHintFT;
+ VclPtr<FixedText> m_pStartFT;
+ VclPtr<Edit> m_pStartED;
+ VclPtr<FixedText> m_pEndFT;
+ VclPtr<Edit> m_pEndED;
+ VclPtr<FixedText> m_pHintFT;
SvxAsianLayoutPage_Impl* pImpl;
diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx
index 9ed48ed6f1f8..3bdffc3f0edd 100644
--- a/cui/source/inc/optdict.hxx
+++ b/cui/source/inc/optdict.hxx
@@ -50,10 +50,10 @@ namespace linguistic2{
class SvxNewDictionaryDialog : public ModalDialog
{
private:
- Edit* pNameEdit;
- SvxLanguageBox* pLanguageLB;
- CheckBox* pExceptBtn;
- OKButton* pOKBtn;
+ VclPtr<Edit> pNameEdit;
+ VclPtr<SvxLanguageBox> pLanguageLB;
+ VclPtr<CheckBox> pExceptBtn;
+ VclPtr<OKButton> pOKBtn;
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellChecker1 > xSpell;
::com::sun::star::uno::Reference<
@@ -66,6 +66,8 @@ public:
SvxNewDictionaryDialog( vcl::Window* pParent,
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellChecker1 > &xSpl );
+ virtual ~SvxNewDictionaryDialog();
+ virtual void dispose() SAL_OVERRIDE;
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XDictionary >
@@ -100,16 +102,16 @@ class SvxEditDictionaryDialog : public ModalDialog
{
private:
- ListBox* pAllDictsLB;
- FixedText* pLangFT;
- SvxLanguageBox* pLangLB;
+ VclPtr<ListBox> pAllDictsLB;
+ VclPtr<FixedText> pLangFT;
+ VclPtr<SvxLanguageBox> pLangLB;
- SvxDictEdit* pWordED;
- FixedText* pReplaceFT;
- SvxDictEdit* pReplaceED;
- SvTabListBox* pWordsLB;
- PushButton* pNewReplacePB;
- PushButton* pDeletePB;
+ VclPtr<SvxDictEdit> pWordED;
+ VclPtr<FixedText> pReplaceFT;
+ VclPtr<SvxDictEdit> pReplaceED;
+ VclPtr<SvTabListBox> pWordsLB;
+ VclPtr<PushButton> pNewReplacePB;
+ VclPtr<PushButton> pDeletePB;
OUString sModify;
OUString sNew;
@@ -152,6 +154,8 @@ public:
const OUString& rName,
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellChecker1> &xSpl );
+ virtual ~SvxEditDictionaryDialog();
+ virtual void dispose() SAL_OVERRIDE;
sal_uInt16 GetSelectedDict() {return pAllDictsLB->GetSelectEntryPos();}
};
diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index cb49363bafe6..0dea8bc01149 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -52,15 +52,15 @@ class SvxLinguData_Impl;
class SvxEditModulesDlg : public ModalDialog
{
- SvxLanguageBox* m_pLanguageLB;
+ VclPtr<SvxLanguageBox> m_pLanguageLB;
- SvxCheckListBox* m_pModulesCLB;
- PushButton* m_pPrioUpPB;
- PushButton* m_pPrioDownPB;
- PushButton* m_pBackPB;
- FixedHyperlink* m_pMoreDictsLink;
+ VclPtr<SvxCheckListBox> m_pModulesCLB;
+ VclPtr<PushButton> m_pPrioUpPB;
+ VclPtr<PushButton> m_pPrioDownPB;
+ VclPtr<PushButton> m_pBackPB;
+ VclPtr<FixedHyperlink> m_pMoreDictsLink;
- CloseButton* m_pClosePB;
+ VclPtr<CloseButton> m_pClosePB;
OUString sSpell;
OUString sHyph;
@@ -94,17 +94,17 @@ public:
class SvxLinguTabPage : public SfxTabPage
{
private:
- FixedText* m_pLinguModulesFT;
- SvxCheckListBox* m_pLinguModulesCLB;
- PushButton* m_pLinguModulesEditPB;
- FixedText* m_pLinguDicsFT;
- SvxCheckListBox* m_pLinguDicsCLB;
- PushButton* m_pLinguDicsNewPB;
- PushButton* m_pLinguDicsEditPB;
- PushButton* m_pLinguDicsDelPB;
- SvxCheckListBox* m_pLinguOptionsCLB;
- PushButton* m_pLinguOptionsEditPB;
- FixedHyperlink* m_pMoreDictsLink;
+ VclPtr<FixedText> m_pLinguModulesFT;
+ VclPtr<SvxCheckListBox> m_pLinguModulesCLB;
+ VclPtr<PushButton> m_pLinguModulesEditPB;
+ VclPtr<FixedText> m_pLinguDicsFT;
+ VclPtr<SvxCheckListBox> m_pLinguDicsCLB;
+ VclPtr<PushButton> m_pLinguDicsNewPB;
+ VclPtr<PushButton> m_pLinguDicsEditPB;
+ VclPtr<PushButton> m_pLinguDicsDelPB;
+ VclPtr<SvxCheckListBox> m_pLinguOptionsCLB;
+ VclPtr<PushButton> m_pLinguOptionsEditPB;
+ VclPtr<FixedHyperlink> m_pMoreDictsLink;
OUString sCapitalWords;
OUString sWordsWithDigits;
diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx
index 89cf4857371a..3e0ff7e7dc71 100644
--- a/cui/source/inc/optpath.hxx
+++ b/cui/source/inc/optpath.hxx
@@ -42,11 +42,11 @@ class SvxPathTabPage;
class SvxPathTabPage : public SfxTabPage
{
private:
- SvSimpleTableContainer* m_pPathCtrl;
- PushButton* m_pStandardBtn;
- PushButton* m_pPathBtn;
+ VclPtr<SvSimpleTableContainer> m_pPathCtrl;
+ VclPtr<PushButton> m_pStandardBtn;
+ VclPtr<PushButton> m_pPathBtn;
- ::svx::OptHeaderTabListBox* pPathBox;
+ VclPtr<::svx::OptHeaderTabListBox> pPathBox;
OptPath_Impl* pImpl;
::com::sun::star::uno::Reference< ::svt::DialogClosedListener > xDialogListener;
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index fae515c87d41..f34239c850f2 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -75,53 +75,53 @@ class SvxPageDescPage : public SfxTabPage
static const sal_uInt16 pRanges[];
private:
// paper format
- ListBox* m_pPaperSizeBox;
+ VclPtr<ListBox> m_pPaperSizeBox;
- MetricField* m_pPaperWidthEdit;
- MetricField* m_pPaperHeightEdit;
+ VclPtr<MetricField> m_pPaperWidthEdit;
+ VclPtr<MetricField> m_pPaperHeightEdit;
- FixedText* m_pOrientationFT;
- RadioButton* m_pPortraitBtn;
- RadioButton* m_pLandscapeBtn;
+ VclPtr<FixedText> m_pOrientationFT;
+ VclPtr<RadioButton> m_pPortraitBtn;
+ VclPtr<RadioButton> m_pLandscapeBtn;
- SvxPageWindow* m_pBspWin;
+ VclPtr<SvxPageWindow> m_pBspWin;
- FixedText* m_pTextFlowLbl;
- svx::FrameDirectionListBox* m_pTextFlowBox;
+ VclPtr<FixedText> m_pTextFlowLbl;
+ VclPtr<svx::FrameDirectionListBox> m_pTextFlowBox;
- ListBox* m_pPaperTrayBox;
+ VclPtr<ListBox> m_pPaperTrayBox;
// Margins
- FixedText* m_pLeftMarginLbl;
- MetricField* m_pLeftMarginEdit;
- FixedText* m_pRightMarginLbl;
- MetricField* m_pRightMarginEdit;
- MetricField* m_pTopMarginEdit;
- MetricField* m_pBottomMarginEdit;
+ VclPtr<FixedText> m_pLeftMarginLbl;
+ VclPtr<MetricField> m_pLeftMarginEdit;
+ VclPtr<FixedText> m_pRightMarginLbl;
+ VclPtr<MetricField> m_pRightMarginEdit;
+ VclPtr<MetricField> m_pTopMarginEdit;
+ VclPtr<MetricField> m_pBottomMarginEdit;
// layout settings
- FixedText* m_pPageText;
- ListBox* m_pLayoutBox;
- ListBox* m_pNumberFormatBox;
+ VclPtr<FixedText> m_pPageText;
+ VclPtr<ListBox> m_pLayoutBox;
+ VclPtr<ListBox> m_pNumberFormatBox;
//Extras Calc
- FixedText* m_pTblAlignFT;
- CheckBox* m_pHorzBox;
- CheckBox* m_pVertBox;
+ VclPtr<FixedText> m_pTblAlignFT;
+ VclPtr<CheckBox> m_pHorzBox;
+ VclPtr<CheckBox> m_pVertBox;
// Impress and Draw
- CheckBox* m_pAdaptBox;
+ VclPtr<CheckBox> m_pAdaptBox;
//Register Writer
- CheckBox* m_pRegisterCB;
- FixedText* m_pRegisterFT;
- ListBox* m_pRegisterLB;
+ VclPtr<CheckBox> m_pRegisterCB;
+ VclPtr<FixedText> m_pRegisterFT;
+ VclPtr<ListBox> m_pRegisterLB;
OUString sStandardRegister;
- FixedText* m_pInsideLbl;
- FixedText* m_pOutsideLbl;
- FixedText* m_pPrintRangeQueryText;
+ VclPtr<FixedText> m_pInsideLbl;
+ VclPtr<FixedText> m_pOutsideLbl;
+ VclPtr<FixedText> m_pPrintRangeQueryText;
long nFirstLeftMargin;
long nFirstRightMargin;
diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 26a9bc78d9cf..401158ead1da 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -52,32 +52,32 @@ private:
SvxStdParagraphTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
// indention
- SvxRelativeField* m_pLeftIndent;
+ VclPtr<SvxRelativeField> m_pLeftIndent;
- FixedText* m_pRightLabel;
- SvxRelativeField* m_pRightIndent;
+ VclPtr<FixedText> m_pRightLabel;
+ VclPtr<SvxRelativeField> m_pRightIndent;
- FixedText* m_pFLineLabel;
- SvxRelativeField* m_pFLineIndent;
- CheckBox* m_pAutoCB;
+ VclPtr<FixedText> m_pFLineLabel;
+ VclPtr<SvxRelativeField> m_pFLineIndent;
+ VclPtr<CheckBox> m_pAutoCB;
// distance
- SvxRelativeField* m_pTopDist;
- SvxRelativeField* m_pBottomDist;
- CheckBox* m_pContextualCB;
+ VclPtr<SvxRelativeField> m_pTopDist;
+ VclPtr<SvxRelativeField> m_pBottomDist;
+ VclPtr<CheckBox> m_pContextualCB;
// line spacing
- ListBox* m_pLineDist;
- FixedText* m_pLineDistAtLabel;
- MetricField* m_pLineDistAtPercentBox;
- MetricField* m_pLineDistAtMetricBox;
- FixedText* m_pAbsDist;
+ VclPtr<ListBox> m_pLineDist;
+ VclPtr<FixedText> m_pLineDistAtLabel;
+ VclPtr<MetricField> m_pLineDistAtPercentBox;
+ VclPtr<MetricField> m_pLineDistAtMetricBox;
+ VclPtr<FixedText> m_pAbsDist;
OUString sAbsDist;
- SvxParaPrevWindow* m_pExampleWin;
+ VclPtr<SvxParaPrevWindow> m_pExampleWin;
// only writer
- VclFrame* m_pRegisterFL;
- CheckBox* m_pRegisterCB;
+ VclPtr<VclFrame> m_pRegisterFL;
+ VclPtr<CheckBox> m_pRegisterCB;
long nAbst;
long nWidth;
@@ -98,6 +98,9 @@ protected:
public:
+ virtual ~SvxStdParagraphTabPage();
+ virtual void dispose() SAL_OVERRIDE;
+
DECL_LINK(ELRLoseFocusHdl, void *);
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
@@ -125,27 +128,27 @@ class SvxParaAlignTabPage : public SfxTabPage
static const sal_uInt16 pAlignRanges[];
// alignment
- RadioButton* m_pLeft;
- RadioButton* m_pRight;
- RadioButton* m_pCenter;
- RadioButton* m_pJustify;
- FixedText* m_pLeftBottom;
- FixedText* m_pRightTop;
+ VclPtr<RadioButton> m_pLeft;
+ VclPtr<RadioButton> m_pRight;
+ VclPtr<RadioButton> m_pCenter;
+ VclPtr<RadioButton> m_pJustify;
+ VclPtr<FixedText> m_pLeftBottom;
+ VclPtr<FixedText> m_pRightTop;
- FixedText* m_pLastLineFT;
- ListBox* m_pLastLineLB;
- CheckBox* m_pExpandCB;
+ VclPtr<FixedText> m_pLastLineFT;
+ VclPtr<ListBox> m_pLastLineLB;
+ VclPtr<CheckBox> m_pExpandCB;
- CheckBox* m_pSnapToGridCB;
+ VclPtr<CheckBox> m_pSnapToGridCB;
//preview
- SvxParaPrevWindow* m_pExampleWin;
+ VclPtr<SvxParaPrevWindow> m_pExampleWin;
//vertical alignment
- VclFrame* m_pVertAlignFL;
- ListBox* m_pVertAlignLB;
+ VclPtr<VclFrame> m_pVertAlignFL;
+ VclPtr<ListBox> m_pVertAlignLB;
- VclFrame* m_pPropertiesFL;
- svx::FrameDirectionListBox* m_pTextDirectionLB;
+ VclPtr<VclFrame> m_pPropertiesFL;
+ VclPtr<svx::FrameDirectionListBox> m_pTextDirectionLB;
DECL_LINK(AlignHdl_Impl, void *);
DECL_LINK(LastLineHdl_Impl, void *);
@@ -159,6 +162,9 @@ protected:
virtual int DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
public:
+ virtual ~SvxParaAlignTabPage();
+ virtual void dispose() SAL_OVERRIDE;
+
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
static const sal_uInt16* GetRanges() { return pAlignRanges; }
@@ -189,6 +195,9 @@ class SvxExtParagraphTabPage: public SfxTabPage
static const sal_uInt16 pExtRanges[];
public:
+ virtual ~SvxExtParagraphTabPage();
+ virtual void dispose() SAL_OVERRIDE;
+
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rSet );
static const sal_uInt16* GetRanges() { return pExtRanges; }
@@ -205,37 +214,37 @@ private:
SvxExtParagraphTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
// hyphenation
- TriStateBox* m_pHyphenBox;
- FixedText* m_pBeforeText;
- NumericField* m_pExtHyphenBeforeBox;
- FixedText* m_pAfterText;
- NumericField* m_pExtHyphenAfterBox;
- FixedText* m_pMaxHyphenLabel;
- NumericField* m_pMaxHyphenEdit;
+ VclPtr<TriStateBox> m_pHyphenBox;
+ VclPtr<FixedText> m_pBeforeText;
+ VclPtr<NumericField> m_pExtHyphenBeforeBox;
+ VclPtr<FixedText> m_pAfterText;
+ VclPtr<NumericField> m_pExtHyphenAfterBox;
+ VclPtr<FixedText> m_pMaxHyphenLabel;
+ VclPtr<NumericField> m_pMaxHyphenEdit;
// pagebreak
- TriStateBox* m_pPageBreakBox;
- FixedText* m_pBreakTypeFT;
- ListBox* m_pBreakTypeLB;
- FixedText* m_pBreakPositionFT;
- ListBox* m_pBreakPositionLB;
- TriStateBox* m_pApplyCollBtn;
- ListBox* m_pApplyCollBox;
- FixedText* m_pPagenumText;
- NumericField* m_pPagenumEdit;
+ VclPtr<TriStateBox> m_pPageBreakBox;
+ VclPtr<FixedText> m_pBreakTypeFT;
+ VclPtr<ListBox> m_pBreakTypeLB;
+ VclPtr<FixedText> m_pBreakPositionFT;
+ VclPtr<ListBox> m_pBreakPositionLB;
+ VclPtr<TriStateBox> m_pApplyCollBtn;
+ VclPtr<ListBox> m_pApplyCollBox;
+ VclPtr<FixedText> m_pPagenumText;
+ VclPtr<NumericField> m_pPagenumEdit;
// paragraph division
- TriStateBox* m_pKeepTogetherBox;
- TriStateBox* m_pKeepParaBox;
+ VclPtr<TriStateBox> m_pKeepTogetherBox;
+ VclPtr<TriStateBox> m_pKeepParaBox;
// orphan/widow
- TriStateBox* m_pOrphanBox;
- NumericField* m_pOrphanRowNo;
- FixedText* m_pOrphanRowLabel;
+ VclPtr<TriStateBox> m_pOrphanBox;
+ VclPtr<NumericField> m_pOrphanRowNo;
+ VclPtr<FixedText> m_pOrphanRowLabel;
- TriStateBox* m_pWidowBox;
- NumericField* m_pWidowRowNo;
- FixedText* m_pWidowRowLabel;
+ VclPtr<TriStateBox> m_pWidowBox;
+ VclPtr<NumericField> m_pWidowRowNo;
+ VclPtr<FixedText> m_pWidowRowLabel;
bool bPageBreak;
bool bHtmlMode;
@@ -257,15 +266,18 @@ private:
class SvxAsianTabPage : public SfxTabPage
{
- CheckBox* m_pForbiddenRulesCB;
- CheckBox* m_pHangingPunctCB;
- CheckBox* m_pScriptSpaceCB;
+ VclPtr<CheckBox> m_pForbiddenRulesCB;
+ VclPtr<CheckBox> m_pHangingPunctCB;
+ VclPtr<CheckBox> m_pScriptSpaceCB;
SvxAsianTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
DECL_LINK( ClickHdl_Impl, CheckBox* );
public:
+ virtual ~SvxAsianTabPage();
+ virtual void dispose() SAL_OVERRIDE;
+
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rSet );
static const sal_uInt16* GetRanges();
diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx
index a4ac2415f9f5..ef4779dddd72 100644
--- a/cui/source/inc/pastedlg.hxx
+++ b/cui/source/inc/pastedlg.hxx
@@ -39,10 +39,10 @@ class TransferableDataHelper;
class SvPasteObjectDialog : public ModalDialog
{
- FixedText* m_pFtObjectSource;
- ListBox* m_pLbInsertList;
- OKButton* m_pOKButton;
- ::std::map< SotClipboardFormatId, OUString > aSupplementMap;
+ VclPtr<FixedText> m_pFtObjectSource;
+ VclPtr<ListBox> m_pLbInsertList;
+ VclPtr<OKButton> m_pOKButton;
+ ::std::map< SotFormatStringId, OUString > aSupplementMap;
SvGlobalName aObjClassName;
OUString aObjName;
@@ -55,6 +55,8 @@ class SvPasteObjectDialog : public ModalDialog
public:
SvPasteObjectDialog( vcl::Window* pParent );
+ virtual ~SvPasteObjectDialog();
+ virtual void dispose() SAL_OVERRIDE;
void Insert( SotClipboardFormatId nFormat, const OUString & rFormatName );
void SetObjName( const SvGlobalName & rClass, const OUString & rObjName );
diff --git a/cui/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx
index fa3124359e7c..170e00692379 100644
--- a/cui/source/inc/postdlg.hxx
+++ b/cui/source/inc/postdlg.hxx
@@ -88,17 +88,17 @@ public:
}
private:
- FixedText* m_pLastEditFT;
+ VclPtr<FixedText> m_pLastEditFT;
- VclMultiLineEdit* m_pEditED;
+ VclPtr<VclMultiLineEdit> m_pEditED;
- VclContainer* m_pInsertAuthor;
- PushButton* m_pAuthorBtn;
+ VclPtr<VclContainer> m_pInsertAuthor;
+ VclPtr<PushButton> m_pAuthorBtn;
- OKButton* m_pOKBtn;
+ VclPtr<OKButton> m_pOKBtn;
- PushButton* m_pPrevBtn;
- PushButton* m_pNextBtn;
+ VclPtr<PushButton> m_pPrevBtn;
+ VclPtr<PushButton> m_pNextBtn;
const SfxItemSet& rSet;
SfxItemSet* pOutSet;
diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx
index 0936ff2faabe..d3847dc6de62 100644
--- a/cui/source/inc/scriptdlg.hxx
+++ b/cui/source/inc/scriptdlg.hxx
@@ -95,9 +95,11 @@ public:
class CuiInputDialog : public ModalDialog
{
private:
- Edit* m_pEdit;
+ VclPtr<Edit> m_pEdit;
public:
CuiInputDialog(vcl::Window * pParent, sal_uInt16 nMode);
+ virtual ~CuiInputDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetObjectName() const { return m_pEdit->GetText(); }
void SetObjectName(const OUString& rName)
@@ -132,14 +134,14 @@ public:
class SvxScriptOrgDialog : public SfxModalDialog
{
protected:
- SFTreeListBox* m_pScriptsBox;
-
- PushButton* m_pRunButton;
- CloseButton* m_pCloseButton;
- PushButton* m_pCreateButton;
- PushButton* m_pEditButton;
- PushButton* m_pRenameButton;
- PushButton* m_pDelButton;
+ VclPtr<SFTreeListBox> m_pScriptsBox;
+
+ VclPtr<PushButton> m_pRunButton;
+ VclPtr<CloseButton> m_pCloseButton;
+ VclPtr<PushButton> m_pCreateButton;
+ VclPtr<PushButton> m_pEditButton;
+ VclPtr<PushButton> m_pRenameButton;
+ VclPtr<PushButton> m_pDelButton;
OUString m_sLanguage;
static Selection_hash m_lastSelection;
diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx
index de029f891868..c1ac1e3f6b62 100644
--- a/cui/source/inc/selector.hxx
+++ b/cui/source/inc/selector.hxx
@@ -123,7 +123,7 @@ class SvxConfigGroupListBox : public SvTreeListBox
SvxGroupInfoArr_Impl aArr;
bool m_bShowSlots;
- SvxConfigFunctionListBox* pFunctionListBox;
+ VclPtr<SvxConfigFunctionListBox> pFunctionListBox;
ImageProvider* m_pImageProvider;
::com::sun::star::uno::Reference
@@ -181,12 +181,12 @@ public:
class SvxScriptSelectorDialog : public ModelessDialog
{
- FixedText* m_pDialogDescription;
- SvxConfigGroupListBox* m_pCategories;
- SvxConfigFunctionListBox* m_pCommands;
- PushButton* m_pOKButton;
- PushButton* m_pCancelButton;
- VclMultiLineEdit* m_pDescriptionText;
+ VclPtr<FixedText> m_pDialogDescription;
+ VclPtr<SvxConfigGroupListBox> m_pCategories;
+ VclPtr<SvxConfigFunctionListBox> m_pCommands;
+ VclPtr<PushButton> m_pOKButton;
+ VclPtr<PushButton> m_pCancelButton;
+ VclPtr<VclMultiLineEdit> m_pDescriptionText;
OUString m_sDefaultDesc;
bool m_bShowSlots;
Link m_aAddHdl;
@@ -205,6 +205,8 @@ public:
const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame >& xFrame = 0
);
+ virtual ~SvxScriptSelectorDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetAddHdl( const Link& rLink ) { m_aAddHdl = rLink; }
const Link& GetAddHdl() const { return m_aAddHdl; }
diff --git a/cui/source/inc/showcols.hxx b/cui/source/inc/showcols.hxx
index dceddb7e3a00..d7494d72896b 100644
--- a/cui/source/inc/showcols.hxx
+++ b/cui/source/inc/showcols.hxx
@@ -35,13 +35,15 @@
class FmShowColsDialog : public ModalDialog
{
- ListBox* m_pList;
- OKButton* m_pOK;
+ VclPtr<ListBox> m_pList;
+ VclPtr<OKButton> m_pOK;
::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > m_xColumns;
public:
FmShowColsDialog(vcl::Window* pParent);
+ virtual ~FmShowColsDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& xCols);
diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx
index bc5fc701e449..e9142e24005f 100644
--- a/cui/source/inc/splitcelldlg.hxx
+++ b/cui/source/inc/splitcelldlg.hxx
@@ -28,10 +28,10 @@
class SvxSplitTableDlg : public SvxAbstractSplittTableDialog, public SvxStandardDialog
{
- NumericField* m_pCountEdit;
- RadioButton* m_pHorzBox;
- RadioButton* m_pVertBox;
- CheckBox* m_pPropCB;
+ VclPtr<NumericField> m_pCountEdit;
+ VclPtr<RadioButton> m_pHorzBox;
+ VclPtr<RadioButton> m_pVertBox;
+ VclPtr<CheckBox> m_pPropCB;
long mnMaxVertical;
long mnMaxHorizontal;
@@ -40,6 +40,8 @@ protected:
public:
SvxSplitTableDlg(vcl::Window *pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal );
+ virtual ~SvxSplitTableDlg();
+ virtual void dispose() SAL_OVERRIDE;
DECL_LINK( ClickHdl, Button * );
diff --git a/cui/source/inc/srchxtra.hxx b/cui/source/inc/srchxtra.hxx
index 705c4d2a96fc..f1c6aefde1a9 100644
--- a/cui/source/inc/srchxtra.hxx
+++ b/cui/source/inc/srchxtra.hxx
@@ -51,10 +51,12 @@ class SvxSearchAttributeDialog : public ModalDialog
public:
SvxSearchAttributeDialog( vcl::Window* pParent, SearchAttrItemList& rLst,
const sal_uInt16* pWhRanges );
+ virtual ~SvxSearchAttributeDialog();
+ virtual void dispose() SAL_OVERRIDE;
private:
- SvxCheckListBox* m_pAttrLB;
- OKButton* m_pOKBtn;
+ VclPtr<SvxCheckListBox> m_pAttrLB;
+ VclPtr<OKButton> m_pOKBtn;
SearchAttrItemList& rList;
@@ -66,10 +68,10 @@ private:
class SvxSearchSimilarityDialog : public ModalDialog
{
private:
- NumericField* m_pOtherFld;
- NumericField* m_pLongerFld;
- NumericField* m_pShorterFld;
- CheckBox* m_pRelaxBox;
+ VclPtr<NumericField> m_pOtherFld;
+ VclPtr<NumericField> m_pLongerFld;
+ VclPtr<NumericField> m_pShorterFld;
+ VclPtr<CheckBox> m_pRelaxBox;
public:
SvxSearchSimilarityDialog( vcl::Window* pParent,
@@ -77,6 +79,8 @@ public:
sal_uInt16 nOther,
sal_uInt16 nShorter,
sal_uInt16 nLonger );
+ virtual ~SvxSearchSimilarityDialog();
+ virtual void dispose() SAL_OVERRIDE;
sal_uInt16 GetOther() { return (sal_uInt16)m_pOtherFld->GetValue(); }
sal_uInt16 GetShorter() { return (sal_uInt16)m_pShorterFld->GetValue(); }
diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx
index 3c3d3e622f41..5ed3ad77df18 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -34,39 +34,39 @@ class SvxSwPosSizeTabPage : public SfxTabPage
{
using TabPage::DeactivatePage;
- MetricField* m_pWidthMF;
- MetricField* m_pHeightMF;
- CheckBox* m_pKeepRatioCB;
+ VclPtr<MetricField> m_pWidthMF;
+ VclPtr<MetricField> m_pHeightMF;
+ VclPtr<CheckBox> m_pKeepRatioCB;
- RadioButton* m_pToPageRB;
- RadioButton* m_pToParaRB;
- RadioButton* m_pToCharRB;
- RadioButton* m_pAsCharRB;
- RadioButton* m_pToFrameRB;
+ VclPtr<RadioButton> m_pToPageRB;
+ VclPtr<RadioButton> m_pToParaRB;
+ VclPtr<RadioButton> m_pToCharRB;
+ VclPtr<RadioButton> m_pAsCharRB;
+ VclPtr<RadioButton> m_pToFrameRB;
- TriStateBox* m_pPositionCB;
- TriStateBox* m_pSizeCB;
+ VclPtr<TriStateBox> m_pPositionCB;
+ VclPtr<TriStateBox> m_pSizeCB;
- VclContainer* m_pPosFrame;
- FixedText* m_pHoriFT;
- ListBox* m_pHoriLB;
- FixedText* m_pHoriByFT;
- MetricField* m_pHoriByMF;
- FixedText* m_pHoriToFT;
- ListBox* m_pHoriToLB;
+ VclPtr<VclContainer> m_pPosFrame;
+ VclPtr<FixedText> m_pHoriFT;
+ VclPtr<ListBox> m_pHoriLB;
+ VclPtr<FixedText> m_pHoriByFT;
+ VclPtr<MetricField> m_pHoriByMF;
+ VclPtr<FixedText> m_pHoriToFT;
+ VclPtr<ListBox> m_pHoriToLB;
- CheckBox* m_pHoriMirrorCB;
+ VclPtr<CheckBox> m_pHoriMirrorCB;
- FixedText* m_pVertFT;
- ListBox* m_pVertLB;
- FixedText* m_pVertByFT;
- MetricField* m_pVertByMF;
- FixedText* m_pVertToFT;
- ListBox* m_pVertToLB;
+ VclPtr<FixedText> m_pVertFT;
+ VclPtr<ListBox> m_pVertLB;
+ VclPtr<FixedText> m_pVertByFT;
+ VclPtr<MetricField> m_pVertByMF;
+ VclPtr<FixedText> m_pVertToFT;
+ VclPtr<ListBox> m_pVertToLB;
- CheckBox* m_pFollowCB;
+ VclPtr<CheckBox> m_pFollowCB;
- SvxSwFrameExample* m_pExampleWN;
+ VclPtr<SvxSwFrameExample> m_pExampleWN;
Link m_aValidateLink;
@@ -123,6 +123,8 @@ class SvxSwPosSizeTabPage : public SfxTabPage
public:
SvxSwPosSizeTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~SvxSwPosSizeTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
static const sal_uInt16* GetRanges();
diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx
index 2fd0d3aa8f18..4a67cd9cd008 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -49,6 +49,8 @@ class SvxTabulatorTabPage : public SfxTabPage
static const sal_uInt16 pRanges[];
public:
+ virtual ~SvxTabulatorTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
static const sal_uInt16* GetRanges() { return pRanges; }
@@ -64,34 +66,34 @@ private:
SvxTabulatorTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
// tabulators and positions
- MetricBox* m_pTabBox;
+ VclPtr<MetricBox> m_pTabBox;
// TabType
- RadioButton* m_pLeftTab;
- RadioButton* m_pRightTab;
- RadioButton* m_pCenterTab;
- RadioButton* m_pDezTab;
-
- TabWin_Impl* m_pLeftWin;
- TabWin_Impl* m_pRightWin;
- TabWin_Impl* m_pCenterWin;
- TabWin_Impl* m_pDezWin;
-
- FixedText* m_pDezCharLabel;
- Edit* m_pDezChar;
-
- RadioButton* m_pNoFillChar;
- RadioButton* m_pFillPoints;
- RadioButton* m_pFillDashLine ;
- RadioButton* m_pFillSolidLine;
- RadioButton* m_pFillSpecial;
- Edit* m_pFillChar;
-
- PushButton* m_pNewBtn;
- PushButton* m_pDelAllBtn;
- PushButton* m_pDelBtn;
-
- VclContainer* m_pTypeFrame;
- VclContainer* m_pFillFrame;
+ VclPtr<RadioButton> m_pLeftTab;
+ VclPtr<RadioButton> m_pRightTab;
+ VclPtr<RadioButton> m_pCenterTab;
+ VclPtr<RadioButton> m_pDezTab;
+
+ VclPtr<TabWin_Impl> m_pLeftWin;
+ VclPtr<TabWin_Impl> m_pRightWin;
+ VclPtr<TabWin_Impl> m_pCenterWin;
+ VclPtr<TabWin_Impl> m_pDezWin;
+
+ VclPtr<FixedText> m_pDezCharLabel;
+ VclPtr<Edit> m_pDezChar;
+
+ VclPtr<RadioButton> m_pNoFillChar;
+ VclPtr<RadioButton> m_pFillPoints;
+ VclPtr<RadioButton> m_pFillDashLine ;
+ VclPtr<RadioButton> m_pFillSolidLine;
+ VclPtr<RadioButton> m_pFillSpecial;
+ VclPtr<Edit> m_pFillChar;
+
+ VclPtr<PushButton> m_pNewBtn;
+ VclPtr<PushButton> m_pDelAllBtn;
+ VclPtr<PushButton> m_pDelBtn;
+
+ VclPtr<VclContainer> m_pTypeFrame;
+ VclPtr<VclContainer> m_pFillFrame;
// local variables, internal functions
SvxTabStop aAktTab;
diff --git a/cui/source/inc/textanim.hxx b/cui/source/inc/textanim.hxx
index 31a705d488b3..8ba2ad2ff956 100644
--- a/cui/source/inc/textanim.hxx
+++ b/cui/source/inc/textanim.hxx
@@ -37,27 +37,28 @@ class SdrView;
class SvxTextAnimationPage : public SfxTabPage
{
private:
- static const sal_uInt16 pRanges[];
- ListBox* m_pLbEffect;
- VclBox* m_pBoxDirection;
- PushButton* m_pBtnUp;
- PushButton* m_pBtnLeft;
- PushButton* m_pBtnRight;
- PushButton* m_pBtnDown;
+ static const sal_uInt16 pRanges[];
- VclFrame* m_pFlProperties;
- TriStateBox* m_pTsbStartInside;
- TriStateBox* m_pTsbStopInside;
+ VclPtr<ListBox> m_pLbEffect;
+ VclPtr<VclBox> m_pBoxDirection;
+ VclPtr<PushButton> m_pBtnUp;
+ VclPtr<PushButton> m_pBtnLeft;
+ VclPtr<PushButton> m_pBtnRight;
+ VclPtr<PushButton> m_pBtnDown;
- VclBox* m_pBoxCount;
- TriStateBox* m_pTsbEndless;
- NumericField* m_pNumFldCount;
+ VclPtr<VclFrame> m_pFlProperties;
+ VclPtr<TriStateBox> m_pTsbStartInside;
+ VclPtr<TriStateBox> m_pTsbStopInside;
- TriStateBox* m_pTsbPixel;
- MetricField* m_pMtrFldAmount;
+ VclPtr<VclBox> m_pBoxCount;
+ VclPtr<TriStateBox> m_pTsbEndless;
+ VclPtr<NumericField> m_pNumFldCount;
- TriStateBox* m_pTsbAuto;
- MetricField* m_pMtrFldDelay;
+ VclPtr<TriStateBox> m_pTsbPixel;
+ VclPtr<MetricField> m_pMtrFldAmount;
+
+ VclPtr<TriStateBox> m_pTsbAuto;
+ VclPtr<MetricField> m_pMtrFldDelay;
const SfxItemSet& rOutAttrs;
SdrTextAniKind eAniKind;
@@ -75,6 +76,8 @@ private:
public:
SvxTextAnimationPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
+ virtual ~SvxTextAnimationPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pRanges; }
diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx
index 439eb82ba2d3..eacc8265d4ab 100644
--- a/cui/source/inc/textattr.hxx
+++ b/cui/source/inc/textattr.hxx
@@ -38,22 +38,23 @@ class SvxTextAttrPage : public SvxTabPage
{
private:
static const sal_uInt16 pRanges[];
- TriStateBox* m_pTsbAutoGrowWidth;
- TriStateBox* m_pTsbAutoGrowHeight;
- TriStateBox* m_pTsbFitToSize;
- TriStateBox* m_pTsbContour;
- TriStateBox* m_pTsbWordWrapText;
- TriStateBox* m_pTsbAutoGrowSize;
-
- VclFrame* m_pFlDistance;
- MetricField* m_pMtrFldLeft;
- MetricField* m_pMtrFldRight;
- MetricField* m_pMtrFldTop;
- MetricField* m_pMtrFldBottom;
-
- VclFrame* m_pFlPosition;
- SvxRectCtl* m_pCtlPosition;
- TriStateBox* m_pTsbFullWidth;
+
+ VclPtr<TriStateBox> m_pTsbAutoGrowWidth;
+ VclPtr<TriStateBox> m_pTsbAutoGrowHeight;
+ VclPtr<TriStateBox> m_pTsbFitToSize;
+ VclPtr<TriStateBox> m_pTsbContour;
+ VclPtr<TriStateBox> m_pTsbWordWrapText;
+ VclPtr<TriStateBox> m_pTsbAutoGrowSize;
+
+ VclPtr<VclFrame> m_pFlDistance;
+ VclPtr<MetricField> m_pMtrFldLeft;
+ VclPtr<MetricField> m_pMtrFldRight;
+ VclPtr<MetricField> m_pMtrFldTop;
+ VclPtr<MetricField> m_pMtrFldBottom;
+
+ VclPtr<VclFrame> m_pFlPosition;
+ VclPtr<SvxRectCtl> m_pCtlPosition;
+ VclPtr<TriStateBox> m_pTsbFullWidth;
const SfxItemSet& rOutAttrs;
const SdrView* pView;
@@ -76,6 +77,8 @@ private:
public:
SvxTextAttrPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
+ virtual ~SvxTextAttrPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pRanges; }
diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx
index 9b035f14d03f..661788124c3f 100644
--- a/cui/source/inc/thesdlg.hxx
+++ b/cui/source/inc/thesdlg.hxx
@@ -35,13 +35,15 @@ class SvxThesaurusDialog;
class LookUpComboBox : public ComboBox
{
Idle m_aModifyIdle;
- SvxThesaurusDialog* m_pDialog;
+ VclPtr<SvxThesaurusDialog> m_pDialog;
LookUpComboBox( const LookUpComboBox & ) SAL_DELETED_FUNCTION;
LookUpComboBox& operator = ( const LookUpComboBox & ) SAL_DELETED_FUNCTION;
public:
LookUpComboBox(vcl::Window *pParent);
+ virtual ~LookUpComboBox();
+ virtual void dispose() SAL_OVERRIDE;
DECL_LINK( ModifyTimer_Hdl, Timer * );
@@ -71,7 +73,7 @@ public:
class ThesaurusAlternativesCtrl
: public SvxCheckListBox
{
- SvxThesaurusDialog* m_pDialog;
+ VclPtr<SvxThesaurusDialog> m_pDialog;
typedef std::map< const SvTreeListEntry *, AlternativesExtraData > UserDataMap_t;
UserDataMap_t m_aUserData;
@@ -98,13 +100,15 @@ public:
class ReplaceEdit : public Edit
{
- Button * m_pBtn;
+ VclPtr<Button> m_pBtn;
ReplaceEdit( const ReplaceEdit & ) SAL_DELETED_FUNCTION;
ReplaceEdit & operator = ( const ReplaceEdit & ) SAL_DELETED_FUNCTION;
public:
ReplaceEdit(vcl::Window *pParent);
+ virtual ~ReplaceEdit();
+ virtual void dispose() SAL_OVERRIDE;
void init(Button *pBtn) { m_pBtn = pBtn; }
@@ -116,11 +120,11 @@ public:
class SvxThesaurusDialog : public SvxStandardDialog
{
- PushButton* m_pLeftBtn;
- LookUpComboBox* m_pWordCB;
- ThesaurusAlternativesCtrl* m_pAlternativesCT;
- ReplaceEdit* m_pReplaceEdit;
- ListBox* m_pLangLB;
+ VclPtr<PushButton> m_pLeftBtn;
+ VclPtr<LookUpComboBox> m_pWordCB;
+ VclPtr<ThesaurusAlternativesCtrl> m_pAlternativesCT;
+ VclPtr<ReplaceEdit> m_pReplaceEdit;
+ VclPtr<ListBox> m_pLangLB;
OUString m_aErrStr;
@@ -131,6 +135,9 @@ class SvxThesaurusDialog : public SvxStandardDialog
bool m_bWordFound;
public:
+ virtual ~SvxThesaurusDialog();
+ virtual void dispose() SAL_OVERRIDE;
+
bool WordFound() const { return m_bWordFound; }
OUString getErrStr() const { return m_aErrStr; }
diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index 6d477a573e30..e2a516303b3d 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -81,29 +81,29 @@ class SvxPositionSizeTabPage : public SvxTabPage
private:
// position
- VclFrame* m_pFlPosition;
- MetricField* m_pMtrPosX;
- MetricField* m_pMtrPosY;
- SvxRectCtl* m_pCtlPos;
+ VclPtr<VclFrame> m_pFlPosition;
+ VclPtr<MetricField> m_pMtrPosX;
+ VclPtr<MetricField> m_pMtrPosY;
+ VclPtr<SvxRectCtl> m_pCtlPos;
// size
- VclFrame* m_pFlSize;
- FixedText* m_pFtWidth;
- MetricField* m_pMtrWidth;
- FixedText* m_pFtHeight;
- MetricField* m_pMtrHeight;
- CheckBox* m_pCbxScale;
- SvxRectCtl* m_pCtlSize;
+ VclPtr<VclFrame> m_pFlSize;
+ VclPtr<FixedText> m_pFtWidth;
+ VclPtr<MetricField> m_pMtrWidth;
+ VclPtr<FixedText> m_pFtHeight;
+ VclPtr<MetricField> m_pMtrHeight;
+ VclPtr<CheckBox> m_pCbxScale;
+ VclPtr<SvxRectCtl> m_pCtlSize;
// protect
- VclFrame* m_pFlProtect;
- TriStateBox* m_pTsbPosProtect;
- TriStateBox* m_pTsbSizeProtect;
+ VclPtr<VclFrame> m_pFlProtect;
+ VclPtr<TriStateBox> m_pTsbPosProtect;
+ VclPtr<TriStateBox> m_pTsbSizeProtect;
// adjust
- VclFrame* m_pFlAdjust;
- TriStateBox* m_pTsbAutoGrowWidth;
- TriStateBox* m_pTsbAutoGrowHeight;
+ VclPtr<VclFrame> m_pFlAdjust;
+ VclPtr<TriStateBox> m_pTsbAutoGrowWidth;
+ VclPtr<TriStateBox> m_pTsbAutoGrowHeight;
private:
const SfxItemSet& mrOutAttrs;
@@ -146,6 +146,8 @@ private:
public:
SvxPositionSizeTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~SvxPositionSizeTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pPosSizeRanges; }
@@ -181,14 +183,14 @@ class SvxAngleTabPage : public SvxTabPage
static const sal_uInt16 pAngleRanges[];
private:
- VclFrame* m_pFlPosition;
- MetricField* m_pMtrPosX;
- MetricField* m_pMtrPosY;
- SvxRectCtl* m_pCtlRect;
+ VclPtr<VclFrame> m_pFlPosition;
+ VclPtr<MetricField> m_pMtrPosX;
+ VclPtr<MetricField> m_pMtrPosY;
+ VclPtr<SvxRectCtl> m_pCtlRect;
- VclFrame* m_pFlAngle;
- NumericField* m_pNfAngle;
- svx::DialControl* m_pCtlAngle;
+ VclPtr<VclFrame> m_pFlAngle;
+ VclPtr<NumericField> m_pNfAngle;
+ VclPtr<svx::DialControl> m_pCtlAngle;
const SfxItemSet& rOutAttrs;
const SdrView* pView;
@@ -202,6 +204,8 @@ private:
public:
SvxAngleTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~SvxAngleTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pAngleRanges; }
@@ -230,10 +234,10 @@ class SvxSlantTabPage : public SvxTabPage
static const sal_uInt16 pSlantRanges[];
private:
- VclFrame* m_pFlRadius;
- MetricField* m_pMtrRadius;
- VclFrame* m_pFlAngle;
- MetricField* m_pMtrAngle;
+ VclPtr<VclFrame> m_pFlRadius;
+ VclPtr<MetricField> m_pMtrRadius;
+ VclPtr<VclFrame> m_pFlAngle;
+ VclPtr<MetricField> m_pMtrAngle;
const SfxItemSet& rOutAttrs;
@@ -247,6 +251,8 @@ private:
public:
SvxSlantTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~SvxSlantTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pSlantRanges; }
diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index e00602962106..5fa829c4d33b 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -146,18 +146,18 @@ private:
SvTreeListEntry* pCurrentPageEntry;
bool hasTreePendingLayout() const;
- OKButton* pOkPB;
- PushButton* pBackPB;
+ VclPtr<OKButton> pOkPB;
+ VclPtr<PushButton> pBackPB;
- SvTreeListBox* pTreeLB;
- VclBox* pTabBox;
+ VclPtr<SvTreeListBox> pTreeLB;
+ VclPtr<VclBox> pTabBox;
OUString sTitle;
OUString sNotLoadedError;
// for the ColorTabPage
SfxItemSet* pColorPageItemSet;
- SvxColorTabPage *mpColorPage;
+ VclPtr<SvxColorTabPage> mpColorPage;
bool bForgetSelection;
bool bIsFromExtensionManager;
diff --git a/cui/source/inc/zoom.hxx b/cui/source/inc/zoom.hxx
index 3664ecc57ca2..882be467f95d 100644
--- a/cui/source/inc/zoom.hxx
+++ b/cui/source/inc/zoom.hxx
@@ -27,21 +27,21 @@
class SvxZoomDialog : public SfxModalDialog
{
private:
- RadioButton* m_pOptimalBtn;
- RadioButton* m_pWholePageBtn;
- RadioButton* m_pPageWidthBtn;
- RadioButton* m_p100Btn;
- RadioButton* m_pUserBtn;
- MetricField* m_pUserEdit;
+ VclPtr<RadioButton> m_pOptimalBtn;
+ VclPtr<RadioButton> m_pWholePageBtn;
+ VclPtr<RadioButton> m_pPageWidthBtn;
+ VclPtr<RadioButton> m_p100Btn;
+ VclPtr<RadioButton> m_pUserBtn;
+ VclPtr<MetricField> m_pUserEdit;
- VclContainer* m_pViewFrame;
- RadioButton* m_pAutomaticBtn;
- RadioButton* m_pSingleBtn;
- RadioButton* m_pColumnsBtn;
- NumericField* m_pColumnsEdit;
- CheckBox* m_pBookModeChk;
+ VclPtr<VclContainer> m_pViewFrame;
+ VclPtr<RadioButton> m_pAutomaticBtn;
+ VclPtr<RadioButton> m_pSingleBtn;
+ VclPtr<RadioButton> m_pColumnsBtn;
+ VclPtr<NumericField> m_pColumnsEdit;
+ VclPtr<CheckBox> m_pBookModeChk;
- OKButton* m_pOKBtn;
+ VclPtr<OKButton> m_pOKBtn;
const SfxItemSet& mrSet;
std::unique_ptr<SfxItemSet> mpOutSet;
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index 8e4776361897..55b85df456fa 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -156,8 +156,10 @@ void CertPathDialog::dispose()
delete pCertPath;
pEntry = m_pCertPathList->Next( pEntry );
}
- delete m_pCertPathList;
- m_pCertPathList = NULL;
+ m_pCertPathListContainer.clear();
+ m_pCertPathList.clear();
+ m_pAddBtn.clear();
+ m_pOKBtn.clear();
ModalDialog::dispose();
}
diff --git a/cui/source/options/certpath.hxx b/cui/source/options/certpath.hxx
index 1add8ea14c1f..29a3e1aa45fb 100644
--- a/cui/source/options/certpath.hxx
+++ b/cui/source/options/certpath.hxx
@@ -19,10 +19,10 @@
class CertPathDialog : public ModalDialog
{
private:
- SvSimpleTableContainer* m_pCertPathListContainer;
- svx::SvxRadioButtonListBox* m_pCertPathList;
- PushButton* m_pAddBtn;
- OKButton* m_pOKBtn;
+ VclPtr<SvSimpleTableContainer> m_pCertPathListContainer;
+ VclPtr<svx::SvxRadioButtonListBox> m_pCertPathList;
+ VclPtr<PushButton> m_pAddBtn;
+ VclPtr<OKButton> m_pOKBtn;
OUString m_sAddDialogText;
OUString m_sManual;
diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx
index 3d432698e0fc..ecb996322bee 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -325,6 +325,23 @@ namespace offapp
m_pDriverList->SetRowChangeHandler( LINK(this, ConnectionPoolOptionsPage, OnDriverRowChanged) );
}
+ ConnectionPoolOptionsPage::~ConnectionPoolOptionsPage()
+ {
+ dispose();
+ }
+
+ void ConnectionPoolOptionsPage::dispose()
+ {
+ m_pEnablePooling.clear();
+ m_pDriversLabel.clear();
+ m_pDriverList.clear();
+ m_pDriverLabel.clear();
+ m_pDriver.clear();
+ m_pDriverPoolingEnabled.clear();
+ m_pTimeoutLabel.clear();
+ m_pTimeout.clear();
+ SfxTabPage::dispose();
+ }
SfxTabPage* ConnectionPoolOptionsPage::Create(vcl::Window* _pParent, const SfxItemSet* _rAttrSet)
{
diff --git a/cui/source/options/connpooloptions.hxx b/cui/source/options/connpooloptions.hxx
index 868c42702a16..8650d121ce16 100644
--- a/cui/source/options/connpooloptions.hxx
+++ b/cui/source/options/connpooloptions.hxx
@@ -38,19 +38,21 @@ namespace offapp
using TabPage::ActivatePage;
protected:
- CheckBox* m_pEnablePooling;
- FixedText* m_pDriversLabel;
- DriverListControl* m_pDriverList;
- FixedText* m_pDriverLabel;
- FixedText* m_pDriver;
- CheckBox* m_pDriverPoolingEnabled;
- FixedText* m_pTimeoutLabel;
- NumericField* m_pTimeout;
+ VclPtr<CheckBox> m_pEnablePooling;
+ VclPtr<FixedText> m_pDriversLabel;
+ VclPtr<DriverListControl> m_pDriverList;
+ VclPtr<FixedText> m_pDriverLabel;
+ VclPtr<FixedText> m_pDriver;
+ VclPtr<CheckBox> m_pDriverPoolingEnabled;
+ VclPtr<FixedText> m_pTimeoutLabel;
+ VclPtr<NumericField> m_pTimeout;
protected:
ConnectionPoolOptionsPage(vcl::Window* _pParent, const SfxItemSet& _rAttrSet);
public:
+ virtual ~ConnectionPoolOptionsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* _pParent, const SfxItemSet* _rAttrSet);
protected:
diff --git a/cui/source/options/cuisrchdlg.cxx b/cui/source/options/cuisrchdlg.cxx
index a7041604683b..a911a1eaceee 100644
--- a/cui/source/options/cuisrchdlg.cxx
+++ b/cui/source/options/cuisrchdlg.cxx
@@ -60,6 +60,17 @@ SvxJSearchOptionsDialog::SvxJSearchOptionsDialog(vcl::Window *pParent,
pPage->EnableSaveOptions(false);
}
+SvxJSearchOptionsDialog::~SvxJSearchOptionsDialog()
+{
+ dispose();
+}
+
+void SvxJSearchOptionsDialog::dispose()
+{
+ pPage.clear();
+ SfxSingleTabDialog::dispose();
+}
+
void SvxJSearchOptionsDialog::Activate()
{
pPage->SetTransliterationFlags( nInitialTlFlags );
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index de08fa07c5e0..f149629776b8 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -170,8 +170,11 @@ void DbRegistrationOptionsPage::dispose()
{
for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i )
delete static_cast< DatabaseRegistration* >( pPathBox->GetEntry(i)->GetUserData() );
- delete pPathBox;
- pPathBox = NULL;
+ pPathBox.clear();
+ m_pPathCtrl.clear();
+ m_pNew.clear();
+ m_pEdit.clear();
+ m_pDelete.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx
index 01482292caf4..74e87425b1e5 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -70,6 +70,20 @@ namespace svx
m_pURL->SetDropDownLineCount( 5 );
}
+ ODocumentLinkDialog::~ODocumentLinkDialog()
+ {
+ dispose();
+ }
+
+ void ODocumentLinkDialog::dispose()
+ {
+ m_pURL.clear();
+ m_pBrowseFile.clear();
+ m_pName.clear();
+ m_pOK.clear();
+ ModalDialog::dispose();
+ }
+
void ODocumentLinkDialog::setLink( const OUString& _rName, const OUString& _rURL )
{
diff --git a/cui/source/options/doclinkdialog.hxx b/cui/source/options/doclinkdialog.hxx
index 0584734b761d..55493e9e9974 100644
--- a/cui/source/options/doclinkdialog.hxx
+++ b/cui/source/options/doclinkdialog.hxx
@@ -40,10 +40,10 @@ namespace svx
class ODocumentLinkDialog : public ModalDialog
{
protected:
- ::svt::OFileURLControl* m_pURL;
- PushButton* m_pBrowseFile;
- Edit* m_pName;
- OKButton* m_pOK;
+ VclPtr<::svt::OFileURLControl> m_pURL;
+ VclPtr<PushButton> m_pBrowseFile;
+ VclPtr<Edit> m_pName;
+ VclPtr<OKButton> m_pOK;
bool m_bCreatingNew;
@@ -51,6 +51,8 @@ namespace svx
public:
ODocumentLinkDialog( vcl::Window* _pParent, bool _bCreateNew );
+ virtual ~ODocumentLinkDialog();
+ virtual void dispose() SAL_OVERRIDE;
// name validation has to be done by an external instance
// the validator link gets a pointer to a String, and should return 0 if the string is not
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 098855ae032e..6dfd19f52a2a 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -147,8 +147,16 @@ void SvxFontSubstTabPage::dispose()
pCheckButtonData = NULL;
delete pConfig;
pConfig = NULL;
- delete m_pCheckLB;
- m_pCheckLB = NULL;
+ m_pCheckLB.clear();
+ m_pUseTableCB.clear();
+ m_pReplacements.clear();
+ m_pFont1CB.clear();
+ m_pFont2CB.clear();
+ m_pApply.clear();
+ m_pDelete.clear();
+ m_pFontNameLB.clear();
+ m_pNonPropFontsOnlyCB.clear();
+ m_pFontHeightLB.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx
index b051cdd3c752..3a5b967a3908 100644
--- a/cui/source/options/fontsubs.hxx
+++ b/cui/source/options/fontsubs.hxx
@@ -63,18 +63,18 @@ class SvxFontSubstCheckListBox : public SvSimpleTable
class SvtFontSubstConfig;
class SvxFontSubstTabPage : public SfxTabPage
{
- CheckBox* m_pUseTableCB;
- VclContainer* m_pReplacements;
- FontNameBox* m_pFont1CB;
- FontNameBox* m_pFont2CB;
- PushButton* m_pApply;
- PushButton* m_pDelete;
-
- SvxFontSubstCheckListBox* m_pCheckLB;
-
- ListBox* m_pFontNameLB;
- CheckBox* m_pNonPropFontsOnlyCB;
- ListBox* m_pFontHeightLB;
+ VclPtr<CheckBox> m_pUseTableCB;
+ VclPtr<VclContainer> m_pReplacements;
+ VclPtr<FontNameBox> m_pFont1CB;
+ VclPtr<FontNameBox> m_pFont2CB;
+ VclPtr<PushButton> m_pApply;
+ VclPtr<PushButton> m_pDelete;
+
+ VclPtr<SvxFontSubstCheckListBox> m_pCheckLB;
+
+ VclPtr<ListBox> m_pFontNameLB;
+ VclPtr<CheckBox> m_pNonPropFontsOnlyCB;
+ VclPtr<ListBox> m_pFontHeightLB;
OUString m_sAutomatic;
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index c5ef749ec20f..02d818438286 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -164,6 +164,21 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage( vcl::Window* pParent/*, const SfxI
m_pPrefBox->SetAlternatingRowColors( true );
}
+CuiAboutConfigTabPage::~CuiAboutConfigTabPage()
+{
+ dispose();
+}
+
+void CuiAboutConfigTabPage::dispose()
+{
+ m_pPrefCtrl.clear();
+ m_pResetBtn.clear();
+ m_pEditBtn.clear();
+ m_pSearchBtn.clear();
+ m_pSearchEdit.clear();
+ ModelessDialog::dispose();
+}
+
void CuiAboutConfigTabPage::InsertEntry(const OUString& rProp, const OUString& rStatus, const OUString& rType, const OUString& rValue)
{
SvTreeListEntry* pEntry = new SvTreeListEntry;
@@ -477,6 +492,17 @@ CuiAboutConfigValueDialog::CuiAboutConfigValueDialog( vcl::Window* pWindow,
}
+CuiAboutConfigValueDialog::~CuiAboutConfigValueDialog()
+{
+ dispose();
+}
+
+void CuiAboutConfigValueDialog::dispose()
+{
+ m_pEDValue.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK_NOARG( CuiAboutConfigTabPage, ResetBtnHdl_Impl )
{
Reset();
diff --git a/cui/source/options/optaboutconfig.hxx b/cui/source/options/optaboutconfig.hxx
index dc19e4ae6539..85a10deb5ff1 100644
--- a/cui/source/options/optaboutconfig.hxx
+++ b/cui/source/options/optaboutconfig.hxx
@@ -43,11 +43,11 @@ public:
class CuiAboutConfigTabPage : public ModelessDialog
{
private:
- SvSimpleTableContainer* m_pPrefCtrl;
- PushButton* m_pResetBtn;
- PushButton* m_pEditBtn;
- PushButton* m_pSearchBtn;
- Edit* m_pSearchEdit;
+ VclPtr<SvSimpleTableContainer> m_pPrefCtrl;
+ VclPtr<PushButton> m_pResetBtn;
+ VclPtr<PushButton> m_pEditBtn;
+ VclPtr<PushButton> m_pSearchBtn;
+ VclPtr<Edit> m_pSearchEdit;
std::vector< boost::shared_ptr< Prop_Impl > > m_vectorOfModified;
boost::scoped_ptr< SvSimpleTable > m_pPrefBox;
@@ -65,6 +65,8 @@ private:
public:
CuiAboutConfigTabPage(vcl::Window* pParent);
+ virtual ~CuiAboutConfigTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void InsertEntry(const OUString& rProp, const OUString& rStatus, const OUString& rType, const OUString& rValue);
void Reset();
void FillItems(const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>& xNameAccess);
@@ -75,10 +77,12 @@ public:
class CuiAboutConfigValueDialog : public ModalDialog
{
private:
- CuiCustomMultilineEdit* m_pEDValue;
+ VclPtr<CuiCustomMultilineEdit> m_pEDValue;
public:
CuiAboutConfigValueDialog( vcl::Window* pWindow, const OUString& rValue , int limit = 0);
+ virtual ~CuiAboutConfigValueDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString getValue()
{
diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx
index f09b19c5eafa..61354e138c6b 100644
--- a/cui/source/options/optaccessibility.cxx
+++ b/cui/source/options/optaccessibility.cxx
@@ -65,6 +65,15 @@ void SvxAccessibilityOptionsTabPage::dispose()
{
delete m_pImpl;
m_pImpl = NULL;
+ m_pAccessibilityTool.clear();
+ m_pTextSelectionInReadonly.clear();
+ m_pAnimatedGraphics.clear();
+ m_pAnimatedTexts.clear();
+ m_pTipHelpCB.clear();
+ m_pTipHelpNF.clear();
+ m_pAutoDetectHC.clear();
+ m_pAutomaticFontColor.clear();
+ m_pPagePreviews.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optaccessibility.hxx b/cui/source/options/optaccessibility.hxx
index ccf2ac00712b..0a33851b6f56 100644
--- a/cui/source/options/optaccessibility.hxx
+++ b/cui/source/options/optaccessibility.hxx
@@ -25,15 +25,15 @@
struct SvxAccessibilityOptionsTabPage_Impl;
class SvxAccessibilityOptionsTabPage : public SfxTabPage
{
- CheckBox* m_pAccessibilityTool;
- CheckBox* m_pTextSelectionInReadonly;
- CheckBox* m_pAnimatedGraphics;
- CheckBox* m_pAnimatedTexts;
- CheckBox* m_pTipHelpCB;
- NumericField* m_pTipHelpNF;
- CheckBox* m_pAutoDetectHC;
- CheckBox* m_pAutomaticFontColor;
- CheckBox* m_pPagePreviews;
+ VclPtr<CheckBox> m_pAccessibilityTool;
+ VclPtr<CheckBox> m_pTextSelectionInReadonly;
+ VclPtr<CheckBox> m_pAnimatedGraphics;
+ VclPtr<CheckBox> m_pAnimatedTexts;
+ VclPtr<CheckBox> m_pTipHelpCB;
+ VclPtr<NumericField> m_pTipHelpNF;
+ VclPtr<CheckBox> m_pAutoDetectHC;
+ VclPtr<CheckBox> m_pAutomaticFontColor;
+ VclPtr<CheckBox> m_pPagePreviews;
DECL_LINK(TipHelpHdl, CheckBox*);
void EnableTipHelp(bool bCheck);
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 0f9bab237d61..49b501572ce9 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -158,6 +158,19 @@ void SvxAsianLayoutPage::dispose()
{
delete pImpl;
pImpl = NULL;
+ m_pCharKerningRB.clear();
+ m_pCharPunctKerningRB.clear();
+ m_pNoCompressionRB.clear();
+ m_pPunctCompressionRB.clear();
+ m_pPunctKanaCompressionRB.clear();
+ m_pLanguageFT.clear();
+ m_pLanguageLB.clear();
+ m_pStandardCB.clear();
+ m_pStartFT.clear();
+ m_pStartED.clear();
+ m_pEndFT.clear();
+ m_pEndED.clear();
+ m_pHintFT.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optbasic.cxx b/cui/source/options/optbasic.cxx
index 74028ff45621..1be35826d5d5 100644
--- a/cui/source/options/optbasic.cxx
+++ b/cui/source/options/optbasic.cxx
@@ -45,6 +45,22 @@ SvxBasicIDEOptionsPage::SvxBasicIDEOptionsPage( vcl::Window* pParent, const SfxI
}
+SvxBasicIDEOptionsPage::~SvxBasicIDEOptionsPage()
+{
+ dispose();
+}
+
+void SvxBasicIDEOptionsPage::dispose()
+{
+ pCodeCompleteChk.clear();
+ pAutocloseProcChk.clear();
+ pAutocloseParenChk.clear();
+ pAutocloseQuotesChk.clear();
+ pAutoCorrectChk.clear();
+ pUseExtendedTypesChk.clear();
+ SfxTabPage::dispose();
+}
+
void SvxBasicIDEOptionsPage::LoadConfig()
{
bool bProcClose = officecfg::Office::BasicIDE::Autocomplete::AutocloseProc::get();
diff --git a/cui/source/options/optbasic.hxx b/cui/source/options/optbasic.hxx
index 45f93120bcf4..9aaced3eb2a9 100644
--- a/cui/source/options/optbasic.hxx
+++ b/cui/source/options/optbasic.hxx
@@ -27,17 +27,19 @@
class SvxBasicIDEOptionsPage: public SfxTabPage
{
private:
- CheckBox* pCodeCompleteChk;
- CheckBox* pAutocloseProcChk;
- CheckBox* pAutocloseParenChk;
- CheckBox* pAutocloseQuotesChk;
- CheckBox* pAutoCorrectChk;
- CheckBox* pUseExtendedTypesChk;
+ VclPtr<CheckBox> pCodeCompleteChk;
+ VclPtr<CheckBox> pAutocloseProcChk;
+ VclPtr<CheckBox> pAutocloseParenChk;
+ VclPtr<CheckBox> pAutocloseQuotesChk;
+ VclPtr<CheckBox> pAutoCorrectChk;
+ VclPtr<CheckBox> pUseExtendedTypesChk;
void LoadConfig();
public:
SvxBasicIDEOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~SvxBasicIDEOptionsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 8005483464f1..7cb85b4fe9f1 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -99,6 +99,11 @@ void SvxDefaultColorOptPage::dispose()
delete pChartOptions;
pChartOptions = NULL;
}
+ m_pLbChartColors.clear();
+ m_pValSetColorBox.clear();
+ m_pPBDefault.clear();
+ m_pPBAdd.clear();
+ m_pPBRemove.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optchart.hxx b/cui/source/options/optchart.hxx
index 99d5377ccd00..ff6970627113 100644
--- a/cui/source/options/optchart.hxx
+++ b/cui/source/options/optchart.hxx
@@ -33,11 +33,11 @@ class SvxDefaultColorOptPage : public SfxTabPage
{
private:
- ColorLB* m_pLbChartColors;
- ValueSet* m_pValSetColorBox;
- PushButton* m_pPBDefault;
- PushButton* m_pPBAdd;
- PushButton* m_pPBRemove;
+ VclPtr<ColorLB> m_pLbChartColors;
+ VclPtr<ValueSet> m_pValSetColorBox;
+ VclPtr<PushButton> m_pPBDefault;
+ VclPtr<PushButton> m_pPBAdd;
+ VclPtr<PushButton> m_pPBRemove;
SvxChartOptions* pChartOptions;
SvxChartColorTableItem* pColorConfig;
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index b18abccdec0f..6bdf8a1340e7 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -174,7 +174,7 @@ class ColorConfigWindow_Impl
{
public:
ColorConfigWindow_Impl(vcl::Window* pParent);
- ~ColorConfigWindow_Impl() { dispose(); }
+ virtual ~ColorConfigWindow_Impl() { dispose(); }
virtual void dispose() SAL_OVERRIDE;
public:
@@ -193,8 +193,7 @@ private:
class Chapter
{
// text
- bool m_bOwnsWidget;
- FixedText *m_pText;
+ VclPtr<FixedText> m_pText;
public:
Chapter(FixedText *pText, bool bShow);
Chapter(vcl::Window *pGrid, unsigned nYPos, const OUString& sDisplayName);
@@ -235,11 +234,11 @@ private:
private:
bool m_bOwnsWidgets;
// checkbox (CheckBox) or simple text (FixedText)
- Control* m_pText;
+ VclPtr<Control> m_pText;
// color list box
- ColorListBox* m_pColorList;
+ VclPtr<ColorListBox> m_pColorList;
// color preview box
- vcl::Window* m_pPreview;
+ VclPtr<vcl::Window> m_pPreview;
// default color
Color m_aDefaultColor;
private:
@@ -256,9 +255,9 @@ private:
private:
- VclGrid *m_pGrid;
- ScrollBar *m_pVScroll;
- HeaderBar *m_pHeaderHB;
+ VclPtr<VclGrid> m_pGrid;
+ VclPtr<ScrollBar> m_pVScroll;
+ VclPtr<HeaderBar> m_pHeaderHB;
// initialization
void CreateEntries();
@@ -283,8 +282,7 @@ private:
// eGroup: which group is this?
// rResMgr: resource manager
ColorConfigWindow_Impl::Chapter::Chapter(FixedText* pText, bool bShow)
- : m_bOwnsWidget(false)
- , m_pText(pText)
+ : m_pText(pText)
{
if (!bShow)
Hide();
@@ -293,7 +291,6 @@ ColorConfigWindow_Impl::Chapter::Chapter(FixedText* pText, bool bShow)
// ctor for extended groups
ColorConfigWindow_Impl::Chapter::Chapter(vcl::Window *pGrid,
unsigned nYPos, const OUString& rDisplayName)
- : m_bOwnsWidget(true)
{
m_pText = new FixedText(pGrid, WB_LEFT|WB_VCENTER|WB_3DLOOK);
m_pText->set_font_attribute("weight", "bold");
@@ -305,8 +302,6 @@ ColorConfigWindow_Impl::Chapter::Chapter(vcl::Window *pGrid,
ColorConfigWindow_Impl::Chapter::~Chapter()
{
- if (m_bOwnsWidget)
- delete m_pText;
}
void ColorConfigWindow_Impl::Chapter::Show(Wallpaper const& rBackWall)
@@ -373,9 +368,9 @@ ColorConfigWindow_Impl::Entry::~Entry()
{
if (m_bOwnsWidgets)
{
- delete m_pText;
- delete m_pColorList;
- delete m_pPreview;
+ m_pText.clear();
+ m_pColorList.clear();
+ m_pPreview.clear();
}
}
@@ -417,7 +412,7 @@ void ColorConfigWindow_Impl::Entry::SetLinks(
{
m_pColorList->SetSelectHdl(aColorLink);
m_pColorList->SetGetFocusHdl(aGetFocusLink);
- if (CheckBox* pCheckBox = dynamic_cast<CheckBox*>(m_pText))
+ if (CheckBox* pCheckBox = dynamic_cast<CheckBox*>(m_pText.get()))
{
pCheckBox->SetClickHdl(aCheckLink);
pCheckBox->SetGetFocusHdl(aGetFocusLink);
@@ -440,7 +435,7 @@ void ColorConfigWindow_Impl::Entry::Update (
m_pColorList->SelectEntry(aColor);
}
m_pPreview->SetBackground(Wallpaper(aColor));
- if (CheckBox* pCheckBox = dynamic_cast<CheckBox*>(m_pText))
+ if (CheckBox* pCheckBox = dynamic_cast<CheckBox*>(m_pText.get()))
pCheckBox->Check(rValue.bIsVisible);
}
@@ -513,6 +508,9 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(vcl::Window* pParent)
void ColorConfigWindow_Impl::dispose()
{
disposeBuilder();
+ m_pGrid.clear();
+ m_pVScroll.clear();
+ m_pHeaderHB.clear();
VclContainer::dispose();
}
@@ -827,10 +825,10 @@ void ColorConfigWindow_Impl::Command( const CommandEvent& rCEvt )
class ColorConfigCtrl_Impl : public VclVBox
{
- HeaderBar* m_pHeaderHB;
- VclHBox* m_pBody;
- ColorConfigWindow_Impl* m_pScrollWindow;
- ScrollBar* m_pVScroll;
+ VclPtr<HeaderBar> m_pHeaderHB;
+ VclPtr<VclHBox> m_pBody;
+ VclPtr<ColorConfigWindow_Impl> m_pScrollWindow;
+ VclPtr<ScrollBar> m_pVScroll;
EditableColorConfig* pColorConfig;
EditableExtendedColorConfig* pExtColorConfig;
@@ -920,15 +918,10 @@ ColorConfigCtrl_Impl::~ColorConfigCtrl_Impl()
void ColorConfigCtrl_Impl::dispose()
{
- delete m_pVScroll;
- m_pVScroll = NULL;
- delete m_pScrollWindow;
- m_pScrollWindow = NULL;
- delete m_pBody;
- m_pBody = NULL;
- delete m_pHeaderHB;
- m_pHeaderHB = NULL;
-
+ m_pVScroll.clear();
+ m_pScrollWindow.clear();
+ m_pBody.clear();
+ m_pHeaderHB.clear();
VclVBox::dispose();
}
@@ -1100,6 +1093,10 @@ void SvxColorOptionsTabPage::dispose()
delete pExtColorConfig;
pExtColorConfig = NULL;
}
+ m_pColorSchemeLB.clear();
+ m_pSaveSchemePB.clear();
+ m_pDeleteSchemePB.clear();
+ m_pColorConfigCT.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optcolor.hxx b/cui/source/options/optcolor.hxx
index cc886b5e2d79..f5c31bdb1ac1 100644
--- a/cui/source/options/optcolor.hxx
+++ b/cui/source/options/optcolor.hxx
@@ -31,10 +31,10 @@ class SvxColorOptionsTabPage : public SfxTabPage
{
using SfxTabPage::DeactivatePage;
- ListBox* m_pColorSchemeLB;
- PushButton* m_pSaveSchemePB;
- PushButton* m_pDeleteSchemePB;
- ColorConfigCtrl_Impl* m_pColorConfigCT;
+ VclPtr<ListBox> m_pColorSchemeLB;
+ VclPtr<PushButton> m_pSaveSchemePB;
+ VclPtr<PushButton> m_pDeleteSchemePB;
+ VclPtr<ColorConfigCtrl_Impl> m_pColorConfigCT;
bool bFillItemSetCalled;
diff --git a/cui/source/options/optctl.cxx b/cui/source/options/optctl.cxx
index caaa0471294d..40203d831f41 100644
--- a/cui/source/options/optctl.cxx
+++ b/cui/source/options/optctl.cxx
@@ -57,6 +57,22 @@ SvxCTLOptionsPage::SvxCTLOptionsPage( vcl::Window* pParent, const SfxItemSet& rS
m_pNumeralsLB->SetDropDownLineCount( m_pNumeralsLB->GetEntryCount() );
}
+SvxCTLOptionsPage::~SvxCTLOptionsPage()
+{
+ dispose();
+}
+
+void SvxCTLOptionsPage::dispose()
+{
+ m_pSequenceCheckingCB.clear();
+ m_pRestrictedCB.clear();
+ m_pTypeReplaceCB.clear();
+ m_pMovementLogicalRB.clear();
+ m_pMovementVisualRB.clear();
+ m_pNumeralsLB.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* SvxCTLOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
return new SvxCTLOptionsPage( pParent, *rAttrSet );
diff --git a/cui/source/options/optctl.hxx b/cui/source/options/optctl.hxx
index 034e04b6d70f..4c086eb90726 100644
--- a/cui/source/options/optctl.hxx
+++ b/cui/source/options/optctl.hxx
@@ -30,20 +30,22 @@ class SvxCTLOptionsPage : public SfxTabPage
{
private:
- CheckBox* m_pSequenceCheckingCB;
- CheckBox* m_pRestrictedCB;
- CheckBox* m_pTypeReplaceCB;
+ VclPtr<CheckBox> m_pSequenceCheckingCB;
+ VclPtr<CheckBox> m_pRestrictedCB;
+ VclPtr<CheckBox> m_pTypeReplaceCB;
- RadioButton* m_pMovementLogicalRB;
- RadioButton* m_pMovementVisualRB;
+ VclPtr<RadioButton> m_pMovementLogicalRB;
+ VclPtr<RadioButton> m_pMovementVisualRB;
- ListBox* m_pNumeralsLB;
+ VclPtr<ListBox> m_pNumeralsLB;
DECL_LINK( SequenceCheckingCB_Hdl, void* );
SvxCTLOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
public:
+ virtual ~SvxCTLOptionsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index fefbbd25ef39..d48e9a5fa348 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -117,6 +117,19 @@ SvxNewDictionaryDialog::SvxNewDictionaryDialog( vcl::Window* pParent,
pLanguageLB->SelectEntryPos(0);
}
+SvxNewDictionaryDialog::~SvxNewDictionaryDialog()
+{
+ dispose();
+}
+
+void SvxNewDictionaryDialog::dispose()
+{
+ pNameEdit.clear();
+ pLanguageLB.clear();
+ pExceptBtn.clear();
+ pOKBtn.clear();
+ ModalDialog::dispose();
+}
IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
@@ -331,6 +344,24 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog(
}
}
+SvxEditDictionaryDialog::~SvxEditDictionaryDialog()
+{
+ dispose();
+}
+
+void SvxEditDictionaryDialog::dispose()
+{
+ pAllDictsLB.clear();
+ pLangFT.clear();
+ pLangLB.clear();
+ pWordED.clear();
+ pReplaceFT.clear();
+ pReplaceED.clear();
+ pWordsLB.clear();
+ pNewReplacePB.clear();
+ pDeletePB.clear();
+ ModalDialog::dispose();
+}
/*
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 6a6d7116d70b..65953a886a0a 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -54,6 +54,25 @@ OfaMSFilterTabPage::OfaMSFilterTabPage(vcl::Window* pParent, const SfxItemSet& r
aEBasicCodeCB->SetClickHdl( LINK( this, OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl ) );
}
+OfaMSFilterTabPage::~OfaMSFilterTabPage()
+{
+ dispose();
+}
+
+void OfaMSFilterTabPage::dispose()
+{
+ aWBasicCodeCB.clear();
+ aWBasicWbctblCB.clear();
+ aWBasicStgCB.clear();
+ aEBasicCodeCB.clear();
+ aEBasicExectblCB.clear();
+ aEBasicStgCB.clear();
+ aPBasicCodeCB.clear();
+ aPBasicStgCB.clear();
+ SfxTabPage::dispose();
+}
+
+
IMPL_LINK_NOARG(OfaMSFilterTabPage, LoadWordBasicCheckHdl_Impl)
{
aWBasicWbctblCB->Enable( aWBasicCodeCB->IsChecked() );
@@ -166,8 +185,8 @@ void OfaMSFilterTabPage2::dispose()
{
delete pCheckButtonData;
pCheckButtonData = NULL;
- delete m_pCheckLB;
- m_pCheckLB = NULL;
+ m_pCheckLB.clear();
+ m_pCheckLBContainer.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx
index 763794fd36b9..20b01c1916f8 100644
--- a/cui/source/options/optfltr.hxx
+++ b/cui/source/options/optfltr.hxx
@@ -27,20 +27,22 @@
class OfaMSFilterTabPage : public SfxTabPage
{
- CheckBox* aWBasicCodeCB;
- CheckBox* aWBasicWbctblCB;
- CheckBox* aWBasicStgCB;
- CheckBox* aEBasicCodeCB;
- CheckBox* aEBasicExectblCB;
- CheckBox* aEBasicStgCB;
- CheckBox* aPBasicCodeCB;
- CheckBox* aPBasicStgCB;
+ VclPtr<CheckBox> aWBasicCodeCB;
+ VclPtr<CheckBox> aWBasicWbctblCB;
+ VclPtr<CheckBox> aWBasicStgCB;
+ VclPtr<CheckBox> aEBasicCodeCB;
+ VclPtr<CheckBox> aEBasicExectblCB;
+ VclPtr<CheckBox> aEBasicStgCB;
+ VclPtr<CheckBox> aPBasicCodeCB;
+ VclPtr<CheckBox> aPBasicStgCB;
OfaMSFilterTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
DECL_LINK(LoadWordBasicCheckHdl_Impl, void *);
DECL_LINK(LoadExcelBasicCheckHdl_Impl, void *);
public:
+ virtual ~OfaMSFilterTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet );
@@ -72,8 +74,8 @@ class OfaMSFilterTabPage2 : public SfxTabPage
}
};
- SvSimpleTableContainer* m_pCheckLBContainer;
- MSFltrSimpleTable* m_pCheckLB;
+ VclPtr<SvSimpleTableContainer> m_pCheckLBContainer;
+ VclPtr<MSFltrSimpleTable> m_pCheckLB;
OUString sHeader1, sHeader2;
OUString sChgToFromMath,
sChgToFromWriter,
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 3ab3ae842707..dabfc6b8fdb1 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -307,6 +307,27 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
m_pToolTipsCB->SetClickHdl( aLink );
}
+OfaMiscTabPage::~OfaMiscTabPage()
+{
+ dispose();
+}
+
+void OfaMiscTabPage::dispose()
+{
+ m_pToolTipsCB.clear();
+ m_pExtHelpCB.clear();
+ m_pFileDlgROImage.clear();
+ m_pFileDlgCB.clear();
+ m_pPrintDlgCB.clear();
+ m_pDocStatusCB.clear();
+ m_pSaveAlwaysCB.clear();
+ m_pYearFrame.clear();
+ m_pYearValueField.clear();
+ m_pToYearFT.clear();
+ m_pCollectUsageInfo.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* OfaMiscTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
return new OfaMiscTabPage( pParent, *rAttrSet );
@@ -693,6 +714,23 @@ void OfaViewTabPage::dispose()
pCanvasSettings = NULL;
delete pAppearanceCfg;
pAppearanceCfg = NULL;
+ m_pWindowSizeMF.clear();
+ m_pIconSizeLB.clear();
+ m_pIconStyleLB.clear();
+ m_pFontAntiAliasing.clear();
+ m_pAAPointLimitLabel.clear();
+ m_pAAPointLimit.clear();
+ m_pMenuIconsLB.clear();
+ m_pFontShowCB.clear();
+ m_pFontHistoryCB.clear();
+ m_pUseHardwareAccell.clear();
+ m_pUseAntiAliase.clear();
+ m_pUseOpenGL.clear();
+ m_pForceOpenGL.clear();
+ m_pMousePosLB.clear();
+ m_pMouseMiddleLB.clear();
+ m_pSelectionCB.clear();
+ m_pSelectionMF.clear();
SfxTabPage::dispose();
}
@@ -1217,6 +1255,22 @@ void OfaLanguagesTabPage::dispose()
{
delete pLangConfig;
pLangConfig = NULL;
+ m_pUserInterfaceLB.clear();
+ m_pLocaleSettingFT.clear();
+ m_pLocaleSettingLB.clear();
+ m_pDecimalSeparatorCB.clear();
+ m_pCurrencyFT.clear();
+ m_pCurrencyLB.clear();
+ m_pDatePatternsFT.clear();
+ m_pDatePatternsED.clear();
+ m_pWesternLanguageLB.clear();
+ m_pWesternLanguageFT.clear();
+ m_pAsianLanguageLB.clear();
+ m_pComplexLanguageLB.clear();
+ m_pCurrentDocCB.clear();
+ m_pAsianSupportCB.clear();
+ m_pCTLSupportCB.clear();
+ m_pIgnoreLanguageChangeCB.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 4f01834727ed..19ec2a06ef56 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -44,24 +44,24 @@ class OfaMiscTabPage : public SfxTabPage
{
using TabPage::DeactivatePage;
private:
- CheckBox* m_pToolTipsCB;
- CheckBox* m_pExtHelpCB;
+ VclPtr<CheckBox> m_pToolTipsCB;
+ VclPtr<CheckBox> m_pExtHelpCB;
- FixedImage* m_pFileDlgROImage;
- CheckBox* m_pFileDlgCB;
+ VclPtr<FixedImage> m_pFileDlgROImage;
+ VclPtr<CheckBox> m_pFileDlgCB;
- CheckBox* m_pPrintDlgCB;
+ VclPtr<CheckBox> m_pPrintDlgCB;
- CheckBox* m_pDocStatusCB;
- CheckBox* m_pSaveAlwaysCB;
+ VclPtr<CheckBox> m_pDocStatusCB;
+ VclPtr<CheckBox> m_pSaveAlwaysCB;
- VclContainer* m_pYearFrame;
- NumericField* m_pYearValueField;
- FixedText* m_pToYearFT;
+ VclPtr<VclContainer> m_pYearFrame;
+ VclPtr<NumericField> m_pYearValueField;
+ VclPtr<FixedText> m_pToYearFT;
OUString m_aStrDateInfo;
- CheckBox* m_pCollectUsageInfo;
+ VclPtr<CheckBox> m_pCollectUsageInfo;
DECL_LINK( TwoFigureHdl, NumericField* );
DECL_LINK( TwoFigureConfigHdl, NumericField* );
@@ -74,6 +74,8 @@ protected:
public:
OfaMiscTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~OfaMiscTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
@@ -87,30 +89,30 @@ class SvtTabAppearanceCfg;
class OfaViewTabPage : public SfxTabPage
{
private:
- MetricField* m_pWindowSizeMF;
- ListBox* m_pIconSizeLB;
- ListBox* m_pIconStyleLB;
+ VclPtr<MetricField> m_pWindowSizeMF;
+ VclPtr<ListBox> m_pIconSizeLB;
+ VclPtr<ListBox> m_pIconStyleLB;
- CheckBox* m_pFontAntiAliasing;
- FixedText* m_pAAPointLimitLabel;
- MetricField* m_pAAPointLimit;
+ VclPtr<CheckBox> m_pFontAntiAliasing;
+ VclPtr<FixedText> m_pAAPointLimitLabel;
+ VclPtr<MetricField> m_pAAPointLimit;
- ListBox* m_pMenuIconsLB;
+ VclPtr<ListBox> m_pMenuIconsLB;
- CheckBox* m_pFontShowCB;
- CheckBox* m_pFontHistoryCB;
+ VclPtr<CheckBox> m_pFontShowCB;
+ VclPtr<CheckBox> m_pFontHistoryCB;
- CheckBox* m_pUseHardwareAccell;
- CheckBox* m_pUseAntiAliase;
- CheckBox* m_pUseOpenGL;
- CheckBox* m_pForceOpenGL;
+ VclPtr<CheckBox> m_pUseHardwareAccell;
+ VclPtr<CheckBox> m_pUseAntiAliase;
+ VclPtr<CheckBox> m_pUseOpenGL;
+ VclPtr<CheckBox> m_pForceOpenGL;
- ListBox* m_pMousePosLB;
- ListBox* m_pMouseMiddleLB;
+ VclPtr<ListBox> m_pMousePosLB;
+ VclPtr<ListBox> m_pMouseMiddleLB;
// #i97672#
- CheckBox* m_pSelectionCB;
- MetricField* m_pSelectionMF;
+ VclPtr<CheckBox> m_pSelectionCB;
+ VclPtr<MetricField> m_pSelectionMF;
sal_uInt16 nSizeLB_InitialSelection;
sal_uInt16 nStyleLB_InitialSelection;
@@ -142,23 +144,23 @@ public:
struct LanguageConfig_Impl;
class OfaLanguagesTabPage : public SfxTabPage
{
- ListBox* m_pUserInterfaceLB;
- FixedText* m_pLocaleSettingFT;
- SvxLanguageBox* m_pLocaleSettingLB;
- CheckBox* m_pDecimalSeparatorCB;
- FixedText* m_pCurrencyFT;
- ListBox* m_pCurrencyLB;
- FixedText* m_pDatePatternsFT;
- Edit* m_pDatePatternsED;
-
- SvxLanguageBox* m_pWesternLanguageLB;
- FixedText* m_pWesternLanguageFT;
- SvxLanguageBox* m_pAsianLanguageLB;
- SvxLanguageBox* m_pComplexLanguageLB;
- CheckBox* m_pCurrentDocCB;
- CheckBox* m_pAsianSupportCB;
- CheckBox* m_pCTLSupportCB;
- CheckBox* m_pIgnoreLanguageChangeCB;
+ VclPtr<ListBox> m_pUserInterfaceLB;
+ VclPtr<FixedText> m_pLocaleSettingFT;
+ VclPtr<SvxLanguageBox> m_pLocaleSettingLB;
+ VclPtr<CheckBox> m_pDecimalSeparatorCB;
+ VclPtr<FixedText> m_pCurrencyFT;
+ VclPtr<ListBox> m_pCurrencyLB;
+ VclPtr<FixedText> m_pDatePatternsFT;
+ VclPtr<Edit> m_pDatePatternsED;
+
+ VclPtr<SvxLanguageBox> m_pWesternLanguageLB;
+ VclPtr<FixedText> m_pWesternLanguageFT;
+ VclPtr<SvxLanguageBox> m_pAsianLanguageLB;
+ VclPtr<SvxLanguageBox> m_pComplexLanguageLB;
+ VclPtr<CheckBox> m_pCurrentDocCB;
+ VclPtr<CheckBox> m_pAsianSupportCB;
+ VclPtr<CheckBox> m_pCTLSupportCB;
+ VclPtr<CheckBox> m_pIgnoreLanguageChangeCB;
bool m_bOldAsian;
bool m_bOldCtl;
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 28fde5a5fd7e..9d6afd387479 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -166,7 +166,7 @@ struct SvxGeneralTabPage::Row
// which row is it?
RowType eRow;
// row label
- FixedText* pLabel;
+ VclPtr<FixedText> pLabel;
// first and last field in the row (last is exclusive)
unsigned nFirstField, nLastField;
@@ -191,7 +191,7 @@ struct SvxGeneralTabPage::Field
// which field is this? (in vFieldInfo[] above)
unsigned iField;
// edit box
- Edit *pEdit;
+ VclPtr<Edit> pEdit;
public:
Field (Edit *pEdit_, unsigned iField_)
@@ -219,6 +219,16 @@ SvxGeneralTabPage::SvxGeneralTabPage(vcl::Window* pParent, const SfxItemSet& rCo
SetLinks();
}
+SvxGeneralTabPage::~SvxGeneralTabPage()
+{
+ dispose();
+}
+
+void SvxGeneralTabPage::dispose()
+{
+ m_pUseDataCB.clear();
+ SfxTabPage::dispose();
+}
// Initializes the titles and the edit boxes,
diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index eeae4d7d14ce..34d7fff2d462 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -84,6 +84,32 @@ SfxTabPage( pParent, "OptHtmlPage" , "cui/ui/opthtmlpage.ui", &rSet )
aCharSetLB->FillWithMimeAndSelectBest();
}
+OfaHtmlTabPage::~OfaHtmlTabPage()
+{
+ dispose();
+}
+
+void OfaHtmlTabPage::dispose()
+{
+ aSize1NF.clear();
+ aSize2NF.clear();
+ aSize3NF.clear();
+ aSize4NF.clear();
+ aSize5NF.clear();
+ aSize6NF.clear();
+ aSize7NF.clear();
+ aNumbersEnglishUSCB.clear();
+ aUnknownTagCB.clear();
+ aIgnoreFontNamesCB.clear();
+ aExportLB.clear();
+ aStarBasicCB.clear();
+ aStarBasicWarningCB.clear();
+ aPrintExtensionCB.clear();
+ aSaveGrfLocalCB.clear();
+ aCharSetLB.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* OfaHtmlTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet )
{
diff --git a/cui/source/options/opthtml.hxx b/cui/source/options/opthtml.hxx
index 2697fb50a830..0e17f48330e6 100644
--- a/cui/source/options/opthtml.hxx
+++ b/cui/source/options/opthtml.hxx
@@ -30,30 +30,32 @@
class OfaHtmlTabPage : public SfxTabPage
{
- NumericField* aSize1NF;
- NumericField* aSize2NF;
- NumericField* aSize3NF;
- NumericField* aSize4NF;
- NumericField* aSize5NF;
- NumericField* aSize6NF;
- NumericField* aSize7NF;
+ VclPtr<NumericField> aSize1NF;
+ VclPtr<NumericField> aSize2NF;
+ VclPtr<NumericField> aSize3NF;
+ VclPtr<NumericField> aSize4NF;
+ VclPtr<NumericField> aSize5NF;
+ VclPtr<NumericField> aSize6NF;
+ VclPtr<NumericField> aSize7NF;
- CheckBox* aNumbersEnglishUSCB;
- CheckBox* aUnknownTagCB;
- CheckBox* aIgnoreFontNamesCB;
+ VclPtr<CheckBox> aNumbersEnglishUSCB;
+ VclPtr<CheckBox> aUnknownTagCB;
+ VclPtr<CheckBox> aIgnoreFontNamesCB;
- ListBox* aExportLB;
- CheckBox* aStarBasicCB;
- CheckBox* aStarBasicWarningCB;
- CheckBox* aPrintExtensionCB;
- CheckBox* aSaveGrfLocalCB;
- SvxTextEncodingBox* aCharSetLB;
+ VclPtr<ListBox> aExportLB;
+ VclPtr<CheckBox> aStarBasicCB;
+ VclPtr<CheckBox> aStarBasicWarningCB;
+ VclPtr<CheckBox> aPrintExtensionCB;
+ VclPtr<CheckBox> aSaveGrfLocalCB;
+ VclPtr<SvxTextEncodingBox> aCharSetLB;
DECL_LINK(ExportHdl_Impl, ListBox*);
DECL_LINK(CheckBoxHdl_Impl, CheckBox*);
OfaHtmlTabPage(vcl::Window* pParent, const SfxItemSet& rSet);
public:
+ virtual ~OfaHtmlTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet );
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index a9063ece06d4..5dc7a284e51f 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -215,6 +215,32 @@ SvxProxyTabPage::SvxProxyTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
aArgumentList );
}
+SvxProxyTabPage::~SvxProxyTabPage()
+{
+ dispose();
+}
+
+void SvxProxyTabPage::dispose()
+{
+ m_pProxyModeLB.clear();
+ m_pHttpProxyFT.clear();
+ m_pHttpProxyED.clear();
+ m_pHttpPortFT.clear();
+ m_pHttpPortED.clear();
+ m_pHttpsProxyFT.clear();
+ m_pHttpsProxyED.clear();
+ m_pHttpsPortFT.clear();
+ m_pHttpsPortED.clear();
+ m_pFtpProxyFT.clear();
+ m_pFtpProxyED.clear();
+ m_pFtpPortFT.clear();
+ m_pFtpPortED.clear();
+ m_pNoProxyForFT.clear();
+ m_pNoProxyForED.clear();
+ m_pNoProxyDescFT.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* SvxProxyTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
return new SvxProxyTabPage(pParent, *rAttrSet);
@@ -627,12 +653,20 @@ SvxSecurityTabPage::~SvxSecurityTabPage()
void SvxSecurityTabPage::dispose()
{
- delete mpCertPathDlg;
- mpCertPathDlg = NULL;
delete mpSecOptions;
mpSecOptions = NULL;
- delete mpSecOptDlg;
- mpSecOptDlg = NULL;
+ mpCertPathDlg.clear();
+ mpSecOptDlg.clear();
+ m_pSecurityOptionsPB.clear();
+ m_pSavePasswordsCB.clear();
+ m_pShowConnectionsPB.clear();
+ m_pMasterPasswordCB.clear();
+ m_pMasterPasswordFT.clear();
+ m_pMasterPasswordPB.clear();
+ m_pMacroSecFrame.clear();
+ m_pMacroSecPB.clear();
+ m_pCertFrame.clear();
+ m_pCertPathPB.clear();
SfxTabPage::dispose();
}
@@ -983,6 +1017,13 @@ void SvxEMailTabPage::dispose()
{
delete pImpl;
pImpl = NULL;
+ m_pMailContainer.clear();
+ m_pMailerURLFI.clear();
+ m_pMailerURLED.clear();
+ m_pMailerURLPB.clear();
+ m_pSuppressHiddenContainer.clear();
+ m_pSuppressHiddenFI.clear();
+ m_pSuppressHidden.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index 6eddd54219b3..e1cccd41a09f 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -58,26 +58,26 @@ class SvxProxyTabPage : public SfxTabPage
{
private:
- ListBox* m_pProxyModeLB;
+ VclPtr<ListBox> m_pProxyModeLB;
- FixedText* m_pHttpProxyFT;
- SvxNoSpaceEdit* m_pHttpProxyED;
- FixedText* m_pHttpPortFT;
- SvxNoSpaceEdit* m_pHttpPortED;
+ VclPtr<FixedText> m_pHttpProxyFT;
+ VclPtr<SvxNoSpaceEdit> m_pHttpProxyED;
+ VclPtr<FixedText> m_pHttpPortFT;
+ VclPtr<SvxNoSpaceEdit> m_pHttpPortED;
- FixedText* m_pHttpsProxyFT;
- SvxNoSpaceEdit* m_pHttpsProxyED;
- FixedText* m_pHttpsPortFT;
- SvxNoSpaceEdit* m_pHttpsPortED;
+ VclPtr<FixedText> m_pHttpsProxyFT;
+ VclPtr<SvxNoSpaceEdit> m_pHttpsProxyED;
+ VclPtr<FixedText> m_pHttpsPortFT;
+ VclPtr<SvxNoSpaceEdit> m_pHttpsPortED;
- FixedText* m_pFtpProxyFT;
- SvxNoSpaceEdit* m_pFtpProxyED;
- FixedText* m_pFtpPortFT;
- SvxNoSpaceEdit* m_pFtpPortED;
+ VclPtr<FixedText> m_pFtpProxyFT;
+ VclPtr<SvxNoSpaceEdit> m_pFtpProxyED;
+ VclPtr<FixedText> m_pFtpPortFT;
+ VclPtr<SvxNoSpaceEdit> m_pFtpPortED;
- FixedText* m_pNoProxyForFT;
- Edit* m_pNoProxyForED;
- FixedText* m_pNoProxyDescFT;
+ VclPtr<FixedText> m_pNoProxyForFT;
+ VclPtr<Edit> m_pNoProxyForED;
+ VclPtr<FixedText> m_pNoProxyDescFT;
const OUString aProxyModePN;
const OUString aHttpProxyPN;
@@ -101,6 +101,8 @@ private:
SvxProxyTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
public:
+ virtual ~SvxProxyTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -129,28 +131,28 @@ class SvxSecurityTabPage : public SfxTabPage
using TabPage::DeactivatePage;
private:
- PushButton* m_pSecurityOptionsPB;
+ VclPtr<PushButton> m_pSecurityOptionsPB;
- CheckBox* m_pSavePasswordsCB;
- PushButton* m_pShowConnectionsPB;
+ VclPtr<CheckBox> m_pSavePasswordsCB;
+ VclPtr<PushButton> m_pShowConnectionsPB;
- CheckBox* m_pMasterPasswordCB;
- FixedText* m_pMasterPasswordFT;
- PushButton* m_pMasterPasswordPB;
+ VclPtr<CheckBox> m_pMasterPasswordCB;
+ VclPtr<FixedText> m_pMasterPasswordFT;
+ VclPtr<PushButton> m_pMasterPasswordPB;
- VclContainer* m_pMacroSecFrame;
- PushButton* m_pMacroSecPB;
+ VclPtr<VclContainer> m_pMacroSecFrame;
+ VclPtr<PushButton> m_pMacroSecPB;
- VclContainer* m_pCertFrame;
- PushButton* m_pCertPathPB;
+ VclPtr<VclContainer> m_pCertFrame;
+ VclPtr<PushButton> m_pCertPathPB;
VclContainer* m_pTSAURLsFrame;
PushButton* m_pTSAURLsPB;
SvtSecurityOptions* mpSecOptions;
- svx::SecurityOptionsDialog* mpSecOptDlg;
+ VclPtr<svx::SecurityOptionsDialog> mpSecOptDlg;
- CertPathDialog* mpCertPathDlg;
+ VclPtr<CertPathDialog> mpCertPathDlg;
OUString m_sPasswordStoringDeactivateStr;
@@ -182,13 +184,13 @@ public:
struct SvxEMailTabPage_Impl;
class SvxEMailTabPage : public SfxTabPage
{
- VclContainer* m_pMailContainer;
- FixedImage* m_pMailerURLFI;
- Edit* m_pMailerURLED;
- PushButton* m_pMailerURLPB;
- VclContainer* m_pSuppressHiddenContainer;
- FixedImage* m_pSuppressHiddenFI;
- CheckBox* m_pSuppressHidden;
+ VclPtr<VclContainer> m_pMailContainer;
+ VclPtr<FixedImage> m_pMailerURLFI;
+ VclPtr<Edit> m_pMailerURLED;
+ VclPtr<PushButton> m_pMailerURLPB;
+ VclPtr<VclContainer> m_pSuppressHiddenContainer;
+ VclPtr<FixedImage> m_pSuppressHiddenFI;
+ VclPtr<CheckBox> m_pSuppressHidden;
OUString m_sDefaultFilterName;
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 5be1b1fa39fe..98853d58b743 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -207,12 +207,7 @@ SvxJavaOptionsPage::~SvxJavaOptionsPage()
void SvxJavaOptionsPage::dispose()
{
- delete m_pJavaList;
- m_pJavaList = NULL;
- delete m_pParamDlg;
- m_pParamDlg = NULL;
- delete m_pPathDlg;
- m_pPathDlg = NULL;
+ m_pJavaList.clear();
ClearJavaInfo();
#if HAVE_FEATURE_JAVA
std::vector< JavaInfo* >::iterator pIter;
@@ -225,6 +220,17 @@ void SvxJavaOptionsPage::dispose()
jfw_unlock();
#endif
+ m_pJavaEnableCB.clear();
+ m_pJavaBox.clear();
+ m_pJavaPathText.clear();
+ m_pAddBtn.clear();
+ m_pParameterBtn.clear();
+ m_pClassPathBtn.clear();
+ m_pExpertConfigBtn.clear();
+ m_pExperimentalCB.clear();
+ m_pMacroCB.clear();
+ m_pParamDlg.clear();
+ m_pPathDlg.clear();
SfxTabPage::dispose();
}
@@ -815,6 +821,19 @@ SvxJavaParameterDlg::SvxJavaParameterDlg( vcl::Window* pParent ) :
EnableRemoveButton();
}
+SvxJavaParameterDlg::~SvxJavaParameterDlg()
+{
+ dispose();
+}
+
+void SvxJavaParameterDlg::dispose()
+{
+ m_pParameterEdit.clear();
+ m_pAssignBtn.clear();
+ m_pAssignedList.clear();
+ m_pRemoveBtn.clear();
+ ModalDialog::dispose();
+}
IMPL_LINK_NOARG(SvxJavaParameterDlg, ModifyHdl_Impl)
@@ -955,6 +974,10 @@ void SvxJavaClassPathDlg::dispose()
delete static_cast< OUString* >( m_pPathList->GetEntryData(i) );
m_pPathList = NULL;
}
+ m_pPathList.clear();
+ m_pAddArchiveBtn.clear();
+ m_pAddPathBtn.clear();
+ m_pRemoveBtn.clear();
ModalDialog::dispose();
}
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 4c422011a02f..68ed24427d85 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -51,17 +51,17 @@ class SvxJavaListBox;
class SvxJavaOptionsPage : public SfxTabPage
{
private:
- CheckBox* m_pJavaEnableCB;
- VclContainer* m_pJavaBox;
- SvxJavaListBox* m_pJavaList;
- FixedText* m_pJavaPathText;
- PushButton* m_pAddBtn;
- PushButton* m_pParameterBtn;
- PushButton* m_pClassPathBtn;
- PushButton* m_pExpertConfigBtn;
-
- SvxJavaParameterDlg* m_pParamDlg;
- SvxJavaClassPathDlg* m_pPathDlg;
+ VclPtr<CheckBox> m_pJavaEnableCB;
+ VclPtr<VclContainer> m_pJavaBox;
+ VclPtr<SvxJavaListBox> m_pJavaList;
+ VclPtr<FixedText> m_pJavaPathText;
+ VclPtr<PushButton> m_pAddBtn;
+ VclPtr<PushButton> m_pParameterBtn;
+ VclPtr<PushButton> m_pClassPathBtn;
+ VclPtr<PushButton> m_pExpertConfigBtn;
+
+ VclPtr<SvxJavaParameterDlg> m_pParamDlg;
+ VclPtr<SvxJavaClassPathDlg> m_pPathDlg;
#if HAVE_FEATURE_JAVA
JavaInfo** m_parJavaInfo;
@@ -75,8 +75,8 @@ private:
OUString m_sAddDialogText;
Idle m_aResetIdle;
- CheckBox* m_pExperimentalCB;
- CheckBox* m_pMacroCB;
+ VclPtr<CheckBox> m_pExperimentalCB;
+ VclPtr<CheckBox> m_pMacroCB;
::std::vector< JavaInfo* >
m_aAddedInfos;
@@ -121,11 +121,11 @@ public:
class SvxJavaParameterDlg : public ModalDialog
{
private:
- Edit* m_pParameterEdit;
- PushButton* m_pAssignBtn;
+ VclPtr<Edit> m_pParameterEdit;
+ VclPtr<PushButton> m_pAssignBtn;
- ListBox* m_pAssignedList;
- PushButton* m_pRemoveBtn;
+ VclPtr<ListBox> m_pAssignedList;
+ VclPtr<PushButton> m_pRemoveBtn;
DECL_LINK(ModifyHdl_Impl, void *);
DECL_LINK(AssignHdl_Impl, void *);
@@ -141,6 +141,8 @@ private:
public:
SvxJavaParameterDlg( vcl::Window* pParent );
+ virtual ~SvxJavaParameterDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
@@ -153,10 +155,10 @@ public:
class SvxJavaClassPathDlg : public ModalDialog
{
private:
- ListBox* m_pPathList;
- PushButton* m_pAddArchiveBtn;
- PushButton* m_pAddPathBtn;
- PushButton* m_pRemoveBtn;
+ VclPtr<ListBox> m_pPathList;
+ VclPtr<PushButton> m_pAddArchiveBtn;
+ VclPtr<PushButton> m_pAddPathBtn;
+ VclPtr<PushButton> m_pRemoveBtn;
OUString m_sOldPath;
diff --git a/cui/source/options/optjsearch.cxx b/cui/source/options/optjsearch.cxx
index 707717f34218..263405d1322e 100644
--- a/cui/source/options/optjsearch.cxx
+++ b/cui/source/options/optjsearch.cxx
@@ -55,6 +55,34 @@ SvxJSearchOptionsPage::SvxJSearchOptionsPage( vcl::Window* pParent, const SfxIte
nTransliterationFlags = 0x00000000;
}
+SvxJSearchOptionsPage::~SvxJSearchOptionsPage()
+{
+ dispose();
+}
+
+void SvxJSearchOptionsPage::dispose()
+{
+ m_pMatchCase.clear();
+ m_pMatchFullHalfWidth.clear();
+ m_pMatchHiraganaKatakana.clear();
+ m_pMatchContractions.clear();
+ m_pMatchMinusDashChoon.clear();
+ m_pMatchRepeatCharMarks.clear();
+ m_pMatchVariantFormKanji.clear();
+ m_pMatchOldKanaForms.clear();
+ m_pMatchDiziDuzu.clear();
+ m_pMatchBavaHafa.clear();
+ m_pMatchTsithichiDhizi.clear();
+ m_pMatchHyuiyuByuvyu.clear();
+ m_pMatchSesheZeje.clear();
+ m_pMatchIaiya.clear();
+ m_pMatchKiku.clear();
+ m_pMatchProlongedSoundMark.clear();
+ m_pIgnorePunctuation.clear();
+ m_pIgnoreWhitespace.clear();
+ m_pIgnoreMiddleDot.clear();
+ SfxTabPage::dispose();
+}
SfxTabPage* SvxJSearchOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
diff --git a/cui/source/options/optjsearch.hxx b/cui/source/options/optjsearch.hxx
index 35639dfbff58..70d03acb2b2f 100644
--- a/cui/source/options/optjsearch.hxx
+++ b/cui/source/options/optjsearch.hxx
@@ -32,26 +32,26 @@ class SfxItemSet;
class SvxJSearchOptionsPage : public SfxTabPage
{
private:
- CheckBox* m_pMatchCase;
- CheckBox* m_pMatchFullHalfWidth;
- CheckBox* m_pMatchHiraganaKatakana;
- CheckBox* m_pMatchContractions;
- CheckBox* m_pMatchMinusDashChoon;
- CheckBox* m_pMatchRepeatCharMarks;
- CheckBox* m_pMatchVariantFormKanji;
- CheckBox* m_pMatchOldKanaForms;
- CheckBox* m_pMatchDiziDuzu;
- CheckBox* m_pMatchBavaHafa;
- CheckBox* m_pMatchTsithichiDhizi;
- CheckBox* m_pMatchHyuiyuByuvyu;
- CheckBox* m_pMatchSesheZeje;
- CheckBox* m_pMatchIaiya;
- CheckBox* m_pMatchKiku;
- CheckBox* m_pMatchProlongedSoundMark;
-
- CheckBox* m_pIgnorePunctuation;
- CheckBox* m_pIgnoreWhitespace;
- CheckBox* m_pIgnoreMiddleDot;
+ VclPtr<CheckBox> m_pMatchCase;
+ VclPtr<CheckBox> m_pMatchFullHalfWidth;
+ VclPtr<CheckBox> m_pMatchHiraganaKatakana;
+ VclPtr<CheckBox> m_pMatchContractions;
+ VclPtr<CheckBox> m_pMatchMinusDashChoon;
+ VclPtr<CheckBox> m_pMatchRepeatCharMarks;
+ VclPtr<CheckBox> m_pMatchVariantFormKanji;
+ VclPtr<CheckBox> m_pMatchOldKanaForms;
+ VclPtr<CheckBox> m_pMatchDiziDuzu;
+ VclPtr<CheckBox> m_pMatchBavaHafa;
+ VclPtr<CheckBox> m_pMatchTsithichiDhizi;
+ VclPtr<CheckBox> m_pMatchHyuiyuByuvyu;
+ VclPtr<CheckBox> m_pMatchSesheZeje;
+ VclPtr<CheckBox> m_pMatchIaiya;
+ VclPtr<CheckBox> m_pMatchKiku;
+ VclPtr<CheckBox> m_pMatchProlongedSoundMark;
+
+ VclPtr<CheckBox> m_pIgnorePunctuation;
+ VclPtr<CheckBox> m_pIgnoreWhitespace;
+ VclPtr<CheckBox> m_pIgnoreMiddleDot;
sal_Int32 nTransliterationFlags;
bool bSaveOptions;
@@ -62,6 +62,8 @@ protected:
SvxJSearchOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
public:
+ virtual ~SvxJSearchOptionsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 8e7929e0334f..9c357e682d8d 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -329,10 +329,10 @@ static inline OUString lcl_GetPropertyName( EID_OPTIONS eEntryId )
class OptionsBreakSet : public ModalDialog
{
- VclFrame* m_pBeforeFrame;
- VclFrame* m_pAfterFrame;
- VclFrame* m_pMinimalFrame;
- NumericField* m_pBreakNF;
+ VclPtr<VclFrame> m_pBeforeFrame;
+ VclPtr<VclFrame> m_pAfterFrame;
+ VclPtr<VclFrame> m_pMinimalFrame;
+ VclPtr<NumericField> m_pBreakNF;
public:
OptionsBreakSet(vcl::Window* pParent, sal_uInt16 nRID)
@@ -364,6 +364,15 @@ public:
get(m_pBreakNF, "wordlength");
}
}
+ virtual ~OptionsBreakSet() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ m_pBeforeFrame.clear();
+ m_pAfterFrame.clear();
+ m_pMinimalFrame.clear();
+ m_pBreakNF.clear();
+ ModalDialog::dispose();
+ }
NumericField& GetNumericFld()
{
@@ -1129,6 +1138,17 @@ void SvxLinguTabPage::dispose()
{
delete pLinguData;
pLinguData = NULL;
+ m_pLinguModulesFT.clear();
+ m_pLinguModulesCLB.clear();
+ m_pLinguModulesEditPB.clear();
+ m_pLinguDicsFT.clear();
+ m_pLinguDicsCLB.clear();
+ m_pLinguDicsNewPB.clear();
+ m_pLinguDicsEditPB.clear();
+ m_pLinguDicsDelPB.clear();
+ m_pLinguOptionsCLB.clear();
+ m_pLinguOptionsEditPB.clear();
+ m_pMoreDictsLink.clear();
SfxTabPage::dispose();
}
@@ -1905,6 +1925,13 @@ void SvxEditModulesDlg::dispose()
{
delete pDefaultLinguData;
pDefaultLinguData = NULL;
+ m_pLanguageLB.clear();
+ m_pModulesCLB.clear();
+ m_pPrioUpPB.clear();
+ m_pPrioDownPB.clear();
+ m_pBackPB.clear();
+ m_pMoreDictsLink.clear();
+ m_pClosePB.clear();
ModalDialog::dispose();
}
diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx
index 3f509a431084..79a86d9d6f69 100644
--- a/cui/source/options/optmemory.cxx
+++ b/cui/source/options/optmemory.cxx
@@ -141,6 +141,23 @@ OfaMemoryOptionsPage::OfaMemoryOptionsPage(vcl::Window* pParent, const SfxItemSe
m_pNfGraphicCache->SetModifyHdl( LINK( this, OfaMemoryOptionsPage, GraphicCacheConfigHdl ) );
}
+OfaMemoryOptionsPage::~OfaMemoryOptionsPage()
+{
+ dispose();
+}
+
+void OfaMemoryOptionsPage::dispose()
+{
+ m_pUndoEdit.clear();
+ m_pNfGraphicCache.clear();
+ m_pNfGraphicObjectCache.clear();
+ m_pTfGraphicObjectTime.clear();
+ m_pNfOLECache.clear();
+ m_pQuickStarterFrame.clear();
+ m_pQuickLaunchCB.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* OfaMemoryOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
return new OfaMemoryOptionsPage( pParent, *rAttrSet );
diff --git a/cui/source/options/optmemory.hxx b/cui/source/options/optmemory.hxx
index c3d189f37bdc..91559d99da1e 100644
--- a/cui/source/options/optmemory.hxx
+++ b/cui/source/options/optmemory.hxx
@@ -32,16 +32,16 @@ class OfaMemoryOptionsPage : public SfxTabPage
{
using SfxTabPage::DeactivatePage;
private:
- NumericField* m_pUndoEdit;
+ VclPtr<NumericField> m_pUndoEdit;
- NumericField* m_pNfGraphicCache;
- NumericField* m_pNfGraphicObjectCache;
- TimeField* m_pTfGraphicObjectTime;
+ VclPtr<NumericField> m_pNfGraphicCache;
+ VclPtr<NumericField> m_pNfGraphicObjectCache;
+ VclPtr<TimeField> m_pTfGraphicObjectTime;
- NumericField* m_pNfOLECache;
+ VclPtr<NumericField> m_pNfOLECache;
- VclContainer* m_pQuickStarterFrame;
- CheckBox* m_pQuickLaunchCB;
+ VclPtr<VclContainer> m_pQuickStarterFrame;
+ VclPtr<CheckBox> m_pQuickLaunchCB;
DECL_LINK(GraphicCacheConfigHdl, void *);
@@ -57,6 +57,8 @@ protected:
public:
OfaMemoryOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~OfaMemoryOptionsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index b6faede94b5e..bd8c7846002b 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -117,6 +117,34 @@ void SvxOpenCLTabPage::dispose()
mpWhiteList.disposeAndClear()
}
+SvxOpenCLTabPage::~SvxOpenCLTabPage()
+{
+ dispose();
+}
+
+void SvxOpenCLTabPage::dispose()
+{
+ mpUseOpenCL.clear();
+ mpBlackListFrame.clear();
+ mpBlackList.clear();
+ mpBlackListTable.clear();
+ mpBlackListEdit.clear();
+ mpBlackListAdd.clear();
+ mpBlackListDelete.clear();
+ mpOS.clear();
+ mpOSVersion.clear();
+ mpDevice.clear();
+ mpVendor.clear();
+ mpDrvVersion.clear();
+ mpWhiteListFrame.clear();
+ mpWhiteList.clear();
+ mpWhiteListTable.clear();
+ mpWhiteListEdit.clear();
+ mpWhiteListAdd.clear();
+ mpWhiteListDelete.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* SvxOpenCLTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
return new SvxOpenCLTabPage(pParent, *rAttrSet);
@@ -194,16 +222,27 @@ class ListEntryDialog : public ModalDialog
public:
OpenCLConfig::ImplMatcher maEntry;
- ListBox* mpOS;
- Edit* mpOSVersion;
- Edit* mpPlatformVendor;
- Edit* mpDevice;
- Edit* mpDriverVersion;
+ VclPtr<ListBox> mpOS;
+ VclPtr<Edit> mpOSVersion;
+ VclPtr<Edit> mpPlatformVendor;
+ VclPtr<Edit> mpDevice;
+ VclPtr<Edit> mpDriverVersion;
DECL_LINK(OSSelectHdl, ListBox*);
DECL_LINK(EditModifiedHdl, Edit*);
ListEntryDialog(vcl::Window* pParent, const OpenCLConfig::ImplMatcher& rEntry, const OString& rTag);
+ virtual ~ListEntryDialog() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ mpOS.clear();
+ mpOSVersion.clear();
+ mpPlatformVendor.clear();
+ mpDevice.clear();
+ mpDriverVersion.clear();
+ ModalDialog::dispose();
+ }
+
};
ListEntryDialog::ListEntryDialog(vcl::Window* pParent, const OpenCLConfig::ImplMatcher& rEntry, const OString& rTag)
diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx
index 378dd5ab6c7b..067b038e22d7 100644
--- a/cui/source/options/optopencl.hxx
+++ b/cui/source/options/optopencl.hxx
@@ -31,26 +31,26 @@ class SvxOpenCLTabPage : public SfxTabPage
private:
OpenCLConfig maConfig;
- CheckBox* mpUseOpenCL;
-
- VclFrame* mpBlackListFrame;
- SvSimpleTable* mpBlackList;
- SvSimpleTableContainer* mpBlackListTable;
- PushButton* mpBlackListEdit;
- PushButton* mpBlackListAdd;
- PushButton* mpBlackListDelete;
- FixedText* mpOS;
- FixedText* mpOSVersion;
- FixedText* mpDevice;
- FixedText* mpVendor;
- FixedText* mpDrvVersion;
-
- VclFrame* mpWhiteListFrame;
- SvSimpleTable* mpWhiteList;
- SvSimpleTableContainer* mpWhiteListTable;
- PushButton* mpWhiteListEdit;
- PushButton* mpWhiteListAdd;
- PushButton* mpWhiteListDelete;
+ VclPtr<CheckBox> mpUseOpenCL;
+
+ VclPtr<VclFrame> mpBlackListFrame;
+ VclPtr<SvSimpleTable> mpBlackList;
+ VclPtr<SvSimpleTableContainer> mpBlackListTable;
+ VclPtr<PushButton> mpBlackListEdit;
+ VclPtr<PushButton> mpBlackListAdd;
+ VclPtr<PushButton> mpBlackListDelete;
+ VclPtr<FixedText> mpOS;
+ VclPtr<FixedText> mpOSVersion;
+ VclPtr<FixedText> mpDevice;
+ VclPtr<FixedText> mpVendor;
+ VclPtr<FixedText> mpDrvVersion;
+
+ VclPtr<VclFrame> mpWhiteListFrame;
+ VclPtr<SvSimpleTable> mpWhiteList;
+ VclPtr<SvSimpleTableContainer> mpWhiteListTable;
+ VclPtr<PushButton> mpWhiteListEdit;
+ VclPtr<PushButton> mpWhiteListAdd;
+ VclPtr<PushButton> mpWhiteListDelete;
DECL_LINK(BlackListEditHdl, void*);
DECL_LINK(BlackListAddHdl, void*);
@@ -70,6 +70,7 @@ private:
public:
SvxOpenCLTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~SvxOpenCLTabPage();
virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 94de402f231c..7d2d48c9baca 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -256,11 +256,13 @@ void SvxPathTabPage::dispose()
{
for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i )
delete static_cast<PathUserData_Impl*>(pPathBox->GetEntry(i)->GetUserData());
- delete pPathBox;
- pPathBox = NULL;
+ pPathBox.clear();
}
delete pImpl;
pImpl = NULL;
+ m_pPathCtrl.clear();
+ m_pStandardBtn.clear();
+ m_pPathBtn.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 00d3aff38e77..8da1a6cbf11f 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -206,6 +206,23 @@ void SvxSaveTabPage::dispose()
{
delete pImpl;
pImpl = NULL;
+ aLoadUserSettingsCB.clear();
+ aLoadDocPrinterCB.clear();
+ aDocInfoCB.clear();
+ aBackupCB.clear();
+ aAutoSaveCB.clear();
+ aAutoSaveEdit.clear();
+ aMinuteFT.clear();
+ aUserAutoSaveCB.clear();
+ aRelativeFsysCB.clear();
+ aRelativeInetCB.clear();
+ aODFVersionLB.clear();
+ aWarnAlienFormatCB.clear();
+ aDocTypeLB.clear();
+ aSaveAsFT.clear();
+ aSaveAsLB.clear();
+ aODFWarningFI.clear();
+ aODFWarningFT.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx
index 87bd682dddcf..0cb7526de828 100644
--- a/cui/source/options/optsave.hxx
+++ b/cui/source/options/optsave.hxx
@@ -42,25 +42,25 @@ struct SvxSaveTabPage_Impl;
class SvxSaveTabPage : public SfxTabPage
{
private:
- CheckBox* aLoadUserSettingsCB;
- CheckBox* aLoadDocPrinterCB;
-
- CheckBox* aDocInfoCB;
- CheckBox* aBackupCB;
- CheckBox* aAutoSaveCB;
- NumericField* aAutoSaveEdit;
- FixedText* aMinuteFT;
- CheckBox* aUserAutoSaveCB;
- CheckBox* aRelativeFsysCB;
- CheckBox* aRelativeInetCB;
-
- ListBox* aODFVersionLB;
- CheckBox* aWarnAlienFormatCB;
- ListBox* aDocTypeLB;
- FixedText* aSaveAsFT;
- ListBox* aSaveAsLB;
- FixedImage* aODFWarningFI;
- FixedText* aODFWarningFT;
+ VclPtr<CheckBox> aLoadUserSettingsCB;
+ VclPtr<CheckBox> aLoadDocPrinterCB;
+
+ VclPtr<CheckBox> aDocInfoCB;
+ VclPtr<CheckBox> aBackupCB;
+ VclPtr<CheckBox> aAutoSaveCB;
+ VclPtr<NumericField> aAutoSaveEdit;
+ VclPtr<FixedText> aMinuteFT;
+ VclPtr<CheckBox> aUserAutoSaveCB;
+ VclPtr<CheckBox> aRelativeFsysCB;
+ VclPtr<CheckBox> aRelativeInetCB;
+
+ VclPtr<ListBox> aODFVersionLB;
+ VclPtr<CheckBox> aWarnAlienFormatCB;
+ VclPtr<ListBox> aDocTypeLB;
+ VclPtr<FixedText> aSaveAsFT;
+ VclPtr<ListBox> aSaveAsLB;
+ VclPtr<FixedImage> aODFWarningFI;
+ VclPtr<FixedText> aODFWarningFT;
SvxSaveTabPage_Impl* pImpl;
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 0c7894c63164..30eb7188e71f 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -82,6 +82,25 @@ SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(vcl::Window* pParent, const SfxIt
UpdateLastCheckedText();
}
+SvxOnlineUpdateTabPage::~SvxOnlineUpdateTabPage()
+{
+ dispose();
+}
+
+void SvxOnlineUpdateTabPage::dispose()
+{
+ m_pAutoCheckCheckBox.clear();
+ m_pEveryDayButton.clear();
+ m_pEveryWeekButton.clear();
+ m_pEveryMonthButton.clear();
+ m_pCheckNowButton.clear();
+ m_pAutoDownloadCheckBox.clear();
+ m_pDestPathLabel.clear();
+ m_pDestPath.clear();
+ m_pChangePathButton.clear();
+ m_pLastChecked.clear();
+ SfxTabPage::dispose();
+}
void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
diff --git a/cui/source/options/optupdt.hxx b/cui/source/options/optupdt.hxx
index ce5362bd94aa..4324cafe34fe 100644
--- a/cui/source/options/optupdt.hxx
+++ b/cui/source/options/optupdt.hxx
@@ -29,16 +29,16 @@
class SvxOnlineUpdateTabPage : public SfxTabPage
{
private:
- CheckBox* m_pAutoCheckCheckBox;
- RadioButton* m_pEveryDayButton;
- RadioButton* m_pEveryWeekButton;
- RadioButton* m_pEveryMonthButton;
- PushButton* m_pCheckNowButton;
- CheckBox* m_pAutoDownloadCheckBox;
- FixedText* m_pDestPathLabel;
- FixedText* m_pDestPath;
- PushButton* m_pChangePathButton;
- FixedText* m_pLastChecked;
+ VclPtr<CheckBox> m_pAutoCheckCheckBox;
+ VclPtr<RadioButton> m_pEveryDayButton;
+ VclPtr<RadioButton> m_pEveryWeekButton;
+ VclPtr<RadioButton> m_pEveryMonthButton;
+ VclPtr<PushButton> m_pCheckNowButton;
+ VclPtr<CheckBox> m_pAutoDownloadCheckBox;
+ VclPtr<FixedText> m_pDestPathLabel;
+ VclPtr<FixedText> m_pDestPath;
+ VclPtr<PushButton> m_pChangePathButton;
+ VclPtr<FixedText> m_pLastChecked;
OUString m_aNeverChecked;
OUString m_aLastCheckedTemplate;
@@ -52,6 +52,8 @@ private:
public:
SvxOnlineUpdateTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~SvxOnlineUpdateTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 1bae7f526f79..e6d73e4dd044 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -92,6 +92,25 @@ SelectPersonaDialog::SelectPersonaDialog( vcl::Window *pParent )
}
}
+SelectPersonaDialog::~SelectPersonaDialog()
+{
+ dispose();
+}
+
+void SelectPersonaDialog::dispose()
+{
+ m_pEdit.clear();
+ m_pSearchButton.clear();
+ m_pProgressLabel.clear();
+ for (VclPtr<PushButton> vp : m_vResultList)
+ vp.clear();
+ for (VclPtr<PushButton> vp : m_vSearchSuggestions)
+ vp.clear();
+ m_pOkButton.clear();
+ m_pCancelButton.clear();
+ ModalDialog::dispose();
+}
+
OUString SelectPersonaDialog::GetSelectedPersona() const
{
if( !m_aSelectedPersona.isEmpty( ) )
@@ -291,6 +310,26 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( vcl::Window *pParent, cons
LoadExtensionThemes();
}
+SvxPersonalizationTabPage::~SvxPersonalizationTabPage()
+{
+ dispose();
+}
+
+void SvxPersonalizationTabPage::dispose()
+{
+ m_pNoPersona.clear();
+ m_pDefaultPersona.clear();
+ m_pOwnPersona.clear();
+ m_pSelectPersona.clear();
+ for (int i=0; i<3; ++i)
+ m_vDefaultPersonaImages[i].clear();
+ m_pExtensionPersonaPreview.clear();
+ m_pPersonaList.clear();
+ m_pExtensionLabel.clear();
+ SfxTabPage::dispose();
+}
+
+
SfxTabPage* SvxPersonalizationTabPage::Create( vcl::Window *pParent, const SfxItemSet *rSet )
{
return new SvxPersonalizationTabPage( pParent, *rSet );
diff --git a/cui/source/options/personalization.hxx b/cui/source/options/personalization.hxx
index 4c147ab926cf..e491d8b1853e 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -25,15 +25,15 @@ class SvxPersonalizationTabPage : public SfxTabPage
using SfxTabPage::DeactivatePage;
private:
- RadioButton *m_pNoPersona; ///< Just the default look, without any bitmap
- RadioButton *m_pDefaultPersona; ///< Use the built-in bitmap
- RadioButton *m_pOwnPersona; ///< Use the user-defined bitmap
- PushButton *m_pSelectPersona; ///< Let the user select in the 'own' case
- PushButton *m_vDefaultPersonaImages[3]; ///< Buttons to show the default persona images
- PushButton *m_pExtensionPersonaPreview; ///< Buttons to show the last 3 personas installed via extensions
- ListBox* m_pPersonaList; ///< The ListBox to show the list of installed personas
+ VclPtr<RadioButton> m_pNoPersona; ///< Just the default look, without any bitmap
+ VclPtr<RadioButton> m_pDefaultPersona; ///< Use the built-in bitmap
+ VclPtr<RadioButton> m_pOwnPersona; ///< Use the user-defined bitmap
+ VclPtr<PushButton> m_pSelectPersona; ///< Let the user select in the 'own' case
+ VclPtr<PushButton> m_vDefaultPersonaImages[3]; ///< Buttons to show the default persona images
+ VclPtr<PushButton> m_pExtensionPersonaPreview; ///< Buttons to show the last 3 personas installed via extensions
+ VclPtr<ListBox> m_pPersonaList; ///< The ListBox to show the list of installed personas
OUString m_aPersonaSettings; ///< Header and footer images + color to be set in the settings.
- FixedText *m_pExtensionLabel; ///< The "select persona installed via extensions" label
+ VclPtr<FixedText> m_pExtensionLabel; ///< The "select persona installed via extensions" label
std::vector<OUString> m_vDefaultPersonaSettings;
std::vector<OUString> m_vExtensionPersonaSettings;
@@ -41,6 +41,8 @@ private:
public:
::rtl::Reference< SearchAndParseThread > m_rApplyThread;
SvxPersonalizationTabPage( vcl::Window *pParent, const SfxItemSet &rSet );
+ virtual ~SvxPersonalizationTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window *pParent, const SfxItemSet *rSet );
@@ -77,13 +79,13 @@ https://addons.mozilla.org/firefox/themes ...
class SelectPersonaDialog : public ModalDialog
{
private:
- Edit *m_pEdit; ///< The input line for the search term
- PushButton *m_pSearchButton; ///< The search button
- FixedText *m_pProgressLabel; ///< The label for showing progress of search
- PushButton *m_vResultList[9]; ///< List of buttons to show search results
- PushButton *m_vSearchSuggestions[5]; ///< List of buttons for the search suggestions
- PushButton *m_pOkButton; ///< The OK button
- PushButton *m_pCancelButton; ///< The Cancel button
+ VclPtr<Edit> m_pEdit; ///< The input line for the search term
+ VclPtr<PushButton> m_pSearchButton; ///< The search button
+ VclPtr<FixedText> m_pProgressLabel; ///< The label for showing progress of search
+ VclPtr<PushButton> m_vResultList[9]; ///< List of buttons to show search results
+ VclPtr<PushButton> m_vSearchSuggestions[5]; ///< List of buttons for the search suggestions
+ VclPtr<PushButton> m_pOkButton; ///< The OK button
+ VclPtr<PushButton> m_pCancelButton; ///< The Cancel button
std::vector<OUString> m_vPersonaSettings;
OUString m_aSelectedPersona;
@@ -91,6 +93,8 @@ private:
public:
SelectPersonaDialog( vcl::Window *pParent );
+ virtual ~SelectPersonaDialog();
+ virtual void dispose() SAL_OVERRIDE;
::rtl::Reference< SearchAndParseThread > m_rSearchThread;
OUString GetSelectedPersona() const;
@@ -113,7 +117,7 @@ class SearchAndParseThread: public salhelper::Thread
{
private:
- SelectPersonaDialog *m_pPersonaDialog;
+ VclPtr<SelectPersonaDialog> m_pPersonaDialog;
OUString m_aURL;
bool m_bExecute;
diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx
index 64d81bc589a4..5071769e2c40 100644
--- a/cui/source/options/securityoptions.cxx
+++ b/cui/source/options/securityoptions.cxx
@@ -72,6 +72,24 @@ SecurityOptionsDialog::SecurityOptionsDialog(vcl::Window* pParent, SvtSecurityOp
*get<FixedImage>("lockblockuntrusted"));
}
+SecurityOptionsDialog::~SecurityOptionsDialog()
+{
+ dispose();
+}
+
+void SecurityOptionsDialog::dispose()
+{
+ m_pSaveOrSendDocsCB.clear();
+ m_pSignDocsCB.clear();
+ m_pPrintDocsCB.clear();
+ m_pCreatePdfCB.clear();
+ m_pRemovePersInfoCB.clear();
+ m_pRecommPasswdCB.clear();
+ m_pCtrlHyperlinkCB.clear();
+ m_pBlockUntrustedRefererLinksCB.clear();
+ ModalDialog::dispose();
+}
+
} // namespace svx
diff --git a/cui/source/options/securityoptions.hxx b/cui/source/options/securityoptions.hxx
index 4581ed7ff072..216e372e945f 100644
--- a/cui/source/options/securityoptions.hxx
+++ b/cui/source/options/securityoptions.hxx
@@ -37,18 +37,20 @@ namespace svx
class SecurityOptionsDialog : public ModalDialog
{
private:
- CheckBox* m_pSaveOrSendDocsCB;
- CheckBox* m_pSignDocsCB;
- CheckBox* m_pPrintDocsCB;
- CheckBox* m_pCreatePdfCB;
+ VclPtr<CheckBox> m_pSaveOrSendDocsCB;
+ VclPtr<CheckBox> m_pSignDocsCB;
+ VclPtr<CheckBox> m_pPrintDocsCB;
+ VclPtr<CheckBox> m_pCreatePdfCB;
- CheckBox* m_pRemovePersInfoCB;
- CheckBox* m_pRecommPasswdCB;
- CheckBox* m_pCtrlHyperlinkCB;
- CheckBox* m_pBlockUntrustedRefererLinksCB;
+ VclPtr<CheckBox> m_pRemovePersInfoCB;
+ VclPtr<CheckBox> m_pRecommPasswdCB;
+ VclPtr<CheckBox> m_pCtrlHyperlinkCB;
+ VclPtr<CheckBox> m_pBlockUntrustedRefererLinksCB;
public:
SecurityOptionsDialog( vcl::Window* pParent, SvtSecurityOptions* pOptions );
+ virtual ~SecurityOptionsDialog();
+ virtual void dispose() SAL_OVERRIDE;
bool IsSaveOrSendDocsChecked() const { return m_pSaveOrSendDocsCB->IsChecked(); }
bool IsSignDocsChecked() const { return m_pSignDocsCB->IsChecked(); }
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 095b6fc3b6c8..f37c797d3f66 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -465,11 +465,11 @@ static bool lcl_isOptionHidden( sal_uInt16 _nPageId, const SvtOptionsDialogOptio
struct OptionsPageInfo
{
- SfxTabPage* m_pPage;
+ VclPtr<SfxTabPage> m_pPage;
sal_uInt16 m_nPageId;
OUString m_sPageURL;
OUString m_sEventHdl;
- ExtensionsTabPage* m_pExtPage;
+ VclPtr<ExtensionsTabPage> m_pExtPage;
OptionsPageInfo( sal_uInt16 nId ) : m_pPage( NULL ), m_nPageId( nId ), m_pExtPage( NULL ) {}
};
@@ -483,7 +483,7 @@ struct OptionsGroupInfo
sal_uInt16 m_nDialogId; // Id of the former dialog
bool m_bLoadError; // load fails?
OUString m_sPageURL;
- ExtensionsTabPage* m_pExtPage;
+ VclPtr<ExtensionsTabPage> m_pExtPage;
OptionsGroupInfo( SfxShell* pSh, SfxModule* pMod, sal_uInt16 nId ) :
m_pInItemSet( NULL ), m_pOutItemSet( NULL ), m_pShell( pSh ),
@@ -575,7 +575,6 @@ void OfaTreeOptionsDialog::dispose()
SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number( pPageInfo->m_nPageId) );
SetViewOptUserItem( aTabPageOpt, aPageData );
}
- delete pPageInfo->m_pPage;
}
if (pPageInfo->m_nPageId == RID_SFXPAGE_LINGU)
@@ -588,8 +587,6 @@ void OfaTreeOptionsDialog::dispose()
}
}
- delete pPageInfo->m_pExtPage;
-
delete pPageInfo;
}
pEntry = pTreeLB->Next(pEntry);
@@ -602,8 +599,8 @@ void OfaTreeOptionsDialog::dispose()
if(!pTreeLB->GetParent(pEntry))
{
OptionsGroupInfo* pGroupInfo = static_cast<OptionsGroupInfo*>(pEntry->GetUserData());
- if ( pGroupInfo && pGroupInfo->m_pExtPage )
- delete pGroupInfo->m_pExtPage;
+ if ( pGroupInfo )
+ pGroupInfo->m_pExtPage.clear();
delete pGroupInfo;
}
pEntry = pTreeLB->Next(pEntry);
@@ -611,7 +608,11 @@ void OfaTreeOptionsDialog::dispose()
delete pColorPageItemSet;
pColorPageItemSet = NULL;
deleteGroupNames();
- pTreeLB = NULL;
+ pOkPB.clear();
+ pBackPB.clear();
+ pTreeLB.clear();
+ pTabBox.clear();
+ mpColorPage.clear();
SfxModalDialog::dispose();
}
@@ -1048,7 +1049,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
{
pPageInfo->m_pPage = ::CreateGeneralTabPage(
pPageInfo->m_nPageId, pTabBox, *pColorPageItemSet );
- mpColorPage = static_cast<SvxColorTabPage*>(pPageInfo->m_pPage);
+ mpColorPage = static_cast<SvxColorTabPage*>(pPageInfo->m_pPage.get());
mpColorPage->SetupForViewFrame( SfxViewFrame::Current() );
}
else
diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx
index 6628b18d4fb5..16fcd75a6de6 100644
--- a/cui/source/options/webconninfo.cxx
+++ b/cui/source/options/webconninfo.cxx
@@ -147,8 +147,10 @@ WebConnectionInfoDialog::~WebConnectionInfoDialog()
void WebConnectionInfoDialog::dispose()
{
- delete m_pPasswordsLB;
- m_pPasswordsLB = NULL;
+ m_pPasswordsLB.clear();
+ m_pRemoveBtn.clear();
+ m_pRemoveAllBtn.clear();
+ m_pChangeBtn.clear();
ModalDialog::dispose();
}
diff --git a/cui/source/options/webconninfo.hxx b/cui/source/options/webconninfo.hxx
index 2cd37eb03f5e..a9d1b566d592 100644
--- a/cui/source/options/webconninfo.hxx
+++ b/cui/source/options/webconninfo.hxx
@@ -47,10 +47,10 @@ namespace svx
class WebConnectionInfoDialog : public ModalDialog
{
private:
- PasswordTable* m_pPasswordsLB;
- PushButton* m_pRemoveBtn;
- PushButton* m_pRemoveAllBtn;
- PushButton* m_pChangeBtn;
+ VclPtr<PasswordTable> m_pPasswordsLB;
+ VclPtr<PushButton> m_pRemoveBtn;
+ VclPtr<PushButton> m_pRemoveAllBtn;
+ VclPtr<PushButton> m_pChangeBtn;
sal_Int32 m_nPos;
DECL_LINK( HeaderBarClickedHdl, SvSimpleTable* );
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 7405627bf192..ada97c51da63 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -257,6 +257,30 @@ void AlignmentTabPage::dispose()
{
delete m_pOrientHlp;
m_pOrientHlp = NULL;
+ m_pLbHorAlign.clear();
+ m_pFtIndent.clear();
+ m_pEdIndent.clear();
+ m_pFtVerAlign.clear();
+ m_pLbVerAlign.clear();
+ m_pCtrlDial.clear();
+ m_pFtRotate.clear();
+ m_pNfRotate.clear();
+ m_pFtRefEdge.clear();
+ m_pVsRefEdge.clear();
+ m_pCbStacked.clear();
+ m_pCbAsianMode.clear();
+ m_pBoxDirection.clear();
+ m_pBtnWrap.clear();
+ m_pBtnHyphen.clear();
+ m_pBtnShrink.clear();
+ m_pLbFrameDir.clear();
+ m_pFtBotLock.clear();
+ m_pFtTopLock.clear();
+ m_pFtCelLock.clear();
+ m_pFtABCD.clear();
+ m_pAlignmentFrame.clear();
+ m_pOrientFrame.clear();
+ m_pPropertiesFrame.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 9ad3cfca5369..346fc8b342e9 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -137,6 +137,18 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(vcl::Window* pParent, const SfxItemSet* _pSet )
SetCurPageId("smarttags");
}
+OfaAutoCorrDlg::~OfaAutoCorrDlg()
+{
+ dispose();
+}
+
+void OfaAutoCorrDlg::dispose()
+{
+ m_pLanguageBox.clear();
+ m_pLanguageLB.clear();
+ SfxTabDialog::dispose();
+}
+
void OfaAutoCorrDlg::EnableLanguage(bool bEnable)
{
m_pLanguageBox->Enable(bEnable);
@@ -192,6 +204,17 @@ OfaAutocorrOptionsPage::OfaAutocorrOptionsPage(vcl::Window* pParent, const SfxIt
get(m_pCheckLB, "checklist");
}
+OfaAutocorrOptionsPage::~OfaAutocorrOptionsPage()
+{
+ dispose();
+}
+
+void OfaAutocorrOptionsPage::dispose()
+{
+ m_pCheckLB.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* OfaAutocorrOptionsPage::Create( vcl::Window* pParent,
const SfxItemSet* rSet)
{
@@ -282,13 +305,16 @@ struct ImpUserData
class OfaAutoFmtPrcntSet : public ModalDialog
{
- MetricField* m_pPrcntMF;
+ VclPtr<MetricField> m_pPrcntMF;
public:
OfaAutoFmtPrcntSet(vcl::Window* pParent)
: ModalDialog(pParent, "PercentDialog","cui/ui/percentdialog.ui")
{
get(m_pPrcntMF, "margin");
}
+ virtual ~OfaAutoFmtPrcntSet() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE { m_pPrcntMF.clear(); ModalDialog::dispose(); }
+
MetricField& GetPrcntFld()
{
return *m_pPrcntMF;
@@ -481,9 +507,9 @@ void OfaSwAutoFmtOptionsPage::dispose()
delete static_cast<ImpUserData*>(m_pCheckLB->GetUserData( MERGE_SINGLE_LINE_PARA ));
delete pCheckButtonData;
pCheckButtonData = NULL;
- delete m_pCheckLB;
- m_pCheckLB = NULL;
}
+ m_pCheckLB.clear();
+ m_pEditPB.clear();
SfxTabPage::dispose();
}
@@ -920,6 +946,13 @@ void OfaAutocorrReplacePage::dispose()
pCompareClass = NULL;
delete pCharClass;
pCharClass = NULL;
+
+ m_pTextOnlyCB.clear();
+ m_pShortED.clear();
+ m_pReplaceED.clear();
+ m_pReplaceTLB.clear();
+ m_pNewReplacePB.clear();
+ m_pDeleteReplacePB.clear();
SfxTabPage::dispose();
}
@@ -1426,6 +1459,16 @@ void OfaAutocorrExceptPage::dispose()
{
aStringsTable.clear();
delete pCompareClass;
+ m_pAbbrevED.clear();
+ m_pAbbrevLB.clear();
+ m_pNewAbbrevPB.clear();
+ m_pDelAbbrevPB.clear();
+ m_pAutoAbbrevCB.clear();
+ m_pDoubleCapsED.clear();
+ m_pDoubleCapsLB.clear();
+ m_pNewDoublePB.clear();
+ m_pDelDoublePB.clear();
+ m_pAutoCapsCB.clear();
SfxTabPage::dispose();
}
@@ -1643,7 +1686,7 @@ void OfaAutocorrExceptPage::Reset( const SfxItemSet* )
IMPL_LINK(OfaAutocorrExceptPage, NewDelHdl, void*, pBtn)
{
- if((pBtn == m_pNewAbbrevPB || pBtn == m_pAbbrevED )
+ if((pBtn == m_pNewAbbrevPB || pBtn == (PushButton*)m_pAbbrevED.get() )
&& !m_pAbbrevED->GetText().isEmpty())
{
m_pAbbrevLB->InsertEntry(m_pAbbrevED->GetText());
@@ -1654,7 +1697,7 @@ IMPL_LINK(OfaAutocorrExceptPage, NewDelHdl, void*, pBtn)
m_pAbbrevLB->RemoveEntry(m_pAbbrevED->GetText());
ModifyHdl(m_pAbbrevED);
}
- else if((pBtn == m_pNewDoublePB || pBtn == m_pDoubleCapsED )
+ else if((pBtn == m_pNewDoublePB || pBtn == (PushButton*)m_pDoubleCapsED.get() )
&& !m_pDoubleCapsED->GetText().isEmpty())
{
m_pDoubleCapsLB->InsertEntry(m_pDoubleCapsED->GetText());
@@ -1849,8 +1892,20 @@ void OfaQuoteTabPage::dispose()
{
delete pCheckButtonData;
pCheckButtonData = NULL;
- delete m_pSwCheckLB;
- m_pSwCheckLB = NULL;
+ m_pSwCheckLB.clear();
+ m_pCheckLB.clear();
+ m_pSingleTypoCB.clear();
+ m_pSglStartQuotePB.clear();
+ m_pSglStartExFT.clear();
+ m_pSglEndQuotePB.clear();
+ m_pSglEndExFT.clear();
+ m_pSglStandardPB.clear();
+ m_pDoubleTypoCB.clear();
+ m_pDblStartQuotePB.clear();
+ m_pDblStartExFT.clear();
+ m_pDblEndQuotePB.clear();
+ m_pDblEndExFT.clear();
+ m_pDblStandardPB.clear();
SfxTabPage::dispose();
}
@@ -2174,6 +2229,26 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage(vcl::Window* pParent,
m_pCBCollect->SetToggleHdl(LINK(this, OfaAutoCompleteTabPage, CheckHdl));
}
+OfaAutoCompleteTabPage::~OfaAutoCompleteTabPage()
+{
+ dispose();
+}
+
+void OfaAutoCompleteTabPage::dispose()
+{
+ m_pCBActiv.clear();
+ m_pCBAppendSpace.clear();
+ m_pCBAsTip.clear();
+ m_pCBCollect.clear();
+ m_pCBRemoveList.clear();
+ m_pDCBExpandKey.clear();
+ m_pNFMinWordlen.clear();
+ m_pNFMaxEntries.clear();
+ m_pLBEntries.clear();
+ m_pPBEntries.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* OfaAutoCompleteTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rSet)
{
@@ -2347,6 +2422,17 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const
}
}
+OfaAutoCompleteTabPage::AutoCompleteMultiListBox::~AutoCompleteMultiListBox()
+{
+ dispose();
+}
+
+void OfaAutoCompleteTabPage::AutoCompleteMultiListBox::dispose()
+{
+ m_pPage.clear();
+ MultiListBox::dispose();
+}
+
bool OfaAutoCompleteTabPage::AutoCompleteMultiListBox::PreNotify(
NotifyEvent& rNEvt )
{
@@ -2408,6 +2494,19 @@ OfaSmartTagOptionsTabPage::OfaSmartTagOptionsTabPage( vcl::Window* pParent,
m_pSmartTagTypesLB->SetSelectHdl(LINK(this, OfaSmartTagOptionsTabPage, SelectHdl));
}
+OfaSmartTagOptionsTabPage::~OfaSmartTagOptionsTabPage()
+{
+ dispose();
+}
+
+void OfaSmartTagOptionsTabPage::dispose()
+{
+ m_pMainCB.clear();
+ m_pSmartTagTypesLB.clear();
+ m_pPropertiesPB.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* OfaSmartTagOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
{
return new OfaSmartTagOptionsTabPage( pParent, *rSet );
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 15c78264e57b..0771bcd816f3 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -460,6 +460,33 @@ void SvxBackgroundTabPage::dispose()
delete pParaBck_Impl;
pParaBck_Impl = NULL;
}
+
+ m_pAsGrid.clear();
+ m_pSelectTxt.clear();
+ m_pLbSelect.clear();
+ m_pTblDesc.clear();
+ m_pTblLBox.clear();
+ m_pParaLBox.clear();
+ m_pBackGroundColorFrame.clear();
+ m_pBackgroundColorSet.clear();
+ m_pPreviewWin1.clear();
+ m_pColTransFT.clear();
+ m_pColTransMF.clear();
+ m_pBtnPreview.clear();
+ m_pBitmapContainer.clear();
+ m_pFileFrame.clear();
+ m_pBtnBrowse.clear();
+ m_pBtnLink.clear();
+ m_pFtUnlinked.clear();
+ m_pFtFile.clear();
+ m_pTypeFrame.clear();
+ m_pBtnPosition.clear();
+ m_pBtnArea.clear();
+ m_pBtnTile.clear();
+ m_pWndPosition.clear();
+ m_pGraphTransFrame.clear();
+ m_pGraphTransMF.clear();
+ m_pPreviewWin2.clear();
SvxTabPage::dispose();
}
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 9159dc6e977a..40788336ab58 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -334,6 +334,40 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, const SfxItemSet& rCore
m_pMergeAdjacentBordersCB->Hide();
}
+SvxBorderTabPage::~SvxBorderTabPage()
+{
+ dispose();
+}
+
+void SvxBorderTabPage::dispose()
+{
+ m_pWndPresets.clear();
+ m_pUserDefFT.clear();
+ m_pFrameSel.clear();
+ m_pLbLineStyle.clear();
+ m_pLbLineColor.clear();
+ m_pLineWidthMF.clear();
+ m_pSpacingFrame.clear();
+ m_pLeftFT.clear();
+ m_pLeftMF.clear();
+ m_pRightFT.clear();
+ m_pRightMF.clear();
+ m_pTopFT.clear();
+ m_pTopMF.clear();
+ m_pBottomFT.clear();
+ m_pBottomMF.clear();
+ m_pSynchronizeCB.clear();
+ m_pShadowFrame.clear();
+ m_pWndShadows.clear();
+ m_pFtShadowSize.clear();
+ m_pEdShadowSize.clear();
+ m_pFtShadowColor.clear();
+ m_pLbShadowColor.clear();
+ m_pPropertiesFrame.clear();
+ m_pMergeWithNextCB.clear();
+ m_pMergeAdjacentBordersCB.clear();
+ SfxTabPage::dispose();
+}
SfxTabPage* SvxBorderTabPage::Create( vcl::Window* pParent,
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index f4c10541ef8f..37c96344822f 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -183,6 +183,16 @@ SvxCharBasePage::SvxCharBasePage(vcl::Window* pParent, const OString& rID, const
{
}
+SvxCharBasePage::~SvxCharBasePage()
+{
+ dispose();
+}
+
+void SvxCharBasePage::dispose()
+{
+ m_pPreviewWin.clear();
+ SfxTabPage::dispose();
+}
void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet )
@@ -376,6 +386,36 @@ void SvxCharNamePage::dispose()
{
delete m_pImpl;
m_pImpl = NULL;
+ m_pWestFrame.clear();
+ m_pWestFontNameFT.clear();
+ m_pWestFontNameLB.clear();
+ m_pWestFontStyleFT.clear();
+ m_pWestFontStyleLB.clear();
+ m_pWestFontSizeFT.clear();
+ m_pWestFontSizeLB.clear();
+ m_pWestFontLanguageFT.clear();
+ m_pWestFontLanguageLB.clear();
+ m_pWestFontTypeFT.clear();
+ m_pEastFrame.clear();
+ m_pEastFontNameFT.clear();
+ m_pEastFontNameLB.clear();
+ m_pEastFontStyleFT.clear();
+ m_pEastFontStyleLB.clear();
+ m_pEastFontSizeFT.clear();
+ m_pEastFontSizeLB.clear();
+ m_pEastFontLanguageFT.clear();
+ m_pEastFontLanguageLB.clear();
+ m_pEastFontTypeFT.clear();
+ m_pCTLFrame.clear();
+ m_pCTLFontNameFT.clear();
+ m_pCTLFontNameLB.clear();
+ m_pCTLFontStyleFT.clear();
+ m_pCTLFontStyleLB.clear();
+ m_pCTLFontSizeFT.clear();
+ m_pCTLFontSizeLB.clear();
+ m_pCTLFontLanguageFT.clear();
+ m_pCTLFontLanguageLB.clear();
+ m_pCTLFontTypeFT.clear();
SvxCharBasePage::dispose();
}
@@ -1336,6 +1376,37 @@ SvxCharEffectsPage::SvxCharEffectsPage( vcl::Window* pParent, const SfxItemSet&
Initialize();
}
+SvxCharEffectsPage::~SvxCharEffectsPage()
+{
+ dispose();
+}
+
+void SvxCharEffectsPage::dispose()
+{
+ m_pFontColorFT.clear();
+ m_pFontColorLB.clear();
+ m_pEffectsFT.clear();
+ m_pEffectsLB.clear();
+ m_pReliefFT.clear();
+ m_pReliefLB.clear();
+ m_pOutlineBtn.clear();
+ m_pShadowBtn.clear();
+ m_pBlinkingBtn.clear();
+ m_pHiddenBtn.clear();
+ m_pOverlineLB.clear();
+ m_pOverlineColorFT.clear();
+ m_pOverlineColorLB.clear();
+ m_pStrikeoutLB.clear();
+ m_pUnderlineLB.clear();
+ m_pUnderlineColorFT.clear();
+ m_pUnderlineColorLB.clear();
+ m_pIndividualWordsBtn.clear();
+ m_pEmphasisFT.clear();
+ m_pEmphasisLB.clear();
+ m_pPositionFT.clear();
+ m_pPositionLB.clear();
+ SvxCharBasePage::dispose();
+}
void SvxCharEffectsPage::Initialize()
@@ -1636,7 +1707,7 @@ IMPL_LINK( SvxCharEffectsPage, SelectHdl_Impl, ListBox*, pBox )
m_pOutlineBtn->Enable( bEnable );
m_pShadowBtn->Enable( bEnable );
}
- else if ( m_pPositionLB != pBox )
+ else if ( m_pPositionLB.get() != pBox )
{
sal_Int32 nUPos = m_pUnderlineLB->GetSelectEntryPos(),
nOPos = m_pOverlineLB->GetSelectEntryPos(),
@@ -2578,6 +2649,35 @@ SvxCharPositionPage::SvxCharPositionPage( vcl::Window* pParent, const SfxItemSet
Initialize();
}
+SvxCharPositionPage::~SvxCharPositionPage()
+{
+ dispose();
+}
+
+void SvxCharPositionPage::dispose()
+{
+ m_pHighPosBtn.clear();
+ m_pNormalPosBtn.clear();
+ m_pLowPosBtn.clear();
+ m_pHighLowFT.clear();
+ m_pHighLowMF.clear();
+ m_pHighLowRB.clear();
+ m_pFontSizeFT.clear();
+ m_pFontSizeMF.clear();
+ m_pRotationContainer.clear();
+ m_pScalingFT.clear();
+ m_pScalingAndRotationFT.clear();
+ m_p0degRB.clear();
+ m_p90degRB.clear();
+ m_p270degRB.clear();
+ m_pFitToLineCB.clear();
+ m_pScaleWidthMF.clear();
+ m_pKerningLB.clear();
+ m_pKerningFT.clear();
+ m_pKerningMF.clear();
+ m_pPairKerningBtn.clear();
+ SvxCharBasePage::dispose();
+}
void SvxCharPositionPage::Initialize()
@@ -3308,6 +3408,20 @@ SvxCharTwoLinesPage::SvxCharTwoLinesPage(vcl::Window* pParent, const SfxItemSet&
Initialize();
}
+SvxCharTwoLinesPage::~SvxCharTwoLinesPage()
+{
+ dispose();
+}
+
+void SvxCharTwoLinesPage::dispose()
+{
+ m_pTwoLinesBtn.clear();
+ m_pEnclosingFrame.clear();
+ m_pStartBracketLB.clear();
+ m_pEndBracketLB.clear();
+ SvxCharBasePage::dispose();
+}
+
void SvxCharTwoLinesPage::Initialize()
{
m_pTwoLinesBtn->Check( false );
diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index a17148abd912..de8cce55975f 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -131,6 +131,28 @@ SvxConnectionPage::SvxConnectionPage( vcl::Window* pWindow, const SfxItemSet& rI
m_pLbType->SetSelectHdl( aLink );
}
+SvxConnectionPage::~SvxConnectionPage()
+{
+ dispose();
+}
+
+void SvxConnectionPage::dispose()
+{
+ m_pLbType.clear();
+ m_pFtLine1.clear();
+ m_pMtrFldLine1.clear();
+ m_pFtLine2.clear();
+ m_pMtrFldLine2.clear();
+ m_pFtLine3.clear();
+ m_pMtrFldLine3.clear();
+ m_pMtrFldHorz1.clear();
+ m_pMtrFldVert1.clear();
+ m_pMtrFldHorz2.clear();
+ m_pMtrFldVert2.clear();
+ m_pCtlPreview.clear();
+ SfxTabPage::dispose();
+}
+
/*************************************************************************
|*
|* reads passed Item-Set
diff --git a/cui/source/tabpages/dstribut.cxx b/cui/source/tabpages/dstribut.cxx
index 86d23299112b..c82c33f0fab7 100644
--- a/cui/source/tabpages/dstribut.cxx
+++ b/cui/source/tabpages/dstribut.cxx
@@ -41,6 +41,17 @@ SvxDistributeDialog::SvxDistributeDialog(vcl::Window* pParent,
SetTabPage(mpPage);
}
+SvxDistributeDialog::~SvxDistributeDialog()
+{
+ dispose();
+}
+
+void SvxDistributeDialog::dispose()
+{
+ mpPage.clear();
+ SfxSingleTabDialog::dispose();
+}
+
/*************************************************************************
|*
|* Tabpage
@@ -68,6 +79,27 @@ SvxDistributePage::SvxDistributePage(vcl::Window* pWindow,
get(m_pBtnVerBottom, "verbottom");
}
+SvxDistributePage::~SvxDistributePage()
+{
+ dispose();
+}
+
+void SvxDistributePage::dispose()
+{
+ m_pBtnHorNone.clear();
+ m_pBtnHorLeft.clear();
+ m_pBtnHorCenter.clear();
+ m_pBtnHorDistance.clear();
+ m_pBtnHorRight.clear();
+ m_pBtnVerNone.clear();
+ m_pBtnVerTop.clear();
+ m_pBtnVerCenter.clear();
+ m_pBtnVerDistance.clear();
+ m_pBtnVerBottom.clear();
+ SvxTabPage::dispose();
+}
+
+
/*************************************************************************
|*
|* create the tabpage
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 70c126dcf651..a1294a536cc8 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -133,6 +133,24 @@ SvxGrfCropPage::~SvxGrfCropPage()
void SvxGrfCropPage::dispose()
{
aTimer.Stop();
+ m_pCropFrame.clear();
+ m_pZoomConstRB.clear();
+ m_pSizeConstRB.clear();
+ m_pLeftMF.clear();
+ m_pRightMF.clear();
+ m_pTopMF.clear();
+ m_pBottomMF.clear();
+ m_pScaleFrame.clear();
+ m_pWidthZoomMF.clear();
+ m_pHeightZoomMF.clear();
+ m_pSizeFrame.clear();
+ m_pWidthMF.clear();
+ m_pHeightMF.clear();
+ m_pOrigSizeGrid.clear();
+ m_pOrigSizeFT.clear();
+ m_pOrigSizePB.clear();
+ m_pExampleWN.clear();
+ pLastCropField.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index 243d9dcf038d..1f9c31d46e3e 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -138,6 +138,26 @@ SvxCaptionTabPage::SvxCaptionTabPage(vcl::Window* pParent, const SfxItemSet& rIn
m_pCB_LAENGE->SetClickHdl(LINK(this,SvxCaptionTabPage,LineOptHdl_Impl));
}
+SvxCaptionTabPage::~SvxCaptionTabPage()
+{
+ dispose();
+}
+
+void SvxCaptionTabPage::dispose()
+{
+ m_pCT_CAPTTYPE.clear();
+ m_pMF_ABSTAND.clear();
+ m_pLB_ANSATZ.clear();
+ m_pFT_UM.clear();
+ m_pMF_ANSATZ.clear();
+ m_pFT_ANSATZ_REL.clear();
+ m_pLB_ANSATZ_REL.clear();
+ m_pFT_LAENGE.clear();
+ m_pMF_LAENGE.clear();
+ m_pCB_LAENGE.clear();
+ SfxTabPage::dispose();
+}
+
void SvxCaptionTabPage::Construct()
{
// set rectangle and working area
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 43330b99c046..4bc1917a8fde 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -44,16 +44,16 @@ class _SfxMacroTabPage_Impl
public:
_SfxMacroTabPage_Impl();
- OUString maStaticMacroLBLabel;
- PushButton* pAssignPB;
- PushButton* pDeletePB;
- OUString sStrEvent;
- OUString sAssignedMacro;
- MacroEventListBox* pEventLB;
- VclFrame* pGroupFrame;
- SfxConfigGroupListBox* pGroupLB;
- VclFrame* pMacroFrame;
- SfxConfigFunctionListBox* pMacroLB;
+ OUString maStaticMacroLBLabel;
+ VclPtr<PushButton> pAssignPB;
+ VclPtr<PushButton> pDeletePB;
+ OUString sStrEvent;
+ OUString sAssignedMacro;
+ VclPtr<MacroEventListBox> pEventLB;
+ VclPtr<VclFrame> pGroupFrame;
+ VclPtr<SfxConfigGroupListBox> pGroupLB;
+ VclPtr<VclFrame> pMacroFrame;
+ VclPtr<SfxConfigFunctionListBox> pMacroLB;
bool bReadOnly;
Idle maFillGroupIdle;
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index f6b906d9a352..ee178dcf9ce1 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -148,6 +148,31 @@ SvxMeasurePage::SvxMeasurePage( vcl::Window* pWindow, const SfxItemSet& rInAttrs
m_pLbUnit->SetSelectHdl( aLink );
}
+SvxMeasurePage::~SvxMeasurePage()
+{
+ dispose();
+}
+
+void SvxMeasurePage::dispose()
+{
+ m_pMtrFldLineDist.clear();
+ m_pMtrFldHelplineOverhang.clear();
+ m_pMtrFldHelplineDist.clear();
+ m_pMtrFldHelpline1Len.clear();
+ m_pMtrFldHelpline2Len.clear();
+ m_pTsbBelowRefEdge.clear();
+ m_pMtrFldDecimalPlaces.clear();
+ m_pCtlPosition.clear();
+ m_pTsbAutoPosV.clear();
+ m_pTsbAutoPosH.clear();
+ m_pTsbShowUnit.clear();
+ m_pLbUnit.clear();
+ m_pTsbParallel.clear();
+ m_pFtAutomatic.clear();
+ m_pCtlPreview.clear();
+ SvxTabPage::dispose();
+}
+
/*************************************************************************
|*
|* read the delivered Item-Set
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index cab5ff266877..9b8b85bb56f7 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -292,6 +292,30 @@ void SvxNumberFormatTabPage::dispose()
pNumFmtShell = NULL;
delete pNumItem;
pNumItem = NULL;
+ m_pFtCategory.clear();
+ m_pLbCategory.clear();
+ m_pFtFormat.clear();
+ m_pLbCurrency.clear();
+ m_pLbFormat.clear();
+ m_pFtLanguage.clear();
+ m_pLbLanguage.clear();
+ m_pCbSourceFormat.clear();
+ m_pWndPreview.clear();
+ m_pFtOptions.clear();
+ m_pFtDecimals.clear();
+ m_pEdDecimals.clear();
+ m_pBtnNegRed.clear();
+ m_pFtLeadZeroes.clear();
+ m_pEdLeadZeroes.clear();
+ m_pBtnThousand.clear();
+ m_pFormatCodeFrame.clear();
+ m_pEdFormat.clear();
+ m_pIbAdd.clear();
+ m_pIbInfo.clear();
+ m_pIbRemove.clear();
+ m_pFtComment.clear();
+ m_pEdComment.clear();
+ pLastActivWindow.clear();
SfxTabPage::dispose();
}
@@ -1653,7 +1677,7 @@ bool SvxNumberFormatTabPage::PreNotify( NotifyEvent& rNEvt )
{
if(rNEvt.GetType()==MouseNotifyEvent::LOSEFOCUS)
{
- if ( rNEvt.GetWindow() == dynamic_cast< vcl::Window* >( m_pEdComment ) && !m_pEdComment->IsVisible() )
+ if ( rNEvt.GetWindow() == dynamic_cast< vcl::Window* >( m_pEdComment.get() ) && !m_pEdComment->IsVisible() )
{
pLastActivWindow = NULL;
}
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 56d500e35164..3c0c619859e0 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -228,6 +228,7 @@ void SvxSingleNumPickTabPage::dispose()
pActNum = NULL;
delete pSaveNum;
pSaveNum = NULL;
+ m_pExamplesVS.clear();
SfxTabPage::dispose();
}
@@ -397,6 +398,7 @@ void SvxBulletPickTabPage::dispose()
pActNum = NULL;
delete pSaveNum;
pSaveNum = NULL;
+ m_pExamplesVS.clear();
SfxTabPage::dispose();
}
@@ -602,6 +604,7 @@ void SvxNumPickTabPage::dispose()
pActNum = NULL;
delete pSaveNum;
pSaveNum = NULL;
+ m_pExamplesVS.clear();
SfxTabPage::dispose();
}
@@ -851,6 +854,8 @@ void SvxBitmapPickTabPage::dispose()
pActNum = NULL;
delete pSaveNum;
pSaveNum = NULL;
+ m_pErrorText.clear();
+ m_pExamplesVS.clear();
SfxTabPage::dispose();
}
@@ -1165,12 +1170,44 @@ void SvxNumOptionsTabPage::dispose()
if (m_pBitmapMB)
{
delete m_pBitmapMB->GetPopupMenu()->GetPopupMenu(m_nGalleryId);
- m_pBitmapMB = NULL;
}
delete pActNum;
pActNum = NULL;
delete pSaveNum;
pSaveNum = NULL;
+ m_pLevelLB.clear();
+ m_pFmtLB.clear();
+ m_pSeparatorFT.clear();
+ m_pPrefixFT.clear();
+ m_pPrefixED.clear();
+ m_pSuffixFT.clear();
+ m_pSuffixED.clear();
+ m_pCharFmtFT.clear();
+ m_pCharFmtLB.clear();
+ m_pBulColorFT.clear();
+ m_pBulColLB.clear();
+ m_pBulRelSizeFT.clear();
+ m_pBulRelSizeMF.clear();
+ m_pAllLevelFT.clear();
+ m_pAllLevelNF.clear();
+ m_pStartFT.clear();
+ m_pStartED.clear();
+ m_pBulletFT.clear();
+ m_pBulletPB.clear();
+ m_pAlignFT.clear();
+ m_pAlignLB.clear();
+ m_pBitmapFT.clear();
+ m_pBitmapMB.clear();
+ m_pWidthFT.clear();
+ m_pWidthMF.clear();
+ m_pHeightFT.clear();
+ m_pHeightMF.clear();
+ m_pRatioCB.clear();
+ m_pOrientFT.clear();
+ m_pOrientLB.clear();
+ m_pAllLevelsFrame.clear();
+ m_pSameLevelCB.clear();
+ m_pPreviewWIN.clear();
SfxTabPage::dispose();
}
@@ -2736,6 +2773,28 @@ void SvxNumPositionTabPage::dispose()
pActNum = NULL;
delete pSaveNum;
pSaveNum = NULL;
+ m_pLevelLB.clear();
+ m_pDistBorderFT.clear();
+ m_pDistBorderMF.clear();
+ m_pRelativeCB.clear();
+ m_pIndentFT.clear();
+ m_pIndentMF.clear();
+ m_pDistNumFT.clear();
+ m_pDistNumMF.clear();
+ m_pAlignFT.clear();
+ m_pAlignLB.clear();
+ m_pLabelFollowedByFT.clear();
+ m_pLabelFollowedByLB.clear();
+ m_pListtabFT.clear();
+ m_pListtabMF.clear();
+ m_pAlign2FT.clear();
+ m_pAlign2LB.clear();
+ m_pAlignedAtFT.clear();
+ m_pAlignedAtMF.clear();
+ m_pIndentAtFT.clear();
+ m_pIndentAtMF.clear();
+ m_pStandardPB.clear();
+ m_pPreviewWIN.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 6c8c41eaa0bd..fb67d8b445d7 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -377,6 +377,35 @@ void SvxPageDescPage::dispose()
mpDefPrinter = NULL;
mbDelPrinter = false;
}
+ m_pPaperSizeBox.clear();
+ m_pPaperWidthEdit.clear();
+ m_pPaperHeightEdit.clear();
+ m_pOrientationFT.clear();
+ m_pPortraitBtn.clear();
+ m_pLandscapeBtn.clear();
+ m_pBspWin.clear();
+ m_pTextFlowLbl.clear();
+ m_pTextFlowBox.clear();
+ m_pPaperTrayBox.clear();
+ m_pLeftMarginLbl.clear();
+ m_pLeftMarginEdit.clear();
+ m_pRightMarginLbl.clear();
+ m_pRightMarginEdit.clear();
+ m_pTopMarginEdit.clear();
+ m_pBottomMarginEdit.clear();
+ m_pPageText.clear();
+ m_pLayoutBox.clear();
+ m_pNumberFormatBox.clear();
+ m_pTblAlignFT.clear();
+ m_pHorzBox.clear();
+ m_pVertBox.clear();
+ m_pAdaptBox.clear();
+ m_pRegisterCB.clear();
+ m_pRegisterFT.clear();
+ m_pRegisterLB.clear();
+ m_pInsideLbl.clear();
+ m_pOutsideLbl.clear();
+ m_pPrintRangeQueryText.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index d80ed2f1b1a6..d8ecedeb5220 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -654,6 +654,33 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage( vcl::Window* pParent, const Sfx
setPreviewsToSamePlace(pParent, this);
}
+SvxStdParagraphTabPage::~SvxStdParagraphTabPage()
+{
+ dispose();
+}
+
+void SvxStdParagraphTabPage::dispose()
+{
+ m_pLeftIndent.clear();
+ m_pRightLabel.clear();
+ m_pRightIndent.clear();
+ m_pFLineLabel.clear();
+ m_pFLineIndent.clear();
+ m_pAutoCB.clear();
+ m_pTopDist.clear();
+ m_pBottomDist.clear();
+ m_pContextualCB.clear();
+ m_pLineDist.clear();
+ m_pLineDistAtLabel.clear();
+ m_pLineDistAtPercentBox.clear();
+ m_pLineDistAtMetricBox.clear();
+ m_pAbsDist.clear();
+ m_pExampleWin.clear();
+ m_pRegisterFL.clear();
+ m_pRegisterCB.clear();
+ SfxTabPage::dispose();
+}
+
void SvxStdParagraphTabPage::EnableNegativeMode()
{
m_pLeftIndent->SetMin(-9999);
@@ -1012,6 +1039,31 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( vcl::Window* pParent, const SfxItemSet
setPreviewsToSamePlace(pParent, this);
}
+SvxParaAlignTabPage::~SvxParaAlignTabPage()
+{
+ dispose();
+}
+
+void SvxParaAlignTabPage::dispose()
+{
+ m_pLeft.clear();
+ m_pRight.clear();
+ m_pCenter.clear();
+ m_pJustify.clear();
+ m_pLeftBottom.clear();
+ m_pRightTop.clear();
+ m_pLastLineFT.clear();
+ m_pLastLineLB.clear();
+ m_pExpandCB.clear();
+ m_pSnapToGridCB.clear();
+ m_pExampleWin.clear();
+ m_pVertAlignFL.clear();
+ m_pVertAlignLB.clear();
+ m_pPropertiesFL.clear();
+ m_pTextDirectionLB.clear();
+ SfxTabPage::dispose();
+}
+
int SvxParaAlignTabPage::DeactivatePage( SfxItemSet* _pSet )
{
if ( _pSet )
@@ -1891,6 +1943,40 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( vcl::Window* pParent, const SfxI
}
}
+SvxExtParagraphTabPage::~SvxExtParagraphTabPage()
+{
+ dispose();
+}
+
+void SvxExtParagraphTabPage::dispose()
+{
+ m_pHyphenBox.clear();
+ m_pBeforeText.clear();
+ m_pExtHyphenBeforeBox.clear();
+ m_pAfterText.clear();
+ m_pExtHyphenAfterBox.clear();
+ m_pMaxHyphenLabel.clear();
+ m_pMaxHyphenEdit.clear();
+ m_pPageBreakBox.clear();
+ m_pBreakTypeFT.clear();
+ m_pBreakTypeLB.clear();
+ m_pBreakPositionFT.clear();
+ m_pBreakPositionLB.clear();
+ m_pApplyCollBtn.clear();
+ m_pApplyCollBox.clear();
+ m_pPagenumText.clear();
+ m_pPagenumEdit.clear();
+ m_pKeepTogetherBox.clear();
+ m_pKeepParaBox.clear();
+ m_pOrphanBox.clear();
+ m_pOrphanRowNo.clear();
+ m_pOrphanRowLabel.clear();
+ m_pWidowBox.clear();
+ m_pWidowRowNo.clear();
+ m_pWidowRowLabel.clear();
+ SfxTabPage::dispose();
+}
+
IMPL_LINK_NOARG(SvxExtParagraphTabPage, PageBreakHdl_Impl)
{
switch ( m_pPageBreakBox->GetState() )
@@ -2093,6 +2179,19 @@ SvxAsianTabPage::SvxAsianTabPage( vcl::Window* pParent, const SfxItemSet& rSet )
}
+SvxAsianTabPage::~SvxAsianTabPage()
+{
+ dispose();
+}
+
+void SvxAsianTabPage::dispose()
+{
+ m_pForbiddenRulesCB.clear();
+ m_pHangingPunctCB.clear();
+ m_pScriptSpaceCB.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* SvxAsianTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
return new SvxAsianTabPage(pParent, *rSet);
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index 305b877aad1b..d9c26b4bcbfd 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -588,6 +588,43 @@ SvxSwPosSizeTabPage::SvxSwPosSizeTabPage(vcl::Window* pParent, const SfxItemSet&
m_pPositionCB->SetClickHdl(LINK(this, SvxSwPosSizeTabPage, ProtectHdl));
}
+SvxSwPosSizeTabPage::~SvxSwPosSizeTabPage()
+{
+ dispose();
+}
+
+void SvxSwPosSizeTabPage::dispose()
+{
+ m_pWidthMF.clear();
+ m_pHeightMF.clear();
+ m_pKeepRatioCB.clear();
+ m_pToPageRB.clear();
+ m_pToParaRB.clear();
+ m_pToCharRB.clear();
+ m_pAsCharRB.clear();
+ m_pToFrameRB.clear();
+ m_pPositionCB.clear();
+ m_pSizeCB.clear();
+ m_pPosFrame.clear();
+ m_pHoriFT.clear();
+ m_pHoriLB.clear();
+ m_pHoriByFT.clear();
+ m_pHoriByMF.clear();
+ m_pHoriToFT.clear();
+ m_pHoriToLB.clear();
+ m_pHoriMirrorCB.clear();
+ m_pVertFT.clear();
+ m_pVertLB.clear();
+ m_pVertByFT.clear();
+ m_pVertByMF.clear();
+ m_pVertToFT.clear();
+ m_pVertToLB.clear();
+ m_pFollowCB.clear();
+ m_pExampleWN.clear();
+ SfxTabPage::dispose();
+}
+
+
namespace
{
struct FrmMaps
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index 6167f0db6d32..3820ea8d32e8 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -38,7 +38,7 @@
class TabWin_Impl : public vcl::Window
{
- SvxTabulatorTabPage* mpPage;
+ VclPtr<SvxTabulatorTabPage> mpPage;
private:
sal_uInt16 nTabStyle;
@@ -50,6 +50,8 @@ public:
, nTabStyle(0)
{
}
+ virtual ~TabWin_Impl() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE { mpPage.clear(); vcl::Window::dispose(); }
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
@@ -185,6 +187,37 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( vcl::Window* pParent, const SfxItemSet
aAktTab.GetDecimal() = rLocaleWrapper.getNumDecimalSep()[0];
}
+SvxTabulatorTabPage::~SvxTabulatorTabPage()
+{
+ dispose();
+}
+
+void SvxTabulatorTabPage::dispose()
+{
+ m_pTabBox.clear();
+ m_pLeftTab.clear();
+ m_pRightTab.clear();
+ m_pCenterTab.clear();
+ m_pDezTab.clear();
+ m_pLeftWin.clear();
+ m_pRightWin.clear();
+ m_pCenterWin.clear();
+ m_pDezWin.clear();
+ m_pDezCharLabel.clear();
+ m_pDezChar.clear();
+ m_pNoFillChar.clear();
+ m_pFillPoints.clear();
+ m_pFillDashLine.clear();
+ m_pFillSolidLine.clear();
+ m_pFillSpecial.clear();
+ m_pFillChar.clear();
+ m_pNewBtn.clear();
+ m_pDelAllBtn.clear();
+ m_pDelBtn.clear();
+ m_pTypeFrame.clear();
+ m_pFillFrame.clear();
+ SfxTabPage::dispose();
+}
bool SvxTabulatorTabPage::FillItemSet( SfxItemSet* rSet )
{
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index 23f9d9980a37..45d48ecdaf35 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -122,6 +122,32 @@ SvxTextAnimationPage::SvxTextAnimationPage( vcl::Window* pWindow, const SfxItemS
m_pBtnDown->SetClickHdl( aLink );
}
+SvxTextAnimationPage::~SvxTextAnimationPage()
+{
+ dispose();
+}
+
+void SvxTextAnimationPage::dispose()
+{
+ m_pLbEffect.clear();
+ m_pBoxDirection.clear();
+ m_pBtnUp.clear();
+ m_pBtnLeft.clear();
+ m_pBtnRight.clear();
+ m_pBtnDown.clear();
+ m_pFlProperties.clear();
+ m_pTsbStartInside.clear();
+ m_pTsbStopInside.clear();
+ m_pBoxCount.clear();
+ m_pTsbEndless.clear();
+ m_pNumFldCount.clear();
+ m_pTsbPixel.clear();
+ m_pMtrFldAmount.clear();
+ m_pTsbAuto.clear();
+ m_pMtrFldDelay.clear();
+ SfxTabPage::dispose();
+}
+
/*************************************************************************
|*
|* reads the passed item set
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 7805f4cfc3cf..de0eeab1be24 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -96,6 +96,30 @@ SvxTextAttrPage::SvxTextAttrPage(vcl::Window* pWindow, const SfxItemSet& rInAttr
m_pTsbFullWidth->SetClickHdl(LINK( this, SvxTextAttrPage, ClickFullWidthHdl_Impl ) );
}
+SvxTextAttrPage::~SvxTextAttrPage()
+{
+ dispose();
+}
+
+void SvxTextAttrPage::dispose()
+{
+ m_pTsbAutoGrowWidth.clear();
+ m_pTsbAutoGrowHeight.clear();
+ m_pTsbFitToSize.clear();
+ m_pTsbContour.clear();
+ m_pTsbWordWrapText.clear();
+ m_pTsbAutoGrowSize.clear();
+ m_pFlDistance.clear();
+ m_pMtrFldLeft.clear();
+ m_pMtrFldRight.clear();
+ m_pMtrFldTop.clear();
+ m_pMtrFldBottom.clear();
+ m_pFlPosition.clear();
+ m_pCtlPosition.clear();
+ m_pTsbFullWidth.clear();
+ SvxTabPage::dispose();
+}
+
/*************************************************************************
|*
|* reads the passed item set
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 5d4abf6f58a0..9f13a52d928b 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -118,6 +118,33 @@ IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransGradientHdl_Impl)
return 0L;
}
+SvxTransparenceTabPage::~SvxTransparenceTabPage()
+{
+ dispose();
+}
+
+void SvxTransparenceTabPage::dispose()
+{
+ m_pRbtTransOff.clear();
+ m_pRbtTransLinear.clear();
+ m_pRbtTransGradient.clear();
+ m_pMtrTransparent.clear();
+ m_pGridGradient.clear();
+ m_pLbTrgrGradientType.clear();
+ m_pFtTrgrCenterX.clear();
+ m_pMtrTrgrCenterX.clear();
+ m_pFtTrgrCenterY.clear();
+ m_pMtrTrgrCenterY.clear();
+ m_pFtTrgrAngle.clear();
+ m_pMtrTrgrAngle.clear();
+ m_pMtrTrgrBorder.clear();
+ m_pMtrTrgrStartValue.clear();
+ m_pMtrTrgrEndValue.clear();
+ m_pCtlBitmapPreview.clear();
+ m_pCtlXRectPreview.clear();
+ SvxTabPage::dispose();
+}
+
void SvxTransparenceTabPage::ActivateLinear(bool bActivate)
{
m_pMtrTransparent->Enable(bActivate);
@@ -768,6 +795,51 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs
m_pCtlXRectPreview->set_height_request(aSize2.Height());
}
+SvxAreaTabPage::~SvxAreaTabPage()
+{
+ dispose();
+}
+
+void SvxAreaTabPage::dispose()
+{
+ m_pTypeLB.clear();
+ m_pFillLB.clear();
+ m_pLbColor.clear();
+ m_pLbGradient.clear();
+ m_pLbHatching.clear();
+ m_pLbBitmap.clear();
+ m_pCtlBitmapPreview.clear();
+ m_pTsbStepCount.clear();
+ m_pFlStepCount.clear();
+ m_pNumFldStepCount.clear();
+ m_pFlHatchBckgrd.clear();
+ m_pCbxHatchBckgrd.clear();
+ m_pLbHatchBckgrdColor.clear();
+ m_pBxBitmap.clear();
+ m_pFlSize.clear();
+ m_pTsbOriginal.clear();
+ m_pTsbScale.clear();
+ m_pGridX_Y.clear();
+ m_pFtXSize.clear();
+ m_pMtrFldXSize.clear();
+ m_pFtYSize.clear();
+ m_pMtrFldYSize.clear();
+ m_pFlPosition.clear();
+ m_pCtlPosition.clear();
+ m_pGridOffset.clear();
+ m_pMtrFldXOffset.clear();
+ m_pMtrFldYOffset.clear();
+ m_pBxTile.clear();
+ m_pTsbTile.clear();
+ m_pTsbStretch.clear();
+ m_pFlOffset.clear();
+ m_pRbtRow.clear();
+ m_pRbtColumn.clear();
+ m_pMtrFldOffset.clear();
+ m_pCtlXRectPreview.clear();
+ m_pBtnImport.clear();
+ SvxTabPage::dispose();
+}
void SvxAreaTabPage::Construct()
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index faf565ce7549..59e1b8b03e22 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -129,6 +129,19 @@ void SvxBitmapTabPage::dispose()
{
delete m_pBitmapCtl;
m_pBitmapCtl = NULL;
+ m_pBxPixelEditor.clear();
+ m_pCtlPixel.clear();
+ m_pLbColor.clear();
+ m_pLbBackgroundColor.clear();
+ m_pLbBitmapsHidden.clear();
+ m_pLbBitmaps.clear();
+ m_pCtlPreview.clear();
+ m_pBtnAdd.clear();
+ m_pBtnModify.clear();
+ m_pBtnImport.clear();
+ m_pBtnDelete.clear();
+ m_pBtnLoad.clear();
+ m_pBtnSave.clear();
SvxTabPage::dispose();
}
@@ -974,7 +987,7 @@ void SvxBitmapTabPage::PointChanged( vcl::Window* pWindow, RECT_POINT )
vcl::Window* SvxBitmapTabPage::GetParentLabeledBy( const vcl::Window* pLabeled ) const
{
if (pLabeled == m_pLbBitmaps)
- return const_cast<FixedText*>(m_pLbBitmapsHidden);
+ return const_cast<FixedText*>(m_pLbBitmapsHidden.get());
else
return SvxTabPage::GetParentLabeledBy (pLabeled);
}
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 3d74649ae106..b9c73e424f26 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -51,8 +51,8 @@ using namespace com::sun::star;
XPropertyListRef SvxColorTabPage::GetList()
{
- SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( mpTopDlg );
- SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( mpTopDlg );
+ SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( mpTopDlg.get() );
+ SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( mpTopDlg.get() );
XColorListRef pList;
if( pArea )
@@ -162,8 +162,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickLoadHdl_Impl)
if( pList->Load() )
{
// check whether the table may be deleted:
- SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( mpTopDlg );
- SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( mpTopDlg );
+ SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( mpTopDlg.get() );
+ SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( mpTopDlg.get() );
// FIXME: want to have a generic set and get method by type ...
if( pArea )
@@ -404,6 +404,30 @@ void SvxColorTabPage::dispose()
{
delete pShadow;
pShadow = NULL;
+ mpTopDlg.clear();
+ m_pBoxEmbed.clear();
+ m_pBtnLoad.clear();
+ m_pBtnSave.clear();
+ m_pTableName.clear();
+ m_pEdtName.clear();
+ m_pLbColor.clear();
+ m_pValSetColorList.clear();
+ m_pCtlPreviewOld.clear();
+ m_pCtlPreviewNew.clear();
+ m_pLbColorModel.clear();
+ m_pRGB.clear();
+ m_pR.clear();
+ m_pG.clear();
+ m_pB.clear();
+ m_pCMYK.clear();
+ m_pC.clear();
+ m_pY.clear();
+ m_pM.clear();
+ m_pK.clear();
+ m_pBtnAdd.clear();
+ m_pBtnModify.clear();
+ m_pBtnWorkOn.clear();
+ m_pBtnDelete.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 98caa11d0905..4713c93e2097 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -139,6 +139,34 @@ SvxGradientTabPage::SvxGradientTabPage
setPreviewsToSamePlace(pParent, this);
}
+SvxGradientTabPage::~SvxGradientTabPage()
+{
+ dispose();
+}
+
+void SvxGradientTabPage::dispose()
+{
+ m_pLbGradientType.clear();
+ m_pFtCenterX.clear();
+ m_pMtrCenterX.clear();
+ m_pFtCenterY.clear();
+ m_pMtrCenterY.clear();
+ m_pFtAngle.clear();
+ m_pMtrAngle.clear();
+ m_pMtrBorder.clear();
+ m_pLbColorFrom.clear();
+ m_pMtrColorFrom.clear();
+ m_pLbColorTo.clear();
+ m_pMtrColorTo.clear();
+ m_pLbGradients.clear();
+ m_pCtlPreview.clear();
+ m_pBtnAdd.clear();
+ m_pBtnModify.clear();
+ m_pBtnDelete.clear();
+ m_pBtnLoad.clear();
+ m_pBtnSave.clear();
+ SfxTabPage::dispose();
+}
void SvxGradientTabPage::Construct()
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 782b98b66d72..2022fed19ea5 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -137,6 +137,27 @@ SvxHatchTabPage::SvxHatchTabPage
setPreviewsToSamePlace(pParent, this);
}
+SvxHatchTabPage::~SvxHatchTabPage()
+{
+ dispose();
+}
+
+void SvxHatchTabPage::dispose()
+{
+ m_pMtrDistance.clear();
+ m_pMtrAngle.clear();
+ m_pCtlAngle.clear();
+ m_pLbLineType.clear();
+ m_pLbLineColor.clear();
+ m_pLbHatchings.clear();
+ m_pCtlPreview.clear();
+ m_pBtnAdd.clear();
+ m_pBtnModify.clear();
+ m_pBtnDelete.clear();
+ m_pBtnLoad.clear();
+ m_pBtnSave.clear();
+ SvxTabPage::dispose();
+}
void SvxHatchTabPage::Construct()
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index e6fe6a96f899..8bc7abd4d22d 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -253,6 +253,35 @@ void SvxLineTabPage::dispose()
}
aGrfBrushItems.clear();
+ m_pBoxColor.clear();
+ m_pLbLineStyle.clear();
+ m_pLbColor.clear();
+ m_pBoxWidth.clear();
+ m_pMtrLineWidth.clear();
+ m_pBoxTransparency.clear();
+ m_pMtrTransparent.clear();
+ m_pFlLineEnds.clear();
+ m_pBoxArrowStyles.clear();
+ m_pLbStartStyle.clear();
+ m_pBoxStart.clear();
+ m_pMtrStartWidth.clear();
+ m_pTsbCenterStart.clear();
+ m_pBoxEnd.clear();
+ m_pLbEndStyle.clear();
+ m_pMtrEndWidth.clear();
+ m_pTsbCenterEnd.clear();
+ m_pCbxSynchronize.clear();
+ m_pCtlPreview.clear();
+ m_pFLEdgeStyle.clear();
+ m_pGridEdgeCaps.clear();
+ m_pLBEdgeStyle.clear();
+ m_pLBCapStyle.clear();
+ m_pFlSymbol.clear();
+ m_pGridIconSize.clear();
+ m_pSymbolMB.clear();
+ m_pSymbolWidthMF.clear();
+ m_pSymbolHeightMF.clear();
+ m_pSymbolRatioCB.clear();
SvxTabPage::dispose();
}
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 04b7ff0905cc..0d84db38fa2e 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -154,6 +154,31 @@ SvxLineDefTabPage::SvxLineDefTabPage
pDashList = NULL;
}
+SvxLineDefTabPage::~SvxLineDefTabPage()
+{
+ dispose();
+}
+
+void SvxLineDefTabPage::dispose()
+{
+ m_pLbLineStyles.clear();
+ m_pLbType1.clear();
+ m_pLbType2.clear();
+ m_pNumFldNumber1.clear();
+ m_pNumFldNumber2.clear();
+ m_pMtrLength1.clear();
+ m_pMtrLength2.clear();
+ m_pMtrDistance.clear();
+ m_pCbxSynchronize.clear();
+ m_pBtnAdd.clear();
+ m_pBtnModify.clear();
+ m_pBtnDelete.clear();
+ m_pBtnLoad.clear();
+ m_pBtnSave.clear();
+ m_pCtlPreview.clear();
+ SfxTabPage::dispose();
+}
+
void SvxLineDefTabPage::Construct()
{
// Line style fill; do *not* add default fields here
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 5235d1dd7325..4163b575a8f0 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -105,6 +105,24 @@ SvxLineEndDefTabPage::SvxLineEndDefTabPage
}
+SvxLineEndDefTabPage::~SvxLineEndDefTabPage()
+{
+ dispose();
+}
+
+void SvxLineEndDefTabPage::dispose()
+{
+ m_pEdtName.clear();
+ m_pLbLineEnds.clear();
+ m_pBtnAdd.clear();
+ m_pBtnModify.clear();
+ m_pBtnDelete.clear();
+ m_pBtnLoad.clear();
+ m_pBtnSave.clear();
+ m_pCtlPreview.clear();
+ SfxTabPage::dispose();
+}
+
void SvxLineEndDefTabPage::Resize()
{
rXLSet.Put(XLineStartWidthItem(m_pCtlPreview->GetOutputSize().Height() / 2 ));
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index b163ceb16d05..6b3f38eb19f9 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -165,6 +165,23 @@ SvxShadowTabPage::SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInA
m_pMtrDistance->SetModifyHdl( aLink );
}
+SvxShadowTabPage::~SvxShadowTabPage()
+{
+ dispose();
+}
+
+void SvxShadowTabPage::dispose()
+{
+ m_pTsbShowShadow.clear();
+ m_pGridShadow.clear();
+ m_pCtlPosition.clear();
+ m_pMtrDistance.clear();
+ m_pLbShadowColor.clear();
+ m_pMtrTransparent.clear();
+ m_pCtlXRectPreview.clear();
+ SvxTabPage::dispose();
+}
+
void SvxShadowTabPage::Construct()
{
m_pLbShadowColor->Fill( pColorList );
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index ce21ccf236eb..31a5bbb974c3 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -197,6 +197,23 @@ SvxAngleTabPage::SvxAngleTabPage(vcl::Window* pParent, const SfxItemSet& rInAttr
m_pCtlAngle->SetLinkedField( m_pNfAngle, 2 );
}
+SvxAngleTabPage::~SvxAngleTabPage()
+{
+ dispose();
+}
+
+void SvxAngleTabPage::dispose()
+{
+ m_pFlPosition.clear();
+ m_pMtrPosX.clear();
+ m_pMtrPosY.clear();
+ m_pCtlRect.clear();
+ m_pFlAngle.clear();
+ m_pNfAngle.clear();
+ m_pCtlAngle.clear();
+ SvxTabPage::dispose();
+}
+
void SvxAngleTabPage::Construct()
{
DBG_ASSERT(pView, "No valid view (!)");
@@ -422,6 +439,20 @@ SvxSlantTabPage::SvxSlantTabPage(vcl::Window* pParent, const SfxItemSet& rInAttr
ePoolUnit = pPool->GetMetric( SID_ATTR_TRANSFORM_POS_X );
}
+SvxSlantTabPage::~SvxSlantTabPage()
+{
+ dispose();
+}
+
+void SvxSlantTabPage::dispose()
+{
+ m_pFlRadius.clear();
+ m_pMtrRadius.clear();
+ m_pFlAngle.clear();
+ m_pMtrAngle.clear();
+ SvxTabPage::dispose();
+}
+
void SvxSlantTabPage::Construct()
{
// get the range
@@ -637,6 +668,33 @@ SvxPositionSizeTabPage::SvxPositionSizeTabPage(vcl::Window* pParent, const SfxIt
}
+SvxPositionSizeTabPage::~SvxPositionSizeTabPage()
+{
+ dispose();
+}
+
+void SvxPositionSizeTabPage::dispose()
+{
+ m_pFlPosition.clear();
+ m_pMtrPosX.clear();
+ m_pMtrPosY.clear();
+ m_pCtlPos.clear();
+ m_pFlSize.clear();
+ m_pFtWidth.clear();
+ m_pMtrWidth.clear();
+ m_pFtHeight.clear();
+ m_pMtrHeight.clear();
+ m_pCbxScale.clear();
+ m_pCtlSize.clear();
+ m_pFlProtect.clear();
+ m_pTsbPosProtect.clear();
+ m_pTsbSizeProtect.clear();
+ m_pFlAdjust.clear();
+ m_pTsbAutoGrowWidth.clear();
+ m_pTsbAutoGrowHeight.clear();
+ SvxTabPage::dispose();
+}
+
void SvxPositionSizeTabPage::Construct()
{
// get range and work area
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index 41c64799dbe5..2e822197ae2a 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -67,6 +67,17 @@ namespace dbmm
get(m_pCloseDocError, "closedocerror");
}
+ PreparationPage::~PreparationPage()
+ {
+ dispose();
+ }
+
+ void PreparationPage::dispose()
+ {
+ m_pCloseDocError.clear();
+ MacroMigrationPage::dispose();
+ }
+
void PreparationPage::showCloseDocsError( bool _bShow )
{
m_pCloseDocError->Show( _bShow );
@@ -101,6 +112,9 @@ namespace dbmm
void SaveDBDocPage::dispose()
{
delete m_pLocationController;
+ m_pSaveAsLocation.clear();
+ m_pBrowseSaveAsLocation.clear();
+ m_pStartMigration.clear();
MacroMigrationPage::dispose();
}
@@ -180,6 +194,21 @@ namespace dbmm
get(m_pMigrationDone, "done");
}
+ ProgressPage::~ProgressPage()
+ {
+ dispose();
+ }
+
+ void ProgressPage::dispose()
+ {
+ m_pObjectCount.clear();
+ m_pCurrentObject.clear();
+ m_pCurrentAction.clear();
+ m_pAllProgressText.clear();
+ m_pMigrationDone.clear();
+ MacroMigrationPage::dispose();
+ }
+
TabPage* ProgressPage::Create(::svt::RoadmapWizard& _rParentDialog)
{
return new ProgressPage(&_rParentDialog);
@@ -262,6 +291,19 @@ namespace dbmm
get(m_pFailureLabel, "failure");
}
+ ResultPage::~ResultPage()
+ {
+ dispose();
+ }
+
+ void ResultPage::dispose()
+ {
+ m_pSuccessLabel.clear();
+ m_pFailureLabel.clear();
+ m_pChanges.clear();
+ MacroMigrationPage::dispose();
+ }
+
TabPage* ResultPage::Create(::svt::RoadmapWizard& _rParentDialog)
{
return new ResultPage(&_rParentDialog);
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.hxx b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
index a093313e18bb..d7d11ca8bdab 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.hxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
@@ -57,6 +57,8 @@ namespace dbmm
{
public:
PreparationPage(vcl::Window *pParent);
+ virtual ~PreparationPage();
+ virtual void dispose() SAL_OVERRIDE;
static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
@@ -64,7 +66,7 @@ namespace dbmm
void showCloseDocsError(bool _bShow);
protected:
- FixedText* m_pCloseDocError;
+ VclPtr<FixedText> m_pCloseDocError;
};
// SaveDBDocPage
@@ -81,9 +83,9 @@ namespace dbmm
void grabLocationFocus() { m_pSaveAsLocation->GrabFocus(); }
protected:
- ::svt::OFileURLControl* m_pSaveAsLocation;
- PushButton* m_pBrowseSaveAsLocation;
- FixedText* m_pStartMigration;
+ VclPtr<::svt::OFileURLControl> m_pSaveAsLocation;
+ VclPtr<PushButton> m_pBrowseSaveAsLocation;
+ VclPtr<FixedText> m_pStartMigration;
::svx::DatabaseLocationInputController* m_pLocationController;
protected:
@@ -102,6 +104,8 @@ namespace dbmm
{
public:
ProgressPage(vcl::Window *pParent);
+ virtual ~ProgressPage();
+ virtual void dispose() SAL_OVERRIDE;
static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
@@ -119,13 +123,13 @@ namespace dbmm
virtual void setOverallProgressValue( const sal_uInt32 _nValue ) SAL_OVERRIDE;
private:
- FixedText* m_pObjectCount;
- FixedText* m_pCurrentObject;
- FixedText* m_pCurrentAction;
- RangeProgressBar m_aCurrentProgress;
- FixedText* m_pAllProgressText;
- RangeProgressBar m_aAllProgress;
- FixedText* m_pMigrationDone;
+ VclPtr<FixedText> m_pObjectCount;
+ VclPtr<FixedText> m_pCurrentObject;
+ VclPtr<FixedText> m_pCurrentAction;
+ RangeProgressBar m_aCurrentProgress;
+ VclPtr<FixedText> m_pAllProgressText;
+ RangeProgressBar m_aAllProgress;
+ VclPtr<FixedText> m_pMigrationDone;
};
// ResultPage
@@ -133,15 +137,17 @@ namespace dbmm
{
public:
ResultPage(vcl::Window *pParent);
+ virtual ~ResultPage();
+ virtual void dispose() SAL_OVERRIDE;
static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
void displayMigrationLog( const bool _bSuccessful, const OUString& _rLog );
private:
- FixedText* m_pSuccessLabel;
- FixedText* m_pFailureLabel;
- VclMultiLineEdit* m_pChanges;
+ VclPtr<FixedText> m_pSuccessLabel;
+ VclPtr<FixedText> m_pFailureLabel;
+ VclPtr<VclMultiLineEdit> m_pChanges;
};
} // namespace dbmm
diff --git a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx
index 0dde133e7f10..7b5a1a0e1282 100644
--- a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx
+++ b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx
@@ -65,7 +65,7 @@ namespace dbmm
}
private:
- ProgressBar *m_pBar;
+ VclPtr<ProgressBar> m_pBar;
sal_uInt32 m_nRange;
};
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 61a047e8809f..4e090e9c7245 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -261,7 +261,6 @@ void OAppDetailPageHelper::dispose()
m_pTablePreview.disposeAndClear();
m_aBorder.disposeAndClear();
m_aMenu.reset();
-
vcl::Window::dispose();
}
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index a65d6f613849..d68b8a31263f 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -374,6 +374,7 @@ void OTasksWindow::dispose()
m_aDescription.disposeAndClear();
m_aHelpText.disposeAndClear();
m_aFL.disposeAndClear();
+ m_pDetailView.clear();
vcl::Window::dispose();
}
@@ -572,10 +573,10 @@ void OApplicationDetailView::dispose()
{
set(NULL,NULL);
setSplitter(NULL);
- m_pControlHelper = NULL;
m_aHorzSplitter.disposeAndClear();
m_aTasks.disposeAndClear();
m_aContainer.disposeAndClear();
+ m_pControlHelper.clear();
OSplitterView::dispose();
}
diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx
index 052094d67f0d..fadf67574c38 100644
--- a/dbaccess/source/ui/app/AppDetailView.hxx
+++ b/dbaccess/source/ui/app/AppDetailView.hxx
@@ -115,7 +115,7 @@ namespace dbaui
VclPtr<FixedText> m_aDescription;
VclPtr<FixedText> m_aHelpText;
VclPtr<FixedLine> m_aFL;
- OApplicationDetailView* m_pDetailView;
+ VclPtr<OApplicationDetailView> m_pDetailView;
DECL_LINK( OnEntrySelectHdl, SvTreeListBox* );
void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
@@ -149,7 +149,7 @@ namespace dbaui
VclPtr<OTitleWindow> m_aTasks;
VclPtr<OTitleWindow> m_aContainer;
OAppBorderWindow& m_rBorderWin; // my parent
- OAppDetailPageHelper* m_pControlHelper;
+ VclPtr<OAppDetailPageHelper> m_pControlHelper;
::std::vector< TaskPaneData > m_aTaskPaneData;
MnemonicGenerator m_aExternalMnemonics;
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index eb8eebc58e02..c6686f2e6034 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -56,8 +56,8 @@ void OTitleWindow::dispose()
{
m_pChild->Hide();
boost::scoped_ptr<vcl::Window> aTemp(m_pChild);
- m_pChild = NULL;
}
+ m_pChild.clear();
m_aSpace1.disposeAndClear();
m_aSpace2.disposeAndClear();
m_aTitle.disposeAndClear();
diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx
index d7ffc569f4df..875f693107ab 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.hxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.hxx
@@ -28,7 +28,7 @@ namespace dbaui
VclPtr<FixedText> m_aSpace1;
VclPtr<FixedText> m_aSpace2;
VclPtr<FixedText> m_aTitle;
- vcl::Window* m_pChild;
+ VclPtr<vcl::Window> m_pChild;
bool m_bShift;
void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
protected:
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index 2e67c18acd89..a9382f4b1e88 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -95,15 +95,14 @@ void OAppBorderWindow::dispose()
if ( m_pPanel )
{
m_pPanel->Hide();
- boost::scoped_ptr<vcl::Window> aTemp(m_pPanel);
- m_pPanel = NULL;
}
if ( m_pDetailView )
{
m_pDetailView->Hide();
- boost::scoped_ptr<vcl::Window> aTemp(m_pDetailView);
- m_pDetailView = NULL;
}
+ m_pPanel.clear();
+ m_pDetailView.clear();
+ m_pView.clear();
vcl::Window::dispose();
}
@@ -219,12 +218,7 @@ void OApplicationView::dispose()
stopComponentListening(m_xObject);
m_xObject.clear();
}
- if (m_pWin)
- {
- m_pWin->Hide();
- boost::scoped_ptr<vcl::Window> aTemp(m_pWin);
- m_pWin = NULL;
- }
+ m_pWin.clear();
ODataView::dispose();
}
diff --git a/dbaccess/source/ui/app/AppView.hxx b/dbaccess/source/ui/app/AppView.hxx
index c480c4f91520..41f30c85b99e 100644
--- a/dbaccess/source/ui/app/AppView.hxx
+++ b/dbaccess/source/ui/app/AppView.hxx
@@ -44,9 +44,9 @@ namespace dbaui
class OTitleWindow;
class OAppBorderWindow : public vcl::Window
{
- OTitleWindow* m_pPanel;
- OApplicationDetailView* m_pDetailView;
- OApplicationView* m_pView;
+ VclPtr<OTitleWindow> m_pPanel;
+ VclPtr<OApplicationDetailView> m_pDetailView;
+ VclPtr<OApplicationView> m_pView;
void ImplInitSettings();
protected:
@@ -80,7 +80,7 @@ namespace dbaui
::com::sun::star::lang::Locale m_aLocale;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
m_xObject;
- OAppBorderWindow* m_pWin;
+ VclPtr<OAppBorderWindow> m_pWin;
IApplicationController& m_rAppController;
ChildFocusState m_eChildFocus;
diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx
index e4c05397585b..880504587747 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.cxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <tools/diagnose_ex.h>
+#include <dbaccess/dataview.hxx>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index 3e66f5cb6db3..83a436aa63e3 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -106,7 +106,7 @@ void UnoDataBrowserView::Construct(const Reference< ::com::sun::star::awt::XCont
m_pVclControl = NULL;
getVclControl();
- OSL_ENSURE(m_pVclControl != NULL, "UnoDataBrowserView::Construct : no real grid control !");
+ OSL_ENSURE(m_pVclControl != nullptr, "UnoDataBrowserView::Construct : no real grid control !");
}
catch(const Exception&)
{
@@ -122,17 +122,10 @@ UnoDataBrowserView::~UnoDataBrowserView()
void UnoDataBrowserView::dispose()
{
- {
- boost::scoped_ptr<Splitter> aTemp(m_pSplitter);
- m_pSplitter = NULL;
- }
+ m_pSplitter.clear();
setTreeView(NULL);
- if ( m_pStatus )
- {
- delete m_pStatus;
- m_pStatus = NULL;
- }
+ m_pStatus.clear();
try
{
@@ -141,6 +134,8 @@ void UnoDataBrowserView::dispose()
}
catch(const Exception&)
{}
+ m_pTreeView.clear();
+ m_pVclControl.clear();
ODataView::dispose();
}
@@ -162,13 +157,9 @@ void UnoDataBrowserView::setSplitter(Splitter* _pSplitter)
void UnoDataBrowserView::setTreeView(DBTreeView* _pTreeView)
{
- if (m_pTreeView != _pTreeView)
+ if (m_pTreeView.get() != _pTreeView)
{
- if (m_pTreeView)
- {
- boost::scoped_ptr<vcl::Window> aTemp(m_pTreeView);
- m_pTreeView = NULL;
- }
+ m_pTreeView.clear();
m_pTreeView = _pTreeView;
}
}
diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx
index 0956ff13a6e2..d80dc3d0b09f 100644
--- a/dbaccess/source/ui/browser/dbtreeview.cxx
+++ b/dbaccess/source/ui/browser/dbtreeview.cxx
@@ -58,9 +58,8 @@ void DBTreeView::dispose()
m_pTreeListBox->GetModel()->RemoveView(m_pTreeListBox);
m_pTreeListBox->DisconnectFromModel();
}
- boost::scoped_ptr<vcl::Window> aTemp(m_pTreeListBox);
- m_pTreeListBox = NULL;
}
+ m_pTreeListBox.clear();
vcl::Window::dispose();
}
diff --git a/dbaccess/source/ui/browser/dbtreeview.hxx b/dbaccess/source/ui/browser/dbtreeview.hxx
index bc9e11be4cb1..5313583fc061 100644
--- a/dbaccess/source/ui/browser/dbtreeview.hxx
+++ b/dbaccess/source/ui/browser/dbtreeview.hxx
@@ -31,7 +31,7 @@ namespace dbaui
class DBTreeView : public vcl::Window
{
private:
- DBTreeListBox* m_pTreeListBox;
+ VclPtr<DBTreeListBox> m_pTreeListBox;
protected:
// window overridables
virtual void Resize() SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 0613b7d54c50..7b129ee4f313 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -983,6 +983,16 @@ Reference< XConnection > OGenericUnoController::connect( const OUString& _rDataS
return xConnection;
}
+void OGenericUnoController::setView( ODataView& i_rView )
+{
+ m_pView = &i_rView;
+}
+
+void OGenericUnoController::clearView()
+{
+ m_pView = NULL;
+}
+
void OGenericUnoController::showError(const SQLExceptionInfo& _rInfo)
{
::dbaui::showError(_rInfo,getView(),getORB());
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 826384e4eb54..73495b56dcab 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -76,17 +76,15 @@ using namespace ::com::sun::star::util;
namespace
{
- template< typename T1, typename T2> void lcl_HideAndDeleteControl(short& _nPos,T1** _pControl,T2** _pControlText)
+ template< typename T1, typename T2> void lcl_HideAndDeleteControl(short& _nPos,VclPtr<T1>& _pControl, VclPtr<T2>& _pControlText)
{
- if ( *_pControl )
+ if ( _pControl )
{
--_nPos;
- (*_pControl)->Hide();
- (*_pControlText)->Hide();
- delete *_pControl;
- delete *_pControlText;
- (*_pControl) = NULL;
- (*_pControlText) = NULL;
+ _pControl->Hide();
+ _pControlText->Hide();
+ _pControl.clear();
+ _pControlText.clear();
}
}
@@ -191,6 +189,36 @@ void OFieldDescControl::dispose()
DeactivateAggregate( tpColumnName );
DeactivateAggregate( tpType );
DeactivateAggregate( tpAutoIncrementValue );
+ pHelp.clear();
+ pLastFocusWindow.clear();
+ m_pActFocusWindow.clear();
+ pDefaultText.clear();
+ pRequiredText.clear();
+ pAutoIncrementText.clear();
+ pTextLenText.clear();
+ pNumTypeText.clear();
+ pLengthText.clear();
+ pScaleText.clear();
+ pFormatText.clear();
+ pBoolDefaultText.clear();
+ m_pColumnNameText.clear();
+ m_pTypeText.clear();
+ m_pAutoIncrementValueText.clear();
+ pRequired.clear();
+ pNumType.clear();
+ pAutoIncrement.clear();
+ pDefault.clear();
+ pTextLen.clear();
+ pLength.clear();
+ pScale.clear();
+ pFormatSample.clear();
+ pBoolDefault.clear();
+ m_pColumnName.clear();
+ m_pType.clear();
+ m_pAutoIncrementValue.clear();
+ pFormat.clear();
+ m_pVertScroll.clear();
+ m_pHorzScroll.clear();
TabPage::dispose();
}
@@ -685,8 +713,8 @@ void OFieldDescControl::ArrangeAggregates()
// A Control's description
struct AGGREGATE_DESCRIPTION
{
- Control* pctrlInputControl; // The actual Control for input
- Control* pctrlTextControl; // The corresponding Label
+ VclPtr<Control> pctrlInputControl; // The actual Control for input
+ VclPtr<Control> pctrlTextControl; // The corresponding Label
sal_uInt16 nPosSizeArgument; // The second argument for SetPosSize
};
AGGREGATE_DESCRIPTION adAggregates[] = {
@@ -722,8 +750,8 @@ void OFieldDescControl::ArrangeAggregates()
{
if (adAggregates[i].pctrlInputControl)
{
- SetPosSize(&adAggregates[i].pctrlTextControl, nCurrentControlPos, 0);
- SetPosSize(&adAggregates[i].pctrlInputControl, nCurrentControlPos, adAggregates[i].nPosSizeArgument);
+ SetPosSize(adAggregates[i].pctrlTextControl, nCurrentControlPos, 0);
+ SetPosSize(adAggregates[i].pctrlInputControl, nCurrentControlPos, adAggregates[i].nPosSizeArgument);
// Set the z-order in a way such that the Controls can be traversed in the same sequence in which they have been arranged here
adAggregates[i].pctrlTextControl->SetZOrder(pZOrderPredecessor, pZOrderPredecessor ? WINDOW_ZORDER_BEHIND : WINDOW_ZORDER_FIRST);
@@ -976,62 +1004,61 @@ void OFieldDescControl::DeactivateAggregate( EControlType eType )
switch( eType )
{
case tpDefault:
- lcl_HideAndDeleteControl(m_nPos,&pDefault,&pDefaultText);
+ lcl_HideAndDeleteControl(m_nPos,pDefault,pDefaultText);
break;
case tpAutoIncrementValue:
- lcl_HideAndDeleteControl(m_nPos,&m_pAutoIncrementValue,&m_pAutoIncrementValueText);
+ lcl_HideAndDeleteControl(m_nPos,m_pAutoIncrementValue,m_pAutoIncrementValueText);
break;
case tpColumnName:
- lcl_HideAndDeleteControl(m_nPos,&m_pColumnName,&m_pColumnNameText);
+ lcl_HideAndDeleteControl(m_nPos,m_pColumnName,m_pColumnNameText);
break;
case tpType:
- lcl_HideAndDeleteControl(m_nPos,&m_pType,&m_pTypeText);
+ lcl_HideAndDeleteControl(m_nPos,m_pType,m_pTypeText);
break;
case tpAutoIncrement:
- lcl_HideAndDeleteControl(m_nPos,&pAutoIncrement,&pAutoIncrementText);
+ lcl_HideAndDeleteControl(m_nPos,pAutoIncrement,pAutoIncrementText);
break;
case tpRequired:
- lcl_HideAndDeleteControl(m_nPos,&pRequired,&pRequiredText);
+ lcl_HideAndDeleteControl(m_nPos,pRequired,pRequiredText);
break;
case tpTextLen:
- lcl_HideAndDeleteControl(m_nPos,&pTextLen,&pTextLenText);
+ lcl_HideAndDeleteControl(m_nPos,pTextLen,pTextLenText);
break;
case tpNumType:
- lcl_HideAndDeleteControl(m_nPos,&pNumType,&pNumTypeText);
+ lcl_HideAndDeleteControl(m_nPos,pNumType,pNumTypeText);
break;
case tpLength:
- lcl_HideAndDeleteControl(m_nPos,&pLength,&pLengthText);
+ lcl_HideAndDeleteControl(m_nPos,pLength,pLengthText);
break;
case tpScale:
- lcl_HideAndDeleteControl(m_nPos,&pScale,&pScaleText);
+ lcl_HideAndDeleteControl(m_nPos,pScale,pScaleText);
break;
case tpFormat:
// TODO: we have to check if we have to increment m_nPos again
- lcl_HideAndDeleteControl(m_nPos,&pFormat,&pFormatText);
+ lcl_HideAndDeleteControl(m_nPos,pFormat,pFormatText);
if ( pFormatSample )
{
pFormatSample->Hide();
- delete pFormatSample;
- pFormatSample = NULL;
+ pFormatSample.clear();
}
break;
case tpBoolDefault:
- lcl_HideAndDeleteControl(m_nPos,&pBoolDefault,&pBoolDefaultText);
+ lcl_HideAndDeleteControl(m_nPos,pBoolDefault,pBoolDefaultText);
break;
}
}
-void OFieldDescControl::SetPosSize( Control** ppControl, long nRow, sal_uInt16 nCol )
+void OFieldDescControl::SetPosSize( VclPtr<Control>& rControl, long nRow, sal_uInt16 nCol )
{
// Calculate size
@@ -1082,18 +1109,18 @@ void OFieldDescControl::SetPosSize( Control** ppControl, long nRow, sal_uInt16 n
aPosition.X() = 0;
}
- (*ppControl)->SetSizePixel( aSize );
- aSize = (*ppControl)->GetSizePixel( );
+ rControl->SetSizePixel( aSize );
+ aSize = rControl->GetSizePixel( );
const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MAP_APPFONT).Height();
aPosition.Y() += ((nRow+1)*nControl_Spacing_y) +
(nRow*nControlHeight);
// Display Control
- (*ppControl)->SetPosSizePixel( aPosition, aSize );
- aSize = (*ppControl)->GetSizePixel();
+ rControl->SetPosSizePixel( aPosition, aSize );
+ aSize = rControl->GetSizePixel();
- (*ppControl)->Show();
+ rControl->Show();
}
void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
@@ -1458,7 +1485,7 @@ IMPL_LINK(OFieldDescControl, OnControlFocusGot, Control*, pControl )
if (pControl == pFormat)
strHelpText = ModuleRes(STR_HELP_FORMAT_BUTTON);
- if (!strHelpText.isEmpty() && (pHelp != NULL))
+ if (!strHelpText.isEmpty() && (pHelp != nullptr))
pHelp->SetHelpText(strHelpText);
m_pActFocusWindow = pControl;
@@ -1584,30 +1611,30 @@ void OFieldDescControl::LoseFocus()
bool OFieldDescControl::isCopyAllowed()
{
- bool bAllowed = (m_pActFocusWindow != NULL) &&
+ bool bAllowed = (m_pActFocusWindow != nullptr) &&
(m_pActFocusWindow == pDefault || m_pActFocusWindow == pFormatSample ||
m_pActFocusWindow == pTextLen || m_pActFocusWindow == pLength ||
m_pActFocusWindow == pScale || m_pActFocusWindow == m_pColumnName ||
m_pActFocusWindow == m_pAutoIncrementValue) &&
- !static_cast<Edit*>(m_pActFocusWindow)->GetSelected().isEmpty();
+ !static_cast<Edit*>(m_pActFocusWindow.get())->GetSelected().isEmpty();
return bAllowed;
}
bool OFieldDescControl::isCutAllowed()
{
- bool bAllowed = (m_pActFocusWindow != NULL) &&
+ bool bAllowed = (m_pActFocusWindow != nullptr) &&
(m_pActFocusWindow == pDefault || m_pActFocusWindow == pFormatSample ||
m_pActFocusWindow == pTextLen || m_pActFocusWindow == pLength ||
m_pActFocusWindow == pScale || m_pActFocusWindow == m_pColumnName ||
m_pActFocusWindow == m_pAutoIncrementValue) &&
- !static_cast<Edit*>(m_pActFocusWindow)->GetSelected().isEmpty();
+ !static_cast<Edit*>(m_pActFocusWindow.get())->GetSelected().isEmpty();
return bAllowed;
}
bool OFieldDescControl::isPasteAllowed()
{
- bool bAllowed = (m_pActFocusWindow != NULL) &&
+ bool bAllowed = (m_pActFocusWindow != nullptr) &&
(m_pActFocusWindow == pDefault || m_pActFocusWindow == pFormatSample ||
m_pActFocusWindow == pTextLen || m_pActFocusWindow == pLength ||
m_pActFocusWindow == pScale || m_pActFocusWindow == m_pColumnName ||
@@ -1623,19 +1650,19 @@ bool OFieldDescControl::isPasteAllowed()
void OFieldDescControl::cut()
{
if(isCutAllowed())
- static_cast<Edit*>(m_pActFocusWindow)->Cut();
+ static_cast<Edit*>(m_pActFocusWindow.get())->Cut();
}
void OFieldDescControl::copy()
{
if(isCopyAllowed()) // this only checks if the focus window is valid
- static_cast<Edit*>(m_pActFocusWindow)->Copy();
+ static_cast<Edit*>(m_pActFocusWindow.get())->Copy();
}
void OFieldDescControl::paste()
{
if(m_pActFocusWindow) // this only checks if the focus window is valid
- static_cast<Edit*>(m_pActFocusWindow)->Paste();
+ static_cast<Edit*>(m_pActFocusWindow.get())->Paste();
}
bool OFieldDescControl::isTextFormat(const OFieldDescription* _pFieldDescr, sal_uInt32& _nFormatKey) const
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index d48e915e3ca2..6f86962649c1 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -82,8 +82,8 @@ void OTableGrantControl::dispose()
m_nDeactivateEvent = 0;
}
- delete m_pCheckCell;
- delete m_pEdit;
+ m_pCheckCell.clear();
+ m_pEdit.clear();
m_xTables = NULL;
::svt::EditBrowseBox::dispose();
diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx
index d0e5bbcf2645..3201f5e28f7a 100644
--- a/dbaccess/source/ui/control/VertSplitView.cxx
+++ b/dbaccess/source/ui/control/VertSplitView.cxx
@@ -44,7 +44,9 @@ OSplitterView::~OSplitterView()
void OSplitterView::dispose()
{
- m_pRight = m_pLeft = NULL;
+ m_pSplitter.clear();
+ m_pLeft.clear();
+ m_pRight.clear();
vcl::Window::dispose();
}
diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx
index bd3414098e9c..e30ab1314b3c 100644
--- a/dbaccess/source/ui/control/curledit.cxx
+++ b/dbaccess/source/ui/control/curledit.cxx
@@ -45,8 +45,8 @@ OConnectionURLEdit::~OConnectionURLEdit()
void OConnectionURLEdit::dispose()
{
- SetSubEdit(VclPtr<Edit>());
- delete m_pForcedPrefix;
+ SetSubEdit(nullptr);
+ m_pForcedPrefix.clear();
Edit::dispose();
}
@@ -89,7 +89,7 @@ void OConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNew
{
// create new sub controls, if necessary
if (!GetSubEdit())
- SetSubEdit(VclPtr<Edit>(new Edit(this, 0)));
+ SetSubEdit(new Edit(this, 0));
if ( !m_pForcedPrefix )
{
m_pForcedPrefix = new FixedText(this, WB_VCENTER);
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index bf4aa1f66df8..9d2c870a6aad 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -121,6 +121,7 @@ void OSqlEdit::dispose()
n->removePropertiesChangeListener(m_listener.get());
}
m_ColorConfig.RemoveListener(this);
+ m_pView.clear();
MultiLineEditSyntaxHighlight::dispose();
}
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx
index c3ba08fd0ee1..ed6408696e1d 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -91,6 +91,22 @@ OCollectionView::OCollectionView( vcl::Window * pParent
m_pPB_OK->SetClickHdl( LINK( this, OCollectionView, Save_Click ) );
}
+OCollectionView::~OCollectionView()
+{
+ dispose();
+}
+
+void OCollectionView::dispose()
+{
+ m_pFTCurrentPath.clear();
+ m_pNewFolder.clear();
+ m_pUp.clear();
+ m_pView.clear();
+ m_pName.clear();
+ m_pPB_OK.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK_NOARG(OCollectionView, Save_Click)
{
OUString sName = m_pName->GetText();
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index d0d0043b0cac..c50eef04c453 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -91,7 +91,6 @@ namespace dbaui
: OGenericAdministrationPage(pParent, _rId, _rUIXMLDescription, _rCoreAttrs)
, m_bUserGrabFocus(false)
, m_pCollection(NULL)
- , m_bDelete(false)
{
get(m_pFT_Connection, "browseurllabel");
get(m_pConnectionURL, "browseurl");
@@ -115,13 +114,10 @@ namespace dbaui
void OConnectionHelper::dispose()
{
- if(m_bDelete)
- {
- delete m_pFT_Connection;
- delete m_pConnectionURL;
- delete m_pPB_Connection;
- delete m_pPB_CreateDB;
- }
+ m_pFT_Connection.clear();
+ m_pConnectionURL.clear();
+ m_pPB_Connection.clear();
+ m_pPB_CreateDB.clear();
OGenericAdministrationPage::dispose();
}
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
index 5d9ae8beb4e3..9fd69e7459c4 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
@@ -43,10 +43,10 @@ namespace dbaui
OConnectionHelper( vcl::Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs);
virtual ~OConnectionHelper();
virtual void dispose() SAL_OVERRIDE;
- FixedText *m_pFT_Connection;
- OConnectionURLEdit *m_pConnectionURL;
- PushButton *m_pPB_Connection;
- PushButton *m_pPB_CreateDB;
+ VclPtr<FixedText> m_pFT_Connection;
+ VclPtr<OConnectionURLEdit> m_pConnectionURL;
+ VclPtr<PushButton> m_pPB_Connection;
+ VclPtr<PushButton> m_pPB_CreateDB;
OUString m_eType; // the type can't be changed in this class, so we hold it as member.
public:
@@ -96,7 +96,6 @@ namespace dbaui
OUString impl_getURL( bool _bPrefix ) const;
void impl_setURL( const OUString& _rURL, bool _bPrefix );
void implUpdateURLDependentStates() const;
- bool m_bDelete;
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index a8884ac397f1..1a2a7be36d28 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -109,6 +109,25 @@ namespace dbaui
m_pTestJavaDriver->SetClickHdl(LINK(this,OConnectionTabPage,OnTestJavaClickHdl));
}
+ OConnectionTabPage::~OConnectionTabPage()
+ {
+ dispose();
+ }
+
+ void OConnectionTabPage::dispose()
+ {
+ m_pFL2.clear();
+ m_pUserNameLabel.clear();
+ m_pUserName.clear();
+ m_pPasswordRequired.clear();
+ m_pFL3.clear();
+ m_pJavaDriverLabel.clear();
+ m_pJavaDriver.clear();
+ m_pTestJavaDriver.clear();
+ m_pTestConnection.clear();
+ OConnectionHelper::dispose();
+ }
+
void OConnectionTabPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
{
// check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx
index 9713621dfd25..53befc084d2d 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx
@@ -36,25 +36,27 @@ namespace dbaui
{
protected:
// user authentification
- FixedText* m_pFL2;
- FixedText* m_pUserNameLabel;
- Edit* m_pUserName;
- CheckBox* m_pPasswordRequired;
+ VclPtr<FixedText> m_pFL2;
+ VclPtr<FixedText> m_pUserNameLabel;
+ VclPtr<Edit> m_pUserName;
+ VclPtr<CheckBox> m_pPasswordRequired;
// jdbc driver
- FixedText* m_pFL3;
- FixedText* m_pJavaDriverLabel;
- Edit* m_pJavaDriver;
- PushButton* m_pTestJavaDriver;
+ VclPtr<FixedText> m_pFL3;
+ VclPtr<FixedText> m_pJavaDriverLabel;
+ VclPtr<Edit> m_pJavaDriver;
+ VclPtr<PushButton> m_pTestJavaDriver;
// connection test
- PushButton* m_pTestConnection;
+ VclPtr<PushButton> m_pTestConnection;
// called when the test connection button was clicked
- DECL_LINK(OnTestJavaClickHdl,PushButton*);
- DECL_LINK(OnEditModified,Edit*);
+ DECL_LINK(OnTestJavaClickHdl, PushButton*);
+ DECL_LINK(OnEditModified, Edit*);
public:
+ virtual ~OConnectionTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* _rAttrSet );
virtual bool FillItemSet (SfxItemSet* _rCoreAttrs) SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index ce72b8d20405..0d9dd54eeb9e 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -119,6 +119,18 @@ namespace dbaui
SetRoadmapStateValue(false);
}
+ OConnectionTabPageSetup::~OConnectionTabPageSetup()
+ {
+ dispose();
+ }
+
+ void OConnectionTabPageSetup::dispose()
+ {
+ m_pHelpText.clear();
+ m_pHeaderText.clear();
+ OConnectionHelper::dispose();
+ }
+
void OConnectionTabPageSetup::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
{
m_eType = m_pAdminDialog->getDatasourceType(_rSet);
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
index b417c7882125..633dcb79b73c 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
@@ -39,13 +39,15 @@ namespace dbaui
bool m_bUserGrabFocus : 1;
protected:
- FixedText *m_pHelpText;
- FixedText *m_pHeaderText;
+ VclPtr<FixedText> m_pHelpText;
+ VclPtr<FixedText> m_pHeaderText;
// called when the test connection button was clicked
DECL_LINK(OnEditModified,Edit*);
public:
+ virtual ~OConnectionTabPageSetup();
+ virtual void dispose() SAL_OVERRIDE;
static OGenericAdministrationPage* CreateDbaseTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
static OGenericAdministrationPage* CreateMSAccessTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
static OGenericAdministrationPage* CreateADOTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 850a91ad4e52..57356b64e58a 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -81,7 +81,7 @@ using namespace ::com::sun::star;
void OTextConnectionPageSetup::dispose()
{
- DELETEZ(m_pTextConnectionHelper);
+ m_pTextConnectionHelper.clear();
OConnectionTabPageSetup::dispose();
}
@@ -156,6 +156,25 @@ using namespace ::com::sun::star;
SetRoadmapStateValue(false);
}
+ OLDAPConnectionPageSetup::~OLDAPConnectionPageSetup()
+ {
+ dispose();
+ }
+
+ void OLDAPConnectionPageSetup::dispose()
+ {
+ m_pFTHelpText.clear();
+ m_pFTHostServer.clear();
+ m_pETHostServer.clear();
+ m_pFTBaseDN.clear();
+ m_pETBaseDN.clear();
+ m_pFTPortNumber.clear();
+ m_pNFPortNumber.clear();
+ m_pFTDefaultPortNumber.clear();
+ m_pCBUseSSL.clear();
+ OGenericAdministrationPage::dispose();
+ }
+
bool OLDAPConnectionPageSetup::FillItemSet( SfxItemSet* _rSet )
{
bool bChangedSomething = false;
@@ -240,6 +259,19 @@ using namespace ::com::sun::star;
m_pNATIVEDatabase->SetToggleHdl(LINK(this, OMySQLIntroPageSetup, OnSetupModeSelected));
}
+ OMySQLIntroPageSetup::~OMySQLIntroPageSetup()
+ {
+ dispose();
+ }
+
+ void OMySQLIntroPageSetup::dispose()
+ {
+ m_pODBCDatabase.clear();
+ m_pJDBCDatabase.clear();
+ m_pNATIVEDatabase.clear();
+ OGenericAdministrationPage::dispose();
+ }
+
IMPL_LINK(OMySQLIntroPageSetup, OnSetupModeSelected, RadioButton*, /*_pBox*/)
{
maClickHdl.Call( this );
@@ -308,6 +340,7 @@ using namespace ::com::sun::star;
void MySQLNativeSetupPage::dispose()
{
m_aMySQLSettings.disposeAndClear();
+ m_pHelpText.clear();
OGenericAdministrationPage::dispose();
}
@@ -398,6 +431,28 @@ using namespace ::com::sun::star;
SetRoadmapStateValue(false);
}
+ OGeneralSpecialJDBCConnectionPageSetup::~OGeneralSpecialJDBCConnectionPageSetup()
+ {
+ dispose();
+ }
+
+ void OGeneralSpecialJDBCConnectionPageSetup::dispose()
+ {
+ m_pHeaderText.clear();
+ m_pFTHelpText.clear();
+ m_pFTDatabasename.clear();
+ m_pETDatabasename.clear();
+ m_pFTHostname.clear();
+ m_pETHostname.clear();
+ m_pFTPortNumber.clear();
+ m_pFTDefaultPortNumber.clear();
+ m_pNFPortNumber.clear();
+ m_pFTDriverClass.clear();
+ m_pETDriverClass.clear();
+ m_pPBTestJavaDriver.clear();
+ OGenericAdministrationPage::dispose();
+ }
+
OGenericAdministrationPage* OGeneralSpecialJDBCConnectionPageSetup::CreateMySQLJDBCTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet )
{
return ( new OGeneralSpecialJDBCConnectionPageSetup( pParent,
@@ -540,6 +595,19 @@ using namespace ::com::sun::star;
m_pPBTestJavaDriver->SetClickHdl(LINK(this,OJDBCConnectionPageSetup,OnTestJavaClickHdl));
}
+ OJDBCConnectionPageSetup::~OJDBCConnectionPageSetup()
+ {
+ dispose();
+ }
+
+ void OJDBCConnectionPageSetup::dispose()
+ {
+ m_pFTDriverClass.clear();
+ m_pETDriverClass.clear();
+ m_pPBTestJavaDriver.clear();
+ OConnectionTabPageSetup::dispose();
+ }
+
void OJDBCConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
{
_rControlList.push_back(new OSaveValueWrapper<Edit>(m_pETDriverClass));
@@ -645,6 +713,17 @@ using namespace ::com::sun::star;
m_pPasswordrequired->SetToggleHdl(getControlModifiedLink());
}
+ OSpreadSheetConnectionPageSetup::~OSpreadSheetConnectionPageSetup()
+ {
+ dispose();
+ }
+
+ void OSpreadSheetConnectionPageSetup::dispose()
+ {
+ m_pPasswordrequired.clear();
+ OConnectionTabPageSetup::dispose();
+ }
+
void OSpreadSheetConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& /*_rControlList*/)
{
}
@@ -689,6 +768,21 @@ using namespace ::com::sun::star;
LayoutHelper::fitSizeRightAligned( *m_pPBTestConnection );
}
+ OAuthentificationPageSetup::~OAuthentificationPageSetup()
+ {
+ dispose();
+ }
+
+ void OAuthentificationPageSetup::dispose()
+ {
+ m_pFTHelpText.clear();
+ m_pFTUserName.clear();
+ m_pETUserName.clear();
+ m_pCBPasswordRequired.clear();
+ m_pPBTestConnection.clear();
+ OGenericAdministrationPage::dispose();
+ }
+
void OAuthentificationPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
{
_rControlList.push_back(new ODisableWrapper<FixedText>(m_pFTHelpText));
@@ -754,6 +848,24 @@ using namespace ::com::sun::star;
m_pRBRegisterDataSource->SetState(true);
}
+ OFinalDBPageSetup::~OFinalDBPageSetup()
+ {
+ dispose();
+ }
+
+ void OFinalDBPageSetup::dispose()
+ {
+ m_pFTFinalHeader.clear();
+ m_pFTFinalHelpText.clear();
+ m_pRBRegisterDataSource.clear();
+ m_pRBDontregisterDataSource.clear();
+ m_pFTAdditionalSettings.clear();
+ m_pCBOpenAfterwards.clear();
+ m_pCBStartTableWizard.clear();
+ m_pFTFinalText.clear();
+ OGenericAdministrationPage::dispose();
+ }
+
bool OFinalDBPageSetup::IsDatabaseDocumentToBeRegistered()
{
return m_pRBRegisterDataSource->IsChecked() && m_pRBRegisterDataSource->IsEnabled();
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 3b3ed06b8bd5..23416fc53fb6 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -42,9 +42,11 @@ namespace dbaui
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
static OGenericAdministrationPage* CreateSpreadSheetTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
OSpreadSheetConnectionPageSetup(vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
+ virtual ~OSpreadSheetConnectionPageSetup();
+ virtual void dispose() SAL_OVERRIDE;
protected:
- CheckBox *m_pPasswordrequired;
+ VclPtr<CheckBox> m_pPasswordrequired;
protected:
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
@@ -57,15 +59,14 @@ namespace dbaui
class OTextConnectionPageSetup : public OConnectionTabPageSetup
{
public:
+ VclPtr<OTextConnectionHelper> m_pTextConnectionHelper;
+
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
- static OGenericAdministrationPage* CreateTextTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
+ static OGenericAdministrationPage* CreateTextTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
OTextConnectionPageSetup( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs );
- OTextConnectionHelper* m_pTextConnectionHelper;
- private:
-
- protected:
virtual ~OTextConnectionPageSetup();
virtual void dispose() SAL_OVERRIDE;
+ protected:
virtual bool prepareLeave() SAL_OVERRIDE;
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
@@ -83,6 +84,8 @@ namespace dbaui
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
static OGenericAdministrationPage* CreateLDAPTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
OLDAPConnectionPageSetup( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs );
+ virtual ~OLDAPConnectionPageSetup();
+ virtual void dispose() SAL_OVERRIDE;
virtual Link getControlModifiedLink() SAL_OVERRIDE { return LINK(this, OLDAPConnectionPageSetup, OnEditModified); }
protected:
@@ -92,22 +95,22 @@ namespace dbaui
DECL_LINK(OnEditModified,Edit*);
private:
- FixedText* m_pFTHelpText;
- FixedText* m_pFTHostServer;
- Edit* m_pETHostServer;
- FixedText* m_pFTBaseDN;
- Edit* m_pETBaseDN;
- FixedText* m_pFTPortNumber;
- NumericField* m_pNFPortNumber;
- FixedText* m_pFTDefaultPortNumber;
- CheckBox* m_pCBUseSSL;
+ VclPtr<FixedText> m_pFTHelpText;
+ VclPtr<FixedText> m_pFTHostServer;
+ VclPtr<Edit> m_pETHostServer;
+ VclPtr<FixedText> m_pFTBaseDN;
+ VclPtr<Edit> m_pETBaseDN;
+ VclPtr<FixedText> m_pFTPortNumber;
+ VclPtr<NumericField> m_pNFPortNumber;
+ VclPtr<FixedText> m_pFTDefaultPortNumber;
+ VclPtr<CheckBox> m_pCBUseSSL;
};
// MySQLNativeSetupPage
class MySQLNativeSetupPage : public OGenericAdministrationPage
{
private:
- FixedText *m_pHelpText;
+ VclPtr<FixedText> m_pHelpText;
VclPtr<MySQLNativeSettings> m_aMySQLSettings;
public:
@@ -141,6 +144,8 @@ namespace dbaui
, sal_uInt16 _nHelpTextResId
, sal_uInt16 _nHeaderTextResId
, sal_uInt16 _nDriverClassId );
+ virtual ~OGeneralSpecialJDBCConnectionPageSetup();
+ virtual void dispose() SAL_OVERRIDE;
static OGenericAdministrationPage* CreateMySQLJDBCTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
static OGenericAdministrationPage* CreateOracleJDBCTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
@@ -153,19 +158,19 @@ namespace dbaui
DECL_LINK(OnTestJavaClickHdl,PushButton*);
DECL_LINK(OnEditModified,Edit*);
- FixedText* m_pHeaderText;
- FixedText* m_pFTHelpText;
- FixedText* m_pFTDatabasename;
- Edit* m_pETDatabasename;
- FixedText* m_pFTHostname;
- Edit* m_pETHostname;
- FixedText* m_pFTPortNumber;
- FixedText* m_pFTDefaultPortNumber;
- NumericField* m_pNFPortNumber;
-
- FixedText* m_pFTDriverClass;
- Edit* m_pETDriverClass;
- PushButton* m_pPBTestJavaDriver;
+ VclPtr<FixedText> m_pHeaderText;
+ VclPtr<FixedText> m_pFTHelpText;
+ VclPtr<FixedText> m_pFTDatabasename;
+ VclPtr<Edit> m_pETDatabasename;
+ VclPtr<FixedText> m_pFTHostname;
+ VclPtr<Edit> m_pETHostname;
+ VclPtr<FixedText> m_pFTPortNumber;
+ VclPtr<FixedText> m_pFTDefaultPortNumber;
+ VclPtr<NumericField> m_pNFPortNumber;
+
+ VclPtr<FixedText> m_pFTDriverClass;
+ VclPtr<Edit> m_pETDriverClass;
+ VclPtr<PushButton> m_pPBTestJavaDriver;
OUString m_sDefaultJdbcDriverName;
sal_uInt16 m_nPortId;
@@ -176,6 +181,8 @@ namespace dbaui
{
public:
OJDBCConnectionPageSetup( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs );
+ virtual ~OJDBCConnectionPageSetup();
+ virtual void dispose() SAL_OVERRIDE;
static OGenericAdministrationPage* CreateJDBCTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
protected:
@@ -188,9 +195,9 @@ namespace dbaui
DECL_LINK(OnTestJavaClickHdl,PushButton*);
DECL_LINK(OnEditModified,Edit*);
- FixedText* m_pFTDriverClass;
- Edit* m_pETDriverClass;
- PushButton* m_pPBTestJavaDriver;
+ VclPtr<FixedText> m_pFTDriverClass;
+ VclPtr<Edit> m_pETDriverClass;
+ VclPtr<PushButton> m_pPBTestJavaDriver;
};
// OJDBCConnectionPageSetup
@@ -205,6 +212,8 @@ namespace dbaui
};
OMySQLIntroPageSetup( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
+ virtual ~OMySQLIntroPageSetup();
+ virtual void dispose() SAL_OVERRIDE;
static OMySQLIntroPageSetup* CreateMySQLIntroTabPage( vcl::Window* _pParent, const SfxItemSet& _rAttrSet );
ConnectionType getMySQLMode();
@@ -220,9 +229,9 @@ namespace dbaui
virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
private:
- RadioButton *m_pODBCDatabase;
- RadioButton *m_pJDBCDatabase;
- RadioButton *m_pNATIVEDatabase;
+ VclPtr<RadioButton> m_pODBCDatabase;
+ VclPtr<RadioButton> m_pJDBCDatabase;
+ VclPtr<RadioButton> m_pNATIVEDatabase;
DECL_LINK(OnSetupModeSelected, RadioButton*);
@@ -235,13 +244,15 @@ namespace dbaui
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
static OGenericAdministrationPage* CreateAuthentificationTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
OAuthentificationPageSetup(vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
+ virtual ~OAuthentificationPageSetup();
+ virtual void dispose() SAL_OVERRIDE;
protected:
- FixedText* m_pFTHelpText;
- FixedText* m_pFTUserName;
- Edit* m_pETUserName;
- CheckBox* m_pCBPasswordRequired;
- PushButton* m_pPBTestConnection;
+ VclPtr<FixedText> m_pFTHelpText;
+ VclPtr<FixedText> m_pFTUserName;
+ VclPtr<Edit> m_pETUserName;
+ VclPtr<CheckBox> m_pCBPasswordRequired;
+ VclPtr<PushButton> m_pPBTestConnection;
protected:
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
@@ -256,16 +267,18 @@ namespace dbaui
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
static OGenericAdministrationPage* CreateFinalDBTabPageSetup( vcl::Window* pParent, const SfxItemSet& _rAttrSet);
- FixedText* m_pFTFinalHeader;
- FixedText* m_pFTFinalHelpText;
- RadioButton* m_pRBRegisterDataSource;
- RadioButton* m_pRBDontregisterDataSource;
- FixedText* m_pFTAdditionalSettings;
- CheckBox* m_pCBOpenAfterwards;
- CheckBox* m_pCBStartTableWizard;
- FixedText* m_pFTFinalText;
+ VclPtr<FixedText> m_pFTFinalHeader;
+ VclPtr<FixedText> m_pFTFinalHelpText;
+ VclPtr<RadioButton> m_pRBRegisterDataSource;
+ VclPtr<RadioButton> m_pRBDontregisterDataSource;
+ VclPtr<FixedText> m_pFTAdditionalSettings;
+ VclPtr<CheckBox> m_pCBOpenAfterwards;
+ VclPtr<CheckBox> m_pCBStartTableWizard;
+ VclPtr<FixedText> m_pFTFinalText;
OFinalDBPageSetup(vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
+ virtual ~OFinalDBPageSetup();
+ virtual void dispose() SAL_OVERRIDE;
bool IsDatabaseDocumentToBeRegistered();
bool IsDatabaseDocumentToBeOpened();
bool IsTableWizardToBeStarted();
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.hxx b/dbaccess/source/ui/dlg/DbAdminImpl.hxx
index 4b46778afb92..890a7acc33cd 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.hxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.hxx
@@ -35,6 +35,7 @@
#include <svl/itemset.hxx>
#include <com/sun/star/frame/XModel.hpp>
#include <svl/poolitem.hxx>
+#include <vcl/vclptr.hxx>
namespace vcl { class Window; }
namespace dbaui
@@ -68,7 +69,7 @@ namespace dbaui
MapInt2String m_aDirectPropTranslator; /// translating property id's into names (direct properties of a data source)
MapInt2String m_aIndirectPropTranslator; /// translating property id's into names (indirect properties of a data source)
- vcl::Window* m_pParent;
+ VclPtr<vcl::Window> m_pParent;
IItemSetHelper* m_pItemSetHelper;
public:
diff --git a/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx b/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx
index cfdab7758b35..716c895161a9 100644
--- a/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx
+++ b/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx
@@ -28,6 +28,19 @@ QueryPropertiesDialog::QueryPropertiesDialog(
m_pLB_Limit->SetValue( nLimit );
}
+QueryPropertiesDialog::~QueryPropertiesDialog()
+{
+ dispose();
+}
+
+void QueryPropertiesDialog::dispose()
+{
+ m_pRB_Distinct.clear();
+ m_pRB_NonDistinct.clear();
+ m_pLB_Limit.clear();
+ ModalDialog::dispose();
+}
+
} ///dbaui namespace
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx
index f0626ae3f698..9a27bd7270a9 100644
--- a/dbaccess/source/ui/dlg/RelationDlg.cxx
+++ b/dbaccess/source/ui/dlg/RelationDlg.cxx
@@ -88,6 +88,26 @@ ORelationDialog::ORelationDialog( OJoinTableView* pParent,
m_xTableControl->NotifyCellChange();
}
+ORelationDialog::~ORelationDialog()
+{
+ dispose();
+}
+
+void ORelationDialog::dispose()
+{
+ m_pRB_NoCascUpd.clear();
+ m_pRB_CascUpd.clear();
+ m_pRB_CascUpdNull.clear();
+ m_pRB_CascUpdDefault.clear();
+ m_pRB_NoCascDel.clear();
+ m_pRB_CascDel.clear();
+ m_pRB_CascDelNull.clear();
+ m_pRB_CascDelDefault.clear();
+ m_pPB_OK.clear();
+ ModalDialog::dispose();
+}
+
+
void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionData)
{
ORelationTableConnectionData* pConnData = static_cast<ORelationTableConnectionData*>(_pConnectionData.get());
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index c10751766928..cc2079dcfac3 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -114,7 +114,7 @@ namespace dbaui
struct SectionDescriptor
{
short nFlag;
- vcl::Window* pFirstControl;
+ VclPtr<vcl::Window> pFirstControl;
} aSections[] = {
{ TC_EXTENSION, m_pExtensionHeader },
{ TC_SEPARATORS, m_pFormatHeader },
@@ -151,6 +151,35 @@ namespace dbaui
Show();
}
+ OTextConnectionHelper::~OTextConnectionHelper()
+ {
+ dispose();
+ }
+
+ void OTextConnectionHelper::dispose()
+ {
+ m_pExtensionHeader.clear();
+ m_pAccessTextFiles.clear();
+ m_pAccessCSVFiles.clear();
+ m_pAccessOtherFiles.clear();
+ m_pOwnExtension.clear();
+ m_pExtensionExample.clear();
+ m_pFormatHeader.clear();
+ m_pFieldSeparatorLabel.clear();
+ m_pFieldSeparator.clear();
+ m_pTextSeparatorLabel.clear();
+ m_pTextSeparator.clear();
+ m_pDecimalSeparatorLabel.clear();
+ m_pDecimalSeparator.clear();
+ m_pThousandsSeparatorLabel.clear();
+ m_pThousandsSeparator.clear();
+ m_pRowHeader.clear();
+ m_pCharSetHeader.clear();
+ m_pCharSetLabel.clear();
+ m_pCharSet.clear();
+ TabPage::dispose();
+ }
+
IMPL_LINK(OTextConnectionHelper, OnControlModified, Control*, /*EMPTYARG*/)
{
callModifiedHdl();
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
index 03dde73cc6dd..56610e6e615b 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
@@ -48,27 +48,29 @@ namespace dbaui
public:
OTextConnectionHelper( vcl::Window* pParent, const short _nAvailableSections );
+ virtual ~OTextConnectionHelper();
+ virtual void dispose() SAL_OVERRIDE;
private:
- FixedText *m_pExtensionHeader;
- RadioButton *m_pAccessTextFiles;
- RadioButton *m_pAccessCSVFiles;
- RadioButton *m_pAccessOtherFiles;
- Edit *m_pOwnExtension;
- FixedText *m_pExtensionExample;
- FixedText *m_pFormatHeader;
- FixedText *m_pFieldSeparatorLabel;
- ComboBox *m_pFieldSeparator;
- FixedText *m_pTextSeparatorLabel;
- ComboBox *m_pTextSeparator;
- FixedText *m_pDecimalSeparatorLabel;
- ComboBox *m_pDecimalSeparator;
- FixedText *m_pThousandsSeparatorLabel;
- ComboBox *m_pThousandsSeparator;
- CheckBox *m_pRowHeader;
- FixedText *m_pCharSetHeader;
- FixedText *m_pCharSetLabel;
- CharSetListBox *m_pCharSet;
+ VclPtr<FixedText> m_pExtensionHeader;
+ VclPtr<RadioButton> m_pAccessTextFiles;
+ VclPtr<RadioButton> m_pAccessCSVFiles;
+ VclPtr<RadioButton> m_pAccessOtherFiles;
+ VclPtr<Edit> m_pOwnExtension;
+ VclPtr<FixedText> m_pExtensionExample;
+ VclPtr<FixedText> m_pFormatHeader;
+ VclPtr<FixedText> m_pFieldSeparatorLabel;
+ VclPtr<ComboBox> m_pFieldSeparator;
+ VclPtr<FixedText> m_pTextSeparatorLabel;
+ VclPtr<ComboBox> m_pTextSeparator;
+ VclPtr<FixedText> m_pDecimalSeparatorLabel;
+ VclPtr<ComboBox> m_pDecimalSeparator;
+ VclPtr<FixedText> m_pThousandsSeparatorLabel;
+ VclPtr<ComboBox> m_pThousandsSeparator;
+ VclPtr<CheckBox> m_pRowHeader;
+ VclPtr<FixedText> m_pCharSetHeader;
+ VclPtr<FixedText> m_pCharSetLabel;
+ VclPtr<CharSetListBox> m_pCharSet;
OUString m_aFieldSeparatorList;
OUString m_aTextSeparatorList;
OUString m_aTextNone;
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index 219440b0d496..23621cc7931c 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -51,17 +51,27 @@ using namespace comphelper;
class OPasswordDialog : public ModalDialog
{
- VclFrame* m_pUser;
- Edit* m_pEDOldPassword;
- Edit* m_pEDPassword;
- Edit* m_pEDPasswordRepeat;
- OKButton* m_pOKBtn;
+ VclPtr<VclFrame> m_pUser;
+ VclPtr<Edit> m_pEDOldPassword;
+ VclPtr<Edit> m_pEDPassword;
+ VclPtr<Edit> m_pEDPasswordRepeat;
+ VclPtr<OKButton> m_pOKBtn;
DECL_LINK( OKHdl_Impl, void * );
DECL_LINK( ModifiedHdl, Edit * );
public:
OPasswordDialog( vcl::Window* pParent,const OUString& _sUserName);
+ virtual ~OPasswordDialog() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ m_pUser.clear();
+ m_pEDOldPassword.clear();
+ m_pEDPassword.clear();
+ m_pEDPasswordRepeat.clear();
+ m_pOKBtn.clear();
+ ModalDialog::dispose();
+ }
OUString GetOldPassword() const { return m_pEDOldPassword->GetText(); }
OUString GetNewPassword() const { return m_pEDPassword->GetText(); }
@@ -138,6 +148,10 @@ void OUserAdmin::dispose()
{
m_xConnection = NULL;
m_TableCtrl.disposeAndClear();
+ m_pUSER.clear();
+ m_pNEWUSER.clear();
+ m_pCHANGEPWD.clear();
+ m_pDELETEUSER.clear();
OGenericAdministrationPage::dispose();
}
diff --git a/dbaccess/source/ui/dlg/UserAdmin.hxx b/dbaccess/source/ui/dlg/UserAdmin.hxx
index 76922bb421c4..5bed22342ef9 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.hxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.hxx
@@ -41,10 +41,10 @@ namespace dbaui
class OUserAdmin : public OGenericAdministrationPage
{
protected:
- ListBox *m_pUSER;
- PushButton *m_pNEWUSER;
- PushButton *m_pCHANGEPWD;
- PushButton *m_pDELETEUSER;
+ VclPtr<ListBox> m_pUSER;
+ VclPtr<PushButton> m_pNEWUSER;
+ VclPtr<PushButton> m_pCHANGEPWD;
+ VclPtr<PushButton> m_pDELETEUSER;
VclPtr<OTableGrantControl> m_TableCtrl; // show the grant rights of one user
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index 9b6f331202ac..08e7be864ad4 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -168,6 +168,28 @@ namespace dbaui
#endif
}
+ MySQLNativeSettings::~MySQLNativeSettings()
+ {
+ dispose();
+ }
+
+ void MySQLNativeSettings::dispose()
+ {
+ m_pDatabaseNameLabel.clear();
+ m_pDatabaseName.clear();
+ m_pHostPortRadio.clear();
+ m_pSocketRadio.clear();
+ m_pNamedPipeRadio.clear();
+ m_pHostNameLabel.clear();
+ m_pHostName.clear();
+ m_pPortLabel.clear();
+ m_pPort.clear();
+ m_pDefaultPort.clear();
+ m_pSocket.clear();
+ m_pNamedPipe.clear();
+ TabPage::dispose();
+ }
+
void MySQLNativeSettings::fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList )
{
_rControlList.push_back( new OSaveValueWrapper< Edit >( m_pDatabaseName ) );
diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx b/dbaccess/source/ui/dlg/admincontrols.hxx
index e1daa864e730..544ef8b89a24 100644
--- a/dbaccess/source/ui/dlg/admincontrols.hxx
+++ b/dbaccess/source/ui/dlg/admincontrols.hxx
@@ -35,25 +35,26 @@ namespace dbaui
class MySQLNativeSettings : public TabPage
{
private:
- FixedText *m_pDatabaseNameLabel;
- Edit *m_pDatabaseName;
- RadioButton *m_pHostPortRadio;
- RadioButton *m_pSocketRadio;
- RadioButton *m_pNamedPipeRadio;
- FixedText *m_pHostNameLabel;
- Edit *m_pHostName;
- FixedText *m_pPortLabel;
- NumericField *m_pPort;
- FixedText *m_pDefaultPort;
- Edit *m_pSocket;
- Edit *m_pNamedPipe;
+ VclPtr<FixedText> m_pDatabaseNameLabel;
+ VclPtr<Edit> m_pDatabaseName;
+ VclPtr<RadioButton> m_pHostPortRadio;
+ VclPtr<RadioButton> m_pSocketRadio;
+ VclPtr<RadioButton> m_pNamedPipeRadio;
+ VclPtr<FixedText> m_pHostNameLabel;
+ VclPtr<Edit> m_pHostName;
+ VclPtr<FixedText> m_pPortLabel;
+ VclPtr<NumericField> m_pPort;
+ VclPtr<FixedText> m_pDefaultPort;
+ VclPtr<Edit> m_pSocket;
+ VclPtr<Edit> m_pNamedPipe;
::svt::ControlDependencyManager
m_aControlDependencies;
public:
MySQLNativeSettings( vcl::Window& _rParent, const Link& _rControlModificationLink );
-
+ virtual ~MySQLNativeSettings();
+ virtual void dispose() SAL_OVERRIDE;
void fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList );
void fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList );
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index 77f4278104a3..1d6438c7884d 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -231,7 +231,7 @@ namespace dbaui
is modified. The implementation just calls callModifiedHdl.
*/
DECL_LINK(OnControlModified, void*);
- DECL_LINK(OnTestConnectionClickHdl,PushButton*);
+ DECL_LINK(OnTestConnectionClickHdl, PushButton*);
/// may be used in SetXXXHdl calls to controls, is a link to <method>OnControlModified</method>
virtual Link getControlModifiedLink() { return LINK(this, OGenericAdministrationPage, OnControlModified); }
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 707645b93ac1..27d83e58522c 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -368,6 +368,12 @@ OAddTableDlg::~OAddTableDlg()
void OAddTableDlg::dispose()
{
m_rContext.onWindowClosing( this );
+ m_pCaseTables.clear();
+ m_pCaseQueries.clear();
+ m_pTableList.clear();
+ m_pQueryList.clear();
+ m_pAddButton.clear();
+ m_pCloseButton.clear();
ModelessDialog::dispose();
}
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index d9d36cdfc36c..859decf8f89b 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -48,7 +48,7 @@ namespace dbaui
// SpecialSettingsPage
struct BooleanSettingDesc
{
- CheckBox** ppControl; // the dialog's control which displays this setting
+ VclPtr<CheckBox>& ppControl; // the dialog's control which displays this setting
OString sControlId; // the widget name of the control in the .ui
sal_uInt16 nItemId; // the ID of the item (in an SfxItemSet) which corresponds to this setting
bool bInvertedDisplay; // true if and only if the checkbox is checked when the item is sal_False, and vice versa
@@ -95,14 +95,14 @@ namespace dbaui
sal_uInt16 nItemId = setting->nItemId;
if ( rFeatures.has( nItemId ) )
{
- get((*setting->ppControl), setting->sControlId);
- (*setting->ppControl)->SetClickHdl( getControlModifiedLink() );
- (*setting->ppControl)->Show();
+ get(setting->ppControl, setting->sControlId);
+ setting->ppControl->SetClickHdl( getControlModifiedLink() );
+ setting->ppControl->Show();
// check whether this must be a tristate check box
const SfxPoolItem& rItem = _rCoreAttrs.Get( nItemId );
if ( rItem.ISA( OptionalBoolItem ) )
- (*setting->ppControl)->EnableTriState( true );
+ setting->ppControl->EnableTriState( true );
}
}
@@ -140,6 +140,26 @@ namespace dbaui
void SpecialSettingsPage::dispose()
{
m_aControlDependencies.clear();
+ m_pIsSQL92Check.clear();
+ m_pAppendTableAlias.clear();
+ m_pAsBeforeCorrelationName.clear();
+ m_pEnableOuterJoin.clear();
+ m_pIgnoreDriverPrivileges.clear();
+ m_pParameterSubstitution.clear();
+ m_pSuppressVersionColumn.clear();
+ m_pCatalog.clear();
+ m_pSchema.clear();
+ m_pIndexAppendix.clear();
+ m_pDosLineEnds.clear();
+ m_pCheckRequiredFields.clear();
+ m_pIgnoreCurrency.clear();
+ m_pEscapeDateTime.clear();
+ m_pPrimaryKeySupport.clear();
+ m_pRespectDriverResultSetType.clear();
+ m_pBooleanComparisonModeLabel.clear();
+ m_pBooleanComparisonMode.clear();
+ m_pMaxRowScanLabel.clear();
+ m_pMaxRowScan.clear();
OGenericAdministrationPage::dispose();
}
@@ -149,28 +169,28 @@ namespace dbaui
// for easier maintenance, write the table in this form, then copy it to m_aBooleanSettings
BooleanSettingDesc aSettings[] = {
- { &m_pIsSQL92Check, "usesql92", DSID_SQL92CHECK, false },
- { &m_pAppendTableAlias, "append", DSID_APPEND_TABLE_ALIAS, false },
- { &m_pAsBeforeCorrelationName, "useas", DSID_AS_BEFORE_CORRNAME, false },
- { &m_pEnableOuterJoin, "useoj", DSID_ENABLEOUTERJOIN, false },
- { &m_pIgnoreDriverPrivileges, "ignoreprivs", DSID_IGNOREDRIVER_PRIV, false },
- { &m_pParameterSubstitution, "replaceparams", DSID_PARAMETERNAMESUBST, false },
- { &m_pSuppressVersionColumn, "displayver", DSID_SUPPRESSVERSIONCL, true },
- { &m_pCatalog, "usecatalogname", DSID_CATALOG, false },
- { &m_pSchema, "useschemaname", DSID_SCHEMA, false },
- { &m_pIndexAppendix, "createindex", DSID_INDEXAPPENDIX, false },
- { &m_pDosLineEnds, "eol", DSID_DOSLINEENDS, false },
- { &m_pCheckRequiredFields, "inputchecks", DSID_CHECK_REQUIRED_FIELDS, false },
- { &m_pIgnoreCurrency, "ignorecurrency", DSID_IGNORECURRENCY, false },
- { &m_pEscapeDateTime, "useodbcliterals", DSID_ESCAPE_DATETIME, false },
- { &m_pPrimaryKeySupport, "primarykeys", DSID_PRIMARY_KEY_SUPPORT, false },
- { &m_pRespectDriverResultSetType, "resulttype", DSID_RESPECTRESULTSETTYPE, false },
- { NULL, "", 0, false }
+ { m_pIsSQL92Check, "usesql92", DSID_SQL92CHECK, false },
+ { m_pAppendTableAlias, "append", DSID_APPEND_TABLE_ALIAS, false },
+ { m_pAsBeforeCorrelationName, "useas", DSID_AS_BEFORE_CORRNAME, false },
+ { m_pEnableOuterJoin, "useoj", DSID_ENABLEOUTERJOIN, false },
+ { m_pIgnoreDriverPrivileges, "ignoreprivs", DSID_IGNOREDRIVER_PRIV, false },
+ { m_pParameterSubstitution, "replaceparams", DSID_PARAMETERNAMESUBST, false },
+ { m_pSuppressVersionColumn, "displayver", DSID_SUPPRESSVERSIONCL, true },
+ { m_pCatalog, "usecatalogname", DSID_CATALOG, false },
+ { m_pSchema, "useschemaname", DSID_SCHEMA, false },
+ { m_pIndexAppendix, "createindex", DSID_INDEXAPPENDIX, false },
+ { m_pDosLineEnds, "eol", DSID_DOSLINEENDS, false },
+ { m_pCheckRequiredFields, "ignorecurrency", DSID_CHECK_REQUIRED_FIELDS, false },
+ { m_pIgnoreCurrency, "inputchecks", DSID_IGNORECURRENCY, false },
+ { m_pEscapeDateTime, "useodbcliterals", DSID_ESCAPE_DATETIME, false },
+ { m_pPrimaryKeySupport, "primarykeys", DSID_PRIMARY_KEY_SUPPORT, false },
+ { m_pRespectDriverResultSetType, "resulttype", DSID_RESPECTRESULTSETTYPE, false },
+ { NULL, "", 0, false }
};
- for ( const BooleanSettingDesc* pCopy = aSettings; pCopy->nItemId != 0; ++pCopy )
+ for ( const BooleanSettingDesc& pCopy : aSettings )
{
- m_aBooleanSettings.push_back( *pCopy );
+ m_aBooleanSettings.push_back( pCopy );
}
}
@@ -193,9 +213,9 @@ namespace dbaui
++setting
)
{
- if ( *setting->ppControl )
+ if ( setting->ppControl )
{
- _rControlList.push_back( new OSaveValueWrapper< CheckBox >( *setting->ppControl ) );
+ _rControlList.push_back( new OSaveValueWrapper< CheckBox >( setting->ppControl ) );
}
}
@@ -223,7 +243,7 @@ namespace dbaui
++setting
)
{
- if ( !*setting->ppControl )
+ if ( !setting->ppControl )
continue;
::boost::optional< bool > aValue(false);
@@ -243,14 +263,14 @@ namespace dbaui
if ( !aValue )
{
- (*setting->ppControl)->SetState( TRISTATE_INDET );
+ setting->ppControl->SetState( TRISTATE_INDET );
}
else
{
bool bValue = *aValue;
if ( setting->bInvertedDisplay )
bValue = !bValue;
- (*setting->ppControl)->Check( bValue );
+ setting->ppControl->Check( bValue );
}
}
@@ -280,9 +300,9 @@ namespace dbaui
++setting
)
{
- if ( !*setting->ppControl )
+ if ( !setting->ppControl )
continue;
- fillBool( *_rSet, *setting->ppControl, setting->nItemId, bChangedSomething, setting->bInvertedDisplay );
+ fillBool( *_rSet, setting->ppControl, setting->nItemId, bChangedSomething, setting->bInvertedDisplay );
}
// the non-boolean items
@@ -329,6 +349,12 @@ namespace dbaui
void GeneratedValuesPage::dispose()
{
m_aControlDependencies.clear();
+ m_pAutoFrame.clear();
+ m_pAutoRetrievingEnabled.clear();
+ m_pAutoIncrementLabel.clear();
+ m_pAutoIncrement.clear();
+ m_pAutoRetrievingLabel.clear();
+ m_pAutoRetrieving.clear();
OGenericAdministrationPage::dispose();
}
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx
index 40f1643cd036..7c08e920a687 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.hxx
@@ -40,28 +40,28 @@ namespace dbaui
class SpecialSettingsPage : public OGenericAdministrationPage
{
protected:
- CheckBox* m_pIsSQL92Check;
- CheckBox* m_pAppendTableAlias;
- CheckBox* m_pAsBeforeCorrelationName;
- CheckBox* m_pEnableOuterJoin;
- CheckBox* m_pIgnoreDriverPrivileges;
- CheckBox* m_pParameterSubstitution;
- CheckBox* m_pSuppressVersionColumn;
- CheckBox* m_pCatalog;
- CheckBox* m_pSchema;
- CheckBox* m_pIndexAppendix;
- CheckBox* m_pDosLineEnds;
- CheckBox* m_pCheckRequiredFields;
- CheckBox* m_pIgnoreCurrency;
- CheckBox* m_pEscapeDateTime;
- CheckBox* m_pPrimaryKeySupport;
- CheckBox* m_pRespectDriverResultSetType;
-
- FixedText* m_pBooleanComparisonModeLabel;
- ListBox* m_pBooleanComparisonMode;
-
- FixedText* m_pMaxRowScanLabel;
- NumericField* m_pMaxRowScan;
+ VclPtr<CheckBox> m_pIsSQL92Check;
+ VclPtr<CheckBox> m_pAppendTableAlias;
+ VclPtr<CheckBox> m_pAsBeforeCorrelationName;
+ VclPtr<CheckBox> m_pEnableOuterJoin;
+ VclPtr<CheckBox> m_pIgnoreDriverPrivileges;
+ VclPtr<CheckBox> m_pParameterSubstitution;
+ VclPtr<CheckBox> m_pSuppressVersionColumn;
+ VclPtr<CheckBox> m_pCatalog;
+ VclPtr<CheckBox> m_pSchema;
+ VclPtr<CheckBox> m_pIndexAppendix;
+ VclPtr<CheckBox> m_pDosLineEnds;
+ VclPtr<CheckBox> m_pCheckRequiredFields;
+ VclPtr<CheckBox> m_pIgnoreCurrency;
+ VclPtr<CheckBox> m_pEscapeDateTime;
+ VclPtr<CheckBox> m_pPrimaryKeySupport;
+ VclPtr<CheckBox> m_pRespectDriverResultSetType;
+
+ VclPtr<FixedText> m_pBooleanComparisonModeLabel;
+ VclPtr<ListBox> m_pBooleanComparisonMode;
+
+ VclPtr<FixedText> m_pMaxRowScanLabel;
+ VclPtr<NumericField> m_pMaxRowScan;
::svt::ControlDependencyManager
m_aControlDependencies;
@@ -98,12 +98,12 @@ namespace dbaui
{
protected:
- VclFrame* m_pAutoFrame;
- CheckBox* m_pAutoRetrievingEnabled;
- FixedText* m_pAutoIncrementLabel;
- Edit* m_pAutoIncrement;
- FixedText* m_pAutoRetrievingLabel;
- Edit* m_pAutoRetrieving;
+ VclPtr<VclFrame> m_pAutoFrame;
+ VclPtr<CheckBox> m_pAutoRetrievingEnabled;
+ VclPtr<FixedText> m_pAutoIncrementLabel;
+ VclPtr<Edit> m_pAutoIncrement;
+ VclPtr<FixedText> m_pAutoRetrievingLabel;
+ VclPtr<Edit> m_pAutoRetrieving;
::svt::ControlDependencyManager
m_aControlDependencies;
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 1493734256b1..223f5a167cb4 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -76,6 +76,25 @@ ODbaseIndexDialog::ODbaseIndexDialog(vcl::Window * pParent, const OUString& aDat
SetCtrls();
}
+ODbaseIndexDialog::~ODbaseIndexDialog()
+{
+ dispose();
+}
+
+void ODbaseIndexDialog::dispose()
+{
+ m_pPB_OK.clear();
+ m_pCB_Tables.clear();
+ m_pIndexes.clear();
+ m_pLB_TableIndexes.clear();
+ m_pLB_FreeIndexes.clear();
+ m_pAdd.clear();
+ m_pRemove.clear();
+ m_pAddAll.clear();
+ m_pRemoveAll.clear();
+ ModalDialog::dispose();
+}
+
bool ODbaseIndexDialog::GetTable(const OUString& _rName, TableInfoList::iterator& _rPosition)
{
for ( _rPosition = m_aTableInfoList.begin();
diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx
index 58aae3b04091..46aac76028af 100644
--- a/dbaccess/source/ui/dlg/dbfindex.hxx
+++ b/dbaccess/source/ui/dlg/dbfindex.hxx
@@ -73,16 +73,16 @@ typedef ::std::list< OTableInfo > TableInfoList;
class ODbaseIndexDialog : public ModalDialog
{
protected:
- OKButton* m_pPB_OK;
- ComboBox* m_pCB_Tables;
- VclContainer* m_pIndexes;
- ListBox* m_pLB_TableIndexes;
- ListBox* m_pLB_FreeIndexes;
+ VclPtr<OKButton> m_pPB_OK;
+ VclPtr<ComboBox> m_pCB_Tables;
+ VclPtr<VclContainer> m_pIndexes;
+ VclPtr<ListBox> m_pLB_TableIndexes;
+ VclPtr<ListBox> m_pLB_FreeIndexes;
- PushButton* m_pAdd;
- PushButton* m_pRemove;
- PushButton* m_pAddAll;
- PushButton* m_pRemoveAll;
+ VclPtr<PushButton> m_pAdd;
+ VclPtr<PushButton> m_pRemove;
+ VclPtr<PushButton> m_pAddAll;
+ VclPtr<PushButton> m_pRemoveAll;
DECL_LINK( TableSelectHdl, ComboBox* );
DECL_LINK( AddClickHdl, PushButton* );
@@ -113,6 +113,8 @@ protected:
public:
ODbaseIndexDialog( vcl::Window * pParent, const OUString& aDataSrcName );
+ virtual ~ODbaseIndexDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 0852c7550522..b255353d5592 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -270,6 +270,9 @@ ODbTypeWizDialogSetup::~ODbTypeWizDialogSetup()
void ODbTypeWizDialogSetup::dispose()
{
delete m_pOutSet;
+ m_pGeneralPage.clear();
+ m_pMySQLIntroPage.clear();
+ m_pFinalPage.clear();
svt::RoadmapWizard::dispose();
}
@@ -426,7 +429,7 @@ Reference< XDriver > ODbTypeWizDialogSetup::getDriver()
::dbaccess::DATASOURCE_TYPE LocDatabaseType = _DatabaseType;
if ((LocDatabaseType == ::dbaccess::DST_MYSQL_JDBC) || (LocDatabaseType == ::dbaccess::DST_MYSQL_ODBC) || (LocDatabaseType == ::dbaccess::DST_MYSQL_NATIVE))
{
- if (m_pMySQLIntroPage != NULL)
+ if (m_pMySQLIntroPage != nullptr)
{
switch( m_pMySQLIntroPage->getMySQLMode() )
{
@@ -445,7 +448,7 @@ Reference< XDriver > ODbTypeWizDialogSetup::getDriver()
OUString ODbTypeWizDialogSetup::getDatasourceType(const SfxItemSet& _rSet) const
{
OUString sRet = dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(_rSet);
- if (m_pMySQLIntroPage != NULL && m_pMySQLIntroPage->IsVisible() )
+ if (m_pMySQLIntroPage != nullptr && m_pMySQLIntroPage->IsVisible() )
{
switch( m_pMySQLIntroPage->getMySQLMode() )
{
@@ -740,7 +743,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPageWizard::eOpenExisting )
return true;
- if ( m_pFinalPage != NULL )
+ if ( m_pFinalPage != nullptr )
return m_pFinalPage->IsDatabaseDocumentToBeOpened();
return true;
@@ -751,7 +754,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPageWizard::eOpenExisting )
return false;
- if ( m_pFinalPage != NULL )
+ if ( m_pFinalPage != nullptr )
return m_pFinalPage->IsTableWizardToBeStarted();
return false;
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index a4e5d5c7b221..21d386dab769 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -102,21 +102,15 @@ namespace dbaui
void OCommonBehaviourTabPage::dispose()
{
- if(m_bDelete)
- {
- DELETEZ(m_pOptionsLabel);
- DELETEZ(m_pOptions);
-
- DELETEZ(m_pCharsetLabel);
- DELETEZ(m_pCharset);
-
- DELETEZ(m_pAutoIncrementLabel);
- DELETEZ(m_pAutoIncrement);
-
- DELETEZ(m_pAutoRetrievingEnabled);
- DELETEZ(m_pAutoRetrievingLabel);
- DELETEZ(m_pAutoRetrieving);
- }
+ m_pOptionsLabel.clear();
+ m_pOptions.clear();
+ m_pCharsetLabel.clear();
+ m_pCharset.clear();
+ m_pAutoIncrementLabel.clear();
+ m_pAutoIncrement.clear();
+ m_pAutoRetrievingEnabled.clear();
+ m_pAutoRetrievingLabel.clear();
+ m_pAutoRetrieving.clear();
OGenericAdministrationPage::dispose();
}
@@ -199,6 +193,19 @@ namespace dbaui
m_pShowDeleted->SetClickHdl(LINK(this, ODbaseDetailsPage, OnButtonClicked));
}
+ ODbaseDetailsPage::~ODbaseDetailsPage()
+ {
+ dispose();
+ }
+
+ void ODbaseDetailsPage::dispose()
+ {
+ m_pShowDeleted.clear();
+ m_pFT_Message.clear();
+ m_pIndexes.clear();
+ OCommonBehaviourTabPage::dispose();
+ }
+
SfxTabPage* ODriversSettings::CreateDbase( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
{
return ( new ODbaseDetailsPage( pParent, *_rAttrSet ) );
@@ -274,6 +281,17 @@ namespace dbaui
m_pUseCatalog->SetToggleHdl(getControlModifiedLink());
}
+ OOdbcDetailsPage::~OOdbcDetailsPage()
+ {
+ dispose();
+ }
+
+ void OOdbcDetailsPage::dispose()
+ {
+ m_pUseCatalog.clear();
+ OCommonBehaviourTabPage::dispose();
+ }
+
SfxTabPage* ODriversSettings::CreateODBC( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
{
return ( new OOdbcDetailsPage( pParent, *_rAttrSet ) );
@@ -312,6 +330,22 @@ namespace dbaui
m_pUseCatalog->SetToggleHdl(getControlModifiedLink());
}
+ OUserDriverDetailsPage::~OUserDriverDetailsPage()
+ {
+ dispose();
+ }
+
+ void OUserDriverDetailsPage::dispose()
+ {
+ m_pFTHostname.clear();
+ m_pEDHostname.clear();
+ m_pPortNumber.clear();
+ m_pNFPortNumber.clear();
+ m_pUseCatalog.clear();
+ OCommonBehaviourTabPage::dispose();
+ }
+
+
SfxTabPage* ODriversSettings::CreateUser( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
{
return ( new OUserDriverDetailsPage( pParent, *_rAttrSet ) );
@@ -418,6 +452,23 @@ namespace dbaui
m_pEDSocket->SetModifyHdl(getControlModifiedLink());
}
+ OGeneralSpecialJDBCDetailsPage::~OGeneralSpecialJDBCDetailsPage()
+ {
+ dispose();
+ }
+
+ void OGeneralSpecialJDBCDetailsPage::dispose()
+ {
+ m_pEDHostname.clear();
+ m_pNFPortNumber.clear();
+ m_pFTSocket.clear();
+ m_pEDSocket.clear();
+ m_pFTDriverClass.clear();
+ m_pEDDriverClass.clear();
+ m_pTestJavaDriver.clear();
+ OCommonBehaviourTabPage::dispose();
+ }
+
bool OGeneralSpecialJDBCDetailsPage::FillItemSet( SfxItemSet* _rSet )
{
bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet);
@@ -528,6 +579,11 @@ namespace dbaui
void MySQLNativePage::dispose()
{
m_aMySQLSettings.disposeAndClear();
+ m_pSeparator1.clear();
+ m_pSeparator2.clear();
+ m_pUserNameLabel.clear();
+ m_pUserName.clear();
+ m_pPasswordRequired.clear();
OCommonBehaviourTabPage::dispose();
}
@@ -621,6 +677,20 @@ namespace dbaui
m_pCBUseSSL->SetClickHdl(LINK(this, OLDAPDetailsPage,OnCheckBoxClick));
}
+ OLDAPDetailsPage::~OLDAPDetailsPage()
+ {
+ dispose();
+ }
+
+ void OLDAPDetailsPage::dispose()
+ {
+ m_pETBaseDN.clear();
+ m_pCBUseSSL.clear();
+ m_pNFPortNumber.clear();
+ m_pNFRowCount.clear();
+ OCommonBehaviourTabPage::dispose();
+ }
+
SfxTabPage* ODriversSettings::CreateLDAP( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
{
return ( new OLDAPDetailsPage( pParent, *_rAttrSet ) );
@@ -692,7 +762,7 @@ namespace dbaui
void OTextDetailsPage::dispose()
{
- DELETEZ(m_pTextConnectionHelper);
+ m_pTextConnectionHelper.clear();
OCommonBehaviourTabPage::dispose();
}
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx
index de17ed7f83e8..eab91149949c 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -50,17 +50,17 @@ namespace dbaui
{
protected:
- FixedText* m_pOptionsLabel;
- Edit* m_pOptions;
+ VclPtr<FixedText> m_pOptionsLabel;
+ VclPtr<Edit> m_pOptions;
- FixedText* m_pCharsetLabel;
- CharSetListBox* m_pCharset;
+ VclPtr<FixedText> m_pCharsetLabel;
+ VclPtr<CharSetListBox> m_pCharset;
- CheckBox* m_pAutoRetrievingEnabled;
- FixedText* m_pAutoIncrementLabel;
- Edit* m_pAutoIncrement;
- FixedText* m_pAutoRetrievingLabel;
- Edit* m_pAutoRetrieving;
+ VclPtr<CheckBox> m_pAutoRetrievingEnabled;
+ VclPtr<FixedText> m_pAutoIncrementLabel;
+ VclPtr<Edit> m_pAutoIncrement;
+ VclPtr<FixedText> m_pAutoRetrievingLabel;
+ VclPtr<Edit> m_pAutoRetrieving;
sal_uInt32 m_nControlFlags;
@@ -93,10 +93,12 @@ namespace dbaui
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
ODbaseDetailsPage(vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
+ virtual ~ODbaseDetailsPage();
+ virtual void dispose() SAL_OVERRIDE;
private:
- CheckBox* m_pShowDeleted;
- FixedText* m_pFT_Message;
- PushButton* m_pIndexes;
+ VclPtr<CheckBox> m_pShowDeleted;
+ VclPtr<FixedText> m_pFT_Message;
+ VclPtr<PushButton> m_pIndexes;
OUString m_sDsn;
@@ -121,10 +123,12 @@ namespace dbaui
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
OOdbcDetailsPage( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs );
+ virtual ~OOdbcDetailsPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
private:
- CheckBox* m_pUseCatalog;
+ VclPtr<CheckBox> m_pUseCatalog;
};
// OUserDriverDetailsPage
@@ -134,16 +138,18 @@ namespace dbaui
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
OUserDriverDetailsPage( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs );
+ virtual ~OUserDriverDetailsPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
private:
- FixedText* m_pFTHostname;
- Edit* m_pEDHostname;
- FixedText* m_pPortNumber;
- NumericField* m_pNFPortNumber;
- CheckBox* m_pUseCatalog;
+ VclPtr<FixedText> m_pFTHostname;
+ VclPtr<Edit> m_pEDHostname;
+ VclPtr<FixedText> m_pPortNumber;
+ VclPtr<NumericField> m_pNFPortNumber;
+ VclPtr<CheckBox> m_pUseCatalog;
};
// OMySQLODBCDetailsPage
@@ -162,6 +168,8 @@ namespace dbaui
, sal_uInt16 _nPortId
, bool bShowSocket = true
);
+ virtual ~OGeneralSpecialJDBCDetailsPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
@@ -171,14 +179,14 @@ namespace dbaui
DECL_LINK(OnTestJavaClickHdl,PushButton*);
DECL_LINK(OnEditModified,Edit*);
- Edit* m_pEDHostname;
- NumericField* m_pNFPortNumber;
- FixedText* m_pFTSocket;
- Edit* m_pEDSocket;
+ VclPtr<Edit> m_pEDHostname;
+ VclPtr<NumericField> m_pNFPortNumber;
+ VclPtr<FixedText> m_pFTSocket;
+ VclPtr<Edit> m_pEDSocket;
- FixedText* m_pFTDriverClass;
- Edit* m_pEDDriverClass;
- PushButton* m_pTestJavaDriver;
+ VclPtr<FixedText> m_pFTDriverClass;
+ VclPtr<Edit> m_pEDDriverClass;
+ VclPtr<PushButton> m_pTestJavaDriver;
OUString m_sDefaultJdbcDriverName;
sal_uInt16 m_nPortId;
@@ -195,13 +203,13 @@ namespace dbaui
virtual void dispose() SAL_OVERRIDE;
private:
- FixedText *m_pSeparator1;
+ VclPtr<FixedText> m_pSeparator1;
VclPtr<MySQLNativeSettings> m_aMySQLSettings;
- FixedText *m_pSeparator2;
- FixedText *m_pUserNameLabel;
- Edit *m_pUserName;
- CheckBox *m_pPasswordRequired;
+ VclPtr<FixedText> m_pSeparator2;
+ VclPtr<FixedText> m_pUserNameLabel;
+ VclPtr<Edit> m_pUserName;
+ VclPtr<CheckBox> m_pPasswordRequired;
protected:
virtual bool FillItemSet( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
@@ -217,13 +225,15 @@ namespace dbaui
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
OLDAPDetailsPage( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs );
+ virtual ~OLDAPDetailsPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
private:
- Edit* m_pETBaseDN;
- CheckBox* m_pCBUseSSL;
- NumericField* m_pNFPortNumber;
- NumericField* m_pNFRowCount;
+ VclPtr<Edit> m_pETBaseDN;
+ VclPtr<CheckBox> m_pCBUseSSL;
+ VclPtr<NumericField> m_pNFPortNumber;
+ VclPtr<NumericField> m_pNFRowCount;
sal_Int32 m_iSSLPort;
sal_Int32 m_iNormalPort;
@@ -244,7 +254,7 @@ namespace dbaui
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
OTextDetailsPage( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs );
- OTextConnectionHelper* m_pTextConnectionHelper;
+ VclPtr<OTextConnectionHelper> m_pTextConnectionHelper;
protected:
virtual ~OTextDetailsPage();
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index a4995a2af317..1f001bd83d6f 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -85,6 +85,13 @@ namespace dbaui
::osl::MutexGuard aGuard(m_aMutex);
stopAllComponentListening();
}
+ m_pSQL.clear();
+ m_pExecute.clear();
+ m_pSQLHistory.clear();
+ m_pStatus.clear();
+ m_pShowOutput.clear();
+ m_pOutput.clear();
+ m_pClose.clear();
ModalDialog::dispose();
}
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index 7ca8febaeec8..6daba84892ba 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -48,14 +48,14 @@ namespace dbaui
class OSaveAsDlgImpl
{
public:
- FixedText* m_pDescription;
- FixedText* m_pCatalogLbl;
- OSQLNameComboBox* m_pCatalog;
- FixedText* m_pSchemaLbl;
- OSQLNameComboBox* m_pSchema;
- FixedText* m_pLabel;
- OSQLNameEdit* m_pTitle;
- OKButton* m_pPB_OK;
+ VclPtr<FixedText> m_pDescription;
+ VclPtr<FixedText> m_pCatalogLbl;
+ VclPtr<OSQLNameComboBox> m_pCatalog;
+ VclPtr<FixedText> m_pSchemaLbl;
+ VclPtr<OSQLNameComboBox> m_pSchema;
+ VclPtr<FixedText> m_pLabel;
+ VclPtr<OSQLNameEdit> m_pTitle;
+ VclPtr<OKButton> m_pPB_OK;
OUString m_aQryLabel;
OUString m_sTblLabel;
OUString m_aName;
diff --git a/dbaccess/source/ui/dlg/dlgsize.cxx b/dbaccess/source/ui/dlg/dlgsize.cxx
index 11750ab0917a..b3e337527479 100644
--- a/dbaccess/source/ui/dlg/dlgsize.cxx
+++ b/dbaccess/source/ui/dlg/dlgsize.cxx
@@ -51,6 +51,19 @@ DlgSize::DlgSize( vcl::Window* pParent, sal_Int32 nVal, bool bRow, sal_Int32 _nA
LINK(this,DlgSize,CbClickHdl).Call(m_pCB_STANDARD);
}
+DlgSize::~DlgSize()
+{
+ dispose();
+}
+
+void DlgSize::dispose()
+{
+ m_pMF_VALUE.clear();
+ m_pCB_STANDARD.clear();
+ ModalDialog::dispose();
+}
+
+
void DlgSize::SetValue( sal_Int32 nVal )
{
m_pMF_VALUE->SetValue(nVal, FUNIT_CM );
diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx
index 5151b78d335a..739504d6d8a3 100644
--- a/dbaccess/source/ui/dlg/dsselect.cxx
+++ b/dbaccess/source/ui/dlg/dsselect.cxx
@@ -70,6 +70,20 @@ ODatasourceSelectDialog::ODatasourceSelectDialog(vcl::Window* _pParent, const St
m_pDatasource->SetDoubleClickHdl(LINK(this,ODatasourceSelectDialog,ListDblClickHdl));
}
+ODatasourceSelectDialog::~ODatasourceSelectDialog()
+{
+ dispose();
+}
+
+void ODatasourceSelectDialog::dispose()
+{
+ m_pDatasource.clear();
+ m_pOk.clear();
+ m_pCancel.clear();
+ ModalDialog::dispose();
+}
+
+
IMPL_LINK( ODatasourceSelectDialog, ListDblClickHdl, ListBox *, pListBox )
{
if (pListBox->GetSelectEntryCount())
diff --git a/dbaccess/source/ui/dlg/dsselect.hxx b/dbaccess/source/ui/dlg/dsselect.hxx
index 16f06de3e40d..2cb4cb6537e6 100644
--- a/dbaccess/source/ui/dlg/dsselect.hxx
+++ b/dbaccess/source/ui/dlg/dsselect.hxx
@@ -41,19 +41,20 @@ namespace dbaui
class ODatasourceSelectDialog : public ModalDialog
{
protected:
- ListBox* m_pDatasource;
- OKButton* m_pOk;
- CancelButton* m_pCancel;
+ VclPtr<ListBox> m_pDatasource;
+ VclPtr<OKButton> m_pOk;
+ VclPtr<CancelButton> m_pCancel;
SfxItemSet* m_pOutputSet;
#ifdef HAVE_ODBC_ADMINISTRATION
- PushButton* m_pManageDatasources;
+ VclPtr<PushButton> m_pManageDatasources;
::std::unique_ptr< OOdbcManagement >
m_pODBCManagement;
#endif
public:
ODatasourceSelectDialog( vcl::Window* _pParent, const StringBag& _rDatasources, SfxItemSet* _pOutputSet = NULL );
-
+ virtual ~ODatasourceSelectDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetSelected() const { return m_pDatasource->GetSelectEntry();}
void Select( const OUString& _rEntry ) { m_pDatasource->SelectEntry(_rEntry); }
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index a11b42f956dd..323b30200582 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -74,6 +74,18 @@ namespace dbaui
m_pDatasourceType->SetSelectHdl(LINK(this, OGeneralPage, OnDatasourceTypeSelected));
}
+ OGeneralPage::~OGeneralPage()
+ {
+ dispose();
+ }
+
+ void OGeneralPage::dispose()
+ {
+ m_pSpecialMessage.clear();
+ m_pDatasourceType.clear();
+ OGenericAdministrationPage::dispose();
+ }
+
namespace
{
struct DisplayedType
@@ -533,6 +545,24 @@ namespace dbaui
m_pPB_OpenDatabase->SetClickHdl( LINK( this, OGeneralPageWizard, OnOpenDocument ) );
}
+ OGeneralPageWizard::~OGeneralPageWizard()
+ {
+ dispose();
+ }
+
+ void OGeneralPageWizard::dispose()
+ {
+ m_pRB_CreateDatabase.clear();
+ m_pRB_OpenExistingDatabase.clear();
+ m_pRB_ConnectDatabase.clear();
+ m_pFT_EmbeddedDBLabel.clear();
+ m_pEmbeddedDBType.clear();
+ m_pFT_DocListLabel.clear();
+ m_pLB_DocumentList.clear();
+ m_pPB_OpenDatabase.clear();
+ OGeneralPage::dispose();
+ }
+
OGeneralPageWizard::CreationMode OGeneralPageWizard::GetDatabaseCreationMode() const
{
if ( m_pRB_CreateDatabase->IsChecked() )
diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx
index 083d3f0cda25..6c5d3294f749 100644
--- a/dbaccess/source/ui/dlg/generalpage.hxx
+++ b/dbaccess/source/ui/dlg/generalpage.hxx
@@ -40,7 +40,7 @@ namespace dbaui
m_eNotSupportedKnownType; /// if a data source of an unsupported, but known type is encountered ....
private:
- FixedText* m_pSpecialMessage;
+ VclPtr<FixedText> m_pSpecialMessage;
enum SPECIAL_MESSAGE
{
@@ -56,7 +56,7 @@ namespace dbaui
void insertDatasourceTypeEntryData( const OUString& _sType, const OUString& sDisplayName );
protected:
- ListBox* m_pDatasourceType;
+ VclPtr<ListBox> m_pDatasourceType;
::dbaccess::ODsnTypeCollection*
m_pCollection; /// the DSN type collection instance
@@ -65,6 +65,9 @@ namespace dbaui
m_aURLPrefixes;
public:
+ virtual ~OGeneralPage();
+ virtual void dispose() SAL_OVERRIDE;
+
/// set a handler which gets called every time the user selects a new type
void SetTypeSelectHandler( const Link& _rHandler ) { m_aTypeSelectHandler = _rHandler; }
@@ -115,7 +118,8 @@ namespace dbaui
{
public:
OGeneralPageWizard( vcl::Window* pParent, const SfxItemSet& _rItems );
-
+ virtual ~OGeneralPageWizard();
+ virtual void dispose() SAL_OVERRIDE;
public:
enum CreationMode
{
@@ -132,16 +136,16 @@ namespace dbaui
private:
// dialog controls
- RadioButton* m_pRB_CreateDatabase;
- RadioButton* m_pRB_OpenExistingDatabase;
- RadioButton* m_pRB_ConnectDatabase;
+ VclPtr<RadioButton> m_pRB_CreateDatabase;
+ VclPtr<RadioButton> m_pRB_OpenExistingDatabase;
+ VclPtr<RadioButton> m_pRB_ConnectDatabase;
- FixedText* m_pFT_EmbeddedDBLabel;
- ListBox* m_pEmbeddedDBType;
+ VclPtr<FixedText> m_pFT_EmbeddedDBLabel;
+ VclPtr<ListBox> m_pEmbeddedDBType;
- FixedText* m_pFT_DocListLabel;
- OpenDocumentListBox* m_pLB_DocumentList;
- OpenDocumentButton* m_pPB_OpenDatabase;
+ VclPtr<FixedText> m_pFT_DocListLabel;
+ VclPtr<OpenDocumentListBox> m_pLB_DocumentList;
+ VclPtr<OpenDocumentButton> m_pPB_OpenDatabase;
// state
DocumentDescriptor m_aBrowsedDocument;
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 7377ac692a2e..c534142793ce 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -318,6 +318,15 @@ namespace dbaui
{
setToolBox(NULL);
delete m_pIndexes;
+ m_pActions.clear();
+ m_pIndexList.clear();
+ m_pIndexDetails.clear();
+ m_pDescriptionLabel.clear();
+ m_pDescription.clear();
+ m_pUnique.clear();
+ m_pFieldsLabel.clear();
+ m_pFields.clear();
+ m_pClose.clear();
ModalDialog::dispose();
}
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index 49a326f7b08d..a6aa0ab1b925 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -115,8 +115,8 @@ namespace dbaui
void IndexFieldsControl::dispose()
{
- delete m_pSortingCell;
- delete m_pFieldNameCell;
+ m_pSortingCell.clear();
+ m_pFieldNameCell.clear();
::svt::EditBrowseBox::dispose();
}
diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx
index 809c11f5b536..6e5c5aab9303 100644
--- a/dbaccess/source/ui/dlg/paramdialog.cxx
+++ b/dbaccess/source/ui/dlg/paramdialog.cxx
@@ -120,6 +120,11 @@ namespace dbaui
{
if (m_aResetVisitFlag.IsActive())
m_aResetVisitFlag.Stop();
+ m_pAllParams.clear();
+ m_pParam.clear();
+ m_pTravelNext.clear();
+ m_pOKBtn.clear();
+ m_pCancelBtn.clear();
ModalDialog::dispose();
}
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index 5648b84beecb..9f5ef85afd6c 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -190,6 +190,27 @@ DlgFilterCrit::DlgFilterCrit(vcl::Window * pParent,
m_pET_WHEREVALUE1->GrabFocus();
}
+DlgFilterCrit::~DlgFilterCrit()
+{
+ dispose();
+}
+
+void DlgFilterCrit::dispose()
+{
+ m_pLB_WHEREFIELD1.clear();
+ m_pLB_WHERECOMP1.clear();
+ m_pET_WHEREVALUE1.clear();
+ m_pLB_WHERECOND2.clear();
+ m_pLB_WHEREFIELD2.clear();
+ m_pLB_WHERECOMP2.clear();
+ m_pET_WHEREVALUE2.clear();
+ m_pLB_WHERECOND3.clear();
+ m_pLB_WHEREFIELD3.clear();
+ m_pLB_WHERECOMP3.clear();
+ m_pET_WHEREVALUE3.clear();
+ ModalDialog::dispose();
+}
+
#define LbText(x) ((x).GetSelectEntry())
#define LbPos(x) ((x).GetSelectEntryPos())
diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx
index 9a77bf8be5dc..5d7314f7dec6 100644
--- a/dbaccess/source/ui/dlg/queryorder.cxx
+++ b/dbaccess/source/ui/dlg/queryorder.cxx
@@ -125,6 +125,24 @@ DlgOrderCrit::DlgOrderCrit(vcl::Window * pParent,
m_pLB_ORDERFIELD2->SetSelectHdl(LINK(this,DlgOrderCrit,FieldListSelectHdl));
}
+DlgOrderCrit::~DlgOrderCrit()
+{
+ dispose();
+}
+
+void DlgOrderCrit::dispose()
+{
+ m_pLB_ORDERFIELD1.clear();
+ m_pLB_ORDERVALUE1.clear();
+ m_pLB_ORDERFIELD2.clear();
+ m_pLB_ORDERVALUE2.clear();
+ m_pLB_ORDERFIELD3.clear();
+ m_pLB_ORDERVALUE3.clear();
+ for (auto a : m_aColumnList) a.clear();
+ for (auto a : m_aValueList) a.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK_INLINE_START( DlgOrderCrit, FieldListSelectHdl, ListBox *, /*pListBox*/ )
{
EnableLines();
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 5bbd80b23bca..f4cbea70981b 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -292,8 +292,8 @@ namespace
class OExceptionChainDialog : public ModalDialog
{
- SvTreeListBox* m_pExceptionList;
- VclMultiLineEdit* m_pExceptionText;
+ VclPtr<SvTreeListBox> m_pExceptionList;
+ VclPtr<VclMultiLineEdit> m_pExceptionText;
OUString m_sStatusLabel;
OUString m_sErrorCodeLabel;
@@ -302,6 +302,13 @@ class OExceptionChainDialog : public ModalDialog
public:
OExceptionChainDialog( vcl::Window* pParent, const ExceptionDisplayChain& _rExceptions );
+ virtual ~OExceptionChainDialog() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ m_pExceptionList.clear();
+ m_pExceptionText.clear();
+ ModalDialog::dispose();
+ }
protected:
DECL_LINK(OnExceptionSelected, void*);
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 9b27593e09b4..7e452f143fa6 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -110,6 +110,9 @@ namespace dbaui
::comphelper::disposeComponent(m_xCurrentConnection);
}
catch (RuntimeException&) { }
+ m_pTables.clear();
+ m_pTablesList.clear();
+ m_pTablesDlg.clear();
OGenericAdministrationPage::dispose();
}
diff --git a/dbaccess/source/ui/dlg/tablespage.hxx b/dbaccess/source/ui/dlg/tablespage.hxx
index c8b50ddbda15..8a92d17a30e8 100644
--- a/dbaccess/source/ui/dlg/tablespage.hxx
+++ b/dbaccess/source/ui/dlg/tablespage.hxx
@@ -36,8 +36,8 @@ namespace dbaui
:public OGenericAdministrationPage
{
private:
- VclContainer* m_pTables;
- OTableTreeListBox* m_pTablesList;
+ VclPtr<VclContainer> m_pTables;
+ VclPtr<OTableTreeListBox> m_pTablesList;
OUString m_sCatalogSeparator;
bool m_bCatalogAtStart : 1;
@@ -46,7 +46,7 @@ namespace dbaui
m_xCurrentConnection; /// valid as long as the page is active
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator >
m_xCollator;
- OTableSubscriptionDialog* m_pTablesDlg;
+ VclPtr<OTableSubscriptionDialog> m_pTablesDlg;
public:
virtual bool FillItemSet(SfxItemSet* _rCoreAttrs) SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.cxx b/dbaccess/source/ui/dlg/textconnectionsettings.cxx
index a0eb3330917e..3a5583a3d046 100644
--- a/dbaccess/source/ui/dlg/textconnectionsettings.cxx
+++ b/dbaccess/source/ui/dlg/textconnectionsettings.cxx
@@ -39,6 +39,17 @@ namespace dbaui
m_pOK->SetClickHdl( LINK( this, TextConnectionSettingsDialog, OnOK ) );
}
+ TextConnectionSettingsDialog::~TextConnectionSettingsDialog()
+ {
+ dispose();
+ }
+
+ void TextConnectionSettingsDialog::dispose()
+ {
+ m_pOK.clear();
+ ModalDialog::dispose();
+ }
+
void TextConnectionSettingsDialog::bindItemStorages( SfxItemSet& _rSet, PropertyValues& _rValues )
{
_rValues[ PROPERTY_ID_HEADER_LINE ].reset( new SetItemPropertyStorage( _rSet, DSID_TEXTFILEHEADER ) );
diff --git a/dbaccess/source/ui/inc/CollectionView.hxx b/dbaccess/source/ui/inc/CollectionView.hxx
index 27abf7422d9f..f407b70bc918 100644
--- a/dbaccess/source/ui/inc/CollectionView.hxx
+++ b/dbaccess/source/ui/inc/CollectionView.hxx
@@ -34,12 +34,12 @@ namespace dbaui
*/
class OCollectionView : public ModalDialog
{
- FixedText* m_pFTCurrentPath;
- PushButton* m_pNewFolder;
- PushButton* m_pUp;
- SvtFileView* m_pView;
- Edit* m_pName;
- PushButton* m_pPB_OK;
+ VclPtr<FixedText> m_pFTCurrentPath;
+ VclPtr<PushButton> m_pNewFolder;
+ VclPtr<PushButton> m_pUp;
+ VclPtr<SvtFileView> m_pView;
+ VclPtr<Edit> m_pName;
+ VclPtr<PushButton> m_pPB_OK;
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent> m_xContent;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
bool m_bCreateForm;
@@ -56,7 +56,8 @@ namespace dbaui
,const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent
,const OUString& _sDefaultName
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext);
-
+ virtual ~OCollectionView();
+ virtual void dispose() SAL_OVERRIDE;
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent> getSelectedFolder() const { return m_xContent;}
OUString getName() const;
};
diff --git a/dbaccess/source/ui/inc/ConnectionLine.hxx b/dbaccess/source/ui/inc/ConnectionLine.hxx
index 6ae780d4705a..dfa2695e364a 100644
--- a/dbaccess/source/ui/inc/ConnectionLine.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLine.hxx
@@ -22,6 +22,7 @@
#include <tools/gen.hxx>
#include "ConnectionLineData.hxx"
#include <functional>
+#include <vcl/vclptr.hxx>
class OutputDevice;
namespace dbaui
@@ -38,7 +39,7 @@ namespace dbaui
class OTableConnection;
class OConnectionLine
{
- OTableConnection* m_pTabConn;
+ VclPtr<OTableConnection> m_pTabConn;
OConnectionLineDataRef m_pData;
Point m_aSourceConnPos,
diff --git a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
index ce3451097408..4cbb22ce3c91 100644
--- a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
#include <cppuhelper/implbase2.hxx>
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <vcl/vclptr.hxx>
namespace dbaui
{
@@ -35,7 +36,7 @@ namespace dbaui
class OConnectionLineAccess : public VCLXAccessibleComponent
, public OConnectionLineAccess_BASE
{
- const OTableConnection* m_pLine; // the window which I should give accessibility to
+ VclPtr<const OTableConnection> m_pLine; // the window which I should give accessibility to
protected:
/** this function is called upon disposing the component
*/
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx
index 9eb035fc9fda..6de1b7f4b8bc 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -65,40 +65,40 @@ namespace dbaui
class OFieldDescControl : public TabPage
{
private:
- OTableDesignHelpBar* pHelp;
- vcl::Window* pLastFocusWindow;
- vcl::Window* m_pActFocusWindow;
-
- FixedText* pDefaultText;
- FixedText* pRequiredText;
- FixedText* pAutoIncrementText;
- FixedText* pTextLenText;
- FixedText* pNumTypeText;
- FixedText* pLengthText;
- FixedText* pScaleText;
- FixedText* pFormatText;
- FixedText* pBoolDefaultText;
- FixedText* m_pColumnNameText;
- FixedText* m_pTypeText;
- FixedText* m_pAutoIncrementValueText;
-
- OPropListBoxCtrl* pRequired;
- OPropListBoxCtrl* pNumType;
- OPropListBoxCtrl* pAutoIncrement;
- OPropEditCtrl* pDefault;
- OPropNumericEditCtrl* pTextLen;
- OPropNumericEditCtrl* pLength;
- OPropNumericEditCtrl* pScale;
- OPropEditCtrl* pFormatSample;
- OPropListBoxCtrl* pBoolDefault;
- OPropColumnEditCtrl* m_pColumnName;
- OPropListBoxCtrl* m_pType;
- OPropEditCtrl* m_pAutoIncrementValue;
-
- PushButton* pFormat;
-
- ScrollBar* m_pVertScroll;
- ScrollBar* m_pHorzScroll;
+ VclPtr<OTableDesignHelpBar> pHelp;
+ VclPtr<vcl::Window> pLastFocusWindow;
+ VclPtr<vcl::Window> m_pActFocusWindow;
+
+ VclPtr<FixedText> pDefaultText;
+ VclPtr<FixedText> pRequiredText;
+ VclPtr<FixedText> pAutoIncrementText;
+ VclPtr<FixedText> pTextLenText;
+ VclPtr<FixedText> pNumTypeText;
+ VclPtr<FixedText> pLengthText;
+ VclPtr<FixedText> pScaleText;
+ VclPtr<FixedText> pFormatText;
+ VclPtr<FixedText> pBoolDefaultText;
+ VclPtr<FixedText> m_pColumnNameText;
+ VclPtr<FixedText> m_pTypeText;
+ VclPtr<FixedText> m_pAutoIncrementValueText;
+
+ VclPtr<OPropListBoxCtrl> pRequired;
+ VclPtr<OPropListBoxCtrl> pNumType;
+ VclPtr<OPropListBoxCtrl> pAutoIncrement;
+ VclPtr<OPropEditCtrl> pDefault;
+ VclPtr<OPropNumericEditCtrl> pTextLen;
+ VclPtr<OPropNumericEditCtrl> pLength;
+ VclPtr<OPropNumericEditCtrl> pScale;
+ VclPtr<OPropEditCtrl> pFormatSample;
+ VclPtr<OPropListBoxCtrl> pBoolDefault;
+ VclPtr<OPropColumnEditCtrl> m_pColumnName;
+ VclPtr<OPropListBoxCtrl> m_pType;
+ VclPtr<OPropEditCtrl> m_pAutoIncrementValue;
+
+ VclPtr<PushButton> pFormat;
+
+ VclPtr<ScrollBar> m_pVertScroll;
+ VclPtr<ScrollBar> m_pHorzScroll;
TOTypeInfoSP m_pPreviousType;
short m_nPos;
@@ -126,7 +126,7 @@ namespace dbaui
void UpdateFormatSample(OFieldDescription* pFieldDescr);
void ArrangeAggregates();
- void SetPosSize( Control** ppControl, long nRow, sal_uInt16 nCol );
+ void SetPosSize( VclPtr<Control>& rControl, long nRow, sal_uInt16 nCol );
void ScrollAggregate(Control* pText, Control* pInput, Control* pButton, long nDeltaX, long nDeltaY);
void ScrollAllAggregates();
diff --git a/dbaccess/source/ui/inc/JAccess.hxx b/dbaccess/source/ui/inc/JAccess.hxx
index d9642901a1e3..59c1c1f91b2a 100644
--- a/dbaccess/source/ui/inc/JAccess.hxx
+++ b/dbaccess/source/ui/inc/JAccess.hxx
@@ -21,6 +21,7 @@
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
#include <cppuhelper/implbase1.hxx>
+#include <vcl/vclptr.hxx>
namespace dbaui
{
@@ -32,7 +33,7 @@ namespace dbaui
*/
class OJoinDesignViewAccess : public VCLXAccessibleComponent, public OJoinDesignViewAccess_BASE
{
- OJoinTableView* m_pTableView; // the window which I should give accessibility to
+ VclPtr<OJoinTableView> m_pTableView; // the window which I should give accessibility to
protected:
/** isEditable returns the current editable state
diff --git a/dbaccess/source/ui/inc/JoinController.hxx b/dbaccess/source/ui/inc/JoinController.hxx
index bfbfc560544b..4fd57a929b86 100644
--- a/dbaccess/source/ui/inc/JoinController.hxx
+++ b/dbaccess/source/ui/inc/JoinController.hxx
@@ -51,7 +51,7 @@ namespace dbaui
Fraction m_aZoom;
::dbtools::SQLExceptionInfo m_aExceptionInfo;
- OAddTableDlg* m_pAddTableDialog;
+ VclPtr<OAddTableDlg> m_pAddTableDialog;
::std::unique_ptr< AddTableDialogContext > m_pDialogContext;
Point m_aMinimumTableViewSize;
diff --git a/dbaccess/source/ui/inc/JoinDesignView.hxx b/dbaccess/source/ui/inc/JoinDesignView.hxx
index 13de042e489a..da50da1e20ac 100644
--- a/dbaccess/source/ui/inc/JoinDesignView.hxx
+++ b/dbaccess/source/ui/inc/JoinDesignView.hxx
@@ -33,8 +33,8 @@ namespace dbaui
class OJoinDesignView : public ODataView
{
protected:
- OScrollWindowHelper* m_pScrollWindow; // contains only the scrollbars
- OJoinTableView* m_pTableView; // presents the upper window
+ VclPtr<OScrollWindowHelper> m_pScrollWindow; // contains only the scrollbars
+ VclPtr<OJoinTableView> m_pTableView; // presents the upper window
OJoinController& m_rController;
public:
diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx
index bec75b6103df..466d77c484e7 100644
--- a/dbaccess/source/ui/inc/JoinTableView.hxx
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -52,10 +52,10 @@ namespace dbaui
class OJoinTableView;
class OScrollWindowHelper : public vcl::Window
{
- VclPtr<ScrollBar> m_aHScrollBar;
- VclPtr<ScrollBar> m_aVScrollBar;
- vcl::Window* m_pCornerWindow;
- OJoinTableView* m_pTableView;
+ VclPtr<ScrollBar> m_aHScrollBar;
+ VclPtr<ScrollBar> m_aVScrollBar;
+ VclPtr<vcl::Window> m_pCornerWindow;
+ VclPtr<OJoinTableView> m_pTableView;
protected:
virtual void Resize() SAL_OVERRIDE;
@@ -82,11 +82,11 @@ namespace dbaui
friend class OJoinMoveTabWinUndoAct;
public:
- typedef std::map<OUString, OTableWindow*> OTableWindowMap;
+ typedef std::map<OUString, VclPtr<OTableWindow> > OTableWindowMap;
private:
OTableWindowMap m_aTableMap;
- ::std::vector<OTableConnection*> m_vTableConnection;
+ ::std::vector<VclPtr<OTableConnection> > m_vTableConnection;
Idle m_aDragScrollIdle;
Rectangle m_aDragRect;
@@ -97,9 +97,9 @@ namespace dbaui
Size m_aOutputSize;
- OTableWindow* m_pDragWin;
- OTableWindow* m_pSizingWin;
- OTableConnection* m_pSelectedConn;
+ VclPtr<OTableWindow> m_pDragWin;
+ VclPtr<OTableWindow> m_pSizingWin;
+ VclPtr<OTableConnection> m_pSelectedConn;
bool m_bTrackingInitiallyMoved;
@@ -107,8 +107,8 @@ namespace dbaui
DECL_LINK(OnDragScrollTimer, void*);
protected:
- OTableWindow* m_pLastFocusTabWin;
- OJoinDesignView* m_pView;
+ VclPtr<OTableWindow> m_pLastFocusTabWin;
+ VclPtr<OJoinDesignView> m_pView;
OJoinDesignViewAccess* m_pAccessible;
public:
@@ -183,7 +183,7 @@ namespace dbaui
/** gives a read only access to the connection vector
*/
- const ::std::vector<OTableConnection*>& getTableConnections() const { return m_vTableConnection; }
+ const ::std::vector<VclPtr<OTableConnection> >& getTableConnections() const { return m_vTableConnection; }
bool ExistsAConn(const OTableWindow* pFromWin) const;
@@ -192,7 +192,7 @@ namespace dbaui
@param _pFromWin the table for which connections should be found
@return an iterator which can be used to travel all connections of the table
*/
- ::std::vector<OTableConnection*>::const_iterator getTableConnections(const OTableWindow* _pFromWin) const;
+ ::std::vector<VclPtr<OTableConnection> >::const_iterator getTableConnections(const OTableWindow* _pFromWin) const;
/** how many connection belongs to single table
diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx
index 347989376717..04d2724f94f1 100644
--- a/dbaccess/source/ui/inc/QueryDesignView.hxx
+++ b/dbaccess/source/ui/inc/QueryDesignView.hxx
@@ -69,7 +69,7 @@ namespace dbaui
::com::sun::star::lang::Locale m_aLocale;
OUString m_sDecimalSep;
- OSelectionBrowseBox* m_pSelectionBox; // presents the lower window
+ VclPtr<OSelectionBrowseBox> m_pSelectionBox; // presents the lower window
ChildFocusState m_eChildFocus;
bool m_bInSplitHandler;
diff --git a/dbaccess/source/ui/inc/QueryPropertiesDialog.hxx b/dbaccess/source/ui/inc/QueryPropertiesDialog.hxx
index bb7b9bcac2a7..a083b4cca893 100644
--- a/dbaccess/source/ui/inc/QueryPropertiesDialog.hxx
+++ b/dbaccess/source/ui/inc/QueryPropertiesDialog.hxx
@@ -29,16 +29,17 @@ public:
QueryPropertiesDialog(
vcl::Window* pParent, const bool bDistinct, const sal_Int64 nLimit );
-
+ virtual ~QueryPropertiesDialog();
+ virtual void dispose() SAL_OVERRIDE;
bool getDistinct() const;
sal_Int64 getLimit() const;
private:
- RadioButton* m_pRB_Distinct;
- RadioButton* m_pRB_NonDistinct;
+ VclPtr<RadioButton> m_pRB_Distinct;
+ VclPtr<RadioButton> m_pRB_NonDistinct;
- LimitBox* m_pLB_Limit;
+ VclPtr<LimitBox> m_pLB_Limit;
};
diff --git a/dbaccess/source/ui/inc/QueryTextView.hxx b/dbaccess/source/ui/inc/QueryTextView.hxx
index 78fbc7d6d158..c467993a6c68 100644
--- a/dbaccess/source/ui/inc/QueryTextView.hxx
+++ b/dbaccess/source/ui/inc/QueryTextView.hxx
@@ -28,7 +28,7 @@ namespace dbaui
class OQueryTextView : public vcl::Window
{
friend class OQueryViewSwitch;
- OSqlEdit* m_pEdit;
+ VclPtr<OSqlEdit> m_pEdit;
public:
OQueryTextView( OQueryContainerWindow* pParent );
virtual ~OQueryTextView();
diff --git a/dbaccess/source/ui/inc/QueryViewSwitch.hxx b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
index e6f936a57617..ccf45802c394 100644
--- a/dbaccess/source/ui/inc/QueryViewSwitch.hxx
+++ b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
@@ -34,8 +34,8 @@ namespace dbaui
class OQueryContainerWindow;
class OQueryViewSwitch
{
- OQueryDesignView* m_pDesignView;
- OQueryTextView* m_pTextView;
+ VclPtr<OQueryDesignView> m_pDesignView;
+ VclPtr<OQueryTextView> m_pTextView;
bool m_bAddTableDialogWasVisible; // true if so
public:
OQueryViewSwitch(OQueryContainerWindow* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& );
diff --git a/dbaccess/source/ui/inc/RelationControl.hxx b/dbaccess/source/ui/inc/RelationControl.hxx
index a04c08d5f9ca..12973d55b9f5 100644
--- a/dbaccess/source/ui/inc/RelationControl.hxx
+++ b/dbaccess/source/ui/inc/RelationControl.hxx
@@ -32,10 +32,10 @@ namespace dbaui
class OTableListBoxControl
{
- ListBox* m_pLeftTable;
- ListBox* m_pRightTable;
+ VclPtr<ListBox> m_pLeftTable;
+ VclPtr<ListBox> m_pRightTable;
- ORelationControl* m_pRC_Tables;
+ VclPtr<ORelationControl> m_pRC_Tables;
const OJoinTableView::OTableWindowMap* m_pTableMap;
IRelationControlInterface* m_pParentDialog;
OUString m_strCurrentLeft;
diff --git a/dbaccess/source/ui/inc/RelationDlg.hxx b/dbaccess/source/ui/inc/RelationDlg.hxx
index fc4f17a08467..3435632c08f8 100644
--- a/dbaccess/source/ui/inc/RelationDlg.hxx
+++ b/dbaccess/source/ui/inc/RelationDlg.hxx
@@ -39,16 +39,16 @@ namespace dbaui
boost::scoped_ptr<OTableListBoxControl> m_xTableControl;
OJoinTableView::OTableWindowMap* m_pTableMap;
- RadioButton* m_pRB_NoCascUpd;
- RadioButton* m_pRB_CascUpd;
- RadioButton* m_pRB_CascUpdNull;
- RadioButton* m_pRB_CascUpdDefault;
- RadioButton* m_pRB_NoCascDel;
- RadioButton* m_pRB_CascDel;
- RadioButton* m_pRB_CascDelNull;
- RadioButton* m_pRB_CascDelDefault;
+ VclPtr<RadioButton> m_pRB_NoCascUpd;
+ VclPtr<RadioButton> m_pRB_CascUpd;
+ VclPtr<RadioButton> m_pRB_CascUpdNull;
+ VclPtr<RadioButton> m_pRB_CascUpdDefault;
+ VclPtr<RadioButton> m_pRB_NoCascDel;
+ VclPtr<RadioButton> m_pRB_CascDel;
+ VclPtr<RadioButton> m_pRB_CascDelNull;
+ VclPtr<RadioButton> m_pRB_CascDelDefault;
- OKButton* m_pPB_OK;
+ VclPtr<OKButton> m_pPB_OK;
TTableConnectionData::value_type m_pConnData;
TTableConnectionData::value_type m_pOrigConnData;
@@ -60,6 +60,8 @@ namespace dbaui
ORelationDialog(OJoinTableView* pParent,
const TTableConnectionData::value_type& pConnectionData,
bool bAllowTableSelect = false );
+ virtual ~ORelationDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() SAL_OVERRIDE { return m_xConnection; }
diff --git a/dbaccess/source/ui/inc/RelationTableView.hxx b/dbaccess/source/ui/inc/RelationTableView.hxx
index eb251863ffdd..1ae96254e24e 100644
--- a/dbaccess/source/ui/inc/RelationTableView.hxx
+++ b/dbaccess/source/ui/inc/RelationTableView.hxx
@@ -32,7 +32,7 @@ namespace dbaui
public OJoinTableView,
public ::comphelper::OContainerListener
{
- OTableConnection* m_pExistingConnection; ///< is set when a connection was draged on an existing connection
+ VclPtr<OTableConnection> m_pExistingConnection; ///< is set when a connection was draged on an existing connection
TTableConnectionData::value_type m_pCurrentlyTabConnData; ///< set when we creating a connection with more than one keycolumn
::rtl::Reference< comphelper::OContainerListenerAdapter> m_pContainerListener;
bool m_bInRemove;
diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx
index ae4ff745dedd..a027fa033e5a 100644
--- a/dbaccess/source/ui/inc/TableConnection.hxx
+++ b/dbaccess/source/ui/inc/TableConnection.hxx
@@ -41,7 +41,7 @@ namespace dbaui
::std::vector<OConnectionLine*> m_vConnLine;
TTableConnectionData::value_type
m_pData;
- OJoinTableView* m_pParent;
+ VclPtr<OJoinTableView> m_pParent;
bool m_bSelected;
diff --git a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
index f4ef497c6c0d..bcc79095dec8 100644
--- a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
+++ b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
@@ -33,7 +33,7 @@ namespace dbaui
{
private:
OUString m_sHelpText;
- MultiLineEdit* m_pTextWin;
+ VclPtr<MultiLineEdit> m_pTextWin;
protected:
virtual void Resize() SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/inc/TableDesignView.hxx b/dbaccess/source/ui/inc/TableDesignView.hxx
index cc3349ada1bf..7a1016f6753f 100644
--- a/dbaccess/source/ui/inc/TableDesignView.hxx
+++ b/dbaccess/source/ui/inc/TableDesignView.hxx
@@ -33,8 +33,8 @@ namespace dbaui
class OTableBorderWindow : public vcl::Window
{
VclPtr<Splitter> m_aHorzSplitter;
- OTableFieldDescWin* m_pFieldDescWin;
- OTableEditorCtrl* m_pEditorCtrl;
+ VclPtr<OTableFieldDescWin> m_pFieldDescWin;
+ VclPtr<OTableEditorCtrl> m_pEditorCtrl;
void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
void ArrangeChildren( long nSplitPos ,Rectangle& rRect);
@@ -63,7 +63,7 @@ namespace dbaui
};
private:
::com::sun::star::lang::Locale m_aLocale;
- OTableBorderWindow* m_pWin;
+ VclPtr<OTableBorderWindow> m_pWin;
OTableController& m_rController;
ChildFocusState m_eChildFocus;
diff --git a/dbaccess/source/ui/inc/TableFieldDescription.hxx b/dbaccess/source/ui/inc/TableFieldDescription.hxx
index 9a6992bd732c..d8e5f3d524d2 100644
--- a/dbaccess/source/ui/inc/TableFieldDescription.hxx
+++ b/dbaccess/source/ui/inc/TableFieldDescription.hxx
@@ -25,6 +25,7 @@
#include <rtl/ustring.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <rtl/ref.hxx>
+#include <vcl/vclptr.hxx>
#include <salhelper/simplereferenceobject.hxx>
@@ -49,7 +50,7 @@ namespace dbaui
OUString m_aFieldAlias; ///< column alias
OUString m_aFunctionName;///< contains the function name (only if m_eFunctionType != FKT_NONE)
- vcl::Window* m_pTabWindow;
+ VclPtr<vcl::Window> m_pTabWindow;
sal_Int32 m_eDataType;
sal_Int32 m_eFunctionType;
diff --git a/dbaccess/source/ui/inc/TableGrantCtrl.hxx b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
index a0e2e95631b6..5f80e75fcbf3 100644
--- a/dbaccess/source/ui/inc/TableGrantCtrl.hxx
+++ b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
@@ -53,8 +53,8 @@ class OTableGrantControl : public ::svt::EditBrowseBox
mutable TTablePrivilegeMap m_aPrivMap;
OUString m_sUserName;
- ::svt::CheckBoxControl* m_pCheckCell;
- Edit* m_pEdit;
+ VclPtr<::svt::CheckBoxControl> m_pCheckCell;
+ VclPtr<Edit> m_pEdit;
long m_nDataPos;
ImplSVEvent * m_nDeactivateEvent;
diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx
index 67cb66b8f451..459184fa83fb 100644
--- a/dbaccess/source/ui/inc/TableWindow.hxx
+++ b/dbaccess/source/ui/inc/TableWindow.hxx
@@ -56,7 +56,7 @@ namespace dbaui
// and the table itself (needed for me as I want to lock it as long as the window is alive)
VclPtr<FixedImage> m_aTypeImage;
VclPtr<OTableWindowTitle> m_aTitle;
- OTableWindowListBox* m_pListBox;
+ VclPtr<OTableWindowListBox> m_pListBox;
OTableWindowAccess* m_pAccessible;
private:
diff --git a/dbaccess/source/ui/inc/TableWindowAccess.hxx b/dbaccess/source/ui/inc/TableWindowAccess.hxx
index c37f481e073b..161193ca8252 100644
--- a/dbaccess/source/ui/inc/TableWindowAccess.hxx
+++ b/dbaccess/source/ui/inc/TableWindowAccess.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
#include <cppuhelper/implbase2.hxx>
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <vcl/vclptr.hxx>
namespace dbaui
{
@@ -35,7 +36,7 @@ namespace dbaui
class OTableWindowAccess : public VCLXAccessibleComponent
, public OTableWindowAccess_BASE
{
- OTableWindow* m_pTable; // the window which I should give accessibility to
+ VclPtr<OTableWindow> m_pTable; // the window which I should give accessibility to
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > getParentChild(sal_Int32 _nIndex);
protected:
diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx b/dbaccess/source/ui/inc/TableWindowListBox.hxx
index 8e5769883bdf..dfd8f4b39e21 100644
--- a/dbaccess/source/ui/inc/TableWindowListBox.hxx
+++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx
@@ -30,7 +30,7 @@ namespace dbaui
struct OJoinExchangeData
{
public:
- OTableWindowListBox* pListBox; // the ListBox inside the same (you can get the TabWin and the WinName out of it)
+ VclPtr<OTableWindowListBox> pListBox; // the ListBox inside the same (you can get the TabWin and the WinName out of it)
SvTreeListEntry* pEntry; // the entry, which was dragged or to which was dropped on
OJoinExchangeData(OTableWindowListBox* pBox);
@@ -56,7 +56,7 @@ namespace dbaui
Timer m_aScrollTimer;
Point m_aMousePos;
- OTableWindow* m_pTabWin;
+ VclPtr<OTableWindow> m_pTabWin;
ImplSVEvent * m_nDropEvent;
ImplSVEvent * m_nUiEvent;
OJoinDropData m_aDropInfo;
diff --git a/dbaccess/source/ui/inc/TableWindowTitle.hxx b/dbaccess/source/ui/inc/TableWindowTitle.hxx
index 5a08b3986b6d..3d009e3c603e 100644
--- a/dbaccess/source/ui/inc/TableWindowTitle.hxx
+++ b/dbaccess/source/ui/inc/TableWindowTitle.hxx
@@ -26,7 +26,7 @@ namespace dbaui
class OTableWindow;
class OTableWindowTitle : public FixedText
{
- OTableWindow* m_pTabWin;
+ VclPtr<OTableWindow> m_pTabWin;
protected:
virtual void Command(const CommandEvent& rEvt) SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx
index 6e0cc172a7b7..35b81ad01ea4 100644
--- a/dbaccess/source/ui/inc/TokenWriter.hxx
+++ b/dbaccess/source/ui/inc/TokenWriter.hxx
@@ -196,7 +196,7 @@ namespace dbaui
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > m_xTargetResultSetUpdate;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowUpdate > m_xTargetRowUpdate;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xTargetResultSetMetaData;
- vcl::Window* m_pParent;
+ VclPtr<vcl::Window> m_pParent;
bool m_bAlreadyAsked;
bool insertNewRow();
diff --git a/dbaccess/source/ui/inc/VertSplitView.hxx b/dbaccess/source/ui/inc/VertSplitView.hxx
index 22393b9c2d84..ac7bde548eed 100644
--- a/dbaccess/source/ui/inc/VertSplitView.hxx
+++ b/dbaccess/source/ui/inc/VertSplitView.hxx
@@ -27,9 +27,9 @@ namespace dbaui
{
class OSplitterView : public vcl::Window
{
- Splitter* m_pSplitter;
- vcl::Window* m_pLeft;
- vcl::Window* m_pRight;
+ VclPtr<Splitter> m_pSplitter;
+ VclPtr<vcl::Window> m_pLeft;
+ VclPtr<vcl::Window> m_pRight;
bool m_bVertical;
void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
diff --git a/dbaccess/source/ui/inc/WCPage.hxx b/dbaccess/source/ui/inc/WCPage.hxx
index 7fe938c37914..008a9376ce01 100644
--- a/dbaccess/source/ui/inc/WCPage.hxx
+++ b/dbaccess/source/ui/inc/WCPage.hxx
@@ -34,19 +34,19 @@ namespace dbaui
class OCopyTable : public OWizardPage
{
protected:
- Edit* m_pEdTableName;
- RadioButton* m_pRB_DefData;
- RadioButton* m_pRB_Def;
- RadioButton* m_pRB_View;
- RadioButton* m_pRB_AppendData;
- CheckBox* m_pCB_UseHeaderLine;
- CheckBox* m_pCB_PrimaryColumn;
- FixedText* m_pFT_KeyName;
- Edit* m_pEdKeyName;
+ VclPtr<Edit> m_pEdTableName;
+ VclPtr<RadioButton> m_pRB_DefData;
+ VclPtr<RadioButton> m_pRB_Def;
+ VclPtr<RadioButton> m_pRB_View;
+ VclPtr<RadioButton> m_pRB_AppendData;
+ VclPtr<CheckBox> m_pCB_UseHeaderLine;
+ VclPtr<CheckBox> m_pCB_PrimaryColumn;
+ VclPtr<FixedText> m_pFT_KeyName;
+ VclPtr<Edit> m_pEdKeyName;
sal_Int16 m_nOldOperation;
- OWizColumnSelect* m_pPage2;
- OWizNormalExtend* m_pPage3;
+ VclPtr<OWizColumnSelect> m_pPage2;
+ VclPtr<OWizNormalExtend> m_pPage3;
bool m_bPKeyAllowed;
bool m_bUseHeaderAllowed;
@@ -65,6 +65,8 @@ namespace dbaui
virtual OUString GetTitle() const SAL_OVERRIDE ;
OCopyTable( vcl::Window * pParent );
+ virtual ~OCopyTable();
+ virtual void dispose() SAL_OVERRIDE;
bool IsOptionDefData() const { return m_pRB_DefData->IsChecked(); }
bool IsOptionDef() const { return m_pRB_Def->IsChecked(); }
diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx
index a271aaacc152..9b08f6b97f0d 100644
--- a/dbaccess/source/ui/inc/WColumnSelect.hxx
+++ b/dbaccess/source/ui/inc/WColumnSelect.hxx
@@ -35,12 +35,12 @@ namespace dbaui
class OWizColumnSelect : public OWizardPage
{
- ListBox* m_pOrgColumnNames; // left side
- PushButton* m_pColumn_RH;
- PushButton* m_pColumns_RH;
- PushButton* m_pColumn_LH;
- PushButton* m_pColumns_LH;
- ListBox* m_pNewColumnNames; // right side
+ VclPtr<ListBox> m_pOrgColumnNames; // left side
+ VclPtr<PushButton> m_pColumn_RH;
+ VclPtr<PushButton> m_pColumns_RH;
+ VclPtr<PushButton> m_pColumn_LH;
+ VclPtr<PushButton> m_pColumns_LH;
+ VclPtr<ListBox> m_pNewColumnNames; // right side
DECL_LINK( ButtonClickHdl, Button * );
DECL_LINK( ListDoubleClickHdl, ListBox * );
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx
index f60093dc601f..479947d4f254 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -238,11 +238,11 @@ namespace dbaui
ODatabaseExport::TColumns m_vSourceColumns;
ODatabaseExport::TColumnVector m_vSourceVec;
- HelpButton* m_pbHelp;
- CancelButton* m_pbCancel;
- PushButton* m_pbPrev;
- PushButton* m_pbNext;
- PushButton* m_pbFinish;
+ VclPtr<HelpButton> m_pbHelp;
+ VclPtr<CancelButton> m_pbCancel;
+ VclPtr<PushButton> m_pbPrev;
+ VclPtr<PushButton> m_pbNext;
+ VclPtr<PushButton> m_pbFinish;
OTypeInfoMap m_aTypeInfo;
::std::vector<OTypeInfoMap::iterator> m_aTypeInfoIndex;
diff --git a/dbaccess/source/ui/inc/WNameMatch.hxx b/dbaccess/source/ui/inc/WNameMatch.hxx
index e4a05eed9223..61f71b56ce47 100644
--- a/dbaccess/source/ui/inc/WNameMatch.hxx
+++ b/dbaccess/source/ui/inc/WNameMatch.hxx
@@ -50,16 +50,16 @@ namespace dbaui
// Name matching for data appending
class OWizNameMatching : public OWizardPage
{
- FixedText *m_pTABLE_LEFT;
- FixedText *m_pTABLE_RIGHT;
- OColumnTreeBox *m_pCTRL_LEFT; // left side
- OColumnTreeBox *m_pCTRL_RIGHT; // right side
- PushButton *m_pColumn_up;
- PushButton *m_pColumn_down;
- PushButton *m_pColumn_up_right;
- PushButton *m_pColumn_down_right;
- PushButton *m_pAll;
- PushButton *m_pNone;
+ VclPtr<FixedText> m_pTABLE_LEFT;
+ VclPtr<FixedText> m_pTABLE_RIGHT;
+ VclPtr<OColumnTreeBox> m_pCTRL_LEFT; // left side
+ VclPtr<OColumnTreeBox> m_pCTRL_RIGHT; // right side
+ VclPtr<PushButton> m_pColumn_up;
+ VclPtr<PushButton> m_pColumn_down;
+ VclPtr<PushButton> m_pColumn_up_right;
+ VclPtr<PushButton> m_pColumn_down_right;
+ VclPtr<PushButton> m_pAll;
+ VclPtr<PushButton> m_pNone;
OUString m_sSourceText;
OUString m_sDestText;
Image m_aImgUp;
@@ -78,7 +78,8 @@ namespace dbaui
virtual OUString GetTitle() const SAL_OVERRIDE ;
OWizNameMatching(vcl::Window* pParent);
-
+ virtual ~OWizNameMatching();
+ virtual void dispose() SAL_OVERRIDE;
};
}
#endif // INCLUDED_DBACCESS_SOURCE_UI_INC_WNAMEMATCH_HXX
diff --git a/dbaccess/source/ui/inc/WTabPage.hxx b/dbaccess/source/ui/inc/WTabPage.hxx
index 9a30d7c311fb..6a5d3ab48eb1 100644
--- a/dbaccess/source/ui/inc/WTabPage.hxx
+++ b/dbaccess/source/ui/inc/WTabPage.hxx
@@ -29,12 +29,14 @@ namespace dbaui
class OWizardPage : public TabPage
{
protected:
- OCopyTableWizard* m_pParent;
+ VclPtr<OCopyTableWizard> m_pParent;
bool m_bFirstTime; // Page wird das erste mal gerufen ; should be set in the reset methode
OWizardPage( vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription );
public:
+ virtual ~OWizardPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual void Reset ( ) = 0;
virtual bool LeavePage() = 0;
virtual OUString GetTitle() const = 0;
diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx b/dbaccess/source/ui/inc/WTypeSelect.hxx
index 046a484034ef..c2f7d8e3f53d 100644
--- a/dbaccess/source/ui/inc/WTypeSelect.hxx
+++ b/dbaccess/source/ui/inc/WTypeSelect.hxx
@@ -37,7 +37,7 @@ namespace dbaui
class OWizTypeSelectControl : public OFieldDescControl
{
protected:
- vcl::Window* m_pParentTabPage;
+ VclPtr<vcl::Window> m_pParentTabPage;
virtual void ActivateAggregate( EControlType eType ) SAL_OVERRIDE;
virtual void DeactivateAggregate( EControlType eType ) SAL_OVERRIDE;
@@ -52,6 +52,8 @@ namespace dbaui
public:
OWizTypeSelectControl(vcl::Window* pParent, vcl::Window* pParentTabPage, OTableDesignHelpBar* pHelpBar=NULL);
+ virtual ~OWizTypeSelectControl();
+ virtual void dispose() SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> getMetaData() SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection() SAL_OVERRIDE;
@@ -68,13 +70,15 @@ namespace dbaui
bool _bSet = false);
protected:
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
- vcl::Window* m_pParentTabPage;
+ VclPtr<vcl::Window> m_pParentTabPage;
public:
OWizTypeSelectList( vcl::Window* pParent, WinBits nStyle = WB_BORDER )
: MultiListBox(pParent,nStyle)
, m_bPKey(false)
, m_pParentTabPage(NULL)
{}
+ virtual ~OWizTypeSelectList();
+ virtual void dispose() SAL_OVERRIDE;
void SetPKey(bool bPKey) { m_bPKey = bPKey; }
void SetParentTabPage(vcl::Window* pParentTabPage) { m_pParentTabPage = pParentTabPage; }
};
@@ -90,13 +94,13 @@ namespace dbaui
DECL_LINK( ColumnSelectHdl, MultiListBox* );
DECL_LINK( ButtonClickHdl, Button * );
protected:
- OWizTypeSelectList *m_pColumnNames;
- FixedText *m_pColumns;
- OWizTypeSelectControl *m_pTypeControl;
- FixedText *m_pAutoType;
- FixedText *m_pAutoFt;
- NumericField *m_pAutoEt;
- PushButton *m_pAutoPb;
+ VclPtr<OWizTypeSelectList> m_pColumnNames;
+ VclPtr<FixedText> m_pColumns;
+ VclPtr<OWizTypeSelectControl> m_pTypeControl;
+ VclPtr<FixedText> m_pAutoType;
+ VclPtr<FixedText> m_pAutoFt;
+ VclPtr<NumericField> m_pAutoEt;
+ VclPtr<PushButton> m_pAutoPb;
Image m_imgPKey;
SvStream* m_pParserStream; // stream to read the tokens from or NULL
diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx
index 77b2400831cf..815f8c4d566a 100644
--- a/dbaccess/source/ui/inc/adtabdlg.hxx
+++ b/dbaccess/source/ui/inc/adtabdlg.hxx
@@ -58,15 +58,15 @@ namespace dbaui
class OAddTableDlg : public ModelessDialog
{
- RadioButton* m_pCaseTables;
- RadioButton* m_pCaseQueries;
+ VclPtr<RadioButton> m_pCaseTables;
+ VclPtr<RadioButton> m_pCaseQueries;
- OTableTreeListBox* m_pTableList;
- SvTreeListBox* m_pQueryList;
+ VclPtr<OTableTreeListBox> m_pTableList;
+ VclPtr<SvTreeListBox> m_pQueryList;
boost::scoped_ptr< TableObjectListFacade > m_xCurrentList;
- PushButton* m_pAddButton;
- PushButton* m_pCloseButton;
+ VclPtr<PushButton> m_pAddButton;
+ VclPtr<PushButton> m_pCloseButton;
IAddTableDialogContext& m_rContext;
diff --git a/dbaccess/source/ui/inc/brwview.hxx b/dbaccess/source/ui/inc/brwview.hxx
index 7768ae345bfb..e68ff09847c4 100644
--- a/dbaccess/source/ui/inc/brwview.hxx
+++ b/dbaccess/source/ui/inc/brwview.hxx
@@ -46,10 +46,10 @@ namespace dbaui
protected:
::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > m_xGrid; // our grid's UNO representation
::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > m_xMe; // our own UNO representation
- DBTreeView* m_pTreeView;
- Splitter* m_pSplitter;
- mutable SbaGridControl* m_pVclControl; // our grid's VCL representation
- vcl::Window* m_pStatus;
+ VclPtr<DBTreeView> m_pTreeView;
+ VclPtr<Splitter> m_pSplitter;
+ mutable VclPtr<SbaGridControl> m_pVclControl; // our grid's VCL representation
+ VclPtr<vcl::Window> m_pStatus;
DECL_LINK( SplitHdl, void* );
// attribute access
@@ -94,7 +94,7 @@ namespace dbaui
class BrowserViewStatusDisplay
{
protected:
- UnoDataBrowserView* m_pView;
+ VclPtr<UnoDataBrowserView> m_pView;
public:
BrowserViewStatusDisplay( UnoDataBrowserView* _pView, const OUString& _rStatus );
diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx
index 0ec359e13978..4dff5e14ca9f 100644
--- a/dbaccess/source/ui/inc/curledit.hxx
+++ b/dbaccess/source/ui/inc/curledit.hxx
@@ -36,7 +36,7 @@ class OConnectionURLEdit : public Edit
{
::dbaccess::ODsnTypeCollection*
m_pTypeCollection;
- FixedText* m_pForcedPrefix;
+ VclPtr<FixedText> m_pForcedPrefix;
OUString m_sSaveValueNoPrefix;
bool m_bShowPrefix; // when <TRUE> the prefix will be visible, otherwise not
diff --git a/dbaccess/source/ui/inc/datasourceconnector.hxx b/dbaccess/source/ui/inc/datasourceconnector.hxx
index f5d64a0f48cd..c5459ecbe15b 100644
--- a/dbaccess/source/ui/inc/datasourceconnector.hxx
+++ b/dbaccess/source/ui/inc/datasourceconnector.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
+#include <vcl/vclptr.hxx>
namespace dbtools
{
@@ -38,10 +39,10 @@ namespace dbaui
class ODatasourceConnector
{
protected:
- vcl::Window* m_pErrorMessageParent;
+ VclPtr<vcl::Window> m_pErrorMessageParent;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
- m_xContext;
- OUString m_sContextInformation;
+ m_xContext;
+ OUString m_sContextInformation;
public:
ODatasourceConnector(
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx
index 3529dae34699..ce39f6f02282 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -85,9 +85,9 @@ private:
OUString m_sRM_FinalText;
INetURLObject m_aDocURL;
OUString m_sWorkPath;
- OGeneralPageWizard* m_pGeneralPage;
- OMySQLIntroPageSetup* m_pMySQLIntroPage;
- OFinalDBPageSetup* m_pFinalPage;
+ VclPtr<OGeneralPageWizard> m_pGeneralPage;
+ VclPtr<OMySQLIntroPageSetup> m_pMySQLIntroPage;
+ VclPtr<OFinalDBPageSetup> m_pFinalPage;
::dbaccess::ODsnTypeCollection*
m_pCollection; /// the DSN type collection instance
diff --git a/dbaccess/source/ui/inc/directsql.hxx b/dbaccess/source/ui/inc/directsql.hxx
index c0858a729dea..49a060fbf23b 100644
--- a/dbaccess/source/ui/inc/directsql.hxx
+++ b/dbaccess/source/ui/inc/directsql.hxx
@@ -46,13 +46,13 @@ namespace dbaui
OModuleClient m_aModuleClient;
::osl::Mutex m_aMutex;
- MultiLineEditSyntaxHighlight* m_pSQL;
- PushButton* m_pExecute;
- ListBox* m_pSQLHistory;
- VclMultiLineEdit* m_pStatus;
- CheckBox* m_pShowOutput;
- VclMultiLineEdit* m_pOutput;
- PushButton* m_pClose;
+ VclPtr<MultiLineEditSyntaxHighlight> m_pSQL;
+ VclPtr<PushButton> m_pExecute;
+ VclPtr<ListBox> m_pSQLHistory;
+ VclPtr<VclMultiLineEdit> m_pStatus;
+ VclPtr<CheckBox> m_pShowOutput;
+ VclPtr<VclMultiLineEdit> m_pOutput;
+ VclPtr<PushButton> m_pClose;
typedef ::std::deque< OUString > StringQueue;
StringQueue m_aStatementHistory; // previous statements
diff --git a/dbaccess/source/ui/inc/dlgsize.hxx b/dbaccess/source/ui/inc/dlgsize.hxx
index e145cf7675ad..1d51ed11a534 100644
--- a/dbaccess/source/ui/inc/dlgsize.hxx
+++ b/dbaccess/source/ui/inc/dlgsize.hxx
@@ -39,11 +39,13 @@ namespace dbaui
protected:
DECL_LINK( CbClickHdl, Button * );
- MetricField* m_pMF_VALUE;
- CheckBox* m_pCB_STANDARD;
+ VclPtr<MetricField> m_pMF_VALUE;
+ VclPtr<CheckBox> m_pCB_STANDARD;
public:
DlgSize( vcl::Window * pParent, sal_Int32 nVal, bool bRow, sal_Int32 _nAlternativeStandard = -1 );
+ virtual ~DlgSize();
+ virtual void dispose() SAL_OVERRIDE;
sal_Int32 GetValue();
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx
index 75f8661dd4a6..bd595e012263 100644
--- a/dbaccess/source/ui/inc/indexdialog.hxx
+++ b/dbaccess/source/ui/inc/indexdialog.hxx
@@ -85,15 +85,15 @@ namespace dbaui
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
SvtViewOptions m_aGeometrySettings;
- ToolBox *m_pActions;
- DbaIndexList *m_pIndexList;
- FixedText *m_pIndexDetails;
- FixedText *m_pDescriptionLabel;
- FixedText *m_pDescription;
- CheckBox *m_pUnique;
- FixedText *m_pFieldsLabel;
- IndexFieldsControl *m_pFields;
- PushButton *m_pClose;
+ VclPtr<ToolBox> m_pActions;
+ VclPtr<DbaIndexList> m_pIndexList;
+ VclPtr<FixedText> m_pIndexDetails;
+ VclPtr<FixedText> m_pDescriptionLabel;
+ VclPtr<FixedText> m_pDescription;
+ VclPtr<CheckBox> m_pUnique;
+ VclPtr<FixedText> m_pFieldsLabel;
+ VclPtr<IndexFieldsControl> m_pFields;
+ VclPtr<PushButton> m_pClose;
OIndexCollection* m_pIndexes;
SvTreeListEntry* m_pPreviousSelection;
diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
index df9a8f5715f0..3f262156d129 100644
--- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx
+++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
@@ -40,8 +40,8 @@ namespace dbaui
Link m_aModifyHdl;
- ::svt::ListBoxControl* m_pSortingCell;
- ::svt::ListBoxControl* m_pFieldNameCell;
+ VclPtr<::svt::ListBoxControl> m_pSortingCell;
+ VclPtr<::svt::ListBoxControl> m_pFieldNameCell;
OUString m_sAscendingText;
OUString m_sDescendingText;
diff --git a/dbaccess/source/ui/inc/linkeddocuments.hxx b/dbaccess/source/ui/inc/linkeddocuments.hxx
index 7c597b24624e..a13383b71955 100644
--- a/dbaccess/source/ui/inc/linkeddocuments.hxx
+++ b/dbaccess/source/ui/inc/linkeddocuments.hxx
@@ -32,6 +32,7 @@
#include <com/sun/star/ucb/XContent.hpp>
#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
#include <comphelper/namedvaluecollection.hxx>
+#include <vcl/vclptr.hxx>
namespace vcl { class Window; }
namespace dbaui
@@ -49,7 +50,7 @@ namespace dbaui
m_xConnection;
::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >
m_xDocumentUI;
- vcl::Window* m_pDialogParent;
+ VclPtr<vcl::Window> m_pDialogParent;
OUString m_sCurrentlyEditing;
OUString m_sDataSourceName;
diff --git a/dbaccess/source/ui/inc/paramdialog.hxx b/dbaccess/source/ui/inc/paramdialog.hxx
index 7e27a3df57cd..11db9808841f 100644
--- a/dbaccess/source/ui/inc/paramdialog.hxx
+++ b/dbaccess/source/ui/inc/paramdialog.hxx
@@ -52,11 +52,11 @@ namespace dbaui
{
protected:
// the controls
- ListBox* m_pAllParams;
- Edit* m_pParam;
- PushButton* m_pTravelNext;
- OKButton* m_pOKBtn;
- CancelButton* m_pCancelBtn;
+ VclPtr<ListBox> m_pAllParams;
+ VclPtr<Edit> m_pParam;
+ VclPtr<PushButton> m_pTravelNext;
+ VclPtr<OKButton> m_pOKBtn;
+ VclPtr<CancelButton> m_pCancelBtn;
sal_Int32 m_nCurrentlySelected;
diff --git a/dbaccess/source/ui/inc/querycontainerwindow.hxx b/dbaccess/source/ui/inc/querycontainerwindow.hxx
index ba2447c854d6..5c1e151aedbe 100644
--- a/dbaccess/source/ui/inc/querycontainerwindow.hxx
+++ b/dbaccess/source/ui/inc/querycontainerwindow.hxx
@@ -42,8 +42,8 @@ namespace dbaui
class OQueryContainerWindow : public ODataView
{
OQueryViewSwitch* m_pViewSwitch;
- OBeamer* m_pBeamer;
- Splitter* m_pSplitter;
+ VclPtr<OBeamer> m_pBeamer;
+ VclPtr<Splitter> m_pSplitter;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 > m_xBeamer;
DECL_LINK( SplitHdl, void* );
diff --git a/dbaccess/source/ui/inc/queryfilter.hxx b/dbaccess/source/ui/inc/queryfilter.hxx
index e5286f42045d..06cc9510080f 100644
--- a/dbaccess/source/ui/inc/queryfilter.hxx
+++ b/dbaccess/source/ui/inc/queryfilter.hxx
@@ -67,19 +67,19 @@ namespace dbaui
,public ::svxform::OParseContextClient
{
private:
- ListBox* m_pLB_WHEREFIELD1;
- ListBox* m_pLB_WHERECOMP1;
- Edit* m_pET_WHEREVALUE1;
+ VclPtr<ListBox> m_pLB_WHEREFIELD1;
+ VclPtr<ListBox> m_pLB_WHERECOMP1;
+ VclPtr<Edit> m_pET_WHEREVALUE1;
- ListBox* m_pLB_WHERECOND2;
- ListBox* m_pLB_WHEREFIELD2;
- ListBox* m_pLB_WHERECOMP2;
- Edit* m_pET_WHEREVALUE2;
+ VclPtr<ListBox> m_pLB_WHERECOND2;
+ VclPtr<ListBox> m_pLB_WHEREFIELD2;
+ VclPtr<ListBox> m_pLB_WHERECOMP2;
+ VclPtr<Edit> m_pET_WHEREVALUE2;
- ListBox* m_pLB_WHERECOND3;
- ListBox* m_pLB_WHEREFIELD3;
- ListBox* m_pLB_WHERECOMP3;
- Edit* m_pET_WHEREVALUE3;
+ VclPtr<ListBox> m_pLB_WHERECOND3;
+ VclPtr<ListBox> m_pLB_WHEREFIELD3;
+ VclPtr<ListBox> m_pLB_WHERECOMP3;
+ VclPtr<Edit> m_pET_WHEREVALUE3;
OUString m_aSTR_COMPARE_OPERATORS;
@@ -112,6 +112,8 @@ namespace dbaui
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer>& _rxComposer,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxCols
);
+ virtual ~DlgFilterCrit();
+ virtual void dispose() SAL_OVERRIDE;
void BuildWherePart();
diff --git a/dbaccess/source/ui/inc/queryorder.hxx b/dbaccess/source/ui/inc/queryorder.hxx
index 706e70176fb9..46da94464b53 100644
--- a/dbaccess/source/ui/inc/queryorder.hxx
+++ b/dbaccess/source/ui/inc/queryorder.hxx
@@ -59,12 +59,12 @@ namespace dbaui
class DlgOrderCrit : public ModalDialog
{
protected:
- ListBox* m_pLB_ORDERFIELD1;
- ListBox* m_pLB_ORDERVALUE1;
- ListBox* m_pLB_ORDERFIELD2;
- ListBox* m_pLB_ORDERVALUE2;
- ListBox* m_pLB_ORDERFIELD3;
- ListBox* m_pLB_ORDERVALUE3;
+ VclPtr<ListBox> m_pLB_ORDERFIELD1;
+ VclPtr<ListBox> m_pLB_ORDERVALUE1;
+ VclPtr<ListBox> m_pLB_ORDERFIELD2;
+ VclPtr<ListBox> m_pLB_ORDERVALUE2;
+ VclPtr<ListBox> m_pLB_ORDERFIELD3;
+ VclPtr<ListBox> m_pLB_ORDERVALUE3;
OUString aSTR_NOENTRY;
OUString m_sOrgOrder;
@@ -72,8 +72,8 @@ namespace dbaui
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xColumns;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
- ListBox* m_aColumnList[DOG_ROWS];
- ListBox* m_aValueList[DOG_ROWS];
+ VclPtr<ListBox> m_aColumnList[DOG_ROWS];
+ VclPtr<ListBox> m_aValueList[DOG_ROWS];
DECL_LINK( FieldListSelectHdl, ListBox * );
void EnableLines();
@@ -83,6 +83,8 @@ namespace dbaui
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer>& _rxComposer,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxCols);
+ virtual ~DlgOrderCrit();
+ virtual void dispose() SAL_OVERRIDE;
void BuildOrderPart();
diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx
index 87b936b9b786..2e5ac221ee65 100644
--- a/dbaccess/source/ui/inc/sqledit.hxx
+++ b/dbaccess/source/ui/inc/sqledit.hxx
@@ -43,7 +43,7 @@ namespace dbaui
Timer m_timerUndoActionCreation;
Link m_lnkTextModifyHdl;
OUString m_strOrigText; // is restored on undo
- OQueryTextView* m_pView;
+ VclPtr<OQueryTextView> m_pView;
bool m_bAccelAction; // is set on cut, copy, paste
bool m_bStopTimer;
svtools::ColorConfig m_ColorConfig;
diff --git a/dbaccess/source/ui/inc/textconnectionsettings.hxx b/dbaccess/source/ui/inc/textconnectionsettings.hxx
index 528382def297..fdd5a9489121 100644
--- a/dbaccess/source/ui/inc/textconnectionsettings.hxx
+++ b/dbaccess/source/ui/inc/textconnectionsettings.hxx
@@ -38,6 +38,8 @@ namespace dbaui
{
public:
TextConnectionSettingsDialog( vcl::Window* _pParent, SfxItemSet& _rItems );
+ virtual ~TextConnectionSettingsDialog();
+ virtual void dispose() SAL_OVERRIDE;
/** initializes a set of PropertyStorage instaces, which are bound to
the text-connection relevant items in our item sets
@@ -48,7 +50,7 @@ namespace dbaui
private:
::std::unique_ptr< OTextConnectionHelper > m_pTextConnectionHelper;
- OKButton *m_pOK;
+ VclPtr<OKButton> m_pOK;
SfxItemSet& m_rItems;
private:
diff --git a/dbaccess/source/ui/inc/undosqledit.hxx b/dbaccess/source/ui/inc/undosqledit.hxx
index e9307c66c599..66a2f48795c3 100644
--- a/dbaccess/source/ui/inc/undosqledit.hxx
+++ b/dbaccess/source/ui/inc/undosqledit.hxx
@@ -21,6 +21,7 @@
#include "GeneralUndo.hxx"
#include "dbu_control.hrc"
+#include <vcl/vclptr.hxx>
namespace dbaui
{
@@ -29,7 +30,7 @@ namespace dbaui
class OSqlEditUndoAct : public OCommentUndoAction
{
protected:
- OSqlEdit* m_pOwner;
+ VclPtr<OSqlEdit> m_pOwner;
OUString m_strNextText;
virtual void Undo() SAL_OVERRIDE { ToggleText(); }
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index cd15a2f5a200..637d1aa6ba06 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -100,11 +100,11 @@ namespace dbaui
OUString m_sQueryCommand; // the command of the query currently loaded (if any)
//OUString m_sToBeLoaded; // contains the element name which should be loaded if any
- DBTreeView* m_pTreeView;
- Splitter* m_pSplitter;
- SvTreeList* m_pTreeModel; // contains the datasources of the registry
- SvTreeListEntry* m_pCurrentlyDisplayed;
- ImplSVEvent * m_nAsyncDrop;
+ VclPtr<DBTreeView> m_pTreeView;
+ VclPtr<Splitter> m_pSplitter;
+ SvTreeList* m_pTreeModel; // contains the datasources of the registry
+ SvTreeListEntry* m_pCurrentlyDisplayed;
+ ImplSVEvent * m_nAsyncDrop;
sal_Int16 m_nBorder; // sal_True when border should be shown
diff --git a/dbaccess/source/ui/misc/ToolBoxHelper.cxx b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
index ac5e461bd951..52f658e12aea 100644
--- a/dbaccess/source/ui/misc/ToolBoxHelper.cxx
+++ b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
@@ -92,7 +92,7 @@ namespace dbaui
}
void OToolBoxHelper::setToolBox(ToolBox* _pTB)
{
- bool bFirstTime = (m_pToolBox == NULL);
+ bool bFirstTime = (m_pToolBox == nullptr);
m_pToolBox = _pTB;
if ( m_pToolBox )
{
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index db87ee74faa0..4b5aac2950b4 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -19,6 +19,8 @@
#include "WCPage.hxx"
#include "WCopyTable.hxx"
+#include "WColumnSelect.hxx"
+#include "WExtendPages.hxx"
#include "defaultobjectnamecheck.hxx"
#include <tools/debug.hxx>
@@ -101,6 +103,27 @@ OCopyTable::OCopyTable(vcl::Window * pParent)
SetText(ModuleRes(STR_COPYTABLE_TITLE_COPY));
}
+OCopyTable::~OCopyTable()
+{
+ dispose();
+}
+
+void OCopyTable::dispose()
+{
+ m_pEdTableName.clear();
+ m_pRB_DefData.clear();
+ m_pRB_Def.clear();
+ m_pRB_View.clear();
+ m_pRB_AppendData.clear();
+ m_pCB_UseHeaderLine.clear();
+ m_pCB_PrimaryColumn.clear();
+ m_pFT_KeyName.clear();
+ m_pEdKeyName.clear();
+ m_pPage2.clear();
+ m_pPage3.clear();
+ OWizardPage::dispose();
+}
+
IMPL_LINK( OCopyTable, AppendDataClickHdl, Button*, /*pButton*/ )
{
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index dbb53a8313d6..f3d4a2dce93d 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -50,6 +50,17 @@ OWizardPage::OWizardPage(vcl::Window* pParent, const OString& rID, const OUStrin
{
}
+OWizardPage::~OWizardPage()
+{
+ dispose();
+}
+
+void OWizardPage::dispose()
+{
+ m_pParent.clear();
+ TabPage::dispose();
+}
+
// OWizColumnSelect
OWizColumnSelect::OWizColumnSelect( vcl::Window* pParent)
:OWizardPage( pParent, "ApplyColPage", "dbaccess/ui/applycolpage.ui")
@@ -95,6 +106,12 @@ void OWizColumnSelect::dispose()
m_pNewColumnNames->RemoveEntry(0);
}
m_pNewColumnNames->Clear();
+ m_pOrgColumnNames.clear();
+ m_pColumn_RH.clear();
+ m_pColumns_RH.clear();
+ m_pColumn_LH.clear();
+ m_pColumns_LH.clear();
+ m_pNewColumnNames.clear();
OWizardPage::dispose();
}
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index f4394921c68a..887a1d06ba4e 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -710,11 +710,11 @@ void OCopyTableWizard::dispose()
m_aTypeInfo.clear();
m_aDestTypeInfoIndex.clear();
- delete m_pbHelp;
- delete m_pbCancel;
- delete m_pbPrev;
- delete m_pbNext;
- delete m_pbFinish;
+ m_pbHelp.clear();
+ m_pbCancel.clear();
+ m_pbPrev.clear();
+ m_pbNext.clear();
+ m_pbFinish.clear();
WizardDialog::dispose();
}
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index a837ff2670de..2707ed7ff09f 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -72,6 +72,26 @@ OWizNameMatching::OWizNameMatching( vcl::Window* pParent)
m_sDestText += "\n";
}
+OWizNameMatching::~OWizNameMatching()
+{
+ dispose();
+}
+
+void OWizNameMatching::dispose()
+{
+ m_pTABLE_LEFT.clear();
+ m_pTABLE_RIGHT.clear();
+ m_pCTRL_LEFT.clear();
+ m_pCTRL_RIGHT.clear();
+ m_pColumn_up.clear();
+ m_pColumn_down.clear();
+ m_pColumn_up_right.clear();
+ m_pColumn_down_right.clear();
+ m_pAll.clear();
+ m_pNone.clear();
+ OWizardPage::dispose();
+}
+
void OWizNameMatching::Reset()
{
// urspr"unglichen zustand wiederherstellen
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 44c2b6b2eafd..0eb7d8f2ae4d 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -49,6 +49,17 @@ OWizTypeSelectControl::OWizTypeSelectControl(vcl::Window* pParent, vcl::Window*
m_pParentTabPage = pParentTabPage;
}
+OWizTypeSelectControl::~OWizTypeSelectControl()
+{
+ dispose();
+}
+
+void OWizTypeSelectControl::dispose()
+{
+ m_pParentTabPage.clear();
+ OFieldDescControl::dispose();
+}
+
void OWizTypeSelectControl::ActivateAggregate( EControlType eType )
{
switch(eType )
@@ -82,7 +93,7 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
OSL_ENSURE(nRow == -1,"nRow muss -1 sein!");
(void)nRow;
- MultiListBox *pListBox = static_cast<OWizTypeSelect*>(m_pParentTabPage)->m_pColumnNames;
+ MultiListBox *pListBox = static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->m_pColumnNames;
OFieldDescription* pCurFieldDescr = getCurrentFieldDescData();
@@ -132,13 +143,13 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
pWiz->showError(strMessage);
pCurFieldDescr->SetName(sName);
DisplayData(pCurFieldDescr);
- static_cast<OWizTypeSelect*>(m_pParentTabPage)->setDuplicateName(true);
+ static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->setDuplicateName(true);
return;
}
OUString sOldName = pCurFieldDescr->GetName();
pCurFieldDescr->SetName(sNewName);
- static_cast<OWizTypeSelect*>(m_pParentTabPage)->setDuplicateName(false);
+ static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->setDuplicateName(false);
// now we change the name
OCopyTableWizard::TNameMapping::iterator aIter = pWiz->m_mNameMapping.begin();
@@ -167,42 +178,42 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
::com::sun::star::lang::Locale OWizTypeSelectControl::GetLocale() const
{
- return static_cast<OWizTypeSelect*>(m_pParentTabPage)->m_pParent->GetLocale();
+ return static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->m_pParent->GetLocale();
}
Reference< XNumberFormatter > OWizTypeSelectControl::GetFormatter() const
{
- return static_cast<OWizTypeSelect*>(m_pParentTabPage)->m_pParent->GetFormatter();
+ return static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->m_pParent->GetFormatter();
}
TOTypeInfoSP OWizTypeSelectControl::getTypeInfo(sal_Int32 _nPos)
{
- return static_cast<OWizTypeSelect*>(m_pParentTabPage)->m_pParent->getDestTypeInfo(_nPos);
+ return static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->m_pParent->getDestTypeInfo(_nPos);
}
const OTypeInfoMap* OWizTypeSelectControl::getTypeInfo() const
{
- return &static_cast<OWizTypeSelect*>(m_pParentTabPage)->m_pParent->getDestTypeInfo();
+ return &static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->m_pParent->getDestTypeInfo();
}
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> OWizTypeSelectControl::getMetaData()
{
- return static_cast<OWizTypeSelect*>(m_pParentTabPage)->m_pParent->m_xDestConnection->getMetaData();
+ return static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->m_pParent->m_xDestConnection->getMetaData();
}
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> OWizTypeSelectControl::getConnection()
{
- return static_cast<OWizTypeSelect*>(m_pParentTabPage)->m_pParent->m_xDestConnection;
+ return static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->m_pParent->m_xDestConnection;
}
bool OWizTypeSelectControl::isAutoIncrementValueEnabled() const
{
- return static_cast<OWizTypeSelect*>(m_pParentTabPage)->m_bAutoIncrementEnabled;
+ return static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->m_bAutoIncrementEnabled;
}
OUString OWizTypeSelectControl::getAutoIncrementValue() const
{
- return static_cast<OWizTypeSelect*>(m_pParentTabPage)->m_sAutoIncrementValue;
+ return static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->m_sAutoIncrementValue;
}
#define IMG_PRIMARY_KEY 1
@@ -255,7 +266,13 @@ OWizTypeSelect::~OWizTypeSelect()
void OWizTypeSelect::dispose()
{
- delete m_pTypeControl;
+ m_pTypeControl.clear();
+ m_pColumnNames.clear();
+ m_pColumns.clear();
+ m_pAutoType.clear();
+ m_pAutoFt.clear();
+ m_pAutoEt.clear();
+ m_pAutoPb.clear();
OWizardPage::dispose();
}
@@ -345,6 +362,17 @@ IMPL_LINK( OWizTypeSelect, ButtonClickHdl, Button *, /*pButton*/ )
return 0;
}
+OWizTypeSelectList::~OWizTypeSelectList()
+{
+ dispose();
+}
+
+void OWizTypeSelectList::dispose()
+{
+ m_pParentTabPage.clear();
+ MultiListBox::dispose();
+}
+
bool OWizTypeSelectList::IsPrimaryKeyAllowed() const
{
sal_uInt16 nCount = GetSelectEntryCount();
@@ -365,7 +393,7 @@ void OWizTypeSelectList::setPrimaryKey(OFieldDescription* _pFieldDescr, sal_uInt
RemoveEntry(_nPos);
_pFieldDescr->SetPrimaryKey(_bSet);
if( _bSet )
- InsertEntry(sColumnName, static_cast<OWizTypeSelect*>(m_pParentTabPage)->m_imgPKey,_nPos);
+ InsertEntry(sColumnName, static_cast<OWizTypeSelect*>(m_pParentTabPage.get())->m_imgPKey,_nPos);
else if( _pFieldDescr->getTypeInfo()->bNullable )
{
_pFieldDescr->SetControlDefault(Any());
diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx
index 3f55ef279a78..77408cdaf51a 100644
--- a/dbaccess/source/ui/misc/singledoccontroller.cxx
+++ b/dbaccess/source/ui/misc/singledoccontroller.cxx
@@ -18,6 +18,7 @@
*/
#include <dbaccess/dbaundomanager.hxx>
+#include <dbaccess/dataview.hxx>
#include "singledoccontroller.hxx"
#include "browserids.hxx"
#include "dbu_misc.hrc"
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
index 2b6b3a42db34..af7ef4ec89a0 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
@@ -82,10 +82,10 @@ namespace dbaui
{
// search the position of our table window in the table window map
nIndex = m_pLine->GetParent()->GetTabWinMap().size();
- const ::std::vector<OTableConnection*>& rVec = m_pLine->GetParent()->getTableConnections();
- ::std::vector<OTableConnection*>::const_iterator aIter = rVec.begin();
- ::std::vector<OTableConnection*>::const_iterator aEnd = rVec.end();
- for (; aIter != aEnd && (*aIter) != m_pLine; ++nIndex,++aIter)
+ const auto& rVec = m_pLine->GetParent()->getTableConnections();
+ auto aIter = rVec.begin();
+ auto aEnd = rVec.end();
+ for (; aIter != aEnd && (*aIter).get() != m_pLine; ++nIndex,++aIter)
;
nIndex = ( aIter != aEnd ) ? nIndex : -1;
}
@@ -186,6 +186,7 @@ namespace dbaui
{
// clear vector
clearLineData();
+ m_pParent.clear();
vcl::Window::dispose();
}
bool OConnectionLineAccess::isEditable() const
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index 9e192e66b3ab..9aab0ceccfbf 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -225,7 +225,7 @@ FeatureState OJoinController::GetState(sal_uInt16 _nId) const
case ID_BROWSER_ADDTABLE:
aReturn.bEnabled = ( getView() != NULL )
&& const_cast< OJoinController* >( this )->getJoinView()->getTableView()->IsAddAllowed();
- aReturn.bChecked = aReturn.bEnabled && m_pAddTableDialog != NULL && m_pAddTableDialog->IsVisible() ;
+ aReturn.bChecked = aReturn.bEnabled && m_pAddTableDialog != nullptr && m_pAddTableDialog->IsVisible() ;
if ( aReturn.bEnabled )
aReturn.sTitle = OAddTableDlg::getDialogTitleForContext( impl_getDialogContext() );
break;
diff --git a/dbaccess/source/ui/querydesign/JoinDesignView.cxx b/dbaccess/source/ui/querydesign/JoinDesignView.cxx
index 58399a08f0e8..de5b30488a57 100644
--- a/dbaccess/source/ui/querydesign/JoinDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinDesignView.cxx
@@ -66,10 +66,8 @@ OJoinDesignView::~OJoinDesignView()
void OJoinDesignView::dispose()
{
- boost::scoped_ptr<vcl::Window> aT3(m_pScrollWindow);
- m_pScrollWindow = NULL;
- boost::scoped_ptr<vcl::Window> aT2(m_pTableView);
- m_pTableView = NULL;
+ m_pScrollWindow.clear();
+ m_pTableView.clear();
ODataView::dispose();
}
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index be2b0e0bde1e..ad15132b72ef 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -94,11 +94,10 @@ OScrollWindowHelper::~OScrollWindowHelper()
void OScrollWindowHelper::dispose()
{
- boost::scoped_ptr<vcl::Window> aTemp(m_pCornerWindow);
- m_pCornerWindow = NULL;
- m_pTableView = NULL;
m_aHScrollBar.disposeAndClear();
m_aVScrollBar.disposeAndClear();
+ m_pCornerWindow.clear();
+ m_pTableView.clear();
vcl::Window::dispose();
}
@@ -194,6 +193,11 @@ void OJoinTableView::dispose()
}
// delete lists
clearLayoutInformation();
+ m_pDragWin.clear();
+ m_pSizingWin.clear();
+ m_pSelectedConn.clear();
+ m_pLastFocusTabWin.clear();
+ m_pView.clear();
vcl::Window::dispose();
}
@@ -271,7 +275,7 @@ OTableWindow* OJoinTableView::GetTabWindow( const OUString& rName )
{
OTableWindowMap::iterator aIter = m_aTableMap.find(rName);
- return aIter == m_aTableMap.end() ? NULL : aIter->second;
+ return aIter == m_aTableMap.end() ? nullptr : aIter->second;
}
TTableWindowData::value_type OJoinTableView::createTableWindowData(const OUString& _rComposedName
@@ -354,7 +358,7 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin )
bool bRemove = true;
TTableWindowData::value_type pData = pTabWin->GetData();
sal_Int32 nCount = m_vTableConnection.size();
- ::std::vector<OTableConnection*>::reverse_iterator aIter = m_vTableConnection.rbegin();
+ auto aIter = m_vTableConnection.rbegin();
while(aIter != m_vTableConnection.rend() && bRemove)
{
OTableConnection* pTabConn = (*aIter);
@@ -828,8 +832,8 @@ void OJoinTableView::MouseButtonUp( const MouseEvent& rEvt )
{
DeselectConn(GetSelectedConn());
- ::std::vector<OTableConnection*>::iterator aIter = m_vTableConnection.begin();
- ::std::vector<OTableConnection*>::iterator aEnd = m_vTableConnection.end();
+ auto aIter = m_vTableConnection.begin();
+ auto aEnd = m_vTableConnection.end();
for(;aIter != aEnd;++aIter)
{
if( (*aIter)->CheckHit(rEvt.GetPosPixel()) )
@@ -941,20 +945,21 @@ void OJoinTableView::Paint( const Rectangle& rRect )
void OJoinTableView::InvalidateConnections()
{
// draw Joins
- ::std::for_each(m_vTableConnection.begin(),m_vTableConnection.end(),
- ::std::mem_fun(& OTableConnection::InvalidateConnection));
+ for(auto & conn : m_vTableConnection)
+ conn->InvalidateConnection();
}
void OJoinTableView::DrawConnections( const Rectangle& rRect )
{
// draw Joins
- ::std::for_each(m_vTableConnection.begin(),m_vTableConnection.end(),boost::bind( &OTableConnection::Draw, _1, boost::cref( rRect )));
+ for(auto conn : m_vTableConnection)
+ conn->Draw(rRect);
// finally redraw the selected one above all others
if (GetSelectedConn())
GetSelectedConn()->Draw( rRect );
}
-::std::vector<OTableConnection*>::const_iterator OJoinTableView::getTableConnections(const OTableWindow* _pFromWin) const
+::std::vector<VclPtr<OTableConnection> >::const_iterator OJoinTableView::getTableConnections(const OTableWindow* _pFromWin) const
{
return ::std::find_if( m_vTableConnection.begin(),
m_vTableConnection.end(),
@@ -980,8 +985,8 @@ void OJoinTableView::ClearAll()
HideTabWins();
// and the same with the Connections
- ::std::vector<OTableConnection*>::iterator aIter = m_vTableConnection.begin();
- ::std::vector<OTableConnection*>::iterator aEnd = m_vTableConnection.end();
+ auto aIter = m_vTableConnection.begin();
+ auto aEnd = m_vTableConnection.end();
for(;aIter != aEnd;++aIter)
RemoveConnection( *aIter ,true);
m_vTableConnection.clear();
@@ -997,7 +1002,7 @@ void OJoinTableView::ClearAll()
bool OJoinTableView::ScrollWhileDragging()
{
- OSL_ENSURE(m_pDragWin != NULL, "OJoinTableView::ScrollWhileDragging must not be called when a window is being dragged !");
+ OSL_ENSURE(m_pDragWin != nullptr, "OJoinTableView::ScrollWhileDragging must not be called when a window is being dragged !");
// kill the timer
if (m_aDragScrollIdle.IsActive())
@@ -1169,8 +1174,8 @@ void OJoinTableView::Command(const CommandEvent& rEvt)
DeselectConn(pSelConnection);
const Point& aMousePos = rEvt.GetMousePosPixel();
- ::std::vector<OTableConnection*>::iterator aIter = m_vTableConnection.begin();
- ::std::vector<OTableConnection*>::iterator aEnd = m_vTableConnection.end();
+ auto aIter = m_vTableConnection.begin();
+ auto aEnd = m_vTableConnection.end();
for(;aIter != aEnd;++aIter)
{
if( (*aIter)->CheckHit(aMousePos) )
@@ -1199,8 +1204,8 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab
{
bool bFoundStart = _rpFirstAfter ? sal_False : sal_True;
- ::std::vector<OTableConnection*>::const_iterator aIter = m_vTableConnection.begin();
- ::std::vector<OTableConnection*>::const_iterator aEnd = m_vTableConnection.end();
+ auto aIter = m_vTableConnection.begin();
+ auto aEnd = m_vTableConnection.end();
for(;aIter != aEnd;++aIter)
{
OTableConnection* pData = *aIter;
@@ -1332,12 +1337,12 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt)
{ // no active tab win -> travel the connections
// find the currently selected conn within the conn list
sal_Int32 i(0);
- for ( ::std::vector<OTableConnection*>::iterator connectionIter = m_vTableConnection.begin();
+ for ( auto connectionIter = m_vTableConnection.begin();
connectionIter != m_vTableConnection.end();
++connectionIter, ++i
)
{
- if ( (*connectionIter) == GetSelectedConn() )
+ if ( (*connectionIter).get() == GetSelectedConn() )
break;
}
if (i == sal_Int32(m_vTableConnection.size() - 1) && bForward)
@@ -1531,11 +1536,6 @@ void OJoinTableView::clearLayoutInformation()
m_aTableMap.clear();
- ::std::vector<OTableConnection*>::const_iterator aIter2 = m_vTableConnection.begin();
- ::std::vector<OTableConnection*>::const_iterator aEnd2 = m_vTableConnection.end();
- for(;aIter2 != aEnd2;++aIter2)
- delete *aIter2;
-
m_vTableConnection.clear();
}
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx
index e12ad2990e59..607552ff2389 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx
@@ -144,7 +144,7 @@ void OQueryTableWindow::OnEntryDoubleClicked(SvTreeListEntry* pEntry)
bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFieldDescRef& rInfo)
{
- OSL_ENSURE(m_pListBox != NULL, "OQueryTableWindow::ExistsField : doesn't have ::com::sun::star::form::ListBox !");
+ OSL_ENSURE(m_pListBox != nullptr, "OQueryTableWindow::ExistsField : doesn't have ::com::sun::star::form::ListBox !");
OSL_ENSURE(rInfo.is(),"OQueryTableWindow::ExistsField: invalid argument for OTableFieldDescRef!");
Reference< XConnection> xConnection = getTableView()->getDesignView()->getController().getConnection();
bool bExists = false;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
index 61c7507d63f8..a009832b5624 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
@@ -30,7 +30,7 @@ namespace dbaui
class OQueryDesignFieldUndoAct : public OCommentUndoAction
{
protected:
- OSelectionBrowseBox* pOwner;
+ VclPtr<OSelectionBrowseBox> pOwner;
sal_uInt16 m_nColumnPostion;
virtual void Undo() SAL_OVERRIDE = 0;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
index d74ce27e9fc7..9166a2e782c4 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QUERYDESIGNUNDOACTION_HXX
#include "GeneralUndo.hxx"
+#include <vcl/vclptr.hxx>
namespace dbaui
{
@@ -28,7 +29,7 @@ namespace dbaui
class OQueryDesignUndoAction : public OCommentUndoAction
{
protected:
- OJoinTableView* m_pOwner; // in this container it all happens
+ VclPtr<OJoinTableView> m_pOwner; // in this container it all happens
public:
OQueryDesignUndoAction(OJoinTableView* pOwner, sal_uInt16 nCommentID) : OCommentUndoAction(nCommentID), m_pOwner(pOwner) { }
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index e3c3ea24c014..378afe667f74 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -508,12 +508,12 @@ namespace
pEntryConn->SetVisited(true);
// first search for the "to" window
- const ::std::vector<OTableConnection*>& rConnections = pEntryConn->GetParent()->getTableConnections();
- ::std::vector<OTableConnection*>::const_iterator aIter = rConnections.begin();
- ::std::vector<OTableConnection*>::const_iterator aEnd = rConnections.end();
+ const auto& rConnections = pEntryConn->GetParent()->getTableConnections();
+ auto aIter = rConnections.begin();
+ auto aEnd = rConnections.end();
for(;aIter != aEnd;++aIter)
{
- OQueryTableConnection* pNext = static_cast<OQueryTableConnection*>(*aIter);
+ OQueryTableConnection* pNext = static_cast<OQueryTableConnection*>((*aIter).get());
if(!pNext->IsVisited() && (pNext->GetSourceWin() == pEntryTabTo || pNext->GetDestWin() == pEntryTabTo))
{
OQueryTableWindow* pEntryTab = pNext->GetSourceWin() == pEntryTabTo ? static_cast<OQueryTableWindow*>(pNext->GetDestWin()) : static_cast<OQueryTableWindow*>(pNext->GetSourceWin());
@@ -531,7 +531,7 @@ namespace
aIter = rConnections.begin();
for(;aIter != aEnd;++aIter)
{
- OQueryTableConnection* pNext = static_cast<OQueryTableConnection*>(*aIter);
+ OQueryTableConnection* pNext = static_cast<OQueryTableConnection*>((*aIter).get());
if(!pNext->IsVisited() && (pNext->GetSourceWin() == pEntryTabFrom || pNext->GetDestWin() == pEntryTabFrom))
{
OQueryTableWindow* pEntryTab = pNext->GetSourceWin() == pEntryTabFrom ? static_cast<OQueryTableWindow*>(pNext->GetDestWin()) : static_cast<OQueryTableWindow*>(pNext->GetSourceWin());
@@ -665,7 +665,7 @@ namespace
bool bFound = false;
for(;!bFound && tableIter != tableEnd ;++tableIter)
{
- OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(tableIter->second);
+ OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(tableIter->second.get());
bFound = pTabWin->ExistsField( rFieldName, aInfo );
if ( bFound )
@@ -984,13 +984,13 @@ namespace
void GenerateInnerJoinCriterias(const Reference< XConnection>& _xConnection,
OUString& _rJoinCrit,
- const ::std::vector<OTableConnection*>* _pConnList)
+ const ::std::vector<VclPtr<OTableConnection> >& _rConnList)
{
- ::std::vector<OTableConnection*>::const_iterator aIter = _pConnList->begin();
- ::std::vector<OTableConnection*>::const_iterator aEnd = _pConnList->end();
+ auto aIter = _rConnList.begin();
+ auto aEnd = _rConnList.end();
for(;aIter != aEnd;++aIter)
{
- const OQueryTableConnection* pEntryConn = static_cast<const OQueryTableConnection*>(*aIter);
+ const OQueryTableConnection* pEntryConn = static_cast<const OQueryTableConnection*>((*aIter).get());
OQueryTableConnectionData* pEntryConnData = static_cast<OQueryTableConnectionData*>(pEntryConn->GetData().get());
if ( pEntryConnData->GetJoinType() == INNER_JOIN && !pEntryConnData->isNatural() )
{
@@ -1017,7 +1017,7 @@ namespace
}
OUString GenerateFromClause( const Reference< XConnection>& _xConnection,
const OQueryTableView::OTableWindowMap* pTabList,
- const ::std::vector<OTableConnection*>* pConnList
+ const ::std::vector<VclPtr<OTableConnection> >& rConnList
)
{
@@ -1026,14 +1026,14 @@ namespace
tableNames_t aTableNames;
// generate outer join clause in from
- if(!pConnList->empty())
+ if(!rConnList.empty())
{
- ::std::vector<OTableConnection*>::const_iterator aIter = pConnList->begin();
- ::std::vector<OTableConnection*>::const_iterator aEnd = pConnList->end();
+ auto aIter = rConnList.begin();
+ auto aEnd = rConnList.end();
::std::map<OTableWindow*,sal_Int32> aConnectionCount;
for(;aIter != aEnd;++aIter)
{
- static_cast<OQueryTableConnection*>(*aIter)->SetVisited(false);
+ static_cast<OQueryTableConnection*>((*aIter).get())->SetVisited(false);
++aConnectionCount[(*aIter)->GetSourceWin()];
++aConnectionCount[(*aIter)->GetDestWin()];
}
@@ -1050,10 +1050,10 @@ namespace
::std::multimap<sal_Int32 , OTableWindow*>::reverse_iterator aREnd = aMulti.rend();
for(;aRIter != aREnd;++aRIter)
{
- ::std::vector<OTableConnection*>::const_iterator aConIter = aRIter->second->getTableView()->getTableConnections(aRIter->second);
+ auto aConIter = aRIter->second->getTableView()->getTableConnections(aRIter->second);
for(;aConIter != aEnd;++aConIter)
{
- OQueryTableConnection* pEntryConn = static_cast<OQueryTableConnection*>(*aConIter);
+ OQueryTableConnection* pEntryConn = static_cast<OQueryTableConnection*>((*aConIter).get());
if(!pEntryConn->IsVisited() && pEntryConn->GetSourceWin() == aRIter->second )
{
OUString aJoin;
@@ -1096,10 +1096,10 @@ namespace
// "FROM tbl1, tbl2 WHERE tbl1.col1=tlb2.col2"
// rather than
// "FROM tbl1 INNER JOIN tbl2 ON tbl1.col1=tlb2.col2"
- aIter = pConnList->begin();
+ aIter = rConnList.begin();
for(;aIter != aEnd;++aIter)
{
- OQueryTableConnection* pEntryConn = static_cast<OQueryTableConnection*>(*aIter);
+ OQueryTableConnection* pEntryConn = static_cast<OQueryTableConnection*>((*aIter).get());
if(!pEntryConn->IsVisited())
{
searchAndAppendName(_xConnection,
@@ -1119,7 +1119,7 @@ namespace
OQueryTableView::OTableWindowMap::const_iterator aTabEnd = pTabList->end();
for(;aTabIter != aTabEnd;++aTabIter)
{
- const OQueryTableWindow* pEntryTab = static_cast<const OQueryTableWindow*>(aTabIter->second);
+ const OQueryTableWindow* pEntryTab = static_cast<const OQueryTableWindow*>(aTabIter->second.get());
if(!pEntryTab->ExistsAConn())
{
aTableListStr += BuildTable(_xConnection,pEntryTab);
@@ -1540,7 +1540,7 @@ namespace
OJoinTableView::OTableWindowMap::iterator aTabEnd = rTabList.end();
for(;aIter != aTabEnd;++aIter)
{
- OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second);
+ OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second.get());
if (pTabWin->ExistsField( OUString("*"), aDragLeft ))
{
aDragLeft->SetAlias(OUString());
@@ -1748,7 +1748,7 @@ namespace
OJoinTableView::OTableWindowMap::const_iterator aEnd = _rTabList.end();
for ( ; aIter != aEnd; ++aIter )
{
- OQueryTableWindow* pTabWin = static_cast< OQueryTableWindow* >( aIter->second );
+ OQueryTableWindow* pTabWin = static_cast< OQueryTableWindow* >( aIter->second.get() );
if ( pTabWin && pTabWin->ExistsField( _rColumName, _rInfo ) )
return pTabWin;
}
@@ -2104,7 +2104,7 @@ namespace
OJoinTableView::OTableWindowMap::iterator aEnd = _pTabList->end();
for(;aIter != aEnd && eOk == eErrorCode ;++aIter)
{
- OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second);
+ OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second.get());
OTableFieldDescRef aInfo = new OTableFieldDesc();
if (pTabWin->ExistsField( sAsterisk, aInfo ))
{
@@ -2201,7 +2201,7 @@ namespace
const OJoinTableView::OTableWindowMap::const_iterator aEnd = pTabList->end();
for(;aIter != aEnd;++aIter)
{
- OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second);
+ OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second.get());
if (pTabWin->ExistsField( OUString("*"), aInfo ))
{
aInfo->SetAlias(OUString());
@@ -2524,8 +2524,7 @@ void OQueryDesignView::dispose()
{
if ( m_pTableView )
::dbaui::notifySystemWindow(this,m_pTableView,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
- boost::scoped_ptr<vcl::Window> aTemp(m_pSelectionBox);
- m_pSelectionBox = NULL;
+ m_pSelectionBox.clear();
m_aSplitter.disposeAndClear();
OQueryView::dispose();
}
@@ -2751,7 +2750,7 @@ void OQueryDesignView::fillValidFields(const OUString& sAliasName, ComboBox* pFi
OJoinTableView::OTableWindowMap::iterator aEnd = rTabWins.end();
for(;aIter != aEnd;++aIter)
{
- OQueryTableWindow* pCurrentWin = static_cast<OQueryTableWindow*>(aIter->second);
+ OQueryTableWindow* pCurrentWin = static_cast<OQueryTableWindow*>(aIter->second.get());
if (bAllTables || (pCurrentWin->GetAliasName() == sAliasName))
{
strCurrentPrefix = pCurrentWin->GetAliasName();
@@ -2851,9 +2850,9 @@ OUString OQueryDesignView::getStatement()
// and trigger a error message
// ----------------- Build table list ----------------------
- const ::std::vector<OTableConnection*>& rConnList = m_pTableView->getTableConnections();
+ const auto& rConnList = m_pTableView->getTableConnections();
Reference< XConnection> xConnection = rController.getConnection();
- OUString aTableListStr(GenerateFromClause(xConnection,&rTabList,&rConnList));
+ OUString aTableListStr(GenerateFromClause(xConnection,&rTabList,rConnList));
OSL_ENSURE(!aTableListStr.isEmpty(), "OQueryDesignView::getStatement() : unexpected : have Fields, but no Tables !");
// if fields exist now, these only can be created by inserting from an already existing table; if on the other hand
// a table is deleted, also the belonging fields will be deleted -> therefore it CANNOT occur that fields
@@ -2865,7 +2864,7 @@ OUString OQueryDesignView::getStatement()
return OUString();
OUString aJoinCrit;
- GenerateInnerJoinCriterias(xConnection,aJoinCrit,&rConnList);
+ GenerateInnerJoinCriterias(xConnection,aJoinCrit,rConnList);
if(!aJoinCrit.isEmpty())
{
OUString aTmp = "( " + aJoinCrit + " )";
diff --git a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx
index 49060c1bc08e..b8c9f52ad0c1 100644
--- a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx
@@ -31,7 +31,7 @@ namespace dbaui
class OJoinMoveTabWinUndoAct : public OQueryDesignUndoAction
{
Point m_ptNextPosition;
- OTableWindow* m_pTabWin;
+ VclPtr<OTableWindow> m_pTabWin;
protected:
void TogglePosition();
diff --git a/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx
index 4de742deb1d4..bd9381468ca0 100644
--- a/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx
@@ -31,7 +31,7 @@ namespace dbaui
{
Point m_ptNextPosition;
Size m_szNextSize;
- OTableWindow* m_pTabWin;
+ VclPtr<OTableWindow> m_pTabWin;
protected:
inline void ToggleSizePosition();
diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
index 16f8e0e4b7cd..85f3ff283985 100644
--- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
@@ -19,6 +19,7 @@
#include "QueryTabConnUndoAction.hxx"
#include "QTableConnection.hxx"
+#include "QTableWindow.hxx"
#include <tools/debug.hxx>
#include "QueryTableView.hxx"
#include "QueryAddTabConnUndoAction.hxx"
@@ -32,7 +33,6 @@ OQueryTabConnUndoAction::~OQueryTabConnUndoAction()
if (m_bOwnerOfConn)
{ // I have the connection -> delete
m_pOwner->DeselectConn(m_pConnection);
- delete m_pConnection;
}
}
@@ -50,13 +50,13 @@ OQueryAddTabConnUndoAction::OQueryAddTabConnUndoAction(OQueryTableView* pOwner)
void OQueryAddTabConnUndoAction::Undo()
{
- static_cast<OQueryTableView*>(m_pOwner)->DropConnection(m_pConnection);
+ static_cast<OQueryTableView*>(m_pOwner.get())->DropConnection(m_pConnection);
SetOwnership(true);
}
void OQueryAddTabConnUndoAction::Redo()
{
- static_cast<OQueryTableView*>(m_pOwner)->GetConnection(m_pConnection);
+ static_cast<OQueryTableView*>(m_pOwner.get())->GetConnection(m_pConnection);
SetOwnership(false);
}
@@ -67,13 +67,13 @@ OQueryDelTabConnUndoAction::OQueryDelTabConnUndoAction(OQueryTableView* pOwner)
void OQueryDelTabConnUndoAction::Undo()
{
- static_cast<OQueryTableView*>(m_pOwner)->GetConnection(m_pConnection);
+ static_cast<OQueryTableView*>(m_pOwner.get())->GetConnection(m_pConnection);
SetOwnership(false);
}
void OQueryDelTabConnUndoAction::Redo()
{
- static_cast<OQueryTableView*>(m_pOwner)->DropConnection(m_pConnection);
+ static_cast<OQueryTableView*>(m_pOwner.get())->DropConnection(m_pConnection);
SetOwnership(true);
}
@@ -88,13 +88,13 @@ OQueryTabWinShowUndoAct::~OQueryTabWinShowUndoAct()
void OQueryTabWinShowUndoAct::Undo()
{
- static_cast<OQueryTableView*>(m_pOwner)->HideTabWin(m_pTabWin, this);
+ static_cast<OQueryTableView*>(m_pOwner.get())->HideTabWin(m_pTabWin, this);
SetOwnership(true);
}
void OQueryTabWinShowUndoAct::Redo()
{
- static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin(m_pTabWin, this,true);
+ static_cast<OQueryTableView*>(m_pOwner.get())->ShowTabWin(m_pTabWin, this,true);
SetOwnership(false);
}
@@ -109,13 +109,13 @@ OQueryTabWinDelUndoAct::~OQueryTabWinDelUndoAct()
void OQueryTabWinDelUndoAct::Undo()
{
- static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin( m_pTabWin, this,true );
+ static_cast<OQueryTableView*>(m_pOwner.get())->ShowTabWin( m_pTabWin, this,true );
SetOwnership(false);
}
void OQueryTabWinDelUndoAct::Redo()
{
- static_cast<OQueryTableView*>(m_pOwner)->HideTabWin( m_pTabWin, this );
+ static_cast<OQueryTableView*>(m_pOwner.get())->HideTabWin( m_pTabWin, this );
SetOwnership(true);
}
diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
index 72b31532213d..6541a4ed5b42 100644
--- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
@@ -28,7 +28,7 @@ namespace dbaui
class OQueryTabConnUndoAction : public OQueryDesignUndoAction
{
protected:
- OQueryTableConnection* m_pConnection;
+ VclPtr<OQueryTableConnection> m_pConnection;
bool m_bOwnerOfConn;
// am I the only owner of the connection? (changes with every redo and undo)
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
index f7bee57ce37a..1745890f1145 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
@@ -51,20 +51,18 @@ OQueryTabWinUndoAct::~OQueryTabWinUndoAct()
if (m_bOwnerOfObjects)
{
// I should take care to delete the window if I am the only owner
- OSL_ENSURE(m_pTabWin != NULL, "OQueryTabWinUndoAct::~OQueryTabWinUndoAct() : m_pTabWin sollte nicht NULL sein");
+ OSL_ENSURE(m_pTabWin != nullptr, "OQueryTabWinUndoAct::~OQueryTabWinUndoAct() : m_pTabWin sollte nicht NULL sein");
OSL_ENSURE(!m_pTabWin->IsVisible(), "OQueryTabWinUndoAct::~OQueryTabWinUndoAct() : *m_pTabWin sollte nicht sichtbar sein");
if ( m_pTabWin )
m_pTabWin->clearListBox();
- delete m_pTabWin;
// and of course the corresponding connections
- ::std::vector<OTableConnection*>::iterator aIter = m_vTableConnection.begin();
- ::std::vector<OTableConnection*>::iterator aEnd = m_vTableConnection.end();
+ auto aIter = m_vTableConnection.begin();
+ auto aEnd = m_vTableConnection.end();
for(;aIter != aEnd;++aIter)
{
m_pOwner->DeselectConn(*aIter);
- delete (*aIter);
}
m_vTableConnection.clear();
}
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
index 22c9921330a6..af22a64063d2 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
@@ -33,8 +33,8 @@ namespace dbaui
class OQueryTabWinUndoAct : public OQueryDesignUndoAction
{
protected:
- ::std::vector<OTableConnection*> m_vTableConnection;
- OQueryTableWindow* m_pTabWin;
+ ::std::vector<VclPtr<OTableConnection> > m_vTableConnection;
+ VclPtr<OQueryTableWindow> m_pTabWin;
bool m_bOwnerOfObjects;
// am I the only owner of the managed objects? (changes with every redo or undo)
@@ -54,7 +54,7 @@ namespace dbaui
// access to the managed connections
sal_uInt16 ConnCount() { return (sal_uInt16)m_vTableConnection.size(); }
- ::std::vector<OTableConnection*>& GetTabConnList() { return m_vTableConnection; }
+ ::std::vector<VclPtr<OTableConnection> >& GetTabConnList() { return m_vTableConnection; }
void InsertConnection( OTableConnection* pConnection ) { m_vTableConnection.push_back(pConnection); }
void RemoveConnection( OTableConnection* pConnection )
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 573eba4608a4..18d0fd583bb7 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -327,26 +327,26 @@ void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn,
{
// let's first check if I have the connection already
OQueryTableConnection* pTabConn = NULL;
- const ::std::vector<OTableConnection*>& rConnections = getTableConnections();
- ::std::vector<OTableConnection*>::const_iterator aEnd = rConnections.end();
- ::std::vector<OTableConnection*>::const_iterator aIter = ::std::find( rConnections.begin(),
- aEnd,
- static_cast<const OTableConnection*>(&rNewConn)
- );
+ const auto& rConnections = getTableConnections();
+ auto aEnd = rConnections.end();
+ auto aIter = ::std::find( rConnections.begin(),
+ aEnd,
+ VclPtr<OTableConnection>(const_cast<OTableConnection*>(static_cast<const OTableConnection*>(&rNewConn)))
+ );
if(aIter == aEnd )
{
aIter = rConnections.begin();
for(;aIter != aEnd;++aIter)
{
- if(*static_cast<OQueryTableConnection*>(*aIter) == rNewConn)
+ if(*static_cast<OQueryTableConnection*>((*aIter).get()) == rNewConn)
{
- pTabConn = static_cast<OQueryTableConnection*>(*aIter);
+ pTabConn = static_cast<OQueryTableConnection*>((*aIter).get());
break;
}
}
}
else
- pTabConn = static_cast<OQueryTableConnection*>(*aIter);
+ pTabConn = static_cast<OQueryTableConnection*>((*aIter).get());
// no -> insert
if (pTabConn == NULL)
@@ -525,14 +525,14 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString&
{
for(aIter = rTabWins.begin();aIter != aEnd;++aIter)
{
- OQueryTableWindow* pTabWinTmp = static_cast<OQueryTableWindow*>(aIter->second);
+ OQueryTableWindow* pTabWinTmp = static_cast<OQueryTableWindow*>(aIter->second.get());
OSL_ENSURE( pTabWinTmp,"TableWindow is null!" );
if ( pTabWinTmp != pNewTabWin && pTabWinTmp->GetComposedName() == aReferencedTable )
break;
}
}
if ( aIter != aEnd && pNewTabWin != aIter->second )
- addConnections( this, *pNewTabWin, *static_cast<OQueryTableWindow*>(aIter->second), xFKeyColumns );
+ addConnections( this, *pNewTabWin, *static_cast<OQueryTableWindow*>(aIter->second.get()), xFKeyColumns );
}
break;
@@ -543,7 +543,7 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString&
OTableWindowMap::const_iterator aEnd = rTabWins.end();
for(;aIter != aEnd;++aIter)
{
- OQueryTableWindow* pTabWinTmp = static_cast<OQueryTableWindow*>(aIter->second);
+ OQueryTableWindow* pTabWinTmp = static_cast<OQueryTableWindow*>(aIter->second.get());
if ( pTabWinTmp == pNewTabWin )
continue;
@@ -656,8 +656,8 @@ void OQueryTableView::createNewConnection()
if( openJoinDialog(this,pData,true) )
{
OTableWindowMap& rMap = GetTabWinMap();
- OQueryTableWindow* pSourceWin = static_cast< OQueryTableWindow*>(rMap[pData->getReferencingTable()->GetWinName()]);
- OQueryTableWindow* pDestWin = static_cast< OQueryTableWindow*>(rMap[pData->getReferencedTable()->GetWinName()]);
+ OQueryTableWindow* pSourceWin = static_cast< OQueryTableWindow*>(rMap[pData->getReferencingTable()->GetWinName()].get());
+ OQueryTableWindow* pDestWin = static_cast< OQueryTableWindow*>(rMap[pData->getReferencedTable()->GetWinName()].get());
// first we have to look if the this connection already exists
OTableConnection* pConn = GetTabConn(pSourceWin,pDestWin,true);
bool bNew = true;
@@ -704,7 +704,7 @@ OQueryTableWindow* OQueryTableView::FindTable(const OUString& rAliasName)
// (it is harmless but does not make sense and indicates that there is probably an error in the caller)
OTableWindowMap::const_iterator aIter = GetTabWinMap().find(rAliasName);
if(aIter != GetTabWinMap().end())
- return static_cast<OQueryTableWindow*>(aIter->second);
+ return static_cast<OQueryTableWindow*>(aIter->second.get());
return NULL;
}
@@ -715,7 +715,7 @@ bool OQueryTableView::FindTableFromField(const OUString& rFieldName, OTableField
OTableWindowMap::const_iterator aEnd = GetTabWinMap().end();
for(;aIter != aEnd;++aIter)
{
- if(static_cast<OQueryTableWindow*>(aIter->second)->ExistsField(rFieldName, rInfo))
+ if(static_cast<OQueryTableWindow*>(aIter->second.get())->ExistsField(rFieldName, rInfo))
++rCnt;
}
@@ -834,11 +834,11 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
// collect connections belonging to the window and pass to UndoAction
sal_Int16 nCnt = 0;
- const ::std::vector<OTableConnection*>& rTabConList = getTableConnections();
- ::std::vector<OTableConnection*>::const_iterator aIter2 = rTabConList.begin();
+ const auto& rTabConList = getTableConnections();
+ auto aIter2 = rTabConList.begin();
for(;aIter2 != rTabConList.end();)// the end may change
{
- OQueryTableConnection* pTmpEntry = static_cast<OQueryTableConnection*>(*aIter2);
+ OQueryTableConnection* pTmpEntry = static_cast<OQueryTableConnection*>((*aIter2).get());
OSL_ENSURE(pTmpEntry,"OQueryTableConnection is null!");
if( pTmpEntry->GetAliasName(JTCS_FROM) == pTabWin->GetAliasName() ||
pTmpEntry->GetAliasName(JTCS_TO) == pTabWin->GetAliasName() )
@@ -904,12 +904,9 @@ bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
// GetEntryPos, and then in turn by the Connection, when its starting point to the window must be determined.
// the Connections
- ::std::vector<OTableConnection*>& rTableCon = pUndoAction->GetTabConnList();
- ::std::vector<OTableConnection*>::iterator aIter = rTableCon.begin();
- ::std::vector<OTableConnection*>::iterator aEnd = rTableCon.end();
-
- for(;aIter != aEnd;++aIter)
- addConnection(*aIter); // add all connections from the undo action
+ auto rTableCon = pUndoAction->GetTabConnList();
+ for(auto conn : rTableCon)
+ addConnection(conn); // add all connections from the undo action
rTableCon.clear();
@@ -950,12 +947,9 @@ void OQueryTableView::InsertField(const OTableFieldDescRef& rInfo)
bool OQueryTableView::ExistsAVisitedConn(const OQueryTableWindow* pFrom) const
{
- const ::std::vector<OTableConnection*>& rList = getTableConnections();
- ::std::vector<OTableConnection*>::const_iterator aIter = rList.begin();
- ::std::vector<OTableConnection*>::const_iterator aEnd = rList.end();
- for(;aIter != aEnd;++aIter)
+ for(auto conn : getTableConnections())
{
- OQueryTableConnection* pTemp = static_cast<OQueryTableConnection*>(*aIter);
+ OQueryTableConnection* pTemp = static_cast<OQueryTableConnection*>(conn.get());
if (pTemp->IsVisited() &&
(pFrom == static_cast< OQueryTableWindow*>(pTemp->GetSourceWin()) || pFrom == static_cast< OQueryTableWindow*>(pTemp->GetDestWin())))
return true;
diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx
index 62e282bed659..06f619e34892 100644
--- a/dbaccess/source/ui/querydesign/QueryTextView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx
@@ -57,8 +57,7 @@ OQueryTextView::~OQueryTextView()
void OQueryTextView::dispose()
{
- boost::scoped_ptr<vcl::Window> aTemp(m_pEdit);
- m_pEdit = NULL;
+ m_pEdit.clear();
vcl::Window::dispose();
}
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 07c0c2d6b43d..87ea89bda2a0 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -158,12 +158,12 @@ OSelectionBrowseBox::~OSelectionBrowseBox()
void OSelectionBrowseBox::dispose()
{
- delete m_pTextCell;
- delete m_pVisibleCell;
- delete m_pFieldCell;
- delete m_pTableCell;
- delete m_pOrderCell;
- delete m_pFunctionCell;
+ m_pTextCell.clear();
+ m_pVisibleCell.clear();
+ m_pFieldCell.clear();
+ m_pTableCell.clear();
+ m_pOrderCell.clear();
+ m_pFunctionCell.clear();
::svt::EditBrowseBox::dispose();
}
@@ -245,11 +245,13 @@ namespace
{
class OSelectionBrwBoxHeader : public ::svt::EditBrowserHeader
{
- OSelectionBrowseBox* m_pBrowseBox;
+ VclPtr<OSelectionBrowseBox> m_pBrowseBox;
protected:
virtual void Select() SAL_OVERRIDE;
public:
OSelectionBrwBoxHeader(OSelectionBrowseBox* pParent);
+ virtual ~OSelectionBrwBoxHeader() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE { m_pBrowseBox.clear(); ::svt::EditBrowserHeader::dispose(); }
};
OSelectionBrwBoxHeader::OSelectionBrwBoxHeader(OSelectionBrowseBox* pParent)
: ::svt::EditBrowserHeader(pParent,WB_BUTTONSTYLE|WB_DRAG)
@@ -495,7 +497,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
OJoinTableView::OTableWindowMap::iterator aEnd = rTabWinList.end();
for(;aIter != aEnd;++aIter)
- m_pTableCell->InsertEntry(static_cast<OQueryTableWindow*>(aIter->second)->GetAliasName());
+ m_pTableCell->InsertEntry(static_cast<OQueryTableWindow*>(aIter->second.get())->GetAliasName());
m_pTableCell->InsertEntry(OUString(ModuleRes(STR_QUERY_NOTABLE)), 0);
if (!pEntry->GetAlias().isEmpty())
@@ -990,7 +992,7 @@ bool OSelectionBrowseBox::SaveModified()
OJoinTableView::OTableWindowMap::iterator aIter = rTabWinList.find(aAliasName);
if(aIter != rTabWinList.end())
{
- OQueryTableWindow* pEntryTab = static_cast<OQueryTableWindow*>(aIter->second);
+ OQueryTableWindow* pEntryTab = static_cast<OQueryTableWindow*>(aIter->second.get());
if (pEntryTab)
{
pEntry->SetTable(pEntryTab->GetTableName());
@@ -2607,7 +2609,7 @@ bool OSelectionBrowseBox::fillEntryTable(OTableFieldDescRef& _pEntry,const OUStr
OJoinTableView::OTableWindowMap::iterator aIter = rTabWinList.find(_sTableName);
if(aIter != rTabWinList.end())
{
- OQueryTableWindow* pEntryTab = static_cast<OQueryTableWindow*>(aIter->second);
+ OQueryTableWindow* pEntryTab = static_cast<OQueryTableWindow*>(aIter->second.get());
if (pEntryTab)
{
_pEntry->SetTable(pEntryTab->GetTableName());
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index 233ddeb1f2b7..8e9033d6398a 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -56,12 +56,12 @@ namespace dbaui
long m_nSeekRow;
BrowserMode m_nMode; // remember the BrowseModes
- Edit* m_pTextCell;
- ::svt::CheckBoxControl* m_pVisibleCell;
- ::svt::ComboBoxControl* m_pFieldCell;
- ::svt::ListBoxControl* m_pFunctionCell;
- ::svt::ListBoxControl* m_pTableCell;
- ::svt::ListBoxControl* m_pOrderCell;
+ VclPtr<Edit> m_pTextCell;
+ VclPtr<::svt::CheckBoxControl> m_pVisibleCell;
+ VclPtr<::svt::ComboBoxControl> m_pFieldCell;
+ VclPtr<::svt::ListBoxControl> m_pFunctionCell;
+ VclPtr<::svt::ListBoxControl> m_pTableCell;
+ VclPtr<::svt::ListBoxControl> m_pOrderCell;
OTableFieldDescRef m_pEmptyEntry; // default entry in the list may reference more than once
diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx
index 6d7864e06db7..457a58481c64 100644
--- a/dbaccess/source/ui/querydesign/TableConnection.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnection.cxx
@@ -43,7 +43,7 @@ namespace dbaui
Show();
}
- OTableConnection::OTableConnection( const OTableConnection& _rConn ) : Window(_rConn.m_pParent)
+ OTableConnection::OTableConnection( const OTableConnection& _rConn ) : Window(_rConn.m_pParent.get())
,m_pData(_rConn.GetData()->NewInstance())
,m_pParent(NULL)
{
diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
index d27e3dadb494..db44c06a982b 100644
--- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
+++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
@@ -23,6 +23,7 @@
#include <tools/debug.hxx>
#include <com/sun/star/sdbc/DataType.hpp>
#include <comphelper/namedvaluecollection.hxx>
+#include <vcl/window.hxx>
#include <functional>
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index dbc0264df085..e194989f7096 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -107,9 +107,8 @@ void OTableWindow::dispose()
if (m_pListBox)
{
OSL_ENSURE(m_pListBox->GetEntryCount()==0,"Forgot to call EmptyListbox()!");
- boost::scoped_ptr<vcl::Window> aTemp(m_pListBox);
- m_pListBox = NULL;
}
+ m_pListBox.clear();
if ( m_pContainerListener.is() )
m_pContainerListener->dispose();
@@ -280,7 +279,7 @@ bool OTableWindow::Init()
if ( !m_pListBox )
{
m_pListBox = CreateListBox();
- OSL_ENSURE( m_pListBox != NULL, "OTableWindow::Init() : CreateListBox returned NULL !" );
+ OSL_ENSURE( m_pListBox != nullptr, "OTableWindow::Init() : CreateListBox returned NULL !" );
m_pListBox->SetSelectionMode( MULTIPLE_SELECTION );
}
diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
index 433e008e6e68..fb91731c5d5a 100644
--- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
@@ -192,7 +192,7 @@ namespace dbaui
if( m_pTable )
{
OJoinTableView* pView = m_pTable->getTableView();
- ::std::vector<OTableConnection*>::const_iterator aIter = pView->getTableConnections(m_pTable) + nIndex;
+ auto aIter = pView->getTableConnections(m_pTable) + nIndex;
aRet.TargetSet.realloc(1);
aRet.TargetSet[0] = getParentChild(aIter - pView->getTableConnections().begin());
aRet.RelationType = AccessibleRelationType::CONTROLLER_FOR;
@@ -211,10 +211,10 @@ namespace dbaui
if( AccessibleRelationType::CONTROLLER_FOR == aRelationType && m_pTable)
{
OJoinTableView* pView = m_pTable->getTableView();
- const ::std::vector<OTableConnection*>& rConnectionList = pView->getTableConnections();
+ const auto& rConnectionList = pView->getTableConnections();
- ::std::vector<OTableConnection*>::const_iterator aIter = pView->getTableConnections(m_pTable);
- ::std::vector<OTableConnection*>::const_iterator aEnd = rConnectionList.end();
+ auto aIter = pView->getTableConnections(m_pTable);
+ auto aEnd = rConnectionList.end();
::std::vector< Reference<XInterface> > aRelations;
aRelations.reserve(5); // just guessing
for (; aIter != aEnd ; ++aIter )
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index 77a354ca58a8..9e71cdc6776b 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -79,7 +79,7 @@ void OTableWindowListBox::dispose()
Application::RemoveUserEvent(m_nUiEvent);
if( m_aScrollTimer.IsActive() )
m_aScrollTimer.Stop();
- m_pTabWin = NULL;
+ m_pTabWin.clear();
SvTreeListBox::dispose();
}
diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
index 69adb564f4e8..8f7b9b8258a7 100644
--- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
@@ -60,7 +60,7 @@ OTableWindowTitle::~OTableWindowTitle()
void OTableWindowTitle::dispose()
{
- m_pTabWin = NULL;
+ m_pTabWin.clear();
FixedText::dispose();
}
@@ -136,10 +136,8 @@ void OTableWindowTitle::MouseButtonDown( const MouseEvent& rEvt )
OJoinTableView* pView = static_cast<OJoinTableView*>(m_pTabWin->getTableView());
OSL_ENSURE(pView,"No OJoinTableView!");
- const ::std::vector<OTableConnection*>& rConns = pView->getTableConnections();
- ::std::for_each(rConns.begin(),
- rConns.end(),
- ::std::mem_fun(&OTableConnection::RecalcLines));
+ for (auto conn : pView->getTableConnections())
+ conn->RecalcLines();
pView->InvalidateConnections();
pView->getDesignView()->getController().setModified(sal_True);
diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
index 29bc0e70eebf..71c037c80e80 100644
--- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
+++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
@@ -139,8 +139,7 @@ throw (uno::RuntimeException, std::exception)
svt::ToolboxController::dispose();
SolarMutexGuard aSolarMutexGuard;
- delete m_pLimitBox;
- m_pLimitBox = 0;
+ m_pLimitBox.clear();
}
/// XStatusListener
diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.hxx b/dbaccess/source/ui/querydesign/limitboxcontroller.hxx
index 1db59a8e6ebf..93401164eca1 100644
--- a/dbaccess/source/ui/querydesign/limitboxcontroller.hxx
+++ b/dbaccess/source/ui/querydesign/limitboxcontroller.hxx
@@ -13,6 +13,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <svtools/toolboxcontroller.hxx>
#include <rtl/ustring.hxx>
+#include <vcl/vclptr.hxx>
#include "apitools.hxx"
@@ -59,7 +60,7 @@ class LimitBoxController: public svt::ToolboxController,
using svt::ToolboxController::dispatchCommand;
private:
- LimitBoxImpl* m_pLimitBox;
+ VclPtr<LimitBoxImpl> m_pLimitBox;
};
} ///dbaui namespace
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index 26f91d004fd2..06255d09d584 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -66,7 +66,7 @@ namespace dbaui
}
if ( m_pBeamer )
::dbaui::notifySystemWindow(this,m_pBeamer,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
- m_pBeamer = NULL;
+ m_pBeamer.clear();
if ( m_xBeamer.is() )
{
Reference< ::com::sun::star::util::XCloseable > xCloseable(m_xBeamer,UNO_QUERY);
@@ -75,8 +75,7 @@ namespace dbaui
xCloseable->close(sal_False); // false - holds the ownership of this frame
}
- boost::scoped_ptr<vcl::Window> aTemp(m_pSplitter);
- m_pSplitter = NULL;
+ m_pSplitter.clear();
ODataView::dispose();
}
bool OQueryContainerWindow::switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo )
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index aa1ea5dcc564..b6c6bd651378 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -145,6 +145,11 @@ DlgQryJoin::~DlgQryJoin()
void DlgQryJoin::dispose()
{
delete m_pTableControl;
+ m_pML_HelpText.clear();
+ m_pPB_OK.clear();
+ m_pLB_JoinType.clear();
+ m_pCBNatural.clear();
+ m_pTableView.clear();
ModalDialog::dispose();
}
diff --git a/dbaccess/source/ui/querydesign/querydlg.hxx b/dbaccess/source/ui/querydesign/querydlg.hxx
index 18c2c1bc6775..ec31515d007e 100644
--- a/dbaccess/source/ui/querydesign/querydlg.hxx
+++ b/dbaccess/source/ui/querydesign/querydlg.hxx
@@ -39,14 +39,14 @@ namespace dbaui
,public IRelationControlInterface
{
protected:
- FixedText* m_pML_HelpText;
- OKButton* m_pPB_OK;
- ListBox* m_pLB_JoinType;
- CheckBox* m_pCBNatural;
+ VclPtr<FixedText> m_pML_HelpText;
+ VclPtr<OKButton> m_pPB_OK;
+ VclPtr<ListBox> m_pLB_JoinType;
+ VclPtr<CheckBox> m_pCBNatural;
OTableListBoxControl* m_pTableControl;
OJoinTableView::OTableWindowMap* m_pTableMap;
- OQueryTableView* m_pTableView;
+ VclPtr<OQueryTableView> m_pTableView;
EJoinType eJoinType;
TTableConnectionData::value_type m_pConnData; // contains left and right table
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 8f1ed9ff6dcc..d7820ad68b7a 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -80,6 +80,7 @@ void ORelationTableView::dispose()
{
if ( m_pContainerListener.is() )
m_pContainerListener->dispose();
+ m_pExistingConnection.clear();
OJoinTableView::dispose();
}
@@ -170,8 +171,8 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
OTableWindow* pSourceWin = jxdSource.pListBox->GetTabWin();
OTableWindow* pDestWin = jxdDest.pListBox->GetTabWin();
- ::std::vector<OTableConnection*>::const_iterator aIter = getTableConnections().begin();
- ::std::vector<OTableConnection*>::const_iterator aEnd = getTableConnections().end();
+ auto aIter = getTableConnections().begin();
+ auto aEnd = getTableConnections().end();
for(;aIter != aEnd;++aIter)
{
OTableConnection* pFirst = *aIter;
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
index 2123aa51f907..b4899e7b25dd 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
@@ -43,8 +43,7 @@ OFieldDescGenWin::~OFieldDescGenWin()
void OFieldDescGenWin::dispose()
{
- boost::scoped_ptr<vcl::Window> aTemp(m_pFieldControl);
- m_pFieldControl = NULL;
+ m_pFieldControl.clear();
TabPage::dispose();
}
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
index ab4e453f7c34..04011c61c340 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
@@ -32,7 +32,7 @@ namespace dbaui
,public IClipboardTest
{
- OTableFieldControl *m_pFieldControl;
+ VclPtr<OTableFieldControl> m_pFieldControl;
protected:
virtual void Resize() SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 1b0f9db0b487..3face44e3790 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -274,10 +274,11 @@ void OTableEditorCtrl::dispose()
Application::RemoveUserEvent( nInvalidateTypeEvent );
// Delete the control types
- delete pNameCell;
- delete pTypeCell;
- delete pDescrCell;
- delete pHelpTextCell;
+ pNameCell.clear();
+ pTypeCell.clear();
+ pDescrCell.clear();
+ pHelpTextCell.clear();
+ pDescrWin.clear();
OTableRowView::dispose();
}
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index 07bcfc596a85..03f9b4598c67 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -46,11 +46,11 @@ namespace dbaui
::std::vector< ::boost::shared_ptr<OTableRow> > m_aUndoList;
::std::vector< ::boost::shared_ptr<OTableRow> >* m_pRowList;
- OSQLNameEdit* pNameCell;
- ::svt::ListBoxControl* pTypeCell;
- Edit* pHelpTextCell;
- Edit* pDescrCell;
- OTableFieldDescWin* pDescrWin; // properties of one column
+ VclPtr<OSQLNameEdit> pNameCell;
+ VclPtr<::svt::ListBoxControl> pTypeCell;
+ VclPtr<Edit> pHelpTextCell;
+ VclPtr<Edit> pDescrCell;
+ VclPtr<OTableFieldDescWin> pDescrWin; // properties of one column
::boost::shared_ptr<OTableRow> pActRow;
@@ -71,7 +71,7 @@ namespace dbaui
{
private:
AutoTimer m_aInvalidateTimer;
- OTableEditorCtrl* m_pOwner;
+ VclPtr<OTableEditorCtrl> m_pOwner;
public:
ClipboardInvalidator(sal_uLong nTimeout,OTableEditorCtrl*);
diff --git a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx
index ec756cd53b8a..80594e62fc2a 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx
@@ -43,8 +43,7 @@ OTableDesignHelpBar::~OTableDesignHelpBar()
void OTableDesignHelpBar::dispose()
{
- boost::scoped_ptr<vcl::Window> aTemp(m_pTextWin);
- m_pTextWin = NULL;
+ m_pTextWin.clear();
TabPage::dispose();
}
diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
index 9cf37d80df9e..065d8dd51b1d 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
@@ -71,15 +71,8 @@ void OTableBorderWindow::dispose()
// ::dbaui::notifySystemWindow(this,m_pFieldDescWin,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
m_pEditorCtrl->Hide();
m_pFieldDescWin->Hide();
-
- {
- boost::scoped_ptr<vcl::Window> aTemp(m_pEditorCtrl);
- m_pEditorCtrl = NULL;
- }
- {
- boost::scoped_ptr<vcl::Window> aTemp(m_pFieldDescWin);
- m_pFieldDescWin = NULL;
- }
+ m_pEditorCtrl.clear();
+ m_pFieldDescWin.clear();
m_aHorzSplitter.disposeAndClear();
vcl::Window::dispose();
}
@@ -202,11 +195,7 @@ OTableDesignView::~OTableDesignView()
void OTableDesignView::dispose()
{
m_pWin->Hide();
-
- {
- boost::scoped_ptr<vcl::Window> aTemp(m_pWin);
- m_pWin = NULL;
- }
+ m_pWin.clear();
ODataView::dispose();
}
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
index 3f1ee94f68ce..54ae89660466 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
@@ -76,18 +76,9 @@ void OTableFieldDescWin::dispose()
getGenPage()->Hide();
m_pHeader->Hide();
- {
- boost::scoped_ptr<vcl::Window> aTemp(m_pGenPage);
- m_pGenPage = NULL;
- }
- {
- boost::scoped_ptr<vcl::Window> aTemp(m_pHeader);
- m_pHeader = NULL;
- }
- {
- boost::scoped_ptr<vcl::Window> aTemp(m_pHelpBar);
- m_pHelpBar = NULL;
- }
+ m_pGenPage.clear();
+ m_pHeader.clear();
+ m_pHelpBar.clear();
TabPage::dispose();
}
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
index 1b17aa8213d4..a8914fd42cb3 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
@@ -41,9 +41,9 @@ namespace dbaui
NONE
};
private:
- OTableDesignHelpBar* m_pHelpBar;
- OFieldDescGenWin* m_pGenPage;
- FixedText* m_pHeader;
+ VclPtr<OTableDesignHelpBar> m_pHelpBar;
+ VclPtr<OFieldDescGenWin> m_pGenPage;
+ VclPtr<FixedText> m_pHeader;
ChildFocusState m_eChildFocus;
IClipboardTest* getActiveChild() const;
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx
index d16e55272fbd..7646684e3a09 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.hxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx
@@ -26,6 +26,7 @@
#include <com/sun/star/uno/Any.h>
#include "TypeInfo.hxx"
+#include <vcl/vclptr.hxx>
namespace dbaui
{
@@ -34,7 +35,7 @@ namespace dbaui
class OTableDesignUndoAct : public OCommentUndoAction
{
protected:
- OTableRowView* m_pTabDgnCtrl;
+ VclPtr<OTableRowView> m_pTabDgnCtrl;
virtual void Undo() SAL_OVERRIDE;
virtual void Redo() SAL_OVERRIDE;
@@ -48,7 +49,7 @@ namespace dbaui
class OTableEditorUndoAct : public OTableDesignUndoAct
{
protected:
- OTableEditorCtrl* pTabEdCtrl;
+ VclPtr<OTableEditorCtrl> pTabEdCtrl;
public:
TYPEINFO_OVERRIDE();
@@ -136,7 +137,7 @@ namespace dbaui
protected:
MultiSelection m_aDelKeys,
m_aInsKeys;
- OTableEditorCtrl* m_pEditorCtrl;
+ VclPtr<OTableEditorCtrl> m_pEditorCtrl;
virtual void Undo() SAL_OVERRIDE;
virtual void Redo() SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
index 15dcaa292158..6bfbabab11ed 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
@@ -115,7 +115,7 @@ void ODBTypeWizDialogSetup::executedDialog(sal_Int16 _nExecutionResult)
{
if ( _nExecutionResult == RET_OK )
{
- const ODbTypeWizDialogSetup* pDialog = static_cast< ODbTypeWizDialogSetup* >( m_pDialog );
+ const ODbTypeWizDialogSetup* pDialog = static_cast< ODbTypeWizDialogSetup* >( m_pDialog.get() );
m_bOpenDatabase = pDialog->IsDatabaseDocumentToBeOpened();
m_bStartTableWizard = pDialog->IsTableWizardToBeStarted();
}
diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx
index 7404f5b4d5d3..373badf7492c 100644
--- a/dbaccess/source/ui/uno/composerdialogs.cxx
+++ b/dbaccess/source/ui/uno/composerdialogs.cxx
@@ -169,7 +169,7 @@ namespace dbaui
ComposerDialog::executedDialog( _nExecutionResult );
if ( _nExecutionResult && m_pDialog )
- static_cast< DlgFilterCrit* >( m_pDialog )->BuildWherePart();
+ static_cast< DlgFilterCrit* >( m_pDialog.get() )->BuildWherePart();
}
// RowsetOrderDialog
@@ -216,9 +216,9 @@ namespace dbaui
return;
if ( _nExecutionResult )
- static_cast< DlgOrderCrit* >( m_pDialog )->BuildOrderPart();
+ static_cast< DlgOrderCrit* >( m_pDialog.get() )->BuildOrderPart();
else if ( m_xComposer.is() )
- m_xComposer->setOrder( static_cast< DlgOrderCrit* >( m_pDialog )->GetOrignalOrder() );
+ m_xComposer->setOrder( static_cast< DlgOrderCrit* >( m_pDialog.get() )->GetOrignalOrder() );
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 5a676d190922..b6e307ffaa13 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -548,7 +548,7 @@ void SAL_CALL CopyTableWizard::setTitle( const OUString& _rTitle ) throw (Runtim
OCopyTableWizard& CopyTableWizard::impl_getDialog_throw()
{
- OCopyTableWizard* pWizard = dynamic_cast< OCopyTableWizard* >( m_pDialog );
+ OCopyTableWizard* pWizard = dynamic_cast< OCopyTableWizard* >( m_pDialog.get() );
if ( !pWizard )
throw DisposedException( OUString(), *this );
return *pWizard;
diff --git a/desktop/source/app/cmdlinehelp.hxx b/desktop/source/app/cmdlinehelp.hxx
index 2a3bda797896..7837dc368c58 100644
--- a/desktop/source/app/cmdlinehelp.hxx
+++ b/desktop/source/app/cmdlinehelp.hxx
@@ -34,10 +34,10 @@ namespace desktop
public:
CmdlineHelpDialog ( void );
- FixedText* m_pftHead;
- FixedText* m_pftLeft;
- FixedText* m_pftRight;
- FixedText* m_pftBottom;
+ VclPtr<FixedText> m_pftHead;
+ VclPtr<FixedText> m_pftLeft;
+ VclPtr<FixedText> m_pftRight;
+ VclPtr<FixedText> m_pftBottom;
};
#endif
}
diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
index ca6eb1b4ce03..f93712e744eb 100644
--- a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
@@ -50,4 +50,14 @@ DependencyDialog::DependencyDialog(
}
}
+DependencyDialog::~DependencyDialog()
+{
+ dispose();
+}
+
+void DependencyDialog::dispose()
+{
+ m_list.clear();
+ ModalDialog::dispose();
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
index eec14539869a..2d7d3e9a13da 100644
--- a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
@@ -37,12 +37,14 @@ class DependencyDialog: public ModalDialog {
public:
DependencyDialog(
vcl::Window * parent, std::vector< OUString > const & dependencies);
+ virtual ~DependencyDialog();
+ virtual void dispose() SAL_OVERRIDE;
private:
DependencyDialog(DependencyDialog &) SAL_DELETED_FUNCTION;
void operator =(DependencyDialog &) SAL_DELETED_FUNCTION;
- ListBox* m_list;
+ VclPtr<ListBox> m_list;
};
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index b3a7195507da..403bd89ba61d 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -116,11 +116,11 @@ class ExtBoxWithBtns_Impl : public ExtensionBox_Impl
{
bool m_bInterfaceLocked;
- PushButton *m_pOptionsBtn;
- PushButton *m_pEnableBtn;
- PushButton *m_pRemoveBtn;
+ VclPtr<PushButton> m_pOptionsBtn;
+ VclPtr<PushButton> m_pEnableBtn;
+ VclPtr<PushButton> m_pRemoveBtn;
- ExtMgrDialog *m_pParent;
+ VclPtr<ExtMgrDialog> m_pParent;
void SetButtonPos( const Rectangle& rRect );
void SetButtonStatus( const TEntry_Impl& rEntry );
@@ -208,9 +208,10 @@ ExtBoxWithBtns_Impl::~ExtBoxWithBtns_Impl()
void ExtBoxWithBtns_Impl::dispose()
{
- delete m_pOptionsBtn;
- delete m_pEnableBtn;
- delete m_pRemoveBtn;
+ m_pOptionsBtn.clear();
+ m_pEnableBtn.clear();
+ m_pRemoveBtn.clear();
+ m_pParent.clear();
ExtensionBox_Impl::dispose();
}
@@ -729,6 +730,17 @@ ExtMgrDialog::~ExtMgrDialog()
void ExtMgrDialog::dispose()
{
m_aIdle.Stop();
+ m_pExtensionBox.clear();
+ m_pAddBtn.clear();
+ m_pUpdateBtn.clear();
+ m_pCloseBtn.clear();
+ m_pBundledCbx.clear();
+ m_pSharedCbx.clear();
+ m_pUserCbx.clear();
+ m_pGetExtensions.clear();
+ m_pProgressText.clear();
+ m_pProgressBar.clear();
+ m_pCancelBtn.clear();
ModelessDialog::dispose();
}
@@ -1216,6 +1228,13 @@ UpdateRequiredDialog::~UpdateRequiredDialog()
void UpdateRequiredDialog::dispose()
{
m_aIdle.Stop();
+ m_pExtensionBox.clear();
+ m_pUpdateNeeded.clear();
+ m_pUpdateBtn.clear();
+ m_pCloseBtn.clear();
+ m_pCancelBtn.clear();
+ m_pProgressText.clear();
+ m_pProgressBar.clear();
ModalDialog::dispose();
}
@@ -1589,6 +1608,16 @@ ShowLicenseDialog::ShowLicenseDialog( vcl::Window * pParent,
m_pLicenseText->SetText(xPackage->getLicenseText());
}
+ShowLicenseDialog::~ShowLicenseDialog()
+{
+ dispose();
+}
+
+void ShowLicenseDialog::dispose()
+{
+ m_pLicenseText.clear();
+ ModalDialog::dispose();
+}
// UpdateRequiredDialogService
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index c5e7c38b16f8..2f6052be71af 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -55,7 +55,7 @@ class TheExtensionManager;
class DialogHelper
{
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
- Dialog* m_pVCLWindow;
+ VclPtr<Dialog> m_pVCLWindow;
ImplSVEvent * m_nEventID;
bool m_bIsBusy;
@@ -99,17 +99,17 @@ public:
class ExtMgrDialog : public ModelessDialog,
public DialogHelper
{
- ExtBoxWithBtns_Impl *m_pExtensionBox;
- PushButton *m_pAddBtn;
- PushButton *m_pUpdateBtn;
- CloseButton *m_pCloseBtn;
- CheckBox *m_pBundledCbx;
- CheckBox *m_pSharedCbx;
- CheckBox *m_pUserCbx;
- FixedHyperlink *m_pGetExtensions;
- FixedText *m_pProgressText;
- ProgressBar *m_pProgressBar;
- CancelButton *m_pCancelBtn;
+ VclPtr<ExtBoxWithBtns_Impl> m_pExtensionBox;
+ VclPtr<PushButton> m_pAddBtn;
+ VclPtr<PushButton> m_pUpdateBtn;
+ VclPtr<CloseButton> m_pCloseBtn;
+ VclPtr<CheckBox> m_pBundledCbx;
+ VclPtr<CheckBox> m_pSharedCbx;
+ VclPtr<CheckBox> m_pUserCbx;
+ VclPtr<FixedHyperlink> m_pGetExtensions;
+ VclPtr<FixedText> m_pProgressText;
+ VclPtr<ProgressBar> m_pProgressBar;
+ VclPtr<CancelButton> m_pCancelBtn;
const OUString m_sAddPackages;
OUString m_sProgressText;
OUString m_sLastFolderURL;
@@ -174,13 +174,13 @@ public:
class UpdateRequiredDialog : public ModalDialog,
public DialogHelper
{
- ExtensionBox_Impl* m_pExtensionBox;
- FixedText* m_pUpdateNeeded;
- PushButton* m_pUpdateBtn;
- PushButton* m_pCloseBtn;
- CancelButton* m_pCancelBtn;
- FixedText* m_pProgressText;
- ProgressBar* m_pProgressBar;
+ VclPtr<ExtensionBox_Impl> m_pExtensionBox;
+ VclPtr<FixedText> m_pUpdateNeeded;
+ VclPtr<PushButton> m_pUpdateBtn;
+ VclPtr<PushButton> m_pCloseBtn;
+ VclPtr<CancelButton> m_pCancelBtn;
+ VclPtr<FixedText> m_pProgressText;
+ VclPtr<ProgressBar> m_pProgressBar;
const OUString m_sAddPackages;
const OUString m_sCloseText;
OUString m_sProgressText;
@@ -242,9 +242,11 @@ public:
class ShowLicenseDialog : public ModalDialog
{
- VclMultiLineEdit* m_pLicenseText;
+ VclPtr<VclMultiLineEdit> m_pLicenseText;
public:
ShowLicenseDialog(vcl::Window * pParent, const css::uno::Reference< css::deployment::XPackage > &xPackage);
+ virtual ~ShowLicenseDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 8eaf3f71e1a6..07a7d067f2d1 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -253,17 +253,13 @@ void ExtensionBox_Impl::dispose()
for ( ITER iIndex = m_vEntries.begin(); iIndex < m_vEntries.end(); ++iIndex )
{
- if ( (*iIndex)->m_pPublisher )
- {
- delete (*iIndex)->m_pPublisher;
- (*iIndex)->m_pPublisher = NULL;
- }
+ (*iIndex)->m_pPublisher.clear();
(*iIndex)->m_xPackage->removeEventListener( uno::Reference< lang::XEventListener > ( m_xRemoveListener, uno::UNO_QUERY ) );
}
m_vEntries.clear();
- delete m_pScrollBar;
+ m_pScrollBar.clear();
m_xRemoveListener.clear();
@@ -439,11 +435,7 @@ void ExtensionBox_Impl::DeleteRemoved()
for ( ITER iIndex = m_vRemovedEntries.begin(); iIndex < m_vRemovedEntries.end(); ++iIndex )
{
- if ( (*iIndex)->m_pPublisher )
- {
- delete (*iIndex)->m_pPublisher;
- (*iIndex)->m_pPublisher = NULL;
- }
+ (*iIndex)->m_pPublisher.clear();
}
m_vRemovedEntries.clear();
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index c2635edd9f51..d49e4a132690 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -78,7 +78,7 @@ struct Entry_Impl
OUString m_sLicenseText;
Image m_aIcon;
Image m_aIconHC;
- FixedHyperlink* m_pPublisher;
+ VclPtr<FixedHyperlink> m_pPublisher;
::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage> m_xPackage;
@@ -99,7 +99,7 @@ class ExtensionBox_Impl;
class ExtensionRemovedListener : public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener >
{
- ExtensionBox_Impl *m_pParent;
+ VclPtr<ExtensionBox_Impl> m_pParent;
public:
@@ -134,7 +134,7 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox
Image m_aDefaultImage;
Link m_aClickHdl;
- ScrollBar *m_pScrollBar;
+ VclPtr<ScrollBar> m_pScrollBar;
com::sun::star::uno::Reference< ExtensionRemovedListener > m_xRemoveListener;
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index f3584d043640..07168b74a4fd 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -98,8 +98,6 @@ TheExtensionManager::TheExtensionManager( vcl::Window *pParent,
TheExtensionManager::~TheExtensionManager()
{
- delete m_pUpdReqDialog;
- delete m_pExtMgrDialog;
delete m_pExecuteCmdQueue;
}
@@ -171,8 +169,7 @@ sal_Int16 TheExtensionManager::execute()
if ( m_pUpdReqDialog )
{
nRet = m_pUpdReqDialog->Execute();
- delete m_pUpdReqDialog;
- m_pUpdReqDialog = NULL;
+ m_pUpdReqDialog.clear();
}
return nRet;
@@ -259,10 +256,8 @@ void TheExtensionManager::terminateDialog()
if ( ! dp_misc::office_is_running() )
{
const SolarMutexGuard guard;
- delete m_pExtMgrDialog;
- m_pExtMgrDialog = NULL;
- delete m_pUpdReqDialog;
- m_pUpdReqDialog = NULL;
+ m_pExtMgrDialog.clear();
+ m_pUpdReqDialog.clear();
Application::Quit();
}
}
@@ -426,10 +421,8 @@ void TheExtensionManager::disposing( lang::EventObject const & rEvt )
if ( dp_misc::office_is_running() )
{
const SolarMutexGuard guard;
- delete m_pExtMgrDialog;
- m_pExtMgrDialog = NULL;
- delete m_pUpdReqDialog;
- m_pUpdReqDialog = NULL;
+ m_pExtMgrDialog.clear();
+ m_pUpdReqDialog.clear();
}
s_ExtMgr.clear();
}
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
index 67836b2223d3..9281ddef4c05 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
@@ -53,9 +53,9 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::deployment::XExtensionManager > m_xExtensionManager;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xNameAccessNodes;
- vcl::Window *m_pParent;
- ExtMgrDialog *m_pExtMgrDialog;
- UpdateRequiredDialog *m_pUpdReqDialog;
+ VclPtr<vcl::Window> m_pParent;
+ VclPtr<ExtMgrDialog> m_pExtMgrDialog;
+ VclPtr<UpdateRequiredDialog> m_pUpdReqDialog;
ExtensionCmdQueue *m_pExecuteCmdQueue;
OUString m_sGetExtensionsURL;
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 0aa7c2f0da20..e7a677080acb 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -579,7 +579,21 @@ void UpdateDialog::dispose()
{
delete (*i);
}
- delete m_pUpdates;
+ m_pchecking.clear();
+ m_pthrobber.clear();
+ m_pUpdate.clear();
+ m_pContainer.clear();
+ m_pUpdates.clear();
+ m_pAll.clear();
+ m_pDescription.clear();
+ m_pPublisherLabel.clear();
+ m_pPublisherLink.clear();
+ m_pReleaseNotesLabel.clear();
+ m_pReleaseNotesLink.clear();
+ m_pDescriptions.clear();
+ m_pHelp.clear();
+ m_pOk.clear();
+ m_pClose.clear();
ModalDialog::dispose();
}
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
index 8420aacc9bf5..18fa9de6ebde 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
@@ -168,21 +168,21 @@ private:
com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
m_context;
- FixedText* m_pchecking;
- Throbber* m_pthrobber;
- FixedText* m_pUpdate;
- VclViewport* m_pContainer;
- UpdateDialog::CheckListBox* m_pUpdates;
- CheckBox* m_pAll;
- FixedText* m_pDescription;
- FixedText* m_pPublisherLabel;
- FixedHyperlink* m_pPublisherLink;
- FixedText* m_pReleaseNotesLabel;
- FixedHyperlink* m_pReleaseNotesLink;
- VclMultiLineEdit* m_pDescriptions;
- HelpButton* m_pHelp;
- PushButton* m_pOk;
- PushButton* m_pClose;
+ VclPtr<FixedText> m_pchecking;
+ VclPtr<Throbber> m_pthrobber;
+ VclPtr<FixedText> m_pUpdate;
+ VclPtr<VclViewport> m_pContainer;
+ VclPtr<UpdateDialog::CheckListBox> m_pUpdates;
+ VclPtr<CheckBox> m_pAll;
+ VclPtr<FixedText> m_pDescription;
+ VclPtr<FixedText> m_pPublisherLabel;
+ VclPtr<FixedHyperlink> m_pPublisherLink;
+ VclPtr<FixedText> m_pReleaseNotesLabel;
+ VclPtr<FixedHyperlink> m_pReleaseNotesLink;
+ VclPtr<VclMultiLineEdit> m_pDescriptions;
+ VclPtr<HelpButton> m_pHelp;
+ VclPtr<PushButton> m_pOk;
+ VclPtr<PushButton> m_pClose;
OUString m_error;
OUString m_none;
OUString m_noInstallable;
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index b67c026c7284..5c8ab0caf4e3 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -244,6 +244,13 @@ UpdateInstallDialog::~UpdateInstallDialog()
void UpdateInstallDialog::dispose()
{
+ m_pFt_action.clear();
+ m_pStatusbar.clear();
+ m_pFt_extension_name.clear();
+ m_pMle_info.clear();
+ m_pHelp.clear();
+ m_pOk.clear();
+ m_pCancel.clear();
ModalDialog::dispose();
}
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
index d9a343790193..9c05abd36358 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
@@ -105,13 +105,13 @@ private:
OUString m_sNoInstall;
OUString m_sThisErrorOccurred;
- FixedText *m_pFt_action;
- ProgressBar *m_pStatusbar;
- FixedText *m_pFt_extension_name;
- VclMultiLineEdit *m_pMle_info;
- HelpButton *m_pHelp;
- OKButton *m_pOk;
- CancelButton *m_pCancel;
+ VclPtr<FixedText> m_pFt_action;
+ VclPtr<ProgressBar> m_pStatusbar;
+ VclPtr<FixedText> m_pFt_extension_name;
+ VclPtr<VclMultiLineEdit> m_pMle_info;
+ VclPtr<HelpButton> m_pHelp;
+ VclPtr<OKButton> m_pOk;
+ VclPtr<CancelButton> m_pCancel;
};
}
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index 916525a6b7fb..840b90baad88 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -77,14 +77,14 @@ protected:
struct LicenseDialogImpl : public ModalDialog
{
cssu::Reference<cssu::XComponentContext> m_xComponentContext;
- FixedText* m_pFtHead;
- FixedImage* m_pArrow1;
- FixedImage* m_pArrow2;
- LicenseView* m_pLicense;
- PushButton* m_pDown;
+ VclPtr<FixedText> m_pFtHead;
+ VclPtr<FixedImage> m_pArrow1;
+ VclPtr<FixedImage> m_pArrow2;
+ VclPtr<LicenseView> m_pLicense;
+ VclPtr<PushButton> m_pDown;
- PushButton* m_pAcceptButton;
- PushButton* m_pDeclineButton;
+ VclPtr<PushButton> m_pAcceptButton;
+ VclPtr<PushButton> m_pDeclineButton;
DECL_LINK(PageDownHdl, void *);
DECL_LINK(ScrolledHdl, void *);
@@ -99,11 +99,26 @@ struct LicenseDialogImpl : public ModalDialog
css::uno::Reference< css::uno::XComponentContext > const & xContext,
const OUString & sExtensionName,
const OUString & sLicenseText);
+ virtual ~LicenseDialogImpl() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE;
virtual void Activate() SAL_OVERRIDE;
};
+void LicenseDialogImpl::dispose()
+{
+ m_pFtHead.clear();
+ m_pArrow1.clear();
+ m_pArrow2.clear();
+ m_pLicense.clear();
+ m_pDown.clear();
+ m_pAcceptButton.clear();
+ m_pDeclineButton.clear();
+ ModalDialog::dispose();
+}
+
+
LicenseView::LicenseView( vcl::Window* pParent, WinBits nStyle )
: MultiLineEdit( pParent, nStyle )
{
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 321bfbf63092..80101aa37617 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -32,6 +32,7 @@
#include <vcl/virdev.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/cursor.hxx>
+#include <vcl/vclptr.hxx>
#include <tools/fract.hxx>
#include <vcl/idle.hxx>
@@ -222,7 +223,7 @@ private:
LibreOfficeKitCallback mpLibreOfficeKitCallback;
void* mpLibreOfficeKitData;
EditEngine* pEditEngine;
- vcl::Window* pOutWin;
+ VclPtr<vcl::Window> pOutWin;
Pointer* pPointer;
DragAndDropInfo* pDragAndDropInfo;
diff --git a/editeng/source/editeng/textconv.hxx b/editeng/source/editeng/textconv.hxx
index 012811c457c8..50cbbcf0bc07 100644
--- a/editeng/source/editeng/textconv.hxx
+++ b/editeng/source/editeng/textconv.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Sequence.hxx>
#include <editeng/hangulhanja.hxx>
+#include <vcl/vclptr.hxx>
class EditView;
@@ -39,7 +40,7 @@ class TextConvWrapper : public editeng::HangulHanjaConversion
// starts from the cursor position
EditView * m_pEditView;
- vcl::Window * m_pWin;
+ VclPtr<vcl::Window> m_pWin;
bool m_bStartChk;
bool m_bStartDone;
diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx
index f96974a5b124..6f1b28e039b4 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -69,7 +69,7 @@ namespace editeng
// general
AbstractHangulHanjaConversionDialog*
m_pConversionDialog; // the dialog to display for user interaction
- vcl::Window* m_pUIParent; // the parent window for any UI we raise
+ VclPtr<vcl::Window> m_pUIParent; // the parent window for any UI we raise
Reference< XComponentContext >
m_xContext; // the service factory to use
Reference< XExtendedTextConversion >
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index 674f56363496..ae2451120279 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -39,9 +39,9 @@
#include <editeng/editerr.hxx>
#include <boost/scoped_ptr.hpp>
-#define WAIT_ON() if(pWin != NULL) { pWin->EnterWait(); }
+#define WAIT_ON() if(pWin != nullptr) { pWin->EnterWait(); }
-#define WAIT_OFF() if(pWin != NULL) { pWin->LeaveWait(); }
+#define WAIT_OFF() if(pWin != nullptr) { pWin->LeaveWait(); }
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx
index 3092133c2cee..136cb675023a 100644
--- a/extensions/source/abpilot/abpfinalpage.cxx
+++ b/extensions/source/abpilot/abpfinalpage.cxx
@@ -70,6 +70,12 @@ namespace abp
void FinalPage::dispose()
{
delete m_pLocationController;
+ m_pLocation.clear();
+ m_pBrowse.clear();
+ m_pRegisterName.clear();
+ m_pNameLabel.clear();
+ m_pName.clear();
+ m_pDuplicateNameError.clear();
AddressBookSourcePage::dispose();
}
diff --git a/extensions/source/abpilot/abpfinalpage.hxx b/extensions/source/abpilot/abpfinalpage.hxx
index 65c40b3ba037..eedeac43b25d 100644
--- a/extensions/source/abpilot/abpfinalpage.hxx
+++ b/extensions/source/abpilot/abpfinalpage.hxx
@@ -26,6 +26,7 @@
#include <svtools/urlcontrol.hxx>
#include <svx/databaselocationinput.hxx>
#include <vcl/edit.hxx>
+#include <vcl/vclptr.hxx>
namespace abp
@@ -38,12 +39,12 @@ namespace abp
class FinalPage : public AddressBookSourcePage
{
protected:
- ::svt::OFileURLControl* m_pLocation;
- PushButton* m_pBrowse;
- CheckBox* m_pRegisterName;
- FixedText* m_pNameLabel;
- Edit* m_pName;
- FixedText* m_pDuplicateNameError;
+ VclPtr<::svt::OFileURLControl> m_pLocation;
+ VclPtr<PushButton> m_pBrowse;
+ VclPtr<CheckBox> m_pRegisterName;
+ VclPtr<FixedText> m_pNameLabel;
+ VclPtr<Edit> m_pName;
+ VclPtr<FixedText> m_pDuplicateNameError;
::svx::DatabaseLocationInputController*
m_pLocationController;
diff --git a/extensions/source/abpilot/admininvokationimpl.hxx b/extensions/source/abpilot/admininvokationimpl.hxx
index 486223ca30c0..9dc5d3b0cb8a 100644
--- a/extensions/source/abpilot/admininvokationimpl.hxx
+++ b/extensions/source/abpilot/admininvokationimpl.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <vcl/vclptr.hxx>
namespace vcl { class Window; }
@@ -36,7 +37,7 @@ namespace abp
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
m_xContext;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xDataSource;
- vcl::Window* m_pMessageParent;
+ VclPtr<vcl::Window> m_pMessageParent;
public:
OAdminDialogInvokation(
diff --git a/extensions/source/abpilot/admininvokationpage.cxx b/extensions/source/abpilot/admininvokationpage.cxx
index a92e90d7eb1e..dd11939e9416 100644
--- a/extensions/source/abpilot/admininvokationpage.cxx
+++ b/extensions/source/abpilot/admininvokationpage.cxx
@@ -34,7 +34,16 @@ namespace abp
get(m_pErrorMessage, "warning");
m_pInvokeAdminDialog->SetClickHdl( LINK(this, AdminDialogInvokationPage, OnInvokeAdminDialog) );
}
-
+ AdminDialogInvokationPage::~AdminDialogInvokationPage()
+ {
+ dispose();
+ }
+ void AdminDialogInvokationPage::dispose()
+ {
+ m_pInvokeAdminDialog.clear();
+ m_pErrorMessage.clear();
+ AddressBookSourcePage::dispose();
+ }
void AdminDialogInvokationPage::ActivatePage()
{
AddressBookSourcePage::ActivatePage();
diff --git a/extensions/source/abpilot/admininvokationpage.hxx b/extensions/source/abpilot/admininvokationpage.hxx
index 4b264274f290..7e2e7efce8c2 100644
--- a/extensions/source/abpilot/admininvokationpage.hxx
+++ b/extensions/source/abpilot/admininvokationpage.hxx
@@ -29,14 +29,15 @@ namespace abp
class AdminDialogInvokationPage : public AddressBookSourcePage
{
protected:
- PushButton* m_pInvokeAdminDialog;
- FixedText* m_pErrorMessage;
+ VclPtr<PushButton> m_pInvokeAdminDialog;
+ VclPtr<FixedText> m_pErrorMessage;
bool m_bSuccessfullyExecutedDialog;
public:
AdminDialogInvokationPage( OAddessBookSourcePilot* _pParent );
-
+ virtual ~AdminDialogInvokationPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
// TabDialog overridables
virtual void ActivatePage() SAL_OVERRIDE;
diff --git a/extensions/source/abpilot/fieldmappingpage.cxx b/extensions/source/abpilot/fieldmappingpage.cxx
index c30bf82265c6..1e4ca7a5efa4 100644
--- a/extensions/source/abpilot/fieldmappingpage.cxx
+++ b/extensions/source/abpilot/fieldmappingpage.cxx
@@ -37,6 +37,18 @@ namespace abp
m_pInvokeDialog->SetClickHdl( LINK( this, FieldMappingPage, OnInvokeDialog ) );
}
+ FieldMappingPage::~FieldMappingPage()
+ {
+ dispose();
+ }
+
+ void FieldMappingPage::dispose()
+ {
+ m_pInvokeDialog.clear();
+ m_pHint.clear();
+ AddressBookSourcePage::dispose();
+ }
+
void FieldMappingPage::ActivatePage()
{
AddressBookSourcePage::ActivatePage();
diff --git a/extensions/source/abpilot/fieldmappingpage.hxx b/extensions/source/abpilot/fieldmappingpage.hxx
index 35ce8a2fcc3b..6adaf511800a 100644
--- a/extensions/source/abpilot/fieldmappingpage.hxx
+++ b/extensions/source/abpilot/fieldmappingpage.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_EXTENSIONS_SOURCE_ABPILOT_FIELDMAPPINGPAGE_HXX
#include "abspage.hxx"
+#include <vcl/vclptr.hxx>
namespace abp
@@ -33,12 +34,13 @@ namespace abp
class FieldMappingPage : public AddressBookSourcePage
{
protected:
- PushButton* m_pInvokeDialog;
- FixedText* m_pHint;
+ VclPtr<PushButton> m_pInvokeDialog;
+ VclPtr<FixedText> m_pHint;
public:
FieldMappingPage( OAddessBookSourcePilot* _pParent );
-
+ virtual ~FieldMappingPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
// OWizardPage overridables
virtual void initializePage() SAL_OVERRIDE;
diff --git a/extensions/source/abpilot/tableselectionpage.cxx b/extensions/source/abpilot/tableselectionpage.cxx
index 61ac27d8f1ce..d85423b17481 100644
--- a/extensions/source/abpilot/tableselectionpage.cxx
+++ b/extensions/source/abpilot/tableselectionpage.cxx
@@ -41,6 +41,16 @@ namespace abp
m_pTableList->SetDoubleClickHdl( LINK( this, TableSelectionPage, OnTableDoubleClicked ) );
}
+ TableSelectionPage::~TableSelectionPage()
+ {
+ dispose();
+ }
+
+ void TableSelectionPage::dispose()
+ {
+ m_pTableList.clear();
+ AddressBookSourcePage::dispose();
+ }
void TableSelectionPage::ActivatePage()
{
diff --git a/extensions/source/abpilot/tableselectionpage.hxx b/extensions/source/abpilot/tableselectionpage.hxx
index c9fcd755920d..7abcf547af45 100644
--- a/extensions/source/abpilot/tableselectionpage.hxx
+++ b/extensions/source/abpilot/tableselectionpage.hxx
@@ -22,6 +22,7 @@
#include "abspage.hxx"
#include <vcl/lstbox.hxx>
+#include <vcl/vclptr.hxx>
namespace abp
@@ -34,11 +35,12 @@ namespace abp
class TableSelectionPage : public AddressBookSourcePage
{
protected:
- ListBox* m_pTableList;
+ VclPtr<ListBox> m_pTableList;
public:
TableSelectionPage( OAddessBookSourcePilot* _pParent );
-
+ virtual ~TableSelectionPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
// OWizardPage overridables
virtual void initializePage() SAL_OVERRIDE;
diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx
index 494c7b84df63..813b5465ccc0 100644
--- a/extensions/source/abpilot/typeselectionpage.cxx
+++ b/extensions/source/abpilot/typeselectionpage.cxx
@@ -161,6 +161,17 @@ namespace abp
{
loop->m_bVisible = false;
}
+ m_pEvolution.clear();
+ m_pEvolutionGroupwise.clear();
+ m_pEvolutionLdap.clear();
+ m_pMORK.clear();
+ m_pThunderbird.clear();
+ m_pKab.clear();
+ m_pMacab.clear();
+ m_pLDAP.clear();
+ m_pOutlook.clear();
+ m_pOE.clear();
+ m_pOther.clear();
AddressBookSourcePage::dispose();
}
diff --git a/extensions/source/abpilot/typeselectionpage.hxx b/extensions/source/abpilot/typeselectionpage.hxx
index 131d5ea91bb6..b7c628f884c1 100644
--- a/extensions/source/abpilot/typeselectionpage.hxx
+++ b/extensions/source/abpilot/typeselectionpage.hxx
@@ -23,6 +23,7 @@
#include "abspage.hxx"
#include "addresssettings.hxx"
#include <vcl/edit.hxx>
+#include <vcl/vclptr.hxx>
namespace abp
@@ -35,20 +36,20 @@ namespace abp
class TypeSelectionPage : public AddressBookSourcePage
{
protected:
- RadioButton* m_pEvolution;
- RadioButton* m_pEvolutionGroupwise;
- RadioButton* m_pEvolutionLdap;
- RadioButton* m_pMORK;
- RadioButton* m_pThunderbird;
- RadioButton* m_pKab;
- RadioButton* m_pMacab;
- RadioButton* m_pLDAP;
- RadioButton* m_pOutlook;
- RadioButton* m_pOE;
- RadioButton* m_pOther;
+ VclPtr<RadioButton> m_pEvolution;
+ VclPtr<RadioButton> m_pEvolutionGroupwise;
+ VclPtr<RadioButton> m_pEvolutionLdap;
+ VclPtr<RadioButton> m_pMORK;
+ VclPtr<RadioButton> m_pThunderbird;
+ VclPtr<RadioButton> m_pKab;
+ VclPtr<RadioButton> m_pMacab;
+ VclPtr<RadioButton> m_pLDAP;
+ VclPtr<RadioButton> m_pOutlook;
+ VclPtr<RadioButton> m_pOE;
+ VclPtr<RadioButton> m_pOther;
struct ButtonItem {
- RadioButton *m_pItem;
+ VclPtr<RadioButton> m_pItem;
AddressSourceType m_eType;
bool m_bVisible;
diff --git a/extensions/source/abpilot/unodialogabp.cxx b/extensions/source/abpilot/unodialogabp.cxx
index dd24e0c5cd54..8a0714eb17be 100644
--- a/extensions/source/abpilot/unodialogabp.cxx
+++ b/extensions/source/abpilot/unodialogabp.cxx
@@ -179,7 +179,7 @@ namespace abp
{
if ( _nExecutionResult == RET_OK )
{
- const AddressSettings& aSettings = static_cast<OAddessBookSourcePilot*>(m_pDialog)->getSettings();
+ const AddressSettings& aSettings = static_cast<OAddessBookSourcePilot*>(m_pDialog.get())->getSettings();
m_sDataSourceName = aSettings.bRegisterDataSource ? aSettings.sRegisteredDataSourceName : aSettings.sDataSourceName;
}
}
diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx
index 1a4713c8d173..0174189c2cb4 100644
--- a/extensions/source/bibliography/bibbeam.cxx
+++ b/extensions/source/bibliography/bibbeam.cxx
@@ -29,6 +29,7 @@
#include <vcl/edit.hxx>
#include <tools/debug.hxx>
#include "bibbeam.hxx"
+#include "bibview.hxx"
#include "toolbar.hrc"
#include "bibresid.hxx"
#include "datman.hxx"
@@ -216,17 +217,17 @@ namespace bib
if ( pToolBar )
{
pDatMan->SetToolbar(0);
-
- DELETEZ( pToolBar );
}
if( pGridWin )
{
BibGridwin* pDel = pGridWin;
- pGridWin = NULL;
+ pGridWin.clear();
pDel->disposeGridWin();
delete pDel;
}
+ pToolBar.clear();
+ pGridWin.clear();
BibSplitWindow::dispose();
}
diff --git a/extensions/source/bibliography/bibbeam.hxx b/extensions/source/bibliography/bibbeam.hxx
index 980ebf84b5fa..aea7d49db079 100644
--- a/extensions/source/bibliography/bibbeam.hxx
+++ b/extensions/source/bibliography/bibbeam.hxx
@@ -52,8 +52,8 @@ namespace bib
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xGridWin;
BibDataManager* pDatMan;
- BibToolBar* pToolBar;
- BibGridwin* pGridWin;
+ VclPtr<BibToolBar> pToolBar;
+ VclPtr<BibGridwin> pGridWin;
DECL_LINK( RecalcLayout_Impl, void* );
diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx
index d13600c89eb7..b6e65e1665d8 100644
--- a/extensions/source/bibliography/bibcont.cxx
+++ b/extensions/source/bibliography/bibcont.cxx
@@ -31,6 +31,7 @@
#include "datman.hxx"
#include "bibcont.hxx"
+#include "bibview.hxx"
BibShortCutHandler::~BibShortCutHandler()
@@ -154,6 +155,8 @@ void BibBookContainer::dispose()
}
CloseBibModul( pBibMod );
+ pTopWin.clear();
+ pBottomWin.clear();
BibSplitWindow::dispose();
}
@@ -178,7 +181,7 @@ void BibBookContainer::createTopFrame( BibShortCutHandler* pWin )
if(pTopWin)
{
RemoveItem(TOP_WINDOW);
- delete pTopWin;
+ pTopWin.clear();
}
pTopWin=new BibWindowContainer(this,pWin);
pTopWin->Show();
@@ -195,7 +198,7 @@ void BibBookContainer::createBottomFrame( BibShortCutHandler* pWin )
if(pBottomWin)
{
RemoveItem(BOTTOM_WINDOW);
- delete pBottomWin;
+ pBottomWin.clear();
}
pBottomWin=new BibWindowContainer(this,pWin);
diff --git a/extensions/source/bibliography/bibcont.hxx b/extensions/source/bibliography/bibcont.hxx
index 9c26ca05a41e..3488c2ee27ee 100644
--- a/extensions/source/bibliography/bibcont.hxx
+++ b/extensions/source/bibliography/bibcont.hxx
@@ -70,8 +70,8 @@ class BibBookContainer: public BibSplitWindow
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xTopPeerRef;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xBottomPeerRef;
- BibWindowContainer* pTopWin;
- BibWindowContainer* pBottomWin;
+ VclPtr<BibWindowContainer> pTopWin;
+ VclPtr<BibWindowContainer> pBottomWin;
HdlBibModul pBibMod;
Idle aIdle;
diff --git a/extensions/source/bibliography/bibmod.cxx b/extensions/source/bibliography/bibmod.cxx
index 4336c1a54461..cda8769d0204 100644
--- a/extensions/source/bibliography/bibmod.cxx
+++ b/extensions/source/bibliography/bibmod.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/lang/XLocalizable.hpp>
#include "bibmod.hxx"
+#include "bibview.hxx"
#include "bibresid.hxx"
#include "datman.hxx"
#include "bibconfig.hxx"
diff --git a/extensions/source/bibliography/bibshortcuthandler.hxx b/extensions/source/bibliography/bibshortcuthandler.hxx
index f109aebfbc5a..4fd79657efa1 100644
--- a/extensions/source/bibliography/bibshortcuthandler.hxx
+++ b/extensions/source/bibliography/bibshortcuthandler.hxx
@@ -31,7 +31,7 @@
class BibShortCutHandler
{
private:
- vcl::Window* pBaseClass; // in cases, where BibShortCutHandler also has to be a window
+ VclPtr<vcl::Window> pBaseClass; // in cases, where BibShortCutHandler also has to be a window
protected:
inline BibShortCutHandler( vcl::Window* pBaseClass );
diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx
index c32e07723a09..f00d4276b2dd 100644
--- a/extensions/source/bibliography/bibview.cxx
+++ b/extensions/source/bibliography/bibview.cxx
@@ -52,9 +52,10 @@ namespace bib
,m_pDatMan( _pManager )
,m_xDatMan( _pManager )
,m_pGeneralPage( NULL )
+ ,m_aFormControlContainer(this)
{
if ( m_xDatMan.is() )
- connectForm( m_xDatMan );
+ m_aFormControlContainer.connectForm( m_xDatMan );
}
@@ -66,7 +67,7 @@ namespace bib
void BibView::dispose()
{
BibGeneralPage* pGeneralPage = m_pGeneralPage;
- m_pGeneralPage = NULL;
+ m_pGeneralPage.clear();
pGeneralPage->CommitActiveControl();
Reference< XForm > xForm = m_pDatMan->getForm();
@@ -97,8 +98,8 @@ namespace bib
}
}
- if ( isFormConnected() )
- disconnectForm();
+ if ( m_aFormControlContainer.isFormConnected() )
+ m_aFormControlContainer.disconnectForm();
pGeneralPage->RemoveListeners();
m_xGeneralPage = NULL;
@@ -118,7 +119,8 @@ namespace bib
m_xGeneralPage = 0;
}
- m_xGeneralPage = m_pGeneralPage = new BibGeneralPage( this, m_pDatMan );
+ m_pGeneralPage = new BibGeneralPage( this, m_pDatMan );
+ m_xGeneralPage = &m_pGeneralPage->GetFocusListener();
m_pGeneralPage->Show();
if( HasFocus() )
@@ -156,16 +158,18 @@ namespace bib
}
}
- void BibView::_loaded( const EventObject& _rEvent )
+ BibViewFormControlContainer::BibViewFormControlContainer(BibView *pBibView) : mpBibView(pBibView) {}
+
+ void BibViewFormControlContainer::_loaded( const EventObject& _rEvent )
{
- UpdatePages();
+ mpBibView->UpdatePages();
FormControlContainer::_loaded( _rEvent );
Resize();
}
- void BibView::_reloaded( const EventObject& _rEvent )
+ void BibViewFormControlContainer::_reloaded( const EventObject& _rEvent )
{
- UpdatePages();
+ mpBibView->UpdatePages();
FormControlContainer::_loaded( _rEvent );
Resize();
}
@@ -186,6 +190,11 @@ namespace bib
Window::Resize();
}
+ Reference< awt::XControlContainer > BibViewFormControlContainer::getControlContainer()
+ {
+ return mpBibView->getControlContainer();
+ }
+
Reference< awt::XControlContainer > BibView::getControlContainer()
{
Reference< awt::XControlContainer > xReturn;
diff --git a/extensions/source/bibliography/bibview.hxx b/extensions/source/bibliography/bibview.hxx
index 6ab966dee1c4..0ab5744244da 100644
--- a/extensions/source/bibliography/bibview.hxx
+++ b/extensions/source/bibliography/bibview.hxx
@@ -34,29 +34,40 @@ namespace bib
{
+ class BibView;
+ class BibViewFormControlContainer : public FormControlContainer
+ {
+ private:
+ VclPtr<BibView> mpBibView;
+ protected:
+ // FormControlContainer
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >
+ getControlContainer() SAL_OVERRIDE;
+ // XLoadListener equivalents
+ virtual void _loaded( const ::com::sun::star::lang::EventObject& _rEvent ) SAL_OVERRIDE;
+ virtual void _reloaded( const ::com::sun::star::lang::EventObject& _rEvent ) SAL_OVERRIDE;
+ public:
+ using FormControlContainer::connectForm;
+ using FormControlContainer::disconnectForm;
+ using FormControlContainer::isFormConnected;
+ BibViewFormControlContainer(BibView *pBibView);
+ };
- class BibView : public BibWindow, public FormControlContainer
+ class BibView : public BibWindow
{
private:
BibDataManager* m_pDatMan;
::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable> m_xDatMan;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener> m_xGeneralPage;
- BibGeneralPage* m_pGeneralPage;
+ VclPtr<BibGeneralPage> m_pGeneralPage;
+ BibViewFormControlContainer m_aFormControlContainer;
private:
DECL_STATIC_LINK(BibView, CallMappingHdl, BibView*);
protected:
// Window overridables
- virtual void Resize() SAL_OVERRIDE;
-
- // FormControlContainer
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >
- getControlContainer() SAL_OVERRIDE;
-
- // XLoadListener equivalents
- virtual void _loaded( const ::com::sun::star::lang::EventObject& _rEvent ) SAL_OVERRIDE;
- virtual void _reloaded( const ::com::sun::star::lang::EventObject& _rEvent ) SAL_OVERRIDE;
+ virtual void Resize() SAL_OVERRIDE;
public:
BibView( vcl::Window* _pParent, BibDataManager* _pDatMan, WinBits nStyle = WB_3DLOOK );
@@ -64,6 +75,7 @@ namespace bib
virtual void dispose() SAL_OVERRIDE;
void UpdatePages();
+ css::uno::Reference< css::awt::XControlContainer > getControlContainer();
virtual void GetFocus() SAL_OVERRIDE;
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index f28936d540f1..818eea9c9c37 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -195,39 +195,39 @@ Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm)
class MappingDialog_Impl : public ModalDialog
{
BibDataManager* pDatMan;
- OKButton* pOKBT;
- ListBox* pIdentifierLB;
- ListBox* pAuthorityTypeLB;
- ListBox* pAuthorLB;
- ListBox* pTitleLB;
- ListBox* pMonthLB;
- ListBox* pYearLB;
- ListBox* pISBNLB;
- ListBox* pBooktitleLB;
- ListBox* pChapterLB;
- ListBox* pEditionLB;
- ListBox* pEditorLB;
- ListBox* pHowpublishedLB;
- ListBox* pInstitutionLB;
- ListBox* pJournalLB;
- ListBox* pNoteLB;
- ListBox* pAnnoteLB;
- ListBox* pNumberLB;
- ListBox* pOrganizationsLB;
- ListBox* pPagesLB;
- ListBox* pPublisherLB;
- ListBox* pAddressLB;
- ListBox* pSchoolLB;
- ListBox* pSeriesLB;
- ListBox* pReportTypeLB;
- ListBox* pVolumeLB;
- ListBox* pURLLB;
- ListBox* pCustom1LB;
- ListBox* pCustom2LB;
- ListBox* pCustom3LB;
- ListBox* pCustom4LB;
- ListBox* pCustom5LB;
- ListBox* aListBoxes[COLUMN_COUNT];
+ VclPtr<OKButton> pOKBT;
+ VclPtr<ListBox> pIdentifierLB;
+ VclPtr<ListBox> pAuthorityTypeLB;
+ VclPtr<ListBox> pAuthorLB;
+ VclPtr<ListBox> pTitleLB;
+ VclPtr<ListBox> pMonthLB;
+ VclPtr<ListBox> pYearLB;
+ VclPtr<ListBox> pISBNLB;
+ VclPtr<ListBox> pBooktitleLB;
+ VclPtr<ListBox> pChapterLB;
+ VclPtr<ListBox> pEditionLB;
+ VclPtr<ListBox> pEditorLB;
+ VclPtr<ListBox> pHowpublishedLB;
+ VclPtr<ListBox> pInstitutionLB;
+ VclPtr<ListBox> pJournalLB;
+ VclPtr<ListBox> pNoteLB;
+ VclPtr<ListBox> pAnnoteLB;
+ VclPtr<ListBox> pNumberLB;
+ VclPtr<ListBox> pOrganizationsLB;
+ VclPtr<ListBox> pPagesLB;
+ VclPtr<ListBox> pPublisherLB;
+ VclPtr<ListBox> pAddressLB;
+ VclPtr<ListBox> pSchoolLB;
+ VclPtr<ListBox> pSeriesLB;
+ VclPtr<ListBox> pReportTypeLB;
+ VclPtr<ListBox> pVolumeLB;
+ VclPtr<ListBox> pURLLB;
+ VclPtr<ListBox> pCustom1LB;
+ VclPtr<ListBox> pCustom2LB;
+ VclPtr<ListBox> pCustom3LB;
+ VclPtr<ListBox> pCustom4LB;
+ VclPtr<ListBox> pCustom5LB;
+ VclPtr<ListBox> aListBoxes[COLUMN_COUNT];
OUString sNone;
bool bModified;
@@ -240,6 +240,7 @@ class MappingDialog_Impl : public ModalDialog
public:
MappingDialog_Impl(vcl::Window* pParent, BibDataManager* pDatMan);
virtual ~MappingDialog_Impl();
+ virtual void dispose() SAL_OVERRIDE;
void SetModified() {bModified = true;}
@@ -376,7 +377,48 @@ MappingDialog_Impl::MappingDialog_Impl(vcl::Window* pParent, BibDataManager* pMa
}
MappingDialog_Impl::~MappingDialog_Impl()
-{}
+{
+ dispose();
+}
+
+void MappingDialog_Impl::dispose()
+{
+ pOKBT.clear();
+ pIdentifierLB.clear();
+ pAuthorityTypeLB.clear();
+ pAuthorLB.clear();
+ pTitleLB.clear();
+ pMonthLB.clear();
+ pYearLB.clear();
+ pISBNLB.clear();
+ pBooktitleLB.clear();
+ pChapterLB.clear();
+ pEditionLB.clear();
+ pEditorLB.clear();
+ pHowpublishedLB.clear();
+ pInstitutionLB.clear();
+ pJournalLB.clear();
+ pNoteLB.clear();
+ pAnnoteLB.clear();
+ pNumberLB.clear();
+ pOrganizationsLB.clear();
+ pPagesLB.clear();
+ pPublisherLB.clear();
+ pAddressLB.clear();
+ pSchoolLB.clear();
+ pSeriesLB.clear();
+ pReportTypeLB.clear();
+ pVolumeLB.clear();
+ pURLLB.clear();
+ pCustom1LB.clear();
+ pCustom2LB.clear();
+ pCustom3LB.clear();
+ pCustom4LB.clear();
+ pCustom5LB.clear();
+ for(auto & a : aListBoxes)
+ a.clear();
+ ModalDialog::dispose();
+}
IMPL_LINK(MappingDialog_Impl, ListBoxSelectHdl, ListBox*, pListBox)
{
@@ -426,7 +468,7 @@ IMPL_LINK_NOARG(MappingDialog_Impl, OkHdl)
class DBChangeDialog_Impl : public ModalDialog
{
- ListBox* m_pSelectionLB;
+ VclPtr<ListBox> m_pSelectionLB;
DBChangeDialogConfig_Impl aConfig;
BibDataManager* pDatMan;
@@ -435,6 +477,7 @@ class DBChangeDialog_Impl : public ModalDialog
public:
DBChangeDialog_Impl(vcl::Window* pParent, BibDataManager* pMan );
virtual ~DBChangeDialog_Impl();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetCurrentURL()const;
};
@@ -477,6 +520,13 @@ IMPL_LINK(DBChangeDialog_Impl, DoubleClickHdl, SvTabListBox*, /*pLB*/)
DBChangeDialog_Impl::~DBChangeDialog_Impl()
{
+ dispose();
+}
+
+void DBChangeDialog_Impl::dispose()
+{
+ m_pSelectionLB.clear();
+ ModalDialog::dispose();
}
OUString DBChangeDialog_Impl::GetCurrentURL()const
diff --git a/extensions/source/bibliography/datman.hxx b/extensions/source/bibliography/datman.hxx
index ea5738f51378..80349cc3e09e 100644
--- a/extensions/source/bibliography/datman.hxx
+++ b/extensions/source/bibliography/datman.hxx
@@ -33,6 +33,7 @@
#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
#include <cppuhelper/implbase1.hxx>
+#include <vcl/vclptr.hxx>
namespace vcl { class Window; }
@@ -100,8 +101,8 @@ private:
::cppu::OInterfaceContainerHelper m_aLoadListeners;
- ::bib::BibView* pBibView;
- BibToolBar* pToolbar;
+ VclPtr<::bib::BibView> pBibView;
+ VclPtr<BibToolBar> pToolbar;
OUString sIdentifierMapping;
protected:
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index a586fe69aa4c..563aa8a57067 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -25,6 +25,7 @@
#include <comphelper/sequence.hxx>
#include "framectr.hxx"
#include "datman.hxx"
+#include "bibview.hxx"
#include "bibresid.hxx"
#include "bib.hrc"
#include <toolkit/helper/vclunohelper.hxx>
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index e63300c5515d..a8af7177fb2f 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -36,6 +36,7 @@
#include "bibprop.hrc"
#include "bib.hrc"
#include "bibmod.hxx"
+#include "bibview.hxx"
#include "bibtools.hxx"
#include "bibliography.hrc"
#include <tools/debug.hxx>
@@ -70,7 +71,7 @@ static OUString lcl_GetColumnName( const Mapping* pMapping, sal_uInt16 nIndexPos
class BibPosListener :public cppu::WeakImplHelper1 <sdbc::XRowSetListener>
{
- BibGeneralPage* pParentPage;
+ VclPtr<BibGeneralPage> pParentPage;
public:
BibPosListener(BibGeneralPage* pParent);
@@ -168,6 +169,7 @@ void BibPosListener::disposing(const lang::EventObject& /*Source*/) throw( uno::
BibGeneralPage::BibGeneralPage(vcl::Window* pParent, BibDataManager* pMan):
BibTabPage(pParent, "GeneralPage", "modules/sbibliography/ui/generalpage.ui"),
sErrorPrefix(BIB_RESSTR(ST_ERROR_PREFIX)),
+ maBibGeneralPageFocusListener(this),
pDatMan(pMan)
{
get(pIdentifierFT, "shortname");
@@ -375,6 +377,40 @@ void BibGeneralPage::dispose()
if(xRowSet.is())
xRowSet->removeRowSetListener(xPosListener);
}
+ pGrid.clear();
+ pScrolledWindow.clear();
+ pIdentifierFT.clear();
+ pAuthTypeFT.clear();
+ pYearFT.clear();
+ pAuthorFT.clear();
+ pTitleFT.clear();
+ pPublisherFT.clear();
+ pAddressFT.clear();
+ pISBNFT.clear();
+ pChapterFT.clear();
+ pPagesFT.clear();
+ pEditorFT.clear();
+ pEditionFT.clear();
+ pBooktitleFT.clear();
+ pVolumeFT.clear();
+ pHowpublishedFT.clear();
+ pOrganizationsFT.clear();
+ pInstitutionFT.clear();
+ pSchoolFT.clear();
+ pReportTypeFT.clear();
+ pMonthFT.clear();
+ pJournalFT.clear();
+ pNumberFT.clear();
+ pSeriesFT.clear();
+ pAnnoteFT.clear();
+ pNoteFT.clear();
+ pURLFT.clear();
+ pCustom1FT.clear();
+ pCustom2FT.clear();
+ pCustom3FT.clear();
+ pCustom4FT.clear();
+ pCustom5FT.clear();
+ for (auto & a: aFixedTexts) a.clear();
BibTabPage::dispose();
}
@@ -385,7 +421,7 @@ void BibGeneralPage::RemoveListeners()
if(aControls[i].is())
{
uno::Reference< awt::XWindow > xCtrWin(aControls[i], uno::UNO_QUERY );
- xCtrWin->removeFocusListener( this );
+ xCtrWin->removeFocusListener( &maBibGeneralPageFocusListener );
aControls[i] = 0;
}
}
@@ -506,7 +542,7 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl(
// Peer as Child to the FrameWindow
xCtrlContnr->addControl(rName, xControl);
uno::Reference< awt::XWindow > xCtrWin(xControl, UNO_QUERY );
- xCtrWin->addFocusListener( this );
+ xCtrWin->addFocusListener( &maBibGeneralPageFocusListener );
rIndex = -1; // -> implies, that not found
for(sal_uInt16 i = 0; i < FIELD_COUNT; i++)
if(!aControls[i].is())
@@ -627,10 +663,6 @@ void BibGeneralPage::focusLost(const awt::FocusEvent& ) throw( uno::RuntimeExcep
CommitActiveControl();
}
-void BibGeneralPage::disposing(const lang::EventObject& /*Source*/) throw( uno::RuntimeException, std::exception )
-{
-}
-
void BibGeneralPage::GetFocus()
{
Reference< awt::XWindow >* pxControl = aControls;
@@ -713,4 +745,20 @@ bool BibGeneralPage::HandleShortCutKey( const KeyEvent& rKeyEvent )
return bHandled;
}
+BibGeneralPageFocusListener::BibGeneralPageFocusListener(BibGeneralPage *pBibGeneralPage): mpBibGeneralPage(pBibGeneralPage)
+{}
+
+void BibGeneralPageFocusListener::focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException, std::exception )
+{
+ mpBibGeneralPage->focusGained(e);
+}
+
+void BibGeneralPageFocusListener::focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException, std::exception )
+{
+ mpBibGeneralPage->focusLost(e);
+}
+
+void BibGeneralPageFocusListener::disposing( const ::com::sun::star::lang::EventObject& ) throw( com::sun::star::uno::RuntimeException, std::exception )
+{}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/bibliography/general.hxx b/extensions/source/bibliography/general.hxx
index 106f7f3416b2..809f4e112ca8 100644
--- a/extensions/source/bibliography/general.hxx
+++ b/extensions/source/bibliography/general.hxx
@@ -41,56 +41,70 @@ class BibDataManager;
#define TYPE_COUNT 22
#define FIELD_COUNT 31
-typedef cppu::WeakAggImplHelper1 < ::com::sun::star::awt::XFocusListener > BibGeneralPageBaseClass;
+/**
+ * We need to split off the listener because both it and the vcl::Window baseclass are ref-counted
+ */
+class BibGeneralPage;
+class BibGeneralPageFocusListener : public cppu::WeakAggImplHelper1 < ::com::sun::star::awt::XFocusListener >
+{
+private:
+ VclPtr<BibGeneralPage> mpBibGeneralPage;
+public:
+ BibGeneralPageFocusListener(BibGeneralPage *pBibGeneralPage);
+ virtual void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
-class BibGeneralPage: public BibGeneralPageBaseClass, public BibTabPage
+};
+
+class BibGeneralPage: public BibTabPage
{
- VclGrid* pGrid;
- VclScrolledWindow* pScrolledWindow;
+ VclPtr<VclGrid> pGrid;
+ VclPtr<VclScrolledWindow> pScrolledWindow;
- FixedText* pIdentifierFT;
- FixedText* pAuthTypeFT;
- FixedText* pYearFT;
+ VclPtr<FixedText> pIdentifierFT;
+ VclPtr<FixedText> pAuthTypeFT;
+ VclPtr<FixedText> pYearFT;
- FixedText* pAuthorFT;
- FixedText* pTitleFT;
+ VclPtr<FixedText> pAuthorFT;
+ VclPtr<FixedText> pTitleFT;
- FixedText* pPublisherFT;
- FixedText* pAddressFT;
- FixedText* pISBNFT;
+ VclPtr<FixedText> pPublisherFT;
+ VclPtr<FixedText> pAddressFT;
+ VclPtr<FixedText> pISBNFT;
- FixedText* pChapterFT;
- FixedText* pPagesFT;
+ VclPtr<FixedText> pChapterFT;
+ VclPtr<FixedText> pPagesFT;
- FixedText* pEditorFT;
- FixedText* pEditionFT;
+ VclPtr<FixedText> pEditorFT;
+ VclPtr<FixedText> pEditionFT;
- FixedText* pBooktitleFT;
- FixedText* pVolumeFT;
- FixedText* pHowpublishedFT;
+ VclPtr<FixedText> pBooktitleFT;
+ VclPtr<FixedText> pVolumeFT;
+ VclPtr<FixedText> pHowpublishedFT;
- FixedText* pOrganizationsFT;
- FixedText* pInstitutionFT;
- FixedText* pSchoolFT;
+ VclPtr<FixedText> pOrganizationsFT;
+ VclPtr<FixedText> pInstitutionFT;
+ VclPtr<FixedText> pSchoolFT;
- FixedText* pReportTypeFT;
- FixedText* pMonthFT;
+ VclPtr<FixedText> pReportTypeFT;
+ VclPtr<FixedText> pMonthFT;
- FixedText* pJournalFT;
- FixedText* pNumberFT;
- FixedText* pSeriesFT;
+ VclPtr<FixedText> pJournalFT;
+ VclPtr<FixedText> pNumberFT;
+ VclPtr<FixedText> pSeriesFT;
- FixedText* pAnnoteFT;
- FixedText* pNoteFT;
- FixedText* pURLFT;
+ VclPtr<FixedText> pAnnoteFT;
+ VclPtr<FixedText> pNoteFT;
+ VclPtr<FixedText> pURLFT;
- FixedText* pCustom1FT;
- FixedText* pCustom2FT;
- FixedText* pCustom3FT;
- FixedText* pCustom4FT;
- FixedText* pCustom5FT;
+ VclPtr<FixedText> pCustom1FT;
+ VclPtr<FixedText> pCustom2FT;
+ VclPtr<FixedText> pCustom3FT;
+ VclPtr<FixedText> pCustom4FT;
+ VclPtr<FixedText> pCustom5FT;
- FixedText* aFixedTexts[ FIELD_COUNT ];
+ VclPtr<FixedText> aFixedTexts[ FIELD_COUNT ];
sal_Int16 nFT2CtrlMap[ FIELD_COUNT ];
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
@@ -114,6 +128,7 @@ class BibGeneralPage: public BibGeneralPageBaseClass, public BibTabPage
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener >
xPosListener;
+ BibGeneralPageFocusListener maBibGeneralPageFocusListener;
BibDataManager* pDatMan;
@@ -144,16 +159,17 @@ public:
void CommitActiveControl();
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
-
- void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
- void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
-
void RemoveListeners();
virtual void GetFocus() SAL_OVERRIDE;
virtual bool HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled
+
+ inline BibGeneralPageFocusListener& GetFocusListener() { return maBibGeneralPageFocusListener; }
+
+ void focusGained(const css::awt::FocusEvent& rEvent) throw( css::uno::RuntimeException, std::exception );
+ void focusLost(const css::awt::FocusEvent& rEvent) throw( css::uno::RuntimeException, std::exception );
+
};
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index 771cbdcff1d5..477e1afd745e 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -31,6 +31,7 @@
#include <vcl/settings.hxx>
#include <vcl/mnemonic.hxx>
#include "bibbeam.hxx"
+#include "bibview.hxx"
#include "toolbar.hrc"
#include "bibresid.hxx"
diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx
index 09e3074afe69..f7eef64155bd 100644
--- a/extensions/source/bibliography/toolbar.hxx
+++ b/extensions/source/bibliography/toolbar.hxx
@@ -39,12 +39,12 @@ class BibToolBarListener: public cppu::WeakImplHelper1 < ::com::sun::star::frame
{
private:
- sal_uInt16 nIndex;
+ sal_uInt16 nIndex;
OUString aCommand;
protected:
- BibToolBar *pToolBar;
+ VclPtr<BibToolBar> pToolBar;
public:
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index 5a9817164ca0..6416a234d748 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -77,6 +77,19 @@ namespace dbp
m_pDatasource->SetDropDownLineCount(10);
}
+ OTableSelectionPage::~OTableSelectionPage()
+ {
+ dispose();
+ }
+
+ void OTableSelectionPage::dispose()
+ {
+ m_pDatasourceLabel.clear();
+ m_pDatasource.clear();
+ m_pSearchDatabase.clear();
+ m_pTable.clear();
+ OControlWizardPage::dispose();
+ }
void OTableSelectionPage::ActivatePage()
{
@@ -383,6 +396,19 @@ namespace dbp
{
}
+ OMaybeListSelectionPage::~OMaybeListSelectionPage()
+ {
+ dispose();
+ }
+
+ void OMaybeListSelectionPage::dispose()
+ {
+ m_pYes.clear();
+ m_pNo.clear();
+ m_pList.clear();
+ OControlWizardPage::dispose();
+ }
+
void OMaybeListSelectionPage::announceControls(RadioButton& _rYesButton, RadioButton& _rNoButton, ListBox& _rSelection)
{
m_pYes = &_rYesButton;
@@ -453,6 +479,19 @@ namespace dbp
m_pStoreWhere->SetDropDownLineCount(10);
}
+ ODBFieldPage::~ODBFieldPage()
+ {
+ dispose();
+ }
+
+ void ODBFieldPage::dispose()
+ {
+ m_pDescription.clear();
+ m_pStoreYes.clear();
+ m_pStoreNo.clear();
+ m_pStoreWhere.clear();
+ OMaybeListSelectionPage::dispose();
+ }
void ODBFieldPage::initializePage()
{
diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx
index 8d9d9c801d3f..1ff1d51b4601 100644
--- a/extensions/source/dbpilots/commonpagesdbp.hxx
+++ b/extensions/source/dbpilots/commonpagesdbp.hxx
@@ -36,16 +36,18 @@ namespace dbp
class OTableSelectionPage : public OControlWizardPage
{
protected:
- FixedText *m_pDatasourceLabel;
- ListBox *m_pDatasource;
- PushButton *m_pSearchDatabase;
- ListBox *m_pTable;
+ VclPtr<FixedText> m_pDatasourceLabel;
+ VclPtr<ListBox> m_pDatasource;
+ VclPtr<PushButton> m_pSearchDatabase;
+ VclPtr<ListBox> m_pTable;
::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseContext >
m_xDSContext;
public:
OTableSelectionPage(OControlWizard* _pParent);
+ virtual ~OTableSelectionPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
// TabPage overridables
@@ -74,12 +76,14 @@ namespace dbp
class OMaybeListSelectionPage : public OControlWizardPage
{
protected:
- RadioButton* m_pYes;
- RadioButton* m_pNo;
- ListBox* m_pList;
+ VclPtr<RadioButton> m_pYes;
+ VclPtr<RadioButton> m_pNo;
+ VclPtr<ListBox> m_pList;
public:
OMaybeListSelectionPage( OControlWizard* _pParent, const OString& _rID, const OUString& _rUIXMLDescription );
+ virtual ~OMaybeListSelectionPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
DECL_LINK( OnRadioSelected, RadioButton* );
@@ -105,13 +109,15 @@ namespace dbp
class ODBFieldPage : public OMaybeListSelectionPage
{
protected:
- FixedText* m_pDescription;
- RadioButton* m_pStoreYes;
- RadioButton* m_pStoreNo;
- ListBox* m_pStoreWhere;
+ VclPtr<FixedText> m_pDescription;
+ VclPtr<RadioButton> m_pStoreYes;
+ VclPtr<RadioButton> m_pStoreNo;
+ VclPtr<ListBox> m_pStoreWhere;
public:
ODBFieldPage( OControlWizard* _pParent );
+ virtual ~ODBFieldPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
void setDescriptionText(const OUString& _rDesc) { m_pDescription->SetText(_rDesc); }
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index c3f8c025d20c..da84b94502d1 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -86,6 +86,18 @@ namespace dbp
OControlWizardPage::~OControlWizardPage()
{
+ dispose();
+ }
+
+ void OControlWizardPage::dispose()
+ {
+ m_pFormDatasourceLabel.clear();
+ m_pFormDatasource.clear();
+ m_pFormContentTypeLabel.clear();
+ m_pFormContentType.clear();
+ m_pFormTableLabel.clear();
+ m_pFormTable.clear();
+ OControlWizardPage_Base::dispose();
}
OControlWizard* OControlWizardPage::getDialog()
diff --git a/extensions/source/dbpilots/controlwizard.hxx b/extensions/source/dbpilots/controlwizard.hxx
index 2d0fdbac7aa1..81016f548ab0 100644
--- a/extensions/source/dbpilots/controlwizard.hxx
+++ b/extensions/source/dbpilots/controlwizard.hxx
@@ -57,12 +57,12 @@ namespace dbp
class OControlWizardPage : public OControlWizardPage_Base
{
protected:
- FixedText* m_pFormDatasourceLabel;
- FixedText* m_pFormDatasource;
- FixedText* m_pFormContentTypeLabel;
- FixedText* m_pFormContentType;
- FixedText* m_pFormTableLabel;
- FixedText* m_pFormTable;
+ VclPtr<FixedText> m_pFormDatasourceLabel;
+ VclPtr<FixedText> m_pFormDatasource;
+ VclPtr<FixedText> m_pFormContentTypeLabel;
+ VclPtr<FixedText> m_pFormContentType;
+ VclPtr<FixedText> m_pFormTableLabel;
+ VclPtr<FixedText> m_pFormTable;
protected:
OControlWizard* getDialog();
@@ -75,6 +75,7 @@ namespace dbp
public:
OControlWizardPage( OControlWizard* _pParent, const OString& rID, const OUString& rUIXMLDescription );
virtual ~OControlWizardPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
void fillListBox(
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index 0c68df814ee3..aadc8f86536d 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -318,6 +318,21 @@ namespace dbp
m_pSelFields->SetDoubleClickHdl(LINK(this, OGridFieldsSelection, OnEntryDoubleClicked));
}
+ OGridFieldsSelection::~OGridFieldsSelection()
+ {
+ dispose();
+ }
+
+ void OGridFieldsSelection::dispose()
+ {
+ m_pExistFields.clear();
+ m_pSelectOne.clear();
+ m_pSelectAll.clear();
+ m_pDeselectOne.clear();
+ m_pDeselectAll.clear();
+ m_pSelFields.clear();
+ OGridPage::dispose();
+ }
void OGridFieldsSelection::ActivatePage()
{
diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx
index 91da2fd5bee7..42db6683d176 100644
--- a/extensions/source/dbpilots/gridwizard.hxx
+++ b/extensions/source/dbpilots/gridwizard.hxx
@@ -82,15 +82,17 @@ namespace dbp
class OGridFieldsSelection : public OGridPage
{
protected:
- ListBox *m_pExistFields;
- PushButton *m_pSelectOne;
- PushButton *m_pSelectAll;
- PushButton *m_pDeselectOne;
- PushButton *m_pDeselectAll;
- ListBox *m_pSelFields;
+ VclPtr<ListBox> m_pExistFields;
+ VclPtr<PushButton> m_pSelectOne;
+ VclPtr<PushButton> m_pSelectAll;
+ VclPtr<PushButton> m_pDeselectOne;
+ VclPtr<PushButton> m_pDeselectAll;
+ VclPtr<ListBox> m_pSelFields;
public:
OGridFieldsSelection( OGridWizard* _pParent );
+ virtual ~OGridFieldsSelection();
+ virtual void dispose() SAL_OVERRIDE;
protected:
// TabPage overridables
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx
index 2f165addf0cf..1c5ac976dcbd 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -207,11 +207,24 @@ namespace dbp
implCheckMoveButtons();
m_pExistingRadios->EnableMultiSelection(true);
- getDialog()->defaultButton(m_pMoveRight);
+ getDialog()->defaultButton(m_pMoveRight.get());
m_pExistingRadios->SetAccessibleRelationMemberOf(m_pExistingRadios);
}
+ ORadioSelectionPage::~ORadioSelectionPage()
+ {
+ dispose();
+ }
+
+ void ORadioSelectionPage::dispose()
+ {
+ m_pRadioName.clear();
+ m_pMoveRight.clear();
+ m_pMoveLeft.clear();
+ m_pExistingRadios.clear();
+ OGBWPage::dispose();
+ }
void ORadioSelectionPage::ActivatePage()
{
@@ -315,7 +328,7 @@ namespace dbp
if (bUnfinishedInput)
{
if (0 == (m_pMoveRight->GetStyle() & WB_DEFBUTTON))
- getDialog()->defaultButton(m_pMoveRight);
+ getDialog()->defaultButton(m_pMoveRight.get());
}
else
{
@@ -341,6 +354,18 @@ namespace dbp
m_pDefSelection->SetStyle(WB_DROPDOWN);
}
+ ODefaultFieldSelectionPage::~ODefaultFieldSelectionPage()
+ {
+ dispose();
+ }
+
+ void ODefaultFieldSelectionPage::dispose()
+ {
+ m_pDefSelYes.clear();
+ m_pDefSelNo.clear();
+ m_pDefSelection.clear();
+ OMaybeListSelectionPage::dispose();
+ }
void ODefaultFieldSelectionPage::initializePage()
{
@@ -388,6 +413,17 @@ namespace dbp
m_pOptions->SetAccessibleRelationMemberOf(m_pOptions);
}
+ OOptionValuesPage::~OOptionValuesPage()
+ {
+ dispose();
+ }
+
+ void OOptionValuesPage::dispose()
+ {
+ m_pValue.clear();
+ m_pOptions.clear();
+ OGBWPage::dispose();
+ }
IMPL_LINK( OOptionValuesPage, OnOptionSelected, ListBox*, /*NOTINTERESTEDIN*/ )
{
@@ -486,6 +522,16 @@ namespace dbp
get(m_pName, "nameit");
}
+ OFinalizeGBWPage::~OFinalizeGBWPage()
+ {
+ dispose();
+ }
+
+ void OFinalizeGBWPage::dispose()
+ {
+ m_pName.clear();
+ OGBWPage::dispose();
+ }
void OFinalizeGBWPage::ActivatePage()
{
diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx
index e37840f88216..b594d5b59eae 100644
--- a/extensions/source/dbpilots/groupboxwiz.hxx
+++ b/extensions/source/dbpilots/groupboxwiz.hxx
@@ -94,13 +94,15 @@ namespace dbp
class ORadioSelectionPage : public OGBWPage
{
protected:
- Edit *m_pRadioName;
- PushButton *m_pMoveRight;
- PushButton *m_pMoveLeft;
- ListBox *m_pExistingRadios;
+ VclPtr<Edit> m_pRadioName;
+ VclPtr<PushButton> m_pMoveRight;
+ VclPtr<PushButton> m_pMoveLeft;
+ VclPtr<ListBox> m_pExistingRadios;
public:
ORadioSelectionPage( OControlWizard* _pParent );
+ virtual ~ORadioSelectionPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
// TabPage overridables
@@ -124,12 +126,14 @@ namespace dbp
class ODefaultFieldSelectionPage : public OMaybeListSelectionPage
{
protected:
- RadioButton *m_pDefSelYes;
- RadioButton *m_pDefSelNo;
- ListBox *m_pDefSelection;
+ VclPtr<RadioButton> m_pDefSelYes;
+ VclPtr<RadioButton> m_pDefSelNo;
+ VclPtr<ListBox> m_pDefSelection;
public:
ODefaultFieldSelectionPage( OControlWizard* _pParent );
+ virtual ~ODefaultFieldSelectionPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
// OWizardPage overridables
@@ -145,8 +149,8 @@ namespace dbp
class OOptionValuesPage : public OGBWPage
{
protected:
- Edit *m_pValue;
- ListBox *m_pOptions;
+ VclPtr<Edit> m_pValue;
+ VclPtr<ListBox> m_pOptions;
StringArray m_aUncommittedValues;
::svt::WizardTypes::WizardState
@@ -154,6 +158,8 @@ namespace dbp
public:
OOptionValuesPage( OControlWizard* _pParent );
+ virtual ~OOptionValuesPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
// TabPage overridables
@@ -189,10 +195,12 @@ namespace dbp
class OFinalizeGBWPage : public OGBWPage
{
protected:
- Edit *m_pName;
+ VclPtr<Edit> m_pName;
public:
OFinalizeGBWPage( OControlWizard* _pParent );
+ virtual ~OFinalizeGBWPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
// TabPage overridables
diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx
index 6349c0796c58..473a3862b0de 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -285,6 +285,16 @@ namespace dbp
m_pSelectTable->SetSelectHdl(LINK(this, OContentTableSelection, OnTableSelected));
}
+ OContentTableSelection::~OContentTableSelection()
+ {
+ dispose();
+ }
+
+ void OContentTableSelection::dispose()
+ {
+ m_pSelectTable.clear();
+ OLCPage::dispose();
+ }
void OContentTableSelection::ActivatePage()
{
@@ -369,6 +379,18 @@ namespace dbp
m_pSelectTableField->SetDoubleClickHdl(LINK(this, OContentFieldSelection, OnTableDoubleClicked));
}
+ OContentFieldSelection::~OContentFieldSelection()
+ {
+ dispose();
+ }
+
+ void OContentFieldSelection::dispose()
+ {
+ m_pSelectTableField.clear();
+ m_pDisplayedField.clear();
+ m_pInfo.clear();
+ OLCPage::dispose();
+ }
void OContentFieldSelection::ActivatePage()
{
@@ -439,6 +461,17 @@ namespace dbp
m_pTableField->SetSelectHdl(LINK(this, OLinkFieldsPage, OnSelectionModified));
}
+ OLinkFieldsPage::~OLinkFieldsPage()
+ {
+ dispose();
+ }
+
+ void OLinkFieldsPage::dispose()
+ {
+ m_pValueListField.clear();
+ m_pTableField.clear();
+ OLCPage::dispose();
+ }
void OLinkFieldsPage::ActivatePage()
{
diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx
index 6d4908cdda5c..d1d05fbc8e04 100644
--- a/extensions/source/dbpilots/listcombowizard.hxx
+++ b/extensions/source/dbpilots/listcombowizard.hxx
@@ -108,10 +108,12 @@ namespace dbp
class OContentTableSelection : public OLCPage
{
protected:
- ListBox *m_pSelectTable;
+ VclPtr<ListBox> m_pSelectTable;
public:
OContentTableSelection( OListComboWizard* _pParent );
+ virtual ~OContentTableSelection();
+ virtual void dispose() SAL_OVERRIDE;
protected:
// TabPage overridables
@@ -133,13 +135,15 @@ namespace dbp
class OContentFieldSelection : public OLCPage
{
protected:
- ListBox *m_pSelectTableField;
- Edit *m_pDisplayedField;
- FixedText *m_pInfo;
+ VclPtr<ListBox> m_pSelectTableField;
+ VclPtr<Edit> m_pDisplayedField;
+ VclPtr<FixedText> m_pInfo;
public:
OContentFieldSelection( OListComboWizard* _pParent );
+ virtual ~OContentFieldSelection();
+ virtual void dispose() SAL_OVERRIDE;
protected:
DECL_LINK( OnFieldSelected, ListBox* );
@@ -160,12 +164,14 @@ namespace dbp
class OLinkFieldsPage : public OLCPage
{
protected:
- ComboBox *m_pValueListField;
- ComboBox *m_pTableField;
+ VclPtr<ComboBox> m_pValueListField;
+ VclPtr<ComboBox> m_pTableField;
public:
OLinkFieldsPage( OListComboWizard* _pParent );
+ virtual ~OLinkFieldsPage();
+ virtual void dispose() SAL_OVERRIDE;
protected:
// TabPage overridables
diff --git a/extensions/source/plugin/inc/plugin/plctrl.hxx b/extensions/source/plugin/inc/plugin/plctrl.hxx
index bab35813b453..ab5d33c80abd 100644
--- a/extensions/source/plugin/inc/plugin/plctrl.hxx
+++ b/extensions/source/plugin/inc/plugin/plctrl.hxx
@@ -60,6 +60,7 @@
#include <com/sun/star/awt/PosSize.hpp>
#include <cppuhelper/implbase4.hxx>
+#include <vcl/vclptr.hxx>
#include <list>
@@ -152,9 +153,9 @@ protected:
protected:
::std::list< Reference< ::com::sun::star::lang::XEventListener > > _aDisposeListeners;
- MRCListenerMultiplexerHelper* _pMultiplexer;
+ MRCListenerMultiplexerHelper* _pMultiplexer;
- Reference< XInterface > _xContext;
+ Reference< XInterface > _xContext;
sal_Int32 _nX;
sal_Int32 _nY;
@@ -162,11 +163,11 @@ protected:
sal_Int32 _nHeight;
sal_Int16 _nFlags;
- bool _bVisible;
- bool _bInDesignMode;
- bool _bEnable;
+ bool _bVisible;
+ bool _bInDesignMode;
+ bool _bEnable;
- SystemChildWindow* _pSysChild;
+ VclPtr<SystemChildWindow> _pSysChild;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > _xPeer;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > _xPeerWindow;
diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx
index 069a406c1f52..3de62a17848f 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -376,7 +376,7 @@ namespace pcr
PushButton& OBrowserLine::impl_ensureButton( bool _bPrimary )
{
- PushButton*& rpButton = _bPrimary ? m_pBrowseButton : m_pAdditionalBrowseButton;
+ VclPtr<PushButton>& rpButton = _bPrimary ? m_pBrowseButton : m_pAdditionalBrowseButton;
if ( !rpButton )
{
@@ -443,13 +443,12 @@ namespace pcr
void OBrowserLine::implHideBrowseButton( bool _bPrimary, bool _bReLayout )
{
- PushButton*& rpButton = _bPrimary ? m_pBrowseButton : m_pAdditionalBrowseButton;
+ VclPtr<PushButton>& rpButton = _bPrimary ? m_pBrowseButton : m_pAdditionalBrowseButton;
if ( rpButton )
{
rpButton->Hide();
- delete rpButton;
- rpButton = NULL;
+ rpButton.clear();
}
if ( _bReLayout )
diff --git a/extensions/source/propctrlr/browserline.hxx b/extensions/source/propctrlr/browserline.hxx
index ff16ae9f549f..d720967c02bf 100644
--- a/extensions/source/propctrlr/browserline.hxx
+++ b/extensions/source/propctrlr/browserline.hxx
@@ -56,11 +56,11 @@ namespace pcr
Point m_aLinePos;
::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >
m_xControl;
- vcl::Window* m_pControlWindow;
- PushButton* m_pBrowseButton;
- PushButton* m_pAdditionalBrowseButton;
+ VclPtr<vcl::Window> m_pControlWindow;
+ VclPtr<PushButton> m_pBrowseButton;
+ VclPtr<PushButton> m_pAdditionalBrowseButton;
IButtonClickListener* m_pClickListener;
- vcl::Window* m_pTheParent;
+ VclPtr<vcl::Window> m_pTheParent;
sal_uInt16 m_nNameWidth;
sal_uInt16 m_nEnableFlags;
bool m_bIndentTitle;
diff --git a/extensions/source/propctrlr/browserview.cxx b/extensions/source/propctrlr/browserview.cxx
index 7a39ac9092a7..dcf118164793 100644
--- a/extensions/source/propctrlr/browserview.cxx
+++ b/extensions/source/propctrlr/browserview.cxx
@@ -21,6 +21,7 @@
#include "propertyeditor.hxx"
#include "propctrlr.hrc"
#include <boost/scoped_ptr.hpp>
+#include <vcl/tabpage.hxx>
namespace pcr
{
@@ -63,9 +64,8 @@ namespace pcr
sal_uInt16 nTmpPage = m_pPropBox->GetCurPage();
if (nTmpPage)
m_nActivePage = nTmpPage;
- boost::scoped_ptr<vcl::Window> aTemp(m_pPropBox);
- m_pPropBox = NULL;
}
+ m_pPropBox.clear();
vcl::Window::dispose();
}
diff --git a/extensions/source/propctrlr/browserview.hxx b/extensions/source/propctrlr/browserview.hxx
index 249d87c962c0..9ae97d364295 100644
--- a/extensions/source/propctrlr/browserview.hxx
+++ b/extensions/source/propctrlr/browserview.hxx
@@ -37,7 +37,7 @@ namespace pcr
class OPropertyBrowserView : public vcl::Window
{
- OPropertyEditor* m_pPropBox;
+ VclPtr<OPropertyEditor> m_pPropBox;
sal_uInt16 m_nActivePage;
Link m_aPageActivationHandler;
diff --git a/extensions/source/propctrlr/commoncontrol.cxx b/extensions/source/propctrlr/commoncontrol.cxx
index 096b717c8f4a..c93594bec4ec 100644
--- a/extensions/source/propctrlr/commoncontrol.cxx
+++ b/extensions/source/propctrlr/commoncontrol.cxx
@@ -47,7 +47,7 @@ namespace pcr
,m_pModifyListener( _pModifyListener )
,m_bModified( false )
{
- DBG_ASSERT( m_pControlWindow != NULL, "ControlHelper::ControlHelper: invalid window!" );
+ DBG_ASSERT( m_pControlWindow != nullptr, "ControlHelper::ControlHelper: invalid window!" );
}
@@ -55,11 +55,6 @@ namespace pcr
{
}
-
-
-
-
-
void SAL_CALL ControlHelper::setControlContext( const Reference< XPropertyControlContext >& _controlcontext ) throw (RuntimeException)
{
m_xContext = _controlcontext;
@@ -93,7 +88,7 @@ namespace pcr
void SAL_CALL ControlHelper::dispose()
{
- DELETEZ( m_pControlWindow );
+ m_pControlWindow.clear();
}
diff --git a/extensions/source/propctrlr/commoncontrol.hxx b/extensions/source/propctrlr/commoncontrol.hxx
index 629660eda8d7..cbe825f32156 100644
--- a/extensions/source/propctrlr/commoncontrol.hxx
+++ b/extensions/source/propctrlr/commoncontrol.hxx
@@ -86,7 +86,7 @@ namespace pcr
class ControlHelper
{
private:
- vcl::Window* m_pControlWindow;
+ VclPtr<vcl::Window> m_pControlWindow;
sal_Int16 m_nControlType;
::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlContext >
m_xContext;
diff --git a/extensions/source/propctrlr/controlfontdialog.cxx b/extensions/source/propctrlr/controlfontdialog.cxx
index 66718f0d081d..c06fc1f880ae 100644
--- a/extensions/source/propctrlr/controlfontdialog.cxx
+++ b/extensions/source/propctrlr/controlfontdialog.cxx
@@ -169,7 +169,7 @@ namespace pcr
OSL_ENSURE(m_pDialog, "OControlFontDialog::executedDialog: no dialog anymore?!!");
if (m_pDialog && (sal_True == _nExecutionResult) && m_xControlModel.is())
{
- const SfxItemSet* pOutput = static_cast<ControlCharacterDialog*>(m_pDialog)->GetOutputItemSet();
+ const SfxItemSet* pOutput = static_cast<ControlCharacterDialog*>(m_pDialog.get())->GetOutputItemSet();
if (pOutput)
ControlCharacterDialog::translateItemsToProperties( *pOutput, m_xControlModel );
}
diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx
index c7fda6ba8361..31011bf7ff3b 100644
--- a/extensions/source/propctrlr/formlinkdialog.cxx
+++ b/extensions/source/propctrlr/formlinkdialog.cxx
@@ -64,13 +64,15 @@ namespace pcr
class FieldLinkRow : public TabPage
{
private:
- ComboBox* m_pDetailColumn;
- ComboBox* m_pMasterColumn;
+ VclPtr<ComboBox> m_pDetailColumn;
+ VclPtr<ComboBox> m_pMasterColumn;
Link m_aLinkChangeHandler;
public:
FieldLinkRow( vcl::Window* _pParent );
+ virtual ~FieldLinkRow();
+ virtual void dispose() SAL_OVERRIDE;
inline void SetLinkChangeHandler( const Link& _rHdl ) { m_aLinkChangeHandler = _rHdl; }
@@ -105,6 +107,17 @@ namespace pcr
m_pMasterColumn->SetModifyHdl( LINK( this, FieldLinkRow, OnFieldNameChanged ) );
}
+ FieldLinkRow::~FieldLinkRow()
+ {
+ dispose();
+ }
+
+ void FieldLinkRow::dispose()
+ {
+ m_pDetailColumn.clear();
+ m_pMasterColumn.clear();
+ TabPage::dispose();
+ }
void FieldLinkRow::fillList( LinkParticipant _eWhich, const Sequence< OUString >& _rFieldNames )
{
@@ -193,8 +206,18 @@ namespace pcr
FormLinkDialog::~FormLinkDialog( )
{
+ dispose();
}
+ void FormLinkDialog::dispose( )
+ {
+ m_pExplanation.clear();
+ m_pDetailLabel.clear();
+ m_pMasterLabel.clear();
+ m_pOK.clear();
+ m_pSuggest.clear();
+ ModalDialog::dispose();
+ }
void FormLinkDialog::commitLinkPairs()
{
diff --git a/extensions/source/propctrlr/formlinkdialog.hxx b/extensions/source/propctrlr/formlinkdialog.hxx
index 94b386e7108f..7f563a2dafaf 100644
--- a/extensions/source/propctrlr/formlinkdialog.hxx
+++ b/extensions/source/propctrlr/formlinkdialog.hxx
@@ -44,15 +44,15 @@ namespace pcr
class FormLinkDialog : public ModalDialog
{
private:
- FixedText* m_pExplanation;
- FixedText* m_pDetailLabel;
- FixedText* m_pMasterLabel;
+ VclPtr<FixedText> m_pExplanation;
+ VclPtr<FixedText> m_pDetailLabel;
+ VclPtr<FixedText> m_pMasterLabel;
::std::unique_ptr< FieldLinkRow > m_aRow1;
::std::unique_ptr< FieldLinkRow > m_aRow2;
::std::unique_ptr< FieldLinkRow > m_aRow3;
::std::unique_ptr< FieldLinkRow > m_aRow4;
- OKButton* m_pOK;
- PushButton* m_pSuggest;
+ VclPtr<OKButton> m_pOK;
+ VclPtr<PushButton> m_pSuggest;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
m_xContext;
@@ -80,6 +80,7 @@ namespace pcr
const OUString& _sMasterLabel = OUString()
);
virtual ~FormLinkDialog( );
+ virtual void dispose() SAL_OVERRIDE;
// Dialog overridables
virtual short Execute() SAL_OVERRIDE;
diff --git a/extensions/source/propctrlr/listselectiondlg.cxx b/extensions/source/propctrlr/listselectiondlg.cxx
index fdb6229dc370..b8a92d928e05 100644
--- a/extensions/source/propctrlr/listselectiondlg.cxx
+++ b/extensions/source/propctrlr/listselectiondlg.cxx
@@ -48,6 +48,17 @@ namespace pcr
initialize( );
}
+ ListSelectionDialog::~ListSelectionDialog()
+ {
+ dispose();
+ }
+
+ void ListSelectionDialog::dispose()
+ {
+ m_pEntries.clear();
+ ModalDialog::dispose();
+ }
+
short ListSelectionDialog::Execute()
{
short nResult = ModalDialog::Execute();
diff --git a/extensions/source/propctrlr/listselectiondlg.hxx b/extensions/source/propctrlr/listselectiondlg.hxx
index aaccb0754ec2..ca9a118c06f9 100644
--- a/extensions/source/propctrlr/listselectiondlg.hxx
+++ b/extensions/source/propctrlr/listselectiondlg.hxx
@@ -31,7 +31,7 @@ namespace pcr
class ListSelectionDialog : public ModalDialog
{
private:
- ListBox* m_pEntries;
+ VclPtr<ListBox> m_pEntries;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
m_xListBox;
@@ -44,6 +44,8 @@ namespace pcr
const OUString& _rPropertyName,
const OUString& _rPropertyUIName
);
+ virtual ~ListSelectionDialog();
+ virtual void dispose() SAL_OVERRIDE;
// Dialog overridables
virtual short Execute() SAL_OVERRIDE;
diff --git a/extensions/source/propctrlr/newdatatype.cxx b/extensions/source/propctrlr/newdatatype.cxx
index 62cc6da9c247..9a7810578f49 100644
--- a/extensions/source/propctrlr/newdatatype.cxx
+++ b/extensions/source/propctrlr/newdatatype.cxx
@@ -67,6 +67,17 @@ namespace pcr
OnNameModified( NULL );
}
+ NewDataTypeDialog::~NewDataTypeDialog()
+ {
+ dispose();
+ }
+
+ void NewDataTypeDialog::dispose()
+ {
+ m_pName.clear();
+ m_pOK.clear();
+ ModalDialog::dispose();
+ }
IMPL_LINK( NewDataTypeDialog, OnNameModified, void*, /*_pNotInterestedIn*/ )
{
diff --git a/extensions/source/propctrlr/newdatatype.hxx b/extensions/source/propctrlr/newdatatype.hxx
index 135514aaa271..abccb19bd1f9 100644
--- a/extensions/source/propctrlr/newdatatype.hxx
+++ b/extensions/source/propctrlr/newdatatype.hxx
@@ -35,14 +35,16 @@ namespace pcr
class NewDataTypeDialog : public ModalDialog
{
private:
- Edit* m_pName;
- OKButton* m_pOK;
+ VclPtr<Edit> m_pName;
+ VclPtr<OKButton> m_pOK;
::std::set< OUString > m_aProhibitedNames;
public:
NewDataTypeDialog(vcl::Window* _pParent, const OUString& _rNameBase,
const ::std::vector< OUString >& _rProhibitedNames );
+ virtual ~NewDataTypeDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetName() const { return m_pName->GetText(); }
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index 77b518878526..95786ad18e65 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -44,6 +44,7 @@
#include <comphelper/property.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/tabpage.hxx>
#include <osl/mutex.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/component_context.hxx>
diff --git a/extensions/source/propctrlr/propcontroller.hxx b/extensions/source/propctrlr/propcontroller.hxx
index af943de01f13..f204a86c8735 100644
--- a/extensions/source/propctrlr/propcontroller.hxx
+++ b/extensions/source/propctrlr/propcontroller.hxx
@@ -105,7 +105,7 @@ namespace pcr
::cppu::OInterfaceContainerHelper m_aDisposeListeners;
::cppu::OInterfaceContainerHelper m_aControlObservers;
// meta data about the properties
- OPropertyBrowserView* m_pView;
+ VclPtr<OPropertyBrowserView> m_pView;
OUString m_sPageSelection;
OUString m_sLastValidPageSelection;
@@ -242,7 +242,7 @@ namespace pcr
// stop the inspection
void stopInspection( bool _bCommitModified );
- bool haveView() const { return NULL != m_pView; }
+ bool haveView() const { return nullptr != m_pView; }
OPropertyEditor& getPropertyBox() { return m_pView->getPropertyBox(); }
// does the inspection of the objects as indicated by our model
diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx
index 45a59b2c7275..50057870ab84 100644
--- a/extensions/source/propctrlr/propertyeditor.cxx
+++ b/extensions/source/propctrlr/propertyeditor.cxx
@@ -96,11 +96,7 @@ namespace pcr
m_aPropertyPageIds.swap( aEmpty );
}
- while ( !m_aHiddenPages.empty() )
- {
- delete m_aHiddenPages.begin()->second.pPage;
- m_aHiddenPages.erase( m_aHiddenPages.begin() );
- }
+ m_aHiddenPages.clear();
}
diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx
index 72f36441dddb..a43ee8ded711 100644
--- a/extensions/source/propctrlr/propertyeditor.hxx
+++ b/extensions/source/propctrlr/propertyeditor.hxx
@@ -49,7 +49,7 @@ namespace pcr
struct HiddenPage
{
sal_uInt16 nPos;
- TabPage* pPage;
+ VclPtr<TabPage> pPage;
HiddenPage() : nPos( 0 ), pPage( NULL ) { }
HiddenPage( sal_uInt16 _nPos, TabPage* _pPage ) : nPos( _nPos ), pPage( _pPage ) { }
};
diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx
index a98910a55f39..fcc538e326ae 100644
--- a/extensions/source/propctrlr/selectlabeldialog.cxx
+++ b/extensions/source/propctrlr/selectlabeldialog.cxx
@@ -159,6 +159,9 @@ namespace pcr
delete static_cast<Reference< XPropertySet > *>(pData);
pLoop = m_pControlTree->Next(pLoop);
}
+ m_pMainDesc.clear();
+ m_pControlTree.clear();
+ m_pNoAssignment.clear();
ModalDialog::dispose();
}
diff --git a/extensions/source/propctrlr/selectlabeldialog.hxx b/extensions/source/propctrlr/selectlabeldialog.hxx
index 40073fde83a8..45144c646738 100644
--- a/extensions/source/propctrlr/selectlabeldialog.hxx
+++ b/extensions/source/propctrlr/selectlabeldialog.hxx
@@ -40,9 +40,9 @@ namespace pcr
:public ModalDialog
,public PcrClient
{
- FixedText *m_pMainDesc;
- SvTreeListBox *m_pControlTree;
- CheckBox *m_pNoAssignment;
+ VclPtr<FixedText> m_pMainDesc;
+ VclPtr<SvTreeListBox> m_pControlTree;
+ VclPtr<CheckBox> m_pNoAssignment;
ImageList m_aModelImages;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xControlModel;
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index c4b452c46cd0..f78da9b8f6c6 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -1041,7 +1041,7 @@ namespace pcr
{
SetCompoundControl( true );
- m_pImplEdit = VclPtr<MultiLineEdit>( new MultiLineEdit( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) ) );
+ m_pImplEdit = new MultiLineEdit( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) );
SetSubEdit( m_pImplEdit );
m_pImplEdit->Show();
@@ -1077,16 +1077,10 @@ namespace pcr
void DropDownEditControl::dispose()
{
- {
- boost::scoped_ptr<vcl::Window> aTemp(m_pFloatingEdit);
- m_pFloatingEdit = NULL;
- }
- SetSubEdit(VclPtr<Edit>());
- {
- boost::scoped_ptr<vcl::Window> aTemp(m_pDropdownButton);
- m_pDropdownButton = NULL;
- }
+ SetSubEdit(nullptr);
m_pImplEdit.disposeAndClear();
+ m_pFloatingEdit.clear();
+ m_pDropdownButton.clear();
DropDownEditControl_Base::dispose();
}
@@ -1095,7 +1089,7 @@ namespace pcr
{
::Size aOutSz = GetOutputSizePixel();
- if (m_pDropdownButton!=NULL)
+ if (m_pDropdownButton!=nullptr)
{
long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
nSBWidth = CalcZoom( nSBWidth );
diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx
index cf8c473ad8f5..9eb99354abda 100644
--- a/extensions/source/propctrlr/standardcontrol.hxx
+++ b/extensions/source/propctrlr/standardcontrol.hxx
@@ -374,9 +374,9 @@ namespace pcr
class DropDownEditControl : public DropDownEditControl_Base
{
private:
- OMultilineFloatingEdit* m_pFloatingEdit;
+ VclPtr<OMultilineFloatingEdit> m_pFloatingEdit;
VclPtr<MultiLineEdit> m_pImplEdit;
- PushButton* m_pDropdownButton;
+ VclPtr<PushButton> m_pDropdownButton;
MultiLineOperationMode m_nOperationMode;
bool m_bDropdown : 1;
diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx
index 64b7e107900d..52ec5c8ad250 100644
--- a/extensions/source/propctrlr/taborder.cxx
+++ b/extensions/source/propctrlr/taborder.cxx
@@ -126,6 +126,11 @@ namespace pcr
m_pLB_Controls->Hide();
// delete pLB_Controls;
delete pImageList;
+ m_pLB_Controls.clear();
+ m_pPB_OK.clear();
+ m_pPB_MoveUp.clear();
+ m_pPB_MoveDown.clear();
+ m_pPB_AutoOrder.clear();
ModalDialog::dispose();
}
diff --git a/extensions/source/propctrlr/taborder.hxx b/extensions/source/propctrlr/taborder.hxx
index 3685b9cda2e0..f56d4b45bc01 100644
--- a/extensions/source/propctrlr/taborder.hxx
+++ b/extensions/source/propctrlr/taborder.hxx
@@ -73,13 +73,13 @@ namespace pcr
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
m_xORB;
- TabOrderListBox* m_pLB_Controls;
+ VclPtr<TabOrderListBox> m_pLB_Controls;
- OKButton* m_pPB_OK;
+ VclPtr<OKButton> m_pPB_OK;
- PushButton* m_pPB_MoveUp;
- PushButton* m_pPB_MoveDown;
- PushButton* m_pPB_AutoOrder;
+ VclPtr<PushButton> m_pPB_MoveUp;
+ VclPtr<PushButton> m_pPB_MoveDown;
+ VclPtr<PushButton> m_pPB_AutoOrder;
ImageList* pImageList;
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx
index faa33e9f0dae..e99ffb542459 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -213,6 +213,20 @@ GridDialog::GridDialog(double* pXValues, double* pYValues, int nValues, vcl::Win
m_pResetButton->SetClickHdl( LINK( this, GridDialog, ClickButtonHdl ) );
}
+GridDialog::~GridDialog()
+{
+ dispose();
+}
+
+void GridDialog::dispose()
+{
+ m_pOKButton.clear();
+ m_pResetTypeBox.clear();
+ m_pResetButton.clear();
+ m_pGridWindow.clear();
+ ModalDialog::dispose();
+}
+
GridWindow::~GridWindow()
{
dispose();
diff --git a/extensions/source/scanner/grid.hxx b/extensions/source/scanner/grid.hxx
index 6fca647facd5..940dec60097e 100644
--- a/extensions/source/scanner/grid.hxx
+++ b/extensions/source/scanner/grid.hxx
@@ -37,19 +37,20 @@ enum resetType
class GridDialog : public ModalDialog
{
- OKButton* m_pOKButton;
+ VclPtr<OKButton> m_pOKButton;
- ListBox* m_pResetTypeBox;
- PushButton* m_pResetButton;
+ VclPtr<ListBox> m_pResetTypeBox;
+ VclPtr<PushButton> m_pResetButton;
- GridWindow* m_pGridWindow;
+ VclPtr<GridWindow> m_pGridWindow;
DECL_LINK( ClickButtonHdl, Button* );
public:
GridDialog(double* pXValues, double* pYValues, int nValues,
vcl::Window* pParent, bool bCutValues = true);
-
+ virtual ~GridDialog();
+ virtual void dispose() SAL_OVERRIDE;
void setBoundings(double fMinX, double fMinY, double fMaxX, double fMaxY);
double* getNewYValues();
};
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 8c84962cf957..6f977ef7cce0 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -43,7 +43,7 @@ private:
Rectangle maPreviewRect;
Point maTopLeft, maBottomRight;
Point maMinTopLeft, maMaxBottomRight;
- SaneDlg* mpParentDialog;
+ VclPtr<SaneDlg> mpParentDialog;
DragDirection meDragDirection;
bool mbDragEnable;
bool mbDragDrawn;
@@ -61,6 +61,12 @@ public:
, mbIsDragging(false)
{
}
+ virtual ~ScanPreview() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ mpParentDialog.clear();
+ vcl::Window::dispose();
+ }
void Init(SaneDlg *pParent)
{
mpParentDialog = pParent;
@@ -245,6 +251,30 @@ SaneDlg::~SaneDlg()
void SaneDlg::dispose()
{
mrSane.SetReloadOptionsHdl( maOldLink );
+ mpOKButton.clear();
+ mpCancelButton.clear();
+ mpDeviceInfoButton.clear();
+ mpPreviewButton.clear();
+ mpScanButton.clear();
+ mpButtonOption.clear();
+ mpOptionTitle.clear();
+ mpOptionDescTxt.clear();
+ mpVectorTxt.clear();
+ mpLeftField.clear();
+ mpTopField.clear();
+ mpRightField.clear();
+ mpBottomField.clear();
+ mpDeviceBox.clear();
+ mpReslBox.clear();
+ mpAdvancedBox.clear();
+ mpVectorBox.clear();
+ mpQuantumRangeBox.clear();
+ mpStringRangeBox.clear();
+ mpBoolCheckBox.clear();
+ mpStringEdit.clear();
+ mpNumericEdit.clear();
+ mpOptionBox.clear();
+ mpPreview.clear();
ModalDialog::dispose();
}
diff --git a/extensions/source/scanner/sanedlg.hxx b/extensions/source/scanner/sanedlg.hxx
index ac7d664082be..6aca2733c3a7 100644
--- a/extensions/source/scanner/sanedlg.hxx
+++ b/extensions/source/scanner/sanedlg.hxx
@@ -40,38 +40,38 @@ private:
Link maOldLink;
- OKButton* mpOKButton;
- CancelButton* mpCancelButton;
- PushButton* mpDeviceInfoButton;
- PushButton* mpPreviewButton;
- PushButton* mpScanButton;
- PushButton* mpButtonOption;
+ VclPtr<OKButton> mpOKButton;
+ VclPtr<CancelButton> mpCancelButton;
+ VclPtr<PushButton> mpDeviceInfoButton;
+ VclPtr<PushButton> mpPreviewButton;
+ VclPtr<PushButton> mpScanButton;
+ VclPtr<PushButton> mpButtonOption;
- FixedText* mpOptionTitle;
- FixedText* mpOptionDescTxt;
- FixedText* mpVectorTxt;
+ VclPtr<FixedText> mpOptionTitle;
+ VclPtr<FixedText> mpOptionDescTxt;
+ VclPtr<FixedText> mpVectorTxt;
- MetricField* mpLeftField;
- MetricField* mpTopField;
- MetricField* mpRightField;
- MetricField* mpBottomField;
+ VclPtr<MetricField> mpLeftField;
+ VclPtr<MetricField> mpTopField;
+ VclPtr<MetricField> mpRightField;
+ VclPtr<MetricField> mpBottomField;
- ListBox* mpDeviceBox;
- NumericBox* mpReslBox;
- CheckBox* mpAdvancedBox;
+ VclPtr<ListBox> mpDeviceBox;
+ VclPtr<NumericBox> mpReslBox;
+ VclPtr<CheckBox> mpAdvancedBox;
- NumericField* mpVectorBox;
- ListBox* mpQuantumRangeBox;
- ListBox* mpStringRangeBox;
+ VclPtr<NumericField> mpVectorBox;
+ VclPtr<ListBox> mpQuantumRangeBox;
+ VclPtr<ListBox> mpStringRangeBox;
- CheckBox* mpBoolCheckBox;
+ VclPtr<CheckBox> mpBoolCheckBox;
- Edit* mpStringEdit;
- Edit* mpNumericEdit;
+ VclPtr<Edit> mpStringEdit;
+ VclPtr<Edit> mpNumericEdit;
- SvTreeListBox* mpOptionBox;
+ VclPtr<SvTreeListBox> mpOptionBox;
- ScanPreview* mpPreview;
+ VclPtr<ScanPreview> mpPreview;
int mnCurrentOption;
int mnCurrentElement;
diff --git a/filter/source/flash/impswfdialog.cxx b/filter/source/flash/impswfdialog.cxx
index fe6b7fe7c485..1a6a69849cb1 100644
--- a/filter/source/flash/impswfdialog.cxx
+++ b/filter/source/flash/impswfdialog.cxx
@@ -60,8 +60,21 @@ ImpSWFDialog::ImpSWFDialog( vcl::Window* pParent, Sequence< PropertyValue >& rFi
ImpSWFDialog::~ImpSWFDialog()
{
+ dispose();
}
+void ImpSWFDialog::dispose()
+{
+ mpNumFldQuality.clear();
+ mpCheckExportAll.clear();
+ mpCheckExportBackgrounds.clear();
+ mpCheckExportBackgroundObjects.clear();
+ mpCheckExportSlideContents.clear();
+ mpCheckExportSound.clear();
+ mpCheckExportOLEAsJPEG.clear();
+ mpCheckExportMultipleFiles.clear();
+ ModalDialog::dispose();
+}
Sequence< PropertyValue > ImpSWFDialog::GetFilterData()
diff --git a/filter/source/flash/impswfdialog.hxx b/filter/source/flash/impswfdialog.hxx
index cb128448112e..aae9ecf7f1c2 100644
--- a/filter/source/flash/impswfdialog.hxx
+++ b/filter/source/flash/impswfdialog.hxx
@@ -41,14 +41,14 @@ namespace vcl { class Window; }
class ImpSWFDialog : public ModalDialog
{
private:
- NumericField * mpNumFldQuality;
- CheckBox * mpCheckExportAll;
- CheckBox * mpCheckExportBackgrounds;
- CheckBox * mpCheckExportBackgroundObjects;
- CheckBox * mpCheckExportSlideContents;
- CheckBox * mpCheckExportSound;
- CheckBox * mpCheckExportOLEAsJPEG;
- CheckBox * mpCheckExportMultipleFiles;
+ VclPtr<NumericField> mpNumFldQuality;
+ VclPtr<CheckBox> mpCheckExportAll;
+ VclPtr<CheckBox> mpCheckExportBackgrounds;
+ VclPtr<CheckBox> mpCheckExportBackgroundObjects;
+ VclPtr<CheckBox> mpCheckExportSlideContents;
+ VclPtr<CheckBox> mpCheckExportSound;
+ VclPtr<CheckBox> mpCheckExportOLEAsJPEG;
+ VclPtr<CheckBox> mpCheckExportMultipleFiles;
FilterConfigItem maConfigItem;
@@ -58,6 +58,7 @@ public:
ImpSWFDialog( vcl::Window* pParent,
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rFilterData );
virtual ~ImpSWFDialog();
+ virtual void dispose() SAL_OVERRIDE;
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > GetFilterData();
};
diff --git a/filter/source/flash/swfdialog.cxx b/filter/source/flash/swfdialog.cxx
index 981731ae642e..0817f86bcbed 100644
--- a/filter/source/flash/swfdialog.cxx
+++ b/filter/source/flash/swfdialog.cxx
@@ -184,7 +184,7 @@ Dialog* SWFDialog::createDialog( vcl::Window* pParent )
void SWFDialog::executedDialog( sal_Int16 nExecutionResult )
{
if( nExecutionResult && m_pDialog )
- maFilterData = static_cast< ImpSWFDialog* >( m_pDialog )->GetFilterData();
+ maFilterData = static_cast< ImpSWFDialog* >( m_pDialog.get() )->GetFilterData();
destroyDialog();
}
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 073039dab505..6350aa81be63 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -552,10 +552,42 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage(vcl::Window* pParent, const SfxItemSe
ImpPDFTabGeneralPage::~ImpPDFTabGeneralPage()
{
+ dispose();
}
-
-void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent )
+void ImpPDFTabGeneralPage::dispose()
+{
+ mpRbAll.clear();
+ mpRbRange.clear();
+ mpRbSelection.clear();
+ mpEdPages.clear();
+ mpRbLosslessCompression.clear();
+ mpRbJPEGCompression.clear();
+ mpQualityFrame.clear();
+ mpNfQuality.clear();
+ mpCbReduceImageResolution.clear();
+ mpCoReduceImageResolution.clear();
+ mpCbPDFA1b.clear();
+ mpCbTaggedPDF.clear();
+ mpCbExportFormFields.clear();
+ mpFormsFrame.clear();
+ mpLbFormsFormat.clear();
+ mpCbAllowDuplicateFieldNames.clear();
+ mpCbExportBookmarks.clear();
+ mpCbExportHiddenSlides.clear();
+ mpCbExportNotes.clear();
+ mpCbViewPDF.clear();
+ mpCbExportNotesPages.clear();
+ mpCbExportEmptyPages.clear();
+ mpCbAddStream.clear();
+ mpCbWatermark.clear();
+ mpFtWatermark.clear();
+ mpEdWatermark.clear();
+ mpaParent.clear();
+ SfxTabPage::dispose();
+}
+
+void ImpPDFTabGeneralPage::SetFilterConfigItem( ImpPDFTabDialog* paParent )
{
mpaParent = paParent;
@@ -850,8 +882,28 @@ ImpPDFTabOpnFtrPage::ImpPDFTabOpnFtrPage(vcl::Window* pParent, const SfxItemSet&
ImpPDFTabOpnFtrPage::~ImpPDFTabOpnFtrPage()
{
+ dispose();
}
+void ImpPDFTabOpnFtrPage::dispose()
+{
+ mpRbOpnPageOnly.clear();
+ mpRbOpnOutline.clear();
+ mpRbOpnThumbs.clear();
+ mpNumInitialPage.clear();
+ mpRbMagnDefault.clear();
+ mpRbMagnFitWin.clear();
+ mpRbMagnFitWidth.clear();
+ mpRbMagnFitVisible.clear();
+ mpRbMagnZoom.clear();
+ mpNumZoom.clear();
+ mpRbPgLyDefault.clear();
+ mpRbPgLySinglePage.clear();
+ mpRbPgLyContinue.clear();
+ mpRbPgLyContinueFacing.clear();
+ mpCbPgLyFirstOnLeft.clear();
+ SfxTabPage::dispose();
+}
SfxTabPage* ImpPDFTabOpnFtrPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet)
@@ -1005,6 +1057,23 @@ ImpPDFTabViewerPage::ImpPDFTabViewerPage( vcl::Window* pParent,
ImpPDFTabViewerPage::~ImpPDFTabViewerPage()
{
+ dispose();
+}
+
+void ImpPDFTabViewerPage::dispose()
+{
+ m_pCbResWinInit.clear();
+ m_pCbCenterWindow.clear();
+ m_pCbOpenFullScreen.clear();
+ m_pCbDispDocTitle.clear();
+ m_pCbHideViewerMenubar.clear();
+ m_pCbHideViewerToolbar.clear();
+ m_pCbHideViewerWindowControls.clear();
+ m_pCbTransitionEffects.clear();
+ m_pRbAllBookmarkLevels.clear();
+ m_pRbVisibleBookmarkLevels.clear();
+ m_pNumBookmarkLevels.clear();
+ SfxTabPage::dispose();
}
IMPL_LINK( ImpPDFTabViewerPage, ToggleRbBookmarksHdl, void*, )
@@ -1102,8 +1171,33 @@ ImpPDFTabSecurityPage::ImpPDFTabSecurityPage(vcl::Window* i_pParent, const SfxIt
ImpPDFTabSecurityPage::~ImpPDFTabSecurityPage()
{
+ dispose();
}
+void ImpPDFTabSecurityPage::dispose()
+{
+ mpPbSetPwd.clear();
+ mpUserPwdSet.clear();
+ mpUserPwdUnset.clear();
+ mpUserPwdPdfa.clear();
+ mpOwnerPwdSet.clear();
+ mpOwnerPwdUnset.clear();
+ mpOwnerPwdPdfa.clear();
+ mpPrintPermissions.clear();
+ mpRbPrintNone.clear();
+ mpRbPrintLowRes.clear();
+ mpRbPrintHighRes.clear();
+ mpChangesAllowed.clear();
+ mpRbChangesNone.clear();
+ mpRbChangesInsDel.clear();
+ mpRbChangesFillForm.clear();
+ mpRbChangesComment.clear();
+ mpRbChangesAnyNoCopy.clear();
+ mpContent.clear();
+ mpCbEnableCopy.clear();
+ mpCbEnableAccessibility.clear();
+ SfxTabPage::dispose();
+}
SfxTabPage* ImpPDFTabSecurityPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet)
@@ -1323,8 +1417,19 @@ ImpPDFTabLinksPage::ImpPDFTabLinksPage( vcl::Window* pParent,
ImpPDFTabLinksPage::~ImpPDFTabLinksPage()
{
+ dispose();
}
+void ImpPDFTabLinksPage::dispose()
+{
+ m_pCbExprtBmkrToNmDst.clear();
+ m_pCbOOoToPDFTargets.clear();
+ m_pCbExportRelativeFsysLinks.clear();
+ m_pRbOpnLnksDefault.clear();
+ m_pRbOpnLnksLaunch.clear();
+ m_pRbOpnLnksBrowser.clear();
+ SfxTabPage::dispose();
+}
SfxTabPage* ImpPDFTabLinksPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet)
@@ -1525,6 +1630,8 @@ void ImplErrorDialog::dispose()
// free strings again
for( sal_uInt16 n = 0; n < m_pErrors->GetEntryCount(); n++ )
delete static_cast<OUString*>(m_pErrors->GetEntryData( n ));
+ m_pErrors.clear();
+ m_pExplanation.clear();
MessageDialog::dispose();
}
@@ -1560,6 +1667,19 @@ ImpPDFTabSigningPage::ImpPDFTabSigningPage(vcl::Window* pParent, const SfxItemSe
ImpPDFTabSigningPage::~ImpPDFTabSigningPage()
{
+ dispose();
+}
+
+void ImpPDFTabSigningPage::dispose()
+{
+ mpEdSignCert.clear();
+ mpPbSignCertSelect.clear();
+ mpPbSignCertClear.clear();
+ mpEdSignPassword.clear();
+ mpEdSignLocation.clear();
+ mpEdSignContactInfo.clear();
+ mpEdSignReason.clear();
+ SfxTabPage::dispose();
}
IMPL_LINK_NOARG( ImpPDFTabSigningPage, ClickmaPbSignCertSelect )
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index a913c9cca14f..b661eed6d389 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -56,8 +56,8 @@ public:
class ImplErrorDialog : public MessageDialog
{
- ListBox* m_pErrors;
- FixedText* m_pExplanation;
+ VclPtr<ListBox> m_pErrors;
+ VclPtr<FixedText> m_pExplanation;
DECL_LINK(SelectHdl, void *);
public:
@@ -191,45 +191,45 @@ class ImpPDFTabGeneralPage : public SfxTabPage
{
friend class ImpPDFTabLinksPage;
- RadioButton* mpRbAll;
- RadioButton* mpRbRange;
- RadioButton* mpRbSelection;
- Edit* mpEdPages;
+ VclPtr<RadioButton> mpRbAll;
+ VclPtr<RadioButton> mpRbRange;
+ VclPtr<RadioButton> mpRbSelection;
+ VclPtr<Edit> mpEdPages;
- RadioButton* mpRbLosslessCompression;
- RadioButton* mpRbJPEGCompression;
- VclContainer* mpQualityFrame;
- MetricField* mpNfQuality;
- CheckBox* mpCbReduceImageResolution;
- ComboBox* mpCoReduceImageResolution;
+ VclPtr<RadioButton> mpRbLosslessCompression;
+ VclPtr<RadioButton> mpRbJPEGCompression;
+ VclPtr<VclContainer> mpQualityFrame;
+ VclPtr<MetricField> mpNfQuality;
+ VclPtr<CheckBox> mpCbReduceImageResolution;
+ VclPtr<ComboBox> mpCoReduceImageResolution;
- CheckBox* mpCbPDFA1b;
- CheckBox* mpCbTaggedPDF;
+ VclPtr<CheckBox> mpCbPDFA1b;
+ VclPtr<CheckBox> mpCbTaggedPDF;
bool mbTaggedPDFUserSelection;
- CheckBox* mpCbExportFormFields;
+ VclPtr<CheckBox> mpCbExportFormFields;
bool mbExportFormFieldsUserSelection;
- VclContainer* mpFormsFrame;
- ListBox* mpLbFormsFormat;
- CheckBox* mpCbAllowDuplicateFieldNames;
+ VclPtr<VclContainer> mpFormsFrame;
+ VclPtr<ListBox> mpLbFormsFormat;
+ VclPtr<CheckBox> mpCbAllowDuplicateFieldNames;
- CheckBox* mpCbExportBookmarks;
- CheckBox* mpCbExportHiddenSlides;
- CheckBox* mpCbExportNotes;
- CheckBox* mpCbViewPDF;
- CheckBox* mpCbExportNotesPages;
+ VclPtr<CheckBox> mpCbExportBookmarks;
+ VclPtr<CheckBox> mpCbExportHiddenSlides;
+ VclPtr<CheckBox> mpCbExportNotes;
+ VclPtr<CheckBox> mpCbViewPDF;
+ VclPtr<CheckBox> mpCbExportNotesPages;
- CheckBox* mpCbExportEmptyPages;
- CheckBox* mpCbAddStream;
+ VclPtr<CheckBox> mpCbExportEmptyPages;
+ VclPtr<CheckBox> mpCbAddStream;
- CheckBox* mpCbWatermark;
- FixedText* mpFtWatermark;
- Edit* mpEdWatermark;
+ VclPtr<CheckBox> mpCbWatermark;
+ VclPtr<FixedText> mpFtWatermark;
+ VclPtr<Edit> mpEdWatermark;
bool mbIsPresentation;
bool mbIsWriter;
- const ImpPDFTabDialog* mpaParent;
+ VclPtr<ImpPDFTabDialog> mpaParent;
DECL_LINK( TogglePagesHdl, void* );
DECL_LINK( ToggleCompressionHdl, void* );
@@ -243,36 +243,37 @@ public:
ImpPDFTabGeneralPage( vcl::Window* pParent,
const SfxItemSet& rSet );
-
virtual ~ImpPDFTabGeneralPage();
+ virtual void dispose() SAL_OVERRIDE;
+
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
void GetFilterConfigItem(ImpPDFTabDialog* paParent);
- void SetFilterConfigItem(const ImpPDFTabDialog* paParent);
+ void SetFilterConfigItem(ImpPDFTabDialog* paParent);
bool IsPdfaSelected() const { return mpCbPDFA1b->IsChecked(); }
};
//class tab page viewer
class ImpPDFTabOpnFtrPage : public SfxTabPage
{
- RadioButton* mpRbOpnPageOnly;
- RadioButton* mpRbOpnOutline;
- RadioButton* mpRbOpnThumbs;
- NumericField* mpNumInitialPage;
-
- RadioButton* mpRbMagnDefault;
- RadioButton* mpRbMagnFitWin;
- RadioButton* mpRbMagnFitWidth;
- RadioButton* mpRbMagnFitVisible;
- RadioButton* mpRbMagnZoom;
- NumericField* mpNumZoom;
-
- RadioButton* mpRbPgLyDefault;
- RadioButton* mpRbPgLySinglePage;
- RadioButton* mpRbPgLyContinue;
- RadioButton* mpRbPgLyContinueFacing;
- CheckBox* mpCbPgLyFirstOnLeft;
+ VclPtr<RadioButton> mpRbOpnPageOnly;
+ VclPtr<RadioButton> mpRbOpnOutline;
+ VclPtr<RadioButton> mpRbOpnThumbs;
+ VclPtr<NumericField> mpNumInitialPage;
+
+ VclPtr<RadioButton> mpRbMagnDefault;
+ VclPtr<RadioButton> mpRbMagnFitWin;
+ VclPtr<RadioButton> mpRbMagnFitWidth;
+ VclPtr<RadioButton> mpRbMagnFitVisible;
+ VclPtr<RadioButton> mpRbMagnZoom;
+ VclPtr<NumericField> mpNumZoom;
+
+ VclPtr<RadioButton> mpRbPgLyDefault;
+ VclPtr<RadioButton> mpRbPgLySinglePage;
+ VclPtr<RadioButton> mpRbPgLyContinue;
+ VclPtr<RadioButton> mpRbPgLyContinueFacing;
+ VclPtr<CheckBox> mpCbPgLyFirstOnLeft;
bool mbUseCTLFont;
@@ -284,6 +285,7 @@ public:
const SfxItemSet& rSet );
virtual ~ImpPDFTabOpnFtrPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet );
@@ -294,22 +296,22 @@ public:
//class tab page viewer
class ImpPDFTabViewerPage : public SfxTabPage
{
- CheckBox* m_pCbResWinInit;
- CheckBox* m_pCbCenterWindow;
- CheckBox* m_pCbOpenFullScreen;
- CheckBox* m_pCbDispDocTitle;
+ VclPtr<CheckBox> m_pCbResWinInit;
+ VclPtr<CheckBox> m_pCbCenterWindow;
+ VclPtr<CheckBox> m_pCbOpenFullScreen;
+ VclPtr<CheckBox> m_pCbDispDocTitle;
- CheckBox* m_pCbHideViewerMenubar;
- CheckBox* m_pCbHideViewerToolbar;
- CheckBox* m_pCbHideViewerWindowControls;
+ VclPtr<CheckBox> m_pCbHideViewerMenubar;
+ VclPtr<CheckBox> m_pCbHideViewerToolbar;
+ VclPtr<CheckBox> m_pCbHideViewerWindowControls;
- CheckBox* m_pCbTransitionEffects;
+ VclPtr<CheckBox> m_pCbTransitionEffects;
bool mbIsPresentation;
- RadioButton* m_pRbAllBookmarkLevels;
- RadioButton* m_pRbVisibleBookmarkLevels;
- NumericField* m_pNumBookmarkLevels;
+ VclPtr<RadioButton> m_pRbAllBookmarkLevels;
+ VclPtr<RadioButton> m_pRbVisibleBookmarkLevels;
+ VclPtr<NumericField> m_pNumBookmarkLevels;
DECL_LINK( ToggleRbBookmarksHdl, void* );
public:
@@ -317,6 +319,7 @@ public:
const SfxItemSet& rSet );
virtual ~ImpPDFTabViewerPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet );
@@ -327,32 +330,32 @@ public:
//class security tab page
class ImpPDFTabSecurityPage : public SfxTabPage
{
- PushButton* mpPbSetPwd;
+ VclPtr<PushButton> mpPbSetPwd;
OUString msStrSetPwd;
- VclContainer* mpUserPwdSet;
- VclContainer* mpUserPwdUnset;
- VclContainer* mpUserPwdPdfa;
+ VclPtr<VclContainer> mpUserPwdSet;
+ VclPtr<VclContainer> mpUserPwdUnset;
+ VclPtr<VclContainer> mpUserPwdPdfa;
- VclContainer* mpOwnerPwdSet;
- VclContainer* mpOwnerPwdUnset;
- VclContainer* mpOwnerPwdPdfa;
+ VclPtr<VclContainer> mpOwnerPwdSet;
+ VclPtr<VclContainer> mpOwnerPwdUnset;
+ VclPtr<VclContainer> mpOwnerPwdPdfa;
- VclContainer* mpPrintPermissions;
- RadioButton* mpRbPrintNone;
- RadioButton* mpRbPrintLowRes;
- RadioButton* mpRbPrintHighRes;
+ VclPtr<VclContainer> mpPrintPermissions;
+ VclPtr<RadioButton> mpRbPrintNone;
+ VclPtr<RadioButton> mpRbPrintLowRes;
+ VclPtr<RadioButton> mpRbPrintHighRes;
- VclContainer* mpChangesAllowed;
- RadioButton* mpRbChangesNone;
- RadioButton* mpRbChangesInsDel;
- RadioButton* mpRbChangesFillForm;
- RadioButton* mpRbChangesComment;
- RadioButton* mpRbChangesAnyNoCopy;
+ VclPtr<VclContainer> mpChangesAllowed;
+ VclPtr<RadioButton> mpRbChangesNone;
+ VclPtr<RadioButton> mpRbChangesInsDel;
+ VclPtr<RadioButton> mpRbChangesFillForm;
+ VclPtr<RadioButton> mpRbChangesComment;
+ VclPtr<RadioButton> mpRbChangesAnyNoCopy;
- VclContainer* mpContent;
- CheckBox* mpCbEnableCopy;
- CheckBox* mpCbEnableAccessibility;
+ VclPtr<VclContainer> mpContent;
+ VclPtr<CheckBox> mpCbEnableCopy;
+ VclPtr<CheckBox> mpCbEnableAccessibility;
OUString msUserPwdTitle;
@@ -372,6 +375,7 @@ public:
const SfxItemSet& rSet );
virtual ~ImpPDFTabSecurityPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet );
@@ -384,15 +388,15 @@ public:
//class to implement the relative link stuff
class ImpPDFTabLinksPage : public SfxTabPage
{
- CheckBox* m_pCbExprtBmkrToNmDst;
- CheckBox* m_pCbOOoToPDFTargets;
- CheckBox* m_pCbExportRelativeFsysLinks;
+ VclPtr<CheckBox> m_pCbExprtBmkrToNmDst;
+ VclPtr<CheckBox> m_pCbOOoToPDFTargets;
+ VclPtr<CheckBox> m_pCbExportRelativeFsysLinks;
- RadioButton* m_pRbOpnLnksDefault;
+ VclPtr<RadioButton> m_pRbOpnLnksDefault;
bool mbOpnLnksDefaultUserState;
- RadioButton* m_pRbOpnLnksLaunch;
+ VclPtr<RadioButton> m_pRbOpnLnksLaunch;
bool mbOpnLnksLaunchUserState;
- RadioButton* m_pRbOpnLnksBrowser;
+ VclPtr<RadioButton> m_pRbOpnLnksBrowser;
bool mbOpnLnksBrowserUserState;
DECL_LINK( ClickRbOpnLnksDefaultHdl, void* );
@@ -403,6 +407,7 @@ public:
const SfxItemSet& rSet );
virtual ~ImpPDFTabLinksPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet );
@@ -415,14 +420,14 @@ public:
//class to implement the digital signing
class ImpPDFTabSigningPage : public SfxTabPage
{
- Edit* mpEdSignCert;
- PushButton* mpPbSignCertSelect;
- PushButton* mpPbSignCertClear;
- Edit* mpEdSignPassword;
- Edit* mpEdSignLocation;
- Edit* mpEdSignContactInfo;
- Edit* mpEdSignReason;
- ListBox* mpLBSignTSA;
+ VclPtr<Edit> mpEdSignCert;
+ VclPtr<PushButton> mpPbSignCertSelect;
+ VclPtr<PushButton> mpPbSignCertClear;
+ VclPtr<Edit> mpEdSignPassword;
+ VclPtr<Edit> mpEdSignLocation;
+ VclPtr<Edit> mpEdSignContactInfo;
+ VclPtr<Edit> mpEdSignReason;
+ VclPtr<ListBox> mpLBSignTSA;
com::sun::star::uno::Reference< com::sun::star::security::XCertificate > maSignCertificate;
DECL_LINK( ClickmaPbSignCertSelect, void* );
@@ -434,6 +439,7 @@ public:
const SfxItemSet& rSet );
virtual ~ImpPDFTabSigningPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet );
diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx
index 9db0eb60f8a7..0c5c9b4b9d0d 100644
--- a/filter/source/pdf/pdfdialog.cxx
+++ b/filter/source/pdf/pdfdialog.cxx
@@ -125,7 +125,7 @@ Dialog* PDFDialog::createDialog( vcl::Window* pParent )
void PDFDialog::executedDialog( sal_Int16 nExecutionResult )
{
if( nExecutionResult && m_pDialog )
- maFilterData = static_cast< ImpPDFTabDialog* >( m_pDialog )->GetFilterData();
+ maFilterData = static_cast< ImpPDFTabDialog* >( m_pDialog.get() )->GetFilterData();
destroyDialog();
}
diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx
index 3e1349bf54f2..9605032b0981 100644
--- a/filter/source/pdf/pdffilter.cxx
+++ b/filter/source/pdf/pdffilter.cxx
@@ -131,8 +131,8 @@ bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
class FocusWindowWaitCursor
{
- vcl::Window* m_pFocusWindow;
- public:
+ VclPtr<vcl::Window> m_pFocusWindow;
+public:
FocusWindowWaitCursor() :
m_pFocusWindow( Application::GetFocusWindow() )
{
diff --git a/filter/source/svg/svgdialog.cxx b/filter/source/svg/svgdialog.cxx
index fe58a3a7652a..0420570004f2 100644
--- a/filter/source/svg/svgdialog.cxx
+++ b/filter/source/svg/svgdialog.cxx
@@ -155,7 +155,7 @@ Dialog* SVGDialog::createDialog( vcl::Window* pParent )
void SVGDialog::executedDialog( sal_Int16 nExecutionResult )
{
if( nExecutionResult && m_pDialog )
- maFilterData = static_cast< ImpSVGDialog* >( m_pDialog )->GetFilterData();
+ maFilterData = static_cast< ImpSVGDialog* >( m_pDialog.get() )->GetFilterData();
destroyDialog();
}
diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
index fd570b7ef2c5..11e6f7171597 100644
--- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
+++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
@@ -107,7 +107,7 @@ private:
com::sun::star::uno::Reference<com::sun::star::awt::XWindow> mxParent; /// parent window
com::sun::star::uno::Reference< XComponentContext > mxContext;
- XMLFilterSettingsDialog* mpDialog;
+ VclPtr<XMLFilterSettingsDialog> mpDialog;
};
@@ -266,11 +266,7 @@ void SAL_CALL XMLFilterDialogComponent::disposing()
{
::SolarMutexGuard aGuard;
- if( mpDialog )
- {
- delete mpDialog;
- mpDialog = NULL;
- }
+ mpDialog.clear();
if (pXSLTResMgr)
{
@@ -328,7 +324,7 @@ sal_Int16 SAL_CALL XMLFilterDialogComponent::execute( ) throw(RuntimeException,
pXSLTResMgr = ResMgr::CreateResMgr( "xsltdlg", Application::GetSettings().GetUILanguageTag() );
}
- if( NULL == mpDialog )
+ if( nullptr == mpDialog )
{
vcl::Window* pParent = DIALOG_NO_PARENT;
if (mxParent.is())
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 9186fc888e04..5e88100b2823 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -103,7 +103,24 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog(vcl::Window* pParent,
}
}
+XMLFilterSettingsDialog::~XMLFilterSettingsDialog()
+{
+ dispose();
+}
+void XMLFilterSettingsDialog::dispose()
+{
+ m_pFilterListBox.clear();
+ m_pCtrlFilterList.clear();
+ m_pPBNew.clear();
+ m_pPBEdit.clear();
+ m_pPBTest.clear();
+ m_pPBDelete.clear();
+ m_pPBSave.clear();
+ m_pPBOpen.clear();
+ m_pPBClose.clear();
+ ModelessDialog::dispose();
+}
IMPL_LINK(XMLFilterSettingsDialog, ClickHdl_Impl, PushButton *, pButton )
{
@@ -1404,8 +1421,9 @@ SvxPathControl::~SvxPathControl()
void SvxPathControl::dispose()
{
- delete m_pFocusCtrl;
- delete m_pHeaderBar;
+ m_pVBox.clear();
+ m_pFocusCtrl.clear();
+ m_pHeaderBar.clear();
vcl::Window::dispose();
}
@@ -1452,7 +1470,16 @@ XMLFilterListBox::XMLFilterListBox(Window* pParent, SvxPathControl* pPathControl
m_pHeaderBar->Show();
}
+XMLFilterListBox::~XMLFilterListBox()
+{
+ dispose();
+}
+void XMLFilterListBox::dispose()
+{
+ m_pHeaderBar.clear();
+ SvTabListBox::dispose();
+}
void XMLFilterListBox::Paint( const Rectangle& rRect )
{
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
index beadad3609b8..df26aaf95685 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
@@ -39,9 +39,9 @@ class SvxPathControl : public vcl::Window
{
private:
bool bHasBeenShown;
- VclVBox* m_pVBox;
- HeaderBar* m_pHeaderBar;
- XMLFilterListBox* m_pFocusCtrl;
+ VclPtr<VclVBox> m_pVBox;
+ VclPtr<HeaderBar> m_pHeaderBar;
+ VclPtr<XMLFilterListBox> m_pFocusCtrl;
protected:
virtual void Resize() SAL_OVERRIDE;
virtual Size GetOptimalSize() const SAL_OVERRIDE;
@@ -60,7 +60,7 @@ class HeaderBar;
class XMLFilterListBox : public SvTabListBox
{
private:
- HeaderBar* m_pHeaderBar;
+ VclPtr<HeaderBar> m_pHeaderBar;
DECL_LINK( TabBoxScrollHdl_Impl, SvTabListBox* );
DECL_LINK( HeaderEndDrag_Impl, HeaderBar* );
@@ -69,6 +69,8 @@ private:
public:
XMLFilterListBox(Window* pParent, SvxPathControl* pPathControl);
+ virtual ~XMLFilterListBox();
+ virtual void dispose() SAL_OVERRIDE;
/** adds a new filter info entry to the ui filter list */
void addFilterEntry( const filter_info_impl* pInfo );
@@ -85,6 +87,8 @@ class XMLFilterSettingsDialog : public ModelessDialog
public:
XMLFilterSettingsDialog(vcl::Window* pParent,
const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext);
+ virtual ~XMLFilterSettingsDialog();
+ virtual void dispose() SAL_OVERRIDE;
DECL_LINK(ClickHdl_Impl, PushButton * );
DECL_LINK(SelectionChangedHdl_Impl, void * );
@@ -125,15 +129,15 @@ private:
std::vector< filter_info_impl* > maFilterVector;
- XMLFilterListBox* m_pFilterListBox;
- SvxPathControl* m_pCtrlFilterList;
- PushButton* m_pPBNew;
- PushButton* m_pPBEdit;
- PushButton* m_pPBTest;
- PushButton* m_pPBDelete;
- PushButton* m_pPBSave;
- PushButton* m_pPBOpen;
- CloseButton* m_pPBClose;
+ VclPtr<XMLFilterListBox> m_pFilterListBox;
+ VclPtr<SvxPathControl> m_pCtrlFilterList;
+ VclPtr<PushButton> m_pPBNew;
+ VclPtr<PushButton> m_pPBEdit;
+ VclPtr<PushButton> m_pPBTest;
+ VclPtr<PushButton> m_pPBDelete;
+ VclPtr<PushButton> m_pPBSave;
+ VclPtr<PushButton> m_pPBOpen;
+ VclPtr<CloseButton> m_pPBClose;
bool m_bIsClosable;
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index 3c286b649c12..ea5a5022a738 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -80,9 +80,11 @@ XMLFilterTabDialog::~XMLFilterTabDialog()
void XMLFilterTabDialog::dispose()
{
- delete mpBasicPage;
- delete mpXSLTPage;
+ mpBasicPage.clear();
+ mpXSLTPage.clear();
delete mpNewInfo;
+ m_pTabCtrl.clear();
+ m_pOKBtn.clear();
TabDialog::dispose();
}
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.hxx b/filter/source/xsltdialog/xmlfiltertabdialog.hxx
index c07610ed34c4..221b704bb050 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.hxx
@@ -54,14 +54,14 @@ private:
const filter_info_impl* mpOldInfo;
filter_info_impl* mpNewInfo;
- TabControl* m_pTabCtrl;
- OKButton* m_pOKBtn;
+ VclPtr<TabControl> m_pTabCtrl;
+ VclPtr<OKButton> m_pOKBtn;
sal_Int16 m_nBasicPageId;
sal_Int16 m_nXSLTPageId;
- XMLFilterTabPageBasic* mpBasicPage;
- XMLFilterTabPageXSLT* mpXSLTPage;
+ VclPtr<XMLFilterTabPageBasic> mpBasicPage;
+ VclPtr<XMLFilterTabPageXSLT> mpXSLTPage;
};
diff --git a/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx b/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx
index fb1d35ac2599..3b509e451ede 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx
@@ -44,7 +44,19 @@ XMLFilterTabPageBasic::XMLFilterTabPageBasic(vcl::Window* pParent)
XMLFilterTabPageBasic::~XMLFilterTabPageBasic()
{
+ dispose();
}
+
+void XMLFilterTabPageBasic::dispose()
+{
+ m_pEDFilterName.clear();
+ m_pCBApplication.clear();
+ m_pEDInterfaceName.clear();
+ m_pEDExtension.clear();
+ m_pEDDescription.clear();
+ TabPage::dispose();
+}
+
static OUString checkExtensions( const OUString& rExtensions )
{
const sal_Unicode* pSource = rExtensions.getStr();
diff --git a/filter/source/xsltdialog/xmlfiltertabpagebasic.hxx b/filter/source/xsltdialog/xmlfiltertabpagebasic.hxx
index 13d38d11e046..ac3876c868b8 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagebasic.hxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagebasic.hxx
@@ -34,6 +34,7 @@ class XMLFilterTabPageBasic : public TabPage
public:
XMLFilterTabPageBasic(vcl::Window* pParent);
virtual ~XMLFilterTabPageBasic();
+ virtual void dispose() SAL_OVERRIDE;
bool FillInfo( filter_info_impl* pInfo );
void SetInfo(const filter_info_impl* pInfo);
@@ -41,11 +42,11 @@ public:
static OUString decodeComment( const OUString& rComment );
static OUString encodeComment( const OUString& rComment );
- Edit* m_pEDFilterName;
- ComboBox* m_pCBApplication;
- Edit* m_pEDInterfaceName;
- Edit* m_pEDExtension;
- VclMultiLineEdit* m_pEDDescription;
+ VclPtr<Edit> m_pEDFilterName;
+ VclPtr<ComboBox> m_pCBApplication;
+ VclPtr<Edit> m_pEDInterfaceName;
+ VclPtr<Edit> m_pEDExtension;
+ VclPtr<VclMultiLineEdit> m_pEDDescription;
};
#endif
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
index a9d1cae94360..e9d0de29f611 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
@@ -58,6 +58,20 @@ XMLFilterTabPageXSLT::XMLFilterTabPageXSLT( vcl::Window* pParent) :
XMLFilterTabPageXSLT::~XMLFilterTabPageXSLT()
{
+ dispose();
+}
+
+void XMLFilterTabPageXSLT::dispose()
+{
+ m_pEDDocType.clear();
+ m_pEDExportXSLT.clear();
+ m_pPBExprotXSLT.clear();
+ m_pEDImportXSLT.clear();
+ m_pPBImportXSLT.clear();
+ m_pEDImportTemplate.clear();
+ m_pPBImportTemplate.clear();
+ m_pCBNeedsXSLT2.clear();
+ TabPage::dispose();
}
bool XMLFilterTabPageXSLT::FillInfo( filter_info_impl* pInfo )
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
index 01f36d518a7e..09c110fdb504 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
@@ -35,6 +35,7 @@ class XMLFilterTabPageXSLT : public TabPage
public:
XMLFilterTabPageXSLT( vcl::Window* pParent);
virtual ~XMLFilterTabPageXSLT();
+ virtual void dispose() SAL_OVERRIDE;
bool FillInfo( filter_info_impl* pInfo );
void SetInfo(const filter_info_impl* pInfo);
@@ -42,18 +43,18 @@ public:
DECL_LINK( ClickBrowseHdl_Impl, PushButton * );
- Edit* m_pEDDocType;
+ VclPtr<Edit> m_pEDDocType;
- SvtURLBox* m_pEDExportXSLT;
- PushButton* m_pPBExprotXSLT;
+ VclPtr<SvtURLBox> m_pEDExportXSLT;
+ VclPtr<PushButton> m_pPBExprotXSLT;
- SvtURLBox* m_pEDImportXSLT;
- PushButton* m_pPBImportXSLT;
+ VclPtr<SvtURLBox> m_pEDImportXSLT;
+ VclPtr<PushButton> m_pPBImportXSLT;
- SvtURLBox* m_pEDImportTemplate;
- PushButton* m_pPBImportTemplate;
+ VclPtr<SvtURLBox> m_pEDImportTemplate;
+ VclPtr<PushButton> m_pPBImportTemplate;
- CheckBox* m_pCBNeedsXSLT2;
+ VclPtr<CheckBox> m_pCBNeedsXSLT2;
private:
void SetURL( SvtURLBox *rURLBox, const OUString& rURL );
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 5db2fac635f7..364a04881bb3 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -79,7 +79,7 @@ public:
// lang::XEventListener
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw (RuntimeException, std::exception) SAL_OVERRIDE;
private:
- XMLFilterTestDialog* mpDialog;
+ VclPtr<XMLFilterTestDialog> mpDialog;
};
GlobalEventListenerImpl::GlobalEventListenerImpl( XMLFilterTestDialog* pDialog )
@@ -194,6 +194,20 @@ void XMLFilterTestDialog::dispose()
}
delete m_pFilterInfo;
+ m_pExport.clear();
+ m_pFTExportXSLTFile.clear();
+ m_pPBExportBrowse.clear();
+ m_pPBCurrentDocument.clear();
+ m_pFTNameOfCurrentFile.clear();
+ m_pImport.clear();
+ m_pFTImportXSLTFile.clear();
+ m_pFTImportTemplate.clear();
+ m_pFTImportTemplateFile.clear();
+ m_pCBXDisplaySource.clear();
+ m_pPBImportBrowse.clear();
+ m_pPBRecentFile.clear();
+ m_pFTNameOfRecentFile.clear();
+ m_pPBClose.clear();
ModalDialog::dispose();
}
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.hxx b/filter/source/xsltdialog/xmlfiltertestdialog.hxx
index 776d7bc792f5..3d69341fec30 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.hxx
@@ -66,21 +66,21 @@ private:
OUString m_sImportRecentFile;
OUString m_sExportRecentFile;
- VclContainer* m_pExport;
- FixedText* m_pFTExportXSLTFile;
- PushButton* m_pPBExportBrowse;
- PushButton* m_pPBCurrentDocument;
- FixedText* m_pFTNameOfCurrentFile;
-
- VclContainer* m_pImport;
- FixedText* m_pFTImportXSLTFile;
- FixedText* m_pFTImportTemplate;
- FixedText* m_pFTImportTemplateFile;
- CheckBox* m_pCBXDisplaySource;
- PushButton* m_pPBImportBrowse;
- PushButton* m_pPBRecentFile;
- FixedText* m_pFTNameOfRecentFile;
- CloseButton* m_pPBClose;
+ VclPtr<VclContainer> m_pExport;
+ VclPtr<FixedText> m_pFTExportXSLTFile;
+ VclPtr<PushButton> m_pPBExportBrowse;
+ VclPtr<PushButton> m_pPBCurrentDocument;
+ VclPtr<FixedText> m_pFTNameOfCurrentFile;
+
+ VclPtr<VclContainer> m_pImport;
+ VclPtr<FixedText> m_pFTImportXSLTFile;
+ VclPtr<FixedText> m_pFTImportTemplate;
+ VclPtr<FixedText> m_pFTImportTemplateFile;
+ VclPtr<CheckBox> m_pCBXDisplaySource;
+ VclPtr<PushButton> m_pPBImportBrowse;
+ VclPtr<PushButton> m_pPBRecentFile;
+ VclPtr<FixedText> m_pFTNameOfRecentFile;
+ VclPtr<CloseButton> m_pPBClose;
filter_info_impl* m_pFilterInfo;
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index 1d1efb297cea..ef2ccb5f38e1 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -91,10 +91,10 @@ namespace frm
m_pEngine->RemoveView( m_pView );
m_pEngine->revokeEngineStatusListener( this );
delete m_pView;
- delete m_pViewport;
- delete m_pHScroll;
- delete m_pVScroll;
- delete m_pScrollCorner;
+ m_pViewport.clear();
+ m_pHScroll.clear();
+ m_pVScroll.clear();
+ m_pScrollCorner.clear();
}
@@ -344,8 +344,7 @@ namespace frm
// create or delete the scrollbars, as necessary
if ( !bNeedVScroll )
{
- delete m_pVScroll;
- m_pVScroll = NULL;
+ m_pVScroll.clear();
}
else
{
@@ -356,8 +355,7 @@ namespace frm
if ( !bNeedHScroll )
{
- delete m_pHScroll;
- m_pHScroll = NULL;
+ m_pHScroll.clear();
}
else
{
@@ -368,14 +366,13 @@ namespace frm
if ( m_pHScroll && m_pVScroll )
{
- delete m_pScrollCorner;
+ m_pScrollCorner.clear();
m_pScrollCorner = new ScrollBarBox( m_pAntiImpl );
m_pScrollCorner->Show();
}
else
{
- delete m_pScrollCorner;
- m_pScrollCorner = NULL;
+ m_pScrollCorner.clear();
}
layoutWindow();
diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx
index 5c6c448879b3..acd8c484a08e 100644
--- a/forms/source/richtext/richtextimplcontrol.hxx
+++ b/forms/source/richtext/richtextimplcontrol.hxx
@@ -52,11 +52,11 @@ namespace frm
ESelection m_aLastKnownSelection;
- Control* m_pAntiImpl;
- RichTextViewPort* m_pViewport;
- ScrollBar* m_pHScroll;
- ScrollBar* m_pVScroll;
- ScrollBarBox* m_pScrollCorner;
+ VclPtr<Control> m_pAntiImpl;
+ VclPtr<RichTextViewPort> m_pViewport;
+ VclPtr<ScrollBar> m_pHScroll;
+ VclPtr<ScrollBar> m_pVScroll;
+ VclPtr<ScrollBarBox> m_pScrollCorner;
RichTextEngine* m_pEngine;
EditView* m_pView;
ITextAttributeListener* m_pTextAttrListener;
@@ -166,8 +166,8 @@ namespace frm
/// ensures that our "automatic line break" setting matches the current WinBits of the window
void ensureLineBreakSetting();
- inline bool hasVScrollBar( ) const { return m_pVScroll != NULL; }
- inline bool hasHScrollBar( ) const { return m_pHScroll != NULL; }
+ inline bool hasVScrollBar( ) const { return m_pVScroll != nullptr; }
+ inline bool hasHScrollBar( ) const { return m_pHScroll != nullptr; }
// IEngineStatusListener overridables
virtual void EditEngineStatusChanged( const EditStatus& _rStatus ) SAL_OVERRIDE;
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index b7da15239386..41405bbbe5fb 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -152,14 +152,8 @@ namespace frm
void NavigationToolBar::dispose()
{
- for ( ::std::vector< vcl::Window* >::iterator loopChildWins = m_aChildWins.begin();
- loopChildWins != m_aChildWins.end();
- ++loopChildWins
- )
- {
- delete *loopChildWins;
- }
- delete m_pToolbar;
+ m_aChildWins.clear();
+ m_pToolbar.clear();
vcl::Window::dispose();
}
diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx
index 91d8cb1987a1..e5c26272707e 100644
--- a/forms/source/solar/inc/navtoolbar.hxx
+++ b/forms/source/solar/inc/navtoolbar.hxx
@@ -60,8 +60,8 @@ namespace frm
const ::boost::shared_ptr< const ICommandDescriptionProvider >
m_pDescriptionProvider;
ImageSize m_eImageSize;
- ImplNavToolBar* m_pToolbar;
- ::std::vector< vcl::Window* > m_aChildWins;
+ VclPtr<ImplNavToolBar> m_pToolbar;
+ ::std::vector< VclPtr<vcl::Window> > m_aChildWins;
public:
NavigationToolBar(
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx
index 574c85366001..aba773361dcf 100644
--- a/formula/source/ui/dlg/ControlHelper.hxx
+++ b/formula/source/ui/dlg/ControlHelper.hxx
@@ -29,7 +29,7 @@ class EditBox : public Control
{
private:
- MultiLineEdit* pMEdit;
+ VclPtr<MultiLineEdit> pMEdit;
Link aSelChangedLink;
Selection aOldSel;
bool bMouseFlag;
@@ -65,6 +65,8 @@ class ArgEdit : public RefEdit
{
public:
ArgEdit( vcl::Window* pParent, WinBits nBits );
+ virtual ~ArgEdit();
+ virtual void dispose() SAL_OVERRIDE;
void Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
ScrollBar& rArgSlider, sal_uInt16 nArgCount );
@@ -73,9 +75,9 @@ protected:
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
private:
- ArgEdit* pEdPrev;
- ArgEdit* pEdNext;
- ScrollBar* pSlider;
+ VclPtr<ArgEdit> pEdPrev;
+ VclPtr<ArgEdit> pEdNext;
+ VclPtr<ScrollBar> pSlider;
sal_uInt16 nArgs;
};
@@ -94,10 +96,10 @@ private:
Link aEdFocusLink;
Link aEdModifyLink;
- FixedText* pFtArg;
- PushButton* pBtnFx;
- ArgEdit* pEdArg;
- RefButton* pRefBtn;
+ VclPtr<FixedText> pFtArg;
+ VclPtr<PushButton> pBtnFx;
+ VclPtr<ArgEdit> pEdArg;
+ VclPtr<RefButton> pRefBtn;
DECL_LINK( FxBtnClickHdl, ImageButton* );
DECL_LINK( RefBtnClickHdl,RefButton* );
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 15ca7bde9c9b..73afd345a1df 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -146,43 +146,43 @@ namespace formula
mutable const sheet::FormulaOpCodeMapEntry* m_pBinaryOpCodesEnd;
::std::map<FormulaToken*,sheet::FormulaToken> m_aTokenMap;
IFormulaEditorHelper* m_pHelper;
- Dialog* m_pParent;
+ VclPtr<Dialog> m_pParent;
IControlReferenceHandler* m_pDlg;
- TabControl *m_pTabCtrl;
- VclVBox *m_pParaWinBox;
- ParaWin* pParaWin;
- FixedText *m_pFtHeadLine;
- FixedText *m_pFtFuncName;
- FixedText *m_pFtFuncDesc;
+ VclPtr<TabControl> m_pTabCtrl;
+ VclPtr<VclVBox> m_pParaWinBox;
+ VclPtr<ParaWin> pParaWin;
+ VclPtr<FixedText> m_pFtHeadLine;
+ VclPtr<FixedText> m_pFtFuncName;
+ VclPtr<FixedText> m_pFtFuncDesc;
- FixedText *m_pFtEditName;
+ VclPtr<FixedText> m_pFtEditName;
- FixedText *m_pFtResult;
- Edit *m_pWndResult;
+ VclPtr<FixedText> m_pFtResult;
+ VclPtr<Edit> m_pWndResult;
- FixedText *m_pFtFormula;
- EditBox *m_pMEFormula;
+ VclPtr<FixedText> m_pFtFormula;
+ VclPtr<EditBox> m_pMEFormula;
- CheckBox *m_pBtnMatrix;
- CancelButton *m_pBtnCancel;
+ VclPtr<CheckBox> m_pBtnMatrix;
+ VclPtr<CancelButton> m_pBtnCancel;
- PushButton *m_pBtnBackward;
- PushButton *m_pBtnForward;
- OKButton *m_pBtnEnd;
+ VclPtr<PushButton> m_pBtnBackward;
+ VclPtr<PushButton> m_pBtnForward;
+ VclPtr<OKButton> m_pBtnEnd;
- RefEdit *m_pEdRef;
- RefButton *m_pRefBtn;
+ VclPtr<RefEdit> m_pEdRef;
+ VclPtr<RefButton> m_pRefBtn;
- FixedText *m_pFtFormResult;
- Edit *m_pWndFormResult;
+ VclPtr<FixedText> m_pFtFormResult;
+ VclPtr<Edit> m_pWndFormResult;
- RefEdit* pTheRefEdit;
- RefButton* pTheRefButton;
- FuncPage* pFuncPage;
- StructPage* pStructPage;
+ VclPtr<RefEdit> pTheRefEdit;
+ VclPtr<RefButton> pTheRefButton;
+ VclPtr<FuncPage> pFuncPage;
+ VclPtr<StructPage> pStructPage;
OUString aOldFormula;
bool bStructUpdate;
- MultiLineEdit* pMEdit;
+ VclPtr<MultiLineEdit> pMEdit;
bool bUserMatrixFlag;
Idle aIdle;
@@ -364,9 +364,9 @@ FormulaDlg_Impl::~FormulaDlg_Impl()
m_pTabCtrl->RemovePage(TP_FUNCTION);
m_pTabCtrl->RemovePage(TP_STRUCT);
- delete pStructPage;
- delete pFuncPage;
- delete pParaWin;
+ pStructPage.clear();
+ pFuncPage.clear();
+ pParaWin.clear();
DeleteArgs();
}
@@ -1426,7 +1426,7 @@ void FormulaDlg_Impl::UpdateSelection()
m_pRefBtn->Show( pButton != NULL );
::std::pair<RefButton*,RefEdit*> aPair;
- aPair.first = pButton ? m_pRefBtn : NULL;
+ aPair.first = pButton ? m_pRefBtn.get() : NULL;
aPair.second = m_pEdRef;
return aPair;
}
@@ -1473,7 +1473,7 @@ void FormulaDlg_Impl::RefInputDoneAfter( bool bForced )
}
RefEdit* FormulaDlg_Impl::GetCurrRefEdit()
{
- return m_pEdRef->IsVisible() ? m_pEdRef : pParaWin->GetActiveEdit();
+ return m_pEdRef->IsVisible() ? m_pEdRef.get() : pParaWin->GetActiveEdit();
}
void FormulaDlg_Impl::Update()
{
@@ -1612,7 +1612,7 @@ bool FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection)
OUString aStrEd;
Edit* pEd = GetCurrRefEdit();
- if(pEd!=NULL && pTheRefEdit==NULL)
+ if(pEd!=NULL && pTheRefEdit==nullptr)
{
_rSelection=pEd->GetSelection();
_rSelection.Justify();
@@ -1626,7 +1626,7 @@ bool FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection)
_rSelection.Justify();
aStrEd= m_pEdRef->GetText();
}
- return pTheRefEdit == NULL;
+ return pTheRefEdit == nullptr;
}
void FormulaDlg_Impl::SetEdSelection()
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index a977b174d543..123d5867194b 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -91,6 +91,18 @@ FuncPage::FuncPage(vcl::Window* pParent,const IFunctionManager* _pFunctionManage
m_pLbFunction->SetDoubleClickHdl( LINK( this, FuncPage, DblClkHdl ) );
}
+FuncPage::~FuncPage()
+{
+ dispose();
+}
+
+void FuncPage::dispose()
+{
+ m_pLbCategory.clear();
+ m_pLbFunction.clear();
+ TabPage::dispose();
+}
+
void FuncPage::impl_addFunctions(const IFunctionCategory* _pCategory)
{
const sal_uInt32 nCount = _pCategory->getCount();
diff --git a/formula/source/ui/dlg/funcpage.hxx b/formula/source/ui/dlg/funcpage.hxx
index 62d803dd8ed6..87a2799dcfac 100644
--- a/formula/source/ui/dlg/funcpage.hxx
+++ b/formula/source/ui/dlg/funcpage.hxx
@@ -64,8 +64,8 @@ private:
OModuleClient m_aModuleClient;
Link aDoubleClickLink;
Link aSelectionLink;
- ListBox *m_pLbCategory;
- FormulaListBox *m_pLbFunction;
+ VclPtr<ListBox> m_pLbCategory;
+ VclPtr<FormulaListBox> m_pLbFunction;
const IFunctionManager*
m_pFunctionManager;
@@ -86,6 +86,8 @@ protected:
public:
FuncPage( vcl::Window* pParent,const IFunctionManager* _pFunctionManager);
+ virtual ~FuncPage();
+ virtual void dispose() SAL_OVERRIDE;
void SetCategory(sal_Int32 nCat);
void SetFunction(sal_Int32 nFunc);
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index ff60bc9e0947..7093e0f6fcff 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -42,6 +42,19 @@ ArgEdit::ArgEdit( vcl::Window* pParent, WinBits nBits )
{
}
+ArgEdit::~ArgEdit()
+{
+ dispose();
+}
+
+void ArgEdit::dispose()
+{
+ pEdPrev.clear();
+ pEdNext.clear();
+ pSlider.clear();
+ RefEdit::dispose();
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeArgEdit(vcl::Window *pParent, VclBuilder::stringmap &)
{
return new ArgEdit(pParent, WB_BORDER);
@@ -149,17 +162,17 @@ void ArgInput::InitArgInput( FixedText* pftArg, PushButton* pbtnFx,
pEdArg =pedArg;
pRefBtn=prefBtn;
- if(pBtnFx!=NULL)
+ if(pBtnFx!=nullptr)
{
pBtnFx->SetClickHdl ( LINK( this, ArgInput, FxBtnClickHdl ) );
pBtnFx->SetGetFocusHdl( LINK( this, ArgInput, FxBtnFocusHdl ) );
}
- if(pRefBtn!=NULL)
+ if(pRefBtn!=nullptr)
{
pRefBtn->SetClickHdl ( LINK( this, ArgInput, RefBtnClickHdl ) );
pRefBtn->SetGetFocusHdl( LINK( this, ArgInput, RefBtnFocusHdl ) );
}
- if(pEdArg!=NULL)
+ if(pEdArg!=nullptr)
{
pEdArg->SetGetFocusHdl ( LINK( this, ArgInput, EdFocusHdl ) );
pEdArg->SetModifyHdl ( LINK( this, ArgInput, EdModifyHdl ) );
@@ -170,14 +183,14 @@ void ArgInput::InitArgInput( FixedText* pftArg, PushButton* pbtnFx,
// Sets the Name for the Argument
void ArgInput::SetArgName(const OUString &aArg)
{
- if(pFtArg !=NULL) pFtArg->SetText(aArg );
+ if(pFtArg !=nullptr) pFtArg->SetText(aArg );
}
// Returns the Name for the Argument
OUString ArgInput::GetArgName()
{
OUString aPrivArgName;
- if(pFtArg !=NULL)
+ if(pFtArg !=nullptr)
aPrivArgName=pFtArg->GetText();
return aPrivArgName;
@@ -186,19 +199,19 @@ OUString ArgInput::GetArgName()
//Sets the Name for the Argument
void ArgInput::SetArgNameFont (const vcl::Font &aFont)
{
- if(pFtArg !=NULL) pFtArg->SetFont(aFont);
+ if(pFtArg !=nullptr) pFtArg->SetFont(aFont);
}
//Sets up the Selection for the EditBox.
void ArgInput::SetArgSelection (const Selection& rSel )
{
- if(pEdArg !=NULL) pEdArg ->SetSelection(rSel );
+ if(pEdArg !=nullptr) pEdArg ->SetSelection(rSel );
}
//Sets the Value for the Argument
void ArgInput::SetArgVal(const OUString &rVal)
{
- if(pEdArg !=NULL)
+ if(pEdArg != nullptr)
{
pEdArg ->SetRefString(rVal);
}
@@ -208,7 +221,7 @@ void ArgInput::SetArgVal(const OUString &rVal)
OUString ArgInput::GetArgVal()
{
OUString aResult;
- if(pEdArg!=NULL)
+ if(pEdArg!=nullptr)
{
aResult=pEdArg->GetText();
}
@@ -366,10 +379,8 @@ EditBox::~EditBox()
void EditBox::dispose()
{
- MultiLineEdit* pTheEdit=pMEdit;
pMEdit->Disable();
- pMEdit=NULL;
- delete pTheEdit;
+ pMEdit.clear();
Control::dispose();
}
@@ -383,14 +394,14 @@ void EditBox::SelectionChanged()
void EditBox::Resize()
{
Size aSize=GetOutputSizePixel();
- if(pMEdit!=NULL) pMEdit->SetOutputSizePixel(aSize);
+ if(pMEdit!=nullptr) pMEdit->SetOutputSizePixel(aSize);
}
// When the Control is activated, the Selection is repealed
// and the Cursor set at the end.
void EditBox::GetFocus()
{
- if(pMEdit!=NULL)
+ if(pMEdit!=nullptr)
{
pMEdit->GrabFocus();
}
@@ -402,7 +413,7 @@ bool EditBox::PreNotify( NotifyEvent& rNEvt )
{
bool nResult = true;
- if(pMEdit==NULL) return nResult;
+ if(pMEdit==nullptr) return nResult;
MouseNotifyEvent nSwitch=rNEvt.GetType();
if(nSwitch==MouseNotifyEvent::KEYINPUT)// || nSwitch==MouseNotifyEvent::KEYUP)
@@ -437,7 +448,7 @@ bool EditBox::PreNotify( NotifyEvent& rNEvt )
//first called.
IMPL_LINK_NOARG(EditBox, ChangedHdl)
{
- if(pMEdit!=NULL)
+ if(pMEdit!=nullptr)
{
Selection aNewSel=pMEdit->GetSelection();
@@ -494,6 +505,7 @@ void RefEdit::dispose()
{
aIdle.SetIdleHdl( Link() );
aIdle.Stop();
+ pLabelWidget.clear();
Edit::dispose();
}
@@ -593,6 +605,17 @@ RefButton::RefButton( vcl::Window* _pParent, WinBits nStyle ) :
SetStartImage();
}
+RefButton::~RefButton()
+{
+ dispose();
+}
+
+void RefButton::dispose()
+{
+ pRefEdit.clear();
+ ImageButton::dispose();
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeRefButton(vcl::Window *pParent, VclBuilder::stringmap &)
{
return new RefButton(pParent, 0);
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index cff293aed30a..45f540b5ba9a 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -233,6 +233,26 @@ void ParaWin::dispose()
m_pBtnFx2->SetGetFocusHdl( aEmptyLink );
m_pBtnFx3->SetGetFocusHdl( aEmptyLink );
m_pBtnFx4->SetGetFocusHdl( aEmptyLink );
+ m_pFtEditDesc.clear();
+ m_pFtArgName.clear();
+ m_pFtArgDesc.clear();
+ m_pBtnFx1.clear();
+ m_pFtArg1.clear();
+ m_pEdArg1.clear();
+ m_pRefBtn1.clear();
+ m_pBtnFx2.clear();
+ m_pFtArg2.clear();
+ m_pEdArg2.clear();
+ m_pRefBtn2.clear();
+ m_pBtnFx3.clear();
+ m_pFtArg3.clear();
+ m_pEdArg3.clear();
+ m_pRefBtn3.clear();
+ m_pBtnFx4.clear();
+ m_pFtArg4.clear();
+ m_pEdArg4.clear();
+ m_pRefBtn4.clear();
+ m_pSlider.clear();
TabPage::dispose();
}
diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx
index c885d16440a6..6a83c4d59218 100644
--- a/formula/source/ui/dlg/parawin.hxx
+++ b/formula/source/ui/dlg/parawin.hxx
@@ -56,31 +56,31 @@ private:
vcl::Font aFntBold;
vcl::Font aFntLight;
- FixedText *m_pFtEditDesc;
- FixedText *m_pFtArgName;
- FixedText *m_pFtArgDesc;
-
- PushButton *m_pBtnFx1;
- FixedText *m_pFtArg1;
- ArgEdit *m_pEdArg1;
- RefButton *m_pRefBtn1;
-
- PushButton *m_pBtnFx2;
- FixedText *m_pFtArg2;
- ArgEdit *m_pEdArg2;
- RefButton *m_pRefBtn2;
-
- PushButton *m_pBtnFx3;
- FixedText *m_pFtArg3;
- ArgEdit *m_pEdArg3;
- RefButton *m_pRefBtn3;
-
- PushButton *m_pBtnFx4;
- FixedText *m_pFtArg4;
- ArgEdit *m_pEdArg4;
- RefButton *m_pRefBtn4;
-
- ScrollBar *m_pSlider;
+ VclPtr<FixedText> m_pFtEditDesc;
+ VclPtr<FixedText> m_pFtArgName;
+ VclPtr<FixedText> m_pFtArgDesc;
+
+ VclPtr<PushButton> m_pBtnFx1;
+ VclPtr<FixedText> m_pFtArg1;
+ VclPtr<ArgEdit> m_pEdArg1;
+ VclPtr<RefButton> m_pRefBtn1;
+
+ VclPtr<PushButton> m_pBtnFx2;
+ VclPtr<FixedText> m_pFtArg2;
+ VclPtr<ArgEdit> m_pEdArg2;
+ VclPtr<RefButton> m_pRefBtn2;
+
+ VclPtr<PushButton> m_pBtnFx3;
+ VclPtr<FixedText> m_pFtArg3;
+ VclPtr<ArgEdit> m_pEdArg3;
+ VclPtr<RefButton> m_pRefBtn3;
+
+ VclPtr<PushButton> m_pBtnFx4;
+ VclPtr<FixedText> m_pFtArg4;
+ VclPtr<ArgEdit> m_pEdArg4;
+ VclPtr<RefButton> m_pRefBtn4;
+
+ VclPtr<ScrollBar> m_pSlider;
OUString m_sOptional;
OUString m_sRequired;
bool bRefMode;
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index 4bcdc15e44b9..55d851f2e406 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -103,6 +103,17 @@ StructPage::StructPage(vcl::Window* pParent):
m_pTlbStruct->SetSelectHdl(LINK( this, StructPage, SelectHdl ) );
}
+StructPage::~StructPage()
+{
+ dispose();
+}
+
+void StructPage::dispose()
+{
+ m_pTlbStruct.clear();
+ TabPage::dispose();
+}
+
void StructPage::ClearStruct()
{
m_pTlbStruct->SetActiveFlag(false);
diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx
index bdd4fcd7d70d..d0a3b35066e9 100644
--- a/formula/source/ui/dlg/structpg.hxx
+++ b/formula/source/ui/dlg/structpg.hxx
@@ -73,7 +73,7 @@ private:
OModuleClient m_aModuleClient;
Link aSelLink;
- StructListBox *m_pTlbStruct;
+ VclPtr<StructListBox> m_pTlbStruct;
Image maImgEnd;
Image maImgError;
@@ -90,6 +90,8 @@ protected:
public:
StructPage( vcl::Window* pParent);
+ virtual ~StructPage();
+ virtual void dispose() SAL_OVERRIDE;
void ClearStruct();
virtual SvTreeListEntry* InsertEntry(const OUString& rText, SvTreeListEntry* pParent,
diff --git a/fpicker/source/office/OfficeControlAccess.hxx b/fpicker/source/office/OfficeControlAccess.hxx
index 3214ebe534b4..e1ff8050c23c 100644
--- a/fpicker/source/office/OfficeControlAccess.hxx
+++ b/fpicker/source/office/OfficeControlAccess.hxx
@@ -46,7 +46,7 @@ namespace svt
class OControlAccess
{
IFilePickerController* m_pFilePickerController;
- SvtFileView* m_pFileView;
+ VclPtr<SvtFileView> m_pFileView;
public:
OControlAccess( IFilePickerController* _pController, SvtFileView* _pFileView );
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index 23dfa0f185b1..eef7e27a6be8 100644
--- a/fpicker/source/office/PlacesListBox.cxx
+++ b/fpicker/source/office/PlacesListBox.cxx
@@ -48,8 +48,8 @@ PlacesListBox_Impl::~PlacesListBox_Impl( )
void PlacesListBox_Impl::dispose()
{
- delete mpHeaderBar;
- mpParent = NULL;
+ mpHeaderBar.clear();
+ mpParent.clear();
SvHeaderTabListBox::dispose();
}
@@ -93,12 +93,10 @@ PlacesListBox::~PlacesListBox( )
void PlacesListBox::dispose()
{
- delete mpImpl;
- mpImpl = NULL;
- delete mpAddBtn;
- mpAddBtn = NULL;
- delete mpDelBtn;
- mpDelBtn = NULL;
+ mpImpl.clear();
+ mpAddBtn.clear();
+ mpDelBtn.clear();
+ mpDlg.clear();
Control::dispose();
}
diff --git a/fpicker/source/office/PlacesListBox.hxx b/fpicker/source/office/PlacesListBox.hxx
index 9b2443649ebf..0cf700d6b142 100644
--- a/fpicker/source/office/PlacesListBox.hxx
+++ b/fpicker/source/office/PlacesListBox.hxx
@@ -23,8 +23,8 @@ class PlacesListBox;
class PlacesListBox_Impl : public SvHeaderTabListBox
{
private:
- HeaderBar* mpHeaderBar;
- PlacesListBox* mpParent;
+ VclPtr<HeaderBar> mpHeaderBar;
+ VclPtr<PlacesListBox> mpParent;
public:
PlacesListBox_Impl( PlacesListBox* pParent, const OUString& rTitle );
@@ -40,10 +40,10 @@ class PlacesListBox : public Control
{
private:
std::vector< PlacePtr > maPlaces;
- SvtFileDialog* mpDlg;
- PlacesListBox_Impl* mpImpl;
- PushButton* mpAddBtn;
- PushButton* mpDelBtn;
+ VclPtr<SvtFileDialog> mpDlg;
+ VclPtr<PlacesListBox_Impl> mpImpl;
+ VclPtr<PushButton> mpAddBtn;
+ VclPtr<PushButton> mpDelBtn;
sal_Int32 mnNbEditables;
bool mbUpdated;
bool mbSelectionChanged;
diff --git a/fpicker/source/office/QueryFolderName.hxx b/fpicker/source/office/QueryFolderName.hxx
index 49733bbb46a4..cf864aff88ef 100644
--- a/fpicker/source/office/QueryFolderName.hxx
+++ b/fpicker/source/office/QueryFolderName.hxx
@@ -28,9 +28,9 @@
class QueryFolderNameDialog : public ModalDialog
{
private:
- Edit* m_pNameEdit;
- VclFrame* m_pNameLine;
- OKButton* m_pOKBtn;
+ VclPtr<Edit> m_pNameEdit;
+ VclPtr<VclFrame> m_pNameLine;
+ VclPtr<OKButton> m_pOKBtn;
DECL_LINK( OKHdl, void * );
DECL_LINK( NameHdl, void * );
@@ -38,6 +38,8 @@ private:
public:
QueryFolderNameDialog(vcl::Window* _pParent, const OUString& rTitle,
const OUString& rDefaultText, OUString* pGroupName = NULL);
+ virtual ~QueryFolderNameDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetName() const { return m_pNameEdit->GetText(); }
};
diff --git a/fpicker/source/office/asyncfilepicker.hxx b/fpicker/source/office/asyncfilepicker.hxx
index a2dfa11c7076..2174eb50e6ca 100644
--- a/fpicker/source/office/asyncfilepicker.hxx
+++ b/fpicker/source/office/asyncfilepicker.hxx
@@ -25,6 +25,7 @@
#include <rtl/ustring.hxx>
#include <com/sun/star/uno/Sequence.h>
#include <salhelper/simplereferenceobject.hxx>
+#include <vcl/vclptr.hxx>
class SvtFileView;
class SvtFileDialog;
@@ -52,8 +53,8 @@ namespace svt
private:
Action m_eAction;
- SvtFileView* m_pView;
- SvtFileDialog* m_pDialog;
+ VclPtr<SvtFileView> m_pView;
+ VclPtr<SvtFileDialog> m_pDialog;
OUString m_sURL;
OUString m_sFileName;
bool m_bRunning;
diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx
index 84488d85a1c8..8243d5159223 100644
--- a/fpicker/source/office/commonpicker.cxx
+++ b/fpicker/source/office/commonpicker.cxx
@@ -123,8 +123,7 @@ namespace svt
m_pDlg->EndDialog( RET_CANCEL );
}
- delete m_pDlg;
- m_pDlg = NULL;
+ m_pDlg.clear();
m_xWindow = NULL;
m_xDialogParent = NULL;
}
@@ -149,10 +148,7 @@ namespace svt
{
stopWindowListening();
- if ( !bDialogDying ) // it's the parent which is dying -> delete the dialog
- delete m_pDlg;
-
- m_pDlg = NULL;
+ m_pDlg.clear();
m_xWindow = NULL;
m_xDialogParent = NULL;
}
@@ -240,7 +236,7 @@ namespace svt
}
}
- return NULL != m_pDlg;
+ return nullptr != m_pDlg;
}
diff --git a/fpicker/source/office/commonpicker.hxx b/fpicker/source/office/commonpicker.hxx
index a0cb97896b4c..52141c54598c 100644
--- a/fpicker/source/office/commonpicker.hxx
+++ b/fpicker/source/office/commonpicker.hxx
@@ -33,6 +33,7 @@
#include <comphelper/proparrhlp.hxx>
#include <comphelper/uno3.hxx>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
class SvtFileDialog;
namespace vcl { class Window; }
@@ -64,7 +65,7 @@ namespace svt
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xWindow;
// </properties>
- SvtFileDialog* m_pDlg;
+ VclPtr<SvtFileDialog> m_pDlg;
ImplSVEvent * m_nCancelEvent;
bool m_bExecuting;
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 2991262b781c..5d93cb1087d5 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -348,8 +348,8 @@ SvtFileDialog::SvtFileDialog ( vcl::Window* _pParent, WinBits nBits )
class CustomContainer : public vcl::Window
{
SvtExpFileDlg_Impl* _pImp;
- SvtFileView* _pFileView;
- Splitter* _pSplitter;
+ VclPtr<SvtFileView> _pFileView;
+ VclPtr<Splitter> _pSplitter;
public:
CustomContainer(vcl::Window *pParent)
@@ -359,6 +359,13 @@ public:
, _pSplitter(NULL)
{
}
+ virtual ~CustomContainer() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ _pFileView.clear();
+ _pSplitter.clear();
+ vcl::Window::dispose();
+ }
void init(SvtExpFileDlg_Impl* pImp,
SvtFileView* pFileView,
@@ -442,10 +449,16 @@ void SvtFileDialog::dispose()
}
delete _pImp;
- delete _pFileView;
- delete _pSplitter;
- delete _pContainer;
- delete _pPrevBmp;
+ _pFileView.clear();
+ _pSplitter.clear();
+ _pContainer.clear();
+ _pPrevBmp.clear();
+ _pCbReadOnly.clear();
+ _pCbLinkBox.clear();
+ _pCbPreviewBox.clear();
+ _pCbSelection.clear();
+ _pPbPlay.clear();
+ _pPrevWin.clear();
ModalDialog::dispose();
}
@@ -1631,7 +1644,7 @@ bool SvtFileDialog::Notify( NotifyEvent& rNEvt )
class SvtDefModalDialogParent_Impl
{
private:
- vcl::Window* _pOld;
+ VclPtr<vcl::Window> _pOld;
public:
SvtDefModalDialogParent_Impl( vcl::Window *pNew ) :
@@ -1818,7 +1831,7 @@ void SvtFileDialog::EnableUI( bool _bEnable )
if ( _bEnable )
{
- for ( ::std::set< Control* >::iterator aLoop = m_aDisabledControls.begin();
+ for ( auto aLoop = m_aDisabledControls.begin();
aLoop != m_aDisabledControls.end();
++aLoop
)
@@ -1841,7 +1854,7 @@ void SvtFileDialog::EnableControl( Control* _pControl, bool _bEnable )
if ( _bEnable )
{
- ::std::set< Control* >::iterator aPos = m_aDisabledControls.find( _pControl );
+ auto aPos = m_aDisabledControls.find( _pControl );
if ( m_aDisabledControls.end() != aPos )
m_aDisabledControls.erase( aPos );
}
@@ -2835,6 +2848,18 @@ QueryFolderNameDialog::QueryFolderNameDialog(vcl::Window* _pParent,
m_pNameLine->set_label( *pGroupName );
};
+QueryFolderNameDialog::~QueryFolderNameDialog()
+{
+ dispose();
+}
+
+void QueryFolderNameDialog::dispose()
+{
+ m_pNameEdit.clear();
+ m_pNameLine.clear();
+ m_pOKBtn.clear();
+ ModalDialog::dispose();
+}
IMPL_LINK_NOARG(QueryFolderNameDialog, OKHdl)
{
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index 4a9395778237..d25ce831110e 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -82,16 +82,16 @@ class CustomContainer;
class SvtFileDialog : public ModalDialog, public ::svt::IFilePickerController
{
private:
- CheckBox* _pCbReadOnly;
- CheckBox* _pCbLinkBox;
- CheckBox* _pCbPreviewBox;
- CheckBox* _pCbSelection;
- PushButton* _pPbPlay;
- vcl::Window* _pPrevWin;
- FixedBitmap* _pPrevBmp;
- CustomContainer* _pContainer;
- SvtFileView* _pFileView;
- Splitter* _pSplitter;
+ VclPtr<CheckBox> _pCbReadOnly;
+ VclPtr<CheckBox> _pCbLinkBox;
+ VclPtr<CheckBox> _pCbPreviewBox;
+ VclPtr<CheckBox> _pCbSelection;
+ VclPtr<PushButton> _pPbPlay;
+ VclPtr<vcl::Window> _pPrevWin;
+ VclPtr<FixedBitmap> _pPrevBmp;
+ VclPtr<CustomContainer> _pContainer;
+ VclPtr<SvtFileView> _pFileView;
+ VclPtr<Splitter> _pSplitter;
::svt::IFilePickerListener* _pFileNotifier;
SvtExpFileDlg_Impl* _pImp;
WinBits _nExtraBits;
@@ -100,7 +100,7 @@ private:
ImageList m_aImages;
::svt::SmartContent m_aContent;
- ::std::set< Control* > m_aDisabledControls;
+ ::std::set< VclPtr<Control> > m_aDisabledControls;
::utl::OConfigurationNode m_aConfiguration;
::rtl::Reference< ::svt::AsyncPickerAction >
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index f648d78a4c3d..c06d1bf693ff 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -112,6 +112,7 @@ SvtFileDialogURLSelector::~SvtFileDialogURLSelector()
void SvtFileDialogURLSelector::dispose()
{
delete m_pMenu;
+ m_pDlg.clear();
MenuButton::dispose();
}
@@ -250,10 +251,10 @@ SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits ) :
SvtExpFileDlg_Impl::~SvtExpFileDlg_Impl()
{
- delete _pBtnUp;
+ _pBtnUp.clear();
delete _pUserFilter;
delete _pFilter;
- delete _pPlaces;
+ _pPlaces.clear();
}
diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx
index d62479a65f51..04b986453a21 100644
--- a/fpicker/source/office/iodlgimp.hxx
+++ b/fpicker/source/office/iodlgimp.hxx
@@ -78,21 +78,19 @@ enum SvtFileDlgType
class SvtFileDialogURLSelector : public MenuButton
{
+public:
+ virtual ~SvtFileDialogURLSelector();
+ virtual void dispose() SAL_OVERRIDE;
private:
- SvtFileDialog* m_pDlg;
+ VclPtr<SvtFileDialog> m_pDlg;
PopupMenu* m_pMenu;
protected:
inline SvtFileDialog* GetDialogParent() { return m_pDlg; }
-protected:
-
virtual void FillURLMenu( PopupMenu* _pMenu ) = 0;
-protected:
SvtFileDialogURLSelector( vcl::Window* _pParent, SvtFileDialog* _pDlg, WinBits nBits, sal_uInt16 _nButtonId );
- virtual ~SvtFileDialogURLSelector();
- virtual void dispose() SAL_OVERRIDE;
virtual void Activate() SAL_OVERRIDE;
};
@@ -134,32 +132,32 @@ public:
SvtFileDialogFilterList_Impl* _pFilter;
SvtFileDialogFilter_Impl* _pUserFilter;
- FixedText* _pFtFileName;
- SvtURLBox* _pEdFileName;
+ VclPtr<FixedText> _pFtFileName;
+ VclPtr<SvtURLBox> _pEdFileName;
- FixedText* _pFtFileVersion;
- ListBox* _pLbFileVersion;
+ VclPtr<FixedText> _pFtFileVersion;
+ VclPtr<ListBox> _pLbFileVersion;
- FixedText* _pFtTemplates;
- ListBox* _pLbTemplates;
+ VclPtr<FixedText> _pFtTemplates;
+ VclPtr<ListBox> _pLbTemplates;
- FixedText* _pFtImageTemplates;
- ListBox* _pLbImageTemplates;
+ VclPtr<FixedText> _pFtImageTemplates;
+ VclPtr<ListBox> _pLbImageTemplates;
- FixedText* _pFtFileType;
- ListBox* _pLbFilter;
- PushButton* _pBtnFileOpen;
- PushButton* _pBtnCancel;
- HelpButton* _pBtnHelp;
- SvtUpButton_Impl* _pBtnUp;
- PushButton* _pBtnNewFolder;
- CheckBox* _pCbPassword;
- SvtURLBox* _pEdCurrentPath;
- CheckBox* _pCbAutoExtension;
- CheckBox* _pCbOptions;
+ VclPtr<FixedText> _pFtFileType;
+ VclPtr<ListBox> _pLbFilter;
+ VclPtr<PushButton> _pBtnFileOpen;
+ VclPtr<PushButton> _pBtnCancel;
+ VclPtr<HelpButton> _pBtnHelp;
+ VclPtr<SvtUpButton_Impl> _pBtnUp;
+ VclPtr<PushButton> _pBtnNewFolder;
+ VclPtr<CheckBox> _pCbPassword;
+ VclPtr<SvtURLBox> _pEdCurrentPath;
+ VclPtr<CheckBox> _pCbAutoExtension;
+ VclPtr<CheckBox> _pCbOptions;
- PlacesListBox* _pPlaces;
- PushButton* _pBtnConnectToServer;
+ VclPtr<PlacesListBox> _pPlaces;
+ VclPtr<PushButton> _pBtnConnectToServer;
SvtFileDlgMode _eMode;
SvtFileDlgType _eDlgType;
diff --git a/framework/inc/classes/fwktabwindow.hxx b/framework/inc/classes/fwktabwindow.hxx
index f5e7375c1269..35d1779f002c 100644
--- a/framework/inc/classes/fwktabwindow.hxx
+++ b/framework/inc/classes/fwktabwindow.hxx
@@ -78,8 +78,8 @@ public:
struct TabEntry
{
sal_Int32 m_nIndex;
- FwkTabPage* m_pPage;
- OUString m_sPageURL;
+ VclPtr<FwkTabPage> m_pPage;
+ OUString m_sPageURL;
css::uno::Reference< css::awt::XContainerWindowEventHandler > m_xEventHdl;
TabEntry() :
@@ -87,8 +87,6 @@ struct TabEntry
TabEntry( sal_Int32 nIndex, const OUString& sURL, const css::uno::Reference< css::awt::XContainerWindowEventHandler > & rEventHdl ) :
m_nIndex( nIndex ), m_pPage( NULL ), m_sPageURL( sURL ), m_xEventHdl( rEventHdl ) {}
-
- ~TabEntry() { delete m_pPage; }
};
typedef std::vector< TabEntry* > TabEntryList;
diff --git a/framework/inc/dispatch/closedispatcher.hxx b/framework/inc/dispatch/closedispatcher.hxx
index 25c19f107e6b..e8e9d0567927 100644
--- a/framework/inc/dispatch/closedispatcher.hxx
+++ b/framework/inc/dispatch/closedispatcher.hxx
@@ -39,6 +39,7 @@
#include <boost/scoped_ptr.hpp>
#include <cppuhelper/implbase2.hxx>
#include <vcl/evntpost.hxx>
+#include <vcl/vclptr.hxx>
class SystemWindow;
@@ -105,7 +106,7 @@ class CloseDispatcher : public ::cppu::WeakImplHelper2<
/** @short holded alive for internally asynchronous operations! */
css::uno::Reference< css::frame::XDispatchResultListener > m_xResultListener;
- SystemWindow* m_pSysWindow;
+ VclPtr<SystemWindow> m_pSysWindow;
// native interface
diff --git a/framework/inc/helper/vclstatusindicator.hxx b/framework/inc/helper/vclstatusindicator.hxx
index 4a68b79d8271..c5e115567a5e 100644
--- a/framework/inc/helper/vclstatusindicator.hxx
+++ b/framework/inc/helper/vclstatusindicator.hxx
@@ -52,7 +52,7 @@ class VCLStatusIndicator : public ::cppu::WeakImplHelper1< css::task::XStatusIn
Its guarded by the solarmutex only. Otherwise
we have to lock two of them, which can force a deadlock ...
*/
- StatusBar* m_pStatusBar;
+ VclPtr<StatusBar> m_pStatusBar;
/** knows the current info text of the progress. */
OUString m_sText;
diff --git a/framework/inc/uielement/buttontoolbarcontroller.hxx b/framework/inc/uielement/buttontoolbarcontroller.hxx
index 561ef253f587..8949b58e90c1 100644
--- a/framework/inc/uielement/buttontoolbarcontroller.hxx
+++ b/framework/inc/uielement/buttontoolbarcontroller.hxx
@@ -34,6 +34,7 @@
#include <comphelper/broadcasthelper.hxx>
#include <cppuhelper/weak.hxx>
+#include <vcl/vclptr.hxx>
class ToolBox;
@@ -84,13 +85,13 @@ class ButtonToolbarController : public ::com::sun::star::frame::XStatusListener,
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- bool m_bInitialized : 1,
+ bool m_bInitialized : 1,
m_bDisposed : 1;
- OUString m_aCommandURL;
+ OUString m_aCommandURL;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
- ToolBox* m_pToolbar;
+ VclPtr<ToolBox> m_pToolbar;
};
}
diff --git a/framework/inc/uielement/comboboxtoolbarcontroller.hxx b/framework/inc/uielement/comboboxtoolbarcontroller.hxx
index d04537495217..1850c45eb669 100644
--- a/framework/inc/uielement/comboboxtoolbarcontroller.hxx
+++ b/framework/inc/uielement/comboboxtoolbarcontroller.hxx
@@ -78,7 +78,7 @@ class ComboboxToolbarController : public IComboBoxListener,
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const SAL_OVERRIDE;
private:
- ComboBoxControl* m_pComboBox;
+ VclPtr<ComboBoxControl> m_pComboBox;
};
}
diff --git a/framework/inc/uielement/complextoolbarcontroller.hxx b/framework/inc/uielement/complextoolbarcontroller.hxx
index 88084f8d1661..b24186f644bf 100644
--- a/framework/inc/uielement/complextoolbarcontroller.hxx
+++ b/framework/inc/uielement/complextoolbarcontroller.hxx
@@ -28,6 +28,7 @@
#include <svtools/toolboxcontroller.hxx>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
class ToolBox;
namespace vcl { class Window; }
@@ -87,9 +88,9 @@ class ComplexToolbarController : public svt::ToolboxController
void notifyFocusLost();
void notifyTextChanged( const OUString& aText );
- ToolBox* m_pToolbar;
+ VclPtr<ToolBox> m_pToolbar;
sal_uInt16 m_nID;
- bool m_bMadeInvisible;
+ bool m_bMadeInvisible;
mutable ::com::sun::star::util::URL m_aURL;
::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
};
diff --git a/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx b/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx
index e9e09f27e813..9b3703687dc4 100644
--- a/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx
+++ b/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx
@@ -26,6 +26,7 @@
#include <uielement/complextoolbarcontroller.hxx>
#include <vcl/lstbox.hxx>
+#include <vcl/vclptr.hxx>
class ToolBox;
@@ -74,7 +75,7 @@ class DropdownToolbarController : public IListBoxListener,
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const SAL_OVERRIDE;
private:
- ListBoxControl* m_pListBoxControl;
+ VclPtr<ListBoxControl> m_pListBoxControl;
};
}
diff --git a/framework/inc/uielement/edittoolbarcontroller.hxx b/framework/inc/uielement/edittoolbarcontroller.hxx
index 8ebdca95a37c..0b8f9b6c90dc 100644
--- a/framework/inc/uielement/edittoolbarcontroller.hxx
+++ b/framework/inc/uielement/edittoolbarcontroller.hxx
@@ -75,7 +75,7 @@ class EditToolbarController : public IEditListener,
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getExecuteArgs(sal_Int16 KeyModifier) const SAL_OVERRIDE;
private:
- EditControl* m_pEditControl;
+ VclPtr<EditControl> m_pEditControl;
};
}
diff --git a/framework/inc/uielement/generictoolbarcontroller.hxx b/framework/inc/uielement/generictoolbarcontroller.hxx
index c6d867b3b261..26ebeb61ab46 100644
--- a/framework/inc/uielement/generictoolbarcontroller.hxx
+++ b/framework/inc/uielement/generictoolbarcontroller.hxx
@@ -23,6 +23,7 @@
#include <svtools/toolboxcontroller.hxx>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
class PopupMenu;
class ToolBox;
@@ -53,11 +54,11 @@ class GenericToolbarController : public svt::ToolboxController
DECL_STATIC_LINK( GenericToolbarController, ExecuteHdl_Impl, ExecuteInfo* );
protected:
- ToolBox* m_pToolbar;
- sal_uInt16 m_nID;
- bool m_bEnumCommand : 1,
- m_bMadeInvisible : 1;
- OUString m_aEnumCommand;
+ VclPtr<ToolBox> m_pToolbar;
+ sal_uInt16 m_nID;
+ bool m_bEnumCommand : 1,
+ m_bMadeInvisible : 1;
+ OUString m_aEnumCommand;
};
class MenuToolbarController : public GenericToolbarController
diff --git a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx
index ebef21894081..7d9a8e86eec7 100644
--- a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx
+++ b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx
@@ -26,6 +26,7 @@
#include <uielement/complextoolbarcontroller.hxx>
#include <vcl/spinfld.hxx>
+#include <vcl/vclptr.hxx>
class ToolBox;
@@ -97,7 +98,7 @@ class SpinfieldToolbarController : public ISpinfieldListener,
double m_nMin;
double m_nValue;
double m_nStep;
- SpinfieldControl* m_pSpinfieldControl;
+ VclPtr<SpinfieldControl> m_pSpinfieldControl;
OUString m_aOutFormat;
};
diff --git a/framework/inc/uielement/statusbaritem.hxx b/framework/inc/uielement/statusbaritem.hxx
index e5afc02c5480..e05cd37ded3c 100644
--- a/framework/inc/uielement/statusbaritem.hxx
+++ b/framework/inc/uielement/statusbaritem.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/ui/XStatusbarItem.hpp>
#include <cppuhelper/compbase1.hxx>
#include <cppuhelper/basemutex.hxx>
+#include <vcl/vclptr.hxx>
class StatusBar;
@@ -67,7 +68,7 @@ public:
virtual void SAL_CALL repaint( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
private:
- StatusBar *m_pStatusBar;
+ VclPtr<StatusBar> m_pStatusBar;
AddonStatusbarItemData *m_pItemData;
sal_uInt16 m_nId;
sal_uInt16 m_nStyle;
diff --git a/framework/inc/uielement/statusbarmanager.hxx b/framework/inc/uielement/statusbarmanager.hxx
index efbe5486b0db..2167b0cc9e3d 100644
--- a/framework/inc/uielement/statusbarmanager.hxx
+++ b/framework/inc/uielement/statusbarmanager.hxx
@@ -37,6 +37,7 @@
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <vcl/status.hxx>
+#include <vcl/vclptr.hxx>
#include <map>
namespace framework
@@ -98,13 +99,13 @@ class StatusBarManager : public ::cppu::WeakImplHelper3<
protected:
typedef std::map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusbarController > > StatusBarControllerMap;
- bool m_bDisposed : 1,
+ bool m_bDisposed : 1,
m_bFrameActionRegistered : 1,
m_bUpdateControllers : 1;
- bool m_bModuleIdentified;
- StatusBar* m_pStatusBar;
- OUString m_aModuleIdentifier;
- OUString m_aResourceName;
+ bool m_bModuleIdentified;
+ VclPtr<StatusBar> m_pStatusBar;
+ OUString m_aModuleIdentifier;
+ OUString m_aResourceName;
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > m_xFrame;
com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > m_xUICommandLabels;
StatusBarControllerMap m_aControllerMap;
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 90b68ac4a139..95381c3120a4 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -189,7 +189,7 @@ class ToolBarManager : public ToolbarManager_Base
long m_lImageRotation;
- ToolBox* m_pToolBar;
+ VclPtr<ToolBox> m_pToolBar;
OUString m_aModuleIdentifier;
OUString m_aResourceName;
diff --git a/framework/inc/uielement/toolbarmerger.hxx b/framework/inc/uielement/toolbarmerger.hxx
index 8a595a9878fa..0902ff36a9e1 100644
--- a/framework/inc/uielement/toolbarmerger.hxx
+++ b/framework/inc/uielement/toolbarmerger.hxx
@@ -61,7 +61,7 @@ typedef ::std::vector< AddonToolbarItem > AddonToolbarItemContainer;
struct ReferenceToolbarPathInfo
{
- ToolBox* pToolbar;
+ VclPtr<ToolBox> pToolbar;
sal_uInt16 nPos;
bool bResult;
};
diff --git a/framework/source/helper/vclstatusindicator.cxx b/framework/source/helper/vclstatusindicator.cxx
index e02c4e747ca9..9d3f1511ccb3 100644
--- a/framework/source/helper/vclstatusindicator.cxx
+++ b/framework/source/helper/vclstatusindicator.cxx
@@ -91,8 +91,7 @@ void SAL_CALL VCLStatusIndicator::end()
m_pStatusBar->EndProgressMode();
m_pStatusBar->Show(false);
- delete m_pStatusBar;
- m_pStatusBar = 0;
+ m_pStatusBar.clear();
}
}
diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx
index dd9c46e58235..f93aee07ed9a 100644
--- a/framework/source/services/tabwindowservice.cxx
+++ b/framework/source/services/tabwindowservice.cxx
@@ -68,8 +68,8 @@ struct TTabPageInfo
public:
::sal_Int32 m_nIndex;
- bool m_bCreated;
- FwkTabPage* m_pPage;
+ bool m_bCreated;
+ VclPtr<FwkTabPage> m_pPage;
css::uno::Sequence< css::beans::NamedValue > m_lProperties;
};
@@ -159,7 +159,7 @@ private:
css::uno::Reference< css::awt::XWindow > m_xTabWin;
/// the VCL tab window
- FwkTabWindow* m_pTabWin;
+ VclPtr<FwkTabWindow> m_pTabWin;
/// container of inserted tab pages
TTabPageInfoHash m_lTabPageInfos;
@@ -356,7 +356,7 @@ void SAL_CALL TabWindowService::dispose()
if (m_pTabWin)
m_pTabWin->RemoveEventListener( LINK( this, TabWindowService, EventListener ) );
- m_pTabWin = NULL;
+ m_pTabWin.clear();
m_xTabWin.clear();
}
diff --git a/framework/source/uielement/buttontoolbarcontroller.cxx b/framework/source/uielement/buttontoolbarcontroller.cxx
index 2219b5c6ff97..aaf068591354 100644
--- a/framework/source/uielement/buttontoolbarcontroller.cxx
+++ b/framework/source/uielement/buttontoolbarcontroller.cxx
@@ -152,7 +152,7 @@ void SAL_CALL ButtonToolbarController::dispose() throw (::com::sun::star::uno::R
m_xContext.clear();
m_xURLTransformer.clear();
m_xFrame.clear();
- m_pToolbar = 0;
+ m_pToolbar.clear();
m_bDisposed = true;
}
}
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index 8f6509558bb5..bd4b368e9d43 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -171,11 +171,9 @@ throw ( RuntimeException, std::exception )
SolarMutexGuard aSolarMutexGuard;
m_pToolbar->SetItemWindow( m_nID, 0 );
- delete m_pComboBox;
+ m_pComboBox.clear();
ComplexToolbarController::dispose();
-
- m_pComboBox = 0;
}
Sequence<PropertyValue> ComboboxToolbarController::getExecuteArgs(sal_Int16 KeyModifier) const
diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx
index 871c7b2bba6a..05f1d1c27a44 100644
--- a/framework/source/uielement/complextoolbarcontroller.cxx
+++ b/framework/source/uielement/complextoolbarcontroller.cxx
@@ -76,7 +76,7 @@ throw ( RuntimeException, std::exception )
svt::ToolboxController::dispose();
m_xURLTransformer.clear();
- m_pToolbar = 0;
+ m_pToolbar.clear();
m_nID = 0;
}
diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
index 78f24159d833..5573c62ef8b4 100644
--- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
@@ -155,11 +155,9 @@ throw ( RuntimeException, std::exception )
SolarMutexGuard aSolarMutexGuard;
m_pToolbar->SetItemWindow( m_nID, 0 );
- delete m_pListBoxControl;
+ m_pListBoxControl.clear();
ComplexToolbarController::dispose();
-
- m_pListBoxControl = 0;
}
Sequence<PropertyValue> DropdownToolbarController::getExecuteArgs(sal_Int16 KeyModifier) const
diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx
index e48c572f17a8..56e9921f8557 100644
--- a/framework/source/uielement/edittoolbarcontroller.cxx
+++ b/framework/source/uielement/edittoolbarcontroller.cxx
@@ -152,11 +152,9 @@ throw ( RuntimeException, std::exception )
SolarMutexGuard aSolarMutexGuard;
m_pToolbar->SetItemWindow( m_nID, 0 );
- delete m_pEditControl;
+ m_pEditControl.clear();
ComplexToolbarController::dispose();
-
- m_pEditControl = 0;
}
Sequence<PropertyValue> EditToolbarController::getExecuteArgs(sal_Int16 KeyModifier) const
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index c2cdf4058fe4..7bf96258312d 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -125,7 +125,7 @@ throw ( RuntimeException, std::exception )
svt::ToolboxController::dispose();
- m_pToolbar = 0;
+ m_pToolbar.clear();
m_nID = 0;
}
diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
index 4aeb87bb2320..3a7de070d5f2 100644
--- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx
+++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
@@ -213,11 +213,9 @@ throw ( RuntimeException, std::exception )
SolarMutexGuard aSolarMutexGuard;
m_pToolbar->SetItemWindow( m_nID, 0 );
- delete m_pSpinfieldControl;
+ m_pSpinfieldControl.clear();
ComplexToolbarController::dispose();
-
- m_pSpinfieldControl = 0;
}
Sequence<PropertyValue> SpinfieldToolbarController::getExecuteArgs(sal_Int16 KeyModifier) const
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index d04529352636..b8ba5fb20bfc 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -200,40 +200,39 @@ void SAL_CALL StatusBarManager::dispose() throw( uno::RuntimeException, std::exc
{
SolarMutexGuard g;
- if ( !m_bDisposed )
+ if ( m_bDisposed )
+ return;
+
+ RemoveControllers();
+
+ // destroy the item data
+ for ( sal_uInt16 n = 0; n < m_pStatusBar->GetItemCount(); n++ )
{
- RemoveControllers();
+ AddonStatusbarItemData *pUserData = static_cast< AddonStatusbarItemData *>(
+ m_pStatusBar->GetItemData( m_pStatusBar->GetItemId( n ) ) );
+ if ( pUserData )
+ delete pUserData;
+ }
- // destroy the item data
- for ( sal_uInt16 n = 0; n < m_pStatusBar->GetItemCount(); n++ )
+ m_pStatusBar.clear();
+
+ if ( m_bFrameActionRegistered && m_xFrame.is() )
+ {
+ try
{
- AddonStatusbarItemData *pUserData = static_cast< AddonStatusbarItemData *>(
- m_pStatusBar->GetItemData( m_pStatusBar->GetItemId( n ) ) );
- if ( pUserData )
- delete pUserData;
+ m_xFrame->removeFrameActionListener( uno::Reference< frame::XFrameActionListener >(
+ static_cast< ::cppu::OWeakObject *>( this ),
+ uno::UNO_QUERY ));
}
-
- delete m_pStatusBar;
- m_pStatusBar = 0;
-
- if ( m_bFrameActionRegistered && m_xFrame.is() )
+ catch ( const uno::Exception& )
{
- try
- {
- m_xFrame->removeFrameActionListener( uno::Reference< frame::XFrameActionListener >(
- static_cast< ::cppu::OWeakObject *>( this ),
- uno::UNO_QUERY ));
- }
- catch ( const uno::Exception& )
- {
- }
}
+ }
- m_xFrame.clear();
- m_xContext.clear();
+ m_xFrame.clear();
+ m_xContext.clear();
- m_bDisposed = true;
- }
+ m_bDisposed = true;
}
}
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 85ddc81a418c..efd6d204f30b 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -250,7 +249,7 @@ ToolBarManager::~ToolBarManager()
void ToolBarManager::Destroy()
{
- OSL_ASSERT( m_pToolBar != 0 );
+ OSL_ASSERT( m_pToolBar != nullptr );
SolarMutexGuard g;
if ( m_bAddedToTaskPaneList )
{
@@ -288,7 +287,7 @@ void ToolBarManager::Destroy()
m_pToolBar->SetDataChangedHdl( aEmpty );
m_pToolBar->SetCommandHdl( aEmpty );
- m_pToolBar = 0;
+ m_pToolBar.clear();
SvtMiscOptions().RemoveListenerLink( LINK( this, ToolBarManager, MiscOptionsChanged ) );
}
@@ -599,6 +598,7 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException, std::exception
// We have to destroy our toolbar instance now.
Destroy();
+ m_pToolBar.clear();
if ( m_bFrameActionRegistered && m_xFrame.is() )
{
@@ -727,7 +727,7 @@ void ToolBarManager::setToolBarImage(const Image& _aImage,const CommandToInfoMap
{
const ::std::vector< sal_uInt16 >& _rIDs = _pIter->second.aIds;
m_pToolBar->SetItemImage( _pIter->second.nId, _aImage );
- ::std::for_each(_rIDs.begin(),_rIDs.end(),::boost::bind(&ToolBox::SetItemImage,m_pToolBar,_1,_aImage));
+ ::std::for_each(_rIDs.begin(),_rIDs.end(),::boost::bind(&ToolBox::SetItemImage,m_pToolBar.get(),_1,_aImage));
}
void SAL_CALL ToolBarManager::elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception)
diff --git a/include/dbaccess/ToolBoxHelper.hxx b/include/dbaccess/ToolBoxHelper.hxx
index 4757c8ffb802..d9671b45fe3b 100644
--- a/include/dbaccess/ToolBoxHelper.hxx
+++ b/include/dbaccess/ToolBoxHelper.hxx
@@ -23,6 +23,7 @@
#include <sal/types.h>
#include <tools/link.hxx>
#include <vcl/image.hxx>
+#include <vcl/vclptr.hxx>
#include <dbaccess/dbaccessdllapi.h>
class SvtMiscOptions;
@@ -34,7 +35,7 @@ namespace dbaui
class DBACCESS_DLLPUBLIC OToolBoxHelper
{
sal_Int16 m_nSymbolsSize; // shows the toolbox large or small bitmaps
- ToolBox* m_pToolBox; // our toolbox (may be NULL)
+ VclPtr<ToolBox> m_pToolBox; // our toolbox (may be NULL)
public:
OToolBoxHelper();
virtual ~OToolBoxHelper();
diff --git a/include/dbaccess/genericcontroller.hxx b/include/dbaccess/genericcontroller.hxx
index 2b6ae5c37452..99a7afa577cc 100644
--- a/include/dbaccess/genericcontroller.hxx
+++ b/include/dbaccess/genericcontroller.hxx
@@ -59,6 +59,7 @@
#include <boost/optional.hpp>
#include <sfx2/userinputinterception.hxx>
+#include <vcl/vclptr.hxx>
namespace dbtools
{
@@ -212,7 +213,7 @@ namespace dbaui
::std::unique_ptr< OGenericUnoController_Data >
m_pData;
- ODataView* m_pView; // our (VCL) "main window"
+ VclPtr<ODataView> m_pView; // our (VCL) "main window"
#ifdef DBG_UTIL
bool m_bDescribingSupportedFeatures;
@@ -407,8 +408,8 @@ namespace dbaui
public:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getORB() const { return m_xContext; }
ODataView* getView() const { return m_pView; }
- void setView( ODataView& i_rView ) { m_pView = &i_rView; }
- void clearView() { m_pView = NULL; }
+ void setView( ODataView& i_rView );
+ void clearView();
// shows a error box if the SQLExceptionInfo is valid
void showError(const ::dbtools::SQLExceptionInfo& _rInfo);
diff --git a/include/editeng/splwrap.hxx b/include/editeng/splwrap.hxx
index 18547e96c6ac..749c836fe273 100644
--- a/include/editeng/splwrap.hxx
+++ b/include/editeng/splwrap.hxx
@@ -23,6 +23,7 @@
#include <editeng/svxenum.hxx>
#include <rtl/ustring.hxx>
#include <com/sun/star/uno/Reference.hxx>
+#include <vcl/vclptr.hxx>
// forward ---------------------------------------------------------------
@@ -48,7 +49,7 @@ private:
friend class SvxHyphenWordDialog;
friend struct SvxHyphenWordDialog_Impl;
- vcl::Window* pWin;
+ VclPtr<vcl::Window> pWin;
::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > xLast; // result of last spelling/hyphenation attempt
::com::sun::star::uno::Reference<
diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx
index 17713a7bdc7f..400a49b79876 100644
--- a/include/formula/funcutl.hxx
+++ b/include/formula/funcutl.hxx
@@ -34,7 +34,7 @@ class FORMULA_DLLPUBLIC RefEdit : public Edit
private:
Idle aIdle;
IControlReferenceHandler* pAnyRefDlg; // parent dialog
- vcl::Window* pLabelWidget;
+ VclPtr<vcl::Window> pLabelWidget;
DECL_LINK( UpdateHdl, void* );
@@ -87,7 +87,7 @@ private:
OUString aShrinkQuickHelp;
OUString aExpandQuickHelp;
IControlReferenceHandler* pAnyRefDlg; // parent dialog
- RefEdit* pRefEdit; // zugeordnetes Edit-Control
+ VclPtr<RefEdit> pRefEdit; // zugeordnetes Edit-Control
protected:
virtual void Click() SAL_OVERRIDE;
@@ -97,6 +97,8 @@ protected:
public:
RefButton(vcl::Window* _pParent, WinBits nStyle = 0);
+ virtual ~RefButton();
+ virtual void dispose() SAL_OVERRIDE;
void SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit );
void SetStartImage();
void SetEndImage();
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 438a2b57171e..99feed27df20 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -164,16 +164,12 @@ public:
struct SingleTabDlgImpl
{
- SfxTabPage* m_pSfxPage;
- FixedLine* m_pLine;
+ VclPtr<SfxTabPage> m_pSfxPage;
+ VclPtr<FixedLine> m_pLine;
OUString m_sInfoURL;
Link m_aInfoLink;
- SingleTabDlgImpl()
- : m_pSfxPage(NULL)
- , m_pLine(NULL)
- {
- }
+ SingleTabDlgImpl();
};
typedef const sal_uInt16* (*GetTabPageRanges)(); // liefert internationale Which-Werte
@@ -201,9 +197,9 @@ public:
protected:
GetTabPageRanges fnGetRanges;
- OKButton* pOKBtn;
- CancelButton* pCancelBtn;
- HelpButton* pHelpBtn;
+ VclPtr<OKButton> pOKBtn;
+ VclPtr<CancelButton> pCancelBtn;
+ VclPtr<HelpButton> pHelpBtn;
SingleTabDlgImpl* pImpl;
diff --git a/include/sfx2/checkin.hxx b/include/sfx2/checkin.hxx
index c5d93f68846d..54d2dffa2174 100644
--- a/include/sfx2/checkin.hxx
+++ b/include/sfx2/checkin.hxx
@@ -16,15 +16,17 @@
class SfxCheckinDialog : public ModalDialog
{
private:
- Edit* m_pCommentED;
- CheckBox* m_pMajorCB;
+ VclPtr<Edit> m_pCommentED;
+ VclPtr<CheckBox> m_pMajorCB;
- OKButton* m_pOKBtn;
+ VclPtr<OKButton> m_pOKBtn;
DECL_DLLPRIVATE_LINK(OKHdl, void *);
public:
SfxCheckinDialog( vcl::Window* pParent );
+ virtual ~SfxCheckinDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetComment( );
bool IsMajor( );
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index a74b236a3f63..eb43f8e38343 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -124,7 +124,7 @@ struct SfxChildWindow_Impl;
class SFX2_DLLPUBLIC SfxChildWindowContext
{
friend class SfxChildWindow;
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
sal_uInt16 nContextId;
protected:
@@ -148,12 +148,12 @@ public:
class SFX2_DLLPUBLIC SfxChildWindow
{
- vcl::Window* pParent; // parent window ( Topwindow )
- sal_uInt16 nType; // ChildWindow-Id
+ VclPtr<vcl::Window> pParent; // parent window ( Topwindow )
+ sal_uInt16 nType; // ChildWindow-Id
protected:
SfxChildAlignment eChildAlignment; // Current ::com::sun::star::drawing::Alignment
- vcl::Window* pWindow; // actual contents
+ VclPtr<vcl::Window> pWindow; // actual contents
SfxChildWindow_Impl* pImp; // Implementation data
private:
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index e5496c090d93..77f13dc30494 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -180,27 +180,27 @@ public:
class SfxDocumentPage : public SfxTabPage
{
private:
- FixedImage* m_pBmp;
- SelectableFixedText* m_pNameED;
- PushButton* m_pChangePassBtn;
+ VclPtr<FixedImage> m_pBmp;
+ VclPtr<SelectableFixedText> m_pNameED;
+ VclPtr<PushButton> m_pChangePassBtn;
- SelectableFixedText* m_pShowTypeFT;
- Edit* m_pFileValEd;
- SelectableFixedText* m_pShowSizeFT;
+ VclPtr<SelectableFixedText> m_pShowTypeFT;
+ VclPtr<Edit> m_pFileValFt;
+ VclPtr<SelectableFixedText> m_pShowSizeFT;
- SelectableFixedText* m_pCreateValFt;
- SelectableFixedText* m_pChangeValFt;
- SelectableFixedText* m_pSignedValFt;
- PushButton* m_pSignatureBtn;
- SelectableFixedText* m_pPrintValFt;
- SelectableFixedText* m_pTimeLogValFt;
- SelectableFixedText* m_pDocNoValFt;
+ VclPtr<SelectableFixedText> m_pCreateValFt;
+ VclPtr<SelectableFixedText> m_pChangeValFt;
+ VclPtr<SelectableFixedText> m_pSignedValFt;
+ VclPtr<PushButton> m_pSignatureBtn;
+ VclPtr<SelectableFixedText> m_pPrintValFt;
+ VclPtr<SelectableFixedText> m_pTimeLogValFt;
+ VclPtr<SelectableFixedText> m_pDocNoValFt;
- CheckBox* m_pUseUserDataCB;
- PushButton* m_pDeleteBtn;
+ VclPtr<CheckBox> m_pUseUserDataCB;
+ VclPtr<PushButton> m_pDeleteBtn;
- FixedText* m_pTemplFt;
- SelectableFixedText* m_pTemplValFt;
+ VclPtr<FixedText> m_pTemplFt;
+ VclPtr<SelectableFixedText> m_pTemplValFt;
OUString m_aUnknownSize;
OUString m_aMultiSignedStr;
@@ -216,6 +216,8 @@ private:
protected:
SfxDocumentPage( vcl::Window* pParent, const SfxItemSet& );
+ virtual ~SfxDocumentPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;
@@ -231,14 +233,16 @@ public:
class SfxDocumentDescPage : public SfxTabPage
{
private:
- Edit* m_pTitleEd;
- Edit* m_pThemaEd;
- Edit* m_pKeywordsEd;
- VclMultiLineEdit* m_pCommentEd;
- SfxDocumentInfoItem* m_pInfoItem;
+ VclPtr<Edit> m_pTitleEd;
+ VclPtr<Edit> m_pThemaEd;
+ VclPtr<Edit> m_pKeywordsEd;
+ VclPtr<VclMultiLineEdit> m_pCommentEd;
+ SfxDocumentInfoItem* m_pInfoItem;
protected:
SfxDocumentDescPage( vcl::Window* pParent, const SfxItemSet& );
+ virtual ~SfxDocumentDescPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;
@@ -414,9 +418,9 @@ struct CustomPropertyLine
class CustomPropertiesWindow : public vcl::Window
{
private:
- FixedText* m_pHeaderAccName;
- FixedText* m_pHeaderAccType;
- FixedText* m_pHeaderAccValue;
+ VclPtr<FixedText> m_pHeaderAccName;
+ VclPtr<FixedText> m_pHeaderAccType;
+ VclPtr<FixedText> m_pHeaderAccValue;
VclPtr<ComboBox> m_aNameBox;
VclPtr<ListBox> m_aTypeBox;
@@ -479,11 +483,11 @@ public:
class CustomPropertiesControl : public vcl::Window
{
private:
- VclVBox* m_pVBox;
- HeaderBar* m_pHeaderBar;
- VclHBox* m_pBody;
- CustomPropertiesWindow* m_pPropertiesWin;
- ScrollBar* m_pVertScroll;
+ VclPtr<VclVBox> m_pVBox;
+ VclPtr<HeaderBar> m_pHeaderBar;
+ VclPtr<VclHBox> m_pBody;
+ VclPtr<CustomPropertiesWindow> m_pPropertiesWin;
+ VclPtr<ScrollBar> m_pVertScroll;
sal_Int32 m_nThumbPos;
@@ -511,7 +515,7 @@ public:
class SfxCustomPropertiesPage : public SfxTabPage
{
private:
- CustomPropertiesControl* m_pPropertiesCtrl;
+ VclPtr<CustomPropertiesControl> m_pPropertiesCtrl;
DECL_LINK(AddHdl, void *);
@@ -519,6 +523,8 @@ private:
protected:
SfxCustomPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
+ virtual ~SfxCustomPropertiesPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;
@@ -530,23 +536,23 @@ public:
struct CmisValue : public VclBuilderContainer
{
- Edit* m_aValueEdit;
+ VclPtr<Edit> m_aValueEdit;
CmisValue( vcl::Window* pParent, const OUString& aStr );
};
struct CmisDateTime : public VclBuilderContainer
{
- DateField* m_aDateField;
- TimeField* m_aTimeField;
+ VclPtr<DateField> m_aDateField;
+ VclPtr<TimeField> m_aTimeField;
CmisDateTime( vcl::Window* pParent, const ::com::sun::star::util::DateTime& aDateTime );
};
struct CmisYesNo : public VclBuilderContainer
{
- RadioButton* m_aYesButton;
- RadioButton* m_aNoButton;
+ VclPtr<RadioButton> m_aYesButton;
+ VclPtr<RadioButton> m_aNoButton;
CmisYesNo( vcl::Window* pParent, bool bValue);
};
@@ -555,15 +561,15 @@ struct CmisYesNo : public VclBuilderContainer
struct CmisPropertyLine : public VclBuilderContainer
{
- VclFrame* m_pFrame;
+ VclPtr<VclFrame> m_pFrame;
OUString m_sId;
OUString m_sType;
bool m_bUpdatable;
bool m_bRequired;
bool m_bMultiValued;
bool m_bOpenChoice;
- FixedText* m_aName;
- FixedText* m_aType;
+ VclPtr<FixedText> m_aName;
+ VclPtr<FixedText> m_aType;
std::vector< CmisValue* > m_aValues;
std::vector< CmisDateTime* > m_aDateTimes;
std::vector< CmisYesNo* > m_aYesNos;
@@ -578,7 +584,7 @@ struct CmisPropertyLine : public VclBuilderContainer
class CmisPropertiesWindow
{
private:
- VclBox* m_pBox;
+ VclPtr<VclBox> m_pBox;
sal_Int32 m_nItemHeight;
SvNumberFormatter m_aNumberFormatter;
std::vector< CmisPropertyLine* > m_aCmisPropertiesLines;
diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx
index 7e66740176ac..3ae423726ca0 100644
--- a/include/sfx2/fcontnr.hxx
+++ b/include/sfx2/fcontnr.hxx
@@ -57,14 +57,13 @@ public:
class SfxFrameWindow
{
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
public:
SfxFrameWindow( vcl::Window *pWin )
: pWindow( pWin )
{}
- virtual ~SfxFrameWindow()
- { delete pWindow; }
+ virtual ~SfxFrameWindow() {}
vcl::Window* GetWindow() const
{ return pWindow; }
void SetWindow( vcl::Window *pWin )
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index fcd6c46c748b..d9c3620ee1eb 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -29,6 +29,7 @@
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
+#include <vcl/vclptr.hxx>
namespace com
{
@@ -103,7 +104,7 @@ private:
SfxFrame* pParentFrame;
SfxFrameArr_Impl* pChildArr;
SfxFrame_Impl* pImp;
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
protected:
bool Close();
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx
index 8fe7920473c4..7a89267b3bc5 100644
--- a/include/sfx2/infobar.hxx
+++ b/include/sfx2/infobar.hxx
@@ -43,15 +43,14 @@ class SFX2_DLLPUBLIC SfxInfoBarContainerChild : public SfxChildWindow
class SfxInfoBarWindow : public vcl::Window
{
private:
- OUString m_sId;
-
- std::unique_ptr<FixedText> m_pMessage;
- std::unique_ptr<Button> m_pCloseBtn;
-
- boost::ptr_vector<PushButton> m_aActionBtns;
+ OUString m_sId;
+ VclPtr<FixedText> m_pMessage;
+ VclPtr<Button> m_pCloseBtn;
+ std::vector< VclPtr<PushButton> > m_aActionBtns;
public:
- SfxInfoBarWindow(vcl::Window* parent, const OUString& sId, const OUString& sMessage);
+ SfxInfoBarWindow( vcl::Window* parent, const OUString& sId,
+ const OUString& sMessage );
virtual ~SfxInfoBarWindow( );
virtual void dispose() SAL_OVERRIDE;
@@ -72,8 +71,8 @@ class SfxInfoBarWindow : public vcl::Window
class SfxInfoBarContainerWindow : public vcl::Window
{
private:
- SfxInfoBarContainerChild* m_pChildWin;
- boost::ptr_vector<SfxInfoBarWindow> m_pInfoBars;
+ SfxInfoBarContainerChild* m_pChildWin;
+ std::vector< VclPtr<SfxInfoBarWindow> > m_pInfoBars;
public:
SfxInfoBarContainerWindow(SfxInfoBarContainerChild* pChildWin);
diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx
index 10ab174bbdbd..56282188f45e 100644
--- a/include/sfx2/ipclient.hxx
+++ b/include/sfx2/ipclient.hxx
@@ -44,7 +44,7 @@ friend class SfxInPlaceClient_Impl;
SfxInPlaceClient_Impl* m_pImp;
SfxViewShell* m_pViewSh;
- vcl::Window* m_pEditWin;
+ VclPtr<vcl::Window> m_pEditWin;
// called after the requested new object area was negotiated
SAL_DLLPRIVATE virtual void ObjectAreaChanged();
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index 42c265637306..00b8309e1a0b 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -36,23 +36,23 @@ class SfxStyleSheetBase;
class SfxManageStyleSheetPage : public SfxTabPage
{
- VclMultiLineEdit* m_pNameRo;
- Edit* m_pNameRw;
+ VclPtr<VclMultiLineEdit> m_pNameRo;
+ VclPtr<Edit> m_pNameRw;
- CheckBox* m_pAutoCB;
+ VclPtr<CheckBox> m_pAutoCB;
- FixedText* m_pFollowFt;
- ListBox* m_pFollowLb;
- PushButton* m_pEditStyleBtn;
+ VclPtr<FixedText> m_pFollowFt;
+ VclPtr<ListBox> m_pFollowLb;
+ VclPtr<PushButton> m_pEditStyleBtn;
- FixedText* m_pBaseFt;
- ListBox* m_pBaseLb;
- PushButton* m_pEditLinkStyleBtn;
+ VclPtr<FixedText> m_pBaseFt;
+ VclPtr<ListBox> m_pBaseLb;
+ VclPtr<PushButton> m_pEditLinkStyleBtn;
- FixedText* m_pFilterFt;
- ListBox* m_pFilterLb;
+ VclPtr<FixedText> m_pFilterFt;
+ VclPtr<ListBox> m_pFilterLb;
- FixedText *m_pDescFt;
+ VclPtr<FixedText> m_pDescFt;
SfxStyleSheetBase *pStyle;
SfxStyleFamilies *pFamilies;
diff --git a/include/sfx2/newstyle.hxx b/include/sfx2/newstyle.hxx
index c41744f83eec..1a23a8d78683 100644
--- a/include/sfx2/newstyle.hxx
+++ b/include/sfx2/newstyle.hxx
@@ -33,8 +33,8 @@ class SfxStyleSheetBasePool;
class SFX2_DLLPUBLIC SfxNewStyleDlg : public ModalDialog
{
private:
- ComboBox* m_pColBox;
- OKButton* m_pOKBtn;
+ VclPtr<ComboBox> m_pColBox;
+ VclPtr<OKButton> m_pOKBtn;
VclPtr<MessageDialog> aQueryOverwriteBox;
SfxStyleSheetBasePool& rPool;
diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx
index 363e9b9e1c71..6d0d79adfb2e 100644
--- a/include/sfx2/passwd.hxx
+++ b/include/sfx2/passwd.hxx
@@ -42,23 +42,23 @@
class SFX2_DLLPUBLIC SfxPasswordDialog : public ModalDialog
{
private:
- VclFrame* mpPassword1Box;
- FixedText* mpUserFT;
- Edit* mpUserED;
- FixedText* mpPassword1FT;
- Edit* mpPassword1ED;
- FixedText* mpConfirm1FT;
- Edit* mpConfirm1ED;
+ VclPtr<VclFrame> mpPassword1Box;
+ VclPtr<FixedText> mpUserFT;
+ VclPtr<Edit> mpUserED;
+ VclPtr<FixedText> mpPassword1FT;
+ VclPtr<Edit> mpPassword1ED;
+ VclPtr<FixedText> mpConfirm1FT;
+ VclPtr<Edit> mpConfirm1ED;
- VclFrame* mpPassword2Box;
- FixedText* mpPassword2FT;
- Edit* mpPassword2ED;
- FixedText* mpConfirm2FT;
- Edit* mpConfirm2ED;
+ VclPtr<VclFrame> mpPassword2Box;
+ VclPtr<FixedText> mpPassword2FT;
+ VclPtr<Edit> mpPassword2ED;
+ VclPtr<FixedText> mpConfirm2FT;
+ VclPtr<Edit> mpConfirm2ED;
- FixedText* mpMinLengthFT;
+ VclPtr<FixedText> mpMinLengthFT;
- OKButton* mpOKBtn;
+ VclPtr<OKButton> mpOKBtn;
OUString maMinLenPwdStr;
OUString maMinLenPwdStr1;
@@ -75,6 +75,8 @@ private:
public:
SfxPasswordDialog(vcl::Window* pParent, const OUString* pGroupText = NULL);
+ virtual ~SfxPasswordDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetUser() const
{
diff --git a/include/sfx2/printopt.hxx b/include/sfx2/printopt.hxx
index 477e98ef6a48..ecb35c96d8cc 100644
--- a/include/sfx2/printopt.hxx
+++ b/include/sfx2/printopt.hxx
@@ -41,32 +41,32 @@ class SFX2_DLLPUBLIC SfxCommonPrintOptionsTabPage : public SfxTabPage
{
private:
- RadioButton* m_pPrinterOutputRB;
- RadioButton* m_pPrintFileOutputRB;
+ VclPtr<RadioButton> m_pPrinterOutputRB;
+ VclPtr<RadioButton> m_pPrintFileOutputRB;
- CheckBox* m_pReduceTransparencyCB;
- RadioButton* m_pReduceTransparencyAutoRB;
- RadioButton* m_pReduceTransparencyNoneRB;
+ VclPtr<CheckBox> m_pReduceTransparencyCB;
+ VclPtr<RadioButton> m_pReduceTransparencyAutoRB;
+ VclPtr<RadioButton> m_pReduceTransparencyNoneRB;
- CheckBox* m_pReduceGradientsCB;
- RadioButton* m_pReduceGradientsStripesRB;
- RadioButton* m_pReduceGradientsColorRB;
- NumericField* m_pReduceGradientsStepCountNF;
+ VclPtr<CheckBox> m_pReduceGradientsCB;
+ VclPtr<RadioButton> m_pReduceGradientsStripesRB;
+ VclPtr<RadioButton> m_pReduceGradientsColorRB;
+ VclPtr<NumericField> m_pReduceGradientsStepCountNF;
- CheckBox* m_pReduceBitmapsCB;
- RadioButton* m_pReduceBitmapsOptimalRB;
- RadioButton* m_pReduceBitmapsNormalRB;
- RadioButton* m_pReduceBitmapsResolutionRB;
- ListBox* m_pReduceBitmapsResolutionLB;
- CheckBox* m_pReduceBitmapsTransparencyCB;
+ VclPtr<CheckBox> m_pReduceBitmapsCB;
+ VclPtr<RadioButton> m_pReduceBitmapsOptimalRB;
+ VclPtr<RadioButton> m_pReduceBitmapsNormalRB;
+ VclPtr<RadioButton> m_pReduceBitmapsResolutionRB;
+ VclPtr<ListBox> m_pReduceBitmapsResolutionLB;
+ VclPtr<CheckBox> m_pReduceBitmapsTransparencyCB;
- CheckBox* m_pConvertToGreyscalesCB;
+ VclPtr<CheckBox> m_pConvertToGreyscalesCB;
- CheckBox* m_pPDFCB;
+ VclPtr<CheckBox> m_pPDFCB;
- CheckBox* m_pPaperSizeCB;
- CheckBox* m_pPaperOrientationCB;
- CheckBox* m_pTransparencyCB;
+ VclPtr<CheckBox> m_pPaperSizeCB;
+ VclPtr<CheckBox> m_pPaperOrientationCB;
+ VclPtr<CheckBox> m_pTransparencyCB;
private:
@@ -94,7 +94,8 @@ protected:
public:
SfxCommonPrintOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
-
+ virtual ~SfxCommonPrintOptionsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
virtual vcl::Window* GetParentLabeledBy( const vcl::Window* pLabel ) const SAL_OVERRIDE;
diff --git a/include/sfx2/prnmon.hxx b/include/sfx2/prnmon.hxx
index 22378a52f503..ff42cb0253df 100644
--- a/include/sfx2/prnmon.hxx
+++ b/include/sfx2/prnmon.hxx
@@ -38,7 +38,7 @@ private:
SfxPrintOptDlg_Impl* pDlgImpl;
SfxViewShell* pViewSh;
SfxItemSet* pOptions;
- SfxTabPage* pPage;
+ VclPtr<SfxTabPage> pPage;
public:
SfxPrintOptionsDialog( vcl::Window *pParent,
diff --git a/include/sfx2/sidebar/SidebarPanelBase.hxx b/include/sfx2/sidebar/SidebarPanelBase.hxx
index 6215f6d03e64..a3c9cbcaa01e 100644
--- a/include/sfx2/sidebar/SidebarPanelBase.hxx
+++ b/include/sfx2/sidebar/SidebarPanelBase.hxx
@@ -33,6 +33,7 @@
#include <boost/noncopyable.hpp>
#include <boost/function.hpp>
+#include <vcl/vclptr.hxx>
namespace vcl { class Window; }
@@ -111,7 +112,7 @@ protected:
throw (css::uno::RuntimeException) SAL_OVERRIDE;
private:
- vcl::Window* mpControl;
+ VclPtr<vcl::Window> mpControl;
const ::rtl::OUString msResourceURL;
const css::ui::LayoutSize maLayoutSize;
};
diff --git a/include/sfx2/stbitem.hxx b/include/sfx2/stbitem.hxx
index 835fcff98b46..9e4850a46e15 100644
--- a/include/sfx2/stbitem.hxx
+++ b/include/sfx2/stbitem.hxx
@@ -59,9 +59,9 @@ class UserDrawEvent;
class SFX2_DLLPUBLIC SfxStatusBarControl: public svt::StatusbarController
{
- sal_uInt16 nSlotId;
- sal_uInt16 nId;
- StatusBar* pBar;
+ sal_uInt16 nSlotId;
+ sal_uInt16 nId;
+ VclPtr<StatusBar> pBar;
protected:
// new controller API
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index e30588f25043..d1758879ca5b 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -64,16 +64,16 @@ friend class SfxTabDialogController;
SfxViewFrame* pFrame;
- VclBox *m_pBox;
- TabControl *m_pTabCtrl;
+ VclPtr<VclBox> m_pBox;
+ VclPtr<TabControl> m_pTabCtrl;
- PushButton* m_pOKBtn;
- PushButton* m_pApplyBtn;
- PushButton* m_pUserBtn;
- CancelButton* m_pCancelBtn;
- HelpButton* m_pHelpBtn;
- PushButton* m_pResetBtn;
- PushButton* m_pBaseFmtBtn;
+ VclPtr<PushButton> m_pOKBtn;
+ VclPtr<PushButton> m_pApplyBtn;
+ VclPtr<PushButton> m_pUserBtn;
+ VclPtr<CancelButton> m_pCancelBtn;
+ VclPtr<HelpButton> m_pHelpBtn;
+ VclPtr<PushButton> m_pResetBtn;
+ VclPtr<PushButton> m_pBaseFmtBtn;
bool m_bOwnsOKBtn;
bool m_bOwnsCancelBtn;
@@ -106,7 +106,7 @@ protected:
virtual void RefreshInputSet();
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
- VclButtonBox* m_pActionArea;
+ VclPtr<VclButtonBox> m_pActionArea;
SfxItemSet* pExampleSet;
SfxItemSet* GetInputSetImpl();
SfxTabPage* GetTabPage( sal_uInt16 nPageId ) const;
diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index 76ea4bda5317..b347744c0de5 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -143,16 +143,16 @@ private:
private:
- TabControl *mpTabControl;
-
- Edit *mpSearchEdit;
- ToolBox *mpViewBar;
- ToolBox *mpActionBar;
- ToolBox *mpTemplateBar;
- TemplateSearchView *mpSearchView;
- TemplateAbstractView *mpCurView;
- TemplateLocalView *mpLocalView;
- TemplateRemoteView *mpRemoteView;
+ VclPtr<TabControl> mpTabControl;
+
+ VclPtr<Edit> mpSearchEdit;
+ VclPtr<ToolBox> mpViewBar;
+ VclPtr<ToolBox> mpActionBar;
+ VclPtr<ToolBox> mpTemplateBar;
+ VclPtr<TemplateSearchView> mpSearchView;
+ VclPtr<TemplateAbstractView> mpCurView;
+ VclPtr<TemplateLocalView> mpLocalView;
+ VclPtr<TemplateRemoteView> mpRemoteView;
PopupMenu *mpActionMenu;
PopupMenu *mpRepositoryMenu;
PopupMenu *mpTemplateDefaultMenu;
diff --git a/include/sfx2/templateinfodlg.hxx b/include/sfx2/templateinfodlg.hxx
index fabd7409fd32..97a711c58028 100644
--- a/include/sfx2/templateinfodlg.hxx
+++ b/include/sfx2/templateinfodlg.hxx
@@ -38,11 +38,11 @@ protected:
private:
- PushButton* mpBtnClose;
- VclBox* mpBox;
+ VclPtr<PushButton> mpBtnClose;
+ VclPtr<VclBox> mpBox;
- vcl::Window *mpPreviewView; // gets released when xWindows get destroyed (dont delete in constructor)
- svtools::ODocumentInfoPreview *mpInfoView;
+ VclPtr<vcl::Window> mpPreviewView; // gets released when xWindows get destroyed (dont delete in constructor)
+ VclPtr<svtools::ODocumentInfoPreview> mpInfoView;
::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 > m_xFrame;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xWindow;
diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 2191ef5845e9..0e4a7e0af1cf 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -309,7 +309,7 @@ protected:
ThumbnailValueItemList mItemList;
ThumbnailValueItemList mFilteredItemList; ///< Cache to store the filtered items
ThumbnailValueItemList::iterator mpStartSelRange;
- ScrollBar* mpScrBar;
+ VclPtr<ScrollBar> mpScrBar;
long mnHeaderHeight;
long mnItemWidth;
long mnItemHeight;
diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx
index 9136a5688476..a4c7bbcdb920 100644
--- a/include/sfx2/thumbnailviewitem.hxx
+++ b/include/sfx2/thumbnailviewitem.hxx
@@ -138,7 +138,7 @@ protected:
Rectangle maDrawArea;
Link maClickHdl;
bool mbEditTitle;
- VclMultiLineEdit* mpTitleED;
+ VclPtr<VclMultiLineEdit> mpTitleED;
Rectangle maTextEditMaxArea;
};
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 08d3682e8986..bb7379da1a41 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -37,6 +37,7 @@
#include <tools/errcode.hxx>
#include <vcl/jobset.hxx>
#include <o3tl/typed_flags_set.hxx>
+#include <vcl/vclptr.hxx>
class SfxBaseController;
class Size;
@@ -140,7 +141,7 @@ friend class SfxPrinterController;
struct SfxViewShell_Impl* pImp;
SfxViewFrame* pFrame;
SfxShell* pSubShell;
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
bool bNoNewWindow;
protected:
diff --git a/include/svtools/GraphicExportOptionsDialog.hxx b/include/svtools/GraphicExportOptionsDialog.hxx
index 5c8e7ed0c76c..884e08b3e2a2 100644
--- a/include/svtools/GraphicExportOptionsDialog.hxx
+++ b/include/svtools/GraphicExportOptionsDialog.hxx
@@ -37,9 +37,9 @@
class SVT_DLLPUBLIC GraphicExportOptionsDialog : public ModalDialog
{
private:
- NumericField* mpWidth;
- NumericField* mpHeight;
- ComboBox* mpResolution;
+ VclPtr<NumericField> mpWidth;
+ VclPtr<NumericField> mpHeight;
+ VclPtr<ComboBox> mpResolution;
Size mSize100mm;
double mResolution;
@@ -62,7 +62,8 @@ private:
public:
GraphicExportOptionsDialog( vcl::Window* pWindow, const css::uno::Reference<css::lang::XComponent>& rxSourceDocument );
-
+ virtual ~GraphicExportOptionsDialog();
+ virtual void dispose() SAL_OVERRIDE;
css::uno::Sequence<css::beans::PropertyValue> getFilterData();
};
diff --git a/include/svtools/PlaceEditDialog.hxx b/include/svtools/PlaceEditDialog.hxx
index de8c9562dd80..a3e4c2caa77b 100644
--- a/include/svtools/PlaceEditDialog.hxx
+++ b/include/svtools/PlaceEditDialog.hxx
@@ -27,15 +27,15 @@
class SVT_DLLPUBLIC PlaceEditDialog : public ModalDialog
{
private :
- Edit* m_pEDServerName;
- ListBox* m_pLBServerType;
+ VclPtr<Edit> m_pEDServerName;
+ VclPtr<ListBox> m_pLBServerType;
std::shared_ptr< DetailsContainer > m_xCurrentDetails;
- Edit* m_pEDUsername;
- OKButton* m_pBTOk;
- CancelButton* m_pBTCancel;
+ VclPtr<Edit> m_pEDUsername;
+ VclPtr<OKButton> m_pBTOk;
+ VclPtr<CancelButton> m_pBTCancel;
- PushButton* m_pBTDelete;
+ VclPtr<PushButton> m_pBTDelete;
/** Vector holding the details UI control for each server type.
@@ -50,6 +50,7 @@ public :
PlaceEditDialog( vcl::Window* pParent);
PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Place> &rPlace );
virtual ~PlaceEditDialog();
+ virtual void dispose() SAL_OVERRIDE;
// Returns a place instance with given information
std::shared_ptr<Place> GetPlace();
diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx
index a4997b3113c7..9c17ecea0191 100644
--- a/include/svtools/ServerDetailsControls.hxx
+++ b/include/svtools/ServerDetailsControls.hxx
@@ -25,7 +25,7 @@ class DetailsContainer
{
private:
Link m_aChangeHdl;
- VclFrame* m_pFrame;
+ VclPtr<VclFrame> m_pFrame;
public:
DetailsContainer( VclBuilderContainer* pBuilder, const OString& rFrame );
@@ -57,9 +57,9 @@ class HostDetailsContainer : public DetailsContainer
OUString m_sScheme;
protected:
- Edit* m_pEDHost;
- NumericField* m_pEDPort;
- Edit* m_pEDPath;
+ VclPtr<Edit> m_pEDHost;
+ VclPtr<NumericField> m_pEDPort;
+ VclPtr<Edit> m_pEDPath;
public:
HostDetailsContainer( VclBuilderContainer* pBuilder, sal_uInt16 nPort, const OUString& sScheme );
@@ -81,7 +81,7 @@ class HostDetailsContainer : public DetailsContainer
class DavDetailsContainer : public HostDetailsContainer
{
private:
- CheckBox* m_pCBDavs;
+ VclPtr<CheckBox> m_pCBDavs;
public:
DavDetailsContainer( VclBuilderContainer* pBuilder );
@@ -99,9 +99,9 @@ class DavDetailsContainer : public HostDetailsContainer
class SmbDetailsContainer : public DetailsContainer
{
private:
- Edit* m_pEDHost;
- Edit* m_pEDShare;
- Edit* m_pEDPath;
+ VclPtr<Edit> m_pEDHost;
+ VclPtr<Edit> m_pEDShare;
+ VclPtr<Edit> m_pEDPath;
public:
SmbDetailsContainer( VclBuilderContainer* pBuilder );
@@ -120,11 +120,11 @@ class CmisDetailsContainer : public DetailsContainer
std::vector< OUString > m_aRepoIds;
OUString m_sRepoId;
- Edit* m_pEDBinding;
- ListBox* m_pLBRepository;
- Button* m_pBTRepoRefresh;
- ListBox* m_pLBServerType;
- Edit* m_pEDPath;
+ VclPtr<Edit> m_pEDBinding;
+ VclPtr<ListBox> m_pLBRepository;
+ VclPtr<Button> m_pBTRepoRefresh;
+ VclPtr<ListBox> m_pLBServerType;
+ VclPtr<Edit> m_pEDPath;
public:
CmisDetailsContainer( VclBuilderContainer* pBuilder );
diff --git a/include/svtools/accessibleruler.hxx b/include/svtools/accessibleruler.hxx
index a3fe1c5a0580..a006de144a2e 100644
--- a/include/svtools/accessibleruler.hxx
+++ b/include/svtools/accessibleruler.hxx
@@ -38,6 +38,7 @@
#include <comphelper/broadcasthelper.hxx>
#include <cppuhelper/implbase5.hxx>
#include <comphelper/servicehelper.hxx>
+#include <vcl/vclptr.hxx>
namespace com { namespace sun { namespace star { namespace awt {
struct Point;
@@ -198,7 +199,7 @@ private:
mxParent;
/// pointer to internal representation
- Ruler* mpRepr;
+ VclPtr<Ruler> mpRepr;
/// client id in the AccessibleEventNotifier queue
sal_uInt32 mnClientId;
diff --git a/include/svtools/addresstemplate.hxx b/include/svtools/addresstemplate.hxx
index dec91a887b1d..28bc7edfcc1d 100644
--- a/include/svtools/addresstemplate.hxx
+++ b/include/svtools/addresstemplate.hxx
@@ -48,10 +48,10 @@ namespace svt
{
private:
// Controls
- ComboBox* m_pDatasource;
- PushButton* m_pAdministrateDatasources;
- ComboBox* m_pTable;
- ScrollBar* m_pFieldScroller;
+ VclPtr<ComboBox> m_pDatasource;
+ VclPtr<PushButton> m_pAdministrateDatasources;
+ VclPtr<ComboBox> m_pTable;
+ VclPtr<ScrollBar> m_pFieldScroller;
// string to display for "no selection"
const OUString m_sNoFieldSelection;
diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx
index 779815cf2e8a..b7d900443466 100644
--- a/include/svtools/brwbox.hxx
+++ b/include/svtools/brwbox.hxx
@@ -130,9 +130,9 @@ typedef sal_uLong BrowserMode;
class BrowseEvent
{
- vcl::Window* pWin;
- long nRow;
- Rectangle aRect;
+ VclPtr<vcl::Window> pWin;
+ long nRow;
+ Rectangle aRect;
sal_uInt16 nCol;
sal_uInt16 nColId;
@@ -143,10 +143,10 @@ public:
sal_uInt16 nColumn, sal_uInt16 nColumnId,
const Rectangle& rRect );
- vcl::Window* GetWindow() const { return pWin; }
+ vcl::Window* GetWindow() const { return pWin; }
long GetRow() const { return nRow; }
- sal_uInt16 GetColumn() const { return nCol; }
- sal_uInt16 GetColumnId() const { return nColId; }
+ sal_uInt16 GetColumn() const { return nCol; }
+ sal_uInt16 GetColumnId() const { return nColId; }
const Rectangle& GetRect() const { return aRect; }
};
@@ -219,8 +219,8 @@ public:
static const sal_uInt16 HandleColumnId = 0;
private:
- vcl::Window* pDataWin; // window to display data rows
- ScrollBar* pVScroll; // vertical scrollbar
+ VclPtr<vcl::Window> pDataWin; // window to display data rows
+ VclPtr<ScrollBar> pVScroll; // vertical scrollbar
VclPtr<ScrollBar> aHScroll; // horizontal scrollbar
long nDataRowHeight; // height of a single data-row
diff --git a/include/svtools/brwhead.hxx b/include/svtools/brwhead.hxx
index e60949100731..c82ccace0601 100644
--- a/include/svtools/brwhead.hxx
+++ b/include/svtools/brwhead.hxx
@@ -29,8 +29,11 @@ class BrowseBox;
class SVT_DLLPUBLIC BrowserHeader: public HeaderBar
{
- BrowseBox* _pBrowseBox;
+ VclPtr<BrowseBox> _pBrowseBox;
+public:
+ virtual ~BrowserHeader();
+ virtual void dispose() SAL_OVERRIDE;
protected:
virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE;
virtual void Select() SAL_OVERRIDE;
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index 7948150cce1b..189be3aa81e6 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -401,11 +401,11 @@ method in CalendarField and create an own calendar there ourselves.
class SVT_DLLPUBLIC CalendarField : public DateField
{
private:
- ImplCFieldFloatWin* mpFloatWin;
- Calendar* mpCalendar;
+ VclPtr<ImplCFieldFloatWin> mpFloatWin;
+ VclPtr<Calendar> mpCalendar;
WinBits mnCalendarStyle;
- PushButton* mpTodayBtn;
- PushButton* mpNoneBtn;
+ VclPtr<PushButton> mpTodayBtn;
+ VclPtr<PushButton> mpNoneBtn;
Date maDefaultDate;
bool mbToday;
bool mbNone;
diff --git a/include/svtools/colrdlg.hxx b/include/svtools/colrdlg.hxx
index 1919ba0666c4..4fe31bfa1d8a 100644
--- a/include/svtools/colrdlg.hxx
+++ b/include/svtools/colrdlg.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_SVTOOLS_COLRDLG_HXX
#include <svtools/svtdllapi.h>
-
+#include <vcl/vclptr.hxx>
#include <tools/color.hxx>
namespace vcl { class Window; }
@@ -50,9 +50,9 @@ public:
short Execute();
private:
- vcl::Window* mpParent;
- Color maColor;
- sal_Int16 meMode;
+ VclPtr<vcl::Window> mpParent;
+ Color maColor;
+ sal_Int16 meMode;
};
#endif // INCLUDED_SVTOOLS_COLRDLG_HXX
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index eedf170d9a8a..4031d410b8c5 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -80,7 +80,7 @@ namespace svt
friend class EditBrowseBox;
protected:
- Control* pWindow;
+ VclPtr<Control> pWindow;
bool bSuspended; // <true> if the window is hidden and disabled
public:
@@ -274,7 +274,7 @@ namespace svt
class SVT_DLLPUBLIC CheckBoxControl : public Control
{
- CheckBox* pBox;
+ VclPtr<CheckBox> pBox;
Rectangle aFocusRect;
Link m_aClickLink,m_aModifyLink;
@@ -475,7 +475,7 @@ namespace svt
aOldController;
ImplSVEvent * nStartEvent, * nEndEvent, * nCellModifiedEvent; // event ids
- vcl::Window* m_pFocusWhileRequest;
+ VclPtr<vcl::Window> m_pFocusWhileRequest;
// In ActivateCell, we grab the focus asynchronously, but if between requesting activation
// and the asynchornous event the focus has changed, we won't grab it for ourself.
@@ -487,14 +487,14 @@ namespace svt
mutable bool bPaintStatus : 1; // paint a status (image) in the handle column
bool bActiveBeforeTracking;
- CheckBoxControl* pCheckBoxPaint;
+ VclPtr<CheckBoxControl> pCheckBoxPaint;
sal_Int32 m_nBrowserFlags;
ImageList m_aStatusImages;
::std::unique_ptr< EditBrowseBoxImpl> m_aImpl;
protected:
- BrowserHeader* pHeader;
+ VclPtr<BrowserHeader> pHeader;
bool isGetCellFocusPending() const { return nStartEvent != 0; }
void cancelGetCellFocus() { if (nStartEvent) Application::RemoveUserEvent(nStartEvent); nStartEvent = 0; }
diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx
index 6b0dc15e61b3..614d654d8b4d 100644
--- a/include/svtools/fileview.hxx
+++ b/include/svtools/fileview.hxx
@@ -212,10 +212,12 @@ enum QueryDeleteResult_Impl
class SVT_DLLPUBLIC QueryDeleteDlg_Impl : public MessageDialog
{
private:
- PushButton* m_pAllButton;
+ VclPtr<PushButton> m_pAllButton;
public:
QueryDeleteDlg_Impl(vcl::Window* pParent, const OUString& rName);
+ virtual ~QueryDeleteDlg_Impl();
+ virtual void dispose() SAL_OVERRIDE;
void EnableAllButton() { m_pAllButton->Enable(true); }
};
diff --git a/include/svtools/generictoolboxcontroller.hxx b/include/svtools/generictoolboxcontroller.hxx
index 15b542cc3458..d5bf7d7fc51d 100644
--- a/include/svtools/generictoolboxcontroller.hxx
+++ b/include/svtools/generictoolboxcontroller.hxx
@@ -50,8 +50,8 @@ class SVT_DLLPUBLIC GenericToolboxController : public svt::ToolboxController
DECL_STATIC_LINK( GenericToolboxController, ExecuteHdl_Impl, ExecuteInfo* );
private:
- ToolBox* m_pToolbox;
- sal_uInt16 m_nID;
+ VclPtr<ToolBox> m_pToolbox;
+ sal_uInt16 m_nID;
};
}
diff --git a/include/svtools/genericunodialog.hxx b/include/svtools/genericunodialog.hxx
index f0445ff96405..73fc6eb8f539 100644
--- a/include/svtools/genericunodialog.hxx
+++ b/include/svtools/genericunodialog.hxx
@@ -38,6 +38,7 @@
#include <comphelper/propertycontainer.hxx>
#include <comphelper/broadcasthelper.hxx>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
class Dialog;
namespace vcl { class Window; }
@@ -73,7 +74,7 @@ namespace svt
::osl::Mutex m_aExecutionMutex; /// access safety for execute/cancel
protected:
- Dialog* m_pDialog; /// the dialog to execute
+ VclPtr<Dialog> m_pDialog; /// the dialog to execute
bool m_bExecuting : 1; /// we're currently executing the dialog
bool m_bCanceled : 1; /// endDialog was called while we were executing
bool m_bTitleAmbiguous : 1; /// m_sTitle has not been set yet
diff --git a/include/svtools/prnsetup.hxx b/include/svtools/prnsetup.hxx
index 6b87e5d7d5c2..c30062b4aa35 100644
--- a/include/svtools/prnsetup.hxx
+++ b/include/svtools/prnsetup.hxx
@@ -40,13 +40,13 @@ class QueueInfo;
class SVT_DLLPUBLIC PrinterSetupDialog : public ModalDialog
{
private:
- ListBox* m_pLbName;
- PushButton* m_pBtnProperties;
- PushButton* m_pBtnOptions;
- FixedText* m_pFiStatus;
- FixedText* m_pFiType;
- FixedText* m_pFiLocation;
- FixedText* m_pFiComment;
+ VclPtr<ListBox> m_pLbName;
+ VclPtr<PushButton> m_pBtnProperties;
+ VclPtr<PushButton> m_pBtnOptions;
+ VclPtr<FixedText> m_pFiStatus;
+ VclPtr<FixedText> m_pFiType;
+ VclPtr<FixedText> m_pFiLocation;
+ VclPtr<FixedText> m_pFiComment;
AutoTimer maStatusTimer;
Printer* mpPrinter;
Printer* mpTempPrinter;
diff --git a/include/svtools/simptabl.hxx b/include/svtools/simptabl.hxx
index 7670b7f74cc7..1bcb1f773352 100644
--- a/include/svtools/simptabl.hxx
+++ b/include/svtools/simptabl.hxx
@@ -29,13 +29,15 @@ class SvSimpleTable;
class SVT_DLLPUBLIC SvSimpleTableContainer : public Control
{
private:
- SvSimpleTable* m_pTable;
+ VclPtr<SvSimpleTable> m_pTable;
protected:
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
public:
SvSimpleTableContainer( vcl::Window* pParent, WinBits nBits = WB_BORDER );
+ virtual ~SvSimpleTableContainer();
+ virtual void dispose() SAL_OVERRIDE;
void SetTable(SvSimpleTable* pTable);
diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx
index be31ee6bafa0..d2c2783601f2 100644
--- a/include/svtools/tabbar.hxx
+++ b/include/svtools/tabbar.hxx
@@ -315,6 +315,8 @@ class SVT_DLLPUBLIC TabBar : public vcl::Window
private:
std::unique_ptr<TabBar_Impl> mpImpl;
+ ImplTabBarList* mpItemList;
+
OUString maEditText;
Color maSelColor;
Color maSelTextColor;
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index cbac8ed98e65..ed81c3700501 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -784,7 +784,7 @@ public:
struct SvLBoxDDInfo
{
Application* pApp;
- SvTreeListBox* pSource;
+ VclPtr<SvTreeListBox> pSource;
SvTreeListEntry* pDDStartEntry;
// Relative position in the Entry at DragBeginn (IconView)
long nMouseRelX,nMouseRelY;
@@ -797,7 +797,7 @@ class SvInplaceEdit2
Accelerator aAccReturn;
Accelerator aAccEscape;
Idle aIdle;
- Edit* pEdit;
+ VclPtr<Edit> pEdit;
bool bCanceled;
bool bAlreadyInCallBack;
diff --git a/include/svtools/wizardmachine.hxx b/include/svtools/wizardmachine.hxx
index 053acdce08a2..7a83cbdd40b5 100644
--- a/include/svtools/wizardmachine.hxx
+++ b/include/svtools/wizardmachine.hxx
@@ -155,15 +155,14 @@ namespace svt
// So use the travelXXX methods if you need to travel
protected:
- OKButton* m_pFinish;
- CancelButton* m_pCancel;
- PushButton* m_pNextPage;
- PushButton* m_pPrevPage;
- HelpButton* m_pHelp;
+ VclPtr<OKButton> m_pFinish;
+ VclPtr<CancelButton> m_pCancel;
+ VclPtr<PushButton> m_pNextPage;
+ VclPtr<PushButton> m_pPrevPage;
+ VclPtr<HelpButton> m_pHelp;
private:
- WizardMachineImplData*
- m_pImpl;
+ WizardMachineImplData* m_pImpl;
// hold members in this structure to allow keeping compatible when members are added
SVT_DLLPRIVATE void addButtons(vcl::Window* _pParent, sal_uInt32 _nButtonFlags);
diff --git a/include/svtools/wizdlg.hxx b/include/svtools/wizdlg.hxx
index 498aa9c437ed..9ae52d1b366c 100644
--- a/include/svtools/wizdlg.hxx
+++ b/include/svtools/wizdlg.hxx
@@ -202,10 +202,10 @@ private:
Size maPageSize;
ImplWizPageData* mpFirstPage;
ImplWizButtonData* mpFirstBtn;
- TabPage* mpCurTabPage;
- PushButton* mpPrevBtn;
- PushButton* mpNextBtn;
- vcl::Window* mpViewWindow;
+ VclPtr<TabPage> mpCurTabPage;
+ VclPtr<PushButton> mpPrevBtn;
+ VclPtr<PushButton> mpNextBtn;
+ VclPtr<vcl::Window> mpViewWindow;
sal_uInt16 mnCurLevel;
WindowAlign meViewAlign;
Link maActivateHdl;
@@ -273,7 +273,7 @@ public:
PushButton* GetNextButton() const { return mpNextBtn; }
void SetViewWindow( vcl::Window* pWindow ) { mpViewWindow = pWindow; }
- vcl::Window* GetViewWindow() const { return mpViewWindow; }
+ vcl::Window* GetViewWindow() const { return mpViewWindow; }
void SetViewAlign( WindowAlign eAlign ) { meViewAlign = eAlign; }
WindowAlign GetViewAlign() const { return meViewAlign; }
diff --git a/include/svx/AccessibleShapeTreeInfo.hxx b/include/svx/AccessibleShapeTreeInfo.hxx
index ec316f2498bb..deacfd385c28 100644
--- a/include/svx/AccessibleShapeTreeInfo.hxx
+++ b/include/svx/AccessibleShapeTreeInfo.hxx
@@ -26,6 +26,7 @@
#include <com/sun/star/frame/XController.hpp>
#include <svx/IAccessibleViewForwarder.hxx>
#include <svx/svxdllapi.h>
+#include <vcl/vclptr.hxx>
class SdrView;
namespace vcl { class Window; }
@@ -188,7 +189,7 @@ private:
/** This window is necessary to construct an SvxTextEditSource which in
turn is used to create an accessible edit engine.
*/
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
/** The view forwarder allows the transformation between internal
and pixel coordinates and can be asked for the visible area.
diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx
index 52e4f1574c4f..41f93b7456bb 100644
--- a/include/svx/bmpmask.hxx
+++ b/include/svx/bmpmask.hxx
@@ -81,33 +81,33 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
friend class MaskData;
friend class MaskSet;
- ToolBox* m_pTbxPipette;
- ColorWindow* m_pCtlPipette;
- PushButton* m_pBtnExec;
-
- CheckBox* m_pCbx1;
- MaskSet* m_pQSet1;
- MetricField* m_pSp1;
- ColorLB* m_pLbColor1;
-
- CheckBox* m_pCbx2;
- MaskSet* m_pQSet2;
- MetricField* m_pSp2;
- ColorLB* m_pLbColor2;
-
- CheckBox* m_pCbx3;
- MaskSet* m_pQSet3;
- MetricField* m_pSp3;
- ColorLB* m_pLbColor3;
-
- CheckBox* m_pCbx4;
- MaskSet* m_pQSet4;
- MetricField* m_pSp4;
- ColorLB* m_pLbColor4;
+ VclPtr<ToolBox> m_pTbxPipette;
+ VclPtr<ColorWindow> m_pCtlPipette;
+ VclPtr<PushButton> m_pBtnExec;
+
+ VclPtr<CheckBox> m_pCbx1;
+ VclPtr<MaskSet> m_pQSet1;
+ VclPtr<MetricField> m_pSp1;
+ VclPtr<ColorLB> m_pLbColor1;
+
+ VclPtr<CheckBox> m_pCbx2;
+ VclPtr<MaskSet> m_pQSet2;
+ VclPtr<MetricField> m_pSp2;
+ VclPtr<ColorLB> m_pLbColor2;
+
+ VclPtr<CheckBox> m_pCbx3;
+ VclPtr<MaskSet> m_pQSet3;
+ VclPtr<MetricField> m_pSp3;
+ VclPtr<ColorLB> m_pLbColor3;
+
+ VclPtr<CheckBox> m_pCbx4;
+ VclPtr<MaskSet> m_pQSet4;
+ VclPtr<MetricField> m_pSp4;
+ VclPtr<ColorLB> m_pLbColor4;
MaskData* pData;
- CheckBox* m_pCbxTrans;
- ColorLB* m_pLbColorTrans;
+ VclPtr<CheckBox> m_pCbxTrans;
+ VclPtr<ColorLB> m_pLbColorTrans;
XColorListRef pColLst;
Color aPipetteColor;
diff --git a/include/svx/compressgraphicdialog.hxx b/include/svx/compressgraphicdialog.hxx
index 83e1f6607a37..7cbf1b2db7ff 100644
--- a/include/svx/compressgraphicdialog.hxx
+++ b/include/svx/compressgraphicdialog.hxx
@@ -33,22 +33,22 @@ class SdrGrafObj;
class SVX_DLLPUBLIC CompressGraphicsDialog : public ModalDialog
{
private:
- FixedText* m_pLabelGraphicType;
- FixedText* m_pFixedText2;
- FixedText* m_pFixedText3;
- FixedText* m_pFixedText5;
- FixedText* m_pFixedText6;
-
- CheckBox* m_pReduceResolutionCB;
- NumericField* m_pMFNewWidth;
- NumericField* m_pMFNewHeight;
- ComboBox* m_pResolutionLB;
- RadioButton* m_pLosslessRB;
- RadioButton* m_pJpegCompRB;
- NumericField* m_pCompressionMF;
- NumericField* m_pQualityMF;
- PushButton* m_pBtnCalculate;
- ListBox* m_pInterpolationCombo;
+ VclPtr<FixedText> m_pLabelGraphicType;
+ VclPtr<FixedText> m_pFixedText2;
+ VclPtr<FixedText> m_pFixedText3;
+ VclPtr<FixedText> m_pFixedText5;
+ VclPtr<FixedText> m_pFixedText6;
+
+ VclPtr<CheckBox> m_pReduceResolutionCB;
+ VclPtr<NumericField> m_pMFNewWidth;
+ VclPtr<NumericField> m_pMFNewHeight;
+ VclPtr<ComboBox> m_pResolutionLB;
+ VclPtr<RadioButton> m_pLosslessRB;
+ VclPtr<RadioButton> m_pJpegCompRB;
+ VclPtr<NumericField> m_pCompressionMF;
+ VclPtr<NumericField> m_pQualityMF;
+ VclPtr<PushButton> m_pBtnCalculate;
+ VclPtr<ListBox> m_pInterpolationCombo;
SdrGrafObj* m_pGraphicObj;
Graphic m_aGraphic;
@@ -83,6 +83,8 @@ private:
public:
CompressGraphicsDialog( vcl::Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings );
CompressGraphicsDialog( vcl::Window* pParent, Graphic& rGraphic, Size rViewSize100mm, Rectangle& rCropRectangle, SfxBindings& rBindings );
+ virtual ~CompressGraphicsDialog();
+ virtual void dispose() SAL_OVERRIDE;
SdrGrafObj* GetCompressedSdrGrafObj();
Graphic GetCompressedGraphic();
diff --git a/include/svx/contdlg.hxx b/include/svx/contdlg.hxx
index 064d0038d468..a6725de153f2 100644
--- a/include/svx/contdlg.hxx
+++ b/include/svx/contdlg.hxx
@@ -64,17 +64,19 @@ class SVX_DLLPUBLIC SvxContourDlg : public SfxFloatingWindow
{
using Window::Update;
- SvxSuperContourDlg* pSuperClass;
+ VclPtr<SvxSuperContourDlg> pSuperClass;
protected:
- void SetSuperClass( SvxSuperContourDlg& rSuperClass ) { pSuperClass = &rSuperClass; }
+ void SetSuperClass( SvxSuperContourDlg& rSuperClass );
public:
SvxContourDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
vcl::Window* pParent);
+ virtual ~SvxContourDlg();
+ virtual void dispose() SAL_OVERRIDE;
const Graphic& GetGraphic() const;
bool IsGraphicChanged() const;
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index f5519bdfe462..3639245fddd0 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -180,25 +180,25 @@ private:
Link aRefLink;
Link aModifyComLink;
- SvxRedlinTable* pRedlinTable;
- CheckBox* m_pCbDate;
- ListBox* m_pLbDate;
- DateField* m_pDfDate;
- TimeField* m_pTfDate;
- PushButton* m_pIbClock;
- FixedText* m_pFtDate2;
- DateField* m_pDfDate2;
- TimeField* m_pTfDate2;
- PushButton* m_pIbClock2;
- CheckBox* m_pCbAuthor;
- ListBox* m_pLbAuthor;
- CheckBox* m_pCbRange;
- Edit* m_pEdRange;
- PushButton* m_pBtnRange;
- CheckBox* m_pCbAction;
- ListBox* m_pLbAction;
- CheckBox* m_pCbComment;
- Edit* m_pEdComment;
+ VclPtr<SvxRedlinTable> pRedlinTable;
+ VclPtr<CheckBox> m_pCbDate;
+ VclPtr<ListBox> m_pLbDate;
+ VclPtr<DateField> m_pDfDate;
+ VclPtr<TimeField> m_pTfDate;
+ VclPtr<PushButton> m_pIbClock;
+ VclPtr<FixedText> m_pFtDate2;
+ VclPtr<DateField> m_pDfDate2;
+ VclPtr<TimeField> m_pTfDate2;
+ VclPtr<PushButton> m_pIbClock2;
+ VclPtr<CheckBox> m_pCbAuthor;
+ VclPtr<ListBox> m_pLbAuthor;
+ VclPtr<CheckBox> m_pCbRange;
+ VclPtr<Edit> m_pEdRange;
+ VclPtr<PushButton> m_pBtnRange;
+ VclPtr<CheckBox> m_pCbAction;
+ VclPtr<ListBox> m_pLbAction;
+ VclPtr<CheckBox> m_pCbComment;
+ VclPtr<Edit> m_pEdComment;
bool bModified;
DECL_LINK( SelDateHdl, ListBox* );
@@ -216,6 +216,8 @@ protected:
public:
SvxTPFilter( vcl::Window * pParent);
+ virtual ~SvxTPFilter();
+ virtual void dispose() SAL_OVERRIDE;
virtual void DeactivatePage() SAL_OVERRIDE;
void SetRedlinTable(SvxRedlinTable*);
@@ -305,12 +307,12 @@ private:
Link RejectAllClickLk;
Link UndoClickLk;
- SvxRedlinTable* m_pViewData;
- PushButton* m_pAccept;
- PushButton* m_pReject;
- PushButton* m_pAcceptAll;
- PushButton* m_pRejectAll;
- PushButton* m_pUndo;
+ VclPtr<SvxRedlinTable> m_pViewData;
+ VclPtr<PushButton> m_pAccept;
+ VclPtr<PushButton> m_pReject;
+ VclPtr<PushButton> m_pAcceptAll;
+ VclPtr<PushButton> m_pRejectAll;
+ VclPtr<PushButton> m_pUndo;
bool bEnableAccept;
bool bEnableAcceptAll;
@@ -374,8 +376,8 @@ class SVX_DLLPUBLIC SvxAcceptChgCtr
{
private:
- SvxTPFilter* pTPFilter;
- SvxTPView* pTPView;
+ VclPtr<SvxTPFilter> pTPFilter;
+ VclPtr<SvxTPView> pTPView;
sal_uInt16 m_nViewPageId;
sal_uInt16 m_nFilterPageId;
diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx
index a2bc07462921..58ae42a3b8d7 100644
--- a/include/svx/dialcontrol.hxx
+++ b/include/svx/dialcontrol.hxx
@@ -128,7 +128,7 @@ protected:
std::unique_ptr<DialControlBmp> mxBmpDisabled;
std::unique_ptr<DialControlBmp> mxBmpBuffered;
Link maModifyHdl;
- NumericField* mpLinkField;
+ VclPtr<NumericField> mpLinkField;
sal_Int32 mnLinkedFieldValueMultiplyer;
Size maWinSize;
vcl::Font maWinFont;
diff --git a/include/svx/fillctrl.hxx b/include/svx/fillctrl.hxx
index 1c164cd30575..fd7e5a0985d6 100644
--- a/include/svx/fillctrl.hxx
+++ b/include/svx/fillctrl.hxx
@@ -50,9 +50,9 @@ private:
XFillHatchItem* mpHatchItem;
XFillBitmapItem* mpBitmapItem;
- FillControl* mpFillControl;
- SvxFillTypeBox* mpFillTypeLB;
- SvxFillAttrBox* mpFillAttrLB;
+ VclPtr<FillControl> mpFillControl;
+ VclPtr<SvxFillTypeBox> mpFillTypeLB;
+ VclPtr<SvxFillAttrBox> mpFillAttrLB;
css::drawing::FillStyle meLastXFS;
@@ -77,8 +77,8 @@ class FillControl : public vcl::Window
private:
friend class SvxFillToolBoxControl;
- SvxFillTypeBox* mpLbFillType;
- SvxFillAttrBox* mpLbFillAttr;
+ VclPtr<SvxFillTypeBox> mpLbFillType;
+ VclPtr<SvxFillAttrBox> mpLbFillAttr;
Size maLogicalFillSize;
Size maLogicalAttrSize;
diff --git a/include/svx/fmshell.hxx b/include/svx/fmshell.hxx
index 5c568ded8ed5..b229cb4e1c42 100644
--- a/include/svx/fmshell.hxx
+++ b/include/svx/fmshell.hxx
@@ -89,7 +89,7 @@ class SVX_DLLPUBLIC FmFormShell : public SfxShell
class FormShellWaitObject
{
- vcl::Window* m_pWindow;
+ VclPtr<vcl::Window> m_pWindow;
public:
FormShellWaitObject(const FmFormShell* _pShell);
~FormShellWaitObject();
diff --git a/include/svx/fontworkgallery.hxx b/include/svx/fontworkgallery.hxx
index c2521a7a81f4..6f24ccb4b272 100644
--- a/include/svx/fontworkgallery.hxx
+++ b/include/svx/fontworkgallery.hxx
@@ -64,10 +64,12 @@ public:
class FontworkCharacterSpacingDialog : public ModalDialog
{
- MetricField* m_pMtrScale;
+ VclPtr<MetricField> m_pMtrScale;
public:
FontworkCharacterSpacingDialog( vcl::Window* pParent, sal_Int32 nScale );
+ virtual ~FontworkCharacterSpacingDialog();
+ virtual void dispose() SAL_OVERRIDE;
sal_Int32 getScale() const;
};
@@ -75,8 +77,8 @@ public:
class SVX_DLLPUBLIC FontWorkGalleryDialog : public ModalDialog
{
- ValueSet* mpCtlFavorites;
- OKButton* mpOKButton;
+ VclPtr<ValueSet> mpCtlFavorites;
+ VclPtr<OKButton> mpOKButton;
sal_uInt16 mnThemeId;
@@ -98,6 +100,8 @@ class SVX_DLLPUBLIC FontWorkGalleryDialog : public ModalDialog
public:
FontWorkGalleryDialog( SdrView* pView, vcl::Window* pParent, sal_uInt16 nSID );
+ virtual ~FontWorkGalleryDialog();
+ virtual void dispose() SAL_OVERRIDE;
// SJ: if the SdrObject** is set, the SdrObject is not inserted into the page when executing the dialog
void SetSdrObjectRef( SdrObject**, SdrModel* pModel );
diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
index 719c5aa73033..53a7625507cd 100644
--- a/include/svx/hdft.hxx
+++ b/include/svx/hdft.hxx
@@ -70,22 +70,22 @@ protected:
SvxHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId );
- FixedText* m_pPageLbl;
- CheckBox* m_pTurnOnBox;
- CheckBox* m_pCntSharedBox;
- CheckBox* m_pCntSharedFirstBox;
- FixedText* m_pLMLbl;
- MetricField* m_pLMEdit;
- FixedText* m_pRMLbl;
- MetricField* m_pRMEdit;
- FixedText* m_pDistFT;
- MetricField* m_pDistEdit;
- CheckBox* m_pDynSpacingCB;
- FixedText* m_pHeightFT;
- MetricField* m_pHeightEdit;
- CheckBox* m_pHeightDynBtn;
- SvxPageWindow* m_pBspWin;
- PushButton* m_pBackgroundBtn;
+ VclPtr<FixedText> m_pPageLbl;
+ VclPtr<CheckBox> m_pTurnOnBox;
+ VclPtr<CheckBox> m_pCntSharedBox;
+ VclPtr<CheckBox> m_pCntSharedFirstBox;
+ VclPtr<FixedText> m_pLMLbl;
+ VclPtr<MetricField> m_pLMEdit;
+ VclPtr<FixedText> m_pRMLbl;
+ VclPtr<MetricField> m_pRMEdit;
+ VclPtr<FixedText> m_pDistFT;
+ VclPtr<MetricField> m_pDistEdit;
+ VclPtr<CheckBox> m_pDynSpacingCB;
+ VclPtr<FixedText> m_pHeightFT;
+ VclPtr<MetricField> m_pHeightEdit;
+ VclPtr<CheckBox> m_pHeightDynBtn;
+ VclPtr<SvxPageWindow> m_pBspWin;
+ VclPtr<PushButton> m_pBackgroundBtn;
sal_uInt16 nId;
SfxItemSet* pBBSet;
diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx
index d21dc4230a90..fc0b758d3c37 100644
--- a/include/svx/imapdlg.hxx
+++ b/include/svx/imapdlg.hxx
@@ -82,14 +82,14 @@ class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow
friend class IMapOwnData;
friend class IMapWindow;
- ToolBox *m_pTbxIMapDlg1;
- FixedText *m_pFtURL;
- SvtURLBox *m_pURLBox;
- FixedText *m_pFtText;
- Edit *m_pEdtText;
- FixedText *m_pFtTarget;
- ComboBox *m_pCbbTarget;
- StatusBar *m_pStbStatus;
+ VclPtr<ToolBox> m_pTbxIMapDlg1;
+ VclPtr<FixedText> m_pFtURL;
+ VclPtr<SvtURLBox> m_pURLBox;
+ VclPtr<FixedText> m_pFtText;
+ VclPtr<Edit> m_pEdtText;
+ VclPtr<FixedText> m_pFtTarget;
+ VclPtr<ComboBox> m_pCbbTarget;
+ VclPtr<StatusBar> m_pStbStatus;
sal_uInt16 mnApplyId;
sal_uInt16 mnOpenId;
@@ -110,7 +110,7 @@ class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow
sal_uInt16 mnPropertyId;
Size aLastSize;
- IMapWindow* pIMapWnd;
+ VclPtr<IMapWindow> pIMapWnd;
IMapOwnData* pOwnData;
void* pCheckObj;
SvxIMapDlgItem aIMapItem;
diff --git a/include/svx/lboxctrl.hxx b/include/svx/lboxctrl.hxx
index 30a21b37f71a..3fed04437320 100644
--- a/include/svx/lboxctrl.hxx
+++ b/include/svx/lboxctrl.hxx
@@ -34,7 +34,7 @@ class SvxListBoxControl : public SfxToolBoxControl
{
protected:
OUString aActionStr;
- SvxPopupWindowListBox * pPopupWin;
+ VclPtr<SvxPopupWindowListBox> pPopupWin;
void Impl_SetInfo( sal_uInt16 nCount );
diff --git a/include/svx/linkwarn.hxx b/include/svx/linkwarn.hxx
index 395b1b6f6367..b832637fc8b9 100644
--- a/include/svx/linkwarn.hxx
+++ b/include/svx/linkwarn.hxx
@@ -27,7 +27,7 @@
class SVX_DLLPUBLIC SvxLinkWarningDialog : public MessageDialog
{
private:
- CheckBox* m_pWarningOnBox;
+ VclPtr<CheckBox> m_pWarningOnBox;
public:
SvxLinkWarningDialog(vcl::Window* pParent, const OUString& _rFileName);
diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index 1d6e62b6c0f5..29e7b6224ac7 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -101,6 +101,8 @@ class SVX_DLLPUBLIC SvxGridTabPage : public SfxTabPage
public:
SvxGridTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~SvxGridTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet& rAttrSet );
@@ -111,30 +113,30 @@ public:
virtual int DeactivatePage( SfxItemSet* pSet ) SAL_OVERRIDE;
private:
- CheckBox* pCbxUseGridsnap;
- CheckBox* pCbxGridVisible;
+ VclPtr<CheckBox> pCbxUseGridsnap;
+ VclPtr<CheckBox> pCbxGridVisible;
- MetricField* pMtrFldDrawX;
- MetricField* pMtrFldDrawY;
+ VclPtr<MetricField> pMtrFldDrawX;
+ VclPtr<MetricField> pMtrFldDrawY;
- NumericField* pNumFldDivisionX;
- NumericField* pNumFldDivisionY;
+ VclPtr<NumericField> pNumFldDivisionX;
+ VclPtr<NumericField> pNumFldDivisionY;
- CheckBox* pCbxSynchronize;
+ VclPtr<CheckBox> pCbxSynchronize;
protected:
//these controls are used in draw and impress
- VclContainer* pSnapFrames;
- CheckBox* pCbxSnapHelplines;
- CheckBox* pCbxSnapBorder;
- CheckBox* pCbxSnapFrame;
- CheckBox* pCbxSnapPoints;
- MetricField* pMtrFldSnapArea;
-
- CheckBox* pCbxOrtho;
- CheckBox* pCbxBigOrtho;
- CheckBox* pCbxRotate;
- MetricField* pMtrFldAngle;
- MetricField* pMtrFldBezAngle;
+ VclPtr<VclContainer> pSnapFrames;
+ VclPtr<CheckBox> pCbxSnapHelplines;
+ VclPtr<CheckBox> pCbxSnapBorder;
+ VclPtr<CheckBox> pCbxSnapFrame;
+ VclPtr<CheckBox> pCbxSnapPoints;
+ VclPtr<MetricField> pMtrFldSnapArea;
+
+ VclPtr<CheckBox> pCbxOrtho;
+ VclPtr<CheckBox> pCbxBigOrtho;
+ VclPtr<CheckBox> pCbxRotate;
+ VclPtr<MetricField> pMtrFldAngle;
+ VclPtr<MetricField> pMtrFldBezAngle;
private:
bool bAttrModified;
diff --git a/include/svx/passwd.hxx b/include/svx/passwd.hxx
index 901488c0fc26..89fbbded5221 100644
--- a/include/svx/passwd.hxx
+++ b/include/svx/passwd.hxx
@@ -33,12 +33,12 @@
class SVX_DLLPUBLIC SvxPasswordDialog : public SfxModalDialog
{
private:
- FixedText* m_pOldFL;
- FixedText* m_pOldPasswdFT;
- Edit* m_pOldPasswdED;
- Edit* m_pNewPasswdED;
- Edit* m_pRepeatPasswdED;
- OKButton* m_pOKBtn;
+ VclPtr<FixedText> m_pOldFL;
+ VclPtr<FixedText> m_pOldPasswdFT;
+ VclPtr<Edit> m_pOldPasswdED;
+ VclPtr<Edit> m_pNewPasswdED;
+ VclPtr<Edit> m_pRepeatPasswdED;
+ VclPtr<OKButton> m_pOKBtn;
OUString aOldPasswdErrStr;
OUString aRepeatPasswdErrStr;
@@ -52,6 +52,8 @@ private:
public:
SvxPasswordDialog( vcl::Window* pParent, bool bAllowEmptyPasswords = false, bool bDisableOldPassword = false );
+ virtual ~SvxPasswordDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetOldPassword() const { return m_pOldPasswdED->GetText(); }
OUString GetNewPassword() const { return m_pNewPasswdED->GetText(); }
diff --git a/include/svx/rubydialog.hxx b/include/svx/rubydialog.hxx
index 793fa887c96d..5441c212519f 100644
--- a/include/svx/rubydialog.hxx
+++ b/include/svx/rubydialog.hxx
@@ -44,10 +44,12 @@ class RubyPreview : public vcl::Window
{
protected:
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
- SvxRubyDialog* m_pParentDlg;
+ VclPtr<SvxRubyDialog> m_pParentDlg;
public:
RubyPreview(vcl::Window *pParent);
+ virtual ~RubyPreview();
+ virtual void dispose() SAL_OVERRIDE;
void setRubyDialog(SvxRubyDialog* pParentDlg)
{
m_pParentDlg = pParentDlg;
@@ -89,33 +91,33 @@ class SvxRubyDialog : public SfxModelessDialog
{
friend class RubyPreview;
- FixedText* m_pLeftFT;
- FixedText* m_pRightFT;
- RubyEdit* m_pLeft1ED;
- RubyEdit* m_pRight1ED;
- RubyEdit* m_pLeft2ED;
- RubyEdit* m_pRight2ED;
- RubyEdit* m_pLeft3ED;
- RubyEdit* m_pRight3ED;
- RubyEdit* m_pLeft4ED;
- RubyEdit* m_pRight4ED;
+ VclPtr<FixedText> m_pLeftFT;
+ VclPtr<FixedText> m_pRightFT;
+ VclPtr<RubyEdit> m_pLeft1ED;
+ VclPtr<RubyEdit> m_pRight1ED;
+ VclPtr<RubyEdit> m_pLeft2ED;
+ VclPtr<RubyEdit> m_pRight2ED;
+ VclPtr<RubyEdit> m_pLeft3ED;
+ VclPtr<RubyEdit> m_pRight3ED;
+ VclPtr<RubyEdit> m_pLeft4ED;
+ VclPtr<RubyEdit> m_pRight4ED;
- RubyEdit* aEditArr[8];
- VclScrolledWindow* m_pScrolledWindow;
- ScrollBar* m_pScrollSB;
+ VclPtr<RubyEdit> aEditArr[8];
+ VclPtr<VclScrolledWindow> m_pScrolledWindow;
+ VclPtr<ScrollBar> m_pScrollSB;
- ListBox* m_pAdjustLB;
+ VclPtr<ListBox> m_pAdjustLB;
- ListBox* m_pPositionLB;
+ VclPtr<ListBox> m_pPositionLB;
- FixedText* m_pCharStyleFT;
- ListBox* m_pCharStyleLB;
- PushButton* m_pStylistPB;
+ VclPtr<FixedText> m_pCharStyleFT;
+ VclPtr<ListBox> m_pCharStyleLB;
+ VclPtr<PushButton> m_pStylistPB;
- RubyPreview* m_pPreviewWin;
+ VclPtr<RubyPreview> m_pPreviewWin;
- PushButton* m_pApplyPB;
- PushButton* m_pClosePB;
+ VclPtr<PushButton> m_pApplyPB;
+ VclPtr<PushButton> m_pClosePB;
long nLastPos;
long nCurrentEdit;
diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx
index 9a1195d95875..4c598782d622 100644
--- a/include/svx/ruler.hxx
+++ b/include/svx/ruler.hxx
@@ -57,7 +57,7 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
std::unique_ptr<SvxColumnItem> mxColumnItem; // columns
std::unique_ptr<SvxObjectItem> mxObjectItem; // object
- vcl::Window* pEditWin;
+ VclPtr<vcl::Window> pEditWin;
std::unique_ptr<SvxRuler_Impl> mxRulerImpl;
diff --git a/include/svx/sidebar/Popup.hxx b/include/svx/sidebar/Popup.hxx
index e11e8c1ee6b0..063e8e6f1e84 100644
--- a/include/svx/sidebar/Popup.hxx
+++ b/include/svx/sidebar/Popup.hxx
@@ -22,6 +22,7 @@
#include <svx/svxdllapi.h>
#include <rtl/ustring.hxx>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
#include <boost/function.hpp>
@@ -89,7 +90,7 @@ protected:
void CreateContainerAndControl (void);
private:
- vcl::Window* mpParent;
+ VclPtr<vcl::Window> mpParent;
::boost::function<PopupControl*(PopupContainer*)> maControlCreator;
::boost::function<void(void)> maPopupModeEndCallback;
const ::rtl::OUString msAccessibleName;
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 35e259b5988a..af4d54217e5c 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -89,7 +89,7 @@ enum SearchLabel
class SvxSearchDialog;
class SVX_DLLPUBLIC SvxSearchDialogWrapper : public SfxChildWindow
{
- SvxSearchDialog *dialog;
+ VclPtr<SvxSearchDialog> dialog;
public:
SvxSearchDialogWrapper( vcl::Window*pParent, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo );
@@ -151,57 +151,57 @@ public:
void SetSearchLabel(const OUString& rStr) { m_pSearchLabel->SetText(rStr); }
private:
- vcl::Window* mpDocWin;
+ VclPtr<vcl::Window> mpDocWin;
bool mbSuccess;
- VclFrame* m_pSearchFrame;
- ComboBox* m_pSearchLB;
- ListBox* m_pSearchTmplLB;
- FixedText* m_pSearchAttrText;
- FixedText* m_pSearchLabel;
-
- VclFrame* m_pReplaceFrame;
- ComboBox* m_pReplaceLB;
- ListBox* m_pReplaceTmplLB;
- FixedText* m_pReplaceAttrText;
-
- PushButton* m_pSearchBtn;
- PushButton* m_pSearchAllBtn;
- PushButton* m_pReplaceBtn;
- PushButton* m_pReplaceAllBtn;
-
- VclFrame* m_pComponentFrame;
- PushButton* m_pSearchComponent1PB;
- PushButton* m_pSearchComponent2PB;
-
- CheckBox* m_pMatchCaseCB;
- CheckBox* m_pWordBtn;
-
- PushButton* m_pCloseBtn;
- CheckBox* m_pIgnoreDiacritics;
- CheckBox* m_pIgnoreKashida;
- CheckBox* m_pSelectionBtn;
- CheckBox* m_pBackwardsBtn;
- CheckBox* m_pRegExpBtn;
- CheckBox* m_pSimilarityBox;
- PushButton* m_pSimilarityBtn;
- CheckBox* m_pLayoutBtn;
- CheckBox* m_pNotesBtn;
- CheckBox* m_pJapMatchFullHalfWidthCB;
- CheckBox* m_pJapOptionsCB;
- PushButton* m_pJapOptionsBtn;
-
- PushButton* m_pAttributeBtn;
- PushButton* m_pFormatBtn;
- PushButton* m_pNoFormatBtn;
-
- VclContainer* m_pCalcGrid;
- FixedText* m_pCalcSearchInFT;
- ListBox* m_pCalcSearchInLB;
- FixedText* m_pCalcSearchDirFT;
- RadioButton* m_pRowsBtn;
- RadioButton* m_pColumnsBtn;
- CheckBox* m_pAllSheetsCB;
+ VclPtr<VclFrame> m_pSearchFrame;
+ VclPtr<ComboBox> m_pSearchLB;
+ VclPtr<ListBox> m_pSearchTmplLB;
+ VclPtr<FixedText> m_pSearchAttrText;
+ VclPtr<FixedText> m_pSearchLabel;
+
+ VclPtr<VclFrame> m_pReplaceFrame;
+ VclPtr<ComboBox> m_pReplaceLB;
+ VclPtr<ListBox> m_pReplaceTmplLB;
+ VclPtr<FixedText> m_pReplaceAttrText;
+
+ VclPtr<PushButton> m_pSearchBtn;
+ VclPtr<PushButton> m_pSearchAllBtn;
+ VclPtr<PushButton> m_pReplaceBtn;
+ VclPtr<PushButton> m_pReplaceAllBtn;
+
+ VclPtr<VclFrame> m_pComponentFrame;
+ VclPtr<PushButton> m_pSearchComponent1PB;
+ VclPtr<PushButton> m_pSearchComponent2PB;
+
+ VclPtr<CheckBox> m_pMatchCaseCB;
+ VclPtr<CheckBox> m_pWordBtn;
+
+ VclPtr<PushButton> m_pCloseBtn;
+ VclPtr<CheckBox> m_pIgnoreDiacritics;
+ VclPtr<CheckBox> m_pIgnoreKashida;
+ VclPtr<CheckBox> m_pSelectionBtn;
+ VclPtr<CheckBox> m_pBackwardsBtn;
+ VclPtr<CheckBox> m_pRegExpBtn;
+ VclPtr<CheckBox> m_pSimilarityBox;
+ VclPtr<PushButton> m_pSimilarityBtn;
+ VclPtr<CheckBox> m_pLayoutBtn;
+ VclPtr<CheckBox> m_pNotesBtn;
+ VclPtr<CheckBox> m_pJapMatchFullHalfWidthCB;
+ VclPtr<CheckBox> m_pJapOptionsCB;
+ VclPtr<PushButton> m_pJapOptionsBtn;
+
+ VclPtr<PushButton> m_pAttributeBtn;
+ VclPtr<PushButton> m_pFormatBtn;
+ VclPtr<PushButton> m_pNoFormatBtn;
+
+ VclPtr<VclContainer> m_pCalcGrid;
+ VclPtr<FixedText> m_pCalcSearchInFT;
+ VclPtr<ListBox> m_pCalcSearchInLB;
+ VclPtr<FixedText> m_pCalcSearchDirFT;
+ VclPtr<RadioButton> m_pRowsBtn;
+ VclPtr<RadioButton> m_pColumnsBtn;
+ VclPtr<CheckBox> m_pAllSheetsCB;
SfxBindings& rBindings;
bool bWriter;
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index fb30ff7a428e..4cd05fae0d53 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -66,12 +66,12 @@ protected:
SdrPageView* pTextEditPV;
SdrOutliner* pTextEditOutliner; // outliner for the TextEdit
OutlinerView* pTextEditOutlinerView; // current view of the outliners
- vcl::Window* pTextEditWin; // matching window to pTextEditOutlinerView
+ VclPtr<vcl::Window> pTextEditWin; // matching window to pTextEditOutlinerView
vcl::Cursor* pTextEditCursorMerker; // to restore the cursor in each window
ImpSdrEditPara* pEditPara; // trashbin for everything else to stay compatible
SdrObject* pMacroObj;
SdrPageView* pMacroPV;
- vcl::Window* pMacroWin;
+ VclPtr<vcl::Window> pMacroWin;
Rectangle aTextEditArea;
Rectangle aMinTextEditArea;
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index 2bde92fcb243..0959f1c239ab 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -133,7 +133,7 @@ class SVX_DLLPUBLIC SdrPaintView : public SfxListener, public SfxRepeatTarget, p
protected:
SdrModel* pMod;
#ifdef DBG_UTIL
- SdrItemBrowser* pItemBrowser;
+ VclPtr<SdrItemBrowser> pItemBrowser;
#endif
const OutputDevice* pActualOutDev; // Nur zum vergleichen
OutputDevice* pDragWin;
@@ -516,7 +516,7 @@ public:
// bei bShow=sal_False wird der Browser destruiert
#ifdef DBG_UTIL
void ShowItemBrowser(bool bShow=true);
- bool IsItemBrowserVisible() const { return pItemBrowser!=NULL && GetItemBrowser()->IsVisible(); }
+ bool IsItemBrowserVisible() const { return pItemBrowser!=nullptr && GetItemBrowser()->IsVisible(); }
vcl::Window* GetItemBrowser() const;
#endif
diff --git a/include/svx/tbxcolorupdate.hxx b/include/svx/tbxcolorupdate.hxx
index 343d0fe768f5..9f00d1386a64 100644
--- a/include/svx/tbxcolorupdate.hxx
+++ b/include/svx/tbxcolorupdate.hxx
@@ -24,6 +24,7 @@
#include <tools/gen.hxx>
#include <tools/color.hxx>
+#include <vcl/vclptr.hxx>
class ToolBox;
class VirtualDevice;
@@ -44,8 +45,8 @@ namespace svx
{
public:
ToolboxButtonColorUpdater( sal_uInt16 nSlotId,
- sal_uInt16 nTbxBtnId,
- ToolBox* ptrTbx);
+ sal_uInt16 nTbxBtnId,
+ ToolBox* ptrTbx);
~ToolboxButtonColorUpdater();
void Update( const Color& rColor );
@@ -53,7 +54,7 @@ namespace svx
private:
sal_uInt16 mnBtnId;
sal_uInt16 mnSlotId;
- ToolBox* mpTbx;
+ VclPtr<ToolBox> mpTbx;
Color maCurColor;
Rectangle maUpdRect;
Size maBmpSize;
diff --git a/include/tools/errinf.hxx b/include/tools/errinf.hxx
index a16b56a179f4..ae6e14015e9c 100644
--- a/include/tools/errinf.hxx
+++ b/include/tools/errinf.hxx
@@ -27,6 +27,7 @@
#include <tools/rtti.hxx>
#include <tools/errcode.hxx>
#include <tools/toolsdllapi.h>
+#include <vcl/vclptr.hxx>
class EDcr_Impl;
class ErrHdl_Impl;
@@ -121,14 +122,14 @@ class TOOLS_DLLPUBLIC ErrorContext
private:
ErrorContext* pNext;
- vcl::Window* pWin;
+ VclPtr<vcl::Window> pWin;
public:
ErrorContext(vcl::Window *pWin=0);
virtual ~ErrorContext();
virtual bool GetString( sal_uIntPtr nErrId, OUString& rCtxStr ) = 0;
- vcl::Window* GetParent() { return pWin; }
+ vcl::Window* GetParent() { return pWin; }
static ErrorContext* GetContext();
};
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index aba3f0889e60..cdf2a9dd9a21 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -60,7 +60,7 @@ public:
void disposeBuilder();
//sID must exist and be of type T
- template <typename T> T* get(T*& ret, const OString& sID);
+ template <typename T> T* get(VclPtr<T>& ret, const OString& sID);
//sID may not exist, but must be of type T if it does
template <typename T /*= vcl::Window if we had c++11*/> T* get(const OString& sID);
@@ -266,7 +266,7 @@ private:
}
};
- typedef std::map< vcl::Window*, stringmap> AtkMap;
+ typedef std::map< VclPtr<vcl::Window>, stringmap> AtkMap;
struct ParserState
{
@@ -293,7 +293,7 @@ private:
Translations m_aTranslations;
- std::map< vcl::Window*, vcl::Window*> m_aRedundantParentWidgets;
+ std::map< VclPtr<vcl::Window>, VclPtr<vcl::Window> > m_aRedundantParentWidgets;
std::vector<SizeGroup> m_aSizeGroups;
@@ -301,13 +301,11 @@ private:
std::vector<MnemonicWidgetMap> m_aMnemonicWidgetMaps;
- std::vector<VclExpander*> m_aExpanderWidgets;
+ std::vector< VclPtr<VclExpander> > m_aExpanderWidgets;
sal_uInt16 m_nLastToolbarId;
- ParserState()
- : m_nLastToolbarId(0)
- {}
+ ParserState();
};
void loadTranslations(const LanguageTag &rLanguageTag, const OUString &rUri);
@@ -316,7 +314,7 @@ private:
OString m_sID;
OString m_sHelpRoot;
ResHookProc m_pStringReplace;
- vcl::Window *m_pParent;
+ VclPtr<vcl::Window> m_pParent;
bool m_bToplevelHasDeferredInit;
bool m_bToplevelHasDeferredProperties;
bool m_bToplevelParentFound;
@@ -408,7 +406,7 @@ private:
};
template <typename T>
-inline T* VclBuilder::get(T*& ret, const OString& sID)
+inline T* VclBuilder::get(VclPtr<T>& ret, const OString& sID)
{
vcl::Window *w = get_by_name(sID);
SAL_WARN_IF(!w, "vcl.layout", "widget \"" << sID.getStr() << "\" not found in .ui");
@@ -417,7 +415,7 @@ inline T* VclBuilder::get(T*& ret, const OString& sID)
assert(w);
assert(dynamic_cast<T*>(w));
ret = static_cast<T*>(w);
- return ret;
+ return ret.get();
}
//sID may not exist, but must be of type T if it does
@@ -466,7 +464,7 @@ public:
css::uno::Reference<css::frame::XFrame> getFrame() { return m_pUIBuilder->getFrame(); }
- template <typename T> T* get(T*& ret, const OString& sID)
+ template <typename T> T* get(VclPtr<T>& ret, const OString& sID)
{
return m_pUIBuilder->get<T>(ret, sID);
}
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 124b314f8f4a..de7fbeea9bd7 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -274,7 +274,7 @@ public:
class VCL_DLLPUBLIC RadioButton : public Button
{
private:
- std::shared_ptr< std::vector<RadioButton*> > m_xGroup;
+ std::shared_ptr< std::vector< VclPtr< RadioButton > > > m_xGroup;
Rectangle maStateRect;
Rectangle maMouseRect;
Image maImage;
@@ -389,7 +389,7 @@ public:
on return contains the <code>RadioButton</code>s
in the same group as this <code>RadioButton</code>.
*/
- std::vector<RadioButton*> GetRadioButtonGroup(bool bIncludeThis = true) const;
+ std::vector<VclPtr<RadioButton> > GetRadioButtonGroup(bool bIncludeThis = true) const;
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx
index d36db77d8c9c..678dbc5db491 100644
--- a/include/vcl/combobox.hxx
+++ b/include/vcl/combobox.hxx
@@ -36,9 +36,9 @@ class VCL_DLLPUBLIC ComboBox : public Edit
{
private:
VclPtr<Edit> mpSubEdit;
- ImplListBox* mpImplLB;
- ImplBtn* mpBtn;
- ImplListBoxFloatingWindow* mpFloatWin;
+ VclPtr<ImplListBox> mpImplLB;
+ VclPtr<ImplBtn> mpBtn;
+ VclPtr<ImplListBoxFloatingWindow> mpFloatWin;
sal_uInt16 mnDDHeight;
sal_Unicode mcMultiSep;
bool mbDDAutoSize : 1;
diff --git a/include/vcl/controllayout.hxx b/include/vcl/controllayout.hxx
index 0856a69946b5..f9167244e0a1 100644
--- a/include/vcl/controllayout.hxx
+++ b/include/vcl/controllayout.hxx
@@ -42,9 +42,9 @@ struct VCL_DLLPUBLIC ControlLayoutData
// start indices of lines
std::vector< long > m_aLineIndices;
// notify parent control on destruction
- const Control* m_pParent;
+ VclPtr<const Control> m_pParent;
- ControlLayoutData() : m_pParent( NULL ) {}
+ ControlLayoutData();
~ControlLayoutData();
Rectangle GetCharacterBounds( long nIndex ) const;
diff --git a/include/vcl/cursor.hxx b/include/vcl/cursor.hxx
index 2d3b83c0b119..eecbd0c0ca8a 100644
--- a/include/vcl/cursor.hxx
+++ b/include/vcl/cursor.hxx
@@ -23,6 +23,7 @@
#include <tools/gen.hxx>
#include <tools/link.hxx>
#include <vcl/dllapi.h>
+#include <vcl/vclptr.hxx>
struct ImplCursorData;
namespace vcl { class Window; }
@@ -40,7 +41,7 @@ class VCL_DLLPUBLIC Cursor
{
private:
ImplCursorData* mpData;
- vcl::Window* mpWindow; // only for shadow cursor
+ VclPtr<vcl::Window> mpWindow; // only for shadow cursor
long mnSlant;
Size maSize;
Point maPos;
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index e5a895fdba6e..652a06965e27 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -40,7 +40,7 @@ class VclButtonBox;
class VCL_DLLPUBLIC Dialog : public SystemWindow
{
private:
- Dialog* mpPrevExecuteDlg;
+ VclPtr<Dialog> mpPrevExecuteDlg;
DialogImpl* mpDialogImpl;
long mnMousePositioned;
bool mbInExecute;
diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index 685dcd4624e7..71c81818fa22 100644
--- a/include/vcl/dockwin.hxx
+++ b/include/vcl/dockwin.hxx
@@ -80,12 +80,12 @@ class ImplDockingWindowWrapper
private:
// the original 'Docking'window
- vcl::Window *mpDockingWindow;
+ VclPtr<vcl::Window> mpDockingWindow;
// the original DockingWindow members
- FloatingWindow* mpFloatWin;
- vcl::Window* mpOldBorderWin;
- vcl::Window* mpParent;
+ VclPtr<FloatingWindow> mpFloatWin;
+ VclPtr<vcl::Window> mpOldBorderWin;
+ VclPtr<vcl::Window> mpParent;
Point maFloatPos;
Point maDockPos;
Point maMouseOff;
@@ -225,8 +225,8 @@ class VCL_DLLPUBLIC DockingWindow
{
class ImplData;
private:
- FloatingWindow* mpFloatWin;
- vcl::Window* mpOldBorderWin;
+ VclPtr<FloatingWindow> mpFloatWin;
+ VclPtr<vcl::Window> mpOldBorderWin;
ImplData* mpImplData;
Point maFloatPos;
Point maDockPos;
@@ -261,7 +261,7 @@ private:
mbIsCalculatingInitialLayoutSize:1,
mbInitialLayoutDone:1;
- vcl::Window* mpDialogParent;
+ VclPtr<vcl::Window> mpDialogParent;
SAL_DLLPRIVATE void ImplInitDockingWindowData();
SAL_DLLPRIVATE void setPosSizeOnContainee(Size aSize, Window &rBox);
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index 05a54dc7dfc5..22361a6f910b 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -26,6 +26,7 @@
#include <vcl/keycod.hxx>
#include <vcl/cmdevt.hxx>
#include <vcl/settings.hxx>
+#include <vcl/vclptr.hxx>
class AllSettings;
class OutputDevice;
@@ -411,7 +412,7 @@ enum class MouseNotifyEvent
class VCL_DLLPUBLIC NotifyEvent
{
private:
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
void* mpData;
MouseNotifyEvent mnEventType;
long mnRetValue;
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index fc51b627978e..65baa304b245 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -41,7 +41,7 @@ class LanguageTag;
class VCL_DLLPUBLIC FormatterBase
{
private:
- Edit* mpField;
+ VclPtr<Edit> mpField;
LocaleDataWrapper* mpLocaleDataWrapper;
Link maErrorLink;
bool mbReformat;
diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx
index 19c070ea6c0e..3ba8b2c9fa1c 100644
--- a/include/vcl/fixed.hxx
+++ b/include/vcl/fixed.hxx
@@ -38,7 +38,7 @@ class VCL_DLLPUBLIC FixedText : public Control
private:
sal_Int32 m_nMaxWidthChars;
sal_Int32 m_nMinWidthChars;
- vcl::Window *m_pMnemonicWindow;
+ VclPtr<vcl::Window> m_pMnemonicWindow;
using Control::ImplInitSettings;
using Window::ImplInit;
diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx
index 6c1147d241ce..a9033a22670b 100644
--- a/include/vcl/floatwin.hxx
+++ b/include/vcl/floatwin.hxx
@@ -73,8 +73,8 @@ class VCL_DLLPUBLIC FloatingWindow : public SystemWindow
{
class ImplData;
private:
- FloatingWindow* mpNextFloat;
- vcl::Window* mpFirstPopupModeWin;
+ VclPtr<FloatingWindow> mpNextFloat;
+ VclPtr<vcl::Window> mpFirstPopupModeWin;
ImplData* mpImplData;
Rectangle maFloatRect;
ImplSVEvent * mnPostId;
diff --git a/include/vcl/fltcall.hxx b/include/vcl/fltcall.hxx
index 6e7ab514ea5a..48f7ac973534 100644
--- a/include/vcl/fltcall.hxx
+++ b/include/vcl/fltcall.hxx
@@ -33,7 +33,7 @@ namespace vcl { class Window; }
struct FltCallDialogParameter
{
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
ResMgr* pResMgr;
FieldUnit eFieldUnit;
OUString aFilterExt;
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 1f8555675f53..469c7e4851b0 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -354,7 +354,7 @@ private:
struct GridEntry
{
- vcl::Window *pChild;
+ VclPtr<vcl::Window> pChild;
sal_Int32 nSpanWidth;
sal_Int32 nSpanHeight;
GridEntry()
@@ -456,7 +456,7 @@ public:
class VCL_DLLPUBLIC VclFrame : public VclBin
{
private:
- vcl::Window *m_pLabel;
+ VclPtr<vcl::Window> m_pLabel;
private:
friend class VclBuilder;
void designate_label(vcl::Window *pWindow);
@@ -467,6 +467,8 @@ public:
, m_pLabel(NULL)
{
}
+ virtual ~VclFrame();
+ virtual void dispose() SAL_OVERRIDE;
void set_label(const OUString &rLabel);
OUString get_label() const;
virtual vcl::Window *get_child() SAL_OVERRIDE;
@@ -520,6 +522,8 @@ public:
m_pDisclosureButton->SetToggleHdl(LINK(this, VclExpander, ClickHdl));
m_pDisclosureButton->Show();
}
+ virtual ~VclExpander() { dispose(); }
+ void dispose() SAL_OVERRIDE { m_pDisclosureButton.clear(); VclBin::dispose(); }
virtual vcl::Window *get_child() SAL_OVERRIDE;
virtual const vcl::Window *get_child() const SAL_OVERRIDE;
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
@@ -545,7 +549,6 @@ public:
protected:
virtual Size calculateRequisition() const SAL_OVERRIDE;
virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE;
- void dispose() SAL_OVERRIDE { m_pDisclosureButton.disposeAndClear(); VclBin::dispose(); }
private:
bool m_bResizeTopLevel;
VclPtr<DisclosureButton> m_pDisclosureButton;
@@ -557,6 +560,8 @@ class VCL_DLLPUBLIC VclScrolledWindow : public VclBin
{
public:
VclScrolledWindow(vcl::Window *pParent, WinBits nStyle = WB_HIDE | WB_CLIPCHILDREN | WB_AUTOHSCROLL | WB_AUTOVSCROLL);
+ virtual ~VclScrolledWindow() { dispose(); }
+ void dispose() SAL_OVERRIDE { m_pVScroll.disposeAndClear(); m_pHScroll.disposeAndClear(); m_aScrollBarBox.clear(); VclBin::dispose(); }
virtual vcl::Window *get_child() SAL_OVERRIDE;
virtual const vcl::Window *get_child() const SAL_OVERRIDE;
virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
@@ -572,7 +577,6 @@ 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(); m_aScrollBarBox.disposeAndClear(); VclBin::dispose(); }
private:
bool m_bUserManagedScrolling;
VclPtr<ScrollBar> m_pVScroll;
@@ -648,7 +652,7 @@ enum VclSizeGroupMode
class VCL_DLLPUBLIC VclSizeGroup
{
private:
- std::set<vcl::Window*> m_aWindows;
+ std::set< VclPtr<vcl::Window> > m_aWindows;
bool m_bIgnoreHidden;
VclSizeGroupMode m_eMode;
@@ -661,17 +665,17 @@ public:
}
void insert(vcl::Window *pWindow)
{
- m_aWindows.insert(pWindow);
+ m_aWindows.insert(VclPtr<vcl::Window>(pWindow));
}
void erase(vcl::Window *pWindow)
{
- m_aWindows.erase(pWindow);
+ m_aWindows.erase(VclPtr<vcl::Window>(pWindow));
}
- const std::set<vcl::Window*>& get_widgets() const
+ const std::set< VclPtr<vcl::Window> >& get_widgets() const
{
return m_aWindows;
}
- std::set<vcl::Window*>& get_widgets()
+ std::set< VclPtr<vcl::Window> >& get_widgets()
{
return m_aWindows;
}
@@ -714,11 +718,11 @@ private:
VclPtr<VclBox> m_pOwnedContentArea;
VclPtr<VclButtonBox> m_pOwnedActionArea;
VclPtr<VclGrid> m_pGrid;
- FixedImage* m_pImage;
- VclMultiLineEdit* m_pPrimaryMessage;
- VclMultiLineEdit* m_pSecondaryMessage;
+ VclPtr<FixedImage> m_pImage;
+ VclPtr<VclMultiLineEdit> m_pPrimaryMessage;
+ VclPtr<VclMultiLineEdit> m_pSecondaryMessage;
std::vector<VclPtr<PushButton> > m_aOwnedButtons;
- std::map<const vcl::Window*, short> m_aResponses;
+ std::map< VclPtr<const vcl::Window>, short> m_aResponses;
OUString m_sPrimaryString;
OUString m_sSecondaryString;
DECL_DLLPRIVATE_LINK(ButtonHdl, Button *);
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index fdbce0795ad9..c62ee8d977f7 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -37,10 +37,10 @@ class ImplWin;
class VCL_DLLPUBLIC ListBox : public Control
{
private:
- ImplListBox* mpImplLB;
- ImplListBoxFloatingWindow* mpFloatWin;
- ImplWin* mpImplWin;
- ImplBtn* mpBtn;
+ VclPtr<ImplListBox> mpImplLB;
+ VclPtr<ImplListBoxFloatingWindow> mpFloatWin;
+ VclPtr<ImplWin> mpImplWin;
+ VclPtr<ImplBtn> mpBtn;
sal_uInt16 mnDDHeight;
sal_Int32 mnSaveValue;
sal_Int32 m_nMaxWidthChars;
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index cd058dbdd539..8cf8c00a60de 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -124,7 +124,7 @@ private:
MenuItemList* pItemList; // Liste mit den MenuItems
MenuLogo* pLogo;
Menu* pStartedFrom;
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
Link aActivateHdl; // Active-Handler
Link aDeactivateHdl; // Deactivate-Handler
diff --git a/include/vcl/msgbox.hxx b/include/vcl/msgbox.hxx
index 15d41614cf0d..8147821280c1 100644
--- a/include/vcl/msgbox.hxx
+++ b/include/vcl/msgbox.hxx
@@ -32,14 +32,14 @@ class CheckBox;
class VCL_DLLPUBLIC MessBox : public ButtonDialog
{
protected:
- VclMultiLineEdit* mpVCLMultiLineEdit;
- FixedImage* mpFixedImage;
- OUString maMessText;
- Image maImage;
- bool mbHelpBtn;
- CheckBox* mpCheckBox;
- OUString maCheckBoxText;
- bool mbCheck;
+ VclPtr<VclMultiLineEdit> mpVCLMultiLineEdit;
+ VclPtr<FixedImage> mpFixedImage;
+ OUString maMessText;
+ Image maImage;
+ bool mbHelpBtn;
+ VclPtr<CheckBox> mpCheckBox;
+ OUString maCheckBoxText;
+ bool mbCheck;
SAL_DLLPRIVATE void ImplInitMessBoxData();
SAL_DLLPRIVATE void ImplInitButtons();
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx
index 56c34c0af5a7..b69bda35276c 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -249,10 +249,10 @@ private:
#endif
GLWindow m_aGLWin;
- std::unique_ptr<vcl::Window> m_xWindow;
- vcl::Window* mpWindow; //points to m_xWindow or the parent window, don't delete it
- SystemChildWindow* m_pChildWindow;
- std::unique_ptr<SystemChildWindow> m_xChildWindowGC;
+ VclPtr<vcl::Window> m_xWindow;
+ VclPtr<vcl::Window> mpWindow; //points to m_pWindow or the parent window, don't delete it
+ VclPtr<SystemChildWindow> m_pChildWindow;
+ boost::scoped_ptr<SystemChildWindow> m_pChildWindowGC;
bool mbInitialized;
int mnRefCount;
bool mbRequestLegacyContext;
diff --git a/include/vcl/seleng.hxx b/include/vcl/seleng.hxx
index cbfd9c3a0970..781527157607 100644
--- a/include/vcl/seleng.hxx
+++ b/include/vcl/seleng.hxx
@@ -83,7 +83,7 @@ class VCL_DLLPUBLIC SelectionEngine
{
private:
FunctionSet* pFunctionSet;
- vcl::Window* pWin;
+ VclPtr<vcl::Window> pWin;
Rectangle aArea;
Timer aWTimer; // generate fake mouse moves
MouseEvent aLastMove;
diff --git a/include/vcl/split.hxx b/include/vcl/split.hxx
index c167ce7cc506..86df902692b4 100644
--- a/include/vcl/split.hxx
+++ b/include/vcl/split.hxx
@@ -28,7 +28,7 @@
class VCL_DLLPUBLIC Splitter : public vcl::Window
{
private:
- vcl::Window* mpRefWin;
+ VclPtr<vcl::Window> mpRefWin;
long mnSplitPos;
long mnLastSplitPos;
long mnStartSplitPos;
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index 4f7d5728bb83..f90fb16bfeea 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -149,7 +149,7 @@ private:
Idle maLayoutIdle;
protected:
bool mbIsDefferedInit;
- vcl::Window* mpDialogParent;
+ VclPtr<vcl::Window> mpDialogParent;
public:
using Window::ImplIsInTaskPaneList;
SAL_DLLPRIVATE bool ImplIsInTaskPaneList( vcl::Window* pWin );
diff --git a/include/vcl/tabdlg.hxx b/include/vcl/tabdlg.hxx
index f02e2a79de16..db3f592ea20b 100644
--- a/include/vcl/tabdlg.hxx
+++ b/include/vcl/tabdlg.hxx
@@ -29,8 +29,8 @@ class TabControl;
class VCL_DLLPUBLIC TabDialog : public Dialog
{
private:
- FixedLine* mpFixedLine;
- vcl::Window* mpViewWindow;
+ VclPtr<FixedLine> mpFixedLine;
+ VclPtr<vcl::Window> mpViewWindow;
WindowAlign meViewAlign;
bool mbPosControls;
diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx
index 7294d4896748..702a42c756b6 100644
--- a/include/vcl/tabpage.hxx
+++ b/include/vcl/tabpage.hxx
@@ -41,7 +41,7 @@ private:
public:
explicit TabPage( vcl::Window* pParent, WinBits nStyle = 0 );
explicit TabPage( vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription );
- ~TabPage();
+ virtual ~TabPage();
virtual void dispose() SAL_OVERRIDE;
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
diff --git a/include/vcl/taskpanelist.hxx b/include/vcl/taskpanelist.hxx
index c8a6abd0e489..738f2b81f3a9 100644
--- a/include/vcl/taskpanelist.hxx
+++ b/include/vcl/taskpanelist.hxx
@@ -27,7 +27,7 @@
class VCL_DLLPUBLIC TaskPaneList
{
- ::std::vector<vcl::Window *> mTaskPanes;
+ ::std::vector< VclPtr<vcl::Window> > mTaskPanes;
vcl::Window *FindNextFloat( vcl::Window *pWindow, bool bForward = true );
vcl::Window *FindNextSplitter( vcl::Window *pWindow, bool bForward = true );
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 8c72c3cc3aae..269c51883836 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -42,7 +42,7 @@ class PopupMenu;
class VCL_DLLPUBLIC ToolBoxCustomizeEvent
{
private:
- ToolBox* mpTargetBox;
+ VclPtr<ToolBox> mpTargetBox;
void* mpData;
sal_uInt16 mnIdFrom;
sal_uInt16 mnPosTo;
@@ -131,7 +131,7 @@ private:
Rectangle maOutDockRect;
Rectangle maInDockRect;
Rectangle maPaintRect;
- FloatingWindow* mpFloatWin;
+ VclPtr<FloatingWindow> mpFloatWin;
sal_uInt16 mnKeyModifier;
long mnDX;
long mnDY;
diff --git a/include/vcl/vclevent.hxx b/include/vcl/vclevent.hxx
index 4e165a438643..a6a809ffb460 100644
--- a/include/vcl/vclevent.hxx
+++ b/include/vcl/vclevent.hxx
@@ -24,6 +24,7 @@
#include <tools/rtti.hxx>
#include <vcl/dllapi.h>
#include <vcl/impdel.hxx>
+#include <vcl/vclptr.hxx>
#include <com/sun/star/uno/Reference.hxx>
@@ -213,12 +214,12 @@ public:
class VCL_DLLPUBLIC VclWindowEvent : public VclSimpleEvent
{
private:
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
void* pData;
public:
- VclWindowEvent( vcl::Window* pWin, sal_uLong n, void* pDat = NULL ) : VclSimpleEvent(n) { pWindow = pWin; pData = pDat; }
- virtual ~VclWindowEvent() {}
+ VclWindowEvent( vcl::Window* pWin, sal_uLong n, void* pDat = NULL );
+ virtual ~VclWindowEvent();
TYPEINFO_OVERRIDE();
vcl::Window* GetWindow() const { return pWindow; }
diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx
index 50a87ba247ef..832d608b686f 100644
--- a/include/vcl/vclptr.hxx
+++ b/include/vcl/vclptr.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_VCL_PTR_HXX
#include <rtl/ref.hxx>
+#include <cstddef>
/// @cond INTERNAL
namespace vcl { namespace detail {
@@ -68,6 +69,8 @@ public:
}; }; // namespace detail, namespace vcl
+namespace vcl { class Window; }
+
/**
* A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for references to vcl::Window subclasses.
*
@@ -91,7 +94,7 @@ public:
/** Constructor...
*/
- explicit inline VclPtr (reference_type * pBody)
+ inline VclPtr (reference_type * pBody)
: m_rInnerRef(pBody)
{}
@@ -180,6 +183,41 @@ public:
}
}
+ /** Returns True if handle points to the same body.
+ */
+ template<class T>
+ inline bool SAL_CALL operator== (const VclPtr<T> & handle) const
+ {
+ return (get() == handle.get());
+ }
+
+ /** Needed to place VclPtr's into STL collection.
+ */
+ inline bool SAL_CALL operator!= (const VclPtr<reference_type> & handle) const
+ {
+ return (m_rInnerRef != handle.m_rInnerRef);
+ }
+
+ /** Makes comparing against NULL easier, resolves compile-time ambiguity */
+ inline bool SAL_CALL operator!= (::std::nullptr_t ) const
+ {
+ return (get() != nullptr);
+ }
+
+ /** Needed to place VclPtr's into STL collection.
+ */
+ inline bool SAL_CALL operator< (const VclPtr<reference_type> & handle) const
+ {
+ return (m_rInnerRef < handle.m_rInnerRef);
+ }
+
+
+ /** Needed to place VclPtr's into STL collection.
+ */
+ inline bool SAL_CALL operator> (const VclPtr<reference_type> & handle) const
+ {
+ return (m_rInnerRef > handle.m_rInnerRef);
+ }
}; // class VclPtr
#endif // INCLUDED_VCL_PTR_HXX
diff --git a/include/vcl/waitobj.hxx b/include/vcl/waitobj.hxx
index d6deecf33f29..daf0e2a68a4f 100644
--- a/include/vcl/waitobj.hxx
+++ b/include/vcl/waitobj.hxx
@@ -26,7 +26,7 @@
class VCL_DLLPUBLIC WaitObject
{
private:
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
public:
WaitObject( vcl::Window* pWindow )
{
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 7d104a4700c2..cb178d2c3571 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -662,7 +662,7 @@ private:
SAL_DLLPRIVATE long ImplGetUnmirroredOutOffX();
// retrieves the list of owner draw decorated windows for this window hiearchy
- SAL_DLLPRIVATE ::std::vector<vcl::Window *>& ImplGetOwnerDrawList();
+ SAL_DLLPRIVATE ::std::vector<VclPtr<vcl::Window> >& ImplGetOwnerDrawList();
SAL_DLLPRIVATE vcl::Window* ImplGetTopmostFrameWindow();
@@ -1431,7 +1431,7 @@ public:
*/
void add_mnemonic_label(FixedText *pLabel);
void remove_mnemonic_label(FixedText *pLabel);
- std::vector<FixedText*> list_mnemonic_labels() const;
+ std::vector<VclPtr<FixedText> > list_mnemonic_labels() const;
/*
* Move this widget to be the nNewPosition'd child of its parent
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index 325fdb8a49e1..0a36669aa06a 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -62,11 +62,12 @@ using namespace ::svx;
class OAddFieldWindowListBox: public SvTreeListBox
{
- OAddFieldWindow* m_pTabWin;
+ VclPtr<OAddFieldWindow> m_pTabWin;
public:
OAddFieldWindowListBox( OAddFieldWindow* _pParent );
virtual ~OAddFieldWindowListBox();
+ virtual void dispose() SAL_OVERRIDE;
sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) SAL_OVERRIDE;
sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) SAL_OVERRIDE;
@@ -113,8 +114,14 @@ OAddFieldWindowListBox::OAddFieldWindowListBox( OAddFieldWindow* _pParent )
OAddFieldWindowListBox::~OAddFieldWindowListBox()
{
+ dispose();
}
+void OAddFieldWindowListBox::dispose()
+{
+ m_pTabWin.clear();
+ SvTreeListBox::dispose();
+}
sal_Int8 OAddFieldWindowListBox::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
{
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index 16aa8a31120e..c537b0a3b3ba 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -130,7 +130,16 @@ namespace rptui
ConditionalFormattingDialog::~ConditionalFormattingDialog()
{
+ dispose();
+ }
+
+ void ConditionalFormattingDialog::dispose()
+ {
m_aConditions.clear();
+ m_pConditionPlayground.clear();
+ m_pScrollWindow.clear();
+ m_pCondScroll.clear();
+ ModalDialog::dispose();
}
void ConditionalFormattingDialog::impl_updateConditionIndicies()
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index fb86522b68c3..2da233a22696 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -97,7 +97,7 @@ IMPL_LINK( ConditionField, OnFormula, Button*, _pClickedButton )
class OColorPopup : public FloatingWindow
{
DECL_LINK( SelectHdl, void * );
- Condition* m_pCondition;
+ VclPtr<Condition> m_pCondition;
sal_uInt16 m_nSlotId;
public:
OColorPopup(vcl::Window* _pParent,Condition* _pCondition);
@@ -161,8 +161,9 @@ OColorPopup::~OColorPopup()
void OColorPopup::dispose()
{
- m_aColorSet.disposeAndClear();
disposeBuilder();
+ m_aColorSet.clear();
+ m_pCondition.clear();
FloatingWindow::dispose();
}
@@ -315,11 +316,21 @@ void Condition::dispose()
{
m_bInDestruction = true;
- delete m_pColorFloat;
delete m_pBtnUpdaterFontColor;
delete m_pCondLHS;
delete m_pCondRHS;
delete m_pBtnUpdaterBackgroundColor;
+ m_pHeader.clear();
+ m_pConditionType.clear();
+ m_pOperationList.clear();
+ m_pOperandGlue.clear();
+ m_pActions.clear();
+ m_pPreview.clear();
+ m_pMoveUp.clear();
+ m_pMoveDown.clear();
+ m_pAddCondition.clear();
+ m_pRemoveCondition.clear();
+ m_pColorFloat.clear();
VclHBox::dispose();
}
diff --git a/reportdesign/source/ui/dlg/Condition.hxx b/reportdesign/source/ui/dlg/Condition.hxx
index 7ad63a6518df..01a3b8cb29cf 100644
--- a/reportdesign/source/ui/dlg/Condition.hxx
+++ b/reportdesign/source/ui/dlg/Condition.hxx
@@ -49,9 +49,9 @@ namespace rptui
class ConditionField
{
- Condition* m_pParent;
- Edit* m_pSubEdit;
- PushButton* m_pFormula;
+ VclPtr<Condition> m_pParent;
+ VclPtr<Edit> m_pSubEdit;
+ VclPtr<PushButton> m_pFormula;
DECL_LINK( OnFormula, Button* );
public:
@@ -77,19 +77,19 @@ namespace rptui
::rptui::OReportController& m_rController;
IConditionalFormatAction& m_rAction;
- FixedText* m_pHeader;
- ListBox* m_pConditionType;
- ListBox* m_pOperationList;
- ConditionField* m_pCondLHS;
- FixedText* m_pOperandGlue;
- ConditionField* m_pCondRHS;
- ToolBox* m_pActions;
- SvxFontPrevWindow* m_pPreview;
- PushButton* m_pMoveUp;
- PushButton* m_pMoveDown;
- PushButton* m_pAddCondition;
- PushButton* m_pRemoveCondition;
- OColorPopup* m_pColorFloat;
+ VclPtr<FixedText> m_pHeader;
+ VclPtr<ListBox> m_pConditionType;
+ VclPtr<ListBox> m_pOperationList;
+ ConditionField* m_pCondLHS;
+ VclPtr<FixedText> m_pOperandGlue;
+ ConditionField* m_pCondRHS;
+ VclPtr<ToolBox> m_pActions;
+ VclPtr<SvxFontPrevWindow> m_pPreview;
+ VclPtr<PushButton> m_pMoveUp;
+ VclPtr<PushButton> m_pMoveDown;
+ VclPtr<PushButton> m_pAddCondition;
+ VclPtr<PushButton> m_pRemoveCondition;
+ VclPtr<OColorPopup> m_pColorFloat;
::svx::ToolboxButtonColorUpdater* m_pBtnUpdaterFontColor; // updates the color below the toolbar icon
::svx::ToolboxButtonColorUpdater* m_pBtnUpdaterBackgroundColor;
diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx
index eaba66735718..b768e17be432 100644
--- a/reportdesign/source/ui/dlg/DateTime.cxx
+++ b/reportdesign/source/ui/dlg/DateTime.cxx
@@ -113,6 +113,19 @@ ODateTimeDialog::ODateTimeDialog( vcl::Window* _pParent
ODateTimeDialog::~ODateTimeDialog()
{
+ dispose();
+}
+
+void ODateTimeDialog::dispose()
+{
+ m_pDate.clear();
+ m_pFTDateFormat.clear();
+ m_pDateListBox.clear();
+ m_pTime.clear();
+ m_pFTTimeFormat.clear();
+ m_pTimeListBox.clear();
+ m_pPB_OK.clear();
+ ModalDialog::dispose();
}
short ODateTimeDialog::Execute()
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index b1bac300709c..c59d778ba7e0 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -102,6 +102,8 @@ void FormulaDialog::dispose()
}
StoreFormEditData( m_pFormulaData );
+ m_pEdit.clear();
+ m_pAddField.clear();
formula::FormulaModalDialog::dispose();
}
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 0aadd00d0678..adbe69d7ad23 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -76,21 +76,37 @@ using namespace ::comphelper;
}
}
-typedef ::svt::EditBrowseBox OFieldExpressionControl_Base;
-typedef ::cppu::WeakImplHelper1< container::XContainerListener > TContainerListenerBase;
-class OFieldExpressionControl : public TContainerListenerBase
- ,public OFieldExpressionControl_Base
+/**
+ * Separated out from OFieldExpressionControl to prevent collision of ref-counted base classes
+ */
+class OFieldExpressionControl;
+class OFieldExpressionControlContainerListener : public ::cppu::WeakImplHelper1< container::XContainerListener >
+{
+ VclPtr<OFieldExpressionControl> mpParent;
+public:
+ OFieldExpressionControlContainerListener(OFieldExpressionControl* pParent) : mpParent(pParent) {}
+
+ // XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ // XContainerListener
+ virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+};
+
+class OFieldExpressionControl : public ::svt::EditBrowseBox
{
::osl::Mutex m_aMutex;
::std::vector<sal_Int32> m_aGroupPositions;
::std::vector<ColumnInfo> m_aColumnInfo;
- ::svt::ComboBoxControl* m_pComboCell;
+ VclPtr<::svt::ComboBoxControl> m_pComboCell;
sal_Int32 m_nDataPos;
sal_Int32 m_nCurrentPos;
ImplSVEvent * m_nPasteEvent;
ImplSVEvent * m_nDeleteEvent;
- OGroupsSortingDialog* m_pParent;
+ VclPtr<OGroupsSortingDialog> m_pParent;
bool m_bIgnoreEvent;
+ OFieldExpressionControlContainerListener aContainerListener;
bool SaveModified(bool _bAppend);
@@ -100,11 +116,11 @@ public:
virtual void dispose() SAL_OVERRIDE;
// XEventListener
- virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ void disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException, std::exception );
// XContainerListener
- virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ void elementInserted(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ void elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ void elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException, std::exception);
virtual Size GetOptimalSize() const SAL_OVERRIDE;
@@ -129,7 +145,7 @@ public:
void moveGroups(const uno::Sequence<uno::Any>& _aGroups,sal_Int32 _nRow,bool _bSelect = true);
virtual bool CursorMoving(long nNewRow, sal_uInt16 nNewCol) SAL_OVERRIDE;
- using OFieldExpressionControl_Base::GetRowCount;
+ using ::svt::EditBrowseBox::GetRowCount;
protected:
virtual bool IsTabAllowed(bool bForward) const SAL_OVERRIDE;
@@ -164,6 +180,20 @@ public:
};
+
+void OFieldExpressionControlContainerListener::disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException, std::exception )
+{ mpParent->disposing(Source); }
+
+void OFieldExpressionControlContainerListener::elementInserted(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException, std::exception)
+{ mpParent->elementInserted(rEvent); }
+
+void OFieldExpressionControlContainerListener::elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException, std::exception)
+{ mpParent->elementReplaced(rEvent); }
+
+void OFieldExpressionControlContainerListener::elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException, std::exception)
+{ mpParent->elementRemoved(rEvent); }
+
+
// class OFieldExpressionControl
OFieldExpressionControl::OFieldExpressionControl(OGroupsSortingDialog* _pParentDialog, vcl::Window *_pParent)
:EditBrowseBox( _pParent, EBBF_NONE, WB_TABSTOP | BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_AUTOSIZE_LASTCOL |
@@ -176,6 +206,7 @@ OFieldExpressionControl::OFieldExpressionControl(OGroupsSortingDialog* _pParentD
,m_nDeleteEvent(0)
,m_pParent(_pParentDialog)
,m_bIgnoreEvent(false)
+ ,aContainerListener(this)
{
SetBorderStyle(WindowBorderStyle::MONO);
}
@@ -189,9 +220,9 @@ OFieldExpressionControl::~OFieldExpressionControl()
void OFieldExpressionControl::dispose()
{
- WeakImplHelper1::acquire();
+ aContainerListener.WeakImplHelper1::acquire();
uno::Reference< report::XGroups > xGroups = m_pParent->getGroups();
- xGroups->removeContainerListener(this);
+ xGroups->removeContainerListener(&aContainerListener);
// delete events from queue
if( m_nPasteEvent )
@@ -199,8 +230,9 @@ void OFieldExpressionControl::dispose()
if( m_nDeleteEvent )
Application::RemoveUserEvent( m_nDeleteEvent );
- delete m_pComboCell;
- OFieldExpressionControl_Base::dispose();
+ m_pComboCell.clear();
+ m_pParent.clear();
+ ::svt::EditBrowseBox::dispose();
}
uno::Sequence<uno::Any> OFieldExpressionControl::fillSelectedGroups()
@@ -377,7 +409,7 @@ void OFieldExpressionControl::lateInit()
if( m_pParent->isReadOnly() )
nMode |= BROWSER_HIDECURSOR;
SetMode(nMode);
- xGroups->addContainerListener(this);
+ xGroups->addContainerListener(&aContainerListener);
}
else
// not the first call
@@ -983,11 +1015,20 @@ OGroupsSortingDialog::~OGroupsSortingDialog()
void OGroupsSortingDialog::dispose()
{
- delete m_pFieldExpression;
m_xColumns.clear();
m_pReportListener->dispose();
if ( m_pCurrentGroupListener.is() )
m_pCurrentGroupListener->dispose();
+ m_pToolBox.clear();
+ m_pProperties.clear();
+ m_pOrderLst.clear();
+ m_pHeaderLst.clear();
+ m_pFooterLst.clear();
+ m_pGroupOnLst.clear();
+ m_pGroupIntervalEd.clear();
+ m_pKeepTogetherLst.clear();
+ m_pHelpWindow.clear();
+ m_pFieldExpression.clear();
FloatingWindow::dispose();
}
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 51c995bce1fc..bef13a2d5938 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -121,7 +121,7 @@ class NavigatorTree : public ::cppu::BaseMutex
uno::Reference< uno::XInterface > m_xContent;
::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pListener;
::rtl::Reference< comphelper::OContainerListenerAdapter> m_pContainerListener;
- NavigatorTree* m_pTree;
+ VclPtr<NavigatorTree> m_pTree;
public:
UserData(NavigatorTree* _pTree,const uno::Reference<uno::XInterface>& _xContent);
virtual ~UserData();
diff --git a/reportdesign/source/ui/dlg/PageNumber.cxx b/reportdesign/source/ui/dlg/PageNumber.cxx
index bc2419b412f2..08672e1c50c1 100644
--- a/reportdesign/source/ui/dlg/PageNumber.cxx
+++ b/reportdesign/source/ui/dlg/PageNumber.cxx
@@ -63,6 +63,18 @@ OPageNumberDialog::OPageNumberDialog( vcl::Window* _pParent
OPageNumberDialog::~OPageNumberDialog()
{
+ dispose();
+}
+
+void OPageNumberDialog::dispose()
+{
+ m_pPageN.clear();
+ m_pPageNofM.clear();
+ m_pTopPage.clear();
+ m_pBottomPage.clear();
+ m_pAlignmentLst.clear();
+ m_pShowNumberOnFirstPage.clear();
+ ModalDialog::dispose();
}
short OPageNumberDialog::Execute()
diff --git a/reportdesign/source/ui/inc/CondFormat.hxx b/reportdesign/source/ui/inc/CondFormat.hxx
index 19c3cc24440e..f8e8332bed62 100644
--- a/reportdesign/source/ui/inc/CondFormat.hxx
+++ b/reportdesign/source/ui/inc/CondFormat.hxx
@@ -73,11 +73,11 @@ namespace rptui
typedef ::boost::shared_ptr< Condition > ConditionPtr;
typedef ::std::vector< ConditionPtr > Conditions;
- OModuleClient m_aModuleClient;
- vcl::Window* m_pConditionPlayground;
- Conditions m_aConditions;
- VclScrolledWindow* m_pScrollWindow;
- ScrollBar* m_pCondScroll;
+ OModuleClient m_aModuleClient;
+ VclPtr<vcl::Window> m_pConditionPlayground;
+ Conditions m_aConditions;
+ VclPtr<VclScrolledWindow> m_pScrollWindow;
+ VclPtr<ScrollBar> m_pCondScroll;
::rptui::OReportController& m_rController;
::com::sun::star::uno::Reference< ::com::sun::star::report::XReportControlModel >
@@ -95,7 +95,7 @@ namespace rptui
::rptui::OReportController& _rController
);
virtual ~ConditionalFormattingDialog();
-
+ virtual void dispose() SAL_OVERRIDE;
// Dialog overridables
virtual short Execute() SAL_OVERRIDE;
diff --git a/reportdesign/source/ui/inc/DateTime.hxx b/reportdesign/source/ui/inc/DateTime.hxx
index e03f3ed2b41c..66639a9cafd8 100644
--- a/reportdesign/source/ui/inc/DateTime.hxx
+++ b/reportdesign/source/ui/inc/DateTime.hxx
@@ -40,13 +40,13 @@ class OReportController;
\************************************************************************/
class ODateTimeDialog : public ModalDialog
{
- CheckBox* m_pDate;
- FixedText* m_pFTDateFormat;
- ListBox* m_pDateListBox;
- CheckBox* m_pTime;
- FixedText* m_pFTTimeFormat;
- ListBox* m_pTimeListBox;
- OKButton* m_pPB_OK;
+ VclPtr<CheckBox> m_pDate;
+ VclPtr<FixedText> m_pFTDateFormat;
+ VclPtr<ListBox> m_pDateListBox;
+ VclPtr<CheckBox> m_pTime;
+ VclPtr<FixedText> m_pFTTimeFormat;
+ VclPtr<ListBox> m_pTimeListBox;
+ VclPtr<OKButton> m_pPB_OK;
svt::ControlDependencyManager m_aDateControlling;
svt::ControlDependencyManager m_aTimeControlling;
@@ -81,6 +81,7 @@ public:
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xHoldAlive
,::rptui::OReportController* _pController);
virtual ~ODateTimeDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
};
diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx
index e2c4770e1b87..a8b818217ce8 100644
--- a/reportdesign/source/ui/inc/DesignView.hxx
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -64,11 +64,11 @@ namespace rptui
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xReportComponent;
OReportController& m_rReportController;
VclPtr<OScrollWindowHelper> m_aScrollWindow;
- vcl::Window* m_pTaskPane;
- PropBrw* m_pPropWin;
- OAddFieldWindow* m_pAddField;
+ VclPtr<vcl::Window> m_pTaskPane;
+ VclPtr<PropBrw> m_pPropWin;
+ VclPtr<OAddFieldWindow> m_pAddField;
OSectionView* m_pCurrentView;
- ONavigator* m_pReportExplorer;
+ VclPtr<ONavigator> m_pReportExplorer;
Idle m_aMarkIdle;
Point m_aScrollOffset;
DlgEdMode m_eMode;
diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx
index c077aad6cf16..499525178a25 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -46,12 +46,12 @@ class FormulaDialog : public formula::FormulaModalDialog,
public formula::IControlReferenceHandler
{
::boost::shared_ptr< formula::IFunctionManager > m_aFunctionManager;
- formula::FormEditData* m_pFormulaData;
- OAddFieldWindow* m_pAddField;
+ formula::FormEditData* m_pFormulaData;
+ VclPtr<OAddFieldWindow> m_pAddField;
::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > m_xRowSet;
::com::sun::star::uno::Reference< ::com::sun::star::report::meta::XFormulaParser> m_xParser;
::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> m_xOpCodeMapper;
- formula::RefEdit* m_pEdit;
+ VclPtr<formula::RefEdit> m_pEdit;
OUString m_sFormula;
sal_Int32 m_nStart;
sal_Int32 m_nEnd;
diff --git a/reportdesign/source/ui/inc/GroupsSorting.hxx b/reportdesign/source/ui/inc/GroupsSorting.hxx
index 32f01d0c82e1..b67c1285ba98 100644
--- a/reportdesign/source/ui/inc/GroupsSorting.hxx
+++ b/reportdesign/source/ui/inc/GroupsSorting.hxx
@@ -60,21 +60,21 @@ class OGroupsSortingDialog : public FloatingWindow
{
friend class OFieldExpressionControl;
- ToolBox* m_pToolBox;
+ VclPtr<ToolBox> m_pToolBox;
sal_uInt16 m_nMoveUpId;
sal_uInt16 m_nMoveDownId;
sal_uInt16 m_nDeleteId;
- VclContainer* m_pProperties;
- ListBox* m_pOrderLst;
- ListBox* m_pHeaderLst;
- ListBox* m_pFooterLst;
- ListBox* m_pGroupOnLst;
- NumericField* m_pGroupIntervalEd;
- ListBox* m_pKeepTogetherLst;
- FixedText* m_pHelpWindow;
+ VclPtr<VclContainer> m_pProperties;
+ VclPtr<ListBox> m_pOrderLst;
+ VclPtr<ListBox> m_pHeaderLst;
+ VclPtr<ListBox> m_pFooterLst;
+ VclPtr<ListBox> m_pGroupOnLst;
+ VclPtr<NumericField> m_pGroupIntervalEd;
+ VclPtr<ListBox> m_pKeepTogetherLst;
+ VclPtr<FixedText> m_pHelpWindow;
- OFieldExpressionControl* m_pFieldExpression;
+ VclPtr<OFieldExpressionControl> m_pFieldExpression;
::rptui::OReportController* m_pController;
::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pCurrentGroupListener;
::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pReportListener;
diff --git a/reportdesign/source/ui/inc/PageNumber.hxx b/reportdesign/source/ui/inc/PageNumber.hxx
index fcf6d6b24fe0..43a1915d8e81 100644
--- a/reportdesign/source/ui/inc/PageNumber.hxx
+++ b/reportdesign/source/ui/inc/PageNumber.hxx
@@ -37,14 +37,14 @@ class OReportController;
\************************************************************************/
class OPageNumberDialog : public ModalDialog
{
- RadioButton* m_pPageN;
- RadioButton* m_pPageNofM;
+ VclPtr<RadioButton> m_pPageN;
+ VclPtr<RadioButton> m_pPageNofM;
- RadioButton* m_pTopPage;
- RadioButton* m_pBottomPage;
- ListBox* m_pAlignmentLst;
+ VclPtr<RadioButton> m_pTopPage;
+ VclPtr<RadioButton> m_pBottomPage;
+ VclPtr<ListBox> m_pAlignmentLst;
- CheckBox* m_pShowNumberOnFirstPage;
+ VclPtr<CheckBox> m_pShowNumberOnFirstPage;
::rptui::OReportController* m_pController;
::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>
@@ -57,6 +57,7 @@ public:
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>& _xHoldAlive
,::rptui::OReportController* _pController);
virtual ~OPageNumberDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
};
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index 7a7d5c699f68..7a282f25edcb 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -93,7 +93,7 @@ namespace rptui
TransferableDataHelper m_aSystemClipboard; // content of the clipboard
TransferableClipboardListener*
m_pClipbordNotifier; /// notifier for changes in the clipboard
- OGroupsSortingDialog* m_pGroupsFloater;
+ VclPtr<OGroupsSortingDialog> m_pGroupsFloater;
OXReportControllerObserver* m_pReportControllerObserver;
diff --git a/reportdesign/source/ui/inc/ReportSection.hxx b/reportdesign/source/ui/inc/ReportSection.hxx
index 6add8b3fa617..a34a4fc98322 100644
--- a/reportdesign/source/ui/inc/ReportSection.hxx
+++ b/reportdesign/source/ui/inc/ReportSection.hxx
@@ -45,7 +45,7 @@ namespace rptui
{
OReportPage* m_pPage;
OSectionView* m_pView;
- OSectionWindow* m_pParent;
+ VclPtr<OSectionWindow> m_pParent;
::std::unique_ptr<DlgEdFunc> m_pFunc;
::boost::shared_ptr<OReportModel> m_pModel;
::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pMulti;
diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx
index 5c4e9b6e41d3..1e0294da696c 100644
--- a/reportdesign/source/ui/inc/ReportWindow.hxx
+++ b/reportdesign/source/ui/inc/ReportWindow.hxx
@@ -45,10 +45,10 @@ namespace rptui
, public ::cppu::BaseMutex
, public ::comphelper::OPropertyChangeListener
{
- VclPtr<Ruler> m_aHRuler;
- ODesignView* m_pView;
- OScrollWindowHelper* m_pParent;
- VclPtr<OViewsWindow> m_aViewsWindow;
+ VclPtr<Ruler> m_aHRuler;
+ VclPtr<ODesignView> m_pView;
+ VclPtr<OScrollWindowHelper> m_pParent;
+ VclPtr<OViewsWindow> m_aViewsWindow;
::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pReportListener;
::std::unique_ptr<DlgEdFactory>
m_pObjFac;
diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx
index 6f8152d7bb64..5ad863763f0c 100644
--- a/reportdesign/source/ui/inc/ScrollHelper.hxx
+++ b/reportdesign/source/ui/inc/ScrollHelper.hxx
@@ -52,7 +52,7 @@ namespace rptui
VclPtr<ScrollBar> m_aVScroll;
VclPtr<ScrollBarBox> m_aCornerWin; // window in the bottom right corner
Size m_aTotalPixelSize;
- ODesignView* m_pParent;
+ VclPtr<ODesignView> m_pParent;
VclPtr<OReportWindow> m_aReportWindow;
::rtl::Reference<comphelper::OPropertyChangeMultiplexer >
m_pReportDefintionMultiPlexer; // listener for property changes
diff --git a/reportdesign/source/ui/inc/SectionView.hxx b/reportdesign/source/ui/inc/SectionView.hxx
index 14de81adc63e..c8f14e26ee4b 100644
--- a/reportdesign/source/ui/inc/SectionView.hxx
+++ b/reportdesign/source/ui/inc/SectionView.hxx
@@ -34,8 +34,8 @@ class OReportSection;
class OSectionView : public SdrView
{
private:
- OReportWindow* m_pReportWindow;
- OReportSection* m_pSectionWindow;
+ VclPtr<OReportWindow> m_pReportWindow;
+ VclPtr<OReportSection> m_pSectionWindow;
void ObjectRemovedInAliveMode( const SdrObject* pObject );
OSectionView(const OSectionView&) SAL_DELETED_FUNCTION;
diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx
index d8680fbcc1ff..166c25cd6a48 100644
--- a/reportdesign/source/ui/inc/SectionWindow.hxx
+++ b/reportdesign/source/ui/inc/SectionWindow.hxx
@@ -47,7 +47,7 @@ namespace rptui
, public ::cppu::BaseMutex
, public ::comphelper::OPropertyChangeListener
{
- OViewsWindow* m_pParent;
+ VclPtr<OViewsWindow> m_pParent;
VclPtr<OStartMarker> m_aStartMarker;
VclPtr<OReportSection> m_aReportSection;
VclPtr<Splitter> m_aSplitter;
diff --git a/reportdesign/source/ui/inc/StartMarker.hxx b/reportdesign/source/ui/inc/StartMarker.hxx
index 5688b96d8059..270939c266d0 100644
--- a/reportdesign/source/ui/inc/StartMarker.hxx
+++ b/reportdesign/source/ui/inc/StartMarker.hxx
@@ -34,7 +34,7 @@ namespace rptui
VclPtr<Ruler> m_aVRuler;
VclPtr<FixedText> m_aText;
VclPtr<FixedImage> m_aImage;
- OSectionWindow* m_pParent;
+ VclPtr<OSectionWindow> m_pParent;
static Image* s_pDefCollapsed;
static Image* s_pDefExpanded;
static oslInterlockedCount s_nImageRefCount; /// When 0 all static images will be destroyed
diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx
index ec842fd7020e..e8c19828addf 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -75,7 +75,7 @@ namespace rptui
class OWindowPositionCorrector
{
- ::std::vector< ::std::pair<vcl::Window*,Point> > m_aChildren;
+ ::std::vector< ::std::pair<VclPtr<vcl::Window>,Point> > m_aChildren;
long m_nDeltaX;
long m_nDeltaY;
public:
@@ -91,8 +91,8 @@ namespace rptui
}
~OWindowPositionCorrector()
{
- ::std::vector< ::std::pair<vcl::Window*,Point> >::iterator aIter = m_aChildren.begin();
- ::std::vector< ::std::pair<vcl::Window*,Point> >::iterator aEnd = m_aChildren.end();
+ auto aIter = m_aChildren.begin();
+ auto aEnd = m_aChildren.end();
for (; aIter != aEnd; ++aIter)
{
const Point aPos = aIter->first->GetPosPixel();
@@ -127,9 +127,9 @@ namespace rptui
private:
TSectionsMap m_aSections;
svtools::ColorConfig m_aColorConfig;
- OReportWindow* m_pParent;
- OUString m_sShapeType;
- bool m_bInUnmark;
+ VclPtr<OReportWindow> m_pParent;
+ OUString m_sShapeType;
+ bool m_bInUnmark;
void ImplInitSettings();
/** returns the iterator at pos _nPos or the end()
diff --git a/reportdesign/source/ui/inc/dlgedfunc.hxx b/reportdesign/source/ui/inc/dlgedfunc.hxx
index b9d0275ce673..8f8938b6f545 100644
--- a/reportdesign/source/ui/inc/dlgedfunc.hxx
+++ b/reportdesign/source/ui/inc/dlgedfunc.hxx
@@ -41,7 +41,7 @@ class DlgEdFunc /* : public LinkHdl */
DlgEdFunc(const DlgEdFunc&) SAL_DELETED_FUNCTION;
void operator =(const DlgEdFunc&) SAL_DELETED_FUNCTION;
protected:
- OReportSection* m_pParent;
+ VclPtr<OReportSection> m_pParent;
OSectionView& m_rView;
Timer aScrollTimer;
Point m_aMDPos;
diff --git a/reportdesign/source/ui/inc/propbrw.hxx b/reportdesign/source/ui/inc/propbrw.hxx
index 4dcdc2bb4987..67a48b248691 100644
--- a/reportdesign/source/ui/inc/propbrw.hxx
+++ b/reportdesign/source/ui/inc/propbrw.hxx
@@ -58,7 +58,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
m_xLastSection; /// is the previously displayed section
OUString m_sLastActivePage;
- ODesignView* m_pDesignView;
+ VclPtr<ODesignView> m_pDesignView;
OSectionView* m_pView;
bool m_bInitialStateChange;
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 8d17283a8204..bcf3890c9190 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -59,9 +59,11 @@ using namespace container;
class OTaskWindow : public vcl::Window
{
- PropBrw* m_pPropWin;
+ VclPtr<PropBrw> m_pPropWin;
public:
OTaskWindow(vcl::Window* _pParent) : Window(_pParent),m_pPropWin(NULL){}
+ virtual ~OTaskWindow() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE { m_pPropWin.clear(); vcl::Window::dispose(); }
inline void setPropertyBrowser(PropBrw* _pPropWin)
{
@@ -163,6 +165,10 @@ void ODesignView::dispose()
m_aSplitWin.disposeAndClear();
m_aScrollWindow.disposeAndClear();
+ m_pTaskPane.clear();
+ m_pReportExplorer.clear();
+ m_pPropWin.clear();
+ m_pAddField.clear();
dbaui::ODataView::dispose();
}
@@ -282,7 +288,7 @@ IMPL_LINK_NOARG(ODesignView, MarkTimeout)
if ( xProp.is() )
{
m_pPropWin->Update(xProp);
- static_cast<OTaskWindow*>(m_pTaskPane)->Resize();
+ static_cast<OTaskWindow*>(m_pTaskPane.get())->Resize();
}
Resize();
}
@@ -446,7 +452,7 @@ void ODesignView::togglePropertyBrowser(bool _bToogleOn)
{
m_pPropWin = new PropBrw(getController().getORB(), m_pTaskPane,this);
m_pPropWin->Invalidate();
- static_cast<OTaskWindow*>(m_pTaskPane)->setPropertyBrowser(m_pPropWin);
+ static_cast<OTaskWindow*>(m_pTaskPane.get())->setPropertyBrowser(m_pPropWin);
notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(&TaskPaneList::AddWindow));
}
if ( m_pPropWin && _bToogleOn != m_pPropWin->IsVisible() )
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index fffd3c9d884b..b4716cb0052b 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -130,6 +130,7 @@ void OReportSection::dispose()
m_pView->EndListening( *m_pModel );
m_pView = NULL;
}
+ m_pParent.clear();
vcl::Window::dispose();
}
diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx
index 42c346840c44..10b69e75c3e8 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -94,6 +94,8 @@ void OReportWindow::dispose()
m_pReportListener->dispose();
m_aHRuler.disposeAndClear();
m_aViewsWindow.disposeAndClear();
+ m_pView.clear();
+ m_pParent.clear();
vcl::Window::dispose();
}
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index d43068c02dca..6641ad23a705 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -81,6 +81,7 @@ void OScrollWindowHelper::dispose()
m_aVScroll.disposeAndClear();
m_aCornerWin.disposeAndClear();
m_aReportWindow.disposeAndClear();
+ m_pParent.clear();
OScrollWindowHelper_BASE::dispose();
}
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index 65827a1ac75a..8edd7466b6d1 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -119,6 +119,7 @@ void OSectionWindow::dispose()
m_aReportSection.disposeAndClear();
m_aSplitter.disposeAndClear();
m_aEndMarker.disposeAndClear();
+ m_pParent.clear();
vcl::Window::dispose();
}
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index 23caea3a2cde..1ada64e1677d 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -93,6 +93,7 @@ void OStartMarker::dispose()
m_aVRuler.disposeAndClear();
m_aText.disposeAndClear();
m_aImage.disposeAndClear();
+ m_pParent.clear();
OColorListener::dispose();
}
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 803be1cd0519..9ca2c79e134e 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -192,6 +192,7 @@ void OViewsWindow::dispose()
{
m_aColorConfig.RemoveListener(this);
m_aSections.clear();
+ m_pParent.clear();
vcl::Window::dispose();
}
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index a7d195c81849..ef019a79ce33 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -209,6 +209,7 @@ void PropBrw::dispose()
{}
::rptui::notifySystemWindow(this,this,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
+ m_pDesignView.clear();
DockingWindow::dispose();
}
diff --git a/sc/inc/AccessibleFilterMenu.hxx b/sc/inc/AccessibleFilterMenu.hxx
index 65da10f1e4f9..2fa0a383fd22 100644
--- a/sc/inc/AccessibleFilterMenu.hxx
+++ b/sc/inc/AccessibleFilterMenu.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/accessibility/XAccessibleText.hpp>
#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
#include <com/sun/star/accessibility/TextSegment.hpp>
+#include <vcl/vclptr.hxx>
#include <vector>
@@ -169,7 +170,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > mxStateSet;
size_t mnMenuPos;
- ScMenuFloatingWindow* mpWindow;
+ VclPtr<ScMenuFloatingWindow> mpWindow;
bool mbEnabled:1;
};
diff --git a/sc/inc/AccessibleFilterMenuItem.hxx b/sc/inc/AccessibleFilterMenuItem.hxx
index dc723e7e2091..7eb2e8a74efb 100644
--- a/sc/inc/AccessibleFilterMenuItem.hxx
+++ b/sc/inc/AccessibleFilterMenuItem.hxx
@@ -24,6 +24,7 @@
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include <vcl/vclptr.hxx>
class ScMenuFloatingWindow;
@@ -104,7 +105,7 @@ private:
private:
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > mxStateSet;
- ScMenuFloatingWindow* mpWindow;
+ VclPtr<ScMenuFloatingWindow> mpWindow;
size_t mnMenuPos;
bool mbEnabled;
};
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index 2673e2f1ad7d..c2c921c69732 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -112,8 +112,8 @@ class ScModule: public SfxModule, public SfxListener, utl::ConfigurationListener
bool mbIsInSharedDocLoading:1;
bool mbIsInSharedDocSaving:1;
- std::map<sal_uInt16, std::list<vcl::Window*> > m_mapRefWindow;
- std::stack<ScAnyRefModalDlg*> maAnyRefDlgStack;
+ std::map<sal_uInt16, std::list<VclPtr<vcl::Window> > > m_mapRefWindow;
+ std::stack<VclPtr<ScAnyRefModalDlg> > maAnyRefDlgStack;
public:
SFX_DECL_INTERFACE(SCID_APP)
diff --git a/sc/inc/scopetools.hxx b/sc/inc/scopetools.hxx
index f0b7bf60e2e9..c246fa9171b8 100644
--- a/sc/inc/scopetools.hxx
+++ b/sc/inc/scopetools.hxx
@@ -11,6 +11,7 @@
#define INCLUDED_SC_INC_SCOPETOOLS_HXX
#include "scdllapi.h"
+#include <vcl/vclptr.hxx>
class ScDocument;
namespace vcl { class Window; }
@@ -58,7 +59,7 @@ public:
class WaitPointerSwitch
{
- vcl::Window* mpFrameWin;
+ VclPtr<vcl::Window> mpFrameWin;
public:
WaitPointerSwitch(vcl::Window* pWin);
~WaitPointerSwitch();
diff --git a/sc/inc/waitoff.hxx b/sc/inc/waitoff.hxx
index 0e7672022809..6c8b5f91bf7f 100644
--- a/sc/inc/waitoff.hxx
+++ b/sc/inc/waitoff.hxx
@@ -27,7 +27,7 @@ namespace vcl { class Window; }
class ScWaitCursorOff
{
private:
- vcl::Window* pWin;
+ VclPtr<vcl::Window> pWin;
sal_uInt32 nWaiters;
public:
ScWaitCursorOff( vcl::Window* pWin );
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index a11a7309b66e..c6ca6ad40564 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -142,9 +142,9 @@ void ScViewForwarder::SetInvalid()
class ScEditObjectViewForwarder : public SvxViewForwarder
{
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
// #i49561# EditView needed for access to its visible area.
- const EditView* mpEditView;
+ const EditView* mpEditView;
public:
ScEditObjectViewForwarder( vcl::Window* pWindow,
const EditView* _pEditView);
@@ -172,7 +172,7 @@ ScEditObjectViewForwarder::~ScEditObjectViewForwarder()
bool ScEditObjectViewForwarder::IsValid() const
{
- return (mpWindow != NULL);
+ return (mpWindow != nullptr);
}
Rectangle ScEditObjectViewForwarder::GetVisArea() const
@@ -545,7 +545,7 @@ Rectangle ScPreviewNoteViewForwarder::GetVisArea() const
class ScEditViewForwarder : public SvxEditViewForwarder
{
EditView* mpEditView;
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
public:
ScEditViewForwarder(EditView* pEditView, vcl::Window* pWin);
virtual ~ScEditViewForwarder();
@@ -1073,7 +1073,7 @@ ScAccessibleEditLineTextData::ScAccessibleEditLineTextData(EditView* pEditView,
ScAccessibleEditLineTextData::~ScAccessibleEditLineTextData()
{
- ScTextWnd* pTxtWnd = dynamic_cast< ScTextWnd* >(mpWindow);
+ ScTextWnd* pTxtWnd = dynamic_cast< ScTextWnd* >(mpWindow.get());
if (pTxtWnd)
pTxtWnd->RemoveAccessibleTextData( *this );
@@ -1094,7 +1094,7 @@ ScAccessibleEditLineTextData::~ScAccessibleEditLineTextData()
void ScAccessibleEditLineTextData::Dispose()
{
- ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow);
+ ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow.get());
if (pTxtWnd)
pTxtWnd->RemoveAccessibleTextData( *this );
@@ -1110,7 +1110,7 @@ ScAccessibleTextData* ScAccessibleEditLineTextData::Clone() const
SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder()
{
- ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow);
+ ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow.get());
if (pTxtWnd)
{
@@ -1156,7 +1156,7 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder()
SvxEditViewForwarder* ScAccessibleEditLineTextData::GetEditViewForwarder( bool bCreate )
{
- ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow);
+ ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow.get());
if (pTxtWnd)
{
@@ -1178,7 +1178,7 @@ SvxEditViewForwarder* ScAccessibleEditLineTextData::GetEditViewForwarder( bool b
void ScAccessibleEditLineTextData::ResetEditMode()
{
- ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow);
+ ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow.get());
if (mbEditEngineCreated && mpEditEngine)
delete mpEditEngine;
@@ -1196,7 +1196,7 @@ void ScAccessibleEditLineTextData::TextChanged()
{
if (mbEditEngineCreated && mpEditEngine)
{
- ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow);
+ ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow.get());
if (pTxtWnd)
mpEditEngine->SetText(pTxtWnd->GetTextString());
@@ -1637,7 +1637,7 @@ SvxViewForwarder* ScAccessibleNoteTextData::GetViewForwarder()
class ScCsvViewForwarder : public SvxViewForwarder
{
Rectangle maBoundBox;
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
public:
explicit ScCsvViewForwarder( vcl::Window* pWindow, const Rectangle& rBoundBox );
@@ -1658,7 +1658,7 @@ ScCsvViewForwarder::ScCsvViewForwarder( vcl::Window* pWindow, const Rectangle& r
bool ScCsvViewForwarder::IsValid() const
{
- return mpWindow != NULL;
+ return mpWindow != nullptr;
}
Rectangle ScCsvViewForwarder::GetVisArea() const
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index 89e2fa4cdc15..16f30171c5de 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -117,7 +117,18 @@ ScAnalysisOfVarianceDialog::ScAnalysisOfVarianceDialog(
}
ScAnalysisOfVarianceDialog::~ScAnalysisOfVarianceDialog()
-{}
+{
+ dispose();
+}
+
+void ScAnalysisOfVarianceDialog::dispose()
+{
+ mpAlphaField.clear();
+ mpSingleFactorRadio.clear();
+ mpTwoFactorRadio.clear();
+ mpRowsPerSampleField.clear();
+ ScStatisticsInputOutputDialog::dispose();
+}
bool ScAnalysisOfVarianceDialog::Close()
{
diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
index 8063b4ab82d9..5980b04e402f 100644
--- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
@@ -37,7 +37,15 @@ ScExponentialSmoothingDialog::ScExponentialSmoothingDialog(
}
ScExponentialSmoothingDialog::~ScExponentialSmoothingDialog()
-{}
+{
+ dispose();
+}
+
+void ScExponentialSmoothingDialog::dispose()
+{
+ mpSmoothingFactor.clear();
+ ScStatisticsInputOutputDialog::dispose();
+}
bool ScExponentialSmoothingDialog::Close()
{
diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
index 4a43e79ea8b3..780434d640f0 100644
--- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
@@ -37,7 +37,15 @@ ScMovingAverageDialog::ScMovingAverageDialog(
}
ScMovingAverageDialog::~ScMovingAverageDialog()
-{}
+{
+ dispose();
+}
+
+void ScMovingAverageDialog::dispose()
+{
+ mpIntervalSpin.clear();
+ ScStatisticsInputOutputDialog::dispose();
+}
bool ScMovingAverageDialog::Close()
{
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index ee906d410857..8bc496bfdd0a 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -81,6 +81,31 @@ ScRandomNumberGeneratorDialog::ScRandomNumberGeneratorDialog(
GetRangeFromSelection();
}
+ScRandomNumberGeneratorDialog::~ScRandomNumberGeneratorDialog()
+{
+ dispose();
+}
+
+void ScRandomNumberGeneratorDialog::dispose()
+{
+ mpInputRangeText.clear();
+ mpInputRangeEdit.clear();
+ mpInputRangeButton.clear();
+ mpDistributionCombo.clear();
+ mpParameter1Text.clear();
+ mpParameter1Value.clear();
+ mpParameter2Text.clear();
+ mpParameter2Value.clear();
+ mpSeed.clear();
+ mpEnableSeed.clear();
+ mpDecimalPlaces.clear();
+ mpEnableRounding.clear();
+ mpButtonApply.clear();
+ mpButtonOk.clear();
+ mpButtonClose.clear();
+ ScAnyRefDlg::dispose();
+}
+
void ScRandomNumberGeneratorDialog::Init()
{
mpButtonOk->SetClickHdl( LINK( this, ScRandomNumberGeneratorDialog, OkClicked ) );
@@ -114,9 +139,6 @@ void ScRandomNumberGeneratorDialog::GetRangeFromSelection()
mpInputRangeEdit->SetText( aCurrentString );
}
-ScRandomNumberGeneratorDialog::~ScRandomNumberGeneratorDialog()
-{}
-
void ScRandomNumberGeneratorDialog::SetActive()
{
if ( mbDialogLostFocus )
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index a88faafd1f64..4d1e7a51a97a 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -60,6 +60,28 @@ ScSamplingDialog::ScSamplingDialog(
GetRangeFromSelection();
}
+ScSamplingDialog::~ScSamplingDialog()
+{
+ dispose();
+}
+
+void ScSamplingDialog::dispose()
+{
+ mpInputRangeLabel.clear();
+ mpInputRangeEdit.clear();
+ mpInputRangeButton.clear();
+ mpOutputRangeLabel.clear();
+ mpOutputRangeEdit.clear();
+ mpOutputRangeButton.clear();
+ mpSampleSize.clear();
+ mpPeriod.clear();
+ mpRandomMethodRadio.clear();
+ mpPeriodicMethodRadio.clear();
+ mpButtonOk.clear();
+ mpActiveEdit.clear();
+ ScAnyRefDlg::dispose();
+}
+
void ScSamplingDialog::Init()
{
mpButtonOk->SetClickHdl( LINK( this, ScSamplingDialog, OkClicked ) );
@@ -98,9 +120,6 @@ void ScSamplingDialog::GetRangeFromSelection()
mpInputRangeEdit->SetText(aCurrentString);
}
-ScSamplingDialog::~ScSamplingDialog()
-{}
-
void ScSamplingDialog::SetActive()
{
if ( mDialogLostFocus )
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
index cb6382142fe3..a7993647c64f 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
@@ -87,7 +87,24 @@ ScStatisticsInputOutputDialog::ScStatisticsInputOutputDialog(
}
ScStatisticsInputOutputDialog::~ScStatisticsInputOutputDialog()
-{}
+{
+ dispose();
+}
+
+void ScStatisticsInputOutputDialog::dispose()
+{
+ mpInputRangeLabel.clear();
+ mpInputRangeEdit.clear();
+ mpInputRangeButton.clear();
+ mpOutputRangeLabel.clear();
+ mpOutputRangeEdit.clear();
+ mpOutputRangeButton.clear();
+ mpGroupByColumnsRadio.clear();
+ mpGroupByRowsRadio.clear();
+ mpButtonOk.clear();
+ mpActiveEdit.clear();
+ ScAnyRefDlg::dispose();
+}
void ScStatisticsInputOutputDialog::Init()
{
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
index 80da64a8bd2a..9edd0253415a 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
@@ -65,7 +65,27 @@ ScStatisticsTwoVariableDialog::ScStatisticsTwoVariableDialog(
}
ScStatisticsTwoVariableDialog::~ScStatisticsTwoVariableDialog()
-{}
+{
+ dispose();
+}
+
+void ScStatisticsTwoVariableDialog::dispose()
+{
+ mpVariable1RangeLabel.clear();
+ mpVariable1RangeEdit.clear();
+ mpVariable1RangeButton.clear();
+ mpVariable2RangeLabel.clear();
+ mpVariable2RangeEdit.clear();
+ mpVariable2RangeButton.clear();
+ mpOutputRangeLabel.clear();
+ mpOutputRangeEdit.clear();
+ mpOutputRangeButton.clear();
+ mpButtonOk.clear();
+ mpGroupByColumnsRadio.clear();
+ mpGroupByRowsRadio.clear();
+ mpActiveEdit.clear();
+ ScAnyRefDlg::dispose();
+}
void ScStatisticsTwoVariableDialog::Init()
{
@@ -141,7 +161,7 @@ void ScStatisticsTwoVariableDialog::SetActive()
void ScStatisticsTwoVariableDialog::SetReference( const ScRange& rReferenceRange, ScDocument* pDocument )
{
- if ( mpActiveEdit != NULL )
+ if ( mpActiveEdit != nullptr )
{
if ( rReferenceRange.aStart != rReferenceRange.aEnd )
RefInputStart( mpActiveEdit );
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index b1a19832233d..caf2c4a98373 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1750,6 +1750,11 @@ void ScInputHandler::UpdateActiveView()
pTopView = NULL;
}
+void ScInputHandler::SetInputWindow( ScInputWindow* pNew )
+{
+ pInputWin = pNew;
+}
+
void ScInputHandler::StopInputWinEngine( bool bAll )
{
if (pInputWin)
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 2115fec08daf..0df11583532d 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2218,7 +2218,7 @@ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo )
bool ScModule::RegisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd )
{
- std::list<vcl::Window*> & rlRefWindow = m_mapRefWindow[nSlotId];
+ std::list<VclPtr<vcl::Window> > & rlRefWindow = m_mapRefWindow[nSlotId];
if( std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd ) == rlRefWindow.end() )
{
@@ -2231,14 +2231,14 @@ bool ScModule::RegisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd )
bool ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd )
{
- std::map<sal_uInt16, std::list<vcl::Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
+ auto iSlot = m_mapRefWindow.find( nSlotId );
if( iSlot == m_mapRefWindow.end() )
return false;
- std::list<vcl::Window*> & rlRefWindow = iSlot->second;
+ std::list<VclPtr<vcl::Window> > & rlRefWindow = iSlot->second;
- std::list<vcl::Window*>::iterator i = std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd );
+ auto i = std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd );
if( i == rlRefWindow.end() )
return false;
@@ -2256,16 +2256,16 @@ vcl::Window * ScModule::Find1RefWindow( sal_uInt16 nSlotId, vcl::Window *pWndAn
if (!pWndAncestor)
return NULL;
- std::map<sal_uInt16, std::list<vcl::Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
+ auto iSlot = m_mapRefWindow.find( nSlotId );
if( iSlot == m_mapRefWindow.end() )
return NULL;
- std::list<vcl::Window*> & rlRefWindow = iSlot->second;
+ std::list<VclPtr<vcl::Window> > & rlRefWindow = iSlot->second;
while( vcl::Window *pParent = pWndAncestor->GetParent() ) pWndAncestor = pParent;
- for( std::list<vcl::Window*>::iterator i = rlRefWindow.begin(); i!=rlRefWindow.end(); ++i )
+ for( auto i = rlRefWindow.begin(); i!=rlRefWindow.end(); ++i )
if ( pWndAncestor->IsWindowOrChild( *i, (*i)->IsSystemWindow() ) )
return *i;
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 6e493396bad5..958e194831a4 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -58,7 +58,7 @@ class ScTextImportOptionsDlg;
class ScCondFormatManagerDlg;
#define DECL_ABSTDLG_BASE(Class,DialogClass) \
- DialogClass* pDlg; \
+ VclPtr<DialogClass> pDlg; \
public: \
Class( DialogClass* p) \
: pDlg(p) \
@@ -67,7 +67,7 @@ public: \
virtual short Execute() SAL_OVERRIDE ;
#define DECL_ABSTDLG2_BASE(Class,DialogClass) \
- DialogClass* pDlg; \
+ VclPtr<DialogClass> pDlg; \
public: \
Class( DialogClass* p) \
: pDlg(p) \
@@ -79,7 +79,6 @@ public: \
#define IMPL_ABSTDLG_BASE(Class) \
Class::~Class() \
{ \
- delete pDlg; \
} \
short Class::Execute() \
{ \
@@ -89,7 +88,6 @@ short Class::Execute() \
#define IMPL_ABSTDLG2_BASE(Class) \
Class::~Class() \
{ \
- delete pDlg; \
} \
void Class::StartExecuteModal( const Link& rEndDialogHdl ) \
{ \
diff --git a/sc/source/ui/attrdlg/scuiexp.cxx b/sc/source/ui/attrdlg/scuiexp.cxx
index f3e026f24ff2..374e8ad74d15 100644
--- a/sc/source/ui/attrdlg/scuiexp.cxx
+++ b/sc/source/ui/attrdlg/scuiexp.cxx
@@ -20,6 +20,36 @@
#undef SC_DLLIMPLEMENTATION
#include "scdlgfact.hxx"
+#include "corodlg.hxx"
+#include "condformatmgr.hxx"
+#include "dapitype.hxx"
+#include "dapidata.hxx"
+#include "datafdlg.hxx"
+#include "delcodlg.hxx"
+#include "delcldlg.hxx"
+#include "dpgroupdlg.hxx"
+#include "filldlg.hxx"
+#include "groupdlg.hxx"
+#include "linkarea.hxx"
+#include "lbseldlg.hxx"
+#include "inscldlg.hxx"
+#include "instbdlg.hxx"
+#include "inscodlg.hxx"
+#include "mtrindlg.hxx"
+#include "mvtabdlg.hxx"
+#include "namecrea.hxx"
+#include "namepast.hxx"
+#include "pfiltdlg.hxx"
+#include "pvfundlg.hxx"
+#include "shtabdlg.hxx"
+#include "scendlg.hxx"
+#include "scuiasciiopt.hxx"
+#include "scuiautofmt.hxx"
+#include "scuiimoptdlg.hxx"
+#include "sortdlg.hxx"
+#include "strindlg.hxx"
+#include "tabbgcolordlg.hxx"
+#include "textimportoptions.hxx"
#include <sal/types.h>
namespace scui
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index ea485cbd6f14..90453a87656f 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -59,6 +59,20 @@ ScTabPageProtection::ScTabPageProtection(vcl::Window* pParent, const SfxItemSet&
m_pBtnHidePrint->SetClickHdl( LINK( this, ScTabPageProtection, ButtonClickHdl ) );
}
+ScTabPageProtection::~ScTabPageProtection()
+{
+ dispose();
+}
+
+void ScTabPageProtection::dispose()
+{
+ m_pBtnHideCell.clear();
+ m_pBtnProtect.clear();
+ m_pBtnHideFormula.clear();
+ m_pBtnHidePrint.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* ScTabPageProtection::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
return ( new ScTabPageProtection( pParent, *rAttrSet ) );
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index df4cda835fc1..80c513f1a0ae 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -97,7 +97,14 @@ ScMenuFloatingWindow::ScMenuFloatingWindow(vcl::Window* pParent, ScDocument* pDo
ScMenuFloatingWindow::~ScMenuFloatingWindow()
{
+ dispose();
+}
+
+void ScMenuFloatingWindow::dispose()
+{
EndPopupMode();
+ mpParentMenu.clear();
+ PopupMenuFloatingWindow::dispose();
}
void ScMenuFloatingWindow::PopupModeEnd()
@@ -848,6 +855,17 @@ ScCheckListMenuWindow::Member::Member()
ScCheckListMenuWindow::CancelButton::CancelButton(ScCheckListMenuWindow* pParent) :
::CancelButton(pParent), mpParent(pParent) {}
+ScCheckListMenuWindow::CancelButton::~CancelButton()
+{
+ dispose();
+}
+
+void ScCheckListMenuWindow::CancelButton::dispose()
+{
+ mpParent.clear();
+ ::CancelButton::dispose();
+}
+
void ScCheckListMenuWindow::CancelButton::Click()
{
mpParent->EndPopupMode();
diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx
index f3ee36aaa9e8..daaa3bda0d68 100644
--- a/sc/source/ui/condformat/colorformat.cxx
+++ b/sc/source/ui/condformat/colorformat.cxx
@@ -123,6 +123,29 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(vcl::Window* pWindow, const ScDataBar
PosSelectHdl(NULL);
}
+ScDataBarSettingsDlg::~ScDataBarSettingsDlg()
+{
+ dispose();
+}
+
+void ScDataBarSettingsDlg::dispose()
+{
+ mpBtnOk.clear();
+ mpBtnCancel.clear();
+ mpLbPos.clear();
+ mpLbNeg.clear();
+ mpLbAxisCol.clear();
+ mpLbTypeMin.clear();
+ mpLbTypeMax.clear();
+ mpLbAxisPos.clear();
+ mpEdMin.clear();
+ mpEdMax.clear();
+ mpLenMin.clear();
+ mpLenMax.clear();
+ mpCbOnlyBar.clear();
+ ModalDialog::dispose();
+}
+
void ScDataBarSettingsDlg::Init()
{
SfxObjectShell* pDocSh = SfxObjectShell::Current();
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index ad260e40fe80..f058aabe7295 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -47,6 +47,17 @@ ScCondFormatList::ScCondFormatList(vcl::Window* pParent, WinBits nStyle)
SetBackground(GetControlBackground());
}
+ScCondFormatList::~ScCondFormatList()
+{
+ dispose();
+}
+
+void ScCondFormatList::dispose()
+{
+ mpDialogParent.clear();
+ Control::dispose();
+}
+
void ScCondFormatList::init(ScDocument* pDoc, ScCondFormatDlg* pDialogParent,
const ScConditionalFormat* pFormat, const ScRangeList& rRanges,
const ScAddress& rPos, condformat::dialog::ScCondFormatDialogType eType)
@@ -436,7 +447,20 @@ ScCondFormatDlg::ScCondFormatDlg(vcl::Window* pParent, ScDocument* pDoc,
ScCondFormatDlg::~ScCondFormatDlg()
{
+ dispose();
+}
+
+void ScCondFormatDlg::dispose()
+{
SC_MOD()->PopAnyRefDlg();
+ mpBtnAdd.clear();
+ mpBtnRemove.clear();
+ mpFtRange.clear();
+ mpEdRange.clear();
+ mpRbRange.clear();
+ mpCondFormList.clear();
+ mpLastEdit.clear();
+ ScAnyRefModalDlg::dispose();
}
void ScCondFormatDlg::SetActive()
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index bbdba3b5d7e1..2669dd5ddf66 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -138,8 +138,11 @@ ScCondFormatManagerDlg::~ScCondFormatManagerDlg()
void ScCondFormatManagerDlg::dispose()
{
- delete m_pCtrlManager;
delete mpFormatList;
+ m_pBtnAdd.clear();
+ m_pBtnRemove.clear();
+ m_pBtnEdit.clear();
+ m_pCtrlManager.clear();
ModalDialog::dispose();
}
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index c8087b39920f..4c1a1d0799c4 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -184,7 +184,41 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
}
ScPivotLayoutDialog::~ScPivotLayoutDialog()
-{}
+{
+ dispose();
+}
+
+void ScPivotLayoutDialog::dispose()
+{
+ mpPreviouslyFocusedListBox.clear();
+ mpCurrentlyFocusedListBox.clear();
+ mpListBoxField.clear();
+ mpListBoxPage.clear();
+ mpListBoxColumn.clear();
+ mpListBoxRow.clear();
+ mpListBoxData.clear();
+ mpCheckIgnoreEmptyRows.clear();
+ mpCheckTotalColumns.clear();
+ mpCheckAddFilter.clear();
+ mpCheckIdentifyCategories.clear();
+ mpCheckTotalRows.clear();
+ mpCheckDrillToDetail.clear();
+ mpSourceRadioNamedRange.clear();
+ mpSourceRadioSelection.clear();
+ mpSourceListBox.clear();
+ mpSourceEdit.clear();
+ mpSourceButton.clear();
+ mpDestinationRadioNewSheet.clear();
+ mpDestinationRadioNamedRange.clear();
+ mpDestinationRadioSelection.clear();
+ mpDestinationListBox.clear();
+ mpDestinationEdit.clear();
+ mpDestinationButton.clear();
+ mpBtnOK.clear();
+ mpBtnCancel.clear();
+ mpActiveEdit.clear();
+ ScAnyRefDlg::dispose();
+}
void ScPivotLayoutDialog::SetupSource()
{
@@ -314,7 +348,7 @@ void ScPivotLayoutDialog::SetActive()
if (mbDialogLostFocus)
{
mbDialogLostFocus = false;
- if(mpActiveEdit != NULL)
+ if(mpActiveEdit != nullptr)
{
mpActiveEdit->GrabFocus();
if (mpActiveEdit == mpSourceEdit)
@@ -334,7 +368,7 @@ void ScPivotLayoutDialog::SetReference(const ScRange& rReferenceRange, ScDocumen
if (!mbDialogLostFocus)
return;
- if (mpActiveEdit == NULL)
+ if (mpActiveEdit == nullptr)
return;
if (rReferenceRange.aStart != rReferenceRange.aEnd)
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
index 0a54325891d2..34b5fc826b3d 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
@@ -28,7 +28,15 @@ ScPivotLayoutTreeListBase::ScPivotLayoutTreeListBase(vcl::Window* pParent, WinBi
}
ScPivotLayoutTreeListBase::~ScPivotLayoutTreeListBase()
-{}
+{
+ dispose();
+}
+
+void ScPivotLayoutTreeListBase::dispose()
+{
+ mpParent.clear();
+ SvTreeListBox::dispose();
+}
void ScPivotLayoutTreeListBase::Setup(ScPivotLayoutDialog* pParent)
{
@@ -126,7 +134,7 @@ void ScPivotLayoutTreeListBase::GetFocus()
if (pEntry)
InsertEntryForSourceTarget(pEntry, NULL);
- if (mpParent->mpPreviouslyFocusedListBox != NULL)
+ if (mpParent->mpPreviouslyFocusedListBox != nullptr)
mpParent->mpPreviouslyFocusedListBox->GrabFocus();
}
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx
index 3644f8444040..3595286c2fda 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx
@@ -59,7 +59,7 @@ void ScPivotLayoutTreeListLabel::FillLabelFields(ScDPLabelDataVector& rLabelVect
void ScPivotLayoutTreeListLabel::InsertEntryForSourceTarget(SvTreeListEntry* /*pSource*/, SvTreeListEntry* /*pTarget*/)
{
- if(mpParent->mpPreviouslyFocusedListBox != this)
+ if(mpParent->mpPreviouslyFocusedListBox.get() != this)
mpParent->mpPreviouslyFocusedListBox->RemoveSelection();
}
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index 835dadafa614..48a187543050 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -112,6 +112,23 @@ void ScConsolidateDlg::dispose()
{
delete [] pAreaData;
delete pRangeUtil;
+ pLbFunc.clear();
+ pLbConsAreas.clear();
+ pLbDataArea.clear();
+ pEdDataArea.clear();
+ pRbDataArea.clear();
+ pLbDestArea.clear();
+ pEdDestArea.clear();
+ pRbDestArea.clear();
+ pExpander.clear();
+ pBtnByRow.clear();
+ pBtnByCol.clear();
+ pBtnRefs.clear();
+ pBtnOk.clear();
+ pBtnCancel.clear();
+ pBtnAdd.clear();
+ pBtnRemove.clear();
+ pRefInputEdit.clear();
ScAnyRefDlg::dispose();
}
diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx
index 5cf72605ee55..5b8674d03166 100644
--- a/sc/source/ui/dbgui/dapidata.cxx
+++ b/sc/source/ui/dbgui/dapidata.cxx
@@ -82,6 +82,19 @@ ScDataPilotDatabaseDlg::ScDataPilotDatabaseDlg( vcl::Window* pParent ) :
m_pLbType->SetSelectHdl( LINK( this, ScDataPilotDatabaseDlg, SelectHdl ) );
}
+ScDataPilotDatabaseDlg::~ScDataPilotDatabaseDlg()
+{
+ dispose();
+}
+
+void ScDataPilotDatabaseDlg::dispose()
+{
+ m_pLbDatabase.clear();
+ m_pCbObject.clear();
+ m_pLbType.clear();
+ ModalDialog::dispose();
+}
+
void ScDataPilotDatabaseDlg::GetValues( ScImportSourceDesc& rDesc )
{
sal_uInt16 nSelect = m_pLbType->GetSelectEntryPos();
diff --git a/sc/source/ui/dbgui/dapitype.cxx b/sc/source/ui/dbgui/dapitype.cxx
index f32ce2bf0ad1..d2869f35ef53 100644
--- a/sc/source/ui/dbgui/dapitype.cxx
+++ b/sc/source/ui/dbgui/dapitype.cxx
@@ -53,6 +53,17 @@ ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg(vcl::Window* pParent, bool bE
ScDataPilotSourceTypeDlg::~ScDataPilotSourceTypeDlg()
{
+ dispose();
+}
+
+void ScDataPilotSourceTypeDlg::dispose()
+{
+ m_pBtnSelection.clear();
+ m_pBtnNamedRange.clear();
+ m_pBtnDatabase.clear();
+ m_pBtnExternal.clear();
+ m_pLbNamedRange.clear();
+ ModalDialog::dispose();
}
bool ScDataPilotSourceTypeDlg::IsDatabase() const
@@ -115,8 +126,20 @@ ScDataPilotServiceDlg::ScDataPilotServiceDlg( vcl::Window* pParent,
ScDataPilotServiceDlg::~ScDataPilotServiceDlg()
{
+ dispose();
}
+void ScDataPilotServiceDlg::dispose()
+{
+ m_pLbService.clear();
+ m_pEdSource.clear();
+ m_pEdName.clear();
+ m_pEdUser.clear();
+ m_pEdPasswd.clear();
+ ModalDialog::dispose();
+}
+
+
OUString ScDataPilotServiceDlg::GetServiceName() const
{
return m_pLbService->GetSelectEntry();
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index dca70c5c17f0..f78153e4df05 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -164,6 +164,21 @@ ScDbNameDlg::~ScDbNameDlg()
void ScDbNameDlg::dispose()
{
DELETEZ( pSaveObj );
+ m_pEdName.clear();
+ m_pAssignFrame.clear();
+ m_pEdAssign.clear();
+ m_pRbAssign.clear();
+ m_pOptions.clear();
+ m_pBtnHeader.clear();
+ m_pBtnDoSize.clear();
+ m_pBtnKeepFmt.clear();
+ m_pBtnStripData.clear();
+ m_pFTSource.clear();
+ m_pFTOperations.clear();
+ m_pBtnOk.clear();
+ m_pBtnCancel.clear();
+ m_pBtnAdd.clear();
+ m_pBtnRemove.clear();
ScAnyRefDlg::dispose();
}
diff --git a/sc/source/ui/dbgui/dpgroupdlg.cxx b/sc/source/ui/dbgui/dpgroupdlg.cxx
index 17493333b5fb..e584ef6e2b1a 100644
--- a/sc/source/ui/dbgui/dpgroupdlg.cxx
+++ b/sc/source/ui/dbgui/dpgroupdlg.cxx
@@ -173,6 +173,24 @@ ScDPNumGroupDlg::ScDPNumGroupDlg( vcl::Window* pParent, const ScDPNumGroupInfo&
mpEdBy->GrabFocus();
}
+ScDPNumGroupDlg::~ScDPNumGroupDlg()
+{
+ dispose();
+}
+
+void ScDPNumGroupDlg::dispose()
+{
+ mpRbAutoStart.clear();
+ mpRbManStart.clear();
+ mpEdStart.clear();
+ mpRbAutoEnd.clear();
+ mpRbManEnd.clear();
+ mpEdEnd.clear();
+ mpEdBy.clear();
+ ModalDialog::dispose();
+}
+
+
ScDPNumGroupInfo ScDPNumGroupDlg::GetGroupInfo() const
{
ScDPNumGroupInfo aInfo;
@@ -259,6 +277,27 @@ ScDPDateGroupDlg::ScDPDateGroupDlg( vcl::Window* pParent,
mpLbUnits->SetCheckButtonHdl( LINK( this, ScDPDateGroupDlg, CheckHdl ) );
}
+ScDPDateGroupDlg::~ScDPDateGroupDlg()
+{
+ dispose();
+}
+
+void ScDPDateGroupDlg::dispose()
+{
+ mpRbAutoStart.clear();
+ mpRbManStart.clear();
+ mpEdStart.clear();
+ mpRbAutoEnd.clear();
+ mpRbManEnd.clear();
+ mpEdEnd.clear();
+ mpRbNumDays.clear();
+ mpRbUnits.clear();
+ mpEdNumDays.clear();
+ mpLbUnits.clear();
+ mpBtnOk.clear();
+ ModalDialog::dispose();
+}
+
ScDPNumGroupInfo ScDPDateGroupDlg::GetGroupInfo() const
{
ScDPNumGroupInfo aInfo;
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 40375c8422eb..3ef4c4fb9289 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -171,6 +171,38 @@ void ScFilterDlg::dispose()
// Hack: RefInput control
pTimer->Stop();
delete pTimer;
+
+ pLbConnect1.clear();
+ pLbField1.clear();
+ pLbCond1.clear();
+ pEdVal1.clear();
+ pLbConnect2.clear();
+ pLbField2.clear();
+ pLbCond2.clear();
+ pEdVal2.clear();
+ pLbConnect3.clear();
+ pLbField3.clear();
+ pLbCond3.clear();
+ pEdVal3.clear();
+ pLbConnect4.clear();
+ pLbField4.clear();
+ pLbCond4.clear();
+ pEdVal4.clear();
+ pScrollBar.clear();
+ pExpander.clear();
+ pBtnOk.clear();
+ pBtnCancel.clear();
+ pBtnCase.clear();
+ pBtnRegExp.clear();
+ pBtnHeader.clear();
+ pBtnUnique.clear();
+ pBtnCopyResult.clear();
+ pLbCopyArea.clear();
+ pEdCopyArea.clear();
+ pRbCopyArea.clear();
+ pBtnDestPers.clear();
+ pFtDbAreaLabel.clear();
+ pFtDbArea.clear();
ScAnyRefDlg::dispose();
}
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index 6c566bc57172..eb5ade6386e3 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -92,6 +92,24 @@ void ScPivotFilterDlg::dispose()
delete pEntryLists[i];
delete pOutItem;
+ m_pLbField1.clear();
+ m_pLbCond1.clear();
+ m_pEdVal1.clear();
+ m_pLbConnect1.clear();
+ m_pLbField2.clear();
+ m_pLbCond2.clear();
+ m_pEdVal2.clear();
+ m_pLbConnect2.clear();
+ m_pLbField3.clear();
+ m_pLbCond3.clear();
+ m_pEdVal3.clear();
+ m_pBtnCase.clear();
+ m_pBtnRegExp.clear();
+ m_pBtnUnique.clear();
+ m_pFtDbArea.clear();
+ for (auto a : aValueEdArr) a.clear();
+ for (auto a : aFieldLbArr) a.clear();
+ for (auto a : aCondLbArr) a.clear();
ModalDialog::dispose();
}
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 3f55a4be76d9..a5059863edd2 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -214,6 +214,25 @@ ScDPFunctionDlg::ScDPFunctionDlg(
Init( rLabelData, rFuncData );
}
+ScDPFunctionDlg::~ScDPFunctionDlg()
+{
+ dispose();
+}
+
+void ScDPFunctionDlg::dispose()
+{
+ mpLbFunc.clear();
+ mpFtName.clear();
+ mpLbType.clear();
+ mpFtBaseField.clear();
+ mpLbBaseField.clear();
+ mpFtBaseItem.clear();
+ mpLbBaseItem.clear();
+ mpBtnOk.clear();
+ ModalDialog::dispose();
+}
+
+
sal_uInt16 ScDPFunctionDlg::GetFuncMask() const
{
return mpLbFunc->GetSelection();
@@ -431,6 +450,24 @@ ScDPSubtotalDlg::ScDPSubtotalDlg( vcl::Window* pParent, ScDPObject& rDPObj,
Init( rLabelData, rFuncData );
}
+ScDPSubtotalDlg::~ScDPSubtotalDlg()
+{
+ dispose();
+}
+
+void ScDPSubtotalDlg::dispose()
+{
+ mpRbNone.clear();
+ mpRbAuto.clear();
+ mpRbUser.clear();
+ mpLbFunc.clear();
+ mpFtName.clear();
+ mpCbShowAll.clear();
+ mpBtnOk.clear();
+ mpBtnOptions.clear();
+ ModalDialog::dispose();
+}
+
sal_uInt16 ScDPSubtotalDlg::GetFuncMask() const
{
sal_uInt16 nFuncMask = PIVOT_FUNC_NONE;
@@ -545,6 +582,35 @@ ScDPSubtotalOptDlg::ScDPSubtotalOptDlg( vcl::Window* pParent, ScDPObject& rDPObj
Init( rDataFields, bEnableLayout );
}
+ScDPSubtotalOptDlg::~ScDPSubtotalOptDlg()
+{
+ dispose();
+}
+
+void ScDPSubtotalOptDlg::dispose()
+{
+ m_pLbSortBy.clear();
+ m_pRbSortAsc.clear();
+ m_pRbSortDesc.clear();
+ m_pRbSortMan.clear();
+ m_pLayoutFrame.clear();
+ m_pLbLayout.clear();
+ m_pCbLayoutEmpty.clear();
+ m_pCbRepeatItemLabels.clear();
+ m_pCbShow.clear();
+ m_pNfShow.clear();
+ m_pFtShow.clear();
+ m_pFtShowFrom.clear();
+ m_pLbShowFrom.clear();
+ m_pFtShowUsing.clear();
+ m_pLbShowUsing.clear();
+ m_pHideFrame.clear();
+ m_pLbHide.clear();
+ m_pFtHierarchy.clear();
+ m_pLbHierarchy.clear();
+ ModalDialog::dispose();
+}
+
void ScDPSubtotalOptDlg::FillLabelData( ScDPLabelData& rLabelData ) const
{
// *** SORTING ***
@@ -798,6 +864,18 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( vcl::Window* pParent, ScDPObject& rDPObj,
mpLbDims->SetDoubleClickHdl( LINK( this, ScDPShowDetailDlg, DblClickHdl ) );
}
+ScDPShowDetailDlg::~ScDPShowDetailDlg()
+{
+ dispose();
+}
+
+void ScDPShowDetailDlg::dispose()
+{
+ mpLbDims.clear();
+ mpBtnOk.clear();
+ ModalDialog::dispose();
+}
+
short ScDPShowDetailDlg::Execute()
{
return mpLbDims->GetEntryCount() ? ModalDialog::Execute() : static_cast<short>(RET_CANCEL);
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index cd2b3a750fde..c2d65c547ca4 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -108,6 +108,24 @@ ScNewScenarioDlg::ScNewScenarioDlg( vcl::Window* pParent, const OUString& rName,
m_pCbProtect->Enable(false);
}
+ScNewScenarioDlg::~ScNewScenarioDlg()
+{
+ dispose();
+}
+
+void ScNewScenarioDlg::dispose()
+{
+ m_pEdName.clear();
+ m_pEdComment.clear();
+ m_pCbShowFrame.clear();
+ m_pLbColor.clear();
+ m_pCbTwoWay.clear();
+ m_pCbCopyAll.clear();
+ m_pCbProtect.clear();
+ m_pBtnOk.clear();
+ ModalDialog::dispose();
+}
+
void ScNewScenarioDlg::GetScenarioData( OUString& rName, OUString& rComment,
Color& rColor, sal_uInt16& rFlags ) const
{
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 2abde832f035..3a6428a19288 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -470,6 +470,28 @@ ScImportAsciiDlg::~ScImportAsciiDlg()
void ScImportAsciiDlg::dispose()
{
delete[] mpRowPosArray;
+ pFtCharSet.clear();
+ pLbCharSet.clear();
+ pFtCustomLang.clear();
+ pLbCustomLang.clear();
+ pFtRow.clear();
+ pNfRow.clear();
+ pRbFixed.clear();
+ pRbSeparated.clear();
+ pCkbTab.clear();
+ pCkbSemicolon.clear();
+ pCkbComma.clear();
+ pCkbSpace.clear();
+ pCkbOther.clear();
+ pEdOther.clear();
+ pCkbAsOnce.clear();
+ pFtTextSep.clear();
+ pCbTextSep.clear();
+ pCkbQuotedAsText.clear();
+ pCkbDetectNumber.clear();
+ pFtType.clear();
+ pLbType.clear();
+ mpTableBox.clear();
ModalDialog::dispose();
}
diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx
index 1cbb4243f297..bcc2eb97254c 100644
--- a/sc/source/ui/dbgui/scuiimoptdlg.cxx
+++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx
@@ -247,6 +247,18 @@ void ScImportOptionsDlg::dispose()
{
delete pFieldSepTab;
delete pTextSepTab;
+ m_pFieldFrame.clear();
+ m_pFtCharset.clear();
+ m_pLbCharset.clear();
+ m_pFtFieldSep.clear();
+ m_pEdFieldSep.clear();
+ m_pFtTextSep.clear();
+ m_pEdTextSep.clear();
+ m_pCbShown.clear();
+ m_pCbFormulas.clear();
+ m_pCbQuoteAll.clear();
+ m_pCbFixed.clear();
+ m_pBtnOk.clear();
ModalDialog::dispose();
}
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index c872bb8257f6..a78b6deab598 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -116,6 +116,25 @@ void ScSpecialFilterDlg::dispose()
// Hack: RefInput-Kontrolle
pIdle->Stop();
delete pIdle;
+
+ pLbFilterArea.clear();
+ pEdFilterArea.clear();
+ pRbFilterArea.clear();
+ pExpander.clear();
+ pBtnCase.clear();
+ pBtnRegExp.clear();
+ pBtnHeader.clear();
+ pBtnUnique.clear();
+ pBtnCopyResult.clear();
+ pLbCopyArea.clear();
+ pEdCopyArea.clear();
+ pRbCopyArea.clear();
+ pBtnDestPers.clear();
+ pFtDbAreaLabel.clear();
+ pFtDbArea.clear();
+ pBtnOk.clear();
+ pBtnCancel.clear();
+ pRefInputEdit.clear();
ScAnyRefDlg::dispose();
}
diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx
index 97c6b98641c8..0934193d4e12 100644
--- a/sc/source/ui/dbgui/sortdlg.cxx
+++ b/sc/source/ui/dbgui/sortdlg.cxx
@@ -50,6 +50,19 @@ ScSortWarningDlg::ScSortWarningDlg(vcl::Window* pParent,
aBtnCurSort->SetClickHdl( LINK( this, ScSortWarningDlg, BtnHdl ) );
}
+ScSortWarningDlg::~ScSortWarningDlg()
+{
+ dispose();
+}
+
+void ScSortWarningDlg::dispose()
+{
+ aFtText.clear();
+ aBtnExtSort.clear();
+ aBtnCurSort.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK( ScSortWarningDlg, BtnHdl, PushButton*, pBtn )
{
if ( pBtn == aBtnExtSort )
diff --git a/sc/source/ui/dbgui/subtdlg.cxx b/sc/source/ui/dbgui/subtdlg.cxx
index c4a718a9e6d7..b34356d0bd21 100644
--- a/sc/source/ui/dbgui/subtdlg.cxx
+++ b/sc/source/ui/dbgui/subtdlg.cxx
@@ -36,6 +36,17 @@ ScSubTotalDlg::ScSubTotalDlg(vcl::Window* pParent, const SfxItemSet* pArgSet)
m_pBtnRemove->SetClickHdl( LINK( this, ScSubTotalDlg, RemoveHdl ) );
}
+ScSubTotalDlg::~ScSubTotalDlg()
+{
+ dispose();
+}
+
+void ScSubTotalDlg::dispose()
+{
+ m_pBtnRemove.clear();
+ SfxTabDialog::dispose();
+}
+
IMPL_LINK_INLINE_START( ScSubTotalDlg, RemoveHdl, PushButton *, pBtn )
{
if (pBtn == m_pBtnRemove)
diff --git a/sc/source/ui/dbgui/textimportoptions.cxx b/sc/source/ui/dbgui/textimportoptions.cxx
index fb1b34945c14..a90a35d183b7 100644
--- a/sc/source/ui/dbgui/textimportoptions.cxx
+++ b/sc/source/ui/dbgui/textimportoptions.cxx
@@ -38,8 +38,20 @@ ScTextImportOptionsDlg::ScTextImportOptionsDlg(vcl::Window* pParent)
ScTextImportOptionsDlg::~ScTextImportOptionsDlg()
{
+ dispose();
}
+void ScTextImportOptionsDlg::dispose()
+{
+ m_pBtnOk.clear();
+ m_pRbAutomatic.clear();
+ m_pRbCustom.clear();
+ m_pLbCustomLang.clear();
+ m_pBtnConvertDate.clear();
+ ModalDialog::dispose();
+}
+
+
short ScTextImportOptionsDlg::Execute()
{
return ModalDialog::Execute();
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 8083c0e3a13a..ed215928eead 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -93,6 +93,17 @@ ScTabPageSortFields::ScTabPageSortFields(vcl::Window* pParent,
SetExchangeSupport();
}
+ScTabPageSortFields::~ScTabPageSortFields()
+{
+ dispose();
+}
+
+void ScTabPageSortFields::dispose()
+{
+ pDlg.clear();
+ SfxTabPage::dispose();
+}
+
void ScTabPageSortFields::SetPosSizePixel(const Point& rAllocPos, const Size& rAllocation)
{
SfxTabPage::SetPosSizePixel(rAllocPos, rAllocation);
@@ -111,10 +122,6 @@ void ScTabPageSortFields::SetPosPixel(const Point& rAllocPos)
maSortKeyCtrl.setScrollRange();
}
-ScTabPageSortFields::~ScTabPageSortFields()
-{
-}
-
void ScTabPageSortFields::Init()
{
const ScSortItem& rSortItem = static_cast<const ScSortItem&>(
@@ -528,6 +535,21 @@ void ScTabPageSortOptions::dispose()
delete pColRes;
delete pColWrap; //! not if from document
+ m_pBtnCase.clear();
+ m_pBtnHeader.clear();
+ m_pBtnFormats.clear();
+ m_pBtnNaturalSort.clear();
+ m_pBtnCopyResult.clear();
+ m_pLbOutPos.clear();
+ m_pEdOutPos.clear();
+ m_pBtnSortUser.clear();
+ m_pLbSortUser.clear();
+ m_pLbLanguage.clear();
+ m_pFtAlgorithm.clear();
+ m_pLbAlgorithm.clear();
+ m_pBtnTopDown.clear();
+ m_pBtnLeftRight.clear();
+ pDlg.clear();
SfxTabPage::dispose();
}
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index a8b4c14e58d0..a7f010b9a7f1 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -84,6 +84,9 @@ void ScTpSubTotalGroup::dispose()
delete pData;
}
}
+ mpLbGroup.clear();
+ mpLbColumns.clear();
+ mpLbFunctions.clear();
SfxTabPage::dispose();
}
@@ -448,6 +451,21 @@ ScTpSubTotalOptions::ScTpSubTotalOptions( vcl::Window* pParent,
ScTpSubTotalOptions::~ScTpSubTotalOptions()
{
+ dispose();
+}
+
+void ScTpSubTotalOptions::dispose()
+{
+ pBtnPagebreak.clear();
+ pBtnCase.clear();
+ pBtnSort.clear();
+ pFlSort.clear();
+ pBtnAscending.clear();
+ pBtnDescending.clear();
+ pBtnFormats.clear();
+ pBtnUserDef.clear();
+ pLbUserDef.clear();
+ SfxTabPage::dispose();
}
void ScTpSubTotalOptions::Init()
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 5d52c71d4957..27dd263e7ef7 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -168,6 +168,17 @@ void ScTPValidationValue::RefInputDonePostHdl()
m_pRefEdit->GrabFocus();
}
+ScTPValidationValue::ScRefButtonEx::~ScRefButtonEx()
+{
+ dispose();
+}
+
+void ScTPValidationValue::ScRefButtonEx::dispose()
+{
+ m_pPage.clear();
+ ::formula::RefButton::dispose();
+}
+
namespace {
/** Converts the passed ScValidationMode to the position in the list box. */
@@ -346,6 +357,33 @@ ScTPValidationValue::ScTPValidationValue( vcl::Window* pParent, const SfxItemSet
m_pBtnRef->Hide(); // cell range picker
}
+ScTPValidationValue::~ScTPValidationValue()
+{
+ dispose();
+}
+
+void ScTPValidationValue::dispose()
+{
+ m_pLbAllow.clear();
+ m_pCbAllow.clear();
+ m_pCbShow.clear();
+ m_pCbSort.clear();
+ m_pFtValue.clear();
+ m_pLbValue.clear();
+ m_pFtMin.clear();
+ m_pMinGrid.clear();
+ m_pEdMin.clear();
+ m_pEdList.clear();
+ m_pFtMax.clear();
+ m_pEdMax.clear();
+ m_pFtHint.clear();
+ m_pRefEdit.clear();
+ m_pBtnRef.clear();
+ m_pRefGrid.clear();
+ SfxTabPage::dispose();
+}
+
+
void ScTPValidationValue::Init()
{
m_pLbAllow->SetSelectHdl( LINK( this, ScTPValidationValue, SelectHdl ) );
@@ -649,6 +687,15 @@ ScTPValidationHelp::ScTPValidationHelp( vcl::Window* pParent,
ScTPValidationHelp::~ScTPValidationHelp()
{
+ dispose();
+}
+
+void ScTPValidationHelp::dispose()
+{
+ pTsbHelp.clear();
+ pEdtTitle.clear();
+ pEdInputHelp.clear();
+ SfxTabPage::dispose();
}
void ScTPValidationHelp::Init()
@@ -713,6 +760,18 @@ ScTPValidationError::ScTPValidationError( vcl::Window* pParent,
ScTPValidationError::~ScTPValidationError()
{
+ dispose();
+}
+
+void ScTPValidationError::dispose()
+{
+ m_pTsbShow.clear();
+ m_pLbAction.clear();
+ m_pBtnSearch.clear();
+ m_pEdtTitle.clear();
+ m_pFtError.clear();
+ m_pEdError.clear();
+ SfxTabPage::dispose();
}
void ScTPValidationError::Init()
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx
index b5be34b77d62..984f19307213 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -46,7 +46,7 @@ SearchResultsDlg::~SearchResultsDlg()
void SearchResultsDlg::dispose()
{
- delete mpList;
+ mpList.clear();
ModelessDialog::dispose();
}
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index c669e6b69829..2d4e6bec0192 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -47,9 +47,9 @@
struct TableLink_Impl
{
- ScDocShell* m_pDocSh;
- vcl::Window* m_pOldParent;
- Link m_aEndEditLink;
+ ScDocShell* m_pDocSh;
+ VclPtr<vcl::Window> m_pOldParent;
+ Link m_aEndEditLink;
TableLink_Impl() : m_pDocSh( NULL ), m_pOldParent( NULL ) {}
};
diff --git a/sc/source/ui/docshell/tpstat.cxx b/sc/source/ui/docshell/tpstat.cxx
index 7895be53451e..096c20843b4c 100644
--- a/sc/source/ui/docshell/tpstat.cxx
+++ b/sc/source/ui/docshell/tpstat.cxx
@@ -56,8 +56,18 @@ ScDocStatPage::ScDocStatPage( vcl::Window *pParent, const SfxItemSet& rSet )
ScDocStatPage::~ScDocStatPage()
{
+ dispose();
}
+void ScDocStatPage::dispose()
+{
+ m_pFtTables.clear();
+ m_pFtCells.clear();
+ m_pFtPages.clear();
+ SfxTabPage::dispose();
+}
+
+
bool ScDocStatPage::FillItemSet( SfxItemSet* /* rSet */ )
{
return false;
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index 074987b48d3c..28bf18ebf214 100644
--- a/sc/source/ui/drawfunc/fupoor.cxx
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -53,8 +53,6 @@ FuPoor::~FuPoor()
{
aDragTimer.Stop();
aScrollTimer.Stop();
-
- delete pDialog;
}
void FuPoor::Activate()
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index aac3e3c6a476..099b2d31a5fc 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -181,6 +181,7 @@ void ScFunctionDockWin::dispose()
aDDFuncList.disposeAndClear();
aInsertButton.disposeAndClear();
aFiFuncDesc.disposeAndClear();
+ pAllFuncList.clear();
SfxDockingWindow::dispose();
}
diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx
index 74753391a62c..a8f3180b3090 100644
--- a/sc/source/ui/inc/AccessibleCsvControl.hxx
+++ b/sc/source/ui/inc/AccessibleCsvControl.hxx
@@ -29,6 +29,7 @@
#include <cppuhelper/implbase2.hxx>
#include <editeng/AccessibleStaticTextBase.hxx>
#include <comphelper/uno3.hxx>
+#include <vcl/vclptr.hxx>
#include "AccessibleContextBase.hxx"
class ScCsvControl;
@@ -50,7 +51,7 @@ protected:
typedef ::com::sun::star::awt::Rectangle AwtRectangle;
private:
- ScCsvControl* mpControl; /// Pointer to the VCL control.
+ VclPtr<ScCsvControl> mpControl; /// Pointer to the VCL control.
public:
explicit ScAccessibleCsvControl(
diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx b/sc/source/ui/inc/AccessibleEditObject.hxx
index b9c2fdf85a4d..e4201808bdb9 100644
--- a/sc/source/ui/inc/AccessibleEditObject.hxx
+++ b/sc/source/ui/inc/AccessibleEditObject.hxx
@@ -188,7 +188,7 @@ public:
private:
accessibility::AccessibleTextHelper* mpTextHelper;
EditView* mpEditView;
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
EditObjectType meObjectType;
bool mbHasFocus;
diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx
index 9be73428bd3b..2d4601b6c92b 100644
--- a/sc/source/ui/inc/AccessibleText.hxx
+++ b/sc/source/ui/inc/AccessibleText.hxx
@@ -134,7 +134,7 @@ protected:
EditView* mpEditView;
EditEngine* mpEditEngine;
SvxEditEngineForwarder* mpForwarder;
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
bool mbIsCloned;
};
@@ -274,7 +274,7 @@ private:
typedef ::std::unique_ptr< SvxTextForwarder > TextForwarderPtr;
typedef ::std::unique_ptr< ScCsvViewForwarder > ViewForwarderPtr;
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
EditEngine* mpEditEngine;
TextForwarderPtr mpTextForwarder;
ViewForwarderPtr mpViewForwarder;
diff --git a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
index a6808a53b3e5..0b1d068149aa 100644
--- a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
+++ b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
@@ -33,10 +33,10 @@ private:
TWO_FACTOR
};
- NumericField* mpAlphaField;
- RadioButton* mpSingleFactorRadio;
- RadioButton* mpTwoFactorRadio;
- NumericField* mpRowsPerSampleField;
+ VclPtr<NumericField> mpAlphaField;
+ VclPtr<RadioButton> mpSingleFactorRadio;
+ VclPtr<RadioButton> mpTwoFactorRadio;
+ VclPtr<NumericField> mpRowsPerSampleField;
DECL_LINK(FactorChanged, void*);
@@ -55,6 +55,7 @@ public:
vcl::Window* pParent, ScViewData* pViewData );
virtual ~ScAnalysisOfVarianceDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/ExponentialSmoothingDialog.hxx b/sc/source/ui/inc/ExponentialSmoothingDialog.hxx
index 9012c6755435..0f186b4f4252 100644
--- a/sc/source/ui/inc/ExponentialSmoothingDialog.hxx
+++ b/sc/source/ui/inc/ExponentialSmoothingDialog.hxx
@@ -24,7 +24,7 @@
class ScExponentialSmoothingDialog : public ScStatisticsInputOutputDialog
{
private:
- NumericField* mpSmoothingFactor;
+ VclPtr<NumericField> mpSmoothingFactor;
public:
ScExponentialSmoothingDialog(
@@ -32,6 +32,7 @@ public:
vcl::Window* pParent, ScViewData* pViewData );
virtual ~ScExponentialSmoothingDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/MovingAverageDialog.hxx b/sc/source/ui/inc/MovingAverageDialog.hxx
index dab6acc8e5a2..f6aa85eb079b 100644
--- a/sc/source/ui/inc/MovingAverageDialog.hxx
+++ b/sc/source/ui/inc/MovingAverageDialog.hxx
@@ -24,7 +24,7 @@
class ScMovingAverageDialog : public ScStatisticsInputOutputDialog
{
private:
- NumericField* mpIntervalSpin;
+ VclPtr<NumericField> mpIntervalSpin;
public:
ScMovingAverageDialog(
@@ -32,6 +32,7 @@ public:
vcl::Window* pParent, ScViewData* pViewData );
virtual ~ScMovingAverageDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx
index c806a8ccb2ff..765990615a98 100644
--- a/sc/source/ui/inc/PivotLayoutDialog.hxx
+++ b/sc/source/ui/inc/PivotLayoutDialog.hxx
@@ -44,8 +44,8 @@ class ScPivotLayoutDialog : public ScAnyRefDlg
public:
ScDPObject maPivotTableObject;
- ScPivotLayoutTreeListBase* mpPreviouslyFocusedListBox;
- ScPivotLayoutTreeListBase* mpCurrentlyFocusedListBox;
+ VclPtr<ScPivotLayoutTreeListBase> mpPreviouslyFocusedListBox;
+ VclPtr<ScPivotLayoutTreeListBase> mpCurrentlyFocusedListBox;
private:
ScViewData* mpViewData;
@@ -53,38 +53,38 @@ private:
bool mbNewPivotTable;
- ScPivotLayoutTreeListLabel* mpListBoxField;
- ScPivotLayoutTreeList* mpListBoxPage;
- ScPivotLayoutTreeList* mpListBoxColumn;
- ScPivotLayoutTreeList* mpListBoxRow;
- ScPivotLayoutTreeListData* mpListBoxData;
+ VclPtr<ScPivotLayoutTreeListLabel> mpListBoxField;
+ VclPtr<ScPivotLayoutTreeList> mpListBoxPage;
+ VclPtr<ScPivotLayoutTreeList> mpListBoxColumn;
+ VclPtr<ScPivotLayoutTreeList> mpListBoxRow;
+ VclPtr<ScPivotLayoutTreeListData> mpListBoxData;
- CheckBox* mpCheckIgnoreEmptyRows;
- CheckBox* mpCheckTotalColumns;
- CheckBox* mpCheckAddFilter;
- CheckBox* mpCheckIdentifyCategories;
- CheckBox* mpCheckTotalRows;
- CheckBox* mpCheckDrillToDetail;
+ VclPtr<CheckBox> mpCheckIgnoreEmptyRows;
+ VclPtr<CheckBox> mpCheckTotalColumns;
+ VclPtr<CheckBox> mpCheckAddFilter;
+ VclPtr<CheckBox> mpCheckIdentifyCategories;
+ VclPtr<CheckBox> mpCheckTotalRows;
+ VclPtr<CheckBox> mpCheckDrillToDetail;
- RadioButton* mpSourceRadioNamedRange;
- RadioButton* mpSourceRadioSelection;
+ VclPtr<RadioButton> mpSourceRadioNamedRange;
+ VclPtr<RadioButton> mpSourceRadioSelection;
- ListBox* mpSourceListBox;
- formula::RefEdit* mpSourceEdit;
- formula::RefButton* mpSourceButton;
+ VclPtr<ListBox> mpSourceListBox;
+ VclPtr<formula::RefEdit> mpSourceEdit;
+ VclPtr<formula::RefButton> mpSourceButton;
- RadioButton* mpDestinationRadioNewSheet;
- RadioButton* mpDestinationRadioNamedRange;
- RadioButton* mpDestinationRadioSelection;
+ VclPtr<RadioButton> mpDestinationRadioNewSheet;
+ VclPtr<RadioButton> mpDestinationRadioNamedRange;
+ VclPtr<RadioButton> mpDestinationRadioSelection;
- ListBox* mpDestinationListBox;
- formula::RefEdit* mpDestinationEdit;
- formula::RefButton* mpDestinationButton;
+ VclPtr<ListBox> mpDestinationListBox;
+ VclPtr<formula::RefEdit> mpDestinationEdit;
+ VclPtr<formula::RefButton> mpDestinationButton;
- PushButton* mpBtnOK;
- CancelButton* mpBtnCancel;
+ VclPtr<PushButton> mpBtnOK;
+ VclPtr<CancelButton> mpBtnCancel;
- formula::RefEdit* mpActiveEdit;
+ VclPtr<formula::RefEdit> mpActiveEdit;
ScAddress::Details maAddressDetails;
bool mbDialogLostFocus;
@@ -111,6 +111,7 @@ public:
ScPivotLayoutDialog(SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow, vcl::Window* pParent,
ScViewData* pViewData, const ScDPObject* pPivotTableObject, bool bCreateNewPivotTable);
virtual ~ScPivotLayoutDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual void SetReference(const ScRange& rReferenceRange, ScDocument* pDocument) SAL_OVERRIDE;
virtual void SetActive() SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/PivotLayoutTreeListBase.hxx b/sc/source/ui/inc/PivotLayoutTreeListBase.hxx
index 7812674a351c..4ce7740f2bb9 100644
--- a/sc/source/ui/inc/PivotLayoutTreeListBase.hxx
+++ b/sc/source/ui/inc/PivotLayoutTreeListBase.hxx
@@ -35,13 +35,14 @@ public:
protected:
SvPivotTreeListType meType;
- ScPivotLayoutDialog* mpParent;
+ VclPtr<ScPivotLayoutDialog> mpParent;
public:
void Setup(ScPivotLayoutDialog* pParent);
ScPivotLayoutTreeListBase(vcl::Window* pParent, WinBits nBits, SvPivotTreeListType eType = UNDEFINED);
virtual ~ScPivotLayoutTreeListBase();
+ virtual void dispose() SAL_OVERRIDE;
virtual sal_Int8 AcceptDrop(const AcceptDropEvent& rEvent) SAL_OVERRIDE;
virtual bool NotifyAcceptDrop(SvTreeListEntry* pEntry) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
index b1736b2661c0..6d791c27c2a4 100644
--- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
+++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
@@ -29,6 +29,7 @@ public:
vcl::Window* pParent, ScViewData* pViewData );
virtual ~ScRandomNumberGeneratorDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
virtual void SetActive() SAL_OVERRIDE;
@@ -36,21 +37,21 @@ public:
private:
// Widgets
- FixedText* mpInputRangeText;
- formula::RefEdit* mpInputRangeEdit;
- formula::RefButton* mpInputRangeButton;
- ListBox* mpDistributionCombo;
- FixedText* mpParameter1Text;
- NumericField* mpParameter1Value;
- FixedText* mpParameter2Text;
- NumericField* mpParameter2Value;
- NumericField* mpSeed;
- CheckBox* mpEnableSeed;
- NumericField* mpDecimalPlaces;
- CheckBox* mpEnableRounding;
- PushButton* mpButtonApply;
- OKButton* mpButtonOk;
- CloseButton* mpButtonClose;
+ VclPtr<FixedText> mpInputRangeText;
+ VclPtr<formula::RefEdit> mpInputRangeEdit;
+ VclPtr<formula::RefButton> mpInputRangeButton;
+ VclPtr<ListBox> mpDistributionCombo;
+ VclPtr<FixedText> mpParameter1Text;
+ VclPtr<NumericField> mpParameter1Value;
+ VclPtr<FixedText> mpParameter2Text;
+ VclPtr<NumericField> mpParameter2Value;
+ VclPtr<NumericField> mpSeed;
+ VclPtr<CheckBox> mpEnableSeed;
+ VclPtr<NumericField> mpDecimalPlaces;
+ VclPtr<CheckBox> mpEnableRounding;
+ VclPtr<PushButton> mpButtonApply;
+ VclPtr<OKButton> mpButtonOk;
+ VclPtr<CloseButton> mpButtonClose;
// Data
ScViewData* mpViewData;
diff --git a/sc/source/ui/inc/SamplingDialog.hxx b/sc/source/ui/inc/SamplingDialog.hxx
index 022b5e8075d0..6622ad90cd4c 100644
--- a/sc/source/ui/inc/SamplingDialog.hxx
+++ b/sc/source/ui/inc/SamplingDialog.hxx
@@ -27,30 +27,31 @@ public:
vcl::Window* pParent, ScViewData* pViewData );
virtual ~ScSamplingDialog();
+ virtual void dispose() SAL_OVERRIDE;
- virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
- virtual void SetActive() SAL_OVERRIDE;
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
+ virtual void SetActive() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
private:
// Widgets
- FixedText* mpInputRangeLabel;
- formula::RefEdit* mpInputRangeEdit;
- formula::RefButton* mpInputRangeButton;
+ VclPtr<FixedText> mpInputRangeLabel;
+ VclPtr<formula::RefEdit> mpInputRangeEdit;
+ VclPtr<formula::RefButton> mpInputRangeButton;
- FixedText* mpOutputRangeLabel;
- formula::RefEdit* mpOutputRangeEdit;
- formula::RefButton* mpOutputRangeButton;
+ VclPtr<FixedText> mpOutputRangeLabel;
+ VclPtr<formula::RefEdit> mpOutputRangeEdit;
+ VclPtr<formula::RefButton> mpOutputRangeButton;
- NumericField* mpSampleSize;
- NumericField* mpPeriod;
+ VclPtr<NumericField> mpSampleSize;
+ VclPtr<NumericField> mpPeriod;
- RadioButton* mpRandomMethodRadio;
- RadioButton* mpPeriodicMethodRadio;
+ VclPtr<RadioButton> mpRandomMethodRadio;
+ VclPtr<RadioButton> mpPeriodicMethodRadio;
- OKButton* mpButtonOk;
+ VclPtr<OKButton> mpButtonOk;
- formula::RefEdit* mpActiveEdit;
+ VclPtr<formula::RefEdit> mpActiveEdit;
// Data
ScViewData* mViewData;
diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
index 520ec223a784..c18119c0b4ec 100644
--- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
+++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
@@ -33,6 +33,7 @@ public:
const OUString& rID, const OUString& rUIXMLDescription );
virtual ~ScStatisticsInputOutputDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
virtual void SetActive() SAL_OVERRIDE;
@@ -44,16 +45,16 @@ protected:
virtual sal_Int16 GetUndoNameId() = 0;
// Widgets
- FixedText* mpInputRangeLabel;
- formula::RefEdit* mpInputRangeEdit;
- formula::RefButton* mpInputRangeButton;
+ VclPtr<FixedText> mpInputRangeLabel;
+ VclPtr<formula::RefEdit> mpInputRangeEdit;
+ VclPtr<formula::RefButton> mpInputRangeButton;
- FixedText* mpOutputRangeLabel;
- formula::RefEdit* mpOutputRangeEdit;
- formula::RefButton* mpOutputRangeButton;
+ VclPtr<FixedText> mpOutputRangeLabel;
+ VclPtr<formula::RefEdit> mpOutputRangeEdit;
+ VclPtr<formula::RefButton> mpOutputRangeButton;
- RadioButton* mpGroupByColumnsRadio;
- RadioButton* mpGroupByRowsRadio;
+ VclPtr<RadioButton> mpGroupByColumnsRadio;
+ VclPtr<RadioButton> mpGroupByRowsRadio;
// Data
ScViewData* mViewData;
@@ -69,9 +70,9 @@ protected:
private:
// Widgets
- OKButton* mpButtonOk;
+ VclPtr<OKButton> mpButtonOk;
- formula::RefEdit* mpActiveEdit;
+ VclPtr<formula::RefEdit> mpActiveEdit;
ScAddress mCurrentAddress;
bool mDialogLostFocus;
diff --git a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
index db4514ab49f9..b0a48e1dcbc7 100644
--- a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
+++ b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
@@ -33,6 +33,7 @@ public:
const OUString& rID, const OUString& rUIXMLDescription );
virtual ~ScStatisticsTwoVariableDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
virtual void SetActive() SAL_OVERRIDE;
@@ -44,17 +45,17 @@ protected:
virtual sal_Int16 GetUndoNameId() = 0;
// Widgets
- FixedText* mpVariable1RangeLabel;
- formula::RefEdit* mpVariable1RangeEdit;
- formula::RefButton* mpVariable1RangeButton;
+ VclPtr<FixedText> mpVariable1RangeLabel;
+ VclPtr<formula::RefEdit> mpVariable1RangeEdit;
+ VclPtr<formula::RefButton> mpVariable1RangeButton;
- FixedText* mpVariable2RangeLabel;
- formula::RefEdit* mpVariable2RangeEdit;
- formula::RefButton* mpVariable2RangeButton;
+ VclPtr<FixedText> mpVariable2RangeLabel;
+ VclPtr<formula::RefEdit> mpVariable2RangeEdit;
+ VclPtr<formula::RefButton> mpVariable2RangeButton;
- FixedText* mpOutputRangeLabel;
- formula::RefEdit* mpOutputRangeEdit;
- formula::RefButton* mpOutputRangeButton;
+ VclPtr<FixedText> mpOutputRangeLabel;
+ VclPtr<formula::RefEdit> mpOutputRangeEdit;
+ VclPtr<formula::RefButton> mpOutputRangeButton;
// Data
ScViewData* mViewData;
@@ -69,12 +70,12 @@ protected:
private:
// Widgets
- OKButton* mpButtonOk;
+ VclPtr<OKButton> mpButtonOk;
- RadioButton* mpGroupByColumnsRadio;
- RadioButton* mpGroupByRowsRadio;
+ VclPtr<RadioButton> mpGroupByColumnsRadio;
+ VclPtr<RadioButton> mpGroupByRowsRadio;
- formula::RefEdit* mpActiveEdit;
+ VclPtr<formula::RefEdit> mpActiveEdit;
ScAddress mCurrentAddress;
bool mDialogLostFocus;
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index 0dd82d8569c0..c8252fd9db0b 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -98,13 +98,13 @@ private:
Idle aSelectionIdle;
Idle aReOpenIdle;
- SvxAcceptChgCtr* m_pAcceptChgCtr;
+ VclPtr<SvxAcceptChgCtr> m_pAcceptChgCtr;
ScViewData* pViewData;
ScDocument* pDoc;
ScRangeName aLocalRangeName;
- SvxTPFilter* pTPFilter;
- SvxTPView* pTPView;
- SvxRedlinTable* pTheView; // #i48648 now SvHeaderTabListBox
+ VclPtr<SvxTPFilter> pTPFilter;
+ VclPtr<SvxTPView> pTPView;
+ VclPtr<SvxRedlinTable> pTheView; // #i48648 now SvHeaderTabListBox
ScRangeList aRangeList;
ScChangeViewSettings aChangeViewSet;
OUString aStrInsertCols;
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 4a7ee80233f9..833b541709dc 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -45,13 +45,13 @@ class ScFormulaReferenceHelper
{
IAnyRefDialog* m_pDlg;
::std::unique_ptr<ScCompiler> pRefComp;
- formula::RefEdit* pRefEdit; // active input field
- formula::RefButton* pRefBtn; // associated button
- vcl::Window* m_pWindow;
+ VclPtr<formula::RefEdit> pRefEdit; // active input field
+ VclPtr<formula::RefButton> pRefBtn; // associated button
+ VclPtr<vcl::Window> m_pWindow;
SfxBindings* m_pBindings;
::std::unique_ptr<Accelerator>
pAccel; // for Enter/Escape
- ::std::vector<vcl::Window*> m_aHiddenWidgets; // vector of hidden Controls
+ ::std::vector<VclPtr<vcl::Window> > m_aHiddenWidgets; // vector of hidden Controls
sal_Int32 m_nOldBorderWidth; // border width for expanded dialog
SCTAB nRefTab; // used for ShowReference
@@ -61,7 +61,7 @@ class ScFormulaReferenceHelper
Size aOldEditSize; // Original size of the input field
long mnOldEditWidthReq;
Point aOldButtonPos; // Original position of the button
- vcl::Window* mpOldEditParent; // Original parent of the edit field and the button
+ VclPtr<vcl::Window> mpOldEditParent; // Original parent of the edit field and the button
bool mbOldDlgLayoutEnabled; // Original layout state of parent dialog
bool mbOldEditParentLayoutEnabled; // Original layout state of edit widget parent
@@ -106,11 +106,11 @@ public:
class SC_DLLPUBLIC ScRefHandler :
public IAnyRefDialog
{
- vcl::Window & m_rWindow;
- bool m_bInRefMode;
+ VclPtr<vcl::Window> m_rWindow;
+ bool m_bInRefMode;
public:
- operator vcl::Window *(){ return &m_rWindow; }
+ operator vcl::Window *(){ return m_rWindow.get(); }
vcl::Window* operator ->() { return static_cast<vcl::Window *>(*this); }
friend class formula::RefButton;
friend class formula::RefEdit;
@@ -120,7 +120,7 @@ private:
m_aHelper;
SfxBindings* pMyBindings;
- vcl::Window* pActiveWin;
+ VclPtr<vcl::Window> pActiveWin;
Idle aIdle;
OUString aDocName; // document on which the dialog was opened
diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx
index 4798db7de246..dbc09faa4467 100644
--- a/sc/source/ui/inc/areasdlg.hxx
+++ b/sc/source/ui/inc/areasdlg.hxx
@@ -46,23 +46,23 @@ public:
virtual bool Close() SAL_OVERRIDE;
private:
- ListBox* pLbPrintArea;
- formula::RefEdit* pEdPrintArea;
- formula::RefButton* pRbPrintArea;
+ VclPtr<ListBox> pLbPrintArea;
+ VclPtr<formula::RefEdit> pEdPrintArea;
+ VclPtr<formula::RefButton> pRbPrintArea;
- ListBox* pLbRepeatRow;
- formula::RefEdit* pEdRepeatRow;
- formula::RefButton* pRbRepeatRow;
+ VclPtr<ListBox> pLbRepeatRow;
+ VclPtr<formula::RefEdit> pEdRepeatRow;
+ VclPtr<formula::RefButton> pRbRepeatRow;
- ListBox* pLbRepeatCol;
- formula::RefEdit* pEdRepeatCol;
- formula::RefButton* pRbRepeatCol;
+ VclPtr<ListBox> pLbRepeatCol;
+ VclPtr<formula::RefEdit> pEdRepeatCol;
+ VclPtr<formula::RefButton> pRbRepeatCol;
- OKButton* pBtnOk;
- CancelButton* pBtnCancel;
+ VclPtr<OKButton> pBtnOk;
+ VclPtr<CancelButton> pBtnCancel;
bool bDlgLostFocus;
- formula::RefEdit* pRefInputEdit;
+ VclPtr<formula::RefEdit> pRefInputEdit;
ScDocument* pDoc;
ScViewData* pViewData;
SCTAB nCurTab;
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index 73fc1bd33efc..739fd356aed2 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -48,6 +48,7 @@ public:
explicit ScMenuFloatingWindow(vcl::Window* pParent, ScDocument* pDoc, sal_uInt16 nMenuStackLevel = 0);
virtual ~ScMenuFloatingWindow();
+ void dispose() SAL_OVERRIDE;
virtual void PopupModeEnd() SAL_OVERRIDE;
virtual void MouseMove(const MouseEvent& rMEvt) SAL_OVERRIDE;
@@ -158,7 +159,7 @@ private:
struct SubMenuItemData
{
Timer maTimer;
- ScMenuFloatingWindow* mpSubMenu;
+ VclPtr<ScMenuFloatingWindow> mpSubMenu;
size_t mnMenuPos;
DECL_LINK( TimeoutHdl, void* );
@@ -167,7 +168,7 @@ private:
void reset();
private:
- ScMenuFloatingWindow* mpParent;
+ VclPtr<ScMenuFloatingWindow> mpParent;
};
SubMenuItemData maOpenTimer;
SubMenuItemData maCloseTimer;
@@ -184,7 +185,7 @@ private:
ScDocument* mpDoc;
- ScMenuFloatingWindow* mpParentMenu;
+ VclPtr<ScMenuFloatingWindow> mpParentMenu;
};
class ScCheckListBox : public SvTreeListBox
@@ -293,11 +294,13 @@ private:
{
public:
CancelButton(ScCheckListMenuWindow* pParent);
+ virtual ~CancelButton();
+ virtual void dispose() SAL_OVERRIDE;
virtual void Click() SAL_OVERRIDE;
private:
- ScCheckListMenuWindow* mpParent;
+ VclPtr<ScCheckListMenuWindow> mpParent;
};
enum SectionType {
@@ -341,7 +344,7 @@ private:
VclPtr<OKButton> maBtnOk;
VclPtr<CancelButton> maBtnCancel;
- ::std::vector<vcl::Window*> maTabStopCtrls;
+ ::std::vector<VclPtr<vcl::Window> > maTabStopCtrls;
size_t mnCurTabStop;
::std::vector<Member> maMembers;
diff --git a/sc/source/ui/inc/colorformat.hxx b/sc/source/ui/inc/colorformat.hxx
index a3003755ca4b..e5acc1d01def 100644
--- a/sc/source/ui/inc/colorformat.hxx
+++ b/sc/source/ui/inc/colorformat.hxx
@@ -23,24 +23,23 @@ class ScDocument;
class ScDataBarSettingsDlg : public ModalDialog
{
private:
- OKButton* mpBtnOk;
- CancelButton* mpBtnCancel;
+ VclPtr<OKButton> mpBtnOk;
+ VclPtr<CancelButton> mpBtnCancel;
- ColorListBox* mpLbPos;
- ColorListBox* mpLbNeg;
- ColorListBox* mpLbAxisCol;
+ VclPtr<ColorListBox> mpLbPos;
+ VclPtr<ColorListBox> mpLbNeg;
+ VclPtr<ColorListBox> mpLbAxisCol;
- ListBox* mpLbTypeMin;
- ListBox* mpLbTypeMax;
- ListBox* mpLbFillType;
- ListBox* mpLbAxisPos;
+ VclPtr<ListBox> mpLbTypeMin;
+ VclPtr<ListBox> mpLbTypeMax;
+ VclPtr<ListBox> mpLbAxisPos;
- Edit* mpEdMin;
- Edit* mpEdMax;
- Edit* mpLenMin;
- Edit* mpLenMax;
+ VclPtr<Edit> mpEdMin;
+ VclPtr<Edit> mpEdMax;
+ VclPtr<Edit> mpLenMin;
+ VclPtr<Edit> mpLenMax;
- CheckBox *mpCbOnlyBar;
+ VclPtr<CheckBox> mpCbOnlyBar;
OUString maStrWarnSameValue;
SvNumberFormatter* mpNumberFormatter;
@@ -56,6 +55,8 @@ private:
public:
ScDataBarSettingsDlg(vcl::Window* pParent, const ScDataBarFormatData& rData, ScDocument* pDoc, const ScAddress& rPos);
+ virtual ~ScDataBarSettingsDlg();
+ virtual void dispose() SAL_OVERRIDE;
ScDataBarFormatData* GetData();
};
diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx
index 6f6d2c0c7d04..7bd9c84a549c 100644
--- a/sc/source/ui/inc/condformatdlg.hxx
+++ b/sc/source/ui/inc/condformatdlg.hxx
@@ -65,12 +65,14 @@ private:
ScDocument* mpDoc;
ScAddress maPos;
ScRangeList maRanges;
- ScCondFormatDlg* mpDialogParent;
+ VclPtr<ScCondFormatDlg> mpDialogParent;
void DoScroll(long nDiff);
public:
ScCondFormatList(vcl::Window* pParent, WinBits nStyle);
+ virtual ~ScCondFormatList();
+ virtual void dispose() SAL_OVERRIDE;
void init(ScDocument* pDoc, ScCondFormatDlg* pDialogParent, const ScConditionalFormat* pFormat,
const ScRangeList& rRanges, const ScAddress& rPos,
@@ -95,18 +97,18 @@ public:
class ScCondFormatDlg : public ScAnyRefModalDlg
{
private:
- PushButton* mpBtnAdd;
- PushButton* mpBtnRemove;
- FixedText* mpFtRange;
- formula::RefEdit* mpEdRange;
- formula::RefButton* mpRbRange;
+ VclPtr<PushButton> mpBtnAdd;
+ VclPtr<PushButton> mpBtnRemove;
+ VclPtr<FixedText> mpFtRange;
+ VclPtr<formula::RefEdit> mpEdRange;
+ VclPtr<formula::RefButton> mpRbRange;
- ScCondFormatList* mpCondFormList;
+ VclPtr<ScCondFormatList> mpCondFormList;
ScAddress maPos;
ScDocument* mpDoc;
- formula::RefEdit* mpLastEdit;
+ VclPtr<formula::RefEdit> mpLastEdit;
DECL_LINK( EdRangeModifyHdl, Edit* );
protected:
@@ -117,6 +119,7 @@ public:
SC_DLLPUBLIC ScCondFormatDlg(vcl::Window* pWindow, ScDocument* pDoc, const ScConditionalFormat* pFormat,
const ScRangeList& rRange, const ScAddress& rPos, condformat::dialog::ScCondFormatDialogType eType);
virtual ~ScCondFormatDlg();
+ virtual void dispose() SAL_OVERRIDE;
SC_DLLPUBLIC ScConditionalFormat* GetConditionalFormat() const;
diff --git a/sc/source/ui/inc/condformatmgr.hxx b/sc/source/ui/inc/condformatmgr.hxx
index 31338a4d02f7..1d339884e19a 100644
--- a/sc/source/ui/inc/condformatmgr.hxx
+++ b/sc/source/ui/inc/condformatmgr.hxx
@@ -57,11 +57,11 @@ public:
bool CondFormatsChanged() { return mbModified;}
private:
- PushButton *m_pBtnAdd;
- PushButton *m_pBtnRemove;
- PushButton *m_pBtnEdit;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnRemove;
+ VclPtr<PushButton> m_pBtnEdit;
ScConditionalFormatList* mpFormatList;
- ScCondFormatManagerWindow *m_pCtrlManager;
+ VclPtr<ScCondFormatManagerWindow> m_pCtrlManager;
ScDocument* mpDoc;
ScAddress maPos;
diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx
index 3e9ebd64fdbe..94188c272c31 100644
--- a/sc/source/ui/inc/conflictsdlg.hxx
+++ b/sc/source/ui/inc/conflictsdlg.hxx
@@ -117,12 +117,12 @@ public:
class ScConflictsDlg : public ModalDialog
{
private:
- SvSimpleTableContainer *m_pLbConflictsContainer;
+ VclPtr<SvSimpleTableContainer> m_pLbConflictsContainer;
boost::scoped_ptr<SvxRedlinTable> m_pLbConflicts;
- PushButton *m_pBtnKeepMine;
- PushButton *m_pBtnKeepOther;
- PushButton *m_pBtnKeepAllMine;
- PushButton *m_pBtnKeepAllOthers;
+ VclPtr<PushButton> m_pBtnKeepMine;
+ VclPtr<PushButton> m_pBtnKeepOther;
+ VclPtr<PushButton> m_pBtnKeepAllMine;
+ VclPtr<PushButton> m_pBtnKeepAllOthers;
OUString maStrTitleConflict;
OUString maStrTitleAuthor;
@@ -160,6 +160,7 @@ private:
public:
ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScDocument* pSharedDoc, ScConflictsList& rConflictsList );
virtual ~ScConflictsDlg();
+ virtual void dispose() SAL_OVERRIDE;
void UpdateView();
};
diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx
index c7f49fe6389a..c71f7e979927 100644
--- a/sc/source/ui/inc/consdlg.hxx
+++ b/sc/source/ui/inc/consdlg.hxx
@@ -52,27 +52,27 @@ protected:
virtual void Deactivate() SAL_OVERRIDE;
private:
- ListBox* pLbFunc;
- ListBox* pLbConsAreas;
+ VclPtr<ListBox> pLbFunc;
+ VclPtr<ListBox> pLbConsAreas;
- ListBox* pLbDataArea;
- formula::RefEdit* pEdDataArea;
- formula::RefButton* pRbDataArea;
+ VclPtr<ListBox> pLbDataArea;
+ VclPtr<formula::RefEdit> pEdDataArea;
+ VclPtr<formula::RefButton> pRbDataArea;
- ListBox* pLbDestArea;
- formula::RefEdit* pEdDestArea;
- formula::RefButton* pRbDestArea;
+ VclPtr<ListBox> pLbDestArea;
+ VclPtr<formula::RefEdit> pEdDestArea;
+ VclPtr<formula::RefButton> pRbDestArea;
- VclExpander* pExpander;
- CheckBox* pBtnByRow;
- CheckBox* pBtnByCol;
+ VclPtr<VclExpander> pExpander;
+ VclPtr<CheckBox> pBtnByRow;
+ VclPtr<CheckBox> pBtnByCol;
- CheckBox* pBtnRefs;
+ VclPtr<CheckBox> pBtnRefs;
- OKButton* pBtnOk;
- CancelButton* pBtnCancel;
- PushButton* pBtnAdd;
- PushButton* pBtnRemove;
+ VclPtr<OKButton> pBtnOk;
+ VclPtr<CancelButton> pBtnCancel;
+ VclPtr<PushButton> pBtnAdd;
+ VclPtr<PushButton> pBtnRemove;
OUString aStrUndefined;
@@ -84,7 +84,7 @@ private:
size_t nAreaDataCount;
sal_uInt16 nWhichCons;
- formula::RefEdit* pRefInputEdit;
+ VclPtr<formula::RefEdit> pRefInputEdit;
bool bDlgLostFocus;
void Init ();
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index d98bdb825053..11ff60501331 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -46,7 +46,7 @@ const sal_uLong SC_CONTENT_NOCHILD = ~0UL;
class ScContentTree : public SvTreeListBox
{
- ScNavigatorDlg* pParentWindow;
+ VclPtr<ScNavigatorDlg> pParentWindow;
ImageList aEntryImages;
SvTreeListEntry* pRootNodes[SC_CONTENT_COUNT];
sal_uInt16 nRootType; // set as Root
@@ -124,6 +124,7 @@ protected:
public:
ScContentTree( vcl::Window* pParent, const ResId& rResId );
virtual ~ScContentTree();
+ virtual void dispose() SAL_OVERRIDE;
OUString getAltLongDescText(SvTreeListEntry* pEntry, bool isAltText) const;
OUString GetEntryAltText( SvTreeListEntry* pEntry ) const SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/corodlg.hxx b/sc/source/ui/inc/corodlg.hxx
index 1f6de3df6b05..6f6ebd4ce325 100644
--- a/sc/source/ui/inc/corodlg.hxx
+++ b/sc/source/ui/inc/corodlg.hxx
@@ -37,13 +37,20 @@ public:
m_pBtnCol->Check(bCol);
m_pBtnRow->Check(bRow);
}
+ virtual ~ScColRowLabelDlg() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ m_pBtnRow.clear();
+ m_pBtnCol.clear();
+ ModalDialog::dispose();
+ }
bool IsCol() const { return m_pBtnCol->IsChecked(); }
bool IsRow() const { return m_pBtnRow->IsChecked(); }
private:
- CheckBox* m_pBtnRow;
- CheckBox* m_pBtnCol;
+ VclPtr<CheckBox> m_pBtnRow;
+ VclPtr<CheckBox> m_pBtnCol;
};
#endif
diff --git a/sc/source/ui/inc/crdlg.hxx b/sc/source/ui/inc/crdlg.hxx
index 571d04a20bea..cc0b941e7da2 100644
--- a/sc/source/ui/inc/crdlg.hxx
+++ b/sc/source/ui/inc/crdlg.hxx
@@ -30,11 +30,13 @@ class ScColOrRowDlg : public ModalDialog
public:
ScColOrRowDlg(vcl::Window* pParent, const OUString& rStrTitle,
const OUString& rStrLabel, bool bColDefault = true);
+ virtual ~ScColOrRowDlg();
+ virtual void dispose() SAL_OVERRIDE;
private:
- VclFrame* m_pFrame;
- RadioButton* m_pBtnRows;
- RadioButton* m_pBtnCols;
- OKButton* m_pBtnOk;
+ VclPtr<VclFrame> m_pFrame;
+ VclPtr<RadioButton> m_pBtnRows;
+ VclPtr<RadioButton> m_pBtnCols;
+ VclPtr<OKButton> m_pBtnOk;
DECL_LINK(OkHdl, void *);
};
diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx
index b2d97ab9035d..f23f5dd51d7e 100644
--- a/sc/source/ui/inc/crnrdlg.hxx
+++ b/sc/source/ui/inc/crnrdlg.hxx
@@ -36,6 +36,7 @@ public:
ScColRowNameRangesDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
ScViewData* ptrViewData );
virtual ~ScColRowNameRangesDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
@@ -44,19 +45,19 @@ public:
virtual bool Close() SAL_OVERRIDE;
private:
- ListBox* pLbRange;
+ VclPtr<ListBox> pLbRange;
- formula::RefEdit* pEdAssign;
- formula::RefButton* pRbAssign;
- RadioButton* pBtnColHead;
- RadioButton* pBtnRowHead;
- formula::RefEdit* pEdAssign2;
- formula::RefButton* pRbAssign2;
+ VclPtr<formula::RefEdit> pEdAssign;
+ VclPtr<formula::RefButton> pRbAssign;
+ VclPtr<RadioButton> pBtnColHead;
+ VclPtr<RadioButton> pBtnRowHead;
+ VclPtr<formula::RefEdit> pEdAssign2;
+ VclPtr<formula::RefButton> pRbAssign2;
- OKButton* pBtnOk;
- CancelButton* pBtnCancel;
- PushButton* pBtnAdd;
- PushButton* pBtnRemove;
+ VclPtr<OKButton> pBtnOk;
+ VclPtr<CancelButton> pBtnCancel;
+ VclPtr<PushButton> pBtnAdd;
+ VclPtr<PushButton> pBtnRemove;
ScRange theCurArea;
ScRange theCurData;
@@ -68,7 +69,7 @@ private:
NameRangeMap aRangeMap;
ScViewData* pViewData;
ScDocument* pDoc;
- formula::RefEdit* pEdActive;
+ VclPtr<formula::RefEdit> pEdActive;
bool bDlgLostFocus;
void Init ();
diff --git a/sc/source/ui/inc/dapidata.hxx b/sc/source/ui/inc/dapidata.hxx
index b157c05cf6e4..02c76e0dc8ae 100644
--- a/sc/source/ui/inc/dapidata.hxx
+++ b/sc/source/ui/inc/dapidata.hxx
@@ -30,9 +30,9 @@ struct ScImportSourceDesc;
class ScDataPilotDatabaseDlg : public ModalDialog
{
private:
- ListBox* m_pLbDatabase;
- ComboBox* m_pCbObject;
- ListBox* m_pLbType;
+ VclPtr<ListBox> m_pLbDatabase;
+ VclPtr<ComboBox> m_pCbObject;
+ VclPtr<ListBox> m_pLbType;
void FillObjects();
@@ -40,6 +40,8 @@ private:
public:
ScDataPilotDatabaseDlg(vcl::Window* pParent);
+ virtual ~ScDataPilotDatabaseDlg();
+ virtual void dispose() SAL_OVERRIDE;
void GetValues( ScImportSourceDesc& rDesc );
};
diff --git a/sc/source/ui/inc/dapitype.hxx b/sc/source/ui/inc/dapitype.hxx
index e024ba3f5451..fb85f0e47687 100644
--- a/sc/source/ui/inc/dapitype.hxx
+++ b/sc/source/ui/inc/dapitype.hxx
@@ -30,16 +30,16 @@
class ScDataPilotSourceTypeDlg : public ModalDialog
{
private:
- RadioButton* m_pBtnSelection;
- RadioButton* m_pBtnNamedRange;
- RadioButton* m_pBtnDatabase;
- RadioButton* m_pBtnExternal;
- ListBox* m_pLbNamedRange;
+ VclPtr<RadioButton> m_pBtnSelection;
+ VclPtr<RadioButton> m_pBtnNamedRange;
+ VclPtr<RadioButton> m_pBtnDatabase;
+ VclPtr<RadioButton> m_pBtnExternal;
+ VclPtr<ListBox> m_pLbNamedRange;
public:
ScDataPilotSourceTypeDlg(vcl::Window* pParent, bool bEnableExternal);
virtual ~ScDataPilotSourceTypeDlg();
-
+ virtual void dispose() SAL_OVERRIDE;
bool IsDatabase() const;
bool IsExternal() const;
bool IsNamedRange() const;
@@ -53,16 +53,17 @@ private:
class ScDataPilotServiceDlg : public ModalDialog
{
private:
- ListBox *m_pLbService;
- Edit *m_pEdSource;
- Edit *m_pEdName;
- Edit *m_pEdUser;
- Edit *m_pEdPasswd;
+ VclPtr<ListBox> m_pLbService;
+ VclPtr<Edit> m_pEdSource;
+ VclPtr<Edit> m_pEdName;
+ VclPtr<Edit> m_pEdUser;
+ VclPtr<Edit> m_pEdPasswd;
public:
ScDataPilotServiceDlg( vcl::Window* pParent,
const com::sun::star::uno::Sequence<OUString>& rServices );
virtual ~ScDataPilotServiceDlg();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetServiceName() const;
OUString GetParSource() const;
diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx
index 00460ece6b8f..736c719a04cc 100644
--- a/sc/source/ui/inc/datafdlg.hxx
+++ b/sc/source/ui/inc/datafdlg.hxx
@@ -29,15 +29,15 @@ class ScDataFormDlg : public ModalDialog
{
private:
- PushButton* m_pBtnNew;
- PushButton* m_pBtnDelete;
- PushButton* m_pBtnRestore;
- PushButton* m_pBtnPrev;
- PushButton* m_pBtnNext;
- PushButton* m_pBtnClose;
- ScrollBar* m_pSlider;
- VclGrid* m_pGrid;
- FixedText* m_pFixedText;
+ VclPtr<PushButton> m_pBtnNew;
+ VclPtr<PushButton> m_pBtnDelete;
+ VclPtr<PushButton> m_pBtnRestore;
+ VclPtr<PushButton> m_pBtnPrev;
+ VclPtr<PushButton> m_pBtnNext;
+ VclPtr<PushButton> m_pBtnClose;
+ VclPtr<ScrollBar> m_pSlider;
+ VclPtr<VclGrid> m_pGrid;
+ VclPtr<FixedText> m_pFixedText;
OUString sNewRecord;
ScTabViewShell* pTabViewShell;
@@ -57,6 +57,7 @@ private:
public:
ScDataFormDlg( vcl::Window* pParent, ScTabViewShell* pTabViewShell);
virtual ~ScDataFormDlg();
+ virtual void dispose() SAL_OVERRIDE;
void FillCtrls(SCROW nCurrentRow);
private:
diff --git a/sc/source/ui/inc/datastreamdlg.hxx b/sc/source/ui/inc/datastreamdlg.hxx
index 09b461fa8635..0b8bf8c38966 100644
--- a/sc/source/ui/inc/datastreamdlg.hxx
+++ b/sc/source/ui/inc/datastreamdlg.hxx
@@ -28,23 +28,23 @@ class DataStreamDlg : public ModalDialog
{
ScDocShell *mpDocShell;
- SvtURLBox* m_pCbUrl;
- PushButton* m_pBtnBrowse;
- RadioButton* m_pRBDirectData;
- RadioButton* m_pRBScriptData;
- RadioButton* m_pRBValuesInLine;
- RadioButton* m_pRBAddressValue;
- CheckBox* m_pCBRefreshOnEmpty;
- RadioButton* m_pRBDataDown;
- RadioButton* m_pRBRangeDown;
- RadioButton* m_pRBNoMove;
- RadioButton* m_pRBMaxLimit;
- RadioButton* m_pRBUnlimited;
- Edit* m_pEdRange;
- Edit* m_pEdLimit;
- OKButton* m_pBtnOk;
- VclFrame* m_pVclFrameLimit;
- VclFrame* m_pVclFrameMove;
+ VclPtr<SvtURLBox> m_pCbUrl;
+ VclPtr<PushButton> m_pBtnBrowse;
+ VclPtr<RadioButton> m_pRBDirectData;
+ VclPtr<RadioButton> m_pRBScriptData;
+ VclPtr<RadioButton> m_pRBValuesInLine;
+ VclPtr<RadioButton> m_pRBAddressValue;
+ VclPtr<CheckBox> m_pCBRefreshOnEmpty;
+ VclPtr<RadioButton> m_pRBDataDown;
+ VclPtr<RadioButton> m_pRBRangeDown;
+ VclPtr<RadioButton> m_pRBNoMove;
+ VclPtr<RadioButton> m_pRBMaxLimit;
+ VclPtr<RadioButton> m_pRBUnlimited;
+ VclPtr<Edit> m_pEdRange;
+ VclPtr<Edit> m_pEdLimit;
+ VclPtr<OKButton> m_pBtnOk;
+ VclPtr<VclFrame> m_pVclFrameLimit;
+ VclPtr<VclFrame> m_pVclFrameMove;
DECL_LINK(UpdateHdl, void *);
DECL_LINK(BrowseHdl, void *);
@@ -54,6 +54,8 @@ class DataStreamDlg : public ModalDialog
public:
DataStreamDlg(ScDocShell *pDocShell, vcl::Window* pParent);
+ virtual ~DataStreamDlg();
+ virtual void dispose() SAL_OVERRIDE;
void Init( const DataStream& rStrm );
diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx
index ec2dfd665339..032b8e9df704 100644
--- a/sc/source/ui/inc/dbnamdlg.hxx
+++ b/sc/source/ui/inc/dbnamdlg.hxx
@@ -47,24 +47,24 @@ public:
virtual bool Close() SAL_OVERRIDE;
private:
- ComboBox* m_pEdName;
-
- VclFrame* m_pAssignFrame;
- formula::RefEdit* m_pEdAssign;
- formula::RefButton* m_pRbAssign;
-
- VclContainer* m_pOptions;
- CheckBox* m_pBtnHeader;
- CheckBox* m_pBtnDoSize;
- CheckBox* m_pBtnKeepFmt;
- CheckBox* m_pBtnStripData;
- FixedText* m_pFTSource;
- FixedText* m_pFTOperations;
-
- OKButton* m_pBtnOk;
- CancelButton* m_pBtnCancel;
- PushButton* m_pBtnAdd;
- PushButton* m_pBtnRemove;
+ VclPtr<ComboBox> m_pEdName;
+
+ VclPtr<VclFrame> m_pAssignFrame;
+ VclPtr<formula::RefEdit> m_pEdAssign;
+ VclPtr<formula::RefButton> m_pRbAssign;
+
+ VclPtr<VclContainer> m_pOptions;
+ VclPtr<CheckBox> m_pBtnHeader;
+ VclPtr<CheckBox> m_pBtnDoSize;
+ VclPtr<CheckBox> m_pBtnKeepFmt;
+ VclPtr<CheckBox> m_pBtnStripData;
+ VclPtr<FixedText> m_pFTSource;
+ VclPtr<FixedText> m_pFTOperations;
+
+ VclPtr<OKButton> m_pBtnOk;
+ VclPtr<CancelButton> m_pBtnCancel;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnRemove;
bool bSaved;
diff --git a/sc/source/ui/inc/delcldlg.hxx b/sc/source/ui/inc/delcldlg.hxx
index 6683fcb81a02..676d93b242cc 100644
--- a/sc/source/ui/inc/delcldlg.hxx
+++ b/sc/source/ui/inc/delcldlg.hxx
@@ -29,13 +29,15 @@
class ScDeleteCellDlg : public ModalDialog
{
private:
- RadioButton* m_pBtnCellsUp;
- RadioButton* m_pBtnCellsLeft;
- RadioButton* m_pBtnDelRows;
- RadioButton* m_pBtnDelCols;
+ VclPtr<RadioButton> m_pBtnCellsUp;
+ VclPtr<RadioButton> m_pBtnCellsLeft;
+ VclPtr<RadioButton> m_pBtnDelRows;
+ VclPtr<RadioButton> m_pBtnDelCols;
public:
ScDeleteCellDlg(vcl::Window* pParent, bool bDisallowCellMove = false);
+ virtual ~ScDeleteCellDlg();
+ virtual void dispose() SAL_OVERRIDE;
DelCellCmd GetDelCellCmd() const;
};
diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx
index 6bc898a82134..a2741a6448a5 100644
--- a/sc/source/ui/inc/delcodlg.hxx
+++ b/sc/source/ui/inc/delcodlg.hxx
@@ -27,15 +27,15 @@
class ScDeleteContentsDlg : public ModalDialog
{
private:
- CheckBox* aBtnDelAll;
- CheckBox* aBtnDelStrings;
- CheckBox* aBtnDelNumbers;
- CheckBox* aBtnDelDateTime;
- CheckBox* aBtnDelFormulas;
- CheckBox* aBtnDelNotes;
- CheckBox* aBtnDelAttrs;
- CheckBox* aBtnDelObjects;
- OKButton* aBtnOk;
+ VclPtr<CheckBox> aBtnDelAll;
+ VclPtr<CheckBox> aBtnDelStrings;
+ VclPtr<CheckBox> aBtnDelNumbers;
+ VclPtr<CheckBox> aBtnDelDateTime;
+ VclPtr<CheckBox> aBtnDelFormulas;
+ VclPtr<CheckBox> aBtnDelNotes;
+ VclPtr<CheckBox> aBtnDelAttrs;
+ VclPtr<CheckBox> aBtnDelObjects;
+ VclPtr<OKButton> aBtnOk;
bool bObjectsDisabled;
@@ -49,6 +49,7 @@ public:
ScDeleteContentsDlg( vcl::Window* pParent,
InsertDeleteFlags nCheckDefaults = IDF_NONE );
virtual ~ScDeleteContentsDlg();
+ virtual void dispose() SAL_OVERRIDE;
void DisableObjects();
InsertDeleteFlags GetDelContentsCmdBits() const;
diff --git a/sc/source/ui/inc/dpgroupdlg.hxx b/sc/source/ui/inc/dpgroupdlg.hxx
index 3066f41a610c..3ba0db194083 100644
--- a/sc/source/ui/inc/dpgroupdlg.hxx
+++ b/sc/source/ui/inc/dpgroupdlg.hxx
@@ -49,9 +49,9 @@ private:
DECL_LINK( ClickHdl, RadioButton* );
private:
- RadioButton* mpRbAuto;
- RadioButton* mpRbMan;
- Edit* mpEdValue;
+ VclPtr<RadioButton> mpRbAuto;
+ VclPtr<RadioButton> mpRbMan;
+ VclPtr<Edit> mpEdValue;
};
class ScDPNumGroupEditHelper : public ScDPGroupEditHelper
@@ -61,14 +61,13 @@ public:
RadioButton* pRbAuto, RadioButton* pRbMan,
ScDoubleField* pEdValue );
- virtual ~ScDPNumGroupEditHelper() {}
-
+ virtual ~ScDPNumGroupEditHelper() {}
private:
virtual bool ImplGetValue( double& rfValue ) const SAL_OVERRIDE;
virtual void ImplSetValue( double fValue ) SAL_OVERRIDE;
private:
- ScDoubleField* mpEdValue;
+ VclPtr<ScDoubleField> mpEdValue;
};
class ScDPDateGroupEditHelper : public ScDPGroupEditHelper
@@ -85,7 +84,7 @@ private:
virtual void ImplSetValue( double fValue ) SAL_OVERRIDE;
private:
- DateField* mpEdValue;
+ VclPtr<DateField> mpEdValue;
Date maNullDate;
};
@@ -93,17 +92,18 @@ class ScDPNumGroupDlg : public ModalDialog
{
public:
explicit ScDPNumGroupDlg( vcl::Window* pParent, const ScDPNumGroupInfo& rInfo );
-
+ virtual ~ScDPNumGroupDlg();
+ virtual void dispose() SAL_OVERRIDE;
ScDPNumGroupInfo GetGroupInfo() const;
private:
- RadioButton* mpRbAutoStart;
- RadioButton* mpRbManStart;
- ScDoubleField* mpEdStart;
- RadioButton* mpRbAutoEnd;
- RadioButton* mpRbManEnd;
- ScDoubleField* mpEdEnd;
- ScDoubleField* mpEdBy;
+ VclPtr<RadioButton> mpRbAutoStart;
+ VclPtr<RadioButton> mpRbManStart;
+ VclPtr<ScDoubleField> mpEdStart;
+ VclPtr<RadioButton> mpRbAutoEnd;
+ VclPtr<RadioButton> mpRbManEnd;
+ VclPtr<ScDoubleField> mpEdEnd;
+ VclPtr<ScDoubleField> mpEdBy;
ScDPNumGroupEditHelper maStartHelper;
ScDPNumGroupEditHelper maEndHelper;
};
@@ -113,7 +113,8 @@ class ScDPDateGroupDlg : public ModalDialog
public:
explicit ScDPDateGroupDlg( vcl::Window* pParent, const ScDPNumGroupInfo& rInfo,
sal_Int32 nDatePart, const Date& rNullDate );
-
+ virtual ~ScDPDateGroupDlg();
+ virtual void dispose() SAL_OVERRIDE;
ScDPNumGroupInfo GetGroupInfo() const;
sal_Int32 GetDatePart() const;
@@ -122,17 +123,17 @@ private:
DECL_LINK( CheckHdl, SvxCheckListBox* );
private:
- RadioButton* mpRbAutoStart;
- RadioButton* mpRbManStart;
- DateField* mpEdStart;
- RadioButton* mpRbAutoEnd;
- RadioButton* mpRbManEnd;
- DateField* mpEdEnd;
- RadioButton* mpRbNumDays;
- RadioButton* mpRbUnits;
- NumericField* mpEdNumDays;
- SvxCheckListBox* mpLbUnits;
- OKButton* mpBtnOk;
+ VclPtr<RadioButton> mpRbAutoStart;
+ VclPtr<RadioButton> mpRbManStart;
+ VclPtr<DateField> mpEdStart;
+ VclPtr<RadioButton> mpRbAutoEnd;
+ VclPtr<RadioButton> mpRbManEnd;
+ VclPtr<DateField> mpEdEnd;
+ VclPtr<RadioButton> mpRbNumDays;
+ VclPtr<RadioButton> mpRbUnits;
+ VclPtr<NumericField> mpEdNumDays;
+ VclPtr<SvxCheckListBox> mpLbUnits;
+ VclPtr<OKButton> mpBtnOk;
ScDPDateGroupEditHelper maStartHelper;
ScDPDateGroupEditHelper maEndHelper;
};
diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx
index 28e85803df07..bef700938a8f 100644
--- a/sc/source/ui/inc/dwfunctr.hxx
+++ b/sc/source/ui/inc/dwfunctr.hxx
@@ -51,7 +51,7 @@ private:
VclPtr<ListBox> aCatBox;
VclPtr<ListBox> aFuncList;
VclPtr<ListBox> aDDFuncList;
- ListBox* pAllFuncList;
+ VclPtr<ListBox> pAllFuncList;
SfxChildAlignment eSfxNewAlignment;
SfxChildAlignment eSfxOldAlignment;
diff --git a/sc/source/ui/inc/filldlg.hxx b/sc/source/ui/inc/filldlg.hxx
index c68b604cee46..70a2d086bb45 100644
--- a/sc/source/ui/inc/filldlg.hxx
+++ b/sc/source/ui/inc/filldlg.hxx
@@ -43,6 +43,7 @@ public:
double fMax,
sal_uInt16 nPossDir );
virtual ~ScFillSeriesDlg();
+ virtual void dispose() SAL_OVERRIDE;
FillDir GetFillDir() const { return theFillDir; }
FillCmd GetFillCmd() const { return theFillCmd; }
@@ -56,32 +57,32 @@ public:
void SetEdStartValEnabled(bool bFlag = false);
private:
- FixedText* m_pFtStartVal;
- Edit* m_pEdStartVal;
+ VclPtr<FixedText> m_pFtStartVal;
+ VclPtr<Edit> m_pEdStartVal;
const OUString aStartStrVal;
- FixedText* m_pFtEndVal;
- Edit* m_pEdEndVal;
+ VclPtr<FixedText> m_pFtEndVal;
+ VclPtr<Edit> m_pEdEndVal;
- FixedText* m_pFtIncrement;
- Edit* m_pEdIncrement;
- RadioButton* m_pBtnDown;
- RadioButton* m_pBtnRight;
- RadioButton* m_pBtnUp;
- RadioButton* m_pBtnLeft;
+ VclPtr<FixedText> m_pFtIncrement;
+ VclPtr<Edit> m_pEdIncrement;
+ VclPtr<RadioButton> m_pBtnDown;
+ VclPtr<RadioButton> m_pBtnRight;
+ VclPtr<RadioButton> m_pBtnUp;
+ VclPtr<RadioButton> m_pBtnLeft;
- RadioButton* m_pBtnArithmetic;
- RadioButton* m_pBtnGeometric;
- RadioButton* m_pBtnDate;
- RadioButton* m_pBtnAutoFill;
+ VclPtr<RadioButton> m_pBtnArithmetic;
+ VclPtr<RadioButton> m_pBtnGeometric;
+ VclPtr<RadioButton> m_pBtnDate;
+ VclPtr<RadioButton> m_pBtnAutoFill;
- FixedText* m_pFtTimeUnit;
- RadioButton* m_pBtnDay;
- RadioButton* m_pBtnDayOfWeek;
- RadioButton* m_pBtnMonth;
- RadioButton* m_pBtnYear;
+ VclPtr<FixedText> m_pFtTimeUnit;
+ VclPtr<RadioButton> m_pBtnDay;
+ VclPtr<RadioButton> m_pBtnDayOfWeek;
+ VclPtr<RadioButton> m_pBtnMonth;
+ VclPtr<RadioButton> m_pBtnYear;
- OKButton* m_pBtnOk;
+ VclPtr<OKButton> m_pBtnOk;
const OUString aErrMsgInvalidVal;
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index 30b5399e7e60..44d48c228524 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -69,43 +69,43 @@ public:
void RefreshEditRow( size_t nOffset );
private:
- ListBox* pLbConnect1;
- ListBox* pLbField1;
- ListBox* pLbCond1;
- ComboBox* pEdVal1;
-
- ListBox* pLbConnect2;
- ListBox* pLbField2;
- ListBox* pLbCond2;
- ComboBox* pEdVal2;
-
- ListBox* pLbConnect3;
- ListBox* pLbField3;
- ListBox* pLbCond3;
- ComboBox* pEdVal3;
-
- ListBox* pLbConnect4;
- ListBox* pLbField4;
- ListBox* pLbCond4;
- ComboBox* pEdVal4;
-
- ScrollBar* pScrollBar;
- VclExpander* pExpander;
-
- OKButton* pBtnOk;
- CancelButton* pBtnCancel;
-
- CheckBox* pBtnCase;
- CheckBox* pBtnRegExp;
- CheckBox* pBtnHeader;
- CheckBox* pBtnUnique;
- CheckBox* pBtnCopyResult;
- ListBox* pLbCopyArea;
- formula::RefEdit* pEdCopyArea;
- formula::RefButton* pRbCopyArea;
- CheckBox* pBtnDestPers;
- FixedText* pFtDbAreaLabel;
- FixedText* pFtDbArea;
+ VclPtr<ListBox> pLbConnect1;
+ VclPtr<ListBox> pLbField1;
+ VclPtr<ListBox> pLbCond1;
+ VclPtr<ComboBox> pEdVal1;
+
+ VclPtr<ListBox> pLbConnect2;
+ VclPtr<ListBox> pLbField2;
+ VclPtr<ListBox> pLbCond2;
+ VclPtr<ComboBox> pEdVal2;
+
+ VclPtr<ListBox> pLbConnect3;
+ VclPtr<ListBox> pLbField3;
+ VclPtr<ListBox> pLbCond3;
+ VclPtr<ComboBox> pEdVal3;
+
+ VclPtr<ListBox> pLbConnect4;
+ VclPtr<ListBox> pLbField4;
+ VclPtr<ListBox> pLbCond4;
+ VclPtr<ComboBox> pEdVal4;
+
+ VclPtr<ScrollBar> pScrollBar;
+ VclPtr<VclExpander> pExpander;
+
+ VclPtr<OKButton> pBtnOk;
+ VclPtr<CancelButton> pBtnCancel;
+
+ VclPtr<CheckBox> pBtnCase;
+ VclPtr<CheckBox> pBtnRegExp;
+ VclPtr<CheckBox> pBtnHeader;
+ VclPtr<CheckBox> pBtnUnique;
+ VclPtr<CheckBox> pBtnCopyResult;
+ VclPtr<ListBox> pLbCopyArea;
+ VclPtr<formula::RefEdit> pEdCopyArea;
+ VclPtr<formula::RefButton> pRbCopyArea;
+ VclPtr<CheckBox> pBtnDestPers;
+ VclPtr<FixedText> pFtDbAreaLabel;
+ VclPtr<FixedText> pFtDbArea;
const OUString aStrUndefined;
const OUString aStrNone;
@@ -122,10 +122,10 @@ private:
ScDocument* pDoc;
SCTAB nSrcTab;
- std::vector<ComboBox*> maValueEdArr;
- std::vector<ListBox*> maFieldLbArr;
- std::vector<ListBox*> maCondLbArr;
- std::vector<ListBox*> maConnLbArr;
+ std::vector<VclPtr<ComboBox>> maValueEdArr;
+ std::vector<VclPtr<ListBox>> maFieldLbArr;
+ std::vector<VclPtr<ListBox>> maCondLbArr;
+ std::vector<VclPtr<ListBox>> maConnLbArr;
std::deque<bool> maHasDates;
std::deque<bool> maRefreshExceptQuery;
@@ -174,27 +174,27 @@ public:
virtual bool Close() SAL_OVERRIDE;
private:
- ListBox* pLbFilterArea;
- formula::RefEdit* pEdFilterArea;
- formula::RefButton* pRbFilterArea;
-
- VclExpander* pExpander;
- CheckBox* pBtnCase;
- CheckBox* pBtnRegExp;
- CheckBox* pBtnHeader;
- CheckBox* pBtnUnique;
- CheckBox* pBtnCopyResult;
- ListBox* pLbCopyArea;
- formula::RefEdit* pEdCopyArea;
- formula::RefButton* pRbCopyArea;
- CheckBox* pBtnDestPers;
- FixedText* pFtDbAreaLabel;
- FixedText* pFtDbArea;
+ VclPtr<ListBox> pLbFilterArea;
+ VclPtr<formula::RefEdit> pEdFilterArea;
+ VclPtr<formula::RefButton> pRbFilterArea;
+
+ VclPtr<VclExpander> pExpander;
+ VclPtr<CheckBox> pBtnCase;
+ VclPtr<CheckBox> pBtnRegExp;
+ VclPtr<CheckBox> pBtnHeader;
+ VclPtr<CheckBox> pBtnUnique;
+ VclPtr<CheckBox> pBtnCopyResult;
+ VclPtr<ListBox> pLbCopyArea;
+ VclPtr<formula::RefEdit> pEdCopyArea;
+ VclPtr<formula::RefButton> pRbCopyArea;
+ VclPtr<CheckBox> pBtnDestPers;
+ VclPtr<FixedText> pFtDbAreaLabel;
+ VclPtr<FixedText> pFtDbArea;
const OUString aStrUndefined;
const OUString aStrNoName;
- OKButton* pBtnOk;
- CancelButton* pBtnCancel;
+ VclPtr<OKButton> pBtnOk;
+ VclPtr<CancelButton> pBtnCancel;
ScFilterOptionsMgr* pOptionsMgr;
@@ -204,7 +204,7 @@ private:
ScViewData* pViewData;
ScDocument* pDoc;
- formula::RefEdit* pRefInputEdit;
+ VclPtr<formula::RefEdit> pRefInputEdit;
bool bRefInputMode;
// Hack: RefInput control
diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx
index fae7f16a8520..ee27b40f5fc5 100644
--- a/sc/source/ui/inc/foptmgr.hxx
+++ b/sc/source/ui/inc/foptmgr.hxx
@@ -46,7 +46,7 @@ public:
CheckBox* refBtnDestPers,
ListBox* refLbCopyArea,
Edit* refEdCopyArea,
- formula::RefButton* refRbCopyArea,
+ formula::RefButton* refRbCopyArea,
FixedText* refFtDbAreaLabel,
FixedText* refFtDbArea,
const OUString& refStrUndefined );
@@ -57,17 +57,17 @@ private:
ScViewData* pViewData;
ScDocument* pDoc;
- CheckBox* pBtnCase;
- CheckBox* pBtnRegExp;
- CheckBox* pBtnHeader;
- CheckBox* pBtnUnique;
- CheckBox* pBtnCopyResult;
- CheckBox* pBtnDestPers;
- ListBox* pLbCopyArea;
- Edit* pEdCopyArea;
- formula::RefButton* pRbCopyArea;
- FixedText* pFtDbAreaLabel;
- FixedText* pFtDbArea;
+ VclPtr<CheckBox> pBtnCase;
+ VclPtr<CheckBox> pBtnRegExp;
+ VclPtr<CheckBox> pBtnHeader;
+ VclPtr<CheckBox> pBtnUnique;
+ VclPtr<CheckBox> pBtnCopyResult;
+ VclPtr<CheckBox> pBtnDestPers;
+ VclPtr<ListBox> pLbCopyArea;
+ VclPtr<Edit> pEdCopyArea;
+ VclPtr<formula::RefButton> pRbCopyArea;
+ VclPtr<FixedText> pFtDbAreaLabel;
+ VclPtr<FixedText> pFtDbArea;
const OUString& rStrUndefined;
diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx
index 131edf61ed68..e38ca5c08f74 100644
--- a/sc/source/ui/inc/fupoor.hxx
+++ b/sc/source/ui/inc/fupoor.hxx
@@ -43,11 +43,11 @@ class FuPoor
protected:
ScDrawView* pView;
ScTabViewShell* pViewShell;
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
SdrModel* pDrDoc;
SfxRequest aSfxRequest;
- Dialog* pDialog;
+ VclPtr<Dialog> pDialog;
Timer aScrollTimer; // for Autoscrolling
DECL_LINK( ScrollHdl, void * );
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index f889098bdaee..8e7d47b34696 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -136,8 +136,8 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
std::unique_ptr<ScNoteMarker> mpNoteMarker;
- std::unique_ptr<ScFilterListBox> mpFilterBox;
- std::unique_ptr<FloatingWindow> mpFilterFloat;
+ VclPtr<ScFilterListBox> pFilterBox;
+ VclPtr<FloatingWindow> pFilterFloat;
std::unique_ptr<ScCheckListMenuWindow> mpAutoFilterPopup;
std::unique_ptr<ScCheckListMenuWindow> mpDPFieldPopup;
std::unique_ptr<ScDPFieldButton> mpFilterButton;
diff --git a/sc/source/ui/inc/groupdlg.hxx b/sc/source/ui/inc/groupdlg.hxx
index 04a98c6a15c5..2fdee6c08855 100644
--- a/sc/source/ui/inc/groupdlg.hxx
+++ b/sc/source/ui/inc/groupdlg.hxx
@@ -29,12 +29,12 @@ class ScGroupDlg : public ModalDialog
public:
ScGroupDlg(vcl::Window* pParent, bool bUnGroup = false, bool bRows = true);
virtual ~ScGroupDlg();
-
+ virtual void dispose() SAL_OVERRIDE;
bool GetColsChecked() const;
private:
- RadioButton* m_pBtnRows;
- RadioButton* m_pBtnCols;
+ VclPtr<RadioButton> m_pBtnRows;
+ VclPtr<RadioButton> m_pBtnCols;
};
#endif // INCLUDED_SC_SOURCE_UI_INC_GROUPDLG_HXX
diff --git a/sc/source/ui/inc/highred.hxx b/sc/source/ui/inc/highred.hxx
index b80a3b8eff7e..d384c1caf23a 100644
--- a/sc/source/ui/inc/highred.hxx
+++ b/sc/source/ui/inc/highred.hxx
@@ -51,14 +51,14 @@ class ScDocument;
class ScHighlightChgDlg : public ScAnyRefDlg
{
private:
- CheckBox* m_pHighlightBox;
- SvxTPFilter* m_pFilterCtr;
- CheckBox* m_pCbAccept;
- CheckBox* m_pCbReject;
- OKButton* m_pOkButton;
-
- formula::RefEdit* m_pEdAssign;
- formula::RefButton* m_pRbAssign;
+ VclPtr<CheckBox> m_pHighlightBox;
+ VclPtr<SvxTPFilter> m_pFilterCtr;
+ VclPtr<CheckBox> m_pCbAccept;
+ VclPtr<CheckBox> m_pCbReject;
+ VclPtr<OKButton> m_pOkButton;
+
+ VclPtr<formula::RefEdit> m_pEdAssign;
+ VclPtr<formula::RefButton> m_pRbAssign;
ScViewData* pViewData;
ScDocument* pDoc;
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index 829ec975f875..dfad789dcf40 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -28,6 +28,7 @@
#include <tools/gen.hxx>
#include <tools/link.hxx>
#include <vcl/vclevent.hxx>
+#include <vcl/vclptr.hxx>
#include <editeng/svxenum.hxx>
#include <set>
@@ -54,7 +55,7 @@ struct ESelection;
class ScInputHandler : boost::noncopyable
{
private:
- ScInputWindow* pInputWin;
+ VclPtr<ScInputWindow> pInputWin;
ScEditEngineDefaulter* pEngine; ///< Edited data in the sheet (when the user clicks into the sheet, and starts writing there).
EditView* pTableView; // associated active EditView
@@ -66,9 +67,9 @@ private:
ScTypedCaseStrSet::const_iterator miAutoPosColumn;
ScTypedCaseStrSet::const_iterator miAutoPosFormula;
- vcl::Window* pTipVisibleParent;
+ VclPtr<vcl::Window> pTipVisibleParent;
sal_uLong nTipVisible;
- vcl::Window* pTipVisibleSecParent;
+ VclPtr<vcl::Window> pTipVisibleSecParent;
sal_uLong nTipVisibleSec;
OUString aManualTip;
OUString aAutoSearch;
@@ -240,7 +241,7 @@ public:
bool IsFormulaMode() const { return bFormulaMode; }
ScInputWindow* GetInputWindow() { return pInputWin; }
- void SetInputWindow( ScInputWindow* pNew ) { pInputWin = pNew; }
+ void SetInputWindow( ScInputWindow* pNew );
void StopInputWinEngine( bool bAll );
bool IsInEnterHandler() const { return bInEnterHandler; }
diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx
index dd9a250f7acb..e89d68d9bdb3 100644
--- a/sc/source/ui/inc/inscldlg.hxx
+++ b/sc/source/ui/inc/inscldlg.hxx
@@ -29,14 +29,15 @@
class ScInsertCellDlg : public ModalDialog
{
private:
- RadioButton* m_pBtnCellsDown;
- RadioButton* m_pBtnCellsRight;
- RadioButton* m_pBtnInsRow;
- RadioButton* m_pBtnInsCol;
+ VclPtr<RadioButton> m_pBtnCellsDown;
+ VclPtr<RadioButton> m_pBtnCellsRight;
+ VclPtr<RadioButton> m_pBtnInsRow;
+ VclPtr<RadioButton> m_pBtnInsCol;
public:
ScInsertCellDlg( vcl::Window* pParent,bool bDisallowCellMove = false );
virtual ~ScInsertCellDlg();
+ virtual void dispose() SAL_OVERRIDE;
InsCellCmd GetInsCellCmd() const;
};
diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx
index 255cfac02c03..65ea1d9d5f6f 100644
--- a/sc/source/ui/inc/inscodlg.hxx
+++ b/sc/source/ui/inc/inscodlg.hxx
@@ -49,32 +49,32 @@ public:
void SetCellShiftDisabled( int nDisable );
private:
- CheckBox* mpBtnInsAll;
- CheckBox* mpBtnInsStrings;
- CheckBox* mpBtnInsNumbers;
- CheckBox* mpBtnInsDateTime;
- CheckBox* mpBtnInsFormulas;
- CheckBox* mpBtnInsNotes;
- CheckBox* mpBtnInsAttrs;
- CheckBox* mpBtnInsObjects;
-
- CheckBox* mpBtnSkipEmptyCells;
- CheckBox* mpBtnTranspose;
- CheckBox* mpBtnLink;
-
- RadioButton* mpRbNoOp;
- RadioButton* mpRbAdd;
- RadioButton* mpRbSub;
- RadioButton* mpRbMul;
- RadioButton* mpRbDiv;
-
- RadioButton* mpRbMoveNone;
- RadioButton* mpRbMoveDown;
- RadioButton* mpRbMoveRight;
-
- PushButton* mpBtnShortCutPasteValuesOnly;
- PushButton* mpBtnShortCutPasteValuesFormats;
- PushButton* mpBtnShortCutPasteTranspose;
+ VclPtr<CheckBox> mpBtnInsAll;
+ VclPtr<CheckBox> mpBtnInsStrings;
+ VclPtr<CheckBox> mpBtnInsNumbers;
+ VclPtr<CheckBox> mpBtnInsDateTime;
+ VclPtr<CheckBox> mpBtnInsFormulas;
+ VclPtr<CheckBox> mpBtnInsNotes;
+ VclPtr<CheckBox> mpBtnInsAttrs;
+ VclPtr<CheckBox> mpBtnInsObjects;
+
+ VclPtr<CheckBox> mpBtnSkipEmptyCells;
+ VclPtr<CheckBox> mpBtnTranspose;
+ VclPtr<CheckBox> mpBtnLink;
+
+ VclPtr<RadioButton> mpRbNoOp;
+ VclPtr<RadioButton> mpRbAdd;
+ VclPtr<RadioButton> mpRbSub;
+ VclPtr<RadioButton> mpRbMul;
+ VclPtr<RadioButton> mpRbDiv;
+
+ VclPtr<RadioButton> mpRbMoveNone;
+ VclPtr<RadioButton> mpRbMoveDown;
+ VclPtr<RadioButton> mpRbMoveRight;
+
+ VclPtr<PushButton> mpBtnShortCutPasteValuesOnly;
+ VclPtr<PushButton> mpBtnShortCutPasteValuesFormats;
+ VclPtr<PushButton> mpBtnShortCutPasteTranspose;
bool bOtherDoc;
bool bFillMode;
diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx
index ad03e94aa5c1..64bc24f5bc17 100644
--- a/sc/source/ui/inc/instbdlg.hxx
+++ b/sc/source/ui/inc/instbdlg.hxx
@@ -58,19 +58,19 @@ public:
SCTAB GetTableCount() const { return nTableCount;}
private:
- RadioButton* m_pBtnBefore;
- RadioButton* m_pBtnBehind;
- RadioButton* m_pBtnNew;
- RadioButton* m_pBtnFromFile;
- FixedText* m_pFtCount;
- NumericField* m_pNfCount;
- FixedText* m_pFtName;
- Edit* m_pEdName;
- ListBox* m_pLbTables;
- FixedText* m_pFtPath;
- PushButton* m_pBtnBrowse;
- CheckBox* m_pBtnLink;
- OKButton* m_pBtnOk;
+ VclPtr<RadioButton> m_pBtnBefore;
+ VclPtr<RadioButton> m_pBtnBehind;
+ VclPtr<RadioButton> m_pBtnNew;
+ VclPtr<RadioButton> m_pBtnFromFile;
+ VclPtr<FixedText> m_pFtCount;
+ VclPtr<NumericField> m_pNfCount;
+ VclPtr<FixedText> m_pFtName;
+ VclPtr<Edit> m_pEdName;
+ VclPtr<ListBox> m_pLbTables;
+ VclPtr<FixedText> m_pFtPath;
+ VclPtr<PushButton> m_pBtnBrowse;
+ VclPtr<CheckBox> m_pBtnLink;
+ VclPtr<OKButton> m_pBtnOk;
Timer aBrowseTimer;
ScViewData& rViewData;
diff --git a/sc/source/ui/inc/lbseldlg.hxx b/sc/source/ui/inc/lbseldlg.hxx
index 39c2fd61a67b..ab52b76318fd 100644
--- a/sc/source/ui/inc/lbseldlg.hxx
+++ b/sc/source/ui/inc/lbseldlg.hxx
@@ -30,12 +30,14 @@
class ScSelEntryDlg : public ModalDialog
{
private:
- ListBox* m_pLb;
+ VclPtr<ListBox> m_pLb;
DECL_LINK( DblClkHdl, void * );
public:
ScSelEntryDlg(vcl::Window* pParent, const std::vector<OUString> &rEntryList);
+ virtual ~ScSelEntryDlg();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetSelectEntry() const;
};
diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx
index 6c11b2f0053b..d88b17d76b41 100644
--- a/sc/source/ui/inc/linkarea.hxx
+++ b/sc/source/ui/inc/linkarea.hxx
@@ -37,13 +37,13 @@ class ScDocShell;
class ScLinkedAreaDlg : public ModalDialog
{
private:
- SvtURLBox* m_pCbUrl;
- PushButton* m_pBtnBrowse;
- ListBox* m_pLbRanges;
- CheckBox* m_pBtnReload;
- NumericField* m_pNfDelay;
- FixedText* m_pFtSeconds;
- OKButton* m_pBtnOk;
+ VclPtr<SvtURLBox> m_pCbUrl;
+ VclPtr<PushButton> m_pBtnBrowse;
+ VclPtr<ListBox> m_pLbRanges;
+ VclPtr<CheckBox> m_pBtnReload;
+ VclPtr<NumericField> m_pNfDelay;
+ VclPtr<FixedText> m_pFtSeconds;
+ VclPtr<OKButton> m_pBtnOk;
ScDocShell* pSourceShell;
sfx2::DocumentInserter* pDocInserter;
@@ -64,6 +64,7 @@ private:
public:
ScLinkedAreaDlg( vcl::Window* pParent );
virtual ~ScLinkedAreaDlg();
+ virtual void dispose() SAL_OVERRIDE;
void InitFromOldLink( const OUString& rFile, const OUString& rFilter,
const OUString& rOptions, const OUString& rSource,
diff --git a/sc/source/ui/inc/mtrindlg.hxx b/sc/source/ui/inc/mtrindlg.hxx
index ab422cf22819..72b106fd3504 100644
--- a/sc/source/ui/inc/mtrindlg.hxx
+++ b/sc/source/ui/inc/mtrindlg.hxx
@@ -38,12 +38,14 @@ public:
long nMinimum = 0,
long nFirst = 1,
long nLast = 100 );
+ virtual ~ScMetricInputDlg();
+ virtual void dispose() SAL_OVERRIDE;
long GetInputValue( FieldUnit eUnit = FUNIT_TWIP ) const;
private:
- MetricField* m_pEdValue;
- CheckBox* m_pBtnDefVal;
+ VclPtr<MetricField> m_pEdValue;
+ VclPtr<CheckBox> m_pBtnDefVal;
long nDefaultValue;
long nCurrentValue;
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index 0087e42927e6..cef3d5f8160b 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -32,6 +32,7 @@ class ScMoveTableDlg : public ModalDialog
public:
ScMoveTableDlg(vcl::Window* pParent, const OUString& rDefault);
virtual ~ScMoveTableDlg();
+ virtual void dispose() SAL_OVERRIDE;
sal_uInt16 GetSelectedDocument () const { return nDocument; }
SCTAB GetSelectedTable () const { return nTable; }
@@ -49,13 +50,13 @@ private:
bool IsCurrentDocSelected() const;
private:
- RadioButton* pBtnMove;
- RadioButton* pBtnCopy;
- ListBox* pLbDoc;
- ListBox* pLbTable;
- Edit* pEdTabName;
- FixedText* pFtWarn;
- OKButton* pBtnOk;
+ VclPtr<RadioButton> pBtnMove;
+ VclPtr<RadioButton> pBtnCopy;
+ VclPtr<ListBox> pLbDoc;
+ VclPtr<ListBox> pLbTable;
+ VclPtr<Edit> pEdTabName;
+ VclPtr<FixedText> pFtWarn;
+ VclPtr<OKButton> pBtnOk;
OUString msCurrentDoc;
OUString msNewDoc;
diff --git a/sc/source/ui/inc/namecrea.hxx b/sc/source/ui/inc/namecrea.hxx
index ef8762605dbc..7a53cd85a4a7 100644
--- a/sc/source/ui/inc/namecrea.hxx
+++ b/sc/source/ui/inc/namecrea.hxx
@@ -28,13 +28,14 @@
class ScNameCreateDlg : public ModalDialog
{
protected:
- CheckBox* m_pTopBox;
- CheckBox* m_pLeftBox;
- CheckBox* m_pBottomBox;
- CheckBox* m_pRightBox;
+ VclPtr<CheckBox> m_pTopBox;
+ VclPtr<CheckBox> m_pLeftBox;
+ VclPtr<CheckBox> m_pBottomBox;
+ VclPtr<CheckBox> m_pRightBox;
public:
ScNameCreateDlg( vcl::Window * pParent, sal_uInt16 nFlags );
-
+ virtual ~ScNameCreateDlg();
+ virtual void dispose() SAL_OVERRIDE;
sal_uInt16 GetFlags() const;
};
diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx
index b21a0be4924b..acdb9ed31e52 100644
--- a/sc/source/ui/inc/namedefdlg.hxx
+++ b/sc/source/ui/inc/namedefdlg.hxx
@@ -26,21 +26,21 @@ class ScViewData;
class ScNameDefDlg : public ScAnyRefDlg
{
private:
- Edit* m_pEdName;
+ VclPtr<Edit> m_pEdName;
- formula::RefEdit* m_pEdRange;
- formula::RefButton* m_pRbRange;
+ VclPtr<formula::RefEdit> m_pEdRange;
+ VclPtr<formula::RefButton> m_pRbRange;
- ListBox* m_pLbScope;
+ VclPtr<ListBox> m_pLbScope;
- CheckBox* m_pBtnRowHeader;
- CheckBox* m_pBtnColHeader;
- CheckBox* m_pBtnPrintArea;
- CheckBox* m_pBtnCriteria;
+ VclPtr<CheckBox> m_pBtnRowHeader;
+ VclPtr<CheckBox> m_pBtnColHeader;
+ VclPtr<CheckBox> m_pBtnPrintArea;
+ VclPtr<CheckBox> m_pBtnCriteria;
- PushButton* m_pBtnAdd;
- PushButton* m_pBtnCancel;
- FixedText* m_pFtInfo;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnCancel;
+ VclPtr<FixedText> m_pFtInfo;
bool mbUndo; //if true we need to add an undo action after creating a range name
ScDocument* mpDoc;
@@ -77,7 +77,8 @@ public:
ScViewData* pViewData, const std::map<OUString, ScRangeName*>& aRangeMap,
const ScAddress& aCursorPos, const bool bUndo);
- virtual ~ScNameDefDlg() {};
+ virtual ~ScNameDefDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
virtual bool IsRefInputMode() const SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx
index fa3316f21dae..cad2f9d8d364 100644
--- a/sc/source/ui/inc/namedlg.hxx
+++ b/sc/source/ui/inc/namedlg.hxx
@@ -43,24 +43,24 @@ class ScDocument;
class ScNameDlg : public ScAnyRefDlg, public ScRangeManagerTable::InitListener
{
private:
- Edit* m_pEdName;
- formula::RefEdit* m_pEdAssign;
- formula::RefButton* m_pRbAssign;
- ListBox* m_pLbScope;
+ VclPtr<Edit> m_pEdName;
+ VclPtr<formula::RefEdit> m_pEdAssign;
+ VclPtr<formula::RefButton> m_pRbAssign;
+ VclPtr<ListBox> m_pLbScope;
- CheckBox* m_pBtnPrintArea;
- CheckBox* m_pBtnColHeader;
- CheckBox* m_pBtnCriteria;
- CheckBox* m_pBtnRowHeader;
+ VclPtr<CheckBox> m_pBtnPrintArea;
+ VclPtr<CheckBox> m_pBtnColHeader;
+ VclPtr<CheckBox> m_pBtnCriteria;
+ VclPtr<CheckBox> m_pBtnRowHeader;
- PushButton* m_pBtnAdd;
- PushButton* m_pBtnDelete;
- PushButton* m_pBtnOk;
- PushButton* m_pBtnCancel;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnDelete;
+ VclPtr<PushButton> m_pBtnOk;
+ VclPtr<PushButton> m_pBtnCancel;
- FixedText* m_pFtInfo;
+ VclPtr<FixedText> m_pFtInfo;
- ScRangeManagerTable* m_pRangeManagerTable;
+ VclPtr<ScRangeManagerTable> m_pRangeManagerTable;
const OUString maGlobalNameStr;
const OUString maErrInvalidNameStr;
diff --git a/sc/source/ui/inc/namepast.hxx b/sc/source/ui/inc/namepast.hxx
index 0ee6fa6db115..a71a95b23e9c 100644
--- a/sc/source/ui/inc/namepast.hxx
+++ b/sc/source/ui/inc/namepast.hxx
@@ -37,11 +37,11 @@ class ScNamePasteDlg : public ModalDialog
DECL_LINK( ButtonHdl, Button * );
private:
- PushButton* m_pBtnPasteAll;
- PushButton* m_pBtnPaste;
- PushButton* m_pBtnClose;
+ VclPtr<PushButton> m_pBtnPasteAll;
+ VclPtr<PushButton> m_pBtnPaste;
+ VclPtr<PushButton> m_pBtnClose;
- ScRangeManagerTable* mpTable;
+ VclPtr<ScRangeManagerTable> mpTable;
std::vector<OUString> maSelectedNames;
boost::ptr_map<OUString, ScRangeName> maRangeMap;
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index 7e7fb9265ae4..8445a094019c 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -331,7 +331,7 @@ public:
virtual void Resizing( Size& rSize ) SAL_OVERRIDE;
private:
- ScNavigatorDlg* pNavigator;
+ VclPtr<ScNavigatorDlg> pNavigator;
};
#endif // INCLUDED_SC_SOURCE_UI_INC_NAVIPI_HXX
diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx
index 537837aa7af3..ee8af56338f0 100644
--- a/sc/source/ui/inc/notemark.hxx
+++ b/sc/source/ui/inc/notemark.hxx
@@ -31,10 +31,10 @@ class SdrObject;
class ScNoteMarker
{
private:
- vcl::Window* pWindow;
- vcl::Window* pRightWin;
- vcl::Window* pBottomWin;
- vcl::Window* pDiagWin;
+ VclPtr<vcl::Window> pWindow;
+ VclPtr<vcl::Window> pRightWin;
+ VclPtr<vcl::Window> pBottomWin;
+ VclPtr<vcl::Window> pDiagWin;
ScDocument* pDoc;
ScAddress aDocPos;
OUString aUserText;
diff --git a/sc/source/ui/inc/opredlin.hxx b/sc/source/ui/inc/opredlin.hxx
index 0e5e07c6b518..8b3ad3da7a2d 100644
--- a/sc/source/ui/inc/opredlin.hxx
+++ b/sc/source/ui/inc/opredlin.hxx
@@ -36,10 +36,10 @@
class ScRedlineOptionsTabPage : public SfxTabPage
{
- ColorListBox* m_pContentColorLB;
- ColorListBox* m_pRemoveColorLB;
- ColorListBox* m_pInsertColorLB;
- ColorListBox* m_pMoveColorLB;
+ VclPtr<ColorListBox> m_pContentColorLB;
+ VclPtr<ColorListBox> m_pRemoveColorLB;
+ VclPtr<ColorListBox> m_pInsertColorLB;
+ VclPtr<ColorListBox> m_pMoveColorLB;
OUString aAuthorStr;
DECL_LINK(ColorHdl, void *);
@@ -47,7 +47,7 @@ public:
ScRedlineOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
virtual ~ScRedlineOptionsTabPage();
-
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx
index 6d1fd0f35f1b..8a7d1cecb90c 100644
--- a/sc/source/ui/inc/optsolver.hxx
+++ b/sc/source/ui/inc/optsolver.hxx
@@ -96,6 +96,7 @@ public:
ScOptSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
ScDocShell* pDocSh, ScAddress aCursorPos );
virtual ~ScOptSolverDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
virtual bool IsRefInputMode() const SAL_OVERRIDE;
@@ -103,56 +104,56 @@ public:
virtual bool Close() SAL_OVERRIDE;
private:
- FixedText* m_pFtObjectiveCell;
- formula::RefEdit* m_pEdObjectiveCell;
- formula::RefButton* m_pRBObjectiveCell;
-
- RadioButton* m_pRbMax;
- RadioButton* m_pRbMin;
- RadioButton* m_pRbValue;
- formula::RefEdit* m_pEdTargetValue;
- formula::RefButton* m_pRBTargetValue;
-
- FixedText* m_pFtVariableCells;
- formula::RefEdit* m_pEdVariableCells;
- formula::RefButton* m_pRBVariableCells;
-
- FixedText* m_pFtCellRef; // labels are together with controls for the first row
- ScCursorRefEdit* m_pEdLeft1;
- formula::RefButton* m_pRBLeft1;
- FixedText* m_pFtOperator;
- ListBox* m_pLbOp1;
- FixedText* m_pFtConstraint;
- ScCursorRefEdit* m_pEdRight1;
- formula::RefButton* m_pRBRight1;
- PushButton* m_pBtnDel1;
-
- ScCursorRefEdit* m_pEdLeft2;
- formula::RefButton* m_pRBLeft2;
- ListBox* m_pLbOp2;
- ScCursorRefEdit* m_pEdRight2;
- formula::RefButton* m_pRBRight2;
- PushButton* m_pBtnDel2;
-
- ScCursorRefEdit* m_pEdLeft3;
- formula::RefButton* m_pRBLeft3;
- ListBox* m_pLbOp3;
- ScCursorRefEdit* m_pEdRight3;
- formula::RefButton* m_pRBRight3;
- PushButton* m_pBtnDel3;
-
- ScCursorRefEdit* m_pEdLeft4;
- formula::RefButton* m_pRBLeft4;
- ListBox* m_pLbOp4;
- ScCursorRefEdit* m_pEdRight4;
- formula::RefButton* m_pRBRight4;
- PushButton* m_pBtnDel4;
-
- ScrollBar* m_pScrollBar;
-
- PushButton* m_pBtnOpt;
- PushButton* m_pBtnCancel;
- PushButton* m_pBtnSolve;
+ VclPtr<FixedText> m_pFtObjectiveCell;
+ VclPtr<formula::RefEdit> m_pEdObjectiveCell;
+ VclPtr<formula::RefButton> m_pRBObjectiveCell;
+
+ VclPtr<RadioButton> m_pRbMax;
+ VclPtr<RadioButton> m_pRbMin;
+ VclPtr<RadioButton> m_pRbValue;
+ VclPtr<formula::RefEdit> m_pEdTargetValue;
+ VclPtr<formula::RefButton> m_pRBTargetValue;
+
+ VclPtr<FixedText> m_pFtVariableCells;
+ VclPtr<formula::RefEdit> m_pEdVariableCells;
+ VclPtr<formula::RefButton> m_pRBVariableCells;
+
+ VclPtr<FixedText> m_pFtCellRef; // labels are together with controls for the first row
+ VclPtr<ScCursorRefEdit> m_pEdLeft1;
+ VclPtr<formula::RefButton> m_pRBLeft1;
+ VclPtr<FixedText> m_pFtOperator;
+ VclPtr<ListBox> m_pLbOp1;
+ VclPtr<FixedText> m_pFtConstraint;
+ VclPtr<ScCursorRefEdit> m_pEdRight1;
+ VclPtr<formula::RefButton> m_pRBRight1;
+ VclPtr<PushButton> m_pBtnDel1;
+
+ VclPtr<ScCursorRefEdit> m_pEdLeft2;
+ VclPtr<formula::RefButton> m_pRBLeft2;
+ VclPtr<ListBox> m_pLbOp2;
+ VclPtr<ScCursorRefEdit> m_pEdRight2;
+ VclPtr<formula::RefButton> m_pRBRight2;
+ VclPtr<PushButton> m_pBtnDel2;
+
+ VclPtr<ScCursorRefEdit> m_pEdLeft3;
+ VclPtr<formula::RefButton> m_pRBLeft3;
+ VclPtr<ListBox> m_pLbOp3;
+ VclPtr<ScCursorRefEdit> m_pEdRight3;
+ VclPtr<formula::RefButton> m_pRBRight3;
+ VclPtr<PushButton> m_pBtnDel3;
+
+ VclPtr<ScCursorRefEdit> m_pEdLeft4;
+ VclPtr<formula::RefButton> m_pRBLeft4;
+ VclPtr<ListBox> m_pLbOp4;
+ VclPtr<ScCursorRefEdit> m_pEdRight4;
+ VclPtr<formula::RefButton> m_pRBRight4;
+ VclPtr<PushButton> m_pBtnDel4;
+
+ VclPtr<ScrollBar> m_pScrollBar;
+
+ VclPtr<PushButton> m_pBtnOpt;
+ VclPtr<PushButton> m_pBtnCancel;
+ VclPtr<PushButton> m_pBtnSolve;
OUString maInputError;
OUString maConditionError;
@@ -160,16 +161,16 @@ private:
ScDocShell* mpDocShell;
ScDocument& mrDoc;
const SCTAB mnCurTab;
- formula::RefEdit* mpEdActive;
+ VclPtr<formula::RefEdit> mpEdActive;
bool mbDlgLostFocus;
static const sal_uInt16 EDIT_ROW_COUNT = 4;
ScCursorRefEdit* mpLeftEdit[EDIT_ROW_COUNT];
- formula::RefButton* mpLeftButton[EDIT_ROW_COUNT];
+ VclPtr<formula::RefButton> mpLeftButton[EDIT_ROW_COUNT];
ScCursorRefEdit* mpRightEdit[EDIT_ROW_COUNT];
- formula::RefButton* mpRightButton[EDIT_ROW_COUNT];
- ListBox* mpOperator[EDIT_ROW_COUNT];
- PushButton* mpDelButton[EDIT_ROW_COUNT];
+ VclPtr<formula::RefButton> mpRightButton[EDIT_ROW_COUNT];
+ VclPtr<ListBox> mpOperator[EDIT_ROW_COUNT];
+ VclPtr<PushButton> mpDelButton[EDIT_ROW_COUNT];
std::vector<ScOptConditionRow> maConditions;
long nScrollPos;
@@ -202,10 +203,12 @@ private:
class ScSolverProgressDialog : public ModelessDialog
{
- FixedText* m_pFtTime;
+ VclPtr<FixedText> m_pFtTime;
public:
ScSolverProgressDialog( vcl::Window* pParent );
+ virtual ~ScSolverProgressDialog();
+ virtual void dispose() SAL_OVERRIDE;
void HideTimeLimit();
void SetTimeLimit( sal_Int32 nSeconds );
@@ -213,22 +216,26 @@ public:
class ScSolverNoSolutionDialog : public ModalDialog
{
- FixedText* m_pFtErrorText;
+ VclPtr<FixedText> m_pFtErrorText;
public:
ScSolverNoSolutionDialog(vcl::Window* pParent, const OUString& rErrorText);
+ virtual ~ScSolverNoSolutionDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
class ScSolverSuccessDialog : public ModalDialog
{
- FixedText* m_pFtResult;
- PushButton* m_pBtnOk;
- PushButton* m_pBtnCancel;
+ VclPtr<FixedText> m_pFtResult;
+ VclPtr<PushButton> m_pBtnOk;
+ VclPtr<PushButton> m_pBtnCancel;
DECL_LINK(ClickHdl, PushButton*);
public:
ScSolverSuccessDialog( vcl::Window* pParent, const OUString& rSolution );
+ virtual ~ScSolverSuccessDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif
diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx
index 4253fa83a720..c2272b311c76 100644
--- a/sc/source/ui/inc/pfiltdlg.hxx
+++ b/sc/source/ui/inc/pfiltdlg.hxx
@@ -45,24 +45,24 @@ public:
const ScQueryItem& GetOutputItem();
private:
- ListBox* m_pLbField1;
- ListBox* m_pLbCond1;
- ComboBox* m_pEdVal1;
-
- ListBox* m_pLbConnect1;
- ListBox* m_pLbField2;
- ListBox* m_pLbCond2;
- ComboBox* m_pEdVal2;
-
- ListBox* m_pLbConnect2;
- ListBox* m_pLbField3;
- ListBox* m_pLbCond3;
- ComboBox* m_pEdVal3;
-
- CheckBox* m_pBtnCase;
- CheckBox* m_pBtnRegExp;
- CheckBox* m_pBtnUnique;
- FixedText* m_pFtDbArea;
+ VclPtr<ListBox> m_pLbField1;
+ VclPtr<ListBox> m_pLbCond1;
+ VclPtr<ComboBox> m_pEdVal1;
+
+ VclPtr<ListBox> m_pLbConnect1;
+ VclPtr<ListBox> m_pLbField2;
+ VclPtr<ListBox> m_pLbCond2;
+ VclPtr<ComboBox> m_pEdVal2;
+
+ VclPtr<ListBox> m_pLbConnect2;
+ VclPtr<ListBox> m_pLbField3;
+ VclPtr<ListBox> m_pLbCond3;
+ VclPtr<ComboBox> m_pEdVal3;
+
+ VclPtr<CheckBox> m_pBtnCase;
+ VclPtr<CheckBox> m_pBtnRegExp;
+ VclPtr<CheckBox> m_pBtnUnique;
+ VclPtr<FixedText> m_pFtDbArea;
const OUString aStrNone;
const OUString aStrEmpty;
const OUString aStrNotEmpty;
@@ -76,9 +76,9 @@ private:
SCTAB nSrcTab;
sal_uInt16 nFieldCount;
- ComboBox* aValueEdArr[3];
- ListBox* aFieldLbArr[3];
- ListBox* aCondLbArr[3];
+ VclPtr<ComboBox> aValueEdArr[3];
+ VclPtr<ListBox> aFieldLbArr[3];
+ VclPtr<ListBox> aCondLbArr[3];
std::vector<ScTypedStrData>* pEntryLists[MAXCOLCOUNT];
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index d8bec53db738..66c041f8841a 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -40,11 +40,11 @@ class ScPreviewShell: public SfxViewShell
{
ScDocShell* pDocShell;
- SystemWindow* mpFrameWindow;
- ScPreview* pPreview; // Output window
- ScrollBar* pHorScroll;
- ScrollBar* pVerScroll;
- vcl::Window* pCorner;
+ VclPtr<SystemWindow> mpFrameWindow;
+ VclPtr<ScPreview> pPreview; // Output window
+ VclPtr<ScrollBar> pHorScroll;
+ VclPtr<ScrollBar> pVerScroll;
+ VclPtr<vcl::Window> pCorner;
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSourceData; // ViewData
sal_uInt8 nSourceDesignMode; // form design mode from TabView
diff --git a/sc/source/ui/inc/protectiondlg.hxx b/sc/source/ui/inc/protectiondlg.hxx
index 812b40258dc7..32a0b724c466 100644
--- a/sc/source/ui/inc/protectiondlg.hxx
+++ b/sc/source/ui/inc/protectiondlg.hxx
@@ -35,6 +35,7 @@ class ScTableProtectionDlg : public ModalDialog
public:
explicit ScTableProtectionDlg(vcl::Window* pParent);
virtual ~ScTableProtectionDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
@@ -49,16 +50,16 @@ private:
void EnableOptionalWidgets(bool bEnable = true);
- CheckBox* m_pBtnProtect;
+ VclPtr<CheckBox> m_pBtnProtect;
- VclContainer* m_pPasswords;
- VclContainer* m_pOptions;
- Edit* m_pPassword1Edit;
- Edit* m_pPassword2Edit;
+ VclPtr<VclContainer> m_pPasswords;
+ VclPtr<VclContainer> m_pOptions;
+ VclPtr<Edit> m_pPassword1Edit;
+ VclPtr<Edit> m_pPassword2Edit;
- SvxCheckListBox* m_pOptionsListBox;
+ VclPtr<SvxCheckListBox> m_pOptionsListBox;
- OKButton* m_pBtnOk;
+ VclPtr<OKButton> m_pBtnOk;
OUString m_aSelectLockedCells;
OUString m_aSelectUnlockedCells;
diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx
index 4718e5e5e026..bfebea6b8439 100644
--- a/sc/source/ui/inc/pvfundlg.hxx
+++ b/sc/source/ui/inc/pvfundlg.hxx
@@ -60,7 +60,8 @@ class ScDPFunctionDlg : public ModalDialog
public:
explicit ScDPFunctionDlg( vcl::Window* pParent, const ScDPLabelDataVector& rLabelVec,
const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData );
-
+ virtual ~ScDPFunctionDlg();
+ virtual void dispose() SAL_OVERRIDE;
sal_uInt16 GetFuncMask() const;
::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const;
@@ -77,14 +78,14 @@ private:
DECL_LINK( DblClickHdl, void* );
private:
- ScDPFunctionListBox* mpLbFunc;
- FixedText* mpFtName;
- ListBox* mpLbType;
- FixedText* mpFtBaseField;
- ListBox* mpLbBaseField;
- FixedText* mpFtBaseItem;
- ListBox* mpLbBaseItem;
- OKButton* mpBtnOk;
+ VclPtr<ScDPFunctionListBox> mpLbFunc;
+ VclPtr<FixedText> mpFtName;
+ VclPtr<ListBox> mpLbType;
+ VclPtr<FixedText> mpFtBaseField;
+ VclPtr<ListBox> mpLbBaseField;
+ VclPtr<FixedText> mpFtBaseItem;
+ VclPtr<ListBox> mpLbBaseItem;
+ VclPtr<OKButton> mpBtnOk;
NameMapType maBaseFieldNameMap; // cache for base field display -> original name.
NameMapType maBaseItemNameMap; // cache for base item display -> original name.
@@ -101,8 +102,9 @@ public:
explicit ScDPSubtotalDlg( vcl::Window* pParent, ScDPObject& rDPObj,
const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData,
const ScDPNameVec& rDataFields, bool bEnableLayout );
-
- sal_uInt16 GetFuncMask() const;
+ virtual ~ScDPSubtotalDlg();
+ virtual void dispose() SAL_OVERRIDE;
+ sal_uInt16 GetFuncMask() const;
void FillLabelData( ScDPLabelData& rLabelData ) const;
@@ -114,14 +116,14 @@ private:
DECL_LINK( ClickHdl, PushButton* );
private:
- RadioButton* mpRbNone;
- RadioButton* mpRbAuto;
- RadioButton* mpRbUser;
- ScDPFunctionListBox* mpLbFunc;
- FixedText* mpFtName;
- CheckBox* mpCbShowAll;
- OKButton* mpBtnOk;
- PushButton* mpBtnOptions;
+ VclPtr<RadioButton> mpRbNone;
+ VclPtr<RadioButton> mpRbAuto;
+ VclPtr<RadioButton> mpRbUser;
+ VclPtr<ScDPFunctionListBox> mpLbFunc;
+ VclPtr<FixedText> mpFtName;
+ VclPtr<CheckBox> mpCbShowAll;
+ VclPtr<OKButton> mpBtnOk;
+ VclPtr<PushButton> mpBtnOptions;
ScDPObject& mrDPObj; /// The DataPilot object (for member names).
const ScDPNameVec& mrDataFields; /// The list of all data field names.
@@ -136,7 +138,8 @@ public:
explicit ScDPSubtotalOptDlg( vcl::Window* pParent, ScDPObject& rDPObj,
const ScDPLabelData& rLabelData, const ScDPNameVec& rDataFields,
bool bEnableLayout );
-
+ virtual ~ScDPSubtotalOptDlg();
+ virtual void dispose() SAL_OVERRIDE;
void FillLabelData( ScDPLabelData& rLabelData ) const;
private:
@@ -153,25 +156,25 @@ private:
DECL_LINK( SelectHdl, ListBox* );
private:
- ListBox* m_pLbSortBy;
- RadioButton* m_pRbSortAsc;
- RadioButton* m_pRbSortDesc;
- RadioButton* m_pRbSortMan;
- VclContainer* m_pLayoutFrame;
- ListBox* m_pLbLayout;
- CheckBox* m_pCbLayoutEmpty;
- CheckBox* m_pCbRepeatItemLabels;
- CheckBox* m_pCbShow;
- NumericField* m_pNfShow;
- FixedText* m_pFtShow;
- FixedText* m_pFtShowFrom;
- ListBox* m_pLbShowFrom;
- FixedText* m_pFtShowUsing;
- ListBox* m_pLbShowUsing;
- VclContainer* m_pHideFrame;
- SvxCheckListBox* m_pLbHide;
- FixedText* m_pFtHierarchy;
- ListBox* m_pLbHierarchy;
+ VclPtr<ListBox> m_pLbSortBy;
+ VclPtr<RadioButton> m_pRbSortAsc;
+ VclPtr<RadioButton> m_pRbSortDesc;
+ VclPtr<RadioButton> m_pRbSortMan;
+ VclPtr<VclContainer> m_pLayoutFrame;
+ VclPtr<ListBox> m_pLbLayout;
+ VclPtr<CheckBox> m_pCbLayoutEmpty;
+ VclPtr<CheckBox> m_pCbRepeatItemLabels;
+ VclPtr<CheckBox> m_pCbShow;
+ VclPtr<NumericField> m_pNfShow;
+ VclPtr<FixedText> m_pFtShow;
+ VclPtr<FixedText> m_pFtShowFrom;
+ VclPtr<ListBox> m_pLbShowFrom;
+ VclPtr<FixedText> m_pFtShowUsing;
+ VclPtr<ListBox> m_pLbShowUsing;
+ VclPtr<VclContainer> m_pHideFrame;
+ VclPtr<SvxCheckListBox> m_pLbHide;
+ VclPtr<FixedText> m_pFtHierarchy;
+ VclPtr<ListBox> m_pLbHierarchy;
boost::scoped_ptr<ScDPListBoxWrapper> m_xLbLayoutWrp; /// Wrapper for direct usage of API constants.
boost::scoped_ptr<ScDPListBoxWrapper> m_xLbShowFromWrp; /// Wrapper for direct usage of API constants.
@@ -187,7 +190,8 @@ class ScDPShowDetailDlg : public ModalDialog
{
public:
explicit ScDPShowDetailDlg( vcl::Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient );
-
+ virtual ~ScDPShowDetailDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
/**
@@ -201,8 +205,8 @@ private:
DECL_LINK( DblClickHdl, ListBox* );
private:
- ListBox* mpLbDims;
- OKButton* mpBtnOk;
+ VclPtr<ListBox> mpLbDims;
+ VclPtr<OKButton> mpBtnOk;
typedef std::unordered_map<OUString, long, OUStringHash> DimNameIndexMap;
DimNameIndexMap maNameIndexMap;
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index 1388bde13b5b..650ac840d8b7 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -173,7 +173,7 @@ class SC_DLLPUBLIC ScValidityRefChildWin : public SfxChildWindow
{
bool m_bVisibleLock:1;
bool m_bFreeWindowLock:1;
- vcl::Window * m_pSavedWndParent;
+ VclPtr<vcl::Window> m_pSavedWndParent;
public:
ScValidityRefChildWin( vcl::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* );
SFX_DECL_CHILDWINDOW_WITHID(ScValidityRefChildWin);
diff --git a/sc/source/ui/inc/retypepassdlg.hxx b/sc/source/ui/inc/retypepassdlg.hxx
index 2763202b0395..8c746c1438f0 100644
--- a/sc/source/ui/inc/retypepassdlg.hxx
+++ b/sc/source/ui/inc/retypepassdlg.hxx
@@ -46,6 +46,7 @@ public:
explicit ScRetypePassDlg(vcl::Window* pParent);
virtual ~ScRetypePassDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
@@ -71,12 +72,12 @@ private:
void DeleteSheets();
private:
- OKButton* mpBtnOk;
- FixedText* mpTextDocStatus;
- PushButton* mpBtnRetypeDoc;
- VclVBox* mpSheetsBox;
+ VclPtr<OKButton> mpBtnOk;
+ VclPtr<FixedText> mpTextDocStatus;
+ VclPtr<PushButton> mpBtnRetypeDoc;
+ VclPtr<VclVBox> mpSheetsBox;
- std::vector<VclHBox*> maSheets;
+ std::vector<VclPtr<VclHBox>> maSheets;
OUString maTextNotProtected;
OUString maTextNotPassProtected;
@@ -104,6 +105,7 @@ class ScRetypePassInputDlg : public ModalDialog
public:
explicit ScRetypePassInputDlg(vcl::Window* pParent, ScPassHashProtectable* pProtected);
virtual ~ScRetypePassInputDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
@@ -117,17 +119,17 @@ private:
void CheckPasswordInput();
private:
- OKButton* m_pBtnOk;
+ VclPtr<OKButton> m_pBtnOk;
- RadioButton* m_pBtnRetypePassword;
+ VclPtr<RadioButton> m_pBtnRetypePassword;
- VclContainer* m_pPasswordGrid;
- Edit* m_pPassword1Edit;
- Edit* m_pPassword2Edit;
+ VclPtr<VclContainer> m_pPasswordGrid;
+ VclPtr<Edit> m_pPassword1Edit;
+ VclPtr<Edit> m_pPassword2Edit;
- CheckBox* m_pBtnMatchOldPass;
+ VclPtr<CheckBox> m_pBtnMatchOldPass;
- RadioButton* m_pBtnRemovePassword;
+ VclPtr<RadioButton> m_pBtnRemovePassword;
DECL_LINK( OKHdl, void* );
DECL_LINK( RadioBtnHdl, RadioButton* );
diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx
index 2675f3b346a3..96bc48d9add2 100644
--- a/sc/source/ui/inc/scendlg.hxx
+++ b/sc/source/ui/inc/scendlg.hxx
@@ -31,7 +31,8 @@ class ScNewScenarioDlg : public ModalDialog
{
public:
ScNewScenarioDlg(vcl::Window* pParent, const OUString& rName, bool bEdit = false, bool bSheetProtected = false);
-
+ virtual ~ScNewScenarioDlg();
+ virtual void dispose() SAL_OVERRIDE;
void SetScenarioData( const OUString& rName, const OUString& rComment,
const Color& rColor, sal_uInt16 nFlags );
@@ -39,14 +40,14 @@ public:
Color& rColor, sal_uInt16& rFlags ) const;
private:
- Edit* m_pEdName;
- VclMultiLineEdit* m_pEdComment;
- CheckBox* m_pCbShowFrame;
- ColorListBox* m_pLbColor;
- CheckBox* m_pCbTwoWay;
- CheckBox* m_pCbCopyAll;
- CheckBox* m_pCbProtect;
- OKButton* m_pBtnOk;
+ VclPtr<Edit> m_pEdName;
+ VclPtr<VclMultiLineEdit> m_pEdComment;
+ VclPtr<CheckBox> m_pCbShowFrame;
+ VclPtr<ColorListBox> m_pLbColor;
+ VclPtr<CheckBox> m_pCbTwoWay;
+ VclPtr<CheckBox> m_pCbCopyAll;
+ VclPtr<CheckBox> m_pCbProtect;
+ VclPtr<OKButton> m_pBtnOk;
const OUString aDefScenarioName;
bool bIsEdit;
diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx
index ed01e23b6955..c05237a49984 100644
--- a/sc/source/ui/inc/scuiasciiopt.hxx
+++ b/sc/source/ui/inc/scuiasciiopt.hxx
@@ -32,38 +32,38 @@ class ScImportAsciiDlg : public ModalDialog
OUString maPreviewLine[ CSV_PREVIEW_LINES ];
- FixedText* pFtCharSet;
+ VclPtr<FixedText> pFtCharSet;
- SvxTextEncodingBox* pLbCharSet;
+ VclPtr<SvxTextEncodingBox> pLbCharSet;
- FixedText* pFtCustomLang;
+ VclPtr<FixedText> pFtCustomLang;
- SvxLanguageBox* pLbCustomLang;
+ VclPtr<SvxLanguageBox> pLbCustomLang;
- FixedText* pFtRow;
- NumericField* pNfRow;
+ VclPtr<FixedText> pFtRow;
+ VclPtr<NumericField> pNfRow;
- RadioButton* pRbFixed;
- RadioButton* pRbSeparated;
+ VclPtr<RadioButton> pRbFixed;
+ VclPtr<RadioButton> pRbSeparated;
- CheckBox* pCkbTab;
- CheckBox* pCkbSemicolon;
- CheckBox* pCkbComma;
- CheckBox* pCkbSpace;
- CheckBox* pCkbOther;
- Edit* pEdOther;
- CheckBox* pCkbAsOnce;
+ VclPtr<CheckBox> pCkbTab;
+ VclPtr<CheckBox> pCkbSemicolon;
+ VclPtr<CheckBox> pCkbComma;
+ VclPtr<CheckBox> pCkbSpace;
+ VclPtr<CheckBox> pCkbOther;
+ VclPtr<Edit> pEdOther;
+ VclPtr<CheckBox> pCkbAsOnce;
- FixedText* pFtTextSep;
- ComboBox* pCbTextSep;
+ VclPtr<FixedText> pFtTextSep;
+ VclPtr<ComboBox> pCbTextSep;
- CheckBox* pCkbQuotedAsText;
- CheckBox* pCkbDetectNumber;
+ VclPtr<CheckBox> pCkbQuotedAsText;
+ VclPtr<CheckBox> pCkbDetectNumber;
- FixedText* pFtType;
- ListBox* pLbType;
+ VclPtr<FixedText> pFtType;
+ VclPtr<ListBox> pLbType;
- ScCsvTableBox* mpTableBox;
+ VclPtr<ScCsvTableBox> mpTableBox;
OUString aCharSetUser;
OUString aColumnUser;
diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx
index b0460bb2bbbe..10bfe1f98752 100644
--- a/sc/source/ui/inc/scuiautofmt.hxx
+++ b/sc/source/ui/inc/scuiautofmt.hxx
@@ -27,24 +27,26 @@ public:
ScAutoFormat* pAutoFormat,
const ScAutoFormatData* pSelFormatData,
ScViewData *pViewData);
+ virtual ~ScAutoFormatDlg();
+ virtual void dispose() SAL_OVERRIDE;
sal_uInt16 GetIndex() const { return nIndex; }
OUString GetCurrFormatName();
private:
- ListBox* m_pLbFormat;
- ScAutoFmtPreview* m_pWndPreview;
- OKButton* m_pBtnOk;
- CancelButton* m_pBtnCancel;
- PushButton* m_pBtnAdd;
- PushButton* m_pBtnRemove;
- PushButton* m_pBtnRename;
- CheckBox* m_pBtnNumFormat;
- CheckBox* m_pBtnBorder;
- CheckBox* m_pBtnFont;
- CheckBox* m_pBtnPattern;
- CheckBox* m_pBtnAlignment;
- CheckBox* m_pBtnAdjust;
+ VclPtr<ListBox> m_pLbFormat;
+ VclPtr<ScAutoFmtPreview> m_pWndPreview;
+ VclPtr<OKButton> m_pBtnOk;
+ VclPtr<CancelButton> m_pBtnCancel;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnRemove;
+ VclPtr<PushButton> m_pBtnRename;
+ VclPtr<CheckBox> m_pBtnNumFormat;
+ VclPtr<CheckBox> m_pBtnBorder;
+ VclPtr<CheckBox> m_pBtnFont;
+ VclPtr<CheckBox> m_pBtnPattern;
+ VclPtr<CheckBox> m_pBtnAlignment;
+ VclPtr<CheckBox> m_pBtnAdjust;
OUString aStrTitle;
OUString aStrLabel;
OUString aStrClose;
diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx
index 95ca0cf94fd9..348d27878dae 100644
--- a/sc/source/ui/inc/scuiimoptdlg.hxx
+++ b/sc/source/ui/inc/scuiimoptdlg.hxx
@@ -42,18 +42,18 @@ public:
void GetImportOptions( ScImportOptions& rOptions ) const;
private:
- VclFrame* m_pFieldFrame;
- FixedText* m_pFtCharset;
- SvxTextEncodingBox* m_pLbCharset;
- FixedText* m_pFtFieldSep;
- ComboBox* m_pEdFieldSep;
- FixedText* m_pFtTextSep;
- ComboBox* m_pEdTextSep;
- CheckBox* m_pCbShown;
- CheckBox* m_pCbFormulas;
- CheckBox* m_pCbQuoteAll;
- CheckBox* m_pCbFixed;
- OKButton* m_pBtnOk;
+ VclPtr<VclFrame> m_pFieldFrame;
+ VclPtr<FixedText> m_pFtCharset;
+ VclPtr<SvxTextEncodingBox> m_pLbCharset;
+ VclPtr<FixedText> m_pFtFieldSep;
+ VclPtr<ComboBox> m_pEdFieldSep;
+ VclPtr<FixedText> m_pFtTextSep;
+ VclPtr<ComboBox> m_pEdTextSep;
+ VclPtr<CheckBox> m_pCbShown;
+ VclPtr<CheckBox> m_pCbFormulas;
+ VclPtr<CheckBox> m_pCbQuoteAll;
+ VclPtr<CheckBox> m_pCbFixed;
+ VclPtr<OKButton> m_pBtnOk;
ScDelimiterTable* pFieldSepTab;
ScDelimiterTable* pTextSepTab;
diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx
index b2d133c2cdb8..846ba51aa285 100644
--- a/sc/source/ui/inc/scuitphfedit.hxx
+++ b/sc/source/ui/inc/scuitphfedit.hxx
@@ -57,29 +57,30 @@ protected:
sal_uInt16 nWhich,
bool bHeader );
virtual ~ScHFEditPage();
+ virtual void dispose() SAL_OVERRIDE;
private:
- ScEditWindow* m_pWndLeft;
- ScEditWindow* m_pWndCenter;
- ScEditWindow* m_pWndRight;
- FixedText* m_pFtDefinedHF;
- ListBox* m_pLbDefined;
- FixedText* m_pFtCustomHF;
- PushButton* m_pBtnText;
- ScExtIButton* m_pBtnFile;
- PushButton* m_pBtnTable;
- PushButton* m_pBtnPage;
- PushButton* m_pBtnLastPage;
- PushButton* m_pBtnDate;
- PushButton* m_pBtnTime;
-
- FixedText* m_pFtConfidential;
- FixedText* m_pFtPage;
- FixedText* m_pFtOfQuestion;
- FixedText* m_pFtOf;
- FixedText* m_pFtNone;
- FixedText* m_pFtCreatedBy;
- FixedText* m_pFtCustomized;
+ VclPtr<ScEditWindow> m_pWndLeft;
+ VclPtr<ScEditWindow> m_pWndCenter;
+ VclPtr<ScEditWindow> m_pWndRight;
+ VclPtr<FixedText> m_pFtDefinedHF;
+ VclPtr<ListBox> m_pLbDefined;
+ VclPtr<FixedText> m_pFtCustomHF;
+ VclPtr<PushButton> m_pBtnText;
+ VclPtr<ScExtIButton> m_pBtnFile;
+ VclPtr<PushButton> m_pBtnTable;
+ VclPtr<PushButton> m_pBtnPage;
+ VclPtr<PushButton> m_pBtnLastPage;
+ VclPtr<PushButton> m_pBtnDate;
+ VclPtr<PushButton> m_pBtnTime;
+
+ VclPtr<FixedText> m_pFtConfidential;
+ VclPtr<FixedText> m_pFtPage;
+ VclPtr<FixedText> m_pFtOfQuestion;
+ VclPtr<FixedText> m_pFtOf;
+ VclPtr<FixedText> m_pFtNone;
+ VclPtr<FixedText> m_pFtCreatedBy;
+ VclPtr<FixedText> m_pFtCustomized;
sal_uInt16 nWhich;
OUString aCmdArr[6];
diff --git a/sc/source/ui/inc/searchresults.hxx b/sc/source/ui/inc/searchresults.hxx
index 5c69ab7e63ed..22af42940f1c 100644
--- a/sc/source/ui/inc/searchresults.hxx
+++ b/sc/source/ui/inc/searchresults.hxx
@@ -21,7 +21,7 @@ namespace sc {
class SearchResultsDlg : public ModelessDialog
{
- SvSimpleTable *mpList;
+ VclPtr<SvSimpleTable> mpList;
SfxBindings* mpBindings;
ScDocument* mpDoc;
diff --git a/sc/source/ui/inc/sharedocdlg.hxx b/sc/source/ui/inc/sharedocdlg.hxx
index 8356d0e6b8e8..41f53111b40a 100644
--- a/sc/source/ui/inc/sharedocdlg.hxx
+++ b/sc/source/ui/inc/sharedocdlg.hxx
@@ -33,9 +33,9 @@ class ScDocShell;
class ScShareDocumentDlg : public ModalDialog
{
private:
- CheckBox* m_pCbShare;
- FixedText* m_pFtWarning;
- SvSimpleTable* m_pLbUsers;
+ VclPtr<CheckBox> m_pCbShare;
+ VclPtr<FixedText> m_pFtWarning;
+ VclPtr<SvSimpleTable> m_pLbUsers;
OUString m_aStrNoUserData;
OUString m_aStrUnknownUser;
diff --git a/sc/source/ui/inc/shtabdlg.hxx b/sc/source/ui/inc/shtabdlg.hxx
index 6c55a64d51f7..d0109a2735d4 100644
--- a/sc/source/ui/inc/shtabdlg.hxx
+++ b/sc/source/ui/inc/shtabdlg.hxx
@@ -28,13 +28,15 @@
class ScShowTabDlg : public ModalDialog
{
private:
- VclFrame* m_pFrame;
- ListBox* m_pLb;
+ VclPtr<VclFrame> m_pFrame;
+ VclPtr<ListBox> m_pLb;
DECL_LINK( DblClkHdl, void * );
public:
ScShowTabDlg( vcl::Window* pParent );
+ virtual ~ScShowTabDlg();
+ virtual void dispose() SAL_OVERRIDE;
/** Sets dialog title, fixed text for listbox and help IDs. */
void SetDescription(
diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx
index a78a9e13ed5a..9a4d66c3a173 100644
--- a/sc/source/ui/inc/simpref.hxx
+++ b/sc/source/ui/inc/simpref.hxx
@@ -40,12 +40,12 @@ private:
Link aAbortedHdl;
Link aChangeHdl;
- FixedText* m_pFtAssign;
- formula::RefEdit* m_pEdAssign;
- formula::RefButton* m_pRbAssign;
+ VclPtr<FixedText> m_pFtAssign;
+ VclPtr<formula::RefEdit> m_pEdAssign;
+ VclPtr<formula::RefButton> m_pRbAssign;
- OKButton* m_pBtnOk;
- CancelButton* m_pBtnCancel;
+ VclPtr<OKButton> m_pBtnOk;
+ VclPtr<CancelButton> m_pBtnCancel;
ScRange theCurArea;
bool bCloseFlag;
@@ -66,6 +66,7 @@ protected:
public:
ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent);
virtual ~ScSimpleRefDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/solveroptions.hxx b/sc/source/ui/inc/solveroptions.hxx
index 31607f4e3c55..28e557e08b3f 100644
--- a/sc/source/ui/inc/solveroptions.hxx
+++ b/sc/source/ui/inc/solveroptions.hxx
@@ -35,9 +35,9 @@ namespace com { namespace sun { namespace star {
class ScSolverOptionsDialog : public ModalDialog
{
- ListBox* m_pLbEngine;
- SvxCheckListBox* m_pLbSettings;
- PushButton* m_pBtnEdit;
+ VclPtr<ListBox> m_pLbEngine;
+ VclPtr<SvxCheckListBox> m_pLbSettings;
+ VclPtr<PushButton> m_pBtnEdit;
SvLBoxButtonData* mpCheckButtonData;
com::sun::star::uno::Sequence<OUString> maImplNames;
@@ -70,11 +70,13 @@ public:
class ScSolverIntegerDialog : public ModalDialog
{
- VclFrame* m_pFrame;
- NumericField* m_pNfValue;
+ VclPtr<VclFrame> m_pFrame;
+ VclPtr<NumericField> m_pNfValue;
public:
ScSolverIntegerDialog( vcl::Window * pParent );
+ virtual ~ScSolverIntegerDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetOptionName( const OUString& rName );
void SetValue( sal_Int32 nValue );
@@ -83,11 +85,13 @@ public:
class ScSolverValueDialog : public ModalDialog
{
- VclFrame* m_pFrame;
- Edit* m_pEdValue;
+ VclPtr<VclFrame> m_pFrame;
+ VclPtr<Edit> m_pEdValue;
public:
ScSolverValueDialog( vcl::Window * pParent );
+ virtual ~ScSolverValueDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetOptionName( const OUString& rName );
void SetValue( double fValue );
diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx
index 2799c58975a8..253067a20d95 100644
--- a/sc/source/ui/inc/solvrdlg.hxx
+++ b/sc/source/ui/inc/solvrdlg.hxx
@@ -42,6 +42,7 @@ public:
ScDocument* pDocument,
ScAddress aCursorPos );
virtual ~ScSolverDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
virtual bool IsRefInputMode() const SAL_OVERRIDE;
@@ -49,18 +50,18 @@ public:
virtual bool Close() SAL_OVERRIDE;
private:
- FixedText* m_pFtFormulaCell;
- formula::RefEdit* m_pEdFormulaCell;
- formula::RefButton* m_pRBFormulaCell;
+ VclPtr<FixedText> m_pFtFormulaCell;
+ VclPtr<formula::RefEdit> m_pEdFormulaCell;
+ VclPtr<formula::RefButton> m_pRBFormulaCell;
- Edit* m_pEdTargetVal;
+ VclPtr<Edit> m_pEdTargetVal;
- FixedText* m_pFtVariableCell;
- formula::RefEdit* m_pEdVariableCell;
- formula::RefButton* m_pRBVariableCell;
+ VclPtr<FixedText> m_pFtVariableCell;
+ VclPtr<formula::RefEdit> m_pEdVariableCell;
+ VclPtr<formula::RefButton> m_pRBVariableCell;
- OKButton* m_pBtnOk;
- CancelButton* m_pBtnCancel;
+ VclPtr<OKButton> m_pBtnOk;
+ VclPtr<CancelButton> m_pBtnCancel;
ScAddress theFormulaCell;
ScAddress theVariableCell;
@@ -68,7 +69,7 @@ private:
ScDocument* pDoc;
const SCTAB nCurTab;
- formula::RefEdit* pEdActive;
+ VclPtr<formula::RefEdit> pEdActive;
bool bDlgLostFocus;
const OUString errMsgInvalidVar;
const OUString errMsgInvalidForm;
diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx
index d627f02623bb..c514aaffd8e9 100644
--- a/sc/source/ui/inc/sortdlg.hxx
+++ b/sc/source/ui/inc/sortdlg.hxx
@@ -45,11 +45,13 @@ class ScSortWarningDlg : public ModalDialog
{
public:
ScSortWarningDlg( vcl::Window* pParent, const OUString& rExtendText,const OUString& rCurrentText );
+ virtual ~ScSortWarningDlg();
+ virtual void dispose() SAL_OVERRIDE;
DECL_LINK( BtnHdl, PushButton* );
private:
- FixedText* aFtText;
- PushButton* aBtnExtSort;
- PushButton* aBtnCurSort;
+ VclPtr<FixedText> aFtText;
+ VclPtr<PushButton> aBtnExtSort;
+ VclPtr<PushButton> aBtnCurSort;
};
#endif // INCLUDED_SC_SOURCE_UI_INC_SORTDLG_HXX
diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx
index 5c9c1fa833bc..a0a027c0f81d 100644
--- a/sc/source/ui/inc/sortkeydlg.hxx
+++ b/sc/source/ui/inc/sortkeydlg.hxx
@@ -25,11 +25,11 @@
struct ScSortKeyItem : public VclBuilderContainer
{
- VclFrame* m_pFrame;
- FixedText* m_pFlSort;
- ListBox* m_pLbSort;
- RadioButton* m_pBtnUp;
- RadioButton* m_pBtnDown;
+ VclPtr<VclFrame> m_pFrame;
+ VclPtr<FixedText> m_pFlSort;
+ VclPtr<ListBox> m_pLbSort;
+ VclPtr<RadioButton> m_pBtnUp;
+ VclPtr<RadioButton> m_pBtnDown;
ScSortKeyItem(vcl::Window* pParent);
@@ -44,7 +44,7 @@ typedef boost::ptr_vector<ScSortKeyItem> ScSortKeyItems;
class ScSortKeyWindow
{
private:
- VclBox* m_pBox;
+ VclPtr<VclBox> m_pBox;
sal_Int32 nItemHeight;
ScSortKeyItems& mrSortKeyItems;
diff --git a/sc/source/ui/inc/strindlg.hxx b/sc/source/ui/inc/strindlg.hxx
index 367d32d8811e..1863869203fb 100644
--- a/sc/source/ui/inc/strindlg.hxx
+++ b/sc/source/ui/inc/strindlg.hxx
@@ -32,15 +32,16 @@ public:
const OUString& rEditTitle,
const OUString& rDefault,
const OString& sHelpId, const OString& sEditHelpId);
-
+ virtual ~ScStringInputDlg();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetInputString() const
{
return m_pEdInput->GetText();
}
private:
- FixedText* m_pFtEditTitle;
- Edit* m_pEdInput;
+ VclPtr<FixedText> m_pFtEditTitle;
+ VclPtr<Edit> m_pEdInput;
};
#endif // INCLUDED_SC_SOURCE_UI_INC_STRINDLG_HXX
diff --git a/sc/source/ui/inc/subtdlg.hxx b/sc/source/ui/inc/subtdlg.hxx
index 6496689d3a75..749e9d94dfcb 100644
--- a/sc/source/ui/inc/subtdlg.hxx
+++ b/sc/source/ui/inc/subtdlg.hxx
@@ -28,8 +28,10 @@ class ScSubTotalDlg : public SfxTabDialog
{
public:
ScSubTotalDlg(vcl::Window* pParent, const SfxItemSet* pArgSet);
+ virtual ~ScSubTotalDlg();
+ virtual void dispose() SAL_OVERRIDE;
private:
- PushButton* m_pBtnRemove;
+ VclPtr<PushButton> m_pBtnRemove;
DECL_LINK( RemoveHdl, PushButton * );
};
diff --git a/sc/source/ui/inc/tabbgcolordlg.hxx b/sc/source/ui/inc/tabbgcolordlg.hxx
index 40dcca180920..122f112c068b 100644
--- a/sc/source/ui/inc/tabbgcolordlg.hxx
+++ b/sc/source/ui/inc/tabbgcolordlg.hxx
@@ -33,6 +33,8 @@ public:
const OUString& rTabBgColorNoColorText,
const Color& rDefaultColor,
const OString& nHelpId );
+ virtual ~ScTabBgColorDlg();
+ virtual void dispose() SAL_OVERRIDE;
void GetSelectedColor( Color& rColor ) const;
@@ -40,6 +42,9 @@ public:
{
public:
ScTabBgColorValueSet(vcl::Window* pParent, WinBits nStyle);
+ virtual ~ScTabBgColorValueSet();
+ virtual void dispose() SAL_OVERRIDE;
+
void SetDialog(ScTabBgColorDlg* pTabBgColorDlg)
{
m_pTabBgColorDlg = pTabBgColorDlg;
@@ -47,12 +52,12 @@ public:
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
private:
- ScTabBgColorDlg* m_pTabBgColorDlg;
+ VclPtr<ScTabBgColorDlg> m_pTabBgColorDlg;
};
private:
- ScTabBgColorValueSet* m_pTabBgColorSet;
- OKButton* m_pBtnOk;
+ VclPtr<ScTabBgColorValueSet> m_pTabBgColorSet;
+ VclPtr<OKButton> m_pBtnOk;
Color m_aTabBgColor;
const OUString m_aTabBgColorNoColorText;
diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx
index a1806c1153c9..33c247f7cfcd 100644
--- a/sc/source/ui/inc/tabopdlg.hxx
+++ b/sc/source/ui/inc/tabopdlg.hxx
@@ -44,6 +44,7 @@ public:
ScDocument* pDocument,
const ScRefAddress& rCursorPos );
virtual ~ScTabOpDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
virtual bool IsRefInputMode() const SAL_OVERRIDE { return true; }
@@ -52,20 +53,20 @@ public:
virtual bool Close() SAL_OVERRIDE;
private:
- FixedText* m_pFtFormulaRange;
- formula::RefEdit* m_pEdFormulaRange;
- formula::RefButton* m_pRBFormulaRange;
+ VclPtr<FixedText> m_pFtFormulaRange;
+ VclPtr<formula::RefEdit> m_pEdFormulaRange;
+ VclPtr<formula::RefButton> m_pRBFormulaRange;
- FixedText* m_pFtRowCell;
- formula::RefEdit* m_pEdRowCell;
- formula::RefButton* m_pRBRowCell;
+ VclPtr<FixedText> m_pFtRowCell;
+ VclPtr<formula::RefEdit> m_pEdRowCell;
+ VclPtr<formula::RefButton> m_pRBRowCell;
- FixedText* m_pFtColCell;
- formula::RefEdit* m_pEdColCell;
- formula::RefButton* m_pRBColCell;
+ VclPtr<FixedText> m_pFtColCell;
+ VclPtr<formula::RefEdit> m_pEdColCell;
+ VclPtr<formula::RefButton> m_pRBColCell;
- OKButton* m_pBtnOk;
- CancelButton* m_pBtnCancel;
+ VclPtr<OKButton> m_pBtnOk;
+ VclPtr<CancelButton> m_pBtnCancel;
ScRefAddress theFormulaCell;
ScRefAddress theFormulaEnd;
@@ -74,7 +75,7 @@ private:
ScDocument* pDoc;
const SCTAB nCurTab;
- formula::RefEdit* pEdActive;
+ VclPtr<formula::RefEdit> pEdActive;
bool bDlgLostFocus;
const OUString errMsgNoFormula;
const OUString errMsgNoColRow;
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
index 954232033c97..f31f93a0300c 100644
--- a/sc/source/ui/inc/tabpages.hxx
+++ b/sc/source/ui/inc/tabpages.hxx
@@ -34,6 +34,9 @@ public:
virtual bool FillItemSet ( SfxItemSet* rCoreAttrs ) SAL_OVERRIDE;
virtual void Reset ( const SfxItemSet* ) SAL_OVERRIDE;
+ virtual ~ScTabPageProtection();
+ virtual void dispose() SAL_OVERRIDE;
+
protected:
using SfxTabPage::DeactivatePage;
virtual int DeactivatePage ( SfxItemSet* pSet = NULL ) SAL_OVERRIDE;
@@ -42,10 +45,10 @@ private:
ScTabPageProtection( vcl::Window* pParent,
const SfxItemSet& rCoreAttrs );
private:
- TriStateBox* m_pBtnHideCell;
- TriStateBox* m_pBtnProtect;
- TriStateBox* m_pBtnHideFormula;
- TriStateBox* m_pBtnHidePrint;
+ VclPtr<TriStateBox> m_pBtnHideCell;
+ VclPtr<TriStateBox> m_pBtnProtect;
+ VclPtr<TriStateBox> m_pBtnHideFormula;
+ VclPtr<TriStateBox> m_pBtnHidePrint;
// current status:
bool bTriEnabled; // if before - DontCare
bool bDontCare; // all in TriState
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 4de0a1fdec8f..37aed5580bf7 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -87,7 +87,7 @@ class ScTabView : boost::noncopyable
private:
enum BlockMode { None = 0, Normal = 1, Own = 2 };
- vcl::Window* pFrameWin; // First !!!
+ VclPtr<vcl::Window> pFrameWin; // First !!!
ScViewData aViewData; // must be at the front !
ScViewSelectionEngine* pSelEngine;
@@ -109,9 +109,9 @@ private:
ScRowBar* pRowBar[2];
ScOutlineWindow* pColOutline[2];
ScOutlineWindow* pRowOutline[2];
- ScTabSplitter* pHSplitter;
- ScTabSplitter* pVSplitter;
- ScTabControl* pTabControl;
+ VclPtr<ScTabSplitter> pHSplitter;
+ VclPtr<ScTabSplitter> pVSplitter;
+ VclPtr<ScTabControl> pTabControl;
VclPtr<ScrollBar> aVScrollTop;
VclPtr<ScrollBar> aVScrollBottom; // initially visible
VclPtr<ScrollBar> aHScrollLeft; // initially visible
@@ -129,7 +129,7 @@ private:
SfxItemSet* pDrawBrushSet; // drawing object attributes for paint brush
Timer aScrollTimer;
- ScGridWindow* pTimerWindow;
+ VclPtr<ScGridWindow> pTimerWindow;
MouseEvent aTimerMEvt;
sal_uLong nTipVisible;
diff --git a/sc/source/ui/inc/textimportoptions.hxx b/sc/source/ui/inc/textimportoptions.hxx
index b944ce19a8d3..d7c8a5dec970 100644
--- a/sc/source/ui/inc/textimportoptions.hxx
+++ b/sc/source/ui/inc/textimportoptions.hxx
@@ -31,7 +31,7 @@ class ScTextImportOptionsDlg : public ModalDialog
public:
ScTextImportOptionsDlg(vcl::Window* pParent);
virtual ~ScTextImportOptionsDlg();
-
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
LanguageType getLanguageType() const;
@@ -41,14 +41,14 @@ private:
void init();
private:
- OKButton* m_pBtnOk;
+ VclPtr<OKButton> m_pBtnOk;
- RadioButton* m_pRbAutomatic;
- RadioButton* m_pRbCustom;
+ VclPtr<RadioButton> m_pRbAutomatic;
+ VclPtr<RadioButton> m_pRbCustom;
- SvxLanguageBox* m_pLbCustomLang;
+ VclPtr<SvxLanguageBox> m_pLbCustomLang;
- CheckBox* m_pBtnConvertDate;
+ VclPtr<CheckBox> m_pBtnConvertDate;
DECL_LINK(OKHdl, void *);
diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx
index 9727b1c39a5d..0de929a801ee 100644
--- a/sc/source/ui/inc/tpcalc.hxx
+++ b/sc/source/ui/inc/tpcalc.hxx
@@ -46,25 +46,25 @@ private:
virtual void dispose() SAL_OVERRIDE;
private:
- CheckBox* m_pBtnIterate;
- FixedText* m_pFtSteps;
- NumericField* m_pEdSteps;
- FixedText* m_pFtEps;
- ScDoubleField* m_pEdEps;
+ VclPtr<CheckBox> m_pBtnIterate;
+ VclPtr<FixedText> m_pFtSteps;
+ VclPtr<NumericField> m_pEdSteps;
+ VclPtr<FixedText> m_pFtEps;
+ VclPtr<ScDoubleField> m_pEdEps;
- RadioButton* m_pBtnDateStd;
- RadioButton* m_pBtnDateSc10;
- RadioButton* m_pBtnDate1904;
+ VclPtr<RadioButton> m_pBtnDateStd;
+ VclPtr<RadioButton> m_pBtnDateSc10;
+ VclPtr<RadioButton> m_pBtnDate1904;
- CheckBox* m_pBtnCase;
- CheckBox* m_pBtnCalc;
- CheckBox* m_pBtnMatch;
- CheckBox* m_pBtnRegex;
- CheckBox* m_pBtnLookUp;
- CheckBox* m_pBtnGeneralPrec;
+ VclPtr<CheckBox> m_pBtnCase;
+ VclPtr<CheckBox> m_pBtnCalc;
+ VclPtr<CheckBox> m_pBtnMatch;
+ VclPtr<CheckBox> m_pBtnRegex;
+ VclPtr<CheckBox> m_pBtnLookUp;
+ VclPtr<CheckBox> m_pBtnGeneralPrec;
- FixedText* m_pFtPrec;
- NumericField* m_pEdPrec;
+ VclPtr<FixedText> m_pFtPrec;
+ VclPtr<NumericField> m_pEdPrec;
ScDocOptions* pOldOptions;
ScDocOptions* pLocalOptions;
diff --git a/sc/source/ui/inc/tpcompatibility.hxx b/sc/source/ui/inc/tpcompatibility.hxx
index 6ddeeeca0b1f..f0050aac77ca 100644
--- a/sc/source/ui/inc/tpcompatibility.hxx
+++ b/sc/source/ui/inc/tpcompatibility.hxx
@@ -25,12 +25,12 @@ public:
virtual void Reset(const SfxItemSet* rCoreAttrs) SAL_OVERRIDE;
virtual int DeactivatePage(SfxItemSet* pSet = NULL) SAL_OVERRIDE;
+ virtual ~ScTpCompatOptions();
+ virtual void dispose() SAL_OVERRIDE;
private:
explicit ScTpCompatOptions(vcl::Window* pParent, const SfxItemSet& rCoreAttrs);
- virtual ~ScTpCompatOptions();
-
private:
- ListBox* m_pLbKeyBindings;
+ VclPtr<ListBox> m_pLbKeyBindings;
};
#endif
diff --git a/sc/source/ui/inc/tpdefaults.hxx b/sc/source/ui/inc/tpdefaults.hxx
index 251c3676a391..265171134e76 100644
--- a/sc/source/ui/inc/tpdefaults.hxx
+++ b/sc/source/ui/inc/tpdefaults.hxx
@@ -28,6 +28,7 @@ public:
private:
explicit ScTpDefaultsOptions(vcl::Window* pParent, const SfxItemSet& rCoreSet);
virtual ~ScTpDefaultsOptions();
+ virtual void dispose() SAL_OVERRIDE;
void CheckNumSheets();
void CheckPrefix(Edit* pEdit);
@@ -38,8 +39,8 @@ private:
DECL_LINK( PrefixEditOnFocusHdl, Edit* );
private:
- NumericField* m_pEdNSheets;
- Edit* m_pEdSheetPrefix;
+ VclPtr<NumericField> m_pEdNSheets;
+ VclPtr<Edit> m_pEdSheetPrefix;
// Stores old Sheet Prefix
OUString maOldPrefixValue;
diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx
index adf1c64a8eac..489c0afce5bf 100644
--- a/sc/source/ui/inc/tpformula.hxx
+++ b/sc/source/ui/inc/tpformula.hxx
@@ -42,7 +42,7 @@ public:
private:
explicit ScTpFormulaOptions(vcl::Window* pParent, const SfxItemSet& rCoreSet);
virtual ~ScTpFormulaOptions();
-
+ virtual void dispose() SAL_OVERRIDE;
void ResetSeparators();
void OnFocusSeparatorInput(Edit* pEdit);
void UpdateCustomCalcRadioButtons(bool bDefault);
@@ -56,20 +56,20 @@ private:
DECL_LINK( SepEditOnFocusHdl, Edit* );
private:
- ListBox* mpLbFormulaSyntax;
- CheckBox* mpCbEnglishFuncName;
+ VclPtr<ListBox> mpLbFormulaSyntax;
+ VclPtr<CheckBox> mpCbEnglishFuncName;
- RadioButton* mpBtnCustomCalcDefault;
- RadioButton* mpBtnCustomCalcCustom;
- PushButton* mpBtnCustomCalcDetails;
+ VclPtr<RadioButton> mpBtnCustomCalcDefault;
+ VclPtr<RadioButton> mpBtnCustomCalcCustom;
+ VclPtr<PushButton> mpBtnCustomCalcDetails;
- Edit* mpEdSepFuncArg;
- Edit* mpEdSepArrayCol;
- Edit* mpEdSepArrayRow;
- PushButton* mpBtnSepReset;
+ VclPtr<Edit> mpEdSepFuncArg;
+ VclPtr<Edit> mpEdSepArrayCol;
+ VclPtr<Edit> mpEdSepArrayRow;
+ VclPtr<PushButton> mpBtnSepReset;
- ListBox* mpLbOOXMLRecalcOptions;
- ListBox* mpLbODFRecalcOptions;
+ VclPtr<ListBox> mpLbOOXMLRecalcOptions;
+ VclPtr<ListBox> mpLbODFRecalcOptions;
/** Stores old separator value of currently focused separator edit box.
This value is used to revert undesired value change. */
diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx
index 526aad0f19be..2ffb01878f20 100644
--- a/sc/source/ui/inc/tphf.hxx
+++ b/sc/source/ui/inc/tphf.hxx
@@ -28,12 +28,13 @@ class ScHFPage : public SvxHFPage
{
public:
virtual ~ScHFPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
virtual bool FillItemSet( SfxItemSet* rOutSet ) SAL_OVERRIDE;
void SetPageStyle( const OUString& rName ) { aStrPageStyle = rName; }
- void SetStyleDlg ( const ScStyleDlg* pDlg ) { pStyleDlg = pDlg; }
+ void SetStyleDlg ( ScStyleDlg* pDlg ) { pStyleDlg = pDlg; }
protected:
ScHFPage( vcl::Window* pParent,
@@ -46,11 +47,11 @@ protected:
virtual int DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
private:
- PushButton* m_pBtnEdit;
- SfxItemSet aDataSet;
- OUString aStrPageStyle;
- sal_uInt16 nPageUsage;
- const ScStyleDlg* pStyleDlg;
+ VclPtr<PushButton> m_pBtnEdit;
+ SfxItemSet aDataSet;
+ OUString aStrPageStyle;
+ sal_uInt16 nPageUsage;
+ VclPtr<ScStyleDlg> pStyleDlg;
DECL_LINK(BtnHdl, void *);
DECL_LINK( HFEditHdl, void* );
diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx
index cc987a98adfc..89594382bf45 100644
--- a/sc/source/ui/inc/tpprint.hxx
+++ b/sc/source/ui/inc/tpprint.hxx
@@ -25,14 +25,14 @@
class ScTpPrintOptions : public SfxTabPage
{
- CheckBox* m_pSkipEmptyPagesCB;
- CheckBox* m_pSelectedSheetsCB;
- CheckBox* m_pForceBreaksCB;
+ VclPtr<CheckBox> m_pSkipEmptyPagesCB;
+ VclPtr<CheckBox> m_pSelectedSheetsCB;
+ VclPtr<CheckBox> m_pForceBreaksCB;
ScTpPrintOptions( vcl::Window* pParent, const SfxItemSet& rCoreSet );
- virtual ~ScTpPrintOptions();
-
public:
+ virtual ~ScTpPrintOptions();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rCoreSet );
virtual bool FillItemSet( SfxItemSet* rCoreSet ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* rCoreSet ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 699443960eb6..9dc03c5ad001 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -50,7 +50,7 @@ public:
ScTabPageSortFields( vcl::Window* pParent,
const SfxItemSet& rArgSet );
virtual ~ScTabPageSortFields();
-
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create ( vcl::Window* pParent,
const SfxItemSet* rArgSet );
virtual bool FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE;
@@ -72,7 +72,7 @@ private:
OUString aStrRow;
const sal_uInt16 nWhichSort;
- ScSortDlg* pDlg;
+ VclPtr<ScSortDlg> pDlg;
ScViewData* pViewData;
ScSortParam aSortData;
std::vector<SCCOLROW> nFieldArr;
@@ -126,24 +126,24 @@ protected:
private:
- CheckBox* m_pBtnCase;
- CheckBox* m_pBtnHeader;
- CheckBox* m_pBtnFormats;
- CheckBox* m_pBtnNaturalSort;
+ VclPtr<CheckBox> m_pBtnCase;
+ VclPtr<CheckBox> m_pBtnHeader;
+ VclPtr<CheckBox> m_pBtnFormats;
+ VclPtr<CheckBox> m_pBtnNaturalSort;
- CheckBox* m_pBtnCopyResult;
- ListBox* m_pLbOutPos;
- Edit* m_pEdOutPos;
+ VclPtr<CheckBox> m_pBtnCopyResult;
+ VclPtr<ListBox> m_pLbOutPos;
+ VclPtr<Edit> m_pEdOutPos;
- CheckBox* m_pBtnSortUser;
- ListBox* m_pLbSortUser;
+ VclPtr<CheckBox> m_pBtnSortUser;
+ VclPtr<ListBox> m_pLbSortUser;
- SvxLanguageBox* m_pLbLanguage;
- FixedText* m_pFtAlgorithm;
- ListBox* m_pLbAlgorithm;
+ VclPtr<SvxLanguageBox> m_pLbLanguage;
+ VclPtr<FixedText> m_pFtAlgorithm;
+ VclPtr<ListBox> m_pLbAlgorithm;
- RadioButton* m_pBtnTopDown;
- RadioButton* m_pBtnLeftRight;
+ VclPtr<RadioButton> m_pBtnTopDown;
+ VclPtr<RadioButton> m_pBtnLeftRight;
OUString aStrRowLabel;
OUString aStrColLabel;
@@ -154,7 +154,7 @@ private:
ScSortParam aSortData;
ScViewData* pViewData;
ScDocument* pDoc;
- ScSortDlg* pDlg;
+ VclPtr<ScSortDlg> pDlg;
ScAddress theOutPos;
CollatorResource* pColRes;
diff --git a/sc/source/ui/inc/tpstat.hxx b/sc/source/ui/inc/tpstat.hxx
index 96f141fdbdd8..70bd4395b469 100644
--- a/sc/source/ui/inc/tpstat.hxx
+++ b/sc/source/ui/inc/tpstat.hxx
@@ -28,19 +28,19 @@ class ScDocStatPage: public SfxTabPage
{
public:
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
+ virtual ~ScDocStatPage();
+ virtual void dispose() SAL_OVERRIDE;
private:
ScDocStatPage( vcl::Window *pParent, const SfxItemSet& rSet );
- virtual ~ScDocStatPage();
-
protected:
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void Reset ( const SfxItemSet* rSet ) SAL_OVERRIDE;
private:
- FixedText* m_pFtTables;
- FixedText* m_pFtCells;
- FixedText* m_pFtPages;
+ VclPtr<FixedText> m_pFtTables;
+ VclPtr<FixedText> m_pFtCells;
+ VclPtr<FixedText> m_pFtPages;
};
#endif
diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx
index daf0f532a9a7..df4710113ef1 100644
--- a/sc/source/ui/inc/tpsubt.hxx
+++ b/sc/source/ui/inc/tpsubt.hxx
@@ -48,9 +48,9 @@ public:
bool DoFillItemSet ( sal_uInt16 nGroupNo,
SfxItemSet& rArgSet );
protected:
- ListBox* mpLbGroup;
- SvxCheckListBox* mpLbColumns;
- ListBox* mpLbFunctions;
+ VclPtr<ListBox> mpLbGroup;
+ VclPtr<SvxCheckListBox> mpLbColumns;
+ VclPtr<ListBox> mpLbFunctions;
const OUString aStrNone;
const OUString aStrColumn;
@@ -127,22 +127,22 @@ protected:
public:
virtual ~ScTpSubTotalOptions();
-
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create ( vcl::Window* pParent,
const SfxItemSet* rArgSet );
virtual bool FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE;
virtual void Reset ( const SfxItemSet* rArgSet ) SAL_OVERRIDE;
private:
- CheckBox* pBtnPagebreak;
- CheckBox* pBtnCase;
- CheckBox* pBtnSort;
- FixedText* pFlSort;
- RadioButton* pBtnAscending;
- RadioButton* pBtnDescending;
- CheckBox* pBtnFormats;
- CheckBox* pBtnUserDef;
- ListBox* pLbUserDef;
+ VclPtr<CheckBox> pBtnPagebreak;
+ VclPtr<CheckBox> pBtnCase;
+ VclPtr<CheckBox> pBtnSort;
+ VclPtr<FixedText> pFlSort;
+ VclPtr<RadioButton> pBtnAscending;
+ VclPtr<RadioButton> pBtnDescending;
+ VclPtr<CheckBox> pBtnFormats;
+ VclPtr<CheckBox> pBtnUserDef;
+ VclPtr<ListBox> pLbUserDef;
ScViewData* pViewData;
ScDocument* pDoc;
diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx
index 8c9aada2c7db..26701d604fd1 100644
--- a/sc/source/ui/inc/tptable.hxx
+++ b/sc/source/ui/inc/tptable.hxx
@@ -38,42 +38,42 @@ public:
virtual int DeactivatePage ( SfxItemSet* pSet = NULL ) SAL_OVERRIDE;
virtual void DataChanged ( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
+ virtual ~ScTablePage();
+ virtual void dispose() SAL_OVERRIDE;
private:
ScTablePage( vcl::Window* pParent, const SfxItemSet& rCoreSet );
- virtual ~ScTablePage();
-
void ShowImage();
private:
- RadioButton* m_pBtnTopDown;
- RadioButton* m_pBtnLeftRight;
- FixedImage* m_pBmpPageDir;
- CheckBox* m_pBtnPageNo;
- NumericField* m_pEdPageNo;
+ VclPtr<RadioButton> m_pBtnTopDown;
+ VclPtr<RadioButton> m_pBtnLeftRight;
+ VclPtr<FixedImage> m_pBmpPageDir;
+ VclPtr<CheckBox> m_pBtnPageNo;
+ VclPtr<NumericField> m_pEdPageNo;
- CheckBox* m_pBtnHeaders;
- CheckBox* m_pBtnGrid;
- CheckBox* m_pBtnNotes;
- CheckBox* m_pBtnObjects;
- CheckBox* m_pBtnCharts;
- CheckBox* m_pBtnDrawings;
- CheckBox* m_pBtnFormulas;
- CheckBox* m_pBtnNullVals;
+ VclPtr<CheckBox> m_pBtnHeaders;
+ VclPtr<CheckBox> m_pBtnGrid;
+ VclPtr<CheckBox> m_pBtnNotes;
+ VclPtr<CheckBox> m_pBtnObjects;
+ VclPtr<CheckBox> m_pBtnCharts;
+ VclPtr<CheckBox> m_pBtnDrawings;
+ VclPtr<CheckBox> m_pBtnFormulas;
+ VclPtr<CheckBox> m_pBtnNullVals;
- ListBox* m_pLbScaleMode;
- VclHBox* m_pBxScaleAll;
- MetricField* m_pEdScaleAll;
- VclGrid* m_pGrHeightWidth;
- NumericField* m_pEdScalePageWidth;
- NumericField* m_pEdScalePageHeight;
- VclHBox* m_pBxScalePageNum;
- NumericField* m_pEdScalePageNum;
+ VclPtr<ListBox> m_pLbScaleMode;
+ VclPtr<VclHBox> m_pBxScaleAll;
+ VclPtr<MetricField> m_pEdScaleAll;
+ VclPtr<VclGrid> m_pGrHeightWidth;
+ VclPtr<NumericField> m_pEdScalePageWidth;
+ VclPtr<NumericField> m_pEdScalePageHeight;
+ VclPtr<VclHBox> m_pBxScalePageNum;
+ VclPtr<NumericField> m_pEdScalePageNum;
private:
// Handler:
DECL_LINK(PageDirHdl, void *);
- DECL_LINK( PageNoHdl, CheckBox* );
+ DECL_LINK( PageNoHdl, CheckBox* );
DECL_LINK(ScaleHdl, void *);
};
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index fa0a15453e17..c9833dc7ba40 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -47,22 +47,22 @@ private:
virtual void dispose() SAL_OVERRIDE;
private:
- FixedText* mpFtLists;
- ListBox* mpLbLists;
- FixedText* mpFtEntries;
- VclMultiLineEdit* mpEdEntries;
- FixedText* mpFtCopyFrom;
- Edit* mpEdCopyFrom;
+ VclPtr<FixedText> mpFtLists;
+ VclPtr<ListBox> mpLbLists;
+ VclPtr<FixedText> mpFtEntries;
+ VclPtr<VclMultiLineEdit> mpEdEntries;
+ VclPtr<FixedText> mpFtCopyFrom;
+ VclPtr<Edit> mpEdCopyFrom;
- PushButton* mpBtnNew;
- PushButton* mpBtnDiscard;
+ VclPtr<PushButton> mpBtnNew;
+ VclPtr<PushButton> mpBtnDiscard;
- PushButton* mpBtnAdd;
- PushButton* mpBtnModify;
+ VclPtr<PushButton> mpBtnAdd;
+ VclPtr<PushButton> mpBtnModify;
- PushButton* mpBtnRemove;
+ VclPtr<PushButton> mpBtnRemove;
- PushButton* mpBtnCopy;
+ VclPtr<PushButton> mpBtnCopy;
const OUString aStrQueryRemove;
const OUString aStrCopyList;
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 50981d1a3a8d..0112b39b98b8 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -31,31 +31,31 @@ class ScViewOptions;
class ScTpContentOptions : public SfxTabPage
{
- ListBox* pGridLB;
- FixedText* pColorFT;
- ColorListBox* pColorLB;
- CheckBox* pBreakCB;
- CheckBox* pGuideLineCB;
-
- CheckBox* pFormulaCB;
- CheckBox* pNilCB;
- CheckBox* pAnnotCB;
- CheckBox* pValueCB;
- CheckBox* pAnchorCB;
- CheckBox* pClipMarkCB;
- CheckBox* pRangeFindCB;
-
- ListBox* pObjGrfLB;
- ListBox* pDiagramLB;
- ListBox* pDrawLB;
-
- CheckBox* pSyncZoomCB;
-
- CheckBox* pRowColHeaderCB;
- CheckBox* pHScrollCB;
- CheckBox* pVScrollCB;
- CheckBox* pTblRegCB;
- CheckBox* pOutlineCB;
+ VclPtr<ListBox> pGridLB;
+ VclPtr<FixedText> pColorFT;
+ VclPtr<ColorListBox> pColorLB;
+ VclPtr<CheckBox> pBreakCB;
+ VclPtr<CheckBox> pGuideLineCB;
+
+ VclPtr<CheckBox> pFormulaCB;
+ VclPtr<CheckBox> pNilCB;
+ VclPtr<CheckBox> pAnnotCB;
+ VclPtr<CheckBox> pValueCB;
+ VclPtr<CheckBox> pAnchorCB;
+ VclPtr<CheckBox> pClipMarkCB;
+ VclPtr<CheckBox> pRangeFindCB;
+
+ VclPtr<ListBox> pObjGrfLB;
+ VclPtr<ListBox> pDiagramLB;
+ VclPtr<ListBox> pDrawLB;
+
+ VclPtr<CheckBox> pSyncZoomCB;
+
+ VclPtr<CheckBox> pRowColHeaderCB;
+ VclPtr<CheckBox> pHScrollCB;
+ VclPtr<CheckBox> pVScrollCB;
+ VclPtr<CheckBox> pTblRegCB;
+ VclPtr<CheckBox> pOutlineCB;
ScViewOptions* pLocalOptions;
@@ -84,23 +84,23 @@ public:
class ScDocument;
class ScTpLayoutOptions : public SfxTabPage
{
- ListBox* m_pUnitLB;
- MetricField* m_pTabMF;
-
- RadioButton* m_pAlwaysRB;
- RadioButton* m_pRequestRB;
- RadioButton* m_pNeverRB;
-
- CheckBox* m_pAlignCB;
- ListBox* m_pAlignLB;
- CheckBox* m_pEditModeCB;
- CheckBox* m_pFormatCB;
- CheckBox* m_pExpRefCB;
- CheckBox* m_pSortRefUpdateCB;
- CheckBox* m_pMarkHdrCB;
- CheckBox* m_pTextFmtCB;
- CheckBox* m_pReplWarnCB;
- CheckBox* m_pLegacyCellSelectionCB;
+ VclPtr<ListBox> m_pUnitLB;
+ VclPtr<MetricField> m_pTabMF;
+
+ VclPtr<RadioButton> m_pAlwaysRB;
+ VclPtr<RadioButton> m_pRequestRB;
+ VclPtr<RadioButton> m_pNeverRB;
+
+ VclPtr<CheckBox> m_pAlignCB;
+ VclPtr<ListBox> m_pAlignLB;
+ VclPtr<CheckBox> m_pEditModeCB;
+ VclPtr<CheckBox> m_pFormatCB;
+ VclPtr<CheckBox> m_pExpRefCB;
+ VclPtr<CheckBox> m_pSortRefUpdateCB;
+ VclPtr<CheckBox> m_pMarkHdrCB;
+ VclPtr<CheckBox> m_pTextFmtCB;
+ VclPtr<CheckBox> m_pReplWarnCB;
+ VclPtr<CheckBox> m_pLegacyCellSelectionCB;
SvxStringArray aUnitArr;
@@ -115,9 +115,9 @@ class ScTpLayoutOptions : public SfxTabPage
ScTpLayoutOptions( vcl::Window* pParent,
const SfxItemSet& rArgSet );
- virtual ~ScTpLayoutOptions();
-
public:
+ virtual ~ScTpLayoutOptions();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create ( vcl::Window* pParent,
const SfxItemSet* rCoreSet );
virtual bool FillItemSet ( SfxItemSet* rCoreSet ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 4da82e82d1c9..cd6a5ae41845 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -85,7 +85,8 @@ class ScTPValidationValue : public ScRefHandlerCaller, public SfxTabPage
static const sal_uInt16 pValueRanges[];
public:
explicit ScTPValidationValue( vcl::Window* pParent, const SfxItemSet& rArgSet );
-
+ virtual ~ScTPValidationValue();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rArgSet );
static const sal_uInt16* GetRanges() { return pValueRanges; }
@@ -104,19 +105,19 @@ private:
DECL_LINK(SelectHdl, void *);
DECL_LINK(CheckHdl, void *);
- ListBox* m_pLbAllow;
- CheckBox* m_pCbAllow; /// Allow blank cells.
- CheckBox* m_pCbShow; /// Show selection list in cell.
- CheckBox* m_pCbSort; /// Sort selection list in cell.
- FixedText* m_pFtValue;
- ListBox* m_pLbValue;
- FixedText* m_pFtMin;
- VclContainer* m_pMinGrid;
- formula::RefEdit* m_pEdMin;
- VclMultiLineEdit* m_pEdList; /// Entries for explicit list
- FixedText* m_pFtMax;
- formula::RefEdit* m_pEdMax;
- FixedText* m_pFtHint; /// Hint text for cell range validity.
+ VclPtr<ListBox> m_pLbAllow;
+ VclPtr<CheckBox> m_pCbAllow; /// Allow blank cells.
+ VclPtr<CheckBox> m_pCbShow; /// Show selection list in cell.
+ VclPtr<CheckBox> m_pCbSort; /// Sort selection list in cell.
+ VclPtr<FixedText> m_pFtValue;
+ VclPtr<ListBox> m_pLbValue;
+ VclPtr<FixedText> m_pFtMin;
+ VclPtr<VclContainer> m_pMinGrid;
+ VclPtr<formula::RefEdit> m_pEdMin;
+ VclPtr<VclMultiLineEdit> m_pEdList; /// Entries for explicit list
+ VclPtr<FixedText> m_pFtMax;
+ VclPtr<formula::RefEdit> m_pEdMax;
+ VclPtr<FixedText> m_pFtHint; /// Hint text for cell range validity.
OUString maStrMin;
OUString maStrMax;
@@ -128,11 +129,11 @@ private:
DECL_LINK(EditSetFocusHdl, void *);
DECL_LINK( KillFocusHdl, vcl::Window *);
void OnClick( Button *pBtn );
- formula::RefEdit* m_pRefEdit;
+ VclPtr<formula::RefEdit> m_pRefEdit;
public:
class ScRefButtonEx : public ::formula::RefButton
{
- ScTPValidationValue* m_pPage;
+ VclPtr<ScTPValidationValue> m_pPage;
virtual void Click() SAL_OVERRIDE;
public:
ScRefButtonEx(vcl::Window* pParent, WinBits nStyle)
@@ -140,6 +141,8 @@ public:
, m_pPage(NULL)
{
}
+ virtual ~ScRefButtonEx();
+ virtual void dispose() SAL_OVERRIDE;
void SetParentPage(ScTPValidationValue *pPage)
{
m_pPage = pPage;
@@ -150,8 +153,8 @@ public:
}
};
private:
- ScRefButtonEx* m_pBtnRef;
- VclContainer* m_pRefGrid;
+ VclPtr<ScRefButtonEx> m_pBtnRef;
+ VclPtr<VclContainer> m_pRefGrid;
friend class ScRefButtonEx;
void SetReferenceHdl( const ScRange& , ScDocument* );
void SetActiveHdl();
@@ -175,7 +178,7 @@ class ScValidationDlg
DECL_LINK( OkHdl, Button * );
ScTabViewShell *m_pTabVwSh;
- VclHBox* m_pHBox;
+ VclPtr<VclHBox> m_pHBox;
sal_uInt16 m_nValuePageId;
bool m_bOwnRefHdlr:1;
bool m_bRefInputting:1;
@@ -190,6 +193,7 @@ public:
{
if( m_bOwnRefHdlr )
RemoveRefDlg( false );
+ m_pHBox.clear();
ScRefHdlrImpl<ScValidationDlg, SfxTabDialog, false>::dispose();
}
static ScValidationDlg * Find1AliveObject( vcl::Window *pAncestor )
@@ -278,9 +282,9 @@ public:
class ScTPValidationHelp : public SfxTabPage
{
private:
- TriStateBox* pTsbHelp;
- Edit* pEdtTitle;
- VclMultiLineEdit* pEdInputHelp;
+ VclPtr<TriStateBox> pTsbHelp;
+ VclPtr<Edit> pEdtTitle;
+ VclPtr<VclMultiLineEdit> pEdInputHelp;
void Init();
@@ -290,6 +294,7 @@ private:
public:
ScTPValidationHelp( vcl::Window* pParent, const SfxItemSet& rArgSet );
virtual ~ScTPValidationHelp();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create ( vcl::Window* pParent, const SfxItemSet* rArgSet );
virtual bool FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE;
@@ -299,12 +304,12 @@ public:
class ScTPValidationError : public SfxTabPage
{
private:
- TriStateBox* m_pTsbShow;
- ListBox* m_pLbAction;
- PushButton* m_pBtnSearch;
- Edit* m_pEdtTitle;
- FixedText* m_pFtError;
- VclMultiLineEdit* m_pEdError;
+ VclPtr<TriStateBox> m_pTsbShow;
+ VclPtr<ListBox> m_pLbAction;
+ VclPtr<PushButton> m_pBtnSearch;
+ VclPtr<Edit> m_pEdtTitle;
+ VclPtr<FixedText> m_pFtError;
+ VclPtr<VclMultiLineEdit> m_pEdError;
void Init();
@@ -315,6 +320,7 @@ private:
public:
ScTPValidationError( vcl::Window* pParent, const SfxItemSet& rArgSet );
virtual ~ScTPValidationError();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create ( vcl::Window* pParent, const SfxItemSet* rArgSet );
virtual bool FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index efabb35b024f..1bc0c375c936 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -28,17 +28,17 @@ class ScOrcusXMLContext;
class ScXMLSourceDlg : public ScAnyRefDlg
{
- PushButton* mpBtnSelectSource;
- FixedText* mpFtSourceFile;
+ VclPtr<PushButton> mpBtnSelectSource;
+ VclPtr<FixedText> mpFtSourceFile;
- VclContainer* mpMapGrid;
+ VclPtr<VclContainer> mpMapGrid;
- SvTreeListBox* mpLbTree;
- formula::RefEdit* mpRefEdit;
- formula::RefButton* mpRefBtn;
+ VclPtr<SvTreeListBox> mpLbTree;
+ VclPtr<formula::RefEdit> mpRefEdit;
+ VclPtr<formula::RefButton> mpRefBtn;
- PushButton* mpBtnOk;
- CancelButton* mpBtnCancel;
+ VclPtr<PushButton> mpBtnOk;
+ VclPtr<CancelButton> mpBtnCancel;
OUString maSrcPath;
@@ -51,12 +51,14 @@ class ScXMLSourceDlg : public ScAnyRefDlg
ScDocument* mpDoc;
- formula::RefEdit* mpActiveEdit;
+ VclPtr<formula::RefEdit> mpActiveEdit;
bool mbDlgLostFocus;
public:
ScXMLSourceDlg(
SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, ScDocument* pDoc);
+ virtual ~ScXMLSourceDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool IsRefInputMode() const SAL_OVERRIDE;
virtual void SetReference(const ScRange& rRange, ScDocument* pDoc) SAL_OVERRIDE;
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 1e6b481cd9b5..2b5d035276c1 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -168,7 +168,10 @@ void ScAcceptChgDlg::dispose()
pChanges->SetModifiedLink(aLink);
}
- delete m_pAcceptChgCtr;
+ m_pAcceptChgCtr.clear();
+ pTPFilter.clear();
+ pTPView.clear();
+ pTheView.clear();
SfxModelessDialog::dispose();
}
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index fc0d82c909b7..d2084b4b79e6 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -344,8 +344,6 @@ IMPL_LINK( ScFormulaReferenceHelper, AccelSelectHdl, Accelerator *, pSelAccel )
return long(true);
}
-typedef std::vector<vcl::Window*> winvec;
-
void ScFormulaReferenceHelper::RefInputDone( bool bForced )
{
if ( CanInputDone( bForced ) )
@@ -394,7 +392,7 @@ void ScFormulaReferenceHelper::RefInputDone( bool bForced )
pRefBtn->SetStartImage();
// All others: Show();
- for (winvec::iterator aI = m_aHiddenWidgets.begin(); aI != m_aHiddenWidgets.end(); ++aI)
+ for (auto aI = m_aHiddenWidgets.begin(); aI != m_aHiddenWidgets.end(); ++aI)
{
vcl::Window *pWindow = *aI;
pWindow->Show();
@@ -416,12 +414,12 @@ void ScFormulaReferenceHelper::RefInputDone( bool bForced )
}
}
-typedef std::set<vcl::Window*> winset;
+typedef std::set<VclPtr<vcl::Window> > winset;
namespace
{
void hideUnless(vcl::Window *pTop, const winset& rVisibleWidgets,
- winvec &rWasVisibleWidgets)
+ std::vector<VclPtr<vcl::Window> > &rWasVisibleWidgets)
{
for (vcl::Window* pChild = pTop->GetWindow(WINDOW_FIRSTCHILD); pChild;
pChild = pChild->GetWindow(WINDOW_NEXT))
@@ -759,14 +757,14 @@ static void lcl_HideAllReferences()
// class ScRefHandler
ScRefHandler::ScRefHandler( vcl::Window &rWindow, SfxBindings* pB, bool bBindRef ):
- m_rWindow( rWindow ),
+ m_rWindow( &rWindow ),
m_bInRefMode( false ),
m_aHelper(this,pB),
pMyBindings( pB ),
pActiveWin(NULL)
{
- m_aHelper.SetWindow(&m_rWindow);
- reverseUniqueHelpIdHack(m_rWindow);
+ m_aHelper.SetWindow(m_rWindow.get());
+ reverseUniqueHelpIdHack(*m_rWindow.get());
aIdle.SetPriority(SchedulerPriority::LOWER);
aIdle.SetIdleHdl(LINK( this, ScRefHandler, UpdateFocusHdl));
@@ -889,7 +887,7 @@ bool ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be
bool ScRefHandler::IsRefInputMode() const
{
- return m_rWindow.IsVisible(); // references can only be input to visible windows
+ return m_rWindow->IsVisible(); // references can only be input to visible windows
}
bool ScRefHandler::DoClose( sal_uInt16 nId )
@@ -951,7 +949,7 @@ void ScRefHandler::stateChanged(const StateChangedType nStateChange, const bool
if(nStateChange == StateChangedType::VISIBLE)
{
- if(m_rWindow.IsVisible())
+ if(m_rWindow->IsVisible())
{
ScFormulaReferenceHelper::enableInput( false );
m_aHelper.EnableSpreadsheets();
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 02d3a317c397..0229df886fd6 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -442,6 +442,17 @@ ScConflictsDlg::ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScD
ScConflictsDlg::~ScConflictsDlg()
{
+ dispose();
+}
+
+void ScConflictsDlg::dispose()
+{
+ m_pLbConflictsContainer.clear();
+ m_pBtnKeepMine.clear();
+ m_pBtnKeepOther.clear();
+ m_pBtnKeepAllMine.clear();
+ m_pBtnKeepAllOthers.clear();
+ ModalDialog::dispose();
}
OUString ScConflictsDlg::GetConflictString( const ScConflictsListEntry& rConflictEntry )
diff --git a/sc/source/ui/miscdlgs/crdlg.cxx b/sc/source/ui/miscdlgs/crdlg.cxx
index 5d5e833ca768..643ffdcc44dc 100644
--- a/sc/source/ui/miscdlgs/crdlg.cxx
+++ b/sc/source/ui/miscdlgs/crdlg.cxx
@@ -44,6 +44,21 @@ ScColOrRowDlg::ScColOrRowDlg(vcl::Window* pParent, const OUString& rStrTitle,
m_pBtnOk->SetClickHdl( LINK( this, ScColOrRowDlg, OkHdl ) );
}
+ScColOrRowDlg::~ScColOrRowDlg()
+{
+ dispose();
+}
+
+void ScColOrRowDlg::dispose()
+{
+ m_pFrame.clear();
+ m_pBtnRows.clear();
+ m_pBtnCols.clear();
+ m_pBtnOk.clear();
+ ModalDialog::dispose();
+}
+
+
IMPL_LINK_NOARG_INLINE_START(ScColOrRowDlg, OkHdl)
{
EndDialog( m_pBtnCols->IsChecked() ? SCRET_COLS : SCRET_ROWS );
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 6510dc13290e..8560a881933d 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -74,6 +74,24 @@ ScColRowNameRangesDlg::ScColRowNameRangesDlg( SfxBindings* pB,
ScColRowNameRangesDlg::~ScColRowNameRangesDlg()
{
+ dispose();
+}
+
+void ScColRowNameRangesDlg::dispose()
+{
+ pLbRange.clear();
+ pEdAssign.clear();
+ pRbAssign.clear();
+ pBtnColHead.clear();
+ pBtnRowHead.clear();
+ pEdAssign2.clear();
+ pRbAssign2.clear();
+ pBtnOk.clear();
+ pBtnCancel.clear();
+ pBtnAdd.clear();
+ pBtnRemove.clear();
+ pEdActive.clear();
+ ScAnyRefDlg::dispose();
}
// initialises event handlers and start parameters in the dialog
@@ -475,7 +493,7 @@ void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, bool bColNam
bool ScColRowNameRangesDlg::IsRefInputMode() const
{
- return (pEdActive != NULL);
+ return (pEdActive != nullptr);
}
// Handler:
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index 0d3f58d4fda0..0c884952599c 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -204,7 +204,21 @@ ScDataFormDlg::ScDataFormDlg(vcl::Window* pParent, ScTabViewShell* pTabViewShell
ScDataFormDlg::~ScDataFormDlg()
{
+ dispose();
+}
+void ScDataFormDlg::dispose()
+{
+ m_pBtnNew.clear();
+ m_pBtnDelete.clear();
+ m_pBtnRestore.clear();
+ m_pBtnPrev.clear();
+ m_pBtnNext.clear();
+ m_pBtnClose.clear();
+ m_pSlider.clear();
+ m_pGrid.clear();
+ m_pFixedText.clear();
+ ModalDialog::dispose();
}
void ScDataFormDlg::FillCtrls(SCROW /*nCurrentRow*/)
diff --git a/sc/source/ui/miscdlgs/datastreamdlg.cxx b/sc/source/ui/miscdlgs/datastreamdlg.cxx
index 345293b81201..fac0e655e6eb 100644
--- a/sc/source/ui/miscdlgs/datastreamdlg.cxx
+++ b/sc/source/ui/miscdlgs/datastreamdlg.cxx
@@ -52,6 +52,33 @@ DataStreamDlg::DataStreamDlg(ScDocShell *pDocShell, vcl::Window* pParent)
UpdateEnable();
}
+DataStreamDlg::~DataStreamDlg()
+{
+ dispose();
+}
+
+void DataStreamDlg::dispose()
+{
+ m_pCbUrl.clear();
+ m_pBtnBrowse.clear();
+ m_pRBDirectData.clear();
+ m_pRBScriptData.clear();
+ m_pRBValuesInLine.clear();
+ m_pRBAddressValue.clear();
+ m_pCBRefreshOnEmpty.clear();
+ m_pRBDataDown.clear();
+ m_pRBRangeDown.clear();
+ m_pRBNoMove.clear();
+ m_pRBMaxLimit.clear();
+ m_pRBUnlimited.clear();
+ m_pEdRange.clear();
+ m_pEdLimit.clear();
+ m_pBtnOk.clear();
+ m_pVclFrameLimit.clear();
+ m_pVclFrameMove.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK_NOARG(DataStreamDlg, BrowseHdl)
{
sfx2::FileDialogHelper aFileDialog(0, 0);
diff --git a/sc/source/ui/miscdlgs/delcldlg.cxx b/sc/source/ui/miscdlgs/delcldlg.cxx
index 06e43a4b5e19..a838bfc0cdd1 100644
--- a/sc/source/ui/miscdlgs/delcldlg.cxx
+++ b/sc/source/ui/miscdlgs/delcldlg.cxx
@@ -57,6 +57,21 @@ ScDeleteCellDlg::ScDeleteCellDlg(vcl::Window* pParent, bool bDisallowCellMove)
}
}
+ScDeleteCellDlg::~ScDeleteCellDlg()
+{
+ dispose();
+}
+
+void ScDeleteCellDlg::dispose()
+{
+ m_pBtnCellsUp.clear();
+ m_pBtnCellsLeft.clear();
+ m_pBtnDelRows.clear();
+ m_pBtnDelCols.clear();
+ ModalDialog::dispose();
+}
+
+
DelCellCmd ScDeleteCellDlg::GetDelCellCmd() const
{
DelCellCmd nReturn = DEL_NONE;
diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx b/sc/source/ui/miscdlgs/delcodlg.cxx
index 21eccac2c1b1..10e92b78d2e7 100644
--- a/sc/source/ui/miscdlgs/delcodlg.cxx
+++ b/sc/source/ui/miscdlgs/delcodlg.cxx
@@ -71,6 +71,25 @@ ScDeleteContentsDlg::ScDeleteContentsDlg( vcl::Window* pParent,
aBtnDelAll->SetClickHdl( LINK( this, ScDeleteContentsDlg, DelAllHdl ) );
}
+ScDeleteContentsDlg::~ScDeleteContentsDlg()
+{
+ dispose();
+}
+
+void ScDeleteContentsDlg::dispose()
+{
+ aBtnDelAll.clear();
+ aBtnDelStrings.clear();
+ aBtnDelNumbers.clear();
+ aBtnDelDateTime.clear();
+ aBtnDelFormulas.clear();
+ aBtnDelNotes.clear();
+ aBtnDelAttrs.clear();
+ aBtnDelObjects.clear();
+ aBtnOk.clear();
+ ModalDialog::dispose();
+}
+
InsertDeleteFlags ScDeleteContentsDlg::GetDelContentsCmdBits() const
{
ScDeleteContentsDlg::nPreviousChecks = IDF_NONE;
@@ -139,8 +158,4 @@ IMPL_LINK_NOARG_INLINE_START(ScDeleteContentsDlg, DelAllHdl)
}
IMPL_LINK_NOARG_INLINE_END(ScDeleteContentsDlg, DelAllHdl)
-ScDeleteContentsDlg::~ScDeleteContentsDlg()
-{
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx
index 9067a15bb28c..6709c2ded025 100644
--- a/sc/source/ui/miscdlgs/filldlg.cxx
+++ b/sc/source/ui/miscdlgs/filldlg.cxx
@@ -76,6 +76,32 @@ ScFillSeriesDlg::ScFillSeriesDlg( vcl::Window* pParent,
ScFillSeriesDlg::~ScFillSeriesDlg()
{
+ dispose();
+}
+
+void ScFillSeriesDlg::dispose()
+{
+ m_pFtStartVal.clear();
+ m_pEdStartVal.clear();
+ m_pFtEndVal.clear();
+ m_pEdEndVal.clear();
+ m_pFtIncrement.clear();
+ m_pEdIncrement.clear();
+ m_pBtnDown.clear();
+ m_pBtnRight.clear();
+ m_pBtnUp.clear();
+ m_pBtnLeft.clear();
+ m_pBtnArithmetic.clear();
+ m_pBtnGeometric.clear();
+ m_pBtnDate.clear();
+ m_pBtnAutoFill.clear();
+ m_pFtTimeUnit.clear();
+ m_pBtnDay.clear();
+ m_pBtnDayOfWeek.clear();
+ m_pBtnMonth.clear();
+ m_pBtnYear.clear();
+ m_pBtnOk.clear();
+ ModalDialog::dispose();
}
void ScFillSeriesDlg::SetEdStartValEnabled(bool bFlag)
diff --git a/sc/source/ui/miscdlgs/groupdlg.cxx b/sc/source/ui/miscdlgs/groupdlg.cxx
index 62b726b41570..255e116a1739 100644
--- a/sc/source/ui/miscdlgs/groupdlg.cxx
+++ b/sc/source/ui/miscdlgs/groupdlg.cxx
@@ -42,13 +42,21 @@ ScGroupDlg::ScGroupDlg(vcl::Window* pParent, bool bUngroup, bool bRows)
m_pBtnRows->GrabFocus();
}
-bool ScGroupDlg::GetColsChecked() const
+ScGroupDlg::~ScGroupDlg()
{
- return m_pBtnCols->IsChecked();
+ dispose();
}
-ScGroupDlg::~ScGroupDlg()
+void ScGroupDlg::dispose()
{
+ m_pBtnRows.clear();
+ m_pBtnCols.clear();
+ ModalDialog::dispose();
+}
+
+bool ScGroupDlg::GetColsChecked() const
+{
+ return m_pBtnCols->IsChecked();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx
index c0b7094686fa..05a194f808ab 100644
--- a/sc/source/ui/miscdlgs/highred.cxx
+++ b/sc/source/ui/miscdlgs/highred.cxx
@@ -75,7 +75,13 @@ ScHighlightChgDlg::~ScHighlightChgDlg()
void ScHighlightChgDlg::dispose()
{
SetDispatcherLock( false );
- delete m_pFilterCtr;
+ m_pFilterCtr.clear();
+ m_pHighlightBox.clear();
+ m_pCbAccept.clear();
+ m_pCbReject.clear();
+ m_pOkButton.clear();
+ m_pEdAssign.clear();
+ m_pRbAssign.clear();
ScAnyRefDlg::dispose();
}
diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx
index b2f805974027..264b9f53df71 100644
--- a/sc/source/ui/miscdlgs/inscldlg.cxx
+++ b/sc/source/ui/miscdlgs/inscldlg.cxx
@@ -58,6 +58,20 @@ ScInsertCellDlg::ScInsertCellDlg( vcl::Window* pParent,bool bDisallowCellMove) :
}
}
+ScInsertCellDlg::~ScInsertCellDlg()
+{
+ dispose();
+}
+
+void ScInsertCellDlg::dispose()
+{
+ m_pBtnCellsDown.clear();
+ m_pBtnCellsRight.clear();
+ m_pBtnInsRow.clear();
+ m_pBtnInsCol.clear();
+ ModalDialog::dispose();
+}
+
InsCellCmd ScInsertCellDlg::GetInsCellCmd() const
{
InsCellCmd nReturn = INS_NONE;
@@ -86,8 +100,4 @@ InsCellCmd ScInsertCellDlg::GetInsCellCmd() const
return nReturn;
}
-ScInsertCellDlg::~ScInsertCellDlg()
-{
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx
index 30ec89410251..0a4c8580d002 100644
--- a/sc/source/ui/miscdlgs/inscodlg.cxx
+++ b/sc/source/ui/miscdlgs/inscodlg.cxx
@@ -383,6 +383,28 @@ void ScInsertContentsDlg::dispose()
else if ( mpRbMoveRight->IsChecked() )
ScInsertContentsDlg::nPreviousMoveMode = INS_CELLSRIGHT;
}
+ mpBtnInsAll.clear();
+ mpBtnInsStrings.clear();
+ mpBtnInsNumbers.clear();
+ mpBtnInsDateTime.clear();
+ mpBtnInsFormulas.clear();
+ mpBtnInsNotes.clear();
+ mpBtnInsAttrs.clear();
+ mpBtnInsObjects.clear();
+ mpBtnSkipEmptyCells.clear();
+ mpBtnTranspose.clear();
+ mpBtnLink.clear();
+ mpRbNoOp.clear();
+ mpRbAdd.clear();
+ mpRbSub.clear();
+ mpRbMul.clear();
+ mpRbDiv.clear();
+ mpRbMoveNone.clear();
+ mpRbMoveDown.clear();
+ mpRbMoveRight.clear();
+ mpBtnShortCutPasteValuesOnly.clear();
+ mpBtnShortCutPasteValuesFormats.clear();
+ mpBtnShortCutPasteTranspose.clear();
ModalDialog::dispose();
}
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index a59638546433..328db1ce4685 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -72,6 +72,19 @@ void ScInsertTableDlg::dispose()
if (pDocShTables)
pDocShTables->DoClose();
delete pDocInserter;
+ m_pBtnBefore.clear();
+ m_pBtnBehind.clear();
+ m_pBtnNew.clear();
+ m_pBtnFromFile.clear();
+ m_pFtCount.clear();
+ m_pNfCount.clear();
+ m_pFtName.clear();
+ m_pEdName.clear();
+ m_pLbTables.clear();
+ m_pFtPath.clear();
+ m_pBtnBrowse.clear();
+ m_pBtnLink.clear();
+ m_pBtnOk.clear();
ModalDialog::dispose();
}
diff --git a/sc/source/ui/miscdlgs/lbseldlg.cxx b/sc/source/ui/miscdlgs/lbseldlg.cxx
index 9fd2f570c257..f7347c2112e6 100644
--- a/sc/source/ui/miscdlgs/lbseldlg.cxx
+++ b/sc/source/ui/miscdlgs/lbseldlg.cxx
@@ -41,6 +41,18 @@ ScSelEntryDlg::ScSelEntryDlg(vcl::Window* pParent, const std::vector<OUString>
m_pLb->SelectEntryPos( 0 );
}
+ScSelEntryDlg::~ScSelEntryDlg()
+{
+ dispose();
+}
+
+void ScSelEntryDlg::dispose()
+{
+ m_pLb.clear();
+ ModalDialog::dispose();
+}
+
+
OUString ScSelEntryDlg::GetSelectEntry() const
{
return m_pLb->GetSelectEntry();
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index cf09932f6247..f163e03b634e 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -62,7 +62,20 @@ ScLinkedAreaDlg::ScLinkedAreaDlg(vcl::Window* pParent)
ScLinkedAreaDlg::~ScLinkedAreaDlg()
{
+ dispose();
+}
+
+void ScLinkedAreaDlg::dispose()
+{
// pSourceShell is deleted by aSourceRef
+ m_pCbUrl.clear();
+ m_pBtnBrowse.clear();
+ m_pLbRanges.clear();
+ m_pBtnReload.clear();
+ m_pNfDelay.clear();
+ m_pFtSeconds.clear();
+ m_pBtnOk.clear();
+ ModalDialog::dispose();
}
short ScLinkedAreaDlg::Execute()
diff --git a/sc/source/ui/miscdlgs/mtrindlg.cxx b/sc/source/ui/miscdlgs/mtrindlg.cxx
index 7651d8310bd8..67379acee7e5 100644
--- a/sc/source/ui/miscdlgs/mtrindlg.cxx
+++ b/sc/source/ui/miscdlgs/mtrindlg.cxx
@@ -58,6 +58,18 @@ ScMetricInputDlg::ScMetricInputDlg( vcl::Window* pParent,
m_pBtnDefVal->Check( nCurrentValue == nDefaultValue );
}
+ScMetricInputDlg::~ScMetricInputDlg()
+{
+ dispose();
+}
+
+void ScMetricInputDlg::dispose()
+{
+ m_pEdValue.clear();
+ m_pBtnDefVal.clear();
+ ModalDialog::dispose();
+}
+
long ScMetricInputDlg::GetInputValue( FieldUnit eUnit ) const
{
/*
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 32d997b971b2..62fc9530ea67 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -65,6 +65,19 @@ ScMoveTableDlg::ScMoveTableDlg(vcl::Window* pParent, const OUString& rDefault)
ScMoveTableDlg::~ScMoveTableDlg()
{
+ dispose();
+}
+
+void ScMoveTableDlg::dispose()
+{
+ pBtnMove.clear();
+ pBtnCopy.clear();
+ pLbDoc.clear();
+ pLbTable.clear();
+ pEdTabName.clear();
+ pFtWarn.clear();
+ pBtnOk.clear();
+ ModalDialog::dispose();
}
void ScMoveTableDlg::GetTabNameString( OUString& rString ) const
diff --git a/sc/source/ui/miscdlgs/namecrea.cxx b/sc/source/ui/miscdlgs/namecrea.cxx
index fa876ba2bccc..7becdb521a03 100644
--- a/sc/source/ui/miscdlgs/namecrea.cxx
+++ b/sc/source/ui/miscdlgs/namecrea.cxx
@@ -35,6 +35,20 @@ ScNameCreateDlg::ScNameCreateDlg( vcl::Window * pParent, sal_uInt16 nFlags )
m_pRightBox->Check ( (nFlags & NAME_RIGHT) ? true : false );
}
+ScNameCreateDlg::~ScNameCreateDlg()
+{
+ dispose();
+}
+
+void ScNameCreateDlg::dispose()
+{
+ m_pTopBox.clear();
+ m_pLeftBox.clear();
+ m_pBottomBox.clear();
+ m_pRightBox.clear();
+ ModalDialog::dispose();
+}
+
sal_uInt16 ScNameCreateDlg::GetFlags() const
{
sal_uInt16 nResult = 0;
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index f55c8674950b..067fd2d9017f 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -53,6 +53,18 @@ ScSolverProgressDialog::ScSolverProgressDialog(vcl::Window* pParent)
get(m_pFtTime, "progress");
}
+ScSolverProgressDialog::~ScSolverProgressDialog()
+{
+ dispose();
+}
+
+void ScSolverProgressDialog::dispose()
+{
+ m_pFtTime.clear();
+ ModelessDialog::dispose();
+}
+
+
void ScSolverProgressDialog::HideTimeLimit()
{
m_pFtTime->Hide();
@@ -72,6 +84,17 @@ ScSolverNoSolutionDialog::ScSolverNoSolutionDialog( vcl::Window* pParent, const
m_pFtErrorText->SetText(rErrorText);
}
+ScSolverNoSolutionDialog::~ScSolverNoSolutionDialog()
+{
+ dispose();
+}
+
+void ScSolverNoSolutionDialog::dispose()
+{
+ m_pFtErrorText.clear();
+ ModalDialog::dispose();
+}
+
ScSolverSuccessDialog::ScSolverSuccessDialog( vcl::Window* pParent, const OUString& rSolution )
: ModalDialog(pParent, "SolverSuccessDialog", "modules/scalc/ui/solversuccessdialog.ui")
{
@@ -84,6 +107,19 @@ ScSolverSuccessDialog::ScSolverSuccessDialog( vcl::Window* pParent, const OUStri
m_pFtResult->SetText(aMessage);
}
+ScSolverSuccessDialog::~ScSolverSuccessDialog()
+{
+ dispose();
+}
+
+void ScSolverSuccessDialog::dispose()
+{
+ m_pFtResult.clear();
+ m_pBtnOk.clear();
+ m_pBtnCancel.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK( ScSolverSuccessDialog, ClickHdl, PushButton*, pBtn )
{
if (pBtn == m_pBtnOk)
@@ -267,6 +303,63 @@ ScOptSolverDlg::ScOptSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Windo
ScOptSolverDlg::~ScOptSolverDlg()
{
+ dispose();
+}
+
+void ScOptSolverDlg::dispose()
+{
+ m_pFtObjectiveCell.clear();
+ m_pEdObjectiveCell.clear();
+ m_pRBObjectiveCell.clear();
+ m_pRbMax.clear();
+ m_pRbMin.clear();
+ m_pRbValue.clear();
+ m_pEdTargetValue.clear();
+ m_pRBTargetValue.clear();
+ m_pFtVariableCells.clear();
+ m_pEdVariableCells.clear();
+ m_pRBVariableCells.clear();
+ m_pFtCellRef.clear();
+ m_pEdLeft1.clear();
+ m_pRBLeft1.clear();
+ m_pFtOperator.clear();
+ m_pLbOp1.clear();
+ m_pFtConstraint.clear();
+ m_pEdRight1.clear();
+ m_pRBRight1.clear();
+ m_pBtnDel1.clear();
+ m_pEdLeft2.clear();
+ m_pRBLeft2.clear();
+ m_pLbOp2.clear();
+ m_pEdRight2.clear();
+ m_pRBRight2.clear();
+ m_pBtnDel2.clear();
+ m_pEdLeft3.clear();
+ m_pRBLeft3.clear();
+ m_pLbOp3.clear();
+ m_pEdRight3.clear();
+ m_pRBRight3.clear();
+ m_pBtnDel3.clear();
+ m_pEdLeft4.clear();
+ m_pRBLeft4.clear();
+ m_pLbOp4.clear();
+ m_pEdRight4.clear();
+ m_pRBRight4.clear();
+ m_pBtnDel4.clear();
+ m_pScrollBar.clear();
+ m_pBtnOpt.clear();
+ m_pBtnCancel.clear();
+ m_pBtnSolve.clear();
+ mpEdActive.clear();
+ for (auto p : mpLeftButton)
+ p.clear();
+ for (auto p : mpRightButton)
+ p.clear();
+ for (auto p : mpOperator)
+ p.clear();
+ for (auto p : mpDelButton)
+ p.clear();
+ ScAnyRefDlg::dispose();
}
void ScOptSolverDlg::Init(const ScAddress& rCursorPos)
@@ -506,7 +599,7 @@ void ScOptSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
bool ScOptSolverDlg::IsRefInputMode() const
{
- return mpEdActive != NULL;
+ return mpEdActive != nullptr;
}
// Handler:
diff --git a/sc/source/ui/miscdlgs/protectiondlg.cxx b/sc/source/ui/miscdlgs/protectiondlg.cxx
index 5c2e89582887..96f0c40947e4 100644
--- a/sc/source/ui/miscdlgs/protectiondlg.cxx
+++ b/sc/source/ui/miscdlgs/protectiondlg.cxx
@@ -50,6 +50,19 @@ ScTableProtectionDlg::ScTableProtectionDlg(vcl::Window* pParent)
ScTableProtectionDlg::~ScTableProtectionDlg()
{
+ dispose();
+}
+
+void ScTableProtectionDlg::dispose()
+{
+ m_pBtnProtect.clear();
+ m_pPasswords.clear();
+ m_pOptions.clear();
+ m_pPassword1Edit.clear();
+ m_pPassword2Edit.clear();
+ m_pOptionsListBox.clear();
+ m_pBtnOk.clear();
+ ModalDialog::dispose();
}
short ScTableProtectionDlg::Execute()
diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx
index df764de6436c..b968cb174698 100644
--- a/sc/source/ui/miscdlgs/retypepassdlg.cxx
+++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx
@@ -54,12 +54,22 @@ ScRetypePassDlg::ScRetypePassDlg(vcl::Window* pParent) :
ScRetypePassDlg::~ScRetypePassDlg()
{
+ dispose();
+}
+
+void ScRetypePassDlg::dispose()
+{
DeleteSheets();
+ mpBtnOk.clear();
+ mpTextDocStatus.clear();
+ mpBtnRetypeDoc.clear();
+ mpSheetsBox.clear();
+ ModalDialog::dispose();
}
void ScRetypePassDlg::DeleteSheets()
{
- for(std::vector<VclHBox*>::iterator it = maSheets.begin(); it != maSheets.end(); ++it)
+ for(auto it = maSheets.begin(); it != maSheets.end(); ++it)
{
vcl::Window *pWindow = (*it);
vcl::Window *pChild = pWindow->GetWindow(WINDOW_FIRSTCHILD);
@@ -323,6 +333,19 @@ ScRetypePassInputDlg::ScRetypePassInputDlg(vcl::Window* pParent, ScPassHashProte
ScRetypePassInputDlg::~ScRetypePassInputDlg()
{
+ dispose();
+}
+
+void ScRetypePassInputDlg::dispose()
+{
+ m_pBtnOk.clear();
+ m_pBtnRetypePassword.clear();
+ m_pPasswordGrid.clear();
+ m_pPassword1Edit.clear();
+ m_pPassword2Edit.clear();
+ m_pBtnMatchOldPass.clear();
+ m_pBtnRemovePassword.clear();
+ ModalDialog::dispose();
}
short ScRetypePassInputDlg::Execute()
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index b55b722294c0..0f05a5bf6bbf 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -88,6 +88,29 @@ ScAutoFormatDlg::ScAutoFormatDlg(vcl::Window* pParent,
m_pWndPreview->NotifyChange(it->second);
}
+ScAutoFormatDlg::~ScAutoFormatDlg()
+{
+ dispose();
+}
+
+void ScAutoFormatDlg::dispose()
+{
+ m_pLbFormat.clear();
+ m_pWndPreview.clear();
+ m_pBtnOk.clear();
+ m_pBtnCancel.clear();
+ m_pBtnAdd.clear();
+ m_pBtnRemove.clear();
+ m_pBtnRename.clear();
+ m_pBtnNumFormat.clear();
+ m_pBtnBorder.clear();
+ m_pBtnFont.clear();
+ m_pBtnPattern.clear();
+ m_pBtnAlignment.clear();
+ m_pBtnAdjust.clear();
+ ModalDialog::dispose();
+}
+
void ScAutoFormatDlg::Init()
{
m_pLbFormat->SetSelectHdl( LINK( this, ScAutoFormatDlg, SelFmtHdl ) );
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index 3bfb5d9c30e3..5b04a227cdf8 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -113,7 +113,9 @@ ScShareDocumentDlg::~ScShareDocumentDlg()
void ScShareDocumentDlg::dispose()
{
- delete m_pLbUsers;
+ m_pLbUsers.clear();
+ m_pCbShare.clear();
+ m_pFtWarning.clear();
ModalDialog::dispose();
}
diff --git a/sc/source/ui/miscdlgs/shtabdlg.cxx b/sc/source/ui/miscdlgs/shtabdlg.cxx
index 48ed2c95b5ce..e9410599f02a 100644
--- a/sc/source/ui/miscdlgs/shtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/shtabdlg.cxx
@@ -37,6 +37,18 @@ ScShowTabDlg::ScShowTabDlg(vcl::Window* pParent)
m_pLb->SetDoubleClickHdl( LINK( this, ScShowTabDlg, DblClkHdl ) );
}
+ScShowTabDlg::~ScShowTabDlg()
+{
+ dispose();
+}
+
+void ScShowTabDlg::dispose()
+{
+ m_pFrame.clear();
+ m_pLb.clear();
+ ModalDialog::dispose();
+}
+
void ScShowTabDlg::SetDescription(
const OUString& rTitle, const OUString& rFixedText,
const OString& rDlgHelpId, const OString& sLbHelpId )
diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx
index 93cb3e06d96d..e6f27a94caa2 100644
--- a/sc/source/ui/miscdlgs/simpref.cxx
+++ b/sc/source/ui/miscdlgs/simpref.cxx
@@ -59,7 +59,18 @@ ScSimpleRefDlg::ScSimpleRefDlg(SfxBindings* pB, SfxChildWindow* pCW, vcl::Window
ScSimpleRefDlg::~ScSimpleRefDlg()
{
+ dispose();
+}
+
+void ScSimpleRefDlg::dispose()
+{
SetDispatcherLock( false ); // deactivate modal mode
+ m_pFtAssign.clear();
+ m_pEdAssign.clear();
+ m_pRbAssign.clear();
+ m_pBtnOk.clear();
+ m_pBtnCancel.clear();
+ ScAnyRefDlg::dispose();
}
void ScSimpleRefDlg::FillInfo(SfxChildWinInfo& rWinInfo) const
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 6e5660c4c0f5..c3514c54b2d0 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -165,6 +165,9 @@ ScSolverOptionsDialog::~ScSolverOptionsDialog()
void ScSolverOptionsDialog::dispose()
{
delete mpCheckButtonData;
+ m_pLbEngine.clear();
+ m_pLbSettings.clear();
+ m_pBtnEdit.clear();
ModalDialog::dispose();
}
@@ -394,6 +397,18 @@ ScSolverIntegerDialog::ScSolverIntegerDialog(vcl::Window * pParent)
get(m_pNfValue, "value");
}
+ScSolverIntegerDialog::~ScSolverIntegerDialog()
+{
+ dispose();
+}
+
+void ScSolverIntegerDialog::dispose()
+{
+ m_pFrame.clear();
+ m_pNfValue.clear();
+ ModalDialog::dispose();
+}
+
void ScSolverIntegerDialog::SetOptionName( const OUString& rName )
{
m_pFrame->set_label(rName);
@@ -422,6 +437,18 @@ ScSolverValueDialog::ScSolverValueDialog( vcl::Window * pParent )
get(m_pEdValue, "value");
}
+ScSolverValueDialog::~ScSolverValueDialog()
+{
+ dispose();
+}
+
+void ScSolverValueDialog::dispose()
+{
+ m_pFrame.clear();
+ m_pEdValue.clear();
+ ModalDialog::dispose();
+}
+
void ScSolverValueDialog::SetOptionName( const OUString& rName )
{
m_pFrame->set_label(rName);
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx
index 10ffbfa0ca9b..b841c26fa5a0 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -73,6 +73,22 @@ ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pPa
ScSolverDlg::~ScSolverDlg()
{
+ dispose();
+}
+
+void ScSolverDlg::dispose()
+{
+ m_pFtFormulaCell.clear();
+ m_pEdFormulaCell.clear();
+ m_pRBFormulaCell.clear();
+ m_pEdTargetVal.clear();
+ m_pFtVariableCell.clear();
+ m_pEdVariableCell.clear();
+ m_pRBVariableCell.clear();
+ m_pBtnOk.clear();
+ m_pBtnCancel.clear();
+ pEdActive.clear();
+ ScAnyRefDlg::dispose();
}
void ScSolverDlg::Init()
@@ -170,7 +186,7 @@ void ScSolverDlg::RaiseError( ScSolverErr eError )
bool ScSolverDlg::IsRefInputMode() const
{
- return pEdActive != NULL;
+ return pEdActive != nullptr;
}
bool ScSolverDlg::CheckTargetValue( const OUString& rStrVal )
diff --git a/sc/source/ui/miscdlgs/strindlg.cxx b/sc/source/ui/miscdlgs/strindlg.cxx
index c053016f33fe..a2f1b36a9edf 100644
--- a/sc/source/ui/miscdlgs/strindlg.cxx
+++ b/sc/source/ui/miscdlgs/strindlg.cxx
@@ -39,4 +39,16 @@ ScStringInputDlg::ScStringInputDlg( vcl::Window* pParent,
m_pEdInput->SetHelpId( sEditHelpId );
}
+ScStringInputDlg::~ScStringInputDlg()
+{
+ dispose();
+}
+
+void ScStringInputDlg::dispose()
+{
+ m_pFtEditTitle.clear();
+ m_pEdInput.clear();
+ ModalDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index 985821eb0bff..710c5c67540f 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -59,6 +59,18 @@ ScTabBgColorDlg::ScTabBgColorDlg(vcl::Window* pParent, const OUString& rTitle,
m_pBtnOk->SetClickHdl( HDL(TabBgColorOKHdl_Impl) );
}
+ScTabBgColorDlg::~ScTabBgColorDlg()
+{
+ dispose();
+}
+
+void ScTabBgColorDlg::dispose()
+{
+ m_pTabBgColorSet.clear();
+ m_pBtnOk.clear();
+ ModalDialog::dispose();
+}
+
void ScTabBgColorDlg::GetSelectedColor( Color& rColor ) const
{
rColor = this->m_aTabBgColor;
@@ -135,6 +147,17 @@ ScTabBgColorDlg::ScTabBgColorValueSet::ScTabBgColorValueSet(vcl::Window* pParent
{
}
+ScTabBgColorDlg::ScTabBgColorValueSet::~ScTabBgColorValueSet()
+{
+ dispose();
+}
+
+void ScTabBgColorDlg::ScTabBgColorValueSet::dispose()
+{
+ m_pTabBgColorDlg.clear();
+ SvxColorValueSet::dispose();
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeScTabBgColorValueSet(vcl::Window *pParent, VclBuilder::stringmap &rMap)
{
WinBits nWinBits = WB_TABSTOP;
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index cbfeca17bce7..9b49e34ef7f0 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -76,9 +76,28 @@ ScTabOpDlg::ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pPare
ScTabOpDlg::~ScTabOpDlg()
{
+ dispose();
+}
+
+void ScTabOpDlg::dispose()
+{
Hide();
+ m_pFtFormulaRange.clear();
+ m_pEdFormulaRange.clear();
+ m_pRBFormulaRange.clear();
+ m_pFtRowCell.clear();
+ m_pEdRowCell.clear();
+ m_pRBRowCell.clear();
+ m_pFtColCell.clear();
+ m_pEdColCell.clear();
+ m_pRBColCell.clear();
+ m_pBtnOk.clear();
+ m_pBtnCancel.clear();
+ pEdActive.clear();
+ ScAnyRefDlg::dispose();
}
+
void ScTabOpDlg::Init()
{
m_pBtnOk->SetClickHdl ( LINK( this, ScTabOpDlg, BtnHdl ) );
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index b784e93ddddb..42ab80231db8 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -93,6 +93,27 @@ ScNameDefDlg::ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* p
m_pEdName->SetSelection( aCurSel );
}
+ScNameDefDlg::~ScNameDefDlg()
+{
+ dispose();
+}
+
+void ScNameDefDlg::dispose()
+{
+ m_pEdName.clear();
+ m_pEdRange.clear();
+ m_pRbRange.clear();
+ m_pLbScope.clear();
+ m_pBtnRowHeader.clear();
+ m_pBtnColHeader.clear();
+ m_pBtnPrintArea.clear();
+ m_pBtnCriteria.clear();
+ m_pBtnAdd.clear();
+ m_pBtnCancel.clear();
+ m_pFtInfo.clear();
+ ScAnyRefDlg::dispose();
+}
+
void ScNameDefDlg::CancelPushed()
{
if (mbUndo)
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index abf323d3f0ed..33e4cbd79a57 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -107,7 +107,20 @@ ScNameDlg::~ScNameDlg()
void ScNameDlg::dispose()
{
- delete m_pRangeManagerTable;
+ m_pRangeManagerTable.clear();
+ m_pEdName.clear();
+ m_pEdAssign.clear();
+ m_pRbAssign.clear();
+ m_pLbScope.clear();
+ m_pBtnPrintArea.clear();
+ m_pBtnColHeader.clear();
+ m_pBtnCriteria.clear();
+ m_pBtnRowHeader.clear();
+ m_pBtnAdd.clear();
+ m_pBtnDelete.clear();
+ m_pBtnOk.clear();
+ m_pBtnCancel.clear();
+ m_pFtInfo.clear();
ScAnyRefDlg::dispose();
}
diff --git a/sc/source/ui/namedlg/namepast.cxx b/sc/source/ui/namedlg/namepast.cxx
index f508d32eebda..daf2b8e1d60e 100644
--- a/sc/source/ui/namedlg/namepast.cxx
+++ b/sc/source/ui/namedlg/namepast.cxx
@@ -70,7 +70,10 @@ ScNamePasteDlg::~ScNamePasteDlg()
void ScNamePasteDlg::dispose()
{
- delete mpTable;
+ m_pBtnPasteAll.clear();
+ m_pBtnPaste.clear();
+ m_pBtnClose.clear();
+ mpTable.clear();
ModalDialog::dispose();
}
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index ddbde5f5ab37..fd69e7a76aca 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -142,6 +142,13 @@ ScContentTree::ScContentTree( vcl::Window* pParent, const ResId& rResId ) :
ScContentTree::~ScContentTree()
{
+ dispose();
+}
+
+void ScContentTree::dispose()
+{
+ pParentWindow.clear();
+ SvTreeListBox::dispose();
}
// helper function for GetEntryAltText and GetEntryLongDescription
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index af06513fa587..a5b4d1d84472 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -109,7 +109,27 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
mpTestButton->SetClickHdl(LINK(this, ScCalcOptionsDialog, TestClickHdl));
}
-ScCalcOptionsDialog::~ScCalcOptionsDialog() {}
+ScCalcOptionsDialog::~ScCalcOptionsDialog()
+{
+ dispose();
+}
+
+void ScCalcOptionsDialog::dispose()
+{
+ mpLbOptionEdit.clear();
+
+ mpUseOpenCL.clear();
+ mpSpinButton.clear();
+ mpEditField.clear();
+ mpTestButton.clear();
+ mpFtFrequency.clear();
+ mpFtComputeUnits.clear();
+ mpFtMemory.clear();
+ mpOpenclInfoList.clear();
+ mpBtnAutomaticSelectionTrue.clear();
+ mpBtnAutomaticSelectionFalse.clear();
+ ModalDialog::dispose();
+}
void ScCalcOptionsDialog::OpenCLAutomaticSelectionChanged()
{
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx
index 08fad6cf17c3..254a18c1e0a2 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -36,6 +36,7 @@ class ScCalcOptionsDialog : public ModalDialog
public:
ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfig& rConfig);
virtual ~ScCalcOptionsDialog();
+ virtual void dispose() SAL_OVERRIDE;
DECL_LINK( BtnAutomaticSelectHdl, void* );
DECL_LINK( DeviceSelHdl, void* );
@@ -62,22 +63,22 @@ private:
#endif
private:
-
- CheckBox* mpEmptyAsZero;
- ListBox* mpConversion;
- ListBox* mpSyntax;
- CheckBox* mpUseOpenCL;
- NumericField* mpSpinButton;
- VclMultiLineEdit* mpEditField;
- PushButton* mpTestButton;
-
- FixedText* mpFtFrequency;
- FixedText* mpFtComputeUnits;
- FixedText* mpFtMemory;
-
- SvTreeListBox* mpOpenclInfoList;
- RadioButton* mpBtnAutomaticSelectionTrue;
- RadioButton* mpBtnAutomaticSelectionFalse;
+ VclPtr<CheckBox> mpEmptyAsZero;
+ VclPtr<ListBox> mpConversion;
+ VclPtr<ListBox> mpSyntax;
+
+ VclPtr<CheckBox> mpUseOpenCL;
+ VclPtr<NumericField> mpSpinButton;
+ VclPtr<VclMultiLineEdit> mpEditField;
+ VclPtr<PushButton> mpTestButton;
+
+ VclPtr<FixedText> mpFtFrequency;
+ VclPtr<FixedText> mpFtComputeUnits;
+ VclPtr<FixedText> mpFtMemory;
+
+ VclPtr<SvTreeListBox> mpOpenclInfoList;
+ VclPtr<RadioButton> mpBtnAutomaticSelectionTrue;
+ VclPtr<RadioButton> mpBtnAutomaticSelectionFalse;
OUString maSoftware;
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx
index b19eac983ea9..f38124ccab53 100644
--- a/sc/source/ui/optdlg/opredlin.cxx
+++ b/sc/source/ui/optdlg/opredlin.cxx
@@ -57,6 +57,16 @@ ScRedlineOptionsTabPage::ScRedlineOptionsTabPage( vcl::Window* pParent,
ScRedlineOptionsTabPage::~ScRedlineOptionsTabPage()
{
+ dispose();
+}
+
+void ScRedlineOptionsTabPage::dispose()
+{
+ m_pContentColorLB.clear();
+ m_pRemoveColorLB.clear();
+ m_pInsertColorLB.clear();
+ m_pMoveColorLB.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* ScRedlineOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index eaa0d3786afa..cd1195068cbf 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -73,6 +73,22 @@ void ScTpCalcOptions::dispose()
{
delete pOldOptions;
delete pLocalOptions;
+ m_pBtnIterate.clear();
+ m_pFtSteps.clear();
+ m_pEdSteps.clear();
+ m_pFtEps.clear();
+ m_pEdEps.clear();
+ m_pBtnDateStd.clear();
+ m_pBtnDateSc10.clear();
+ m_pBtnDate1904.clear();
+ m_pBtnCase.clear();
+ m_pBtnCalc.clear();
+ m_pBtnMatch.clear();
+ m_pBtnRegex.clear();
+ m_pBtnLookUp.clear();
+ m_pBtnGeneralPrec.clear();
+ m_pFtPrec.clear();
+ m_pEdPrec.clear();
SfxTabPage::dispose();
}
diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx b/sc/source/ui/optdlg/tpcompatibility.cxx
index 10dc87bc0a89..bb81ab2fa257 100644
--- a/sc/source/ui/optdlg/tpcompatibility.cxx
+++ b/sc/source/ui/optdlg/tpcompatibility.cxx
@@ -23,6 +23,13 @@ ScTpCompatOptions::ScTpCompatOptions(vcl::Window *pParent, const SfxItemSet &rCo
ScTpCompatOptions::~ScTpCompatOptions()
{
+ dispose();
+}
+
+void ScTpCompatOptions::dispose()
+{
+ m_pLbKeyBindings.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* ScTpCompatOptions::Create(vcl::Window *pParent, const SfxItemSet *rCoreAttrs)
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx
index fc8cd2bcd8f7..bb3bea8d8ec7 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -30,6 +30,14 @@ ScTpDefaultsOptions::ScTpDefaultsOptions(vcl::Window *pParent, const SfxItemSet
ScTpDefaultsOptions::~ScTpDefaultsOptions()
{
+ dispose();
+}
+
+void ScTpDefaultsOptions::dispose()
+{
+ m_pEdNSheets.clear();
+ m_pEdSheetPrefix.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* ScTpDefaultsOptions::Create(vcl::Window *pParent, const SfxItemSet *rCoreAttrs)
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 325cad6b50a5..2f3afe61c4d9 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -81,6 +81,23 @@ ScTpFormulaOptions::ScTpFormulaOptions(vcl::Window* pParent, const SfxItemSet& r
ScTpFormulaOptions::~ScTpFormulaOptions()
{
+ dispose();
+}
+
+void ScTpFormulaOptions::dispose()
+{
+ mpLbFormulaSyntax.clear();
+ mpCbEnglishFuncName.clear();
+ mpBtnCustomCalcDefault.clear();
+ mpBtnCustomCalcCustom.clear();
+ mpBtnCustomCalcDetails.clear();
+ mpEdSepFuncArg.clear();
+ mpEdSepArrayCol.clear();
+ mpEdSepArrayRow.clear();
+ mpBtnSepReset.clear();
+ mpLbOOXMLRecalcOptions.clear();
+ mpLbODFRecalcOptions.clear();
+ SfxTabPage::dispose();
}
void ScTpFormulaOptions::ResetSeparators()
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index ae2d9def5809..67fe07ee76e4 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -41,6 +41,15 @@ ScTpPrintOptions::ScTpPrintOptions( vcl::Window* pParent,
ScTpPrintOptions::~ScTpPrintOptions()
{
+ dispose();
+}
+
+void ScTpPrintOptions::dispose()
+{
+ m_pSkipEmptyPagesCB.clear();
+ m_pSelectedSheetsCB.clear();
+ m_pForceBreaksCB.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* ScTpPrintOptions::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 490a2fc956ad..4e3a9902f43d 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -91,6 +91,18 @@ void ScTpUserLists::dispose()
{
delete pUserLists;
delete pRangeUtil;
+ mpFtLists.clear();
+ mpLbLists.clear();
+ mpFtEntries.clear();
+ mpEdEntries.clear();
+ mpFtCopyFrom.clear();
+ mpEdCopyFrom.clear();
+ mpBtnNew.clear();
+ mpBtnDiscard.clear();
+ mpBtnAdd.clear();
+ mpBtnModify.clear();
+ mpBtnRemove.clear();
+ mpBtnCopy.clear();
SfxTabPage::dispose();
}
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 82cf00b1c0b3..40571f21a553 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -101,6 +101,27 @@ ScTpContentOptions::~ScTpContentOptions()
void ScTpContentOptions::dispose()
{
delete pLocalOptions;
+ pGridLB.clear();
+ pColorFT.clear();
+ pColorLB.clear();
+ pBreakCB.clear();
+ pGuideLineCB.clear();
+ pFormulaCB.clear();
+ pNilCB.clear();
+ pAnnotCB.clear();
+ pValueCB.clear();
+ pAnchorCB.clear();
+ pClipMarkCB.clear();
+ pRangeFindCB.clear();
+ pObjGrfLB.clear();
+ pDiagramLB.clear();
+ pDrawLB.clear();
+ pSyncZoomCB.clear();
+ pRowColHeaderCB.clear();
+ pHScrollCB.clear();
+ pVScrollCB.clear();
+ pTblRegCB.clear();
+ pOutlineCB.clear();
SfxTabPage::dispose();
}
@@ -412,8 +433,30 @@ ScTpLayoutOptions::ScTpLayoutOptions( vcl::Window* pParent,
ScTpLayoutOptions::~ScTpLayoutOptions()
{
+ dispose();
+}
+
+void ScTpLayoutOptions::dispose()
+{
+ m_pUnitLB.clear();
+ m_pTabMF.clear();
+ m_pAlwaysRB.clear();
+ m_pRequestRB.clear();
+ m_pNeverRB.clear();
+ m_pAlignCB.clear();
+ m_pAlignLB.clear();
+ m_pEditModeCB.clear();
+ m_pFormatCB.clear();
+ m_pExpRefCB.clear();
+ m_pSortRefUpdateCB.clear();
+ m_pMarkHdrCB.clear();
+ m_pTextFmtCB.clear();
+ m_pReplWarnCB.clear();
+ m_pLegacyCellSelectionCB.clear();
+ SfxTabPage::dispose();
}
+
SfxTabPage* ScTpLayoutOptions::Create( vcl::Window* pParent,
const SfxItemSet* rCoreSet )
{
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 36471e61c5a0..9f778e347556 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -150,6 +150,18 @@ void ScPrintAreasDlg::dispose()
for ( sal_uInt16 j=0; j<nCount; j++ )
delete static_cast<OUString*>(aLb[i]->GetEntryData(j));
}
+ pLbPrintArea.clear();
+ pEdPrintArea.clear();
+ pRbPrintArea.clear();
+ pLbRepeatRow.clear();
+ pEdRepeatRow.clear();
+ pRbRepeatRow.clear();
+ pLbRepeatCol.clear();
+ pEdRepeatCol.clear();
+ pRbRepeatCol.clear();
+ pBtnOk.clear();
+ pBtnCancel.clear();
+ pRefInputEdit.clear();
ScAnyRefDlg::dispose();
}
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index dcac934968eb..bb7cfdab367f 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -152,6 +152,32 @@ IMPL_LINK( ScHFEditPage, ObjectSelectHdl, ScEditWindow*, pEdit )
ScHFEditPage::~ScHFEditPage()
{
+ dispose();
+}
+
+void ScHFEditPage::dispose()
+{
+ m_pWndLeft.clear();
+ m_pWndCenter.clear();
+ m_pWndRight.clear();
+ m_pFtDefinedHF.clear();
+ m_pLbDefined.clear();
+ m_pFtCustomHF.clear();
+ m_pBtnText.clear();
+ m_pBtnFile.clear();
+ m_pBtnTable.clear();
+ m_pBtnPage.clear();
+ m_pBtnLastPage.clear();
+ m_pBtnDate.clear();
+ m_pBtnTime.clear();
+ m_pFtConfidential.clear();
+ m_pFtPage.clear();
+ m_pFtOfQuestion.clear();
+ m_pFtOf.clear();
+ m_pFtNone.clear();
+ m_pFtCreatedBy.clear();
+ m_pFtCustomized.clear();
+ SfxTabPage::dispose();
}
void ScHFEditPage::SetNumType(SvxNumType eNumType)
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index 994067e639be..3f2bc306f3a2 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -78,6 +78,14 @@ ScHFPage::ScHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSe
ScHFPage::~ScHFPage()
{
+ dispose();
+}
+
+void ScHFPage::dispose()
+{
+ m_pBtnEdit.clear();
+ pStyleDlg.clear();
+ SvxHFPage::dispose();
}
void ScHFPage::Reset( const SfxItemSet* rSet )
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index ed56d2ed9e6b..80663da3924d 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -125,6 +125,33 @@ void ScTablePage::ShowImage()
ScTablePage::~ScTablePage()
{
+ dispose();
+}
+
+void ScTablePage::dispose()
+{
+ m_pBtnTopDown.clear();
+ m_pBtnLeftRight.clear();
+ m_pBmpPageDir.clear();
+ m_pBtnPageNo.clear();
+ m_pEdPageNo.clear();
+ m_pBtnHeaders.clear();
+ m_pBtnGrid.clear();
+ m_pBtnNotes.clear();
+ m_pBtnObjects.clear();
+ m_pBtnCharts.clear();
+ m_pBtnDrawings.clear();
+ m_pBtnFormulas.clear();
+ m_pBtnNullVals.clear();
+ m_pLbScaleMode.clear();
+ m_pBxScaleAll.clear();
+ m_pEdScaleAll.clear();
+ m_pGrHeightWidth.clear();
+ m_pEdScalePageWidth.clear();
+ m_pEdScalePageHeight.clear();
+ m_pBxScalePageNum.clear();
+ m_pEdScalePageNum.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* ScTablePage::Create( vcl::Window* pParent, const SfxItemSet* rCoreSet )
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index e10b53830ffb..2cacee3f97f5 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -68,6 +68,20 @@ AlignmentPropertyPanel::AlignmentPropertyPanel(
AlignmentPropertyPanel::~AlignmentPropertyPanel()
{
+ dispose();
+}
+
+void AlignmentPropertyPanel::dispose()
+{
+ mpFTLeftIndent.clear();
+ mpMFLeftIndent.clear();
+ mpCBXWrapText.clear();
+ mpCBXMergeCell.clear();
+ mpFtRotate.clear();
+ mpCtrlDial.clear();
+ mpMtrAngle.clear();
+ mpCbStacked.clear();
+ PanelLayout::dispose();
}
void AlignmentPropertyPanel::Initialize()
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx
index 050c79d48b63..e41aab35933e 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx
@@ -58,16 +58,19 @@ public:
SfxBindings* GetBindings() { return mpBindings;}
+ virtual ~AlignmentPropertyPanel();
+ virtual void dispose() SAL_OVERRIDE;
+
private:
//ui controls
- FixedText* mpFTLeftIndent;
- MetricField* mpMFLeftIndent;
- CheckBox* mpCBXWrapText;
- CheckBox* mpCBXMergeCell;
- FixedText* mpFtRotate;
- svx::sidebar::SidebarDialControl* mpCtrlDial;
- MetricBox* mpMtrAngle;
- CheckBox* mpCbStacked;
+ VclPtr<FixedText> mpFTLeftIndent;
+ VclPtr<MetricField> mpMFLeftIndent;
+ VclPtr<CheckBox> mpCBXWrapText;
+ VclPtr<CheckBox> mpCBXMergeCell;
+ VclPtr<FixedText> mpFtRotate;
+ VclPtr<svx::sidebar::SidebarDialControl> mpCtrlDial;
+ VclPtr<MetricBox> mpMtrAngle;
+ VclPtr<CheckBox> mpCbStacked;
::sfx2::sidebar::ControllerItem maAlignHorControl;
::sfx2::sidebar::ControllerItem maLeftIndentControl;
@@ -95,7 +98,6 @@ private:
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings);
- virtual ~AlignmentPropertyPanel();
void Initialize();
void FormatDegrees(double& dTmp);
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index af0bfe8fbe90..b79e4fb5c5d8 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -142,6 +142,16 @@ CellAppearancePropertyPanel::CellAppearancePropertyPanel(
CellAppearancePropertyPanel::~CellAppearancePropertyPanel()
{
+ dispose();
+}
+
+void CellAppearancePropertyPanel::dispose()
+{
+ mpTBCellBorder.clear();
+ mpTBLineStyle.clear();
+ mpTBLineColor.clear();
+ mpCBXShowGrid.clear();
+ PanelLayout::dispose();
}
void CellAppearancePropertyPanel::Initialize()
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
index f8da7a59bfb9..d31b0e259a74 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
@@ -69,14 +69,17 @@ public:
SfxBindings* GetBindings() { return mpBindings;}
+ virtual ~CellAppearancePropertyPanel();
+ virtual void dispose() SAL_OVERRIDE;
+
private:
//ui controls
- ToolBox* mpTBCellBorder;
- ToolBox* mpTBLineStyle;
- ToolBox* mpTBLineColor;
+ VclPtr<ToolBox> mpTBCellBorder;
+ VclPtr<ToolBox> mpTBLineStyle;
+ VclPtr<ToolBox> mpTBLineColor;
::boost::scoped_ptr< CellBorderUpdater > mpCellBorderUpdater;
- CheckBox* mpCBXShowGrid;
+ VclPtr<CheckBox> mpCBXShowGrid;
::sfx2::sidebar::ControllerItem maLineStyleControl;
::sfx2::sidebar::ControllerItem maBorderOuterControl;
@@ -150,7 +153,6 @@ private:
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings);
- virtual ~CellAppearancePropertyPanel();
void Initialize();
void SetStyleIcon();
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index c37fc116b58b..ba600e2f2f29 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -70,6 +70,18 @@ NumberFormatPropertyPanel::NumberFormatPropertyPanel(
NumberFormatPropertyPanel::~NumberFormatPropertyPanel()
{
+ dispose();
+}
+
+void NumberFormatPropertyPanel::dispose()
+{
+ mpLbCategory.clear();
+ mpTBCategory.clear();
+ mpEdDecimals.clear();
+ mpEdLeadZeroes.clear();
+ mpBtnNegRed.clear();
+ mpBtnThousand.clear();
+ PanelLayout::dispose();
}
void NumberFormatPropertyPanel::Initialize()
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
index 5fe5df1aeb63..8747f2d30cc6 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
@@ -56,14 +56,16 @@ public:
SfxBindings* GetBindings() { return mpBindings;}
+ virtual ~NumberFormatPropertyPanel();
+ virtual void dispose() SAL_OVERRIDE;
private:
//ui controls
- ListBox* mpLbCategory;
- ToolBox* mpTBCategory;
- NumericField* mpEdDecimals;
- NumericField* mpEdLeadZeroes;
- CheckBox* mpBtnNegRed;
- CheckBox* mpBtnThousand;
+ VclPtr<ListBox> mpLbCategory;
+ VclPtr<ToolBox> mpTBCategory;
+ VclPtr<NumericField> mpEdDecimals;
+ VclPtr<NumericField> mpEdLeadZeroes;
+ VclPtr<CheckBox> mpBtnNegRed;
+ VclPtr<CheckBox> mpBtnThousand;
::sfx2::sidebar::ControllerItem maNumFormatControl;
::sfx2::sidebar::ControllerItem maFormatControl;
@@ -83,7 +85,6 @@ private:
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings);
- virtual ~NumberFormatPropertyPanel();
void Initialize();
};
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index 0c8eaf4f5263..078060d87e25 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -162,14 +162,14 @@ private:
DECL_LINK( processWindowResizeEvent, vcl::Window* );
private:
- typedef ::std::map< vcl::Window*, uno::Reference< frame::XController > > WindowControllerMap;
+ typedef ::std::map< VclPtr<vcl::Window>, uno::Reference< frame::XController > > WindowControllerMap;
::osl::Mutex maMutex;
ScVbaEventsHelper& mrVbaEvents;
uno::Reference< frame::XModel > mxModel;
ScDocShell* mpDocShell;
WindowControllerMap maControllers; /// Maps VCL top windows to their controllers.
- vcl::Window* mpActiveWindow; /// Currently activated window, to prevent multiple (de)activation.
+ VclPtr<vcl::Window> mpActiveWindow; /// Currently activated window, to prevent multiple (de)activation.
bool mbWindowResized; /// True = window resize system event processed.
bool mbBorderChanged; /// True = borders changed system event processed.
bool mbDisposed;
@@ -274,7 +274,7 @@ void SAL_CALL ScVbaEventListener::windowActivated( const lang::EventObject& rEve
{
uno::Reference< awt::XWindow > xWindow( rEvent.Source, uno::UNO_QUERY );
vcl::Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
- OSL_TRACE( "ScVbaEventListener::windowActivated - pWindow = 0x%p, mpActiveWindow = 0x%p", pWindow, mpActiveWindow );
+ OSL_TRACE( "ScVbaEventListener::windowActivated - pWindow = 0x%p, mpActiveWindow = 0x%p", pWindow, mpActiveWindow.get() );
// do not fire activation event multiple time for the same window
if( pWindow && (pWindow != mpActiveWindow) )
{
@@ -296,7 +296,7 @@ void SAL_CALL ScVbaEventListener::windowDeactivated( const lang::EventObject& rE
{
uno::Reference< awt::XWindow > xWindow( rEvent.Source, uno::UNO_QUERY );
vcl::Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
- OSL_TRACE( "ScVbaEventListener::windowDeactivated - pWindow = 0x%p, mpActiveWindow = 0x%p", pWindow, mpActiveWindow );
+ OSL_TRACE( "ScVbaEventListener::windowDeactivated - pWindow = 0x%p, mpActiveWindow = 0x%p", pWindow, mpActiveWindow.get() );
// do not fire the deactivation event, if the window is not active (prevent multiple deactivation)
if( pWindow && (pWindow == mpActiveWindow) )
processWindowActivateEvent( pWindow, false );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index ea3a10b19060..783c3adbc783 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -205,7 +205,7 @@ bool ScGridWindow::VisibleRange::set(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCRO
class ScFilterListBox : public ListBox
{
private:
- ScGridWindow* pGridWin;
+ VclPtr<ScGridWindow> pGridWin;
SCCOL nCol;
SCROW nRow;
bool bButtonDown;
@@ -266,6 +266,7 @@ void ScFilterListBox::dispose()
{
if (IsMouseCaptured())
ReleaseMouse();
+ pGridWin.clear();
ListBox::dispose();
}
@@ -537,8 +538,8 @@ void ScGridWindow::dispose()
// #114409#
ImpDestroyOverlayObjects();
- delete pFilterBox;
- delete pFilterFloat;
+ pFilterBox.clear();
+ pFilterFloat.clear();
delete pNoteMarker;
vcl::Window::dispose();
}
@@ -554,8 +555,8 @@ void ScGridWindow::ClickExtern()
{
break;
}
- mpFilterBox.reset();
- mpFilterFloat.reset();
+ mpFilterBox.disposeAndClear();
+ mpFilterFloat.disposeAndClear();
}
while (false);
@@ -631,7 +632,7 @@ struct AutoFilterData : public ScCheckListMenuWindow::ExtendedData
class AutoFilterAction : public ScMenuFloatingWindow::Action
{
- ScGridWindow* mpWindow;
+ VclPtr<ScGridWindow> mpWindow;
ScGridWindow::AutoFilterMode meMode;
public:
AutoFilterAction(ScGridWindow* p, ScGridWindow::AutoFilterMode eMode) :
@@ -644,7 +645,7 @@ public:
class AutoFilterPopupEndAction : public ScMenuFloatingWindow::Action
{
- ScGridWindow* mpWindow;
+ VclPtr<ScGridWindow> mpWindow;
ScAddress maPos;
public:
AutoFilterPopupEndAction(ScGridWindow* p, const ScAddress& rPos) :
@@ -952,8 +953,8 @@ void ScGridWindow::LaunchDPFieldMenu( SCCOL nCol, SCROW nRow )
void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
{
- mpFilterBox.reset();
- mpFilterFloat.reset();
+ mpFilterBox.disposeAndClear();
+ mpFilterFloat.disposeAndClear();
SCCOL nCol = rScenRange.aEnd.Col(); // Zelle unterhalb des Buttons
SCROW nRow = rScenRange.aStart.Row();
@@ -1088,8 +1089,8 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelect )
{
- mpFilterBox.reset();
- mpFilterFloat.reset();
+ mpFilterBox.disposeAndClear();
+ mpFilterFloat.disposeAndClear();
sal_uInt16 i;
ScDocument* pDoc = pViewData->GetDocument();
@@ -1324,8 +1325,8 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
if ( bEmpty )
{
- mpFilterBox.reset();
- mpFilterFloat.reset();
+ mpFilterBox.disposeAndClear();
+ mpFilterFloat.disposeAndClear();
}
else
{
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 60b27acf04d9..3200a0ee2b49 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -395,7 +395,7 @@ public:
mpGridWindow->UpdateDPFromFieldPopupMenu();
}
private:
- ScGridWindow* mpGridWindow;
+ VclPtr<ScGridWindow> mpGridWindow;
};
class PopupSortAction : public ScMenuFloatingWindow::Action
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 29398d4fdc13..d94b6f506c23 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -196,10 +196,10 @@ ScPreviewShell::~ScPreviewShell()
EndListening(*pDocShell);
SetWindow(0);
- delete pPreview;
- delete pHorScroll;
- delete pVerScroll;
- delete pCorner;
+ pPreview.clear();
+ pHorScroll.clear();
+ pVerScroll.clear();
+ pCorner.clear();
// normal mode of operation is switching back to default view in the same frame,
// so there's no need to activate any other window here anymore
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index d6a1258d14f4..c37898763699 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -187,42 +187,42 @@ void ScSimpleRefDlgWrapper::SetAutoReOpen(bool bFlag)
void ScSimpleRefDlgWrapper::SetRefString(const OUString& rStr)
{
- if(pWindow!=NULL)
+ if(pWindow!=nullptr)
{
- static_cast<ScSimpleRefDlg*>(pWindow)->SetRefString(rStr);
+ static_cast<ScSimpleRefDlg*>(pWindow.get())->SetRefString(rStr);
}
}
void ScSimpleRefDlgWrapper::SetCloseHdl( const Link& rLink )
{
- if(pWindow!=NULL)
+ if(pWindow!=nullptr)
{
- static_cast<ScSimpleRefDlg*>(pWindow)->SetCloseHdl( rLink );
+ static_cast<ScSimpleRefDlg*>(pWindow.get())->SetCloseHdl( rLink );
}
}
void ScSimpleRefDlgWrapper::SetUnoLinks( const Link& rDone,
const Link& rAbort, const Link& rChange )
{
- if(pWindow!=NULL)
+ if(pWindow!=nullptr)
{
- static_cast<ScSimpleRefDlg*>(pWindow)->SetUnoLinks( rDone, rAbort, rChange );
+ static_cast<ScSimpleRefDlg*>(pWindow.get())->SetUnoLinks( rDone, rAbort, rChange );
}
}
void ScSimpleRefDlgWrapper::SetFlags( bool bCloseOnButtonUp, bool bSingleCell, bool bMultiSelection )
{
- if(pWindow!=NULL)
+ if(pWindow!=nullptr)
{
- static_cast<ScSimpleRefDlg*>(pWindow)->SetFlags( bCloseOnButtonUp, bSingleCell, bMultiSelection );
+ static_cast<ScSimpleRefDlg*>(pWindow.get())->SetFlags( bCloseOnButtonUp, bSingleCell, bMultiSelection );
}
}
void ScSimpleRefDlgWrapper::StartRefInput()
{
- if(pWindow!=NULL)
+ if(pWindow!=nullptr)
{
- static_cast<ScSimpleRefDlg*>(pWindow)->StartRefInput();
+ static_cast<ScSimpleRefDlg*>(pWindow.get())->StartRefInput();
}
}
@@ -240,9 +240,9 @@ ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper( vcl::Window* pParentP,
pWindow = pViewShell ?
new ScAcceptChgDlg( pBindings, this, pParentP, &pViewShell->GetViewData() ) :
NULL;
- if(pWindow!=NULL)
+ if(pWindow!=nullptr)
{
- static_cast<ScAcceptChgDlg*>(pWindow)->Initialize( pInfo );
+ static_cast<ScAcceptChgDlg*>(pWindow.get())->Initialize( pInfo );
}
if (pViewShell && !pWindow)
pViewShell->GetViewFrame()->SetChildWindow( nId, false );
@@ -254,9 +254,9 @@ void ScAcceptChgDlgWrapper::ReInitDlg()
PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
OSL_ENSURE( pViewShell, "missing view shell :-(" );
- if(pWindow!=NULL && pViewShell)
+ if(pWindow!=nullptr && pViewShell)
{
- static_cast<ScAcceptChgDlg*>(pWindow)->ReInit(&pViewShell->GetViewData());
+ static_cast<ScAcceptChgDlg*>(pWindow.get())->ReInit(&pViewShell->GetViewData());
}
}
@@ -289,7 +289,7 @@ ScValidityRefChildWin::ScValidityRefChildWin( vcl::Window* pParent
{
SetWantsFocus( false );
ScTabViewShell* pViewShell =
- NULL != ( pWindow = ScValidationDlg::Find1AliveObject( pParentP ) ) ? static_cast<ScValidationDlg*>(pWindow)->GetTabViewShell() :
+ nullptr != ( pWindow = ScValidationDlg::Find1AliveObject( pParentP ) ) ? static_cast<ScValidationDlg*>(pWindow.get())->GetTabViewShell() :
lcl_GetTabViewShell( p );
if (!pViewShell)
pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 9cf9fb3ceb12..57536edd9949 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2229,7 +2229,7 @@ void ScTabView::EnableRefInput(bool bFlag)
// ab hier dynamisch angelegte
- if(pTabControl!=NULL) pTabControl->EnableInput(bFlag,true);
+ if(pTabControl!=nullptr) pTabControl->EnableInput(bFlag,true);
if(pGridWin[SC_SPLIT_BOTTOMLEFT]!=NULL)
pGridWin[SC_SPLIT_BOTTOMLEFT]->EnableInput(bFlag,false);
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 19ff7e61a141..fd6a6c62f454 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -190,10 +190,9 @@ ScTabView::~ScTabView()
delete pRowOutline[i];
}
- delete pHSplitter;
- delete pVSplitter;
-
- delete pTabControl;
+ pHSplitter.clear();
+ pVSplitter.clear();
+ pTabControl.clear();
}
void ScTabView::MakeDrawView( sal_uInt8 nForceDesignMode )
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index e789276d6a0b..ef260874086b 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -115,9 +115,28 @@ ScXMLSourceDlg::ScXMLSourceDlg(
mpBtnSelectSource->GrabFocus(); // Initial focus is on the select source button.
}
+ScXMLSourceDlg::~ScXMLSourceDlg()
+{
+ dispose();
+}
+
+void ScXMLSourceDlg::dispose()
+{
+ mpBtnSelectSource.clear();
+ mpFtSourceFile.clear();
+ mpMapGrid.clear();
+ mpLbTree.clear();
+ mpRefEdit.clear();
+ mpRefBtn.clear();
+ mpBtnOk.clear();
+ mpBtnCancel.clear();
+ mpActiveEdit.clear();
+ ScAnyRefDlg::dispose();
+}
+
bool ScXMLSourceDlg::IsRefInputMode() const
{
- return mpActiveEdit != NULL && mpActiveEdit->IsEnabled();
+ return mpActiveEdit != nullptr && mpActiveEdit->IsEnabled();
}
void ScXMLSourceDlg::SetReference(const ScRange& rRange, ScDocument* pDoc)
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 4999b48d1dac..acd6dd9b6307 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -190,7 +190,7 @@ private:
*/
::boost::weak_ptr<ViewShell> mpWeakViewShell;
/// This window contains the view.
- ::sd::Window* mpWindow;
+ VclPtr<::sd::Window> mpWindow;
/// The document on whose objects and pages this class operates.
SdDrawDocument* mpDrawDocument;
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 4a36503c83b2..200e62b432a1 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -347,12 +347,13 @@ SvStream& WriteSdPublishingDesign(SvStream& rOut, const SdPublishingDesign& rDes
class SdDesignNameDlg : public ModalDialog
{
private:
- Edit* m_pEdit;
- OKButton* m_pBtnOK;
+ VclPtr<Edit> m_pEdit;
+ VclPtr<OKButton> m_pBtnOK;
public:
SdDesignNameDlg(vcl::Window* pWindow, const OUString& aName );
-
+ virtual ~SdDesignNameDlg();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetDesignName();
DECL_LINK(ModifyHdl, void *);
};
@@ -483,8 +484,97 @@ SdPublishingDlg::SdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType)
SdPublishingDlg::~SdPublishingDlg()
{
+ dispose();
+}
+
+void SdPublishingDlg::dispose()
+{
+ pPage1.clear();
+ pPage1_Titel.clear();
+ pPage1_NewDesign.clear();
+ pPage1_OldDesign.clear();
+ pPage1_Designs.clear();
+ pPage1_DelDesign.clear();
+ pPage1_Desc.clear();
+ pPage2.clear();
+ pPage2Frame2.clear();
+ pPage2Frame3.clear();
+ pPage2Frame4.clear();
+ pPage2_Titel.clear();
+ pPage2_Standard.clear();
+ pPage2_Frames.clear();
+ pPage2_SingleDocument.clear();
+ pPage2_Kiosk.clear();
+ pPage2_WebCast.clear();
+ pPage2_Standard_FB.clear();
+ pPage2_Frames_FB.clear();
+ pPage2_Kiosk_FB.clear();
+ pPage2_WebCast_FB.clear();
+ pPage2_Titel_Html.clear();
+ pPage2_Content.clear();
+ pPage2_Notes.clear();
+ pPage2_Titel_WebCast.clear();
+ pPage2_ASP.clear();
+ pPage2_PERL.clear();
+ pPage2_URL_txt.clear();
+ pPage2_URL.clear();
+ pPage2_CGI_txt.clear();
+ pPage2_CGI.clear();
+ pPage2_Index_txt.clear();
+ pPage2_Index.clear();
+ pPage2_Titel_Kiosk.clear();
+ pPage2_ChgDefault.clear();
+ pPage2_ChgAuto.clear();
+ pPage2_Duration_txt.clear();
+ pPage2_Duration.clear();
+ pPage2_Endless.clear();
+ pPage3.clear();
+ pPage3_Titel1.clear();
+ pPage3_Png.clear();
+ pPage3_Gif.clear();
+ pPage3_Jpg.clear();
+ pPage3_Quality_txt.clear();
+ pPage3_Quality.clear();
+ pPage3_Titel2.clear();
+ pPage3_Resolution_1.clear();
+ pPage3_Resolution_2.clear();
+ pPage3_Resolution_3.clear();
+ pPage3_Titel3.clear();
+ pPage3_SldSound.clear();
+ pPage3_HiddenSlides.clear();
+ pPage4.clear();
+ pPage4_Titel1.clear();
+ pPage4_Author_txt.clear();
+ pPage4_Author.clear();
+ pPage4_Email_txt.clear();
+ pPage4_Email.clear();
+ pPage4_WWW_txt.clear();
+ pPage4_WWW.clear();
+ pPage4_Titel2.clear();
+ pPage4_Misc.clear();
+ pPage4_Download.clear();
+ pPage5.clear();
+ pPage5_Titel.clear();
+ pPage5_TextOnly.clear();
+ pPage5_Buttons.clear();
+ pPage6.clear();
+ pPage6_Titel.clear();
+ pPage6_Default.clear();
+ pPage6_User.clear();
+ pPage6_Back.clear();
+ pPage6_Text.clear();
+ pPage6_Link.clear();
+ pPage6_VLink.clear();
+ pPage6_ALink.clear();
+ pPage6_DocColors.clear();
+ pPage6_Preview.clear();
+ pLastPageButton.clear();
+ pNextPageButton.clear();
+ pFinishButton.clear();
+ ModalDialog::dispose();
}
+
// Generate dialog controls and embed them in the pages
void SdPublishingDlg::CreatePages()
{
@@ -1542,6 +1632,18 @@ SdDesignNameDlg::SdDesignNameDlg(vcl::Window* pWindow, const OUString& aName)
m_pBtnOK->Enable(!aName.isEmpty());
}
+SdDesignNameDlg::~SdDesignNameDlg()
+{
+ dispose();
+}
+
+void SdDesignNameDlg::dispose()
+{
+ m_pEdit.clear();
+ m_pBtnOK.clear();
+ ModalDialog::dispose();
+}
+
OUString SdDesignNameDlg::GetDesignName()
{
return m_pEdit->GetText();
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index 8d04f48fe315..dc6aa03db0a4 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -96,7 +96,7 @@ private:
sal_Int32 mnFirstVisibleChild;
sal_Int32 mnLastVisibleChild;
bool mbListeningToDocument;
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
sal_Int32 mnFocusedIndex;
bool mbModelChangeLocked;
ImplSVEvent * mnUpdateChildrenUserEventId;
@@ -221,7 +221,7 @@ Reference<XAccessible > SAL_CALL AccessibleSlideSorterView::getAccessibleParent
const SolarMutexGuard aSolarGuard;
Reference<XAccessible> xParent;
- if (mpContentWindow != NULL)
+ if (mpContentWindow != nullptr)
{
vcl::Window* pParent = mpContentWindow->GetAccessibleParentWindow();
if (pParent != NULL)
@@ -302,7 +302,7 @@ Reference<XAccessibleStateSet > SAL_CALL
pStateSet->AddState(AccessibleStateType::ACTIVE);
pStateSet->AddState(AccessibleStateType::MULTI_SELECTABLE);
pStateSet->AddState(AccessibleStateType::OPAQUE);
- if (mpContentWindow!=NULL)
+ if (mpContentWindow!=nullptr)
{
if (mpContentWindow->IsVisible())
pStateSet->AddState(AccessibleStateType::VISIBLE);
@@ -416,7 +416,7 @@ awt::Rectangle SAL_CALL AccessibleSlideSorterView::getBounds (void)
const SolarMutexGuard aSolarGuard;
awt::Rectangle aBBox;
- if (mpContentWindow != NULL)
+ if (mpContentWindow != nullptr)
{
const Point aPosition (mpContentWindow->GetPosPixel());
const Size aSize (mpContentWindow->GetOutputSizePixel());
@@ -436,7 +436,7 @@ awt::Point SAL_CALL AccessibleSlideSorterView::getLocation (void)
ThrowIfDisposed();
awt::Point aLocation;
- if (mpContentWindow != NULL)
+ if (mpContentWindow != nullptr)
{
const Point aPosition (mpContentWindow->GetPosPixel());
aLocation.X = aPosition.X();
@@ -478,7 +478,7 @@ awt::Size SAL_CALL AccessibleSlideSorterView::getSize (void)
ThrowIfDisposed();
awt::Size aSize;
- if (mpContentWindow != NULL)
+ if (mpContentWindow != nullptr)
{
const Size aOutputSize (mpContentWindow->GetOutputSizePixel());
aSize.Width = aOutputSize.Width();
@@ -813,7 +813,7 @@ void AccessibleSlideSorterView::Implementation::ConnectListeners (void)
StartListening (*mrSlideSorter.GetViewShell());
mbListeningToDocument = true;
- if (mpWindow != NULL)
+ if (mpWindow != nullptr)
mpWindow->AddEventListener(
LINK(this,AccessibleSlideSorterView::Implementation,WindowEventListener));
@@ -834,7 +834,7 @@ void AccessibleSlideSorterView::Implementation::ReleaseListeners (void)
mrSlideSorter.GetView().RemoveVisibilityChangeListener(
LINK(this,AccessibleSlideSorterView::Implementation,VisibilityChangeListener));
- if (mpWindow != NULL)
+ if (mpWindow != nullptr)
mpWindow->RemoveEventListener(
LINK(this,AccessibleSlideSorterView::Implementation,WindowEventListener));
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 5e7c988e148e..358ce0705cc9 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -165,6 +165,7 @@ class CustomAnimationCreateTabPage : public TabPage
public:
CustomAnimationCreateTabPage( vcl::Window* pParent, CustomAnimationCreateDialog* pDialogParent, sal_uInt16 nTabId, const PresetCategoryList& rCategoryList, bool bHasText, bool bIsMotionPath = false );
virtual ~CustomAnimationCreateTabPage();
+ virtual void dispose() SAL_OVERRIDE;
PathKind getCreatePathKind() const;
CustomAnimationPresetPtr getSelectedPreset() const;
@@ -187,12 +188,12 @@ private:
void clearEffects();
private:
- CategoryListBox* mpLBEffects;
- FixedText* mpFTSpeed;
- ListBox* mpCBSpeed;
- CheckBox* mpCBXPReview;
+ VclPtr<CategoryListBox> mpLBEffects;
+ VclPtr<FixedText> mpFTSpeed;
+ VclPtr<ListBox> mpCBSpeed;
+ VclPtr<CheckBox> mpCBXPReview;
- CustomAnimationCreateDialog* mpParent;
+ VclPtr<CustomAnimationCreateDialog> mpParent;
sal_uInt16 mnId;
@@ -296,7 +297,18 @@ CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( vcl::Window* pParent
CustomAnimationCreateTabPage::~CustomAnimationCreateTabPage()
{
+ dispose();
+}
+
+void CustomAnimationCreateTabPage::dispose()
+{
clearEffects();
+ mpLBEffects.clear();
+ mpFTSpeed.clear();
+ mpCBSpeed.clear();
+ mpCBXPReview.clear();
+ mpParent.clear();
+ TabPage::dispose();
}
IMPL_LINK( CustomAnimationCreateTabPage, implSelectHdl, Control*, pControl )
@@ -548,6 +560,8 @@ void CustomAnimationCreateDialog::dispose()
delete mpTabPages[MOTIONPATH];
delete mpTabPages[MISCEFFECTS];
+ mpTabControl.clear();
+ mpPane.clear();
TabDialog::dispose();
}
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.hxx b/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
index 7ae2ec75a9fd..974b3f34de17 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
@@ -57,13 +57,13 @@ private:
DECL_LINK(implDeactivatePagekHdl, void *);
private:
- CustomAnimationPane* mpPane;
+ VclPtr<CustomAnimationPane> mpPane;
const std::vector< ::com::sun::star::uno::Any >& mrTargets;
double mfDuration;
bool mbIsPreview;
- TabControl* mpTabControl;
+ VclPtr<TabControl> mpTabControl;
CustomAnimationCreateTabPage* mpTabPages[5];
sal_uInt16 mnEntranceId, mnEmphasisId, mnExitId, mnMPathId, mnMiscId;
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index c5e3a2e6b2c4..ce65a000ebcd 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -107,7 +107,7 @@ public:
private:
std::map< sal_uInt16, OUString > maPropertyValues;
- ListBox* mpControl;
+ VclPtr<ListBox> mpControl;
};
PresetPropertyBox::PresetPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const OUString& aPresetId, const Link& rModifyHdl )
@@ -159,7 +159,7 @@ void PresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId )
PresetPropertyBox::~PresetPropertyBox()
{
- delete mpControl;
+ mpControl.clear();
}
Any PresetPropertyBox::getValue()
@@ -183,7 +183,7 @@ public:
virtual Control* getControl() SAL_OVERRIDE;
private:
- ColorListBox* mpControl;
+ VclPtr<ColorListBox> mpControl;
};
ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link& rModifyHdl )
@@ -219,7 +219,7 @@ ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, vcl::Window* pParent
ColorPropertyBox::~ColorPropertyBox()
{
- delete mpControl;
+ mpControl.clear();
}
void ColorPropertyBox::setValue( const Any& rValue, const OUString& )
@@ -256,7 +256,7 @@ public:
virtual Control* getControl() SAL_OVERRIDE;
private:
- FontNameBox* mpControl;
+ VclPtr<FontNameBox> mpControl;
};
FontPropertyBox::FontPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link& rModifyHdl )
@@ -303,7 +303,7 @@ void FontPropertyBox::setValue( const Any& rValue, const OUString& )
FontPropertyBox::~FontPropertyBox()
{
- delete mpControl;
+ mpControl.clear();
}
Any FontPropertyBox::getValue()
@@ -331,7 +331,7 @@ public:
private:
VclPtr<Edit> mpSubControl;
- MenuButton* mpDropdownButton;
+ VclPtr<MenuButton> mpDropdownButton;
PopupMenu* mpMenu;
};
@@ -356,8 +356,8 @@ DropdownMenuBox::~DropdownMenuBox()
void DropdownMenuBox::dispose()
{
- SetSubEdit(VclPtr<Edit>());
- delete mpDropdownButton;
+ SetSubEdit(nullptr);
+ mpDropdownButton.clear();
delete mpMenu;
mpSubControl.disposeAndClear();
Edit::dispose();
@@ -412,7 +412,7 @@ public:
DECL_LINK( implMenuSelectHdl, MenuButton* );
private:
- DropdownMenuBox* mpControl;
+ VclPtr<DropdownMenuBox> mpControl;
PopupMenu* mpMenu;
VclPtr<MetricField> mpMetric;
};
@@ -437,7 +437,7 @@ CharHeightPropertyBox::CharHeightPropertyBox( sal_Int32 nControlType, vcl::Windo
CharHeightPropertyBox::~CharHeightPropertyBox()
{
- delete mpControl;
+ mpControl.clear();
}
IMPL_LINK( CharHeightPropertyBox, implMenuSelectHdl, MenuButton*, pPb )
@@ -492,7 +492,7 @@ public:
void updateMenu();
private:
- DropdownMenuBox* mpControl;
+ VclPtr<DropdownMenuBox> mpControl;
PopupMenu* mpMenu;
VclPtr<MetricField> mpMetric;
Link maModifyHdl;
@@ -528,7 +528,7 @@ TransparencyPropertyBox::TransparencyPropertyBox( sal_Int32 nControlType, vcl::W
TransparencyPropertyBox::~TransparencyPropertyBox()
{
- delete mpControl;
+ mpControl.clear();
}
void TransparencyPropertyBox::updateMenu()
@@ -596,7 +596,7 @@ public:
void updateMenu();
private:
- DropdownMenuBox* mpControl;
+ VclPtr<DropdownMenuBox> mpControl;
PopupMenu* mpMenu;
VclPtr<MetricField> mpMetric;
Link maModifyHdl;
@@ -626,7 +626,7 @@ RotationPropertyBox::RotationPropertyBox( sal_Int32 nControlType, vcl::Window* p
RotationPropertyBox::~RotationPropertyBox()
{
- delete mpControl;
+ mpControl.clear();
}
void RotationPropertyBox::updateMenu()
@@ -721,7 +721,7 @@ public:
void updateMenu();
private:
- DropdownMenuBox* mpControl;
+ VclPtr<DropdownMenuBox> mpControl;
PopupMenu* mpMenu;
VclPtr<MetricField> mpMetric;
Link maModifyHdl;
@@ -751,7 +751,7 @@ ScalePropertyBox::ScalePropertyBox( sal_Int32 nControlType, vcl::Window* pParent
ScalePropertyBox::~ScalePropertyBox()
{
- delete mpControl;
+ mpControl.clear();
}
void ScalePropertyBox::updateMenu()
@@ -883,7 +883,7 @@ public:
void update();
private:
- DropdownMenuBox* mpControl;
+ VclPtr<DropdownMenuBox> mpControl;
PopupMenu* mpMenu;
VclPtr<Edit> mpEdit;
Link maModifyHdl;
@@ -911,7 +911,7 @@ FontStylePropertyBox::FontStylePropertyBox( sal_Int32 nControlType, vcl::Window*
FontStylePropertyBox::~FontStylePropertyBox()
{
- delete mpControl;
+ mpControl.clear();
}
void FontStylePropertyBox::update()
@@ -993,6 +993,7 @@ class CustomAnimationEffectTabPage : public TabPage
public:
CustomAnimationEffectTabPage( vcl::Window* pParent, const STLPropertySet* pSet );
virtual ~CustomAnimationEffectTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void update( STLPropertySet* pSet );
DECL_LINK( implSelectHdl, Control* );
@@ -1010,24 +1011,24 @@ private:
bool mbHasText;
const STLPropertySet* mpSet;
- VclFrame* mpSettings;
- FixedText* mpFTProperty1;
- PropertyControl* mpLBProperty1;
- VclHBox* mpPlaceholderBox;
- CheckBox* mpCBSmoothStart;
- CheckBox* mpCBSmoothEnd;
-
- FixedText* mpFTSound;
- ListBox* mpLBSound;
- PushButton* mpPBSoundPreview;
- FixedText* mpFTAfterEffect;
- ListBox* mpLBAfterEffect;
- FixedText* mpFTDimColor;
- ColorListBox* mpCLBDimColor;
- FixedText* mpFTTextAnim;
- ListBox* mpLBTextAnim;
- MetricField* mpMFTextDelay;
- FixedText* mpFTTextDelay;
+ VclPtr<VclFrame> mpSettings;
+ VclPtr<FixedText> mpFTProperty1;
+ VclPtr<PropertyControl> mpLBProperty1;
+ VclPtr<VclHBox> mpPlaceholderBox;
+ VclPtr<CheckBox> mpCBSmoothStart;
+ VclPtr<CheckBox> mpCBSmoothEnd;
+
+ VclPtr<FixedText> mpFTSound;
+ VclPtr<ListBox> mpLBSound;
+ VclPtr<PushButton> mpPBSoundPreview;
+ VclPtr<FixedText> mpFTAfterEffect;
+ VclPtr<ListBox> mpLBAfterEffect;
+ VclPtr<FixedText> mpFTDimColor;
+ VclPtr<ColorListBox> mpCLBDimColor;
+ VclPtr<FixedText> mpFTTextAnim;
+ VclPtr<ListBox> mpLBTextAnim;
+ VclPtr<MetricField> mpMFTextDelay;
+ VclPtr<FixedText> mpFTTextDelay;
::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer;
};
@@ -1262,7 +1263,30 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
CustomAnimationEffectTabPage::~CustomAnimationEffectTabPage()
{
+ dispose();
+}
+
+void CustomAnimationEffectTabPage::dispose()
+{
clearSoundListBox();
+ mpSettings.clear();
+ mpFTProperty1.clear();
+ mpLBProperty1.clear();
+ mpPlaceholderBox.clear();
+ mpCBSmoothStart.clear();
+ mpCBSmoothEnd.clear();
+ mpFTSound.clear();
+ mpLBSound.clear();
+ mpPBSoundPreview.clear();
+ mpFTAfterEffect.clear();
+ mpLBAfterEffect.clear();
+ mpFTDimColor.clear();
+ mpCLBDimColor.clear();
+ mpFTTextAnim.clear();
+ mpLBTextAnim.clear();
+ mpMFTextDelay.clear();
+ mpFTTextDelay.clear();
+ TabPage::dispose();
}
void CustomAnimationEffectTabPage::updateControlStates()
@@ -1565,6 +1589,7 @@ class CustomAnimationDurationTabPage : public TabPage
public:
CustomAnimationDurationTabPage( vcl::Window* pParent, const STLPropertySet* pSet );
virtual ~CustomAnimationDurationTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void update( STLPropertySet* pSet );
@@ -1573,18 +1598,18 @@ public:
private:
const STLPropertySet* mpSet;
- FixedText* mpFTStart;
- ListBox* mpLBStart;
- FixedText* mpFTStartDelay;
- MetricField* mpMFStartDelay;
- FixedText* mpFTDuration;
- ListBox* mpCBDuration;
- FixedText* mpFTRepeat;
- ListBox* mpCBRepeat;
- CheckBox* mpCBXRewind;
- RadioButton* mpRBClickSequence;
- RadioButton* mpRBInteractive;
- ListBox* mpLBTrigger;
+ VclPtr<FixedText> mpFTStart;
+ VclPtr<ListBox> mpLBStart;
+ VclPtr<FixedText> mpFTStartDelay;
+ VclPtr<MetricField> mpMFStartDelay;
+ VclPtr<FixedText> mpFTDuration;
+ VclPtr<ListBox> mpCBDuration;
+ VclPtr<FixedText> mpFTRepeat;
+ VclPtr<ListBox> mpCBRepeat;
+ VclPtr<CheckBox> mpCBXRewind;
+ VclPtr<RadioButton> mpRBClickSequence;
+ VclPtr<RadioButton> mpRBInteractive;
+ VclPtr<ListBox> mpLBTrigger;
};
CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(vcl::Window* pParent, const STLPropertySet* pSet)
@@ -1762,6 +1787,24 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(vcl::Window* pPar
CustomAnimationDurationTabPage::~CustomAnimationDurationTabPage()
{
+ dispose();
+}
+
+void CustomAnimationDurationTabPage::dispose()
+{
+ mpFTStart.clear();
+ mpLBStart.clear();
+ mpFTStartDelay.clear();
+ mpMFStartDelay.clear();
+ mpFTDuration.clear();
+ mpCBDuration.clear();
+ mpFTRepeat.clear();
+ mpCBRepeat.clear();
+ mpCBXRewind.clear();
+ mpRBClickSequence.clear();
+ mpRBInteractive.clear();
+ mpLBTrigger.clear();
+ TabPage::dispose();
}
IMPL_LINK( CustomAnimationDurationTabPage, implControlHdl, Control*, pControl )
@@ -1931,6 +1974,8 @@ class CustomAnimationTextAnimTabPage : public TabPage
{
public:
CustomAnimationTextAnimTabPage( vcl::Window* pParent, const STLPropertySet* pSet );
+ virtual ~CustomAnimationTextAnimTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void update( STLPropertySet* pSet );
@@ -1938,12 +1983,12 @@ public:
DECL_LINK(implSelectHdl, void *);
private:
- FixedText* maFTGroupText;
- ListBox* maLBGroupText;
- CheckBox* maCBXGroupAuto;
- MetricField* maMFGroupAuto;
- CheckBox* maCBXAnimateForm;
- CheckBox* maCBXReverse;
+ VclPtr<FixedText> maFTGroupText;
+ VclPtr<ListBox> maLBGroupText;
+ VclPtr<CheckBox> maCBXGroupAuto;
+ VclPtr<MetricField> maMFGroupAuto;
+ VclPtr<CheckBox> maCBXAnimateForm;
+ VclPtr<CheckBox> maCBXReverse;
const STLPropertySet* mpSet;
@@ -2030,6 +2075,22 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(vcl::Window* pPar
updateControlStates();
}
+CustomAnimationTextAnimTabPage::~CustomAnimationTextAnimTabPage()
+{
+ dispose();
+}
+
+void CustomAnimationTextAnimTabPage::dispose()
+{
+ maFTGroupText.clear();
+ maLBGroupText.clear();
+ maCBXGroupAuto.clear();
+ maMFGroupAuto.clear();
+ maCBXAnimateForm.clear();
+ maCBXReverse.clear();
+ TabPage::dispose();
+}
+
void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet )
{
sal_Int32 nPos = maLBGroupText->GetSelectEntryPos();
@@ -2151,13 +2212,14 @@ CustomAnimationDialog::~CustomAnimationDialog()
void CustomAnimationDialog::dispose()
{
- delete mpEffectTabPage;
- delete mpDurationTabPage;
- delete mpTextAnimTabPage;
+ mpEffectTabPage.clear();
+ mpDurationTabPage.clear();
+ mpTextAnimTabPage.clear();
delete mpSet;
delete mpResultSet;
+ mpTabControl.clear();
TabDialog::dispose();
}
diff --git a/sd/source/ui/animations/CustomAnimationDialog.hxx b/sd/source/ui/animations/CustomAnimationDialog.hxx
index 897a22946c9d..3754d93ffdbf 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.hxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.hxx
@@ -156,11 +156,11 @@ private:
STLPropertySet* mpResultSet;
CustomAnimationEffectPtr mpEffect;
- TabControl* mpTabControl;
+ VclPtr<TabControl> mpTabControl;
- CustomAnimationDurationTabPage* mpDurationTabPage;
- CustomAnimationEffectTabPage* mpEffectTabPage;
- CustomAnimationTextAnimTabPage* mpTextAnimTabPage;
+ VclPtr<CustomAnimationDurationTabPage> mpDurationTabPage;
+ VclPtr<CustomAnimationEffectTabPage> mpEffectTabPage;
+ VclPtr<CustomAnimationTextAnimTabPage> mpTextAnimTabPage;
};
}
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 43f3c3451bb8..24bf4e892471 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -210,7 +210,7 @@ public:
virtual void Paint(
const Point&, SvTreeListBox& rDev, const SvViewDataEntry* pView,const SvTreeListEntry* pEntry) SAL_OVERRIDE;
private:
- CustomAnimationList* mpParent;
+ VclPtr<CustomAnimationList> mpParent;
OUString maDescription;
CustomAnimationEffectPtr mpEffect;
};
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index c64a1f28bcf2..c83dc7155be2 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -240,6 +240,23 @@ void CustomAnimationPane::dispose()
for( aIter = aTags.begin(); aIter != aTags.end(); ++aIter )
(*aIter)->Dispose();
+ mpPBAddEffect.clear();
+ mpPBChangeEffect.clear();
+ mpPBRemoveEffect.clear();
+ mpFTEffect.clear();
+ mpFTStart.clear();
+ mpLBStart.clear();
+ mpFTProperty.clear();
+ mpPlaceholderBox.clear();
+ mpLBProperty.clear();
+ mpPBPropertyMore.clear();
+ mpFTSpeed.clear();
+ mpCBSpeed.clear();
+ mpCustomAnimationList.clear();
+ mpPBMoveUp.clear();
+ mpPBMoveDown.clear();
+ mpPBPlay.clear();
+ mpCBAutoPreview.clear();
PanelLayout::dispose();
}
@@ -815,11 +832,11 @@ void CustomAnimationPane::UpdateLook (void)
::sfx2::sidebar::Theme::GetWallpaper(
::sfx2::sidebar::Theme::Paint_PanelBackground));
SetBackground(aBackground);
- if (mpFTStart != NULL)
+ if (mpFTStart != nullptr)
mpFTStart->SetBackground(aBackground);
- if (mpFTProperty != NULL)
+ if (mpFTProperty != nullptr)
mpFTProperty->SetBackground(aBackground);
- if (mpFTSpeed != NULL)
+ if (mpFTSpeed != nullptr)
mpFTSpeed->SetBackground(aBackground);
}
diff --git a/sd/source/ui/animations/CustomAnimationPane.hxx b/sd/source/ui/animations/CustomAnimationPane.hxx
index bdf29dd1cf9e..f1e75d387af6 100644
--- a/sd/source/ui/animations/CustomAnimationPane.hxx
+++ b/sd/source/ui/animations/CustomAnimationPane.hxx
@@ -126,23 +126,23 @@ private:
const CustomAnimationPresets* mpCustomAnimationPresets;
- PushButton* mpPBAddEffect;
- PushButton* mpPBChangeEffect;
- PushButton* mpPBRemoveEffect;
- FixedText* mpFTEffect;
- FixedText* mpFTStart;
- ListBox* mpLBStart;
- FixedText* mpFTProperty;
- VclHBox* mpPlaceholderBox;
- PropertyControl* mpLBProperty;
- PushButton* mpPBPropertyMore;
- FixedText* mpFTSpeed;
- ListBox* mpCBSpeed;
- CustomAnimationList* mpCustomAnimationList;
- PushButton* mpPBMoveUp;
- PushButton* mpPBMoveDown;
- PushButton* mpPBPlay;
- CheckBox* mpCBAutoPreview;
+ VclPtr<PushButton> mpPBAddEffect;
+ VclPtr<PushButton> mpPBChangeEffect;
+ VclPtr<PushButton> mpPBRemoveEffect;
+ VclPtr<FixedText> mpFTEffect;
+ VclPtr<FixedText> mpFTStart;
+ VclPtr<ListBox> mpLBStart;
+ VclPtr<FixedText> mpFTProperty;
+ VclPtr<VclHBox> mpPlaceholderBox;
+ VclPtr<PropertyControl> mpLBProperty;
+ VclPtr<PushButton> mpPBPropertyMore;
+ VclPtr<FixedText> mpFTSpeed;
+ VclPtr<ListBox> mpCBSpeed;
+ VclPtr<CustomAnimationList> mpCustomAnimationList;
+ VclPtr<PushButton> mpPBMoveUp;
+ VclPtr<PushButton> mpPBMoveDown;
+ VclPtr<PushButton> mpPBPlay;
+ VclPtr<CheckBox> mpCBAutoPreview;
OUString maStrModify;
OUString maStrProperty;
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 5d5682bb3363..ce7e18773e43 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -386,7 +386,7 @@ struct lcl_AppendSoundToListBox : public ::std::unary_function< OUString, void >
}
private:
- ListBox* mrListBox;
+ VclPtr<ListBox> mrListBox;
};
void lcl_FillSoundListBox(
@@ -490,6 +490,19 @@ void SlideTransitionPane::dispose()
{
maLateInitTimer.Stop();
removeListener();
+ mpLB_SLIDE_TRANSITIONS.clear();
+ mpFT_SPEED.clear();
+ mpLB_SPEED.clear();
+ mpFT_SOUND.clear();
+ mpLB_SOUND.clear();
+ mpCB_LOOP_SOUND.clear();
+ mpRB_ADVANCE_ON_MOUSE.clear();
+ mpRB_ADVANCE_AUTO.clear();
+ mpMF_ADVANCE_AUTO_AFTER.clear();
+ mpPB_APPLY_TO_ALL.clear();
+ mpPB_PLAY.clear();
+ mpPB_SLIDE_SHOW.clear();
+ mpCB_AUTO_PREVIEW.clear();
PanelLayout::dispose();
}
diff --git a/sd/source/ui/animations/SlideTransitionPane.hxx b/sd/source/ui/animations/SlideTransitionPane.hxx
index 1cf22541dc68..00642e6c4d9c 100644
--- a/sd/source/ui/animations/SlideTransitionPane.hxx
+++ b/sd/source/ui/animations/SlideTransitionPane.hxx
@@ -105,19 +105,19 @@ private:
SdDrawDocument * mpDrawDoc;
Size maMinSize;
- ListBox* mpLB_SLIDE_TRANSITIONS;
- FixedText* mpFT_SPEED;
- ListBox* mpLB_SPEED;
- FixedText* mpFT_SOUND;
- ListBox* mpLB_SOUND;
- CheckBox* mpCB_LOOP_SOUND;
- RadioButton* mpRB_ADVANCE_ON_MOUSE;
- RadioButton* mpRB_ADVANCE_AUTO;
- MetricField* mpMF_ADVANCE_AUTO_AFTER;
- PushButton* mpPB_APPLY_TO_ALL;
- PushButton* mpPB_PLAY;
- PushButton* mpPB_SLIDE_SHOW;
- CheckBox* mpCB_AUTO_PREVIEW;
+ VclPtr<ListBox> mpLB_SLIDE_TRANSITIONS;
+ VclPtr<FixedText> mpFT_SPEED;
+ VclPtr<ListBox> mpLB_SPEED;
+ VclPtr<FixedText> mpFT_SOUND;
+ VclPtr<ListBox> mpLB_SOUND;
+ VclPtr<CheckBox> mpCB_LOOP_SOUND;
+ VclPtr<RadioButton> mpRB_ADVANCE_ON_MOUSE;
+ VclPtr<RadioButton> mpRB_ADVANCE_AUTO;
+ VclPtr<MetricField> mpMF_ADVANCE_AUTO_AFTER;
+ VclPtr<PushButton> mpPB_APPLY_TO_ALL;
+ VclPtr<PushButton> mpPB_PLAY;
+ VclPtr<PushButton> mpPB_SLIDE_SHOW;
+ VclPtr<CheckBox> mpCB_AUTO_PREVIEW;
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawView > mxView;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxModel;
diff --git a/sd/source/ui/annotations/annotationtag.hxx b/sd/source/ui/annotations/annotationtag.hxx
index 96085f253fcb..34645274499e 100644
--- a/sd/source/ui/annotations/annotationtag.hxx
+++ b/sd/source/ui/annotations/annotationtag.hxx
@@ -85,7 +85,7 @@ private:
const ::vcl::Font& mrFont;
Size maSize;
ImplSVEvent * mnClosePopupEvent;
- vcl::Window* mpListenWindow;
+ VclPtr<vcl::Window> mpListenWindow;
Point maMouseDownPos;
};
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index 491142fb8895..f17151d0e6df 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -118,6 +118,13 @@ AnnotationTextWindow::AnnotationTextWindow( AnnotationWindow* pParent, WinBits n
AnnotationTextWindow::~AnnotationTextWindow()
{
+ dispose();
+}
+
+void AnnotationTextWindow::dispose()
+{
+ mpAnnotationWindow.clear();
+ Control::dispose();
}
void AnnotationTextWindow::Paint( const Rectangle& rRect)
@@ -289,11 +296,11 @@ AnnotationWindow::~AnnotationWindow()
void AnnotationWindow::dispose()
{
- delete mpMeta;
+ mpMeta.clear();
delete mpOutlinerView;
delete mpOutliner;
- delete mpVScrollbar;
- delete mpTextWindow;
+ mpVScrollbar.clear();
+ mpTextWindow.clear();
FloatingWindow::dispose();
}
diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx
index a29ca421e522..54334b1f4ea3 100644
--- a/sd/source/ui/annotations/annotationwindow.hxx
+++ b/sd/source/ui/annotations/annotationwindow.hxx
@@ -50,7 +50,7 @@ class AnnotationTextWindow : public Control
{
private:
OutlinerView* mpOutlinerView;
- AnnotationWindow* mpAnnotationWindow;
+ VclPtr<AnnotationWindow> mpAnnotationWindow;
protected:
virtual void Paint( const Rectangle& rRect) SAL_OVERRIDE;
@@ -64,6 +64,7 @@ protected:
public:
AnnotationTextWindow( AnnotationWindow* pParent, WinBits nBits );
virtual ~AnnotationTextWindow();
+ virtual void dispose() SAL_OVERRIDE;
void SetOutlinerView( OutlinerView* pOutlinerView ) { mpOutlinerView = pOutlinerView; }
@@ -83,13 +84,13 @@ class AnnotationWindow : public FloatingWindow
OutlinerView* mpOutlinerView;
Outliner* mpOutliner;
- ScrollBar* mpVScrollbar;
+ VclPtr<ScrollBar> mpVScrollbar;
::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation > mxAnnotation;
bool mbReadonly;
bool mbProtected;
bool mbMouseOverButton;
- AnnotationTextWindow* mpTextWindow;
- MultiLineEdit* mpMeta;
+ VclPtr<AnnotationTextWindow> mpTextWindow;
+ VclPtr<MultiLineEdit> mpMeta;
Rectangle maRectMetaButton;
basegfx::B2DPolygon maPopupTriangle;
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 7c8d02a46819..53a7d6d87714 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -67,6 +67,7 @@ class LayoutToolbarMenu : public svtools::ToolbarMenu
public:
LayoutToolbarMenu( SlideLayoutController& rController, const Reference< XFrame >& xFrame, vcl::Window* pParent, const bool bInsertPage );
virtual ~LayoutToolbarMenu();
+ virtual void dispose() SAL_OVERRIDE;
protected:
DECL_LINK( SelectHdl, void * );
@@ -75,8 +76,8 @@ private:
SlideLayoutController& mrController;
Reference< XFrame > mxFrame;
bool mbInsertPage;
- ValueSet* mpLayoutSet1;
- ValueSet* mpLayoutSet2;
+ VclPtr<ValueSet> mpLayoutSet1;
+ VclPtr<ValueSet> mpLayoutSet2;
};
struct snewfoil_value_info
@@ -256,6 +257,14 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, const
LayoutToolbarMenu::~LayoutToolbarMenu()
{
+ dispose();
+}
+
+void LayoutToolbarMenu::dispose()
+{
+ mpLayoutSet1.clear();
+ mpLayoutSet2.clear();
+ svtools::ToolbarMenu::dispose();
}
IMPL_LINK( LayoutToolbarMenu, SelectHdl, void *, pControl )
diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx
index 15908461a011..26606bc20e2b 100644
--- a/sd/source/ui/dlg/PaneChildWindows.cxx
+++ b/sd/source/ui/dlg/PaneChildWindows.cxx
@@ -62,7 +62,7 @@ PaneChildWindow::PaneChildWindow (
pParentWindow,
SD_RESSTR(nTitleBarResId));
eChildAlignment = eAlignment;
- static_cast<SfxDockingWindow*>(pWindow)->Initialize(pInfo);
+ static_cast<SfxDockingWindow*>(pWindow.get())->Initialize(pInfo);
SetHideNotDelete(true);
ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pBindings->GetDispatcher()->GetFrame());
@@ -75,7 +75,7 @@ PaneChildWindow::PaneChildWindow (
PaneChildWindow::~PaneChildWindow (void)
{
ViewShellBase* pBase = NULL;
- PaneDockingWindow* pDockingWindow = dynamic_cast<PaneDockingWindow*>(pWindow);
+ PaneDockingWindow* pDockingWindow = dynamic_cast<PaneDockingWindow*>(pWindow.get());
if (pDockingWindow != NULL)
pBase = ViewShellBase::GetViewShellBase(
pDockingWindow->GetBindings().GetDispatcher()->GetFrame());
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 4d75e6c8142c..5a81ddcf72db 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -76,6 +76,23 @@ SdPhotoAlbumDialog::SdPhotoAlbumDialog(vcl::Window* pWindow, SdDrawDocument* pAc
SdPhotoAlbumDialog::~SdPhotoAlbumDialog()
{
+ dispose();
+}
+
+void SdPhotoAlbumDialog::dispose()
+{
+ pCancelBtn.clear();
+ pCreateBtn.clear();
+ pAddBtn.clear();
+ pUpBtn.clear();
+ pDownBtn.clear();
+ pRemoveBtn.clear();
+ pImagesLst.clear();
+ pImg.clear();
+ pInsTypeCombo.clear();
+ pASRCheck.clear();
+ pCapCheck.clear();
+ ModalDialog::dispose();
}
IMPL_LINK_NOARG(SdPhotoAlbumDialog, CancelHdl)
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.hxx b/sd/source/ui/dlg/PhotoAlbumDialog.hxx
index c7d12e47bcc8..44b1f5c97a1e 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.hxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.hxx
@@ -46,25 +46,27 @@ class SdPhotoAlbumDialog : public ModalDialog
public:
SdPhotoAlbumDialog(vcl::Window* pWindow, SdDrawDocument* pActDoc);
virtual ~SdPhotoAlbumDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
private:
static OUString sDirUrl;
- CancelButton* pCancelBtn;
- PushButton* pCreateBtn;
+ VclPtr<CancelButton> pCancelBtn;
+ VclPtr<PushButton> pCreateBtn;
- PushButton* pAddBtn;
- PushButton* pUpBtn;
- PushButton* pDownBtn;
- PushButton* pRemoveBtn;
+ VclPtr<PushButton> pAddBtn;
+ VclPtr<PushButton> pUpBtn;
+ VclPtr<PushButton> pDownBtn;
+ VclPtr<PushButton> pRemoveBtn;
- ListBox* pImagesLst;
- FixedImage* pImg;
+ VclPtr<ListBox> pImagesLst;
+ VclPtr<FixedImage> pImg;
+
+ VclPtr<ListBox> pInsTypeCombo;
+ VclPtr<CheckBox> pASRCheck;
+ VclPtr<CheckBox> pCapCheck;
- ListBox* pInsTypeCombo;
- CheckBox* pASRCheck;
- CheckBox* pCapCheck;
SdDrawDocument* pDoc;
GraphicFilter* mpGraphicFilter;
diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx
index f9cd67cb8dad..625cc04cd7f4 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -30,6 +30,19 @@ RemoteDialog::RemoteDialog( vcl::Window *pWindow )
m_pButtonClose->SetClickHdl( LINK( this, RemoteDialog, CloseHdl ) );
}
+RemoteDialog::~RemoteDialog()
+{
+ dispose();
+}
+
+void RemoteDialog::dispose()
+{
+ m_pButtonConnect.clear();
+ m_pButtonClose.clear();
+ m_pClientBox.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton)
{
// setBusy( true );
diff --git a/sd/source/ui/dlg/RemoteDialog.hxx b/sd/source/ui/dlg/RemoteDialog.hxx
index 7334c4bea548..3c936eb10a1a 100644
--- a/sd/source/ui/dlg/RemoteDialog.hxx
+++ b/sd/source/ui/dlg/RemoteDialog.hxx
@@ -24,14 +24,16 @@ namespace sd
class RemoteDialog : public ModalDialog
{
private:
- PushButton* m_pButtonConnect;
- CloseButton* m_pButtonClose;
- ClientBox* m_pClientBox;
+ VclPtr<PushButton> m_pButtonConnect;
+ VclPtr<CloseButton> m_pButtonClose;
+ VclPtr<ClientBox> m_pClientBox;
DECL_DLLPRIVATE_LINK( HandleConnectButton, void * );
DECL_LINK( CloseHdl, void * );
public:
RemoteDialog( vcl::Window* pWindow );
+ virtual ~RemoteDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
}
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx b/sd/source/ui/dlg/RemoteDialogClientBox.hxx
index c40ac96212c1..63bf2db5a577 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx
@@ -69,7 +69,7 @@ class ClientBox;
class ClientRemovedListener : public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener >
{
- ClientBox *m_pParent;
+ VclPtr<ClientBox> m_pParent;
public:
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index a84cfd9d0ddd..c7bba27e3eab 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -224,8 +224,26 @@ void AnimationWindow::dispose()
// delete the clones
delete pMyDoc;
- delete m_pCtlDisplay;
-
+ m_pCtlDisplay.clear();
+ m_pBtnFirst.clear();
+ m_pBtnReverse.clear();
+ m_pBtnStop.clear();
+ m_pBtnPlay.clear();
+ m_pBtnLast.clear();
+ m_pNumFldBitmap.clear();
+ m_pTimeField.clear();
+ m_pLbLoopCount.clear();
+ m_pBtnGetOneObject.clear();
+ m_pBtnGetAllObjects.clear();
+ m_pBtnRemoveBitmap.clear();
+ m_pBtnRemoveAll.clear();
+ m_pFiCount.clear();
+ m_pRbtGroup.clear();
+ m_pRbtBitmap.clear();
+ m_pFtAdjustment.clear();
+ m_pLbAdjustment.clear();
+ m_pBtnCreateGroup.clear();
+ pWin.clear();
SfxDockingWindow::dispose();
}
diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx
index 92c83eac13c7..bd6cad52decf 100644
--- a/sd/source/ui/dlg/brkdlg.cxx
+++ b/sd/source/ui/dlg/brkdlg.cxx
@@ -72,8 +72,10 @@ BreakDlg::~BreakDlg()
void BreakDlg::dispose()
{
- delete mpProgress;
- delete pProgrInfo;
+ m_pFiObjInfo.clear();
+ m_pFiActInfo.clear();
+ m_pFiInsInfo.clear();
+ m_pBtnCancel.clear();
SfxModalDialog::dispose();
}
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index a66d6a041807..7fcd27804f12 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -89,31 +89,17 @@ CopyDlg::~CopyDlg()
void CopyDlg::dispose()
{
- OUString& rStr = GetExtraData();
-
- rStr = OUString::number(m_pNumFldCopies->GetValue());
- rStr += OUString(TOKEN);
-
- rStr += OUString::number(m_pMtrFldMoveX->GetValue());
- rStr += OUString( TOKEN );
-
- rStr += OUString::number(m_pMtrFldMoveY->GetValue());
- rStr += OUString( TOKEN );
-
- rStr += OUString::number(m_pMtrFldAngle->GetValue());
- rStr += OUString( TOKEN );
-
- rStr += OUString::number(m_pMtrFldWidth->GetValue());
- rStr += OUString( TOKEN );
-
- rStr += OUString::number(m_pMtrFldHeight->GetValue());
- rStr += OUString( TOKEN );
-
- rStr += OUString::number( m_pLbStartColor->GetSelectEntryColor().GetColor() );
- rStr += OUString( TOKEN );
-
- rStr += OUString::number( m_pLbEndColor->GetSelectEntryColor().GetColor() );
-
+ m_pNumFldCopies.clear();
+ m_pBtnSetViewData.clear();
+ m_pMtrFldMoveX.clear();
+ m_pMtrFldMoveY.clear();
+ m_pMtrFldAngle.clear();
+ m_pMtrFldWidth.clear();
+ m_pMtrFldHeight.clear();
+ m_pLbStartColor.clear();
+ m_pFtEndColor.clear();
+ m_pLbEndColor.clear();
+ m_pBtnSetDefault.clear();
SfxModalDialog::dispose();
}
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index 8cfd56d0a583..95132d4c5e4f 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -85,6 +85,21 @@ SdCustomShowDlg::SdCustomShowDlg( vcl::Window* pWindow,
SdCustomShowDlg::~SdCustomShowDlg()
{
+ dispose();
+}
+
+void SdCustomShowDlg::dispose()
+{
+ m_pLbCustomShows.clear();
+ m_pCbxUseCustomShow.clear();
+ m_pBtnNew.clear();
+ m_pBtnEdit.clear();
+ m_pBtnRemove.clear();
+ m_pBtnCopy.clear();
+ m_pBtnHelp.clear();
+ m_pBtnStartShow.clear();
+ m_pBtnOK.clear();
+ ModalDialog::dispose();
}
void SdCustomShowDlg::CheckState()
@@ -336,6 +351,20 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( vcl::Window* pWindow,
SdDefineCustomShowDlg::~SdDefineCustomShowDlg()
{
+ dispose();
+}
+
+void SdDefineCustomShowDlg::dispose()
+{
+ m_pEdtName.clear();
+ m_pLbPages.clear();
+ m_pBtnAdd.clear();
+ m_pBtnRemove.clear();
+ m_pLbCustomPages.clear();
+ m_pBtnOK.clear();
+ m_pBtnCancel.clear();
+ m_pBtnHelp.clear();
+ ModalDialog::dispose();
}
// CheckState
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 757028a0f4fc..bec74ca9a16f 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -101,8 +101,8 @@ public:
void Enable (bool bEnable);
private:
- PushButton* mpNextButton1;
- PushButton* mpNextButton2;
+ VclPtr<PushButton> mpNextButton1;
+ VclPtr<PushButton> mpNextButton2;
bool mbIsFirstButtonActive;
};
@@ -160,7 +160,7 @@ public:
*/
bool mbPreviewUpdating;
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
void SavePassword( SfxObjectShellLock xDoc, const OUString& rPath );
void RestorePassword( SfxItemSet* pSet, const OUString& rPath );
@@ -247,74 +247,74 @@ public:
// Common
Assistent maAssistentFunc;
- CheckBox* mpPreviewFlag;
- CheckBox* mpStartWithFlag;
- PushButton* mpLastPageButton;
- NextButton* mpNextPageButton;
- PushButton* mpFinishButton;
- SdDocPreviewWin* mpPreview;
- VclContainer* mpPage1235;
+ VclPtr<CheckBox> mpPreviewFlag;
+ VclPtr<CheckBox> mpStartWithFlag;
+ VclPtr<PushButton> mpLastPageButton;
+ NextButton* mpNextPageButton;
+ VclPtr<PushButton> mpFinishButton;
+ VclPtr<SdDocPreviewWin> mpPreview;
+ VclPtr<VclContainer> mpPage1235;
// page 1
- VclContainer* mpPage1;
- FixedImage* mpPage1FB;
- FixedText* mpPage1ArtFL;
- RadioButton* mpPage1EmptyRB;
- RadioButton* mpPage1TemplateRB;
- ListBox* mpPage1RegionLB;
- ListBox* mpPage1TemplateLB;
- RadioButton* mpPage1OpenRB;
- ListBox* mpPage1OpenLB;
- PushButton* mpPage1OpenPB;
+ VclPtr<VclContainer> mpPage1;
+ VclPtr<FixedImage> mpPage1FB;
+ VclPtr<FixedText> mpPage1ArtFL;
+ VclPtr<RadioButton> mpPage1EmptyRB;
+ VclPtr<RadioButton> mpPage1TemplateRB;
+ VclPtr<ListBox> mpPage1RegionLB;
+ VclPtr<ListBox> mpPage1TemplateLB;
+ VclPtr<RadioButton> mpPage1OpenRB;
+ VclPtr<ListBox> mpPage1OpenLB;
+ VclPtr<PushButton> mpPage1OpenPB;
// page 2
- VclContainer* mpPage2;
- FixedImage* mpPage2FB;
- FixedText* mpPage2LayoutFL;
- ListBox* mpPage2RegionLB;
- ListBox* mpPage2LayoutLB;
- FixedText* mpPage2OutTypesFL;
- RadioButton* mpPage2Medium1RB;
- RadioButton* mpPage2Medium2RB;
- RadioButton* mpPage2Medium3RB;
- RadioButton* mpPage2Medium4RB;
- RadioButton* mpPage2Medium5RB;
- RadioButton* mpPage2Medium6RB;
+ VclPtr<VclContainer> mpPage2;
+ VclPtr<FixedImage> mpPage2FB;
+ VclPtr<FixedText> mpPage2LayoutFL;
+ VclPtr<ListBox> mpPage2RegionLB;
+ VclPtr<ListBox> mpPage2LayoutLB;
+ VclPtr<FixedText> mpPage2OutTypesFL;
+ VclPtr<RadioButton> mpPage2Medium1RB;
+ VclPtr<RadioButton> mpPage2Medium2RB;
+ VclPtr<RadioButton> mpPage2Medium3RB;
+ VclPtr<RadioButton> mpPage2Medium4RB;
+ VclPtr<RadioButton> mpPage2Medium5RB;
+ VclPtr<RadioButton> mpPage2Medium6RB;
// page 3
- VclContainer* mpPage3;
- FixedImage* mpPage3FB;
- FixedText* mpPage3EffectFL;
- FixedText* mpPage3EffectFT;
- FadeEffectLB* mpPage3EffectLB;
- FixedText* mpPage3SpeedFT;
- ListBox* mpPage3SpeedLB;
- FixedText* mpPage3PresTypeFL;
- RadioButton* mpPage3PresTypeLiveRB;
- RadioButton* mpPage3PresTypeKioskRB;
- FixedText* mpPage3PresTimeFT;
- TimeField* mpPage3PresTimeTMF;
- FixedText* mpPage3BreakFT;
- TimeField* mpPage3BreakTMF;
- CheckBox* mpPage3LogoCB;
+ VclPtr<VclContainer> mpPage3;
+ VclPtr<FixedImage> mpPage3FB;
+ VclPtr<FixedText> mpPage3EffectFL;
+ VclPtr<FixedText> mpPage3EffectFT;
+ VclPtr<FadeEffectLB> mpPage3EffectLB;
+ VclPtr<FixedText> mpPage3SpeedFT;
+ VclPtr<ListBox> mpPage3SpeedLB;
+ VclPtr<FixedText> mpPage3PresTypeFL;
+ VclPtr<RadioButton> mpPage3PresTypeLiveRB;
+ VclPtr<RadioButton> mpPage3PresTypeKioskRB;
+ VclPtr<FixedText> mpPage3PresTimeFT;
+ VclPtr<TimeField> mpPage3PresTimeTMF;
+ VclPtr<FixedText> mpPage3BreakFT;
+ VclPtr<TimeField> mpPage3BreakTMF;
+ VclPtr<CheckBox> mpPage3LogoCB;
// page 4
- VclContainer* mpPage4;
- FixedImage* mpPage4FB;
- FixedText* mpPage4PersonalFL;
- FixedText* mpPage4AskNameFT;
- Edit* mpPage4AskNameEDT;
- FixedText* mpPage4AskTopicFT;
- Edit* mpPage4AskTopicEDT;
- FixedText* mpPage4AskInfoFT;
- VclMultiLineEdit* mpPage4AskInfoEDT;
+ VclPtr<VclContainer> mpPage4;
+ VclPtr<FixedImage> mpPage4FB;
+ VclPtr<FixedText> mpPage4PersonalFL;
+ VclPtr<FixedText> mpPage4AskNameFT;
+ VclPtr<Edit> mpPage4AskNameEDT;
+ VclPtr<FixedText> mpPage4AskTopicFT;
+ VclPtr<Edit> mpPage4AskTopicEDT;
+ VclPtr<FixedText> mpPage4AskInfoFT;
+ VclPtr<VclMultiLineEdit> mpPage4AskInfoEDT;
// page 5
- VclContainer* mpPage5;
- FixedImage* mpPage5FB;
- FixedText* mpPage5PageListFT;
- SdPageListControl* mpPage5PageListCT;
- CheckBox* mpPage5SummaryCB;
+ VclPtr<VclContainer> mpPage5;
+ VclPtr<FixedImage> mpPage5FB;
+ VclPtr<FixedText> mpPage5PageListFT;
+ VclPtr<SdPageListControl> mpPage5PageListCT;
+ VclPtr<CheckBox> mpPage5SummaryCB;
};
diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx
index 64e4d476baa7..e236cd133048 100644
--- a/sd/source/ui/dlg/dlgfield.cxx
+++ b/sd/source/ui/dlg/dlgfield.cxx
@@ -53,6 +53,21 @@ SdModifyFieldDlg::SdModifyFieldDlg( vcl::Window* pWindow, const SvxFieldData* pI
FillControls();
}
+SdModifyFieldDlg::~SdModifyFieldDlg()
+{
+ dispose();
+}
+
+void SdModifyFieldDlg::dispose()
+{
+ m_pRbtFix.clear();
+ m_pRbtVar.clear();
+ m_pLbLanguage.clear();
+ m_pLbFormat.clear();
+ ModalDialog::dispose();
+}
+
+
/**
* Returns the new field, owned by caller.
* Returns NULL if nothing has changed.
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index 07d6e2c2886d..2e590fa9a8cf 100644
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -111,6 +111,25 @@ SdSnapLineDlg::SdSnapLineDlg(
m_pRbPoint->Check();
}
+SdSnapLineDlg::~SdSnapLineDlg()
+{
+ dispose();
+}
+
+void SdSnapLineDlg::dispose()
+{
+ m_pFtX.clear();
+ m_pMtrFldX.clear();
+ m_pFtY.clear();
+ m_pMtrFldY.clear();
+ m_pRadioGroup.clear();
+ m_pRbPoint.clear();
+ m_pRbVert.clear();
+ m_pRbHorz.clear();
+ m_pBtnDelete.clear();
+ ModalDialog::dispose();
+}
+
/**
* fills provided item sets with dialog box attributes
*/
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index b7c95485fff2..f2ea08902841 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -115,29 +115,29 @@ class HeaderFooterTabPage : public TabPage
{
private:
- FixedText* mpFTIncludeOn;
+ VclPtr<FixedText> mpFTIncludeOn;
- CheckBox* mpCBHeader;
- VclContainer* mpHeaderBox;
- Edit* mpTBHeader;
+ VclPtr<CheckBox> mpCBHeader;
+ VclPtr<VclContainer> mpHeaderBox;
+ VclPtr<Edit> mpTBHeader;
- CheckBox* mpCBDateTime;
- RadioButton* mpRBDateTimeFixed;
- RadioButton* mpRBDateTimeAutomatic;
- Edit* mpTBDateTimeFixed;
- ListBox* mpCBDateTimeFormat;
- FixedText* mpFTDateTimeLanguage;
- SvxLanguageBox* mpCBDateTimeLanguage;
+ VclPtr<CheckBox> mpCBDateTime;
+ VclPtr<RadioButton> mpRBDateTimeFixed;
+ VclPtr<RadioButton> mpRBDateTimeAutomatic;
+ VclPtr<Edit> mpTBDateTimeFixed;
+ VclPtr<ListBox> mpCBDateTimeFormat;
+ VclPtr<FixedText> mpFTDateTimeLanguage;
+ VclPtr<SvxLanguageBox> mpCBDateTimeLanguage;
- CheckBox* mpCBFooter;
- VclContainer* mpFooterBox;
- Edit* mpTBFooter;
+ VclPtr<CheckBox> mpCBFooter;
+ VclPtr<VclContainer> mpFooterBox;
+ VclPtr<Edit> mpTBFooter;
- CheckBox* mpCBSlideNumber;
+ VclPtr<CheckBox> mpCBSlideNumber;
- CheckBox* mpCBNotOnTitle;
+ VclPtr<CheckBox> mpCBNotOnTitle;
- PresLayoutPreview* mpCTPreview;
+ VclPtr<PresLayoutPreview> mpCTPreview;
SdDrawDocument* mpDoc;
LanguageType meOldLanguage;
@@ -155,6 +155,7 @@ private:
public:
HeaderFooterTabPage( vcl::Window* pParent, SdDrawDocument* pDoc, SdPage* pActualPage, bool bHandoutMode );
virtual ~HeaderFooterTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void init( const HeaderFooterSettings& rSettings, bool bNotOnTitle );
void getData( HeaderFooterSettings& rSettings, bool& rNotOnTitle );
@@ -245,8 +246,12 @@ HeaderFooterDialog::~HeaderFooterDialog()
void HeaderFooterDialog::dispose()
{
- delete mpSlideTabPage;
- delete mpNotesHandoutsTabPage;
+ mpSlideTabPage.clear();
+ mpNotesHandoutsTabPage.clear();
+ mpTabCtrl.clear();
+ maPBApplyToAll.clear();
+ maPBApply.clear();
+ maPBCancel.clear();
TabDialog::dispose();
}
@@ -457,6 +462,29 @@ HeaderFooterTabPage::HeaderFooterTabPage( vcl::Window* pWindow, SdDrawDocument*
HeaderFooterTabPage::~HeaderFooterTabPage()
{
+ dispose();
+}
+
+void HeaderFooterTabPage::dispose()
+{
+ mpFTIncludeOn.clear();
+ mpCBHeader.clear();
+ mpHeaderBox.clear();
+ mpTBHeader.clear();
+ mpCBDateTime.clear();
+ mpRBDateTimeFixed.clear();
+ mpRBDateTimeAutomatic.clear();
+ mpTBDateTimeFixed.clear();
+ mpCBDateTimeFormat.clear();
+ mpFTDateTimeLanguage.clear();
+ mpCBDateTimeLanguage.clear();
+ mpCBFooter.clear();
+ mpFooterBox.clear();
+ mpTBFooter.clear();
+ mpCBSlideNumber.clear();
+ mpCBNotOnTitle.clear();
+ mpCTPreview.clear();
+ TabPage::dispose();
}
IMPL_LINK_NOARG(HeaderFooterTabPage, LanguageChangeHdl)
diff --git a/sd/source/ui/dlg/ins_paste.cxx b/sd/source/ui/dlg/ins_paste.cxx
index a256990697e0..833b471d140a 100644
--- a/sd/source/ui/dlg/ins_paste.cxx
+++ b/sd/source/ui/dlg/ins_paste.cxx
@@ -28,6 +28,18 @@ SdInsertPasteDlg::SdInsertPasteDlg(vcl::Window* pWindow)
m_pRbAfter->Check( true );
}
+SdInsertPasteDlg::~SdInsertPasteDlg()
+{
+ dispose();
+}
+
+void SdInsertPasteDlg::dispose()
+{
+ m_pRbBefore.clear();
+ m_pRbAfter.clear();
+ ModalDialog::dispose();
+}
+
bool SdInsertPasteDlg::IsInsertBefore() const
{
return( m_pRbBefore->IsChecked() );
diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx
index 5593562947c1..0d5e29c1c6ce 100644
--- a/sd/source/ui/dlg/inspagob.cxx
+++ b/sd/source/ui/dlg/inspagob.cxx
@@ -55,6 +55,15 @@ SdInsertPagesObjsDlg::SdInsertPagesObjsDlg(
SdInsertPagesObjsDlg::~SdInsertPagesObjsDlg()
{
+ dispose();
+}
+
+void SdInsertPagesObjsDlg::dispose()
+{
+ m_pLbTree.clear();
+ m_pCbxLink.clear();
+ m_pCbxMasters.clear();
+ ModalDialog::dispose();
}
/**
diff --git a/sd/source/ui/dlg/layeroptionsdlg.cxx b/sd/source/ui/dlg/layeroptionsdlg.cxx
index 86df27c22cb1..12b3e4d1aa9c 100644
--- a/sd/source/ui/dlg/layeroptionsdlg.cxx
+++ b/sd/source/ui/dlg/layeroptionsdlg.cxx
@@ -50,6 +50,22 @@ SdInsertLayerDlg::SdInsertLayerDlg( vcl::Window* pWindow, const SfxItemSet& rInA
get<VclContainer>("nameframe")->Enable(bDeletable);
}
+SdInsertLayerDlg::~SdInsertLayerDlg()
+{
+ dispose();
+}
+
+void SdInsertLayerDlg::dispose()
+{
+ m_pEdtName.clear();
+ m_pEdtTitle.clear();
+ m_pEdtDesc.clear();
+ m_pCbxVisible.clear();
+ m_pCbxPrintable.clear();
+ m_pCbxLocked.clear();
+ ModalDialog::dispose();
+}
+
void SdInsertLayerDlg::GetAttr( SfxItemSet& rAttrs )
{
rAttrs.Put( SdAttrLayerName( m_pEdtName->GetText() ) );
diff --git a/sd/source/ui/dlg/masterlayoutdlg.cxx b/sd/source/ui/dlg/masterlayoutdlg.cxx
index d10f8224ad8b..898ca5b2e4eb 100644
--- a/sd/source/ui/dlg/masterlayoutdlg.cxx
+++ b/sd/source/ui/dlg/masterlayoutdlg.cxx
@@ -75,6 +75,21 @@ MasterLayoutDialog::MasterLayoutDialog( vcl::Window* pParent, SdDrawDocument* pD
mpCBPageNumber->Check( mbOldPageNumber );
}
+MasterLayoutDialog::~MasterLayoutDialog()
+{
+ dispose();
+}
+
+void MasterLayoutDialog::dispose()
+{
+ mpCBDate.clear();
+ mpCBPageNumber.clear();
+ mpCBSlideNumber.clear();
+ mpCBHeader.clear();
+ mpCBFooter.clear();
+ ModalDialog::dispose();
+}
+
short MasterLayoutDialog::Execute()
{
if ( ModalDialog::Execute() )
diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx
index d21de6f97c27..8ea2b1856965 100644
--- a/sd/source/ui/dlg/morphdlg.cxx
+++ b/sd/source/ui/dlg/morphdlg.cxx
@@ -66,6 +66,15 @@ MorphDlg::MorphDlg( vcl::Window* pParent, const SdrObject* pObj1, const SdrObjec
MorphDlg::~MorphDlg()
{
+ dispose();
+}
+
+void MorphDlg::dispose()
+{
+ m_pMtfSteps.clear();
+ m_pCbxAttributes.clear();
+ m_pCbxOrientation.clear();
+ ModalDialog::dispose();
}
void MorphDlg::LoadSettings()
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index 53fb0adb873e..6714cb0ba55e 100644
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -39,6 +39,7 @@ class SdParagraphNumTabPage : public SfxTabPage
public:
SdParagraphNumTabPage(vcl::Window* pParent, const SfxItemSet& rSet );
virtual ~SdParagraphNumTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
static const sal_uInt16* GetRanges();
@@ -47,9 +48,9 @@ public:
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
private:
- TriStateBox* m_pNewStartCB;
- TriStateBox* m_pNewStartNumberCB;
- NumericField* m_pNewStartNF;
+ VclPtr<TriStateBox> m_pNewStartCB;
+ VclPtr<TriStateBox> m_pNewStartNumberCB;
+ VclPtr<NumericField> m_pNewStartNF;
bool mbModified;
DECL_LINK( ImplNewStartHdl, void* );
@@ -72,6 +73,15 @@ SdParagraphNumTabPage::SdParagraphNumTabPage(vcl::Window* pParent, const SfxItem
SdParagraphNumTabPage::~SdParagraphNumTabPage()
{
+ dispose();
+}
+
+void SdParagraphNumTabPage::dispose()
+{
+ m_pNewStartCB.clear();
+ m_pNewStartNumberCB.clear();
+ m_pNewStartNF.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* SdParagraphNumTabPage::Create(vcl::Window *pParent, const SfxItemSet * rAttrSet)
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index c4b95a9d2458..72d30c31b6c1 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -150,6 +150,39 @@ SdStartPresentationDlg::SdStartPresentationDlg( vcl::Window* pWindow,
ChangePauseHdl( NULL );
}
+SdStartPresentationDlg::~SdStartPresentationDlg()
+{
+ dispose();
+}
+
+void SdStartPresentationDlg::dispose()
+{
+ aRbtAll.clear();
+ aRbtAtDia.clear();
+ aRbtCustomshow.clear();
+ aLbDias.clear();
+ aLbCustomshow.clear();
+ aRbtStandard.clear();
+ aRbtWindow.clear();
+ aRbtAuto.clear();
+ aTmfPause.clear();
+ aCbxAutoLogo.clear();
+ aCbxManuel.clear();
+ aCbxMousepointer.clear();
+ aCbxPen.clear();
+ aCbxNavigator.clear();
+ aCbxAnimationAllowed.clear();
+ aCbxChangePage.clear();
+ aCbxAlwaysOnTop.clear();
+ maFtMonitor.clear();
+ maLBMonitor.clear();
+ msMonitor.clear();
+ msAllMonitors.clear();
+ msMonitorExternal.clear();
+ msExternal.clear();
+ ModalDialog::dispose();
+}
+
OUString SdStartPresentationDlg::GetDisplayName( sal_Int32 nDisplay,
DisplayType eType )
{
diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index 943144be7a53..b9cdc6e06ce7 100644
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -30,7 +30,7 @@
*/
SdPrintOptions::SdPrintOptions( vcl::Window* pParent, const SfxItemSet& rInAttrs ) :
SfxTabPage ( pParent, "prntopts" , "modules/simpress/ui/prntopts.ui" , &rInAttrs ),
- rOutAttrs ( rInAttrs )
+ rOutAttrs ( rInAttrs )
{
get( m_pFrmContent , "contentframe" );
get( m_pCbxDraw , "drawingcb" );
@@ -74,6 +74,31 @@ SdPrintOptions::SdPrintOptions( vcl::Window* pParent, const SfxItemSet& rInAttrs
SdPrintOptions::~SdPrintOptions()
{
+ dispose();
+}
+
+void SdPrintOptions::dispose()
+{
+ m_pFrmContent.clear();
+ m_pCbxDraw.clear();
+ m_pCbxNotes.clear();
+ m_pCbxHandout.clear();
+ m_pCbxOutline.clear();
+ m_pRbtColor.clear();
+ m_pRbtGrayscale.clear();
+ m_pRbtBlackWhite.clear();
+ m_pCbxPagename.clear();
+ m_pCbxDate.clear();
+ m_pCbxTime.clear();
+ m_pCbxHiddenPages.clear();
+ m_pRbtDefault.clear();
+ m_pRbtPagesize.clear();
+ m_pRbtPagetile.clear();
+ m_pRbtBooklet.clear();
+ m_pCbxFront.clear();
+ m_pCbxBack.clear();
+ m_pCbxPaperbin.clear();
+ SfxTabPage::dispose();
}
bool SdPrintOptions::FillItemSet( SfxItemSet* rAttrs )
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 8e5c87a381d3..3e4c4a9a4155 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -121,37 +121,37 @@ OUString SdAbstractTabDialog_Impl::GetText() const
void AbstractBulletDialog_Impl::SetCurPageId( sal_uInt16 nId )
{
- static_cast< ::sd::OutlineBulletDlg*>(pDlg)->SetCurPageId( nId );
+ static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->SetCurPageId( nId );
}
void AbstractBulletDialog_Impl::SetCurPageId( const OString& rName )
{
- static_cast< ::sd::OutlineBulletDlg*>(pDlg)->SetCurPageId( rName );
+ static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->SetCurPageId( rName );
}
const SfxItemSet* AbstractBulletDialog_Impl::GetOutputItemSet() const
{
- return static_cast< ::sd::OutlineBulletDlg*>(pDlg)->GetOutputItemSet();
+ return static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->GetOutputItemSet();
}
const sal_uInt16* AbstractBulletDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
- return static_cast< ::sd::OutlineBulletDlg*>(pDlg)->GetInputRanges( pItem );
+ return static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->GetInputRanges( pItem );
}
void AbstractBulletDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
{
- static_cast< ::sd::OutlineBulletDlg*>(pDlg)->SetInputSet( pInSet );
+ static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->SetInputSet( pInSet );
}
void AbstractBulletDialog_Impl::SetText( const OUString& rStr )
{
- static_cast< ::sd::OutlineBulletDlg*>(pDlg)->SetText( rStr );
+ static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->SetText( rStr );
}
OUString AbstractBulletDialog_Impl::GetText() const
{
- return static_cast< ::sd::OutlineBulletDlg*>(pDlg)->GetText();
+ return static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->GetText();
}
void SdPresLayoutTemplateDlg_Impl::SetCurPageId( sal_uInt16 nId )
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 38d6d1e4c1e7..b7fe5347e91a 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -23,7 +23,7 @@
#include <sfx2/basedlgs.hxx>
#define DECL_ABSTDLG_BASE(Class,DialogClass) \
- DialogClass* pDlg; \
+ VclPtr<DialogClass> pDlg; \
public: \
Class( DialogClass* p) \
: pDlg(p) \
@@ -34,7 +34,6 @@ public: \
#define IMPL_ABSTDLG_BASE(Class) \
Class::~Class() \
{ \
- delete pDlg; \
} \
short Class::Execute() \
{ \
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index 21d8a89afb6f..6c9691affc69 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -55,6 +55,16 @@ SdPresLayoutDlg::SdPresLayoutDlg(::sd::DrawDocShell* pDocShell,
SdPresLayoutDlg::~SdPresLayoutDlg()
{
+ dispose();
+}
+
+void SdPresLayoutDlg::dispose()
+{
+ m_pVS.clear();
+ m_pCbxMasterPage.clear();
+ m_pCbxCheckMasters.clear();
+ m_pBtnLoad.clear();
+ ModalDialog::dispose();
}
/**
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 184cc15081d8..e7473b16e39a 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -265,6 +265,8 @@ void SdPageObjsTLB::dispose()
else
// no document was created from mpMedium, so this object is still the owner of it
delete mpMedium;
+ mpParent.clear();
+ mpDropNavWin.clear();
SvTreeListBox::dispose();
}
@@ -1349,7 +1351,7 @@ sal_Int8 SdPageObjsTLB::ExecuteDrop( const ExecuteDropEvent& rEvt )
OUString aFile;
if( aDataHelper.GetString( SotClipboardFormatId::SIMPLE_FILE, aFile ) &&
- static_cast<SdNavigatorWin*>(mpParent)->InsertFile( aFile ) )
+ static_cast<SdNavigatorWin*>(mpParent.get())->InsertFile( aFile ) )
{
nRet = rEvt.mnAction;
}
diff --git a/sd/source/ui/dlg/sduiexp.cxx b/sd/source/ui/dlg/sduiexp.cxx
index 3c526380a538..84127950fcd2 100644
--- a/sd/source/ui/dlg/sduiexp.cxx
+++ b/sd/source/ui/dlg/sduiexp.cxx
@@ -18,6 +18,21 @@
*/
#include "sddlgfact.hxx"
+#include "morphdlg.hxx"
+#include "present.hxx"
+#include "inspagob.hxx"
+#include "vectdlg.hxx"
+#include "sdpreslt.hxx"
+#include "headerfooterdlg.hxx"
+#include "pubdlg.hxx"
+#include "ins_paste.hxx"
+#include "layeroptionsdlg.hxx"
+#include "dlgsnap.hxx"
+#include "dlgfield.hxx"
+#include "dlgass.hxx"
+#include "prltempl.hxx"
+#include "custsdlg.hxx"
+#include "copydlg.hxx"
#include "sal/types.h"
extern "C"
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 521a9c64bcb7..f4ae36271b57 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -142,6 +142,25 @@ SdTPAction::SdTPAction(vcl::Window* pWindow, const SfxItemSet& rInAttrs)
SdTPAction::~SdTPAction()
{
+ dispose();
+}
+
+void SdTPAction::dispose()
+{
+ m_pLbAction.clear();
+ m_pFtTree.clear();
+ m_pLbTree.clear();
+ m_pLbTreeDocument.clear();
+ m_pLbOLEAction.clear();
+ m_pFrame.clear();
+ m_pEdtSound.clear();
+ m_pEdtBookmark.clear();
+ m_pEdtDocument.clear();
+ m_pEdtProgram.clear();
+ m_pEdtMacro.clear();
+ m_pBtnSearch.clear();
+ m_pBtnSeek.clear();
+ SfxTabPage::dispose();
}
void SdTPAction::SetView( const ::sd::View* pSdView )
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 6383700d0bb7..eefac3577a77 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -122,6 +122,16 @@ SdTpOptionsContents::SdTpOptionsContents( vcl::Window* pParent, const SfxItemSet
SdTpOptionsContents::~SdTpOptionsContents()
{
+ dispose();
+}
+
+void SdTpOptionsContents::dispose()
+{
+ m_pCbxRuler.clear();
+ m_pCbxDragStripes.clear();
+ m_pCbxHandlesBezier.clear();
+ m_pCbxMoveOutline.clear();
+ SfxTabPage::dispose();
}
bool SdTpOptionsContents::FillItemSet( SfxItemSet* rAttrs )
@@ -276,6 +286,38 @@ SdTpOptionsMisc::SdTpOptionsMisc(vcl::Window* pParent, const SfxItemSet& rInAttr
SdTpOptionsMisc::~SdTpOptionsMisc()
{
+ dispose();
+}
+
+void SdTpOptionsMisc::dispose()
+{
+ m_pCbxQuickEdit.clear();
+ m_pCbxPickThrough.clear();
+ m_pNewDocumentFrame.clear();
+ m_pCbxStartWithTemplate.clear();
+ m_pCbxMasterPageCache.clear();
+ m_pCbxCopy.clear();
+ m_pCbxMarkedHitMovesAlways.clear();
+ m_pPresentationFrame.clear();
+ m_pLbMetric.clear();
+ m_pMtrFldTabstop.clear();
+ m_pCbxEnableSdremote.clear();
+ m_pCbxEnablePresenterScreen.clear();
+ m_pCbxUsePrinterMetrics.clear();
+ m_pCbxCompatibility.clear();
+ m_pScaleFrame.clear();
+ m_pCbScale.clear();
+ m_pNewDocLb.clear();
+ m_pFiInfo1.clear();
+ m_pMtrFldOriginalWidth.clear();
+ m_pWidthLb.clear();
+ m_pHeightLb.clear();
+ m_pFiInfo2.clear();
+ m_pMtrFldOriginalHeight.clear();
+ m_pCbxDistrot.clear();
+ m_pMtrFldInfo1.clear();
+ m_pMtrFldInfo2.clear();
+ SfxTabPage::dispose();
}
void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet )
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index 71d6ed9dd558..99f86cb9d239 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -72,6 +72,22 @@ SdVectorizeDlg::SdVectorizeDlg(vcl::Window* pParent, const Bitmap& rBmp, ::sd::D
SdVectorizeDlg::~SdVectorizeDlg()
{
+ dispose();
+}
+
+void SdVectorizeDlg::dispose()
+{
+ m_pNmLayers.clear();
+ m_pMtReduce.clear();
+ m_pFtFillHoles.clear();
+ m_pMtFillHoles.clear();
+ m_pCbFillHoles.clear();
+ m_pBmpWin.clear();
+ m_pMtfWin.clear();
+ m_pPrgs.clear();
+ m_pBtnOK.clear();
+ m_pBtnPreview.clear();
+ ModalDialog::dispose();
}
Rectangle SdVectorizeDlg::GetRect( const Size& rDispSize, const Size& rBmpSize ) const
diff --git a/sd/source/ui/framework/factories/ChildWindowPane.cxx b/sd/source/ui/framework/factories/ChildWindowPane.cxx
index 7e6da77b9cbf..d0c0766588ea 100644
--- a/sd/source/ui/framework/factories/ChildWindowPane.cxx
+++ b/sd/source/ui/framework/factories/ChildWindowPane.cxx
@@ -188,7 +188,7 @@ void SAL_CALL ChildWindowPane::disposing (void)
Reference<awt::XWindow> SAL_CALL ChildWindowPane::getWindow (void)
throw (RuntimeException, std::exception)
{
- if (mpWindow == NULL || ! mxWindow.is())
+ if (mpWindow == nullptr || ! mxWindow.is())
GetWindow();
return Pane::getWindow();
}
diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx
index ae8698c4f503..ba1a0131734c 100644
--- a/sd/source/ui/framework/factories/FullScreenPane.cxx
+++ b/sd/source/ui/framework/factories/FullScreenPane.cxx
@@ -103,11 +103,7 @@ FullScreenPane::~FullScreenPane (void) throw()
void SAL_CALL FullScreenPane::disposing (void)
{
- // We have created the window pointed to by mpWindow, we delete it.
- if (mpWindow != NULL)
- {
- delete mpWindow;
- }
+ mpWindow.clear();
if (mpWorkWindow.get() != NULL)
{
@@ -126,7 +122,7 @@ sal_Bool SAL_CALL FullScreenPane::isVisible (void)
{
ThrowIfDisposed();
- if (mpWindow != NULL)
+ if (mpWindow != nullptr)
return mpWindow->IsReallyVisible();
else
return false;
@@ -137,7 +133,7 @@ void SAL_CALL FullScreenPane::setVisible (const sal_Bool bIsVisible)
{
ThrowIfDisposed();
- if (mpWindow != NULL)
+ if (mpWindow != nullptr)
mpWindow->Show(bIsVisible);
if (mpWorkWindow != 0)
mpWorkWindow->Show(bIsVisible);
@@ -160,7 +156,7 @@ void SAL_CALL FullScreenPane::setAccessible (
{
ThrowIfDisposed();
- if (mpWindow != NULL)
+ if (mpWindow != nullptr)
{
Reference<lang::XInitialization> xInitializable (rxAccessible, UNO_QUERY);
if (xInitializable.is())
diff --git a/sd/source/ui/framework/factories/Pane.cxx b/sd/source/ui/framework/factories/Pane.cxx
index 978cb870f8ec..9a9f04dfaf41 100644
--- a/sd/source/ui/framework/factories/Pane.cxx
+++ b/sd/source/ui/framework/factories/Pane.cxx
@@ -175,7 +175,7 @@ Reference<rendering::XCanvas> Pane::CreateCanvas (void)
{
Reference<rendering::XCanvas> xCanvas;
- if (mpWindow != NULL)
+ if (mpWindow != nullptr)
{
::cppcanvas::SpriteCanvasSharedPtr pCanvas (
::cppcanvas::VCLFactory::getInstance().createSpriteCanvas(*mpWindow));
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index f1db1952db29..f3d94ef85579 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -101,9 +101,6 @@ FuPoor::~FuPoor()
aDragTimer.Stop();
aScrollTimer.Stop();
aDelayToScrollTimer.Stop ();
-
- if (pDialog)
- delete pDialog;
}
void FuPoor::Activate()
@@ -130,6 +127,11 @@ void FuPoor::Deactivate()
if (mpWindow) mpWindow->ReleaseMouse ();
}
+void FuPoor::SetWindow(::sd::Window* pWin)
+{
+ mpWindow = pWin;
+}
+
/**
* scroll when approached the border of the window; is called by MouseMove
*/
diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
index 16241381f83f..af4c95012e63 100644
--- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
+++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
@@ -278,7 +278,7 @@ private:
protected:
/// The core window that is made accessible.
- ::sd::Window* mpWindow;
+ VclPtr<::sd::Window> mpWindow;
/// The API window that is made accessible.
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow>
diff --git a/sd/source/ui/inc/AccessibleSlideSorterView.hxx b/sd/source/ui/inc/AccessibleSlideSorterView.hxx
index 99affbe53d99..070bd303bd2d 100644
--- a/sd/source/ui/inc/AccessibleSlideSorterView.hxx
+++ b/sd/source/ui/inc/AccessibleSlideSorterView.hxx
@@ -31,6 +31,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/awt/XFocusListener.hpp>
#include <com/sun/star/document/XEventListener.hpp>
+#include <vcl/vclptr.hxx>
#include <memory>
@@ -297,7 +298,7 @@ private:
sal_uInt32 mnClientId;
- vcl::Window* mpContentWindow;
+ VclPtr<vcl::Window> mpContentWindow;
/** Check whether or not the object has been disposed (or is in the
state of being disposed). If that is the case then
diff --git a/sd/source/ui/inc/BreakDlg.hxx b/sd/source/ui/inc/BreakDlg.hxx
index 13aab79c025b..40c650c5ee7f 100644
--- a/sd/source/ui/inc/BreakDlg.hxx
+++ b/sd/source/ui/inc/BreakDlg.hxx
@@ -58,10 +58,10 @@ public:
short Execute() SAL_OVERRIDE;
private:
- FixedText* m_pFiObjInfo;
- FixedText* m_pFiActInfo;
- FixedText* m_pFiInsInfo;
- CancelButton* m_pBtnCancel;
+ VclPtr<FixedText> m_pFiObjInfo;
+ VclPtr<FixedText> m_pFiActInfo;
+ VclPtr<FixedText> m_pFiInsInfo;
+ VclPtr<CancelButton> m_pBtnCancel;
DrawView* pDrView;
diff --git a/sd/source/ui/inc/FormShellManager.hxx b/sd/source/ui/inc/FormShellManager.hxx
index 0168800353ca..1e1e104a758f 100644
--- a/sd/source/ui/inc/FormShellManager.hxx
+++ b/sd/source/ui/inc/FormShellManager.hxx
@@ -24,6 +24,7 @@
#include <tools/link.hxx>
#include <svl/lstner.hxx>
+#include <vcl/vclptr.hxx>
class VclWindowEvent;
class FmFormShell;
@@ -89,7 +90,7 @@ private:
bool mbIsMainViewChangePending;
- vcl::Window* mpMainViewShellWindow;
+ VclPtr<vcl::Window> mpMainViewShellWindow;
/** Register at window of center pane and at the form shell that
represents the form tool bar. The former informs this manager about
diff --git a/sd/source/ui/inc/Ruler.hxx b/sd/source/ui/inc/Ruler.hxx
index 5ca70571aa6b..efaa152061b4 100644
--- a/sd/source/ui/inc/Ruler.hxx
+++ b/sd/source/ui/inc/Ruler.hxx
@@ -50,7 +50,7 @@ public:
using ::Ruler::SetNullOffset;
protected:
::sd::View* pSdView;
- ::sd::Window* pSdWin;
+ VclPtr<::sd::Window> pSdWin;
DrawViewShell* pDrViewShell;
RulerCtrlItem* pCtrlItem;
bool bHorz;
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 93bb0f9485e2..f0f643e40946 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -484,7 +484,7 @@ protected:
bool mbHasRulers;
/// The active window.
- ::sd::Window* mpActiveWindow;
+ VclPtr<::sd::Window> mpActiveWindow;
::sd::View* mpView;
FrameView* mpFrameView;
@@ -568,7 +568,7 @@ protected:
void doShow();
private:
- ::vcl::Window* mpParentWindow;
+ VclPtr<::vcl::Window> mpParentWindow;
/** This window updater is used to keep all relevant windows up to date
with reference to the digit language used to display digits in text
shapes.
diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx
index 9e81c7645184..9586e61298d7 100644
--- a/sd/source/ui/inc/Window.hxx
+++ b/sd/source/ui/inc/Window.hxx
@@ -150,7 +150,7 @@ public:
void DropScroll (const Point& rMousePos);
virtual void KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE;
protected:
- ::sd::Window* mpShareWin;
+ VclPtr<::sd::Window> mpShareWin;
Point maWinPos;
Point maViewOrigin;
Size maViewSize;
diff --git a/sd/source/ui/inc/WindowUpdater.hxx b/sd/source/ui/inc/WindowUpdater.hxx
index b35c73c82a0c..5f7c5c978cc7 100644
--- a/sd/source/ui/inc/WindowUpdater.hxx
+++ b/sd/source/ui/inc/WindowUpdater.hxx
@@ -22,6 +22,7 @@
#include <svl/lstner.hxx>
#include <svl/ctloptions.hxx>
+#include <vcl/vclptr.hxx>
#include "sddllapi.h"
#include <vector>
@@ -120,7 +121,7 @@ private:
/** Type and data member for a list of devices that have to be kept
up-to-date.
*/
- typedef ::std::vector< vcl::Window*> tWindowList;
+ typedef ::std::vector< VclPtr<vcl::Window> > tWindowList;
tWindowList maWindowList;
/** The central method of this class. Update the given output device.
diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx
index 24ec9e859dd4..20f3ffeccddd 100644
--- a/sd/source/ui/inc/animobjs.hxx
+++ b/sd/source/ui/inc/animobjs.hxx
@@ -98,28 +98,28 @@ protected:
virtual void FillInfo( SfxChildWinInfo& ) const SAL_OVERRIDE;
private:
- SdDisplay* m_pCtlDisplay;
- PushButton* m_pBtnFirst;
- PushButton* m_pBtnReverse;
- PushButton* m_pBtnStop;
- PushButton* m_pBtnPlay;
- PushButton* m_pBtnLast;
- NumericField* m_pNumFldBitmap;
- TimeField* m_pTimeField;
- ListBox* m_pLbLoopCount;
- PushButton* m_pBtnGetOneObject;
- PushButton* m_pBtnGetAllObjects;
- PushButton* m_pBtnRemoveBitmap;
- PushButton* m_pBtnRemoveAll;
- FixedText* m_pFiCount;
-
- RadioButton* m_pRbtGroup;
- RadioButton* m_pRbtBitmap;
- FixedText* m_pFtAdjustment;
- ListBox* m_pLbAdjustment;
- PushButton* m_pBtnCreateGroup;
-
- vcl::Window* pWin;
+ VclPtr<SdDisplay> m_pCtlDisplay;
+ VclPtr<PushButton> m_pBtnFirst;
+ VclPtr<PushButton> m_pBtnReverse;
+ VclPtr<PushButton> m_pBtnStop;
+ VclPtr<PushButton> m_pBtnPlay;
+ VclPtr<PushButton> m_pBtnLast;
+ VclPtr<NumericField> m_pNumFldBitmap;
+ VclPtr<TimeField> m_pTimeField;
+ VclPtr<ListBox> m_pLbLoopCount;
+ VclPtr<PushButton> m_pBtnGetOneObject;
+ VclPtr<PushButton> m_pBtnGetAllObjects;
+ VclPtr<PushButton> m_pBtnRemoveBitmap;
+ VclPtr<PushButton> m_pBtnRemoveAll;
+ VclPtr<FixedText> m_pFiCount;
+
+ VclPtr<RadioButton> m_pRbtGroup;
+ VclPtr<RadioButton> m_pRbtBitmap;
+ VclPtr<FixedText> m_pFtAdjustment;
+ VclPtr<ListBox> m_pLbAdjustment;
+ VclPtr<PushButton> m_pBtnCreateGroup;
+
+ VclPtr<vcl::Window> pWin;
::std::vector< ::std::pair<BitmapEx*, ::tools::Time*> > m_FrameList;
static const size_t EMPTY_FRAMELIST;
size_t m_nCurrentFrame;
@@ -164,7 +164,7 @@ protected:
virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
const SfxPoolItem* pState ) SAL_OVERRIDE;
private:
- AnimationWindow* pAnimationWin;
+ VclPtr<AnimationWindow> pAnimationWin;
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/copydlg.hxx b/sd/source/ui/inc/copydlg.hxx
index e0d1237218c4..1da44c927a6c 100644
--- a/sd/source/ui/inc/copydlg.hxx
+++ b/sd/source/ui/inc/copydlg.hxx
@@ -48,21 +48,21 @@ public:
void Reset();
private:
- NumericField* m_pNumFldCopies;
- Button* m_pBtnSetViewData;
+ VclPtr<NumericField> m_pNumFldCopies;
+ VclPtr<Button> m_pBtnSetViewData;
- MetricField* m_pMtrFldMoveX;
- MetricField* m_pMtrFldMoveY;
- MetricField* m_pMtrFldAngle;
+ VclPtr<MetricField> m_pMtrFldMoveX;
+ VclPtr<MetricField> m_pMtrFldMoveY;
+ VclPtr<MetricField> m_pMtrFldAngle;
- MetricField* m_pMtrFldWidth;
- MetricField* m_pMtrFldHeight;
+ VclPtr<MetricField> m_pMtrFldWidth;
+ VclPtr<MetricField> m_pMtrFldHeight;
- ColorLB* m_pLbStartColor;
- FixedText* m_pFtEndColor;
- ColorLB* m_pLbEndColor;
+ VclPtr<ColorLB> m_pLbStartColor;
+ VclPtr<FixedText> m_pFtEndColor;
+ VclPtr<ColorLB> m_pLbEndColor;
- PushButton* m_pBtnSetDefault;
+ VclPtr<PushButton> m_pBtnSetDefault;
const SfxItemSet& mrOutAttrs;
XColorListRef mpColorList;
diff --git a/sd/source/ui/inc/custsdlg.hxx b/sd/source/ui/inc/custsdlg.hxx
index 54f1cfe6b73b..4fcbc7d54c75 100644
--- a/sd/source/ui/inc/custsdlg.hxx
+++ b/sd/source/ui/inc/custsdlg.hxx
@@ -34,15 +34,15 @@ class SdCustomShowList;
class SdCustomShowDlg : public ModalDialog
{
private:
- ListBox* m_pLbCustomShows;
- CheckBox* m_pCbxUseCustomShow;
- PushButton* m_pBtnNew;
- PushButton* m_pBtnEdit;
- PushButton* m_pBtnRemove;
- PushButton* m_pBtnCopy;
- HelpButton* m_pBtnHelp;
- PushButton* m_pBtnStartShow;
- OKButton* m_pBtnOK;
+ VclPtr<ListBox> m_pLbCustomShows;
+ VclPtr<CheckBox> m_pCbxUseCustomShow;
+ VclPtr<PushButton> m_pBtnNew;
+ VclPtr<PushButton> m_pBtnEdit;
+ VclPtr<PushButton> m_pBtnRemove;
+ VclPtr<PushButton> m_pBtnCopy;
+ VclPtr<HelpButton> m_pBtnHelp;
+ VclPtr<PushButton> m_pBtnStartShow;
+ VclPtr<OKButton> m_pBtnOK;
SdDrawDocument& rDoc;
SdCustomShowList* pCustomShowList;
@@ -57,22 +57,22 @@ private:
public:
SdCustomShowDlg( vcl::Window* pWindow, SdDrawDocument& rDrawDoc );
virtual ~SdCustomShowDlg();
-
- bool IsModified() const { return bModified; }
- bool IsCustomShow() const;
+ virtual void dispose() SAL_OVERRIDE;
+ bool IsModified() const { return bModified; }
+ bool IsCustomShow() const;
};
class SdDefineCustomShowDlg : public ModalDialog
{
private:
- Edit* m_pEdtName;
- ListBox* m_pLbPages;
- PushButton* m_pBtnAdd;
- PushButton* m_pBtnRemove;
- SvTreeListBox* m_pLbCustomPages;
- OKButton* m_pBtnOK;
- CancelButton* m_pBtnCancel;
- HelpButton* m_pBtnHelp;
+ VclPtr<Edit> m_pEdtName;
+ VclPtr<ListBox> m_pLbPages;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnRemove;
+ VclPtr<SvTreeListBox> m_pLbCustomPages;
+ VclPtr<OKButton> m_pBtnOK;
+ VclPtr<CancelButton> m_pBtnCancel;
+ VclPtr<HelpButton> m_pBtnHelp;
SdDrawDocument& rDoc;
SdCustomShow*& rpCustomShow;
@@ -90,6 +90,7 @@ public:
SdDefineCustomShowDlg( vcl::Window* pWindow,
SdDrawDocument& rDrawDoc, SdCustomShow*& rpCS );
virtual ~SdDefineCustomShowDlg();
+ virtual void dispose() SAL_OVERRIDE;
bool IsModified() const { return bModified; }
};
diff --git a/sd/source/ui/inc/dlgfield.hxx b/sd/source/ui/inc/dlgfield.hxx
index b458b8df84b9..fe11b0768b45 100644
--- a/sd/source/ui/inc/dlgfield.hxx
+++ b/sd/source/ui/inc/dlgfield.hxx
@@ -34,10 +34,10 @@ class SvxFieldData;
class SdModifyFieldDlg : public ModalDialog
{
private:
- RadioButton* m_pRbtFix;
- RadioButton* m_pRbtVar;
- SvxLanguageBox* m_pLbLanguage;
- ListBox* m_pLbFormat;
+ VclPtr<RadioButton> m_pRbtFix;
+ VclPtr<RadioButton> m_pRbtVar;
+ VclPtr<SvxLanguageBox> m_pLbLanguage;
+ VclPtr<ListBox> m_pLbFormat;
SfxItemSet maInputSet;
const SvxFieldData* pField;
@@ -49,7 +49,8 @@ private:
public:
SdModifyFieldDlg( vcl::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet );
- virtual ~SdModifyFieldDlg() {}
+ virtual ~SdModifyFieldDlg();
+ virtual void dispose() SAL_OVERRIDE;
SvxFieldData* GetField();
SfxItemSet GetItemSet();
diff --git a/sd/source/ui/inc/dlgsnap.hxx b/sd/source/ui/inc/dlgsnap.hxx
index ab431c856be3..f17a7c5c3413 100644
--- a/sd/source/ui/inc/dlgsnap.hxx
+++ b/sd/source/ui/inc/dlgsnap.hxx
@@ -41,15 +41,15 @@ namespace sd {
class SdSnapLineDlg : public ModalDialog
{
private:
- FixedText* m_pFtX;
- MetricField* m_pMtrFldX;
- FixedText* m_pFtY;
- MetricField* m_pMtrFldY;
- VclContainer* m_pRadioGroup;
- RadioButton* m_pRbPoint;
- RadioButton* m_pRbVert;
- RadioButton* m_pRbHorz;
- PushButton* m_pBtnDelete;
+ VclPtr<FixedText> m_pFtX;
+ VclPtr<MetricField> m_pMtrFldX;
+ VclPtr<FixedText> m_pFtY;
+ VclPtr<MetricField> m_pMtrFldY;
+ VclPtr<VclContainer> m_pRadioGroup;
+ VclPtr<RadioButton> m_pRbPoint;
+ VclPtr<RadioButton> m_pRbVert;
+ VclPtr<RadioButton> m_pRbHorz;
+ VclPtr<PushButton> m_pBtnDelete;
long nXValue;
long nYValue;
FieldUnit eUIUnit;
@@ -59,6 +59,8 @@ private:
public:
SdSnapLineDlg(vcl::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView);
+ virtual ~SdSnapLineDlg();
+ virtual void dispose() SAL_OVERRIDE;
void GetAttr(SfxItemSet& rOutAttrs);
diff --git a/sd/source/ui/inc/framework/Pane.hxx b/sd/source/ui/inc/framework/Pane.hxx
index b4ee242f32bf..7945aa29bc5b 100644
--- a/sd/source/ui/inc/framework/Pane.hxx
+++ b/sd/source/ui/inc/framework/Pane.hxx
@@ -29,6 +29,7 @@
#include <cppuhelper/compbase3.hxx>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
+#include <vcl/vclptr.hxx>
namespace vcl { class Window; }
@@ -135,7 +136,7 @@ public:
protected:
::com::sun::star::uno::Reference<com::sun::star::drawing::framework::XResourceId> mxPaneId;
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
::com::sun::star::uno::Reference<com::sun::star::awt::XWindow> mxWindow;
::com::sun::star::uno::Reference<com::sun::star::rendering::XCanvas> mxCanvas;
diff --git a/sd/source/ui/inc/fupoor.hxx b/sd/source/ui/inc/fupoor.hxx
index 00817a769d5a..67a7a91d598d 100644
--- a/sd/source/ui/inc/fupoor.hxx
+++ b/sd/source/ui/inc/fupoor.hxx
@@ -82,7 +82,7 @@ public:
virtual void Activate(); ///< activates the function
virtual void Deactivate(); ///< deactivates the function
- void SetWindow(::sd::Window* pWin) { mpWindow = pWin; }
+ void SetWindow(::sd::Window* pWin);
virtual void SelectionHasChanged();
@@ -150,14 +150,14 @@ protected:
::sd::View* mpView;
ViewShell* mpViewShell;
- ::sd::Window* mpWindow;
+ VclPtr<::sd::Window> mpWindow;
DrawDocShell* mpDocSh;
SdDrawDocument* mpDoc;
sal_uInt16 nSlotId;
sal_uInt16 nSlotValue;
- Dialog* pDialog;
+ VclPtr<Dialog> pDialog;
Timer aScrollTimer; ///< for auto-scrolling
DECL_LINK( ScrollHdl, void * );
diff --git a/sd/source/ui/inc/headerfooterdlg.hxx b/sd/source/ui/inc/headerfooterdlg.hxx
index 558e6487878b..4206cd4dc62b 100644
--- a/sd/source/ui/inc/headerfooterdlg.hxx
+++ b/sd/source/ui/inc/headerfooterdlg.hxx
@@ -44,17 +44,17 @@ private:
DECL_LINK( ClickApplyHdl, void * );
DECL_LINK( ClickCancelHdl, void * );
- TabControl* mpTabCtrl;
+ VclPtr<TabControl> mpTabCtrl;
- HeaderFooterTabPage* mpSlideTabPage;
- HeaderFooterTabPage* mpNotesHandoutsTabPage;
+ VclPtr<HeaderFooterTabPage> mpSlideTabPage;
+ VclPtr<HeaderFooterTabPage> mpNotesHandoutsTabPage;
sal_uInt16 mnSlidesId;
sal_uInt16 mnNotesId;
- PushButton* maPBApplyToAll;
- PushButton* maPBApply;
- CancelButton* maPBCancel;
+ VclPtr<PushButton> maPBApplyToAll;
+ VclPtr<PushButton> maPBApply;
+ VclPtr<CancelButton> maPBCancel;
HeaderFooterSettings maSlideSettings;
HeaderFooterSettings maNotesHandoutSettings;
diff --git a/sd/source/ui/inc/ins_paste.hxx b/sd/source/ui/inc/ins_paste.hxx
index 0cd396f4c31a..78362535242b 100644
--- a/sd/source/ui/inc/ins_paste.hxx
+++ b/sd/source/ui/inc/ins_paste.hxx
@@ -31,11 +31,13 @@
class SD_DLLPUBLIC SdInsertPasteDlg : public ModalDialog
{
private:
- RadioButton* m_pRbBefore;
- RadioButton* m_pRbAfter;
+ VclPtr<RadioButton> m_pRbBefore;
+ VclPtr<RadioButton> m_pRbAfter;
public:
SdInsertPasteDlg( vcl::Window* pWindow );
+ virtual ~SdInsertPasteDlg();
+ virtual void dispose() SAL_OVERRIDE;
bool IsInsertBefore() const;
};
diff --git a/sd/source/ui/inc/inspagob.hxx b/sd/source/ui/inc/inspagob.hxx
index f7a0e12ae859..7dd1c7541b94 100644
--- a/sd/source/ui/inc/inspagob.hxx
+++ b/sd/source/ui/inc/inspagob.hxx
@@ -29,9 +29,9 @@ class SdDrawDocument;
class SdInsertPagesObjsDlg : public ModalDialog
{
private:
- SdPageObjsTLB* m_pLbTree;
- CheckBox* m_pCbxLink;
- CheckBox* m_pCbxMasters;
+ VclPtr<SdPageObjsTLB> m_pLbTree;
+ VclPtr<CheckBox> m_pCbxLink;
+ VclPtr<CheckBox> m_pCbxMasters;
SfxMedium* pMedium;
const SdDrawDocument* mpDoc;
@@ -46,6 +46,7 @@ public:
SfxMedium* pSfxMedium,
const OUString& rFileName );
virtual ~SdInsertPagesObjsDlg();
+ virtual void dispose() SAL_OVERRIDE;
/** returns the list
nType == 0 -> pages
diff --git a/sd/source/ui/inc/layeroptionsdlg.hxx b/sd/source/ui/inc/layeroptionsdlg.hxx
index e3ad80873223..ec0b1d24ad30 100644
--- a/sd/source/ui/inc/layeroptionsdlg.hxx
+++ b/sd/source/ui/inc/layeroptionsdlg.hxx
@@ -35,12 +35,12 @@ class SfxItemSet;
class SD_DLLPUBLIC SdInsertLayerDlg : public ModalDialog
{
private:
- Edit* m_pEdtName;
- Edit* m_pEdtTitle;
- VclMultiLineEdit* m_pEdtDesc;
- CheckBox* m_pCbxVisible;
- CheckBox* m_pCbxPrintable;
- CheckBox* m_pCbxLocked;
+ VclPtr<Edit> m_pEdtName;
+ VclPtr<Edit> m_pEdtTitle;
+ VclPtr<VclMultiLineEdit> m_pEdtDesc;
+ VclPtr<CheckBox> m_pCbxVisible;
+ VclPtr<CheckBox> m_pCbxPrintable;
+ VclPtr<CheckBox> m_pCbxLocked;
const SfxItemSet& mrOutAttrs;
@@ -48,6 +48,9 @@ public:
SdInsertLayerDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs,
bool bDeletable, const OUString& rStr );
+ virtual ~SdInsertLayerDlg();
+ virtual void dispose() SAL_OVERRIDE;
+
void GetAttr( SfxItemSet& rOutAttrs );
};
diff --git a/sd/source/ui/inc/masterlayoutdlg.hxx b/sd/source/ui/inc/masterlayoutdlg.hxx
index b6c216944d8b..f6be32bc6ab1 100644
--- a/sd/source/ui/inc/masterlayoutdlg.hxx
+++ b/sd/source/ui/inc/masterlayoutdlg.hxx
@@ -37,11 +37,11 @@ private:
SdDrawDocument* mpDoc;
SdPage* mpCurrentPage;
- CheckBox* mpCBDate;
- CheckBox* mpCBPageNumber;
- CheckBox* mpCBSlideNumber;
- CheckBox* mpCBHeader;
- CheckBox* mpCBFooter;
+ VclPtr<CheckBox> mpCBDate;
+ VclPtr<CheckBox> mpCBPageNumber;
+ VclPtr<CheckBox> mpCBSlideNumber;
+ VclPtr<CheckBox> mpCBHeader;
+ VclPtr<CheckBox> mpCBFooter;
bool mbOldHeader;
bool mbOldFooter;
@@ -54,6 +54,8 @@ private:
public:
MasterLayoutDialog( vcl::Window* pParent, SdDrawDocument* pDoc, SdPage* pCurrentPage );
+ virtual ~MasterLayoutDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
};
diff --git a/sd/source/ui/inc/morphdlg.hxx b/sd/source/ui/inc/morphdlg.hxx
index f23d69207d98..f675535a1ba1 100644
--- a/sd/source/ui/inc/morphdlg.hxx
+++ b/sd/source/ui/inc/morphdlg.hxx
@@ -38,7 +38,8 @@ public:
vcl::Window* pParent,
const SdrObject* pObj1,
const SdrObject* pObj2);
- virtual ~MorphDlg (void);
+ virtual ~MorphDlg();
+ virtual void dispose() SAL_OVERRIDE;
void SaveSettings() const;
sal_uInt16 GetFadeSteps() const { return (sal_uInt16) m_pMtfSteps->GetValue(); }
@@ -46,9 +47,9 @@ public:
bool IsOrientationFade() const { return m_pCbxOrientation->IsChecked(); }
private:
- NumericField* m_pMtfSteps;
- CheckBox* m_pCbxAttributes;
- CheckBox* m_pCbxOrientation;
+ VclPtr<NumericField> m_pMtfSteps;
+ VclPtr<CheckBox> m_pCbxAttributes;
+ VclPtr<CheckBox> m_pCbxOrientation;
void LoadSettings();
};
diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx
index 96654145ac78..9eb82d864b55 100644
--- a/sd/source/ui/inc/navigatr.hxx
+++ b/sd/source/ui/inc/navigatr.hxx
@@ -178,7 +178,7 @@ protected:
const SfxPoolItem* pState ) SAL_OVERRIDE;
private:
- SdNavigatorWin* pNavigatorWin;
+ VclPtr<SdNavigatorWin> pNavigatorWin;
const SdNavigatorWin::UpdateRequestFunctor maUpdateRequest;
};
@@ -196,7 +196,7 @@ protected:
const SfxPoolItem* pState ) SAL_OVERRIDE;
private:
- SdNavigatorWin* pNavigatorWin;
+ VclPtr<SdNavigatorWin> pNavigatorWin;
const SdNavigatorWin::UpdateRequestFunctor maUpdateRequest;
};
diff --git a/sd/source/ui/inc/present.hxx b/sd/source/ui/inc/present.hxx
index ea2fcde3e25d..0398823c783d 100644
--- a/sd/source/ui/inc/present.hxx
+++ b/sd/source/ui/inc/present.hxx
@@ -37,37 +37,37 @@ class SdStartPresentationDlg : public ModalDialog
{
private:
- RadioButton* aRbtAll;
- RadioButton* aRbtAtDia;
- RadioButton* aRbtCustomshow;
- ListBox* aLbDias;
- ListBox* aLbCustomshow;
+ VclPtr<RadioButton> aRbtAll;
+ VclPtr<RadioButton> aRbtAtDia;
+ VclPtr<RadioButton> aRbtCustomshow;
+ VclPtr<ListBox> aLbDias;
+ VclPtr<ListBox> aLbCustomshow;
- RadioButton* aRbtStandard;
- RadioButton* aRbtWindow;
- RadioButton* aRbtAuto;
- TimeField* aTmfPause;
- CheckBox* aCbxAutoLogo;
+ VclPtr<RadioButton> aRbtStandard;
+ VclPtr<RadioButton> aRbtWindow;
+ VclPtr<RadioButton> aRbtAuto;
+ VclPtr<TimeField> aTmfPause;
+ VclPtr<CheckBox> aCbxAutoLogo;
- CheckBox* aCbxManuel;
- CheckBox* aCbxMousepointer;
- CheckBox* aCbxPen;
- CheckBox* aCbxNavigator;
- CheckBox* aCbxAnimationAllowed;
- CheckBox* aCbxChangePage;
- CheckBox* aCbxAlwaysOnTop;
+ VclPtr<CheckBox> aCbxManuel;
+ VclPtr<CheckBox> aCbxMousepointer;
+ VclPtr<CheckBox> aCbxPen;
+ VclPtr<CheckBox> aCbxNavigator;
+ VclPtr<CheckBox> aCbxAnimationAllowed;
+ VclPtr<CheckBox> aCbxChangePage;
+ VclPtr<CheckBox> aCbxAlwaysOnTop;
- FixedText* maFtMonitor;
- ListBox* maLBMonitor;
+ VclPtr<FixedText> maFtMonitor;
+ VclPtr<ListBox> maLBMonitor;
SdCustomShowList* pCustomShowList;
const SfxItemSet& rOutAttrs;
sal_Int32 mnMonitors;
- FixedText* msMonitor;
- FixedText* msAllMonitors;
- FixedText* msMonitorExternal;
- FixedText* msExternal;
+ VclPtr<FixedText> msMonitor;
+ VclPtr<FixedText> msAllMonitors;
+ VclPtr<FixedText> msMonitorExternal;
+ VclPtr<FixedText> msExternal;
DECL_LINK( ChangeRangeHdl, void * );
DECL_LINK( ClickWindowPresentationHdl, void * );
@@ -88,6 +88,8 @@ public:
const SfxItemSet& rInAttrs,
const std::vector<OUString> &rPageNames,
SdCustomShowList* pCSList );
+ virtual ~SdStartPresentationDlg();
+ virtual void dispose() SAL_OVERRIDE;
void GetAttr( SfxItemSet& rOutAttrs );
};
diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx
index 9ae6631f435e..c64b4d76cb6b 100644
--- a/sd/source/ui/inc/prntopts.hxx
+++ b/sd/source/ui/inc/prntopts.hxx
@@ -32,25 +32,25 @@ class SdPrintOptions : public SfxTabPage
friend class SdModule;
private:
- VclFrame *m_pFrmContent;
- CheckBox *m_pCbxDraw;
- CheckBox *m_pCbxNotes;
- CheckBox *m_pCbxHandout;
- CheckBox *m_pCbxOutline;
- RadioButton *m_pRbtColor;
- RadioButton *m_pRbtGrayscale;
- RadioButton *m_pRbtBlackWhite;
- CheckBox *m_pCbxPagename;
- CheckBox *m_pCbxDate;
- CheckBox *m_pCbxTime;
- CheckBox *m_pCbxHiddenPages;
- RadioButton *m_pRbtDefault;
- RadioButton *m_pRbtPagesize;
- RadioButton *m_pRbtPagetile;
- RadioButton *m_pRbtBooklet;
- CheckBox *m_pCbxFront;
- CheckBox *m_pCbxBack;
- CheckBox *m_pCbxPaperbin;
+ VclPtr<VclFrame> m_pFrmContent;
+ VclPtr<CheckBox> m_pCbxDraw;
+ VclPtr<CheckBox> m_pCbxNotes;
+ VclPtr<CheckBox> m_pCbxHandout;
+ VclPtr<CheckBox> m_pCbxOutline;
+ VclPtr<RadioButton> m_pRbtColor;
+ VclPtr<RadioButton> m_pRbtGrayscale;
+ VclPtr<RadioButton> m_pRbtBlackWhite;
+ VclPtr<CheckBox> m_pCbxPagename;
+ VclPtr<CheckBox> m_pCbxDate;
+ VclPtr<CheckBox> m_pCbxTime;
+ VclPtr<CheckBox> m_pCbxHiddenPages;
+ VclPtr<RadioButton> m_pRbtDefault;
+ VclPtr<RadioButton> m_pRbtPagesize;
+ VclPtr<RadioButton> m_pRbtPagetile;
+ VclPtr<RadioButton> m_pRbtBooklet;
+ VclPtr<CheckBox> m_pCbxFront;
+ VclPtr<CheckBox> m_pCbxBack;
+ VclPtr<CheckBox> m_pCbxPaperbin;
const SfxItemSet& rOutAttrs;
@@ -63,6 +63,7 @@ private:
public:
SdPrintOptions( vcl::Window* pParent, const SfxItemSet& rInAttrs);
virtual ~SdPrintOptions();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
diff --git a/sd/source/ui/inc/pubdlg.hxx b/sd/source/ui/inc/pubdlg.hxx
index bbb4f264d8ee..f9670c7b038f 100644
--- a/sd/source/ui/inc/pubdlg.hxx
+++ b/sd/source/ui/inc/pubdlg.hxx
@@ -53,104 +53,104 @@ class SdPublishingDlg : public ModalDialog
{
private:
// page 1 controls
- VclContainer* pPage1;
- FixedText* pPage1_Titel;
- RadioButton* pPage1_NewDesign;
- RadioButton* pPage1_OldDesign;
- ListBox* pPage1_Designs;
- PushButton* pPage1_DelDesign;
- FixedText* pPage1_Desc;
+ VclPtr<VclContainer> pPage1;
+ VclPtr<FixedText> pPage1_Titel;
+ VclPtr<RadioButton> pPage1_NewDesign;
+ VclPtr<RadioButton> pPage1_OldDesign;
+ VclPtr<ListBox> pPage1_Designs;
+ VclPtr<PushButton> pPage1_DelDesign;
+ VclPtr<FixedText> pPage1_Desc;
// page 2 controls
- VclContainer* pPage2;
- VclContainer* pPage2Frame2;
- VclContainer* pPage2Frame3;
- VclContainer* pPage2Frame4;
- FixedText* pPage2_Titel;
- RadioButton* pPage2_Standard;
- RadioButton* pPage2_Frames;
- RadioButton* pPage2_SingleDocument;
- RadioButton* pPage2_Kiosk;
- RadioButton* pPage2_WebCast;
- FixedImage* pPage2_Standard_FB;
- FixedImage* pPage2_Frames_FB;
- FixedImage* pPage2_Kiosk_FB;
- FixedImage* pPage2_WebCast_FB;
-
- FixedText* pPage2_Titel_Html;
- CheckBox* pPage2_Content;
- CheckBox* pPage2_Notes;
-
- FixedText* pPage2_Titel_WebCast;
- RadioButton* pPage2_ASP;
- RadioButton* pPage2_PERL;
- FixedText* pPage2_URL_txt;
- Edit* pPage2_URL;
- FixedText* pPage2_CGI_txt;
- Edit* pPage2_CGI;
- FixedText* pPage2_Index_txt;
- Edit* pPage2_Index;
- FixedText* pPage2_Titel_Kiosk;
- RadioButton* pPage2_ChgDefault;
- RadioButton* pPage2_ChgAuto;
- FixedText* pPage2_Duration_txt;
- TimeField* pPage2_Duration;
- CheckBox* pPage2_Endless;
+ VclPtr<VclContainer> pPage2;
+ VclPtr<VclContainer> pPage2Frame2;
+ VclPtr<VclContainer> pPage2Frame3;
+ VclPtr<VclContainer> pPage2Frame4;
+ VclPtr<FixedText> pPage2_Titel;
+ VclPtr<RadioButton> pPage2_Standard;
+ VclPtr<RadioButton> pPage2_Frames;
+ VclPtr<RadioButton> pPage2_SingleDocument;
+ VclPtr<RadioButton> pPage2_Kiosk;
+ VclPtr<RadioButton> pPage2_WebCast;
+ VclPtr<FixedImage> pPage2_Standard_FB;
+ VclPtr<FixedImage> pPage2_Frames_FB;
+ VclPtr<FixedImage> pPage2_Kiosk_FB;
+ VclPtr<FixedImage> pPage2_WebCast_FB;
+
+ VclPtr<FixedText> pPage2_Titel_Html;
+ VclPtr<CheckBox> pPage2_Content;
+ VclPtr<CheckBox> pPage2_Notes;
+
+ VclPtr<FixedText> pPage2_Titel_WebCast;
+ VclPtr<RadioButton> pPage2_ASP;
+ VclPtr<RadioButton> pPage2_PERL;
+ VclPtr<FixedText> pPage2_URL_txt;
+ VclPtr<Edit> pPage2_URL;
+ VclPtr<FixedText> pPage2_CGI_txt;
+ VclPtr<Edit> pPage2_CGI;
+ VclPtr<FixedText> pPage2_Index_txt;
+ VclPtr<Edit> pPage2_Index;
+ VclPtr<FixedText> pPage2_Titel_Kiosk;
+ VclPtr<RadioButton> pPage2_ChgDefault;
+ VclPtr<RadioButton> pPage2_ChgAuto;
+ VclPtr<FixedText> pPage2_Duration_txt;
+ VclPtr<TimeField> pPage2_Duration;
+ VclPtr<CheckBox> pPage2_Endless;
// page 3 controls
- VclContainer* pPage3;
- FixedText* pPage3_Titel1;
- RadioButton* pPage3_Png;
- RadioButton* pPage3_Gif;
- RadioButton* pPage3_Jpg;
- FixedText* pPage3_Quality_txt;
- ComboBox* pPage3_Quality;
- FixedText* pPage3_Titel2;
- RadioButton* pPage3_Resolution_1;
- RadioButton* pPage3_Resolution_2;
- RadioButton* pPage3_Resolution_3;
- FixedText* pPage3_Titel3;
- CheckBox* pPage3_SldSound;
- CheckBox* pPage3_HiddenSlides;
+ VclPtr<VclContainer> pPage3;
+ VclPtr<FixedText> pPage3_Titel1;
+ VclPtr<RadioButton> pPage3_Png;
+ VclPtr<RadioButton> pPage3_Gif;
+ VclPtr<RadioButton> pPage3_Jpg;
+ VclPtr<FixedText> pPage3_Quality_txt;
+ VclPtr<ComboBox> pPage3_Quality;
+ VclPtr<FixedText> pPage3_Titel2;
+ VclPtr<RadioButton> pPage3_Resolution_1;
+ VclPtr<RadioButton> pPage3_Resolution_2;
+ VclPtr<RadioButton> pPage3_Resolution_3;
+ VclPtr<FixedText> pPage3_Titel3;
+ VclPtr<CheckBox> pPage3_SldSound;
+ VclPtr<CheckBox> pPage3_HiddenSlides;
// page 4 controls
- VclContainer* pPage4;
- FixedText* pPage4_Titel1;
- FixedText* pPage4_Author_txt;
- Edit* pPage4_Author;
- FixedText* pPage4_Email_txt;
- Edit* pPage4_Email;
- FixedText* pPage4_WWW_txt;
- Edit* pPage4_WWW;
- FixedText* pPage4_Titel2;
- VclMultiLineEdit* pPage4_Misc;
- CheckBox* pPage4_Download;
+ VclPtr<VclContainer> pPage4;
+ VclPtr<FixedText> pPage4_Titel1;
+ VclPtr<FixedText> pPage4_Author_txt;
+ VclPtr<Edit> pPage4_Author;
+ VclPtr<FixedText> pPage4_Email_txt;
+ VclPtr<Edit> pPage4_Email;
+ VclPtr<FixedText> pPage4_WWW_txt;
+ VclPtr<Edit> pPage4_WWW;
+ VclPtr<FixedText> pPage4_Titel2;
+ VclPtr<VclMultiLineEdit> pPage4_Misc;
+ VclPtr<CheckBox> pPage4_Download;
// page 5 controls
- VclContainer* pPage5;
- FixedText* pPage5_Titel;
- CheckBox* pPage5_TextOnly;
- ValueSet* pPage5_Buttons;
+ VclPtr<VclContainer> pPage5;
+ VclPtr<FixedText> pPage5_Titel;
+ VclPtr<CheckBox> pPage5_TextOnly;
+ VclPtr<ValueSet> pPage5_Buttons;
// page 6 controls
- VclContainer* pPage6;
- FixedText* pPage6_Titel;
- RadioButton* pPage6_Default;
- RadioButton* pPage6_User;
- PushButton* pPage6_Back;
- PushButton* pPage6_Text;
- PushButton* pPage6_Link;
- PushButton* pPage6_VLink;
- PushButton* pPage6_ALink;
- RadioButton* pPage6_DocColors;
- SdHtmlAttrPreview* pPage6_Preview;
+ VclPtr<VclContainer> pPage6;
+ VclPtr<FixedText> pPage6_Titel;
+ VclPtr<RadioButton> pPage6_Default;
+ VclPtr<RadioButton> pPage6_User;
+ VclPtr<PushButton> pPage6_Back;
+ VclPtr<PushButton> pPage6_Text;
+ VclPtr<PushButton> pPage6_Link;
+ VclPtr<PushButton> pPage6_VLink;
+ VclPtr<PushButton> pPage6_ALink;
+ VclPtr<RadioButton> pPage6_DocColors;
+ VclPtr<SdHtmlAttrPreview> pPage6_Preview;
boost::scoped_ptr< ButtonSet > mpButtonSet;
// standard controls
- PushButton* pLastPageButton;
- PushButton* pNextPageButton;
- PushButton* pFinishButton;
+ VclPtr<PushButton> pLastPageButton;
+ VclPtr<PushButton> pNextPageButton;
+ VclPtr<PushButton> pFinishButton;
Assistent aAssistentFunc;
@@ -197,6 +197,7 @@ public:
SdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType);
virtual ~SdPublishingDlg();
+ virtual void dispose() SAL_OVERRIDE;
void GetParameterSequence( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rParams );
};
diff --git a/sd/source/ui/inc/sdpreslt.hxx b/sd/source/ui/inc/sdpreslt.hxx
index ea68e8de3214..7afb5a8b5ac7 100644
--- a/sd/source/ui/inc/sdpreslt.hxx
+++ b/sd/source/ui/inc/sdpreslt.hxx
@@ -42,7 +42,8 @@ public:
vcl::Window* pWindow,
const SfxItemSet& rInAttrs);
- virtual ~SdPresLayoutDlg (void);
+ virtual ~SdPresLayoutDlg();
+ virtual void dispose() SAL_OVERRIDE;
void GetAttr(SfxItemSet& rOutAttrs);
@@ -51,10 +52,10 @@ public:
private:
::sd::DrawDocShell* mpDocSh;
- ValueSet* m_pVS;
- CheckBox* m_pCbxMasterPage;
- CheckBox* m_pCbxCheckMasters;
- PushButton* m_pBtnLoad;
+ VclPtr<ValueSet> m_pVS;
+ VclPtr<CheckBox> m_pCbxMasterPage;
+ VclPtr<CheckBox> m_pCbxCheckMasters;
+ VclPtr<PushButton> m_pBtnLoad;
const SfxItemSet& mrOutAttrs;
diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx
index 6e683855cfc4..86731a6ce474 100644
--- a/sd/source/ui/inc/sdtreelb.hxx
+++ b/sd/source/ui/inc/sdtreelb.hxx
@@ -121,7 +121,7 @@ public:
protected:
- vcl::Window* mpParent;
+ VclPtr<vcl::Window> mpParent;
const SdDrawDocument* mpDoc;
SdDrawDocument* mpBookmarkDoc;
SfxMedium* mpMedium;
@@ -131,7 +131,7 @@ protected:
bool mbLinkableSelected;
OUString maDocName;
::sd::DrawDocShellRef mxBookmarkDocShRef; ///< for the loading of bookmarks
- SdNavigatorWin* mpDropNavWin;
+ VclPtr<SdNavigatorWin> mpDropNavWin;
SfxViewFrame* mpFrame;
std::vector<OUString> maTreeItem;
bool mbSaveTreeItemState;
diff --git a/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx b/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
index e6ae9d24572b..5cb6f07cb872 100644
--- a/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
+++ b/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
@@ -86,7 +86,7 @@ private:
static void AddInstance (const SdDrawDocument* pDocument, SlideSorterCacheDisplay* pControl);
static void RemoveInstance (SlideSorterCacheDisplay* pControl);
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
sal_Int32 mnPageCount;
sal_Int32 mnColumnCount;
sal_Int32 mnRowCount;
diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx
index bd1ac112877b..576f64733181 100644
--- a/sd/source/ui/inc/tpaction.hxx
+++ b/sd/source/ui/inc/tpaction.hxx
@@ -53,21 +53,21 @@ public:
class SdTPAction : public SfxTabPage
{
private:
- ListBox* m_pLbAction;
-
- FixedText* m_pFtTree; // jump destination controls
- SdPageObjsTLB* m_pLbTree;
- SdPageObjsTLB* m_pLbTreeDocument;
- ListBox* m_pLbOLEAction;
-
- VclFrame* m_pFrame;
- Edit* m_pEdtSound;
- Edit* m_pEdtBookmark;
- Edit* m_pEdtDocument;
- Edit* m_pEdtProgram;
- Edit* m_pEdtMacro;
- PushButton* m_pBtnSearch;
- PushButton* m_pBtnSeek;
+ VclPtr<ListBox> m_pLbAction;
+
+ VclPtr<FixedText> m_pFtTree; // jump destination controls
+ VclPtr<SdPageObjsTLB> m_pLbTree;
+ VclPtr<SdPageObjsTLB> m_pLbTreeDocument;
+ VclPtr<ListBox> m_pLbOLEAction;
+
+ VclPtr<VclFrame> m_pFrame;
+ VclPtr<Edit> m_pEdtSound;
+ VclPtr<Edit> m_pEdtBookmark;
+ VclPtr<Edit> m_pEdtDocument;
+ VclPtr<Edit> m_pEdtProgram;
+ VclPtr<Edit> m_pEdtMacro;
+ VclPtr<PushButton> m_pBtnSearch;
+ VclPtr<PushButton> m_pBtnSeek;
const SfxItemSet& rOutAttrs;
const ::sd::View* mpView;
@@ -97,6 +97,7 @@ private:
public:
SdTPAction( vcl::Window* pParent, const SfxItemSet& rInAttrs );
virtual ~SdTPAction();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet& );
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index 353b06eee46f..55f671d408c6 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -50,14 +50,15 @@ public:
class SdTpOptionsContents : public SfxTabPage
{
private:
- CheckBox* m_pCbxRuler;
- CheckBox* m_pCbxDragStripes;
- CheckBox* m_pCbxHandlesBezier;
- CheckBox* m_pCbxMoveOutline;
+ VclPtr<CheckBox> m_pCbxRuler;
+ VclPtr<CheckBox> m_pCbxDragStripes;
+ VclPtr<CheckBox> m_pCbxHandlesBezier;
+ VclPtr<CheckBox> m_pCbxMoveOutline;
public:
SdTpOptionsContents( vcl::Window* pParent, const SfxItemSet& rInAttrs );
virtual ~SdTpOptionsContents();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
@@ -73,38 +74,38 @@ class SdTpOptionsMisc : public SfxTabPage
friend class SdModule;
private:
- CheckBox *m_pCbxQuickEdit;
- CheckBox *m_pCbxPickThrough;
+ VclPtr<CheckBox> m_pCbxQuickEdit;
+ VclPtr<CheckBox> m_pCbxPickThrough;
- VclFrame *m_pNewDocumentFrame;
- CheckBox *m_pCbxStartWithTemplate;
+ VclPtr<VclFrame> m_pNewDocumentFrame;
+ VclPtr<CheckBox> m_pCbxStartWithTemplate;
- CheckBox *m_pCbxMasterPageCache;
- CheckBox *m_pCbxCopy;
- CheckBox *m_pCbxMarkedHitMovesAlways;
- VclFrame *m_pPresentationFrame;
+ VclPtr<CheckBox> m_pCbxMasterPageCache;
+ VclPtr<CheckBox> m_pCbxCopy;
+ VclPtr<CheckBox> m_pCbxMarkedHitMovesAlways;
+ VclPtr<VclFrame> m_pPresentationFrame;
- ListBox *m_pLbMetric;
- MetricField *m_pMtrFldTabstop;
+ VclPtr<ListBox> m_pLbMetric;
+ VclPtr<MetricField> m_pMtrFldTabstop;
- CheckBox *m_pCbxEnableSdremote;
- CheckBox *m_pCbxEnablePresenterScreen;
- CheckBox *m_pCbxUsePrinterMetrics;
- CheckBox *m_pCbxCompatibility;
+ VclPtr<CheckBox> m_pCbxEnableSdremote;
+ VclPtr<CheckBox> m_pCbxEnablePresenterScreen;
+ VclPtr<CheckBox> m_pCbxUsePrinterMetrics;
+ VclPtr<CheckBox> m_pCbxCompatibility;
//Scale
- VclFrame *m_pScaleFrame;
- ComboBox *m_pCbScale;
- FixedText *m_pNewDocLb;
- FixedText *m_pFiInfo1;
- MetricField *m_pMtrFldOriginalWidth;
- FixedText *m_pWidthLb;
- FixedText *m_pHeightLb;
- FixedText *m_pFiInfo2;
- MetricField *m_pMtrFldOriginalHeight;
- CheckBox *m_pCbxDistrot;
- MetricField *m_pMtrFldInfo1;
- MetricField *m_pMtrFldInfo2;
+ VclPtr<VclFrame> m_pScaleFrame;
+ VclPtr<ComboBox> m_pCbScale;
+ VclPtr<FixedText> m_pNewDocLb;
+ VclPtr<FixedText> m_pFiInfo1;
+ VclPtr<MetricField> m_pMtrFldOriginalWidth;
+ VclPtr<FixedText> m_pWidthLb;
+ VclPtr<FixedText> m_pHeightLb;
+ VclPtr<FixedText> m_pFiInfo2;
+ VclPtr<MetricField> m_pMtrFldOriginalHeight;
+ VclPtr<CheckBox> m_pCbxDistrot;
+ VclPtr<MetricField> m_pMtrFldInfo1;
+ VclPtr<MetricField> m_pMtrFldInfo2;
sal_uInt32 nWidth;
sal_uInt32 nHeight;
@@ -131,6 +132,7 @@ protected:
public:
SdTpOptionsMisc( vcl::Window* pParent, const SfxItemSet& rInAttrs );
virtual ~SdTpOptionsMisc();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window*, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
diff --git a/sd/source/ui/inc/vectdlg.hxx b/sd/source/ui/inc/vectdlg.hxx
index 153343dae933..fefa8efe82ef 100644
--- a/sd/source/ui/inc/vectdlg.hxx
+++ b/sd/source/ui/inc/vectdlg.hxx
@@ -42,20 +42,20 @@ class DrawDocShell;
class SdVectorizeDlg : public ModalDialog
{
::sd::DrawDocShell * mpDocSh;
- NumericField* m_pNmLayers;
- MetricField* m_pMtReduce;
- FixedText* m_pFtFillHoles;
- MetricField* m_pMtFillHoles;
- CheckBox* m_pCbFillHoles;
+ VclPtr<NumericField> m_pNmLayers;
+ VclPtr<MetricField> m_pMtReduce;
+ VclPtr<FixedText> m_pFtFillHoles;
+ VclPtr<MetricField> m_pMtFillHoles;
+ VclPtr<CheckBox> m_pCbFillHoles;
- GraphCtrl* m_pBmpWin;
+ VclPtr<GraphCtrl> m_pBmpWin;
- GraphCtrl* m_pMtfWin;
+ VclPtr<GraphCtrl> m_pMtfWin;
- ProgressBar* m_pPrgs;
+ VclPtr<ProgressBar> m_pPrgs;
- OKButton* m_pBtnOK;
- PushButton* m_pBtnPreview;
+ VclPtr<OKButton> m_pBtnOK;
+ VclPtr<PushButton> m_pBtnPreview;
Bitmap aBmp;
Bitmap aPreviewBmp;
@@ -82,6 +82,7 @@ public:
SdVectorizeDlg( vcl::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell );
virtual ~SdVectorizeDlg();
+ virtual void dispose() SAL_OVERRIDE;
const GDIMetaFile& GetGDIMetaFile() const { return aMtf; }
};
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 32f8db4ed6b0..7e8144380528 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -927,7 +927,7 @@ bool SlideShow::startPreview( const Reference< XDrawPage >& xDrawPage, const Ref
OutputDevice* SlideShow::getShowWindow()
{
- return mxController.is() ? mxController->mpShowWindow : 0;
+ return mxController.is() ? mxController->mpShowWindow.get() : 0;
}
int SlideShow::getAnimationMode()
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index f64376e69571..15b2bb3eecbb 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -707,8 +707,7 @@ void SAL_CALL SlideshowImpl::disposing()
if( mpTimeButton )
{
mpTimeButton->Hide();
- delete mpTimeButton;
- mpTimeButton = 0;
+ mpTimeButton.clear();
}
if( mpShowWindow )
@@ -743,8 +742,7 @@ void SAL_CALL SlideshowImpl::disposing()
if( mpShowWindow )
{
- delete mpShowWindow;
- mpShowWindow = 0;
+ mpShowWindow.clear();
}
setActiveXToolbarsVisible( true );
@@ -805,7 +803,7 @@ bool SlideshowImpl::startPreview(
mpSlideController->insertSlideNumber( nSlideNumber-1 );
mpSlideController->setPreviewNode( xAnimationNode );
- mpShowWindow = new ShowWindow( this, ((pParent == 0) && mpViewShell) ? mpParentWindow : pParent );
+ mpShowWindow = new ShowWindow( this, ((pParent == 0) && mpViewShell) ? mpParentWindow.get() : pParent );
if( mpViewShell )
{
mpViewShell->SetActiveWindow( mpShowWindow );
@@ -857,7 +855,7 @@ bool SlideshowImpl::startPreview(
bRet = startShowImpl( aProperties );
- if( mpShowWindow != 0 && meAnimationMode == ANIMATIONMODE_PREVIEW )
+ if( mpShowWindow != nullptr && meAnimationMode == ANIMATIONMODE_PREVIEW )
mpShowWindow->SetPreviewMode();
}
@@ -882,8 +880,8 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
DBG_ASSERT( !mxShow.is(), "sd::SlideshowImpl::startShow(), called twice!" );
if( mxShow.is() )
return true;
- DBG_ASSERT( mpParentWindow!=NULL, "sd::SlideshowImpl::startShow() called without parent window" );
- if (mpParentWindow == NULL)
+ DBG_ASSERT( mpParentWindow!=nullptr, "sd::SlideshowImpl::startShow() called without parent window" );
+ if (mpParentWindow == nullptr)
return false;
// Autoplay (pps/ppsx)
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx
index b39c4ede6c9a..2d96b97ec269 100644
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -92,7 +92,7 @@ struct PresentationSettingsEx : public PresentationSettings
{
bool mbRehearseTimings;
bool mbPreview;
- vcl::Window* mpParentWindow;
+ VclPtr<vcl::Window> mpParentWindow;
css::uno::Reference< css::drawing::XDrawPage > mxStartPage;
css::uno::Reference< css::animations::XAnimationNode > mxAnimationNode;
@@ -332,9 +332,9 @@ private:
SdDrawDocument* mpDoc;
SfxItemSet* mpNewAttr;
- vcl::Window* mpParentWindow;
- ShowWindow* mpShowWindow;
- PushButton* mpTimeButton;
+ VclPtr<vcl::Window> mpParentWindow;
+ VclPtr<ShowWindow> mpShowWindow;
+ VclPtr<PushButton> mpTimeButton;
boost::shared_ptr< AnimationSlideController > mpSlideController;
@@ -347,8 +347,8 @@ private:
OUString maCharBuffer;
Pointer maOldPointer;
Pointer maPencil;
- std::vector< ::sd::Window* > maDrawModeWindows;
- ::sd::Window* mpOldActiveWindow;
+ std::vector< VclPtr<::sd::Window> > maDrawModeWindows;
+ VclPtr<::sd::Window> mpOldActiveWindow;
Link maStarBASICGlobalErrorHdl;
unsigned long mnChildMask;
bool mbGridVisible;
diff --git a/sd/source/ui/table/TableDesignPane.hxx b/sd/source/ui/table/TableDesignPane.hxx
index 0fb256cc103c..ecf324078546 100644
--- a/sd/source/ui/table/TableDesignPane.hxx
+++ b/sd/source/ui/table/TableDesignPane.hxx
@@ -92,8 +92,8 @@ private:
private:
ViewShellBase& mrBase;
- TableValueSet* m_pValueSet;
- CheckBox* m_aCheckBoxes[CB_COUNT];
+ VclPtr<TableValueSet> m_pValueSet;
+ VclPtr<CheckBox> m_aCheckBoxes[CB_COUNT];
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxSelectedTable;
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawView > mxView;
diff --git a/sd/source/ui/view/FormShellManager.cxx b/sd/source/ui/view/FormShellManager.cxx
index 5a72e6691027..67df29c52f44 100644
--- a/sd/source/ui/view/FormShellManager.cxx
+++ b/sd/source/ui/view/FormShellManager.cxx
@@ -138,7 +138,7 @@ void FormShellManager::RegisterAtCenterPane (void)
return;
mpMainViewShellWindow = pShell->GetActiveWindow();
- if (mpMainViewShellWindow == NULL)
+ if (mpMainViewShellWindow == nullptr)
return;
// Register at the window to get informed when to move the form
@@ -158,7 +158,7 @@ void FormShellManager::RegisterAtCenterPane (void)
void FormShellManager::UnregisterAtCenterPane (void)
{
- if (mpMainViewShellWindow != NULL)
+ if (mpMainViewShellWindow != nullptr)
{
// Unregister from the window.
mpMainViewShellWindow->RemoveEventListener(
diff --git a/sd/source/ui/view/sdruler.cxx b/sd/source/ui/view/sdruler.cxx
index e4592649694c..f4c1d2282a19 100644
--- a/sd/source/ui/view/sdruler.cxx
+++ b/sd/source/ui/view/sdruler.cxx
@@ -101,6 +101,7 @@ void Ruler::dispose()
rBindings.EnterRegistrations();
delete pCtrlItem;
rBindings.LeaveRegistrations();
+ pSdWin.clear();
SvxRuler::dispose();
}
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 0cb06ef6b2b3..e0f3cdf5d854 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star;
struct SdNavigatorDropEvent : public ExecuteDropEvent
{
DropTargetHelper& mrTargetHelper;
- ::sd::Window* mpTargetWindow;
+ VclPtr<::sd::Window> mpTargetWindow;
sal_uInt16 mnPage;
sal_uInt16 mnLayer;
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index a8e0fa33a188..5b6523ed3324 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -105,6 +105,7 @@ void Window::dispose()
if (pWindowUpdater != NULL)
pWindowUpdater->UnregisterWindow (this);
}
+ mpShareWin.clear();
vcl::Window::dispose();
}
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index f6d25df97e1e..2f37f852d1a9 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -648,7 +648,7 @@ void ViewShell::SetActiveWindow (::sd::Window* pWin)
}
}
- if (mpActiveWindow != pWin)
+ if (mpActiveWindow.get() != pWin)
mpActiveWindow = pWin;
// The rest of this function is not guarded anymore against calling this
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 4016503e16d4..4076a096f9f4 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -891,7 +891,7 @@ void ViewShell::Resize (void)
{
SetupRulers ();
- if (mpParentWindow == NULL)
+ if (mpParentWindow == nullptr)
return;
// Make sure that the new size is not degenerate.
diff --git a/sfx2/inc/srchdlg.hxx b/sfx2/inc/srchdlg.hxx
index b5abe7b576a8..2b71b76f7d99 100644
--- a/sfx2/inc/srchdlg.hxx
+++ b/sfx2/inc/srchdlg.hxx
@@ -36,12 +36,12 @@ namespace sfx2 {
class SearchDialog : public ModelessDialog
{
private:
- ComboBox* m_pSearchEdit;
- CheckBox* m_pWholeWordsBox;
- CheckBox* m_pMatchCaseBox;
- CheckBox* m_pWrapAroundBox;
- CheckBox* m_pBackwardsBox;
- PushButton* m_pFindBtn;
+ VclPtr<ComboBox> m_pSearchEdit;
+ VclPtr<CheckBox> m_pWholeWordsBox;
+ VclPtr<CheckBox> m_pMatchCaseBox;
+ VclPtr<CheckBox> m_pWrapAroundBox;
+ VclPtr<CheckBox> m_pBackwardsBox;
+ VclPtr<PushButton> m_pFindBtn;
Link m_aFindHdl;
Link m_aCloseHdl;
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 2a904ca2421c..1ec9b03fcd02 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -199,7 +199,6 @@ void SfxChildWindow::Destroy()
SfxChildWindow::~SfxChildWindow()
{
delete pContext;
- delete pWindow;
delete pImp;
}
@@ -336,16 +335,16 @@ SfxChildWinInfo SfxChildWindow::GetInfo() const
sal_uIntPtr nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
if ( pWindow->GetStyle() & WB_SIZEABLE )
nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
- aInfo.aWinState = static_cast<SystemWindow*>(pWindow)->GetWindowState( nMask );
+ aInfo.aWinState = static_cast<SystemWindow*>(pWindow.get())->GetWindowState( nMask );
}
else if ( pWindow->GetType() == RSC_DOCKINGWINDOW )
{
- if (static_cast<DockingWindow*>(pWindow)->GetFloatingWindow() )
- aInfo.aWinState = static_cast<DockingWindow*>(pWindow)->GetFloatingWindow()->GetWindowState();
+ if (static_cast<DockingWindow*>(pWindow.get())->GetFloatingWindow() )
+ aInfo.aWinState = static_cast<DockingWindow*>(pWindow.get())->GetFloatingWindow()->GetWindowState();
else
{
SfxChildWinInfo aTmpInfo;
- static_cast<SfxDockingWindow*>(pWindow)->FillInfo( aTmpInfo );
+ static_cast<SfxDockingWindow*>(pWindow.get())->FillInfo( aTmpInfo );
aInfo.aExtraString = aTmpInfo.aExtraString;
}
}
@@ -518,7 +517,6 @@ SfxChildWindowContext::SfxChildWindowContext( sal_uInt16 nId )
SfxChildWindowContext::~SfxChildWindowContext()
{
- delete pWindow;
}
FloatingWindow* SfxChildWindowContext::GetFloatingWindow() const
@@ -654,10 +652,10 @@ void SfxChildWindow::Hide()
switch ( pWindow->GetType() )
{
case RSC_DOCKINGWINDOW :
- static_cast<DockingWindow*>(pWindow)->Hide();
+ static_cast<DockingWindow*>(pWindow.get())->Hide();
break;
case RSC_TOOLBOX :
- static_cast<ToolBox*>(pWindow)->Hide();
+ static_cast<ToolBox*>(pWindow.get())->Hide();
break;
default:
pWindow->Hide();
@@ -670,10 +668,10 @@ void SfxChildWindow::Show( sal_uInt16 nFlags )
switch ( pWindow->GetType() )
{
case RSC_DOCKINGWINDOW :
- static_cast<DockingWindow*>(pWindow)->Show( true, nFlags );
+ static_cast<DockingWindow*>(pWindow.get())->Show( true, nFlags );
break;
case RSC_TOOLBOX :
- static_cast<ToolBox*>(pWindow)->Show( true, nFlags );
+ static_cast<ToolBox*>(pWindow.get())->Show( true, nFlags );
break;
default:
pWindow->Show( true, nFlags );
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index 78aa1fb4cef4..87ae93d9ef93 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -33,7 +33,7 @@ class SvFileObject : public sfx2::SvLinkSource
OUString sReferer;
Link aEndEditLink;
SfxMediumRef xMed;
- vcl::Window* pOldParent;
+ VclPtr<vcl::Window> pOldParent;
sal_uInt8 nType;
diff --git a/sfx2/source/appl/helpinterceptor.hxx b/sfx2/source/appl/helpinterceptor.hxx
index e34686e7b40d..a990518bc7a4 100644
--- a/sfx2/source/appl/helpinterceptor.hxx
+++ b/sfx2/source/appl/helpinterceptor.hxx
@@ -28,6 +28,7 @@
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/frame/XStatusListener.hpp>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
#include <vector>
struct HelpHistoryEntry_Impl
@@ -63,7 +64,7 @@ friend class SfxHelpWindow_Impl;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > m_xListener;
HelpHistoryList_Impl* m_pHistory;
- SfxHelpWindow_Impl* m_pWindow;
+ VclPtr<SfxHelpWindow_Impl> m_pWindow;
sal_uIntPtr m_nCurPos;
OUString m_aCurrentURL;
com::sun::star::uno::Any m_aViewData;
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index f66a2b0a3d6e..ecc5208f2fff 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -57,14 +57,16 @@ namespace sfx2
class SvDDELinkEditDialog : public ModalDialog
{
- Edit *m_pEdDdeApp;
- Edit *m_pEdDdeTopic;
- Edit *m_pEdDdeItem;
- OKButton *m_pOKButton;
+ VclPtr<Edit> m_pEdDdeApp;
+ VclPtr<Edit> m_pEdDdeTopic;
+ VclPtr<Edit> m_pEdDdeItem;
+ VclPtr<OKButton> m_pOKButton;
DECL_STATIC_LINK( SvDDELinkEditDialog, EditHdl_Impl, Edit* );
public:
SvDDELinkEditDialog( vcl::Window* pParent, SvBaseLink* );
+ virtual ~SvDDELinkEditDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetCmd() const;
};
@@ -90,6 +92,20 @@ SvDDELinkEditDialog::SvDDELinkEditDialog( vcl::Window* pParent, SvBaseLink* pLin
m_pOKButton->Enable( !sServer.isEmpty() && !sTopic.isEmpty() && !sItem.isEmpty() );
}
+SvDDELinkEditDialog::~SvDDELinkEditDialog()
+{
+ dispose();
+}
+
+void SvDDELinkEditDialog::dispose()
+{
+ m_pEdDdeApp.clear();
+ m_pEdDdeTopic.clear();
+ m_pEdDdeItem.clear();
+ m_pOKButton.clear();
+ ModalDialog::dispose();
+}
+
OUString SvDDELinkEditDialog::GetCmd() const
{
OUString sCmd( m_pEdDdeApp->GetText() ), sRet;
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 4f0aa7382a6b..2de98192935b 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -45,8 +45,8 @@ class ImplDdeItem;
struct BaseLink_Impl
{
Link m_aEndEditLink;
- LinkManager* m_pLinkMgr;
- vcl::Window* m_pParentWin;
+ LinkManager* m_pLinkMgr;
+ VclPtr<vcl::Window> m_pParentWin;
FileDialogHelper* m_pFileDlg;
bool m_bIsConnect;
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 78c2df24484b..333e07bc9ad0 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -432,6 +432,17 @@ HelpTabPage_Impl::HelpTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Impl
{
}
+HelpTabPage_Impl::~HelpTabPage_Impl()
+{
+ dispose();
+}
+
+void HelpTabPage_Impl::dispose()
+{
+ m_pIdxWin.clear();
+ TabPage::dispose();
+}
+
// class ContentTabPage_Impl ---------------------------------------------
ContentTabPage_Impl::ContentTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin)
: HelpTabPage_Impl(pParent, _pIdxWin, "HelpContentPage",
@@ -443,6 +454,17 @@ ContentTabPage_Impl::ContentTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindo
m_pContentBox->set_height_request(aSize.Height());
}
+ContentTabPage_Impl::~ContentTabPage_Impl()
+{
+ dispose();
+}
+
+void ContentTabPage_Impl::dispose()
+{
+ m_pContentBox.clear();
+ HelpTabPage_Impl::dispose();
+}
+
void ContentTabPage_Impl::ActivatePage()
{
if ( !m_pIdxWin->WasCursorLeftOrRight() )
@@ -557,6 +579,8 @@ IndexTabPage_Impl::~IndexTabPage_Impl()
void IndexTabPage_Impl::dispose()
{
ClearIndex();
+ m_pIndexCB.clear();
+ m_pOpenBtn.clear();
HelpTabPage_Impl::dispose();
}
@@ -984,6 +1008,13 @@ void SearchTabPage_Impl::dispose()
aUserData = comphelper::string::stripEnd(aUserData, ';');
Any aUserItem = makeAny( OUString( aUserData ) );
aViewOpt.SetUserItem( USERITEM_NAME, aUserItem );
+
+ m_pSearchED.clear();
+ m_pSearchBtn.clear();
+ m_pFullWordsCB.clear();
+ m_pScopeCB.clear();
+ m_pResultsLB.clear();
+ m_pOpenBtn.clear();
HelpTabPage_Impl::dispose();
}
@@ -1295,6 +1326,17 @@ BookmarksTabPage_Impl::BookmarksTabPage_Impl(vcl::Window* pParent, SfxHelpIndexW
}
}
+BookmarksTabPage_Impl::~BookmarksTabPage_Impl()
+{
+ dispose();
+}
+
+void BookmarksTabPage_Impl::dispose()
+{
+ m_pBookmarksBox.clear();
+ m_pBookmarksPB.clear();
+ HelpTabPage_Impl::dispose();
+}
IMPL_LINK_NOARG(BookmarksTabPage_Impl, OpenHdl)
@@ -1447,10 +1489,10 @@ void SfxHelpIndexWindow_Impl::dispose()
{
sfx2::RemoveFromTaskPaneList( this );
- DELETEZ( pCPage );
- DELETEZ( pIPage );
- DELETEZ( pSPage );
- DELETEZ( pBPage );
+ pCPage.clear();
+ pIPage.clear();
+ pSPage.clear();
+ pBPage.clear();
for ( sal_uInt16 i = 0; i < m_pActiveLB->GetEntryCount(); ++i )
delete static_cast<OUString*>(m_pActiveLB->GetEntryData(i));
@@ -1459,7 +1501,9 @@ void SfxHelpIndexWindow_Impl::dispose()
aViewOpt.SetPageID( (sal_Int32)m_pTabCtrl->GetCurPageId() );
disposeBuilder();
-
+ m_pActiveLB.clear();
+ m_pTabCtrl.clear();
+ pParentWin.clear();
vcl::Window::dispose();
}
@@ -1933,9 +1977,11 @@ void SfxHelpTextWindow_Impl::dispose()
bIsInClose = true;
SvtMiscOptions().RemoveListenerLink( LINK( this, SfxHelpTextWindow_Impl, NotifyHdl ) );
- delete pSrchDlg;
+ pSrchDlg.clear();
aToolBox.disposeAndClear();
aOnStartupCB.disposeAndClear();
+ pHelpWin.clear();
+ pTextWin.clear();
vcl::Window::dispose();
}
@@ -2308,11 +2354,9 @@ IMPL_LINK( SfxHelpTextWindow_Impl, FindHdl, sfx2::SearchDialog*, pDlg )
-IMPL_LINK( SfxHelpTextWindow_Impl, CloseHdl, sfx2::SearchDialog*, pDlg )
+IMPL_LINK( SfxHelpTextWindow_Impl, CloseHdl, sfx2::SearchDialog*, /*pDlg*/ )
{
- if ( pDlg )
- delete pSrchDlg;
- pSrchDlg = NULL;
+ pSrchDlg.clear();
return 0;
}
@@ -3036,12 +3080,10 @@ SfxHelpWindow_Impl::~SfxHelpWindow_Impl()
void SfxHelpWindow_Impl::dispose()
{
SaveConfig();
- vcl::Window* pDel = pIndexWin;
- pIndexWin = NULL;
- delete pDel;
+ pIndexWin.clear();
pTextWin->CloseFrame();
- delete pTextWin;
+ pTextWin.clear();
SplitWindow::dispose();
}
@@ -3249,7 +3291,16 @@ SfxAddHelpBookmarkDialog_Impl::SfxAddHelpBookmarkDialog_Impl(vcl::Window* pParen
SetText(get<FixedText>("alttitle")->GetText());
}
+SfxAddHelpBookmarkDialog_Impl::~SfxAddHelpBookmarkDialog_Impl()
+{
+ dispose();
+}
+void SfxAddHelpBookmarkDialog_Impl::dispose()
+{
+ m_pTitleED.clear();
+ ModalDialog::dispose();
+}
void SfxAddHelpBookmarkDialog_Impl::SetTitle( const OUString& rTitle )
{
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 38d15e84e025..45ceb3007468 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -76,11 +76,13 @@ class SfxHelpIndexWindow_Impl;
class HelpTabPage_Impl : public TabPage
{
protected:
- SfxHelpIndexWindow_Impl* m_pIdxWin;
+ VclPtr<SfxHelpIndexWindow_Impl> m_pIdxWin;
public:
HelpTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin,
const OString& rID, const OUString& rUIXMLDescription);
+ virtual ~HelpTabPage_Impl();
+ virtual void dispose() SAL_OVERRIDE;
virtual Control* GetLastFocusControl() = 0;
};
@@ -90,10 +92,12 @@ public:
class ContentTabPage_Impl : public HelpTabPage_Impl
{
private:
- ContentListBox_Impl* m_pContentBox;
+ VclPtr<ContentListBox_Impl> m_pContentBox;
public:
ContentTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin);
+ virtual ~ContentTabPage_Impl();
+ virtual void dispose() SAL_OVERRIDE;
virtual void ActivatePage() SAL_OVERRIDE;
virtual Control* GetLastFocusControl() SAL_OVERRIDE;
@@ -119,8 +123,8 @@ public:
class IndexTabPage_Impl : public HelpTabPage_Impl
{
private:
- IndexBox_Impl* m_pIndexCB;
- PushButton* m_pOpenBtn;
+ VclPtr<IndexBox_Impl> m_pIndexCB;
+ VclPtr<PushButton> m_pOpenBtn;
Idle aFactoryIdle;
Timer aKeywordTimer;
@@ -196,12 +200,12 @@ public:
class SearchTabPage_Impl : public HelpTabPage_Impl
{
private:
- SearchBox_Impl* m_pSearchED;
- PushButton* m_pSearchBtn;
- CheckBox* m_pFullWordsCB;
- CheckBox* m_pScopeCB;
- SearchResultsBox_Impl* m_pResultsLB;
- PushButton* m_pOpenBtn;
+ VclPtr<SearchBox_Impl> m_pSearchED;
+ VclPtr<PushButton> m_pSearchBtn;
+ VclPtr<CheckBox> m_pFullWordsCB;
+ VclPtr<CheckBox> m_pScopeCB;
+ VclPtr<SearchResultsBox_Impl> m_pResultsLB;
+ VclPtr<PushButton> m_pOpenBtn;
OUString aFactory;
@@ -252,13 +256,15 @@ public:
class BookmarksTabPage_Impl : public HelpTabPage_Impl
{
private:
- BookmarksBox_Impl* m_pBookmarksBox;
- PushButton* m_pBookmarksPB;
+ VclPtr<BookmarksBox_Impl> m_pBookmarksBox;
+ VclPtr<PushButton> m_pBookmarksPB;
DECL_LINK(OpenHdl, void *);
public:
BookmarksTabPage_Impl( vcl::Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin );
+ virtual ~BookmarksTabPage_Impl();
+ virtual void dispose() SAL_OVERRIDE;
virtual void ActivatePage() SAL_OVERRIDE;
virtual Control* GetLastFocusControl() SAL_OVERRIDE;
@@ -276,8 +282,8 @@ class SfxHelpWindow_Impl;
class SfxHelpIndexWindow_Impl : public vcl::Window, public VclBuilderContainer
{
private:
- ListBox* m_pActiveLB;
- TabControl* m_pTabCtrl;
+ VclPtr<ListBox> m_pActiveLB;
+ VclPtr<TabControl> m_pTabCtrl;
Idle aIdle;
@@ -286,12 +292,12 @@ private:
Link aIndexKeywordLink;
OUString sKeyword;
- SfxHelpWindow_Impl* pParentWin;
+ VclPtr<SfxHelpWindow_Impl> pParentWin;
- ContentTabPage_Impl* pCPage;
- IndexTabPage_Impl* pIPage;
- SearchTabPage_Impl* pSPage;
- BookmarksTabPage_Impl* pBPage;
+ VclPtr<ContentTabPage_Impl> pCPage;
+ VclPtr<IndexTabPage_Impl> pIPage;
+ VclPtr<SearchTabPage_Impl> pSPage;
+ VclPtr<BookmarksTabPage_Impl> pBPage;
long nMinWidth;
bool bWasCursorLeftOrRight;
@@ -419,9 +425,9 @@ private:
OUString aOnStartupText;
OUString sCurrentFactory;
- SfxHelpWindow_Impl* pHelpWin;
- vcl::Window* pTextWin;
- sfx2::SearchDialog* pSrchDlg;
+ VclPtr<SfxHelpWindow_Impl> pHelpWin;
+ VclPtr<vcl::Window> pTextWin;
+ VclPtr<sfx2::SearchDialog> pSrchDlg;
::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
xFrame;
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >
@@ -489,8 +495,8 @@ friend class SfxHelpIndexWindow_Impl;
::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
xFrame;
- SfxHelpIndexWindow_Impl* pIndexWin;
- SfxHelpTextWindow_Impl* pTextWin;
+ VclPtr<SfxHelpIndexWindow_Impl> pIndexWin;
+ VclPtr<SfxHelpTextWindow_Impl> pTextWin;
HelpInterceptor_Impl* pHelpInterceptor;
HelpListener_Impl* pHelpListener;
@@ -561,9 +567,11 @@ public:
class SfxAddHelpBookmarkDialog_Impl : public ModalDialog
{
private:
- Edit* m_pTitleED;
+ VclPtr<Edit> m_pTitleED;
public:
SfxAddHelpBookmarkDialog_Impl( vcl::Window* pParent, bool bRename = true );
+ virtual ~SfxAddHelpBookmarkDialog_Impl();
+ virtual void dispose() SAL_OVERRIDE;
void SetTitle( const OUString& rTitle );
OUString GetTitle() const { return m_pTitleED->GetText(); }
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 7f3920dcc088..1591113ab7ee 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -853,7 +853,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
case SfxChildAlignment::LOWESTTOP:
aSize.Width() = aTmp.GetWidth();
if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
- aSize = static_cast<SplitWindow *>(pCli->pWin)->CalcLayoutSizePixel( aSize );
+ aSize = static_cast<SplitWindow *>(pCli->pWin.get())->CalcLayoutSizePixel( aSize );
bAllowHiding = false;
aBorder.Top() += aSize.Height();
aPos = aTmp.TopLeft();
@@ -868,7 +868,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
case SfxChildAlignment::HIGHESTBOTTOM:
aSize.Width() = aTmp.GetWidth();
if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
- aSize = static_cast<SplitWindow *>(pCli->pWin)->CalcLayoutSizePixel( aSize );
+ aSize = static_cast<SplitWindow *>(pCli->pWin.get())->CalcLayoutSizePixel( aSize );
aBorder.Bottom() += aSize.Height();
aPos = aTmp.BottomLeft();
aPos.Y() -= (aSize.Height()-1);
@@ -883,7 +883,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
case SfxChildAlignment::TOOLBOXLEFT:
aSize.Height() = aTmp.GetHeight();
if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
- aSize = static_cast<SplitWindow *>(pCli->pWin)->CalcLayoutSizePixel( aSize );
+ aSize = static_cast<SplitWindow *>(pCli->pWin.get())->CalcLayoutSizePixel( aSize );
bAllowHiding = false;
aBorder.Left() += aSize.Width();
aPos = aTmp.TopLeft();
@@ -898,7 +898,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
case SfxChildAlignment::TOOLBOXRIGHT:
aSize.Height() = aTmp.GetHeight();
if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
- aSize = static_cast<SplitWindow *>(pCli->pWin)->CalcLayoutSizePixel( aSize );
+ aSize = static_cast<SplitWindow *>(pCli->pWin.get())->CalcLayoutSizePixel( aSize );
aBorder.Right() += aSize.Width();
aPos = aTmp.TopRight();
aPos.X() -= (aSize.Width()-1);
@@ -1071,10 +1071,10 @@ void SfxWorkWindow::ShowChildren_Impl()
switch ( pCli->pWin->GetType() )
{
case RSC_DOCKINGWINDOW :
- static_cast<DockingWindow*>(pCli->pWin)->Show( true, nFlags );
+ static_cast<DockingWindow*>(pCli->pWin.get())->Show( true, nFlags );
break;
case RSC_SPLITWINDOW :
- static_cast<SplitWindow*>(pCli->pWin)->Show( true, nFlags );
+ static_cast<SplitWindow*>(pCli->pWin.get())->Show( true, nFlags );
break;
default:
pCli->pWin->Show( true, nFlags );
@@ -1088,7 +1088,7 @@ void SfxWorkWindow::ShowChildren_Impl()
switch ( pCli->pWin->GetType() )
{
case RSC_DOCKINGWINDOW :
- static_cast<DockingWindow*>(pCli->pWin)->Hide();
+ static_cast<DockingWindow*>(pCli->pWin.get())->Hide();
break;
default:
pCli->pWin->Hide();
@@ -1111,7 +1111,7 @@ void SfxWorkWindow::HideChildren_Impl()
switch ( pChild->pWin->GetType() )
{
case RSC_DOCKINGWINDOW :
- static_cast<DockingWindow*>(pChild->pWin)->Hide();
+ static_cast<DockingWindow*>(pChild->pWin.get())->Hide();
break;
default:
pChild->pWin->Hide();
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index c62eedabb69f..8dd755cba732 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -78,7 +78,7 @@ void ThumbnailView::dispose()
if (xComponent.is())
xComponent->dispose ();
- delete mpScrBar;
+ mpScrBar.clear();
delete mpItemAttrs;
delete mpProcessor;
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx
index 4d0886e8de2f..3ba161b65c3a 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -593,7 +593,7 @@ void ThumbnailViewAcc::ThrowIfDisposed (void)
}
else
{
- DBG_ASSERT (mpParent!=NULL, "ValueSetAcc not disposed but mpParent == NULL");
+ DBG_ASSERT (mpParent!=nullptr, "ValueSetAcc not disposed but mpParent == NULL");
}
}
diff --git a/sfx2/source/control/thumbnailviewacc.hxx b/sfx2/source/control/thumbnailviewacc.hxx
index 3eae0c037e66..4efb7f96e1c8 100644
--- a/sfx2/source/control/thumbnailviewacc.hxx
+++ b/sfx2/source/control/thumbnailviewacc.hxx
@@ -33,6 +33,7 @@
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
+#include <vcl/vclptr.hxx>
#include <vector>
class ThumbnailView;
@@ -78,7 +79,7 @@ public:
// XComponent
virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { WeakComponentImplHelperBase::dispose(); }
+ { mpParent.clear(); WeakComponentImplHelperBase::dispose(); }
virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ WeakComponentImplHelperBase::addEventListener(xListener); }
virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
@@ -129,7 +130,7 @@ public:
private:
::std::vector< ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessibleEventListener > > mxEventListeners;
- ThumbnailView* mpParent;
+ VclPtr<ThumbnailView> mpParent;
bool mbIsTransientChildrenDisabled;
/// The current FOCUSED state.
bool mbIsFocused;
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index c866a8f9513c..4d265d75d311 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -117,7 +117,6 @@ ThumbnailViewItem::ThumbnailViewItem(ThumbnailView &rView, sal_uInt16 nId)
ThumbnailViewItem::~ThumbnailViewItem()
{
- delete mpTitleED;
if( mpxAcc )
{
static_cast< ThumbnailViewItemAcc* >( mpxAcc->get() )->ParentDestroyed();
@@ -178,9 +177,9 @@ void ThumbnailViewItem::setEditTitle (bool edit, bool bChangeFocus)
{
mpTitleED->SetText(maTitle);
updateTitleEditSize();
- static_cast<ResizableMultiLineEdit*>(mpTitleED)->SetInGrabFocus(true);
+ static_cast<ResizableMultiLineEdit*>(mpTitleED.get())->SetInGrabFocus(true);
mpTitleED->GrabFocus();
- static_cast<ResizableMultiLineEdit*>(mpTitleED)->SetInGrabFocus(false);
+ static_cast<ResizableMultiLineEdit*>(mpTitleED.get())->SetInGrabFocus(false);
}
else if (bChangeFocus)
{
diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index e157e6ebfd85..81032bdd11d0 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -61,6 +61,8 @@ void SfxAlienWarningDialog::dispose()
bool bChecked = m_pWarningOnBox->IsChecked();
if ( aSaveOpt.IsWarnAlienFormat() != bChecked )
aSaveOpt.SetWarnAlienFormat( bChecked );
+ m_pKeepCurrentBtn.clear();
+ m_pWarningOnBox.clear();
MessageDialog::dispose();
}
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index fcb9074ecfc2..39bee6d64b43 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -203,8 +203,7 @@ void BackingWindow::dispose()
// deregister drag&drop helper
if (mxDropTargetListener.is())
{
- for (std::vector<vcl::Window*>::iterator aI = maDndWindows.begin(),
- aEnd = maDndWindows.end(); aI != aEnd; ++aI)
+ for (auto aI = maDndWindows.begin(), aEnd = maDndWindows.end(); aI != aEnd; ++aI)
{
vcl::Window *pDndWin = *aI;
css::uno::Reference< css::datatransfer::dnd::XDropTarget > xDropTarget =
@@ -218,6 +217,27 @@ void BackingWindow::dispose()
mxDropTargetListener = css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >();
}
disposeBuilder();
+ mpOpenButton.clear();
+ mpRecentButton.clear();
+ mpTemplateButton.clear();
+ mpCreateLabel.clear();
+ mpWriterAllButton.clear();
+ mpCalcAllButton.clear();
+ mpImpressAllButton.clear();
+ mpDrawAllButton.clear();
+ mpDBAllButton.clear();
+ mpMathAllButton.clear();
+ mpHelpButton.clear();
+ mpExtensionsButton.clear();
+ mpAllButtonsBox.clear();
+ mpButtonsBox.clear();
+ mpSmallButtonsBox.clear();
+ mpThinBox1.clear();
+ mpThinBox2.clear();
+ mpHelpBox.clear();
+ mpExtensionsBox.clear();
+ mpAllRecentThumbnails.clear();
+ mpLocalView.clear();
vcl::Window::dispose();
}
@@ -469,8 +489,7 @@ void BackingWindow::setOwningFrame( const com::sun::star::uno::Reference< com::s
// establish drag&drop mode
mxDropTargetListener.set(new OpenFileDropTargetListener(mxContext, mxFrame));
- for (std::vector<vcl::Window*>::iterator aI = maDndWindows.begin(),
- aEnd = maDndWindows.end(); aI != aEnd; ++aI)
+ for (auto aI = maDndWindows.begin(), aEnd = maDndWindows.end(); aI != aEnd; ++aI)
{
vcl::Window *pDndWin = *aI;
css::uno::Reference< css::datatransfer::dnd::XDropTarget > xDropTarget =
diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx
index 023e1cb7e88b..a9a07f662e45 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -61,35 +61,35 @@ class BackingWindow
/** helper for drag&drop. */
com::sun::star::uno::Reference< com::sun::star::datatransfer::dnd::XDropTargetListener > mxDropTargetListener;
- PushButton* mpOpenButton;
- PushButton* mpRecentButton;
- MenuButton* mpTemplateButton;
-
- FixedText* mpCreateLabel;
-
- PushButton* mpWriterAllButton;
- PushButton* mpCalcAllButton;
- PushButton* mpImpressAllButton;
- PushButton* mpDrawAllButton;
- PushButton* mpDBAllButton;
- PushButton* mpMathAllButton;
-
- PushButton* mpHelpButton;
- PushButton* mpExtensionsButton;
-
- VclBox* mpAllButtonsBox;
- VclBox* mpButtonsBox;
- VclBox* mpSmallButtonsBox;
- VclBox* mpThinBox1;
- VclBox* mpThinBox2;
- VclBox* mpHelpBox;
- VclBox* mpExtensionsBox;
-
- RecentDocsView* mpAllRecentThumbnails;
- TemplateDefaultView* mpLocalView;
- bool mbLocalViewInitialized;
-
- std::vector<vcl::Window*> maDndWindows;
+ VclPtr<PushButton> mpOpenButton;
+ VclPtr<PushButton> mpRecentButton;
+ VclPtr<MenuButton> mpTemplateButton;
+
+ VclPtr<FixedText> mpCreateLabel;
+
+ VclPtr<PushButton> mpWriterAllButton;
+ VclPtr<PushButton> mpCalcAllButton;
+ VclPtr<PushButton> mpImpressAllButton;
+ VclPtr<PushButton> mpDrawAllButton;
+ VclPtr<PushButton> mpDBAllButton;
+ VclPtr<PushButton> mpMathAllButton;
+
+ VclPtr<PushButton> mpHelpButton;
+ VclPtr<PushButton> mpExtensionsButton;
+
+ VclPtr<VclBox> mpAllButtonsBox;
+ VclPtr<VclBox> mpButtonsBox;
+ VclPtr<VclBox> mpSmallButtonsBox;
+ VclPtr<VclBox> mpThinBox1;
+ VclPtr<VclBox> mpThinBox2;
+ VclPtr<VclBox> mpHelpBox;
+ VclPtr<VclBox> mpExtensionsBox;
+
+ VclPtr<RecentDocsView> mpAllRecentThumbnails;
+ VclPtr<TemplateDefaultView> mpLocalView;
+ bool mbLocalViewInitialized;
+
+ std::vector<VclPtr<vcl::Window> > maDndWindows;
Rectangle maStartCentButtons;
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index e624ad6d8b13..3e2f0b0f2e44 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -45,6 +45,12 @@ using namespace ::com::sun::star::uno;
#define USERITEM_NAME OUString("UserItem")
+SingleTabDlgImpl::SingleTabDlgImpl()
+ : m_pSfxPage(NULL)
+ , m_pLine(NULL)
+ {
+ }
+
class SfxModelessDialog_Impl : public SfxListener
{
public:
@@ -706,9 +712,10 @@ SfxSingleTabDialog::~SfxSingleTabDialog()
void SfxSingleTabDialog::dispose()
{
- delete pImpl->m_pSfxPage;
- delete pImpl->m_pLine;
delete pImpl;
+ pOKBtn.clear();
+ pCancelBtn.clear();
+ pHelpBtn.clear();
SfxModalDialog::dispose();
}
@@ -723,7 +730,7 @@ void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage,
{
SetUniqId(nSettingsId);
- delete pImpl->m_pSfxPage;
+ pImpl->m_pSfxPage.clear();
pImpl->m_pSfxPage = pTabPage;
fnGetRanges = pRangesFunc;
diff --git a/sfx2/source/dialog/checkin.cxx b/sfx2/source/dialog/checkin.cxx
index 61d963ef8a5e..b365adab07da 100644
--- a/sfx2/source/dialog/checkin.cxx
+++ b/sfx2/source/dialog/checkin.cxx
@@ -20,6 +20,19 @@ SfxCheckinDialog::SfxCheckinDialog( vcl::Window* pParent ) :
m_pOKBtn->SetClickHdl( LINK( this, SfxCheckinDialog, OKHdl ) );
}
+SfxCheckinDialog::~SfxCheckinDialog()
+{
+ dispose();
+}
+
+void SfxCheckinDialog::dispose()
+{
+ m_pCommentED.clear();
+ m_pMajorCB.clear();
+ m_pOKBtn.clear();
+ ModalDialog::dispose();
+}
+
OUString SfxCheckinDialog::GetComment( )
{
return m_pCommentED->GetText( );
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 03b9028ea4ba..75581c9f63e7 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -626,6 +626,20 @@ SfxDocumentDescPage::SfxDocumentDescPage( vcl::Window * pParent, const SfxItemSe
m_pCommentEd->set_height_request(m_pCommentEd->GetTextHeight() * 16);
}
+SfxDocumentDescPage::~SfxDocumentDescPage()
+{
+ dispose();
+}
+
+void SfxDocumentDescPage::dispose()
+{
+ m_pTitleEd.clear();
+ m_pThemaEd.clear();
+ m_pKeywordsEd.clear();
+ m_pCommentEd.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage *SfxDocumentDescPage::Create(vcl::Window *pParent, const SfxItemSet *rItemSet)
{
return new SfxDocumentDescPage(pParent, *rItemSet);
@@ -789,6 +803,33 @@ SfxDocumentPage::SfxDocumentPage(vcl::Window* pParent, const SfxItemSet& rItemSe
m_pSignatureBtn->Disable();
}
+SfxDocumentPage::~SfxDocumentPage()
+{
+ dispose();
+}
+
+void SfxDocumentPage::dispose()
+{
+ m_pBmp.clear();
+ m_pNameED.clear();
+ m_pChangePassBtn.clear();
+ m_pShowTypeFT.clear();
+ m_pReadOnlyCB.clear();
+ m_pFileValFt.clear();
+ m_pShowSizeFT.clear();
+ m_pCreateValFt.clear();
+ m_pChangeValFt.clear();
+ m_pSignedValFt.clear();
+ m_pSignatureBtn.clear();
+ m_pPrintValFt.clear();
+ m_pTimeLogValFt.clear();
+ m_pDocNoValFt.clear();
+ m_pUseUserDataCB.clear();
+ m_pDeleteBtn.clear();
+ m_pTemplFt.clear();
+ m_pTemplValFt.clear();
+ SfxTabPage::dispose();
+}
IMPL_LINK_NOARG(SfxDocumentPage, DeleteHdl)
@@ -1209,19 +1250,20 @@ void CustomPropertiesYesNoButton::dispose()
class DurationDialog_Impl : public ModalDialog
{
- CheckBox* m_pNegativeCB;
- NumericField* m_pYearNF;
- NumericField* m_pMonthNF;
- NumericField* m_pDayNF;
- NumericField* m_pHourNF;
- NumericField* m_pMinuteNF;
- NumericField* m_pSecondNF;
- NumericField* m_pMSecondNF;
+ VclPtr<CheckBox> m_pNegativeCB;
+ VclPtr<NumericField> m_pYearNF;
+ VclPtr<NumericField> m_pMonthNF;
+ VclPtr<NumericField> m_pDayNF;
+ VclPtr<NumericField> m_pHourNF;
+ VclPtr<NumericField> m_pMinuteNF;
+ VclPtr<NumericField> m_pSecondNF;
+ VclPtr<NumericField> m_pMSecondNF;
public:
DurationDialog_Impl( vcl::Window* pParent, const util::Duration& rDuration );
-
+ virtual ~DurationDialog_Impl();
+ virtual void dispose() SAL_OVERRIDE;
util::Duration GetDuration() const;
};
@@ -1249,6 +1291,24 @@ DurationDialog_Impl::DurationDialog_Impl(vcl::Window* pParent,
m_pMSecondNF->SetValue(rDuration.NanoSeconds);
}
+DurationDialog_Impl::~DurationDialog_Impl()
+{
+ dispose();
+}
+
+void DurationDialog_Impl::dispose()
+{
+ m_pNegativeCB.clear();
+ m_pYearNF.clear();
+ m_pMonthNF.clear();
+ m_pDayNF.clear();
+ m_pHourNF.clear();
+ m_pMinuteNF.clear();
+ m_pSecondNF.clear();
+ m_pMSecondNF.clear();
+ ModalDialog::dispose();
+}
+
util::Duration DurationDialog_Impl::GetDuration() const
{
util::Duration aRet;
@@ -1448,6 +1508,9 @@ void CustomPropertiesWindow::dispose()
m_aEditButton.disposeAndClear();
m_aYesNoButton.disposeAndClear();
m_aRemoveButton.disposeAndClear();
+ m_pHeaderAccName.clear();
+ m_pHeaderAccType.clear();
+ m_pHeaderAccValue.clear();
vcl::Window::dispose();
}
@@ -2080,11 +2143,11 @@ CustomPropertiesControl::~CustomPropertiesControl()
void CustomPropertiesControl::dispose()
{
- delete m_pVertScroll;
- delete m_pPropertiesWin;
- delete m_pBody;
- delete m_pHeaderBar;
- delete m_pVBox;
+ m_pVertScroll.clear();
+ m_pPropertiesWin.clear();
+ m_pBody.clear();
+ m_pHeaderBar.clear();
+ m_pVBox.clear();
vcl::Window::dispose();
}
@@ -2124,6 +2187,17 @@ SfxCustomPropertiesPage::SfxCustomPropertiesPage( vcl::Window* pParent, const Sf
get<PushButton>("add")->SetClickHdl(LINK(this, SfxCustomPropertiesPage, AddHdl));
}
+SfxCustomPropertiesPage::~SfxCustomPropertiesPage()
+{
+ dispose();
+}
+
+void SfxCustomPropertiesPage::dispose()
+{
+ m_pPropertiesCtrl.clear();
+ SfxTabPage::dispose();
+}
+
IMPL_LINK_NOARG(SfxCustomPropertiesPage, AddHdl)
{
Any aAny;
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index e17c3b26782a..3daafd2a5cff 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -62,7 +62,7 @@ static const int NUM_OF_DOCKINGWINDOWS = 10;
class SfxTitleDockingWindow : public SfxDockingWindow
{
- vcl::Window* m_pWrappedWindow;
+ VclPtr<vcl::Window> m_pWrappedWindow;
public:
SfxTitleDockingWindow(
@@ -208,7 +208,7 @@ SfxDockingWrapper::SfxDockingWrapper( vcl::Window* pParentWnd ,
pWindow->SetOutputSizePixel( Size( 270, 240 ) );
- static_cast<SfxDockingWindow*>( pWindow )->Initialize( pInfo );
+ static_cast<SfxDockingWindow*>( pWindow.get() )->Initialize( pInfo );
SetHideNotDelete( true );
}
@@ -258,9 +258,7 @@ SfxTitleDockingWindow::~SfxTitleDockingWindow()
void SfxTitleDockingWindow::dispose()
{
- delete m_pWrappedWindow;
- m_pWrappedWindow = NULL;
-
+ m_pWrappedWindow.clear();
SfxDockingWindow::dispose();
}
@@ -411,7 +409,7 @@ friend class SfxDockingWindow;
SfxChildAlignment eDockAlignment;
bool bConstructed;
Size aMinSize;
- SfxSplitWindow* pSplitWin;
+ VclPtr<SfxSplitWindow> pSplitWin;
bool bSplitable;
Idle aMoveIdle;
diff --git a/sfx2/source/dialog/documentfontsdialog.cxx b/sfx2/source/dialog/documentfontsdialog.cxx
index c942fd25c059..6f0fab8bade5 100644
--- a/sfx2/source/dialog/documentfontsdialog.cxx
+++ b/sfx2/source/dialog/documentfontsdialog.cxx
@@ -34,6 +34,17 @@ SfxDocumentFontsPage::SfxDocumentFontsPage( vcl::Window* parent, const SfxItemSe
get( embedFontsCheckbox, "embedFonts" );
}
+SfxDocumentFontsPage::~SfxDocumentFontsPage()
+{
+ dispose();
+}
+
+void SfxDocumentFontsPage::dispose()
+{
+ embedFontsCheckbox.clear();
+ SfxTabPage::dispose();
+}
+
void SfxDocumentFontsPage::Reset( const SfxItemSet* )
{
bool bVal = false;
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index b947ca9adecd..cac4cb268b56 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -54,7 +54,7 @@ namespace sfx2
SfxFilterMatcher* mpMatcher;
GraphicFilter* mpGraphicFilter;
FileDialogHelper* mpAntiImpl;
- vcl::Window* mpPreferredParentWindow;
+ VclPtr<vcl::Window> mpPreferredParentWindow;
::std::vector< OUString > mlLastURLs;
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index 777b3fec6cc8..639bd4baca93 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -150,14 +150,8 @@ SfxInfoBarWindow::~SfxInfoBarWindow()
void SfxInfoBarWindow::dispose()
{
- delete m_pMessage;
- delete m_pCloseBtn;
-
- for ( vector< PushButton* >::iterator it = m_aActionBtns.begin( );
- it != m_aActionBtns.end( ); ++it )
- {
- delete *it;
- }
+ m_pMessage.clear();
+ m_pCloseBtn.clear();
m_aActionBtns.clear( );
vcl::Window::dispose();
}
@@ -219,8 +213,7 @@ void SfxInfoBarWindow::Resize()
long nX = m_pCloseBtn->GetPosPixel().getX() - 15 * nScaleFactor;
long nButtonGap = 5 * nScaleFactor;
- boost::ptr_vector<PushButton>::iterator it;
- for (it = m_aActionBtns.begin(); it != m_aActionBtns.end(); ++it)
+ for (auto it = m_aActionBtns.begin(); it != m_aActionBtns.end(); ++it)
{
long nButtonWidth = it->GetSizePixel().getWidth();
nX -= nButtonWidth;
@@ -254,11 +247,6 @@ SfxInfoBarContainerWindow::~SfxInfoBarContainerWindow()
void SfxInfoBarContainerWindow::dispose()
{
- for ( vector< SfxInfoBarWindow* >::iterator it = m_pInfoBars.begin( );
- it != m_pInfoBars.end( ); ++it )
- {
- delete *it;
- }
m_pInfoBars.clear( );
Window::dispose();
}
@@ -267,7 +255,7 @@ SfxInfoBarWindow* SfxInfoBarContainerWindow::appendInfoBar(const OUString& sId,
{
Size aSize = GetSizePixel();
- SfxInfoBarWindow* pInfoBar = new SfxInfoBarWindow(this, sId, sMessage);
+ VclPtrInstance<SfxInfoBarWindow> pInfoBar(this, sId, sMessage);
pInfoBar->SetPosPixel(Point(0, aSize.getHeight()));
pInfoBar->Show();
m_pInfoBars.push_back(pInfoBar);
@@ -280,8 +268,7 @@ SfxInfoBarWindow* SfxInfoBarContainerWindow::appendInfoBar(const OUString& sId,
SfxInfoBarWindow* SfxInfoBarContainerWindow::getInfoBar(const OUString& sId)
{
- boost::ptr_vector<SfxInfoBarWindow>::iterator it;
- for (it = m_pInfoBars.begin(); it != m_pInfoBars.end(); ++it)
+ for (auto it = m_pInfoBars.begin(); it != m_pInfoBars.end(); ++it)
{
if (it->getId() == sId)
return &(*it);
@@ -291,8 +278,7 @@ SfxInfoBarWindow* SfxInfoBarContainerWindow::getInfoBar(const OUString& sId)
void SfxInfoBarContainerWindow::removeInfoBar(SfxInfoBarWindow* pInfoBar)
{
- boost::ptr_vector<SfxInfoBarWindow>::iterator it;
- for (it = m_pInfoBars.begin(); it != m_pInfoBars.end(); ++it)
+ for (auto it = m_pInfoBars.begin(); it != m_pInfoBars.end(); ++it)
{
if (pInfoBar == &(*it))
{
@@ -302,7 +288,7 @@ void SfxInfoBarContainerWindow::removeInfoBar(SfxInfoBarWindow* pInfoBar)
}
long nY = 0;
- for (it = m_pInfoBars.begin(); it != m_pInfoBars.end(); ++it)
+ for (auto it = m_pInfoBars.begin(); it != m_pInfoBars.end(); ++it)
{
it->SetPosPixel(Point(0, nY));
nY += it->GetSizePixel().getHeight();
@@ -320,8 +306,7 @@ void SfxInfoBarContainerWindow::Resize()
// Only need to change the width of the infobars
long nWidth = GetSizePixel().getWidth();
- boost::ptr_vector<SfxInfoBarWindow>::iterator it;
- for (it = m_pInfoBars.begin(); it != m_pInfoBars.end(); ++it)
+ for (auto it = m_pInfoBars.begin(); it != m_pInfoBars.end(); ++it)
{
Size aSize = it->GetSizePixel();
aSize.setWidth(nWidth);
diff --git a/sfx2/source/dialog/inputdlg.cxx b/sfx2/source/dialog/inputdlg.cxx
index 6f1ab9288205..a49a412be52a 100644
--- a/sfx2/source/dialog/inputdlg.cxx
+++ b/sfx2/source/dialog/inputdlg.cxx
@@ -26,6 +26,20 @@ InputDialog::InputDialog(const OUString &rLabelText, vcl::Window *pParent)
m_pCancel->SetClickHdl(LINK(this,InputDialog,ClickHdl));
}
+InputDialog::~InputDialog()
+{
+ dispose();
+}
+
+void InputDialog::dispose()
+{
+ m_pEntry.clear();
+ m_pLabel.clear();
+ m_pOK.clear();
+ m_pCancel.clear();
+ ModalDialog::dispose();
+}
+
OUString InputDialog::getEntryText() const
{
return m_pEntry->GetText();
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index c1a713d4f651..0a8a5b26210e 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -260,6 +260,18 @@ void SfxManageStyleSheetPage::dispose()
delete pFamilies;
pItem = 0;
pStyle = 0;
+ m_pNameRo.clear();
+ m_pNameRw.clear();
+ m_pAutoCB.clear();
+ m_pFollowFt.clear();
+ m_pFollowLb.clear();
+ m_pEditStyleBtn.clear();
+ m_pBaseFt.clear();
+ m_pBaseLb.clear();
+ m_pEditLinkStyleBtn.clear();
+ m_pFilterFt.clear();
+ m_pFilterLb.clear();
+ m_pDescFt.clear();
SfxTabPage::dispose();
}
diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx
index 415c347d4970..48a30206b94c 100644
--- a/sfx2/source/dialog/navigat.cxx
+++ b/sfx2/source/dialog/navigat.cxx
@@ -41,7 +41,7 @@ SfxNavigatorWrapper::SfxNavigatorWrapper( vcl::Window* pParentWnd ,
pWindow->SetHelpId ( HID_NAVIGATOR_WINDOW );
pWindow->SetOutputSizePixel( Size( 270, 240 ) );
- static_cast<SfxDockingWindow*>( pWindow )->Initialize( pInfo );
+ static_cast<SfxDockingWindow*>( pWindow.get() )->Initialize( pInfo );
SetHideNotDelete( true );
}
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index b8ec5b1a83e5..8fe73b084c61 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -88,6 +88,8 @@ SfxNewStyleDlg::~SfxNewStyleDlg()
void SfxNewStyleDlg::dispose()
{
aQueryOverwriteBox.disposeAndClear();
+ m_pColBox.clear();
+ m_pOKBtn.clear();
ModalDialog::dispose();
}
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index 40fabdb1f624..0292b83640f9 100644
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -65,10 +65,10 @@ SfxPartChildWnd_Impl::SfxPartChildWnd_Impl
assert(pInfo);
pInfo->nFlags |= SfxChildWindowFlags::FORCEDOCK;
- static_cast<SfxDockingWindow*>(pWindow)->SetFloatingSize( Size( 175, 175 ) );
+ static_cast<SfxDockingWindow*>(pWindow.get())->SetFloatingSize( Size( 175, 175 ) );
pWindow->SetSizePixel( Size( 175, 175 ) );
- static_cast<SfxDockingWindow*>(pWindow)->Initialize( pInfo );
+ static_cast<SfxDockingWindow*>(pWindow.get())->Initialize( pInfo );
SetHideNotDelete( true );
}
@@ -82,7 +82,7 @@ SfxPartChildWnd_Impl::~SfxPartChildWnd_Impl()
// But don't do it, if xFrame already exist. Then dispose() must come from inside ...
// and we need a valid pMgr for further operations ...
- SfxPartDockWnd_Impl* pWin = static_cast<SfxPartDockWnd_Impl*>(pWindow);
+ SfxPartDockWnd_Impl* pWin = static_cast<SfxPartDockWnd_Impl*>(pWindow.get());
if ( pWin && xFrame == pWin->GetBindings().GetActiveFrame() )
pWin->GetBindings().SetActiveFrame( NULL );
@@ -90,7 +90,7 @@ SfxPartChildWnd_Impl::~SfxPartChildWnd_Impl()
bool SfxPartChildWnd_Impl::QueryClose()
{
- return static_cast<SfxPartDockWnd_Impl*>(pWindow)->QueryClose();
+ return static_cast<SfxPartDockWnd_Impl*>(pWindow.get())->QueryClose();
}
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 56ba1282f617..1db877fbc258 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -125,7 +125,29 @@ SfxPasswordDialog::SfxPasswordDialog(vcl::Window* pParent, const OUString* pGrou
SetPasswdText();
}
+SfxPasswordDialog::~SfxPasswordDialog()
+{
+ dispose();
+}
+void SfxPasswordDialog::dispose()
+{
+ mpPassword1Box.clear();
+ mpUserFT.clear();
+ mpUserED.clear();
+ mpPassword1FT.clear();
+ mpPassword1ED.clear();
+ mpConfirm1FT.clear();
+ mpConfirm1ED.clear();
+ mpPassword2Box.clear();
+ mpPassword2FT.clear();
+ mpPassword2ED.clear();
+ mpConfirm2FT.clear();
+ mpConfirm2ED.clear();
+ mpMinLengthFT.clear();
+ mpOKBtn.clear();
+ ModalDialog::dispose();
+}
void SfxPasswordDialog::SetPasswdText( )
{
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index 0daebad48a52..b5e5d49ee7c9 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -85,6 +85,36 @@ SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( vcl::Window* pParent
m_pReduceBitmapsResolutionRB->SetToggleHdl( LINK( this, SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl ) );
}
+SfxCommonPrintOptionsTabPage::~SfxCommonPrintOptionsTabPage()
+{
+ dispose();
+}
+
+void SfxCommonPrintOptionsTabPage::dispose()
+{
+ m_pPrinterOutputRB.clear();
+ m_pPrintFileOutputRB.clear();
+ m_pReduceTransparencyCB.clear();
+ m_pReduceTransparencyAutoRB.clear();
+ m_pReduceTransparencyNoneRB.clear();
+ m_pReduceGradientsCB.clear();
+ m_pReduceGradientsStripesRB.clear();
+ m_pReduceGradientsColorRB.clear();
+ m_pReduceGradientsStepCountNF.clear();
+ m_pReduceBitmapsCB.clear();
+ m_pReduceBitmapsOptimalRB.clear();
+ m_pReduceBitmapsNormalRB.clear();
+ m_pReduceBitmapsResolutionRB.clear();
+ m_pReduceBitmapsResolutionLB.clear();
+ m_pReduceBitmapsTransparencyCB.clear();
+ m_pConvertToGreyscalesCB.clear();
+ m_pPDFCB.clear();
+ m_pPaperSizeCB.clear();
+ m_pPaperOrientationCB.clear();
+ m_pTransparencyCB.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* SfxCommonPrintOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
return( new SfxCommonPrintOptionsTabPage( pParent, *rAttrSet ) );
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index d63d1df4eff4..c674d9823ac1 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -134,7 +134,7 @@ SfxRecordingFloatWrapper_Impl::SfxRecordingFloatWrapper_Impl( vcl::Window* pPare
pWindow = new SfxRecordingFloat_Impl( pBindings, this, pParentWnd );
SetWantsFocus( false );
eChildAlignment = SfxChildAlignment::NOALIGNMENT;
- static_cast<SfxFloatingWindow*>(pWindow)->Initialize( pInfo );
+ static_cast<SfxFloatingWindow*>(pWindow.get())->Initialize( pInfo );
}
SfxRecordingFloatWrapper_Impl::~SfxRecordingFloatWrapper_Impl()
@@ -216,6 +216,7 @@ void SfxRecordingFloat_Impl::dispose()
catch ( uno::Exception& )
{
}
+ m_pTbx.clear();
SfxFloatingWindow::dispose();
}
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index b70ca3c4fab2..81e54371aa19 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -136,10 +136,10 @@ struct SfxSecurityPage_Impl
{
SfxSecurityPage & m_rMyTabPage;
- CheckBox* m_pOpenReadonlyCB;
- CheckBox* m_pRecordChangesCB; // for record changes
- PushButton* m_pProtectPB; // for record changes
- PushButton* m_pUnProtectPB; // for record changes
+ VclPtr<CheckBox> m_pOpenReadonlyCB;
+ VclPtr<CheckBox> m_pRecordChangesCB; // for record changes
+ VclPtr<PushButton> m_pProtectPB; // for record changes
+ VclPtr<PushButton> m_pUnProtectPB; // for record changes
RedliningMode m_eRedlingMode; // for record changes
bool m_bOrigPasswordIsConfirmed;
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 036a578c166d..4a7d42377a39 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -87,15 +87,16 @@ class SfxEmptySplitWin_Impl : public SplitWindow
*/
friend class SfxSplitWindow;
- SfxSplitWindow* pOwner;
- bool bFadeIn;
- bool bAutoHide;
- bool bSplit;
- bool bEndAutoHide;
- Timer aTimer;
- Point aLastPos;
+ VclPtr<SfxSplitWindow> pOwner;
+ bool bFadeIn;
+ bool bAutoHide;
+ bool bSplit;
+ bool bEndAutoHide;
+ Timer aTimer;
+ Point aLastPos;
sal_uInt16 nState;
+public:
SfxEmptySplitWin_Impl( SfxSplitWindow *pParent )
: SplitWindow( pParent->GetParent(), WinBits( WB_BORDER | WB_3DLOOK ) )
, pOwner( pParent )
@@ -119,6 +120,7 @@ friend class SfxSplitWindow;
virtual void dispose() SAL_OVERRIDE
{
aTimer.Stop();
+ pOwner.clear();
SplitWindow::dispose();
}
@@ -315,10 +317,11 @@ void SfxSplitWindow::dispose()
// Set pOwner to NULL, otherwise try to delete pEmptyWin once more. The
// window that is just being docked is always deleted from the outside.
pEmptyWin->pOwner = NULL;
- delete pEmptyWin;
}
+ pEmptyWin.clear();
delete pDockArr;
+ pActive.clear();
SplitWindow::dispose();
}
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index d933c0224f26..7fd8ec70aff2 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -69,6 +69,12 @@ void SearchDialog::dispose()
{
SaveConfig();
m_aCloseHdl.Call( NULL );
+ m_pSearchEdit.clear();
+ m_pWholeWordsBox.clear();
+ m_pMatchCaseBox.clear();
+ m_pWrapAroundBox.clear();
+ m_pBackwardsBox.clear();
+ m_pFindBtn.clear();
ModelessDialog::dispose();
}
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 1af64784fe14..b8f63d54c85e 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -60,7 +60,7 @@ struct Data_Impl
sal_uInt16 nId; // The ID
CreateTabPage fnCreatePage; // Pointer to Factory
GetTabPageRanges fnGetRanges; // Pointer to Ranges-Function
- SfxTabPage* pTabPage; // The TabPage itself
+ VclPtr<SfxTabPage> pTabPage; // The TabPage itself
bool bOnDemand; // Flag: ItemSet onDemand
bool bRefresh; // Flag: Page must be re-initialized
@@ -398,7 +398,7 @@ void SfxTabDialog::dispose()
if ( pDataObject->bOnDemand )
delete &pDataObject->pTabPage->GetItemSet();
- delete pDataObject->pTabPage;
+ pDataObject->pTabPage.disposeAndClear();
}
delete pDataObject;
}
@@ -409,16 +409,16 @@ void SfxTabDialog::dispose()
delete pExampleSet;
delete [] pRanges;
- if (m_bOwnsBaseFmtBtn)
- delete m_pBaseFmtBtn;
- if (m_bOwnsResetBtn)
- delete m_pResetBtn;
- if (m_bOwnsHelpBtn)
- delete m_pHelpBtn;
- if (m_bOwnsCancelBtn)
- delete m_pCancelBtn;
- if (m_bOwnsOKBtn)
- delete m_pOKBtn;
+ m_pBox.clear();
+ m_pTabCtrl.clear();
+ m_pOKBtn.clear();
+ m_pApplyBtn.clear();
+ m_pUserBtn.clear();
+ m_pCancelBtn.clear();
+ m_pHelpBtn.clear();
+ m_pResetBtn.clear();
+ m_pBaseFmtBtn.clear();
+ m_pActionArea.clear();
TabDialog::dispose();
}
@@ -438,33 +438,33 @@ void SfxTabDialog::Init_Impl(bool bFmtFlag)
assert(m_pActionArea);
m_pOKBtn = m_pUIBuilder->get<PushButton>("ok");
- m_bOwnsOKBtn = m_pOKBtn == NULL;
+ m_bOwnsOKBtn = m_pOKBtn == nullptr;
if (m_bOwnsOKBtn)
m_pOKBtn = new OKButton(m_pActionArea);
m_pApplyBtn = m_pUIBuilder->get<PushButton>("apply");
m_pUserBtn = m_pUIBuilder->get<PushButton>("user");
m_pCancelBtn = m_pUIBuilder->get<CancelButton>("cancel");
- m_bOwnsCancelBtn = m_pCancelBtn == NULL;
+ m_bOwnsCancelBtn = m_pCancelBtn == nullptr;
if (m_bOwnsCancelBtn)
m_pCancelBtn = new CancelButton(m_pActionArea);
m_pHelpBtn = m_pUIBuilder->get<HelpButton>("help");
- m_bOwnsHelpBtn = m_pHelpBtn == NULL;
+ m_bOwnsHelpBtn = m_pHelpBtn == nullptr;
if (m_bOwnsHelpBtn)
m_pHelpBtn = new HelpButton(m_pActionArea);
m_pResetBtn = m_pUIBuilder->get<PushButton>("reset");
- m_bOwnsResetBtn = m_pResetBtn == NULL;
+ m_bOwnsResetBtn = m_pResetBtn == nullptr;
if (m_bOwnsResetBtn)
- m_pResetBtn = new PushButton(m_pActionArea);
+ m_pResetBtn = new PushButton(m_pActionArea.get());
else
pImpl->bHideResetBtn = !m_pResetBtn->IsVisible();
m_pBaseFmtBtn = m_pUIBuilder->get<PushButton>("standard");
- m_bOwnsBaseFmtBtn = m_pBaseFmtBtn == NULL;
+ m_bOwnsBaseFmtBtn = m_pBaseFmtBtn == nullptr;
if (m_bOwnsBaseFmtBtn)
- m_pBaseFmtBtn = new PushButton(m_pActionArea);
+ m_pBaseFmtBtn = new PushButton(m_pActionArea.get());
m_pOKBtn->SetClickHdl( LINK( this, SfxTabDialog, OkHdl ) );
m_pCancelBtn->SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) );
@@ -698,7 +698,7 @@ void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
if ( pDataObject->bOnDemand )
delete &pDataObject->pTabPage->GetItemSet();
- delete pDataObject->pTabPage;
+ pDataObject->pTabPage.disposeAndClear();
}
delete pDataObject;
@@ -1135,7 +1135,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
else
pTabPage = (pDataObject->fnCreatePage)
( pTabCtrl, CreateInputItemSet( nId ) );
- DBG_ASSERT( NULL == pDataObject->pTabPage, "create TabPage more than once" );
+ DBG_ASSERT( nullptr == pDataObject->pTabPage, "create TabPage more than once" );
pDataObject->pTabPage = pTabPage;
OUString sConfigId = OStringToOUString(pTabPage->GetConfigId(), RTL_TEXTENCODING_UTF8);
@@ -1255,7 +1255,7 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
{
Data_Impl* pObj = *it;
- if ( pObj->pTabPage != pPage ) // Do not refresh own Page anymore
+ if ( pObj->pTabPage.get() != pPage ) // Do not refresh own Page anymore
pObj->bRefresh = true;
else
pObj->bRefresh = false;
diff --git a/sfx2/source/dialog/templateinfodlg.cxx b/sfx2/source/dialog/templateinfodlg.cxx
index a1779d6fefc9..e16db6db0f95 100644
--- a/sfx2/source/dialog/templateinfodlg.cxx
+++ b/sfx2/source/dialog/templateinfodlg.cxx
@@ -38,7 +38,7 @@ SfxTemplateInfoDlg::SfxTemplateInfoDlg (vcl::Window *pParent)
get(mpBtnClose, "close");
get(mpBox, "box");
get(mpInfoView, "infoDrawingArea");
- mpPreviewView = new vcl::Window(mpBox);
+ mpPreviewView = new vcl::Window(mpBox.get());
Size aSize(LogicToPixel(Size(250, 160), MAP_APPFONT));
mpBox->set_width_request(aSize.Width());
@@ -60,6 +60,10 @@ SfxTemplateInfoDlg::~SfxTemplateInfoDlg()
void SfxTemplateInfoDlg::dispose()
{
m_xFrame->dispose();
+ mpBtnClose.clear();
+ mpBox.clear();
+ mpPreviewView.clear();
+ mpInfoView.clear();
ModalDialog::dispose();
}
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 34097725d091..72fde222b23c 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -765,7 +765,6 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
if ( pStyleSheetPool )
EndListening(*pStyleSheetPool);
pStyleSheetPool = NULL;
- delete pTreeBox;
delete pIdle;
if ( m_pDeletionWatcher )
m_pDeletionWatcher->signal();
@@ -1532,7 +1531,7 @@ void SfxCommonTemplateDialog_Impl::EnableHierarchical(bool const bEnable)
}
else
{
- DELETEZ(pTreeBox);
+ pTreeBox.clear();
aFmtLb->Show();
// If bHierarchical, then the family can have changed
// minus one since hierarchical is inserted at the start
@@ -2173,7 +2172,7 @@ void SfxTemplateDialog_Impl::LoadedFamilies()
// The size of the Listboxen is adjusted
void SfxTemplateDialog_Impl::Resize()
{
- SfxDockingWindow* pDockingWindow = dynamic_cast<SfxDockingWindow*>(m_pFloat);
+ SfxDockingWindow* pDockingWindow = dynamic_cast<SfxDockingWindow*>(m_pFloat.get());
FloatingWindow *pF = pDockingWindow!=NULL ? pDockingWindow->GetFloatingWindow() : NULL;
if ( pF )
{
@@ -2182,7 +2181,7 @@ void SfxTemplateDialog_Impl::Resize()
return;
}
- if (m_pFloat == NULL)
+ if (m_pFloat == nullptr)
return;
Size aDlgSize=m_pFloat->PixelToLogic(m_pFloat->GetOutputSizePixel());
Size aSizeATL=m_pFloat->PixelToLogic(m_aActionTbL->CalcWindowSizePixel());
@@ -2242,7 +2241,7 @@ void SfxTemplateDialog_Impl::Resize()
Size SfxTemplateDialog_Impl::GetMinOutputSizePixel()
{
- if (m_pFloat != NULL)
+ if (m_pFloat != nullptr)
{
Size aSizeATL=m_pFloat->PixelToLogic(m_aActionTbL->CalcWindowSizePixel());
Size aSizeATR=m_pFloat->PixelToLogic(m_aActionTbR->CalcWindowSizePixel());
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 797c89342f28..f74654602fdc 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -335,7 +335,14 @@ SfxVersionDialog::~SfxVersionDialog()
void SfxVersionDialog::dispose()
{
delete m_pTable;
- delete m_pVersionBox;
+ m_pVersionBox.clear();
+ m_pSaveButton.clear();
+ m_pSaveCheckBox.clear();
+ m_pOpenButton.clear();
+ m_pViewButton.clear();
+ m_pDeleteButton.clear();
+ m_pCompareButton.clear();
+ m_pCmisButton.clear();
SfxModalDialog::dispose();
}
@@ -499,6 +506,22 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl(vcl::Window *pParent, SfxVe
}
}
+SfxViewVersionDialog_Impl::~SfxViewVersionDialog_Impl()
+{
+ dispose();
+}
+
+void SfxViewVersionDialog_Impl::dispose()
+{
+ m_pDateTimeText.clear();
+ m_pSavedByText.clear();
+ m_pEdit.clear();
+ m_pOKButton.clear();
+ m_pCancelButton.clear();
+ m_pCloseButton.clear();
+ SfxModalDialog::dispose();
+}
+
IMPL_LINK(SfxViewVersionDialog_Impl, ButtonHdl, Button*, pButton)
{
assert(pButton == m_pOKButton);
@@ -569,7 +592,11 @@ SfxCmisVersionsDialog::~SfxCmisVersionsDialog()
void SfxCmisVersionsDialog::dispose()
{
delete m_pTable;
- delete m_pVersionBox;
+ m_pVersionBox.clear();
+ m_pOpenButton.clear();
+ m_pViewButton.clear();
+ m_pDeleteButton.clear();
+ m_pCompareButton.clear();
SfxModalDialog::dispose();
}
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index e120cf23dc56..3ad16cf0901e 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -123,19 +123,19 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSfxPreviewWin(vcl::Win
class SfxNewFileDialog_Impl
{
- ListBox* m_pRegionLb;
- ListBox* m_pTemplateLb;
+ VclPtr<ListBox> m_pRegionLb;
+ VclPtr<ListBox> m_pTemplateLb;
- SfxPreviewWin_Impl* m_pPreviewWin;
+ VclPtr<SfxPreviewWin_Impl> m_pPreviewWin;
- CheckBox* m_pTextStyleCB;
- CheckBox* m_pFrameStyleCB;
- CheckBox* m_pPageStyleCB;
- CheckBox* m_pNumStyleCB;
- CheckBox* m_pMergeStyleCB;
- PushButton* m_pLoadFilePB;
+ VclPtr<CheckBox> m_pTextStyleCB;
+ VclPtr<CheckBox> m_pFrameStyleCB;
+ VclPtr<CheckBox> m_pPageStyleCB;
+ VclPtr<CheckBox> m_pNumStyleCB;
+ VclPtr<CheckBox> m_pMergeStyleCB;
+ VclPtr<PushButton> m_pLoadFilePB;
- VclExpander* m_pMoreBt;
+ VclPtr<VclExpander> m_pMoreBt;
Idle aPrevIdle;
OUString aNone;
OUString sLoadTemplate;
@@ -143,7 +143,7 @@ class SfxNewFileDialog_Impl
sal_uInt16 nFlags;
SfxDocumentTemplates aTemplates;
SfxObjectShellLock xDocShell;
- SfxNewFileDialog* pAntiImpl;
+ VclPtr<SfxNewFileDialog> pAntiImpl;
DECL_LINK( Update, void * );
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index b1c416c2a507..3ace50cbec6e 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -321,6 +321,16 @@ void SfxTemplateManagerDlg::dispose()
mpSearchView->setItemStateHdl(Link());
mpSearchView->setOpenTemplateHdl(Link());
+
+ mpTabControl.clear();
+ mpSearchEdit.clear();
+ mpViewBar.clear();
+ mpActionBar.clear();
+ mpTemplateBar.clear();
+ mpSearchView.clear();
+ mpCurView.clear();
+ mpLocalView.clear();
+ mpRemoteView.clear();
ModalDialog::dispose();
}
@@ -1409,7 +1419,7 @@ void SfxTemplateManagerDlg::switchMainView(bool bDisplayLocal)
{
if (bDisplayLocal)
{
- mpCurView = mpLocalView;
+ mpCurView = mpLocalView.get();
mpViewBar->HideItem(VIEWBAR_DELETE);
@@ -1422,7 +1432,7 @@ void SfxTemplateManagerDlg::switchMainView(bool bDisplayLocal)
}
else
{
- mpCurView = mpRemoteView;
+ mpCurView = mpRemoteView.get();
mpViewBar->ShowItem(VIEWBAR_DELETE);
diff --git a/sfx2/source/inc/alienwarn.hxx b/sfx2/source/inc/alienwarn.hxx
index a21473dc6a88..bd234104b53a 100644
--- a/sfx2/source/inc/alienwarn.hxx
+++ b/sfx2/source/inc/alienwarn.hxx
@@ -25,8 +25,8 @@
class SfxAlienWarningDialog : public MessageDialog
{
private:
- PushButton* m_pKeepCurrentBtn;
- CheckBox* m_pWarningOnBox;
+ VclPtr<PushButton> m_pKeepCurrentBtn;
+ VclPtr<CheckBox> m_pWarningOnBox;
public:
SfxAlienWarningDialog(vcl::Window* pParent, const OUString& _rFormatName);
diff --git a/sfx2/source/inc/documentfontsdialog.hxx b/sfx2/source/inc/documentfontsdialog.hxx
index 360f88713010..5b64db66b00b 100644
--- a/sfx2/source/inc/documentfontsdialog.hxx
+++ b/sfx2/source/inc/documentfontsdialog.hxx
@@ -31,12 +31,14 @@ class SfxDocumentFontsPage: public SfxTabPage
{
public:
SfxDocumentFontsPage( vcl::Window* parent, const SfxItemSet& set );
+ virtual ~SfxDocumentFontsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* parent, const SfxItemSet* set );
protected:
virtual bool FillItemSet( SfxItemSet* set ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* set ) SAL_OVERRIDE;
private:
- CheckBox* embedFontsCheckbox;
+ VclPtr<CheckBox> embedFontsCheckbox;
};
#endif
diff --git a/sfx2/source/inc/inputdlg.hxx b/sfx2/source/inc/inputdlg.hxx
index 29b5c45b9453..41888d44d3c9 100644
--- a/sfx2/source/inc/inputdlg.hxx
+++ b/sfx2/source/inc/inputdlg.hxx
@@ -21,6 +21,8 @@ class InputDialog : public ModalDialog
public:
InputDialog (const OUString &labelText, vcl::Window *pParent = NULL);
OUString getEntryText () const;
+ virtual ~InputDialog();
+ virtual void dispose() SAL_OVERRIDE;
private:
@@ -28,10 +30,10 @@ private:
private:
- Edit *m_pEntry;
- FixedText *m_pLabel;
- PushButton *m_pOK;
- PushButton *m_pCancel;
+ VclPtr<Edit> m_pEntry;
+ VclPtr<FixedText> m_pLabel;
+ VclPtr<PushButton> m_pOK;
+ VclPtr<PushButton> m_pCancel;
};
#endif // INCLUDED_SFX2_SOURCE_INC_INPUTDLG_HXX
diff --git a/sfx2/source/inc/recfloat.hxx b/sfx2/source/inc/recfloat.hxx
index df32b12b25c7..50dd7f6dc9fd 100644
--- a/sfx2/source/inc/recfloat.hxx
+++ b/sfx2/source/inc/recfloat.hxx
@@ -39,7 +39,7 @@ public:
class SfxRecordingFloat_Impl : public SfxFloatingWindow
{
- ToolBox* m_pTbx;
+ VclPtr<ToolBox> m_pTbx;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XToolbarController > xStopRecTbxCtrl;
public:
SfxRecordingFloat_Impl( SfxBindings* pBindings ,
diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx
index 9dfa27dd8f4c..177bd769c70c 100644
--- a/sfx2/source/inc/splitwin.hxx
+++ b/sfx2/source/inc/splitwin.hxx
@@ -31,9 +31,9 @@ class SfxEmptySplitWin_Impl;
struct SfxDock_Impl
{
sal_uInt16 nType;
- SfxDockingWindow* pWin; // SplitWindow has this window
- bool bNewLine;
- bool bHide; // SplitWindow had this window
+ VclPtr<SfxDockingWindow> pWin; // SplitWindow has this window
+ bool bNewLine;
+ bool bHide; // SplitWindow had this window
long nSize;
};
@@ -49,8 +49,8 @@ private:
SfxDockArr_Impl* pDockArr;
bool bLocked;
bool bPinned;
- SfxEmptySplitWin_Impl* pEmptyWin;
- SfxDockingWindow* pActive;
+ VclPtr<SfxEmptySplitWin_Impl> pEmptyWin;
+ VclPtr<SfxDockingWindow> pActive;
void InsertWindow_Impl( SfxDock_Impl* pDockWin,
const Size& rSize,
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index f50de2e057e7..c72f3056aa88 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -169,7 +169,7 @@ protected:
SfxBindings* pBindings;
SfxTemplateControllerItem* pBoundItems[COUNT_BOUND_FUNC];
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
SfxModule* pModule;
Idle* pIdle;
@@ -177,7 +177,7 @@ protected:
SfxStyleFamilies* pStyleFamilies;
SfxTemplateItem* pFamilyState[MAX_FAMILIES];
SfxStyleSheetBasePool* pStyleSheetPool;
- StyleTreeListBox_Impl* pTreeBox;
+ VclPtr<StyleTreeListBox_Impl> pTreeBox;
SfxObjectShell* pCurObjShell;
css::uno::Reference<css::frame::XModuleManager2> xModuleManager;
DeletionWatcher* m_pDeletionWatcher;
@@ -369,10 +369,10 @@ private:
friend class DropToolBox_Impl;
friend class SfxTemplatePanelControl;
- vcl::Window* m_pFloat;
- bool m_bZoomIn;
+ VclPtr<vcl::Window> m_pFloat;
+ bool m_bZoomIn;
VclPtr<DropToolBox_Impl> m_aActionTbL;
- VclPtr<ToolBox> m_aActionTbR;
+ VclPtr<ToolBox> m_aActionTbR;
DECL_LINK( ToolBoxLSelect, ToolBox* );
DECL_LINK( ToolBoxRSelect, ToolBox* );
diff --git a/sfx2/source/inc/versdlg.hxx b/sfx2/source/inc/versdlg.hxx
index 0079e0f1f26f..67453efa3a51 100644
--- a/sfx2/source/inc/versdlg.hxx
+++ b/sfx2/source/inc/versdlg.hxx
@@ -45,14 +45,14 @@ public:
class SfxVersionTableDtor;
class SfxVersionDialog : public SfxModalDialog
{
- PushButton* m_pSaveButton;
- CheckBox* m_pSaveCheckBox;
- SfxVersionsTabListBox_Impl* m_pVersionBox;
- PushButton* m_pOpenButton;
- PushButton* m_pViewButton;
- PushButton* m_pDeleteButton;
- PushButton* m_pCompareButton;
- PushButton* m_pCmisButton;
+ VclPtr<PushButton> m_pSaveButton;
+ VclPtr<CheckBox> m_pSaveCheckBox;
+ VclPtr<SfxVersionsTabListBox_Impl> m_pVersionBox;
+ VclPtr<PushButton> m_pOpenButton;
+ VclPtr<PushButton> m_pViewButton;
+ VclPtr<PushButton> m_pDeleteButton;
+ VclPtr<PushButton> m_pCompareButton;
+ VclPtr<PushButton> m_pCmisButton;
SfxViewFrame* pViewFrame;
SfxVersionTableDtor* m_pTable;
bool m_bIsSaveVersionOnClose;
@@ -72,27 +72,29 @@ public:
class SfxViewVersionDialog_Impl : public SfxModalDialog
{
- FixedText* m_pDateTimeText;
- FixedText* m_pSavedByText;
- VclMultiLineEdit* m_pEdit;
- OKButton* m_pOKButton;
- CancelButton* m_pCancelButton;
- CloseButton* m_pCloseButton;
+ VclPtr<FixedText> m_pDateTimeText;
+ VclPtr<FixedText> m_pSavedByText;
+ VclPtr<VclMultiLineEdit> m_pEdit;
+ VclPtr<OKButton> m_pOKButton;
+ VclPtr<CancelButton> m_pCancelButton;
+ VclPtr<CloseButton> m_pCloseButton;
SfxVersionInfo& m_rInfo;
DECL_LINK(ButtonHdl, Button*);
public:
SfxViewVersionDialog_Impl(vcl::Window *pParent, SfxVersionInfo& rInfo, bool bEdit);
+ virtual ~SfxViewVersionDialog_Impl();
+ virtual void dispose() SAL_OVERRIDE;
};
class SfxCmisVersionsDialog : public SfxModalDialog
{
- SfxVersionsTabListBox_Impl* m_pVersionBox;
- PushButton* m_pOpenButton;
- PushButton* m_pViewButton;
- PushButton* m_pDeleteButton;
- PushButton* m_pCompareButton;
+ VclPtr<SfxVersionsTabListBox_Impl> m_pVersionBox;
+ VclPtr<PushButton> m_pOpenButton;
+ VclPtr<PushButton> m_pViewButton;
+ VclPtr<PushButton> m_pDeleteButton;
+ VclPtr<PushButton> m_pCompareButton;
SfxViewFrame* pViewFrame;
SfxVersionTableDtor* m_pTable;
bool m_bIsSaveVersionOnClose;
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 1d5281746f2c..911fd8570a7e 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -96,7 +96,7 @@ namespace o3tl
struct SfxChild_Impl
{
- vcl::Window* pWin;
+ VclPtr<vcl::Window> pWin;
Size aSize;
SfxChildAlignment eAlign;
SfxChildVisibility nVisible;
@@ -226,12 +226,12 @@ protected:
SfxChildList_Impl aChildren;
SfxChildWindows_Impl aChildWins;
SfxBindings* pBindings;
- vcl::Window* pWorkWin;
+ VclPtr<vcl::Window> pWorkWin;
SfxShell* pConfigShell;
- vcl::Window* pActiveChild;
- sal_uInt16 nUpdateMode;
- sal_uInt16 nChildren;
- sal_uInt16 nOrigMode;
+ VclPtr<vcl::Window> pActiveChild;
+ sal_uInt16 nUpdateMode;
+ sal_uInt16 nChildren;
+ sal_uInt16 nOrigMode;
bool bSorted : 1;
bool bDockingAllowed : 1;
bool bInternalDockingAllowed : 1;
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index af116e67c605..3e41a3ab5418 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -65,9 +65,9 @@ void FocusManager::Clear (void)
void FocusManager::ClearPanels (void)
{
- ::std::vector<Panel*> aPanels;
+ ::std::vector<VclPtr<Panel> > aPanels;
aPanels.swap(maPanels);
- for (::std::vector<Panel*>::iterator iPanel(aPanels.begin()),iEnd(aPanels.end());
+ for (auto iPanel(aPanels.begin()),iEnd(aPanels.end());
iPanel!=iEnd;
++iPanel)
{
@@ -84,9 +84,9 @@ void FocusManager::ClearPanels (void)
void FocusManager::ClearButtons (void)
{
- ::std::vector<Button*> aButtons;
+ ::std::vector<VclPtr<Button> > aButtons;
aButtons.swap(maButtons);
- for (::std::vector<Button*>::iterator iButton(aButtons.begin()),iEnd(aButtons.end());
+ for (auto iButton(aButtons.begin()),iEnd(aButtons.end());
iButton!=iEnd;
++iButton)
{
@@ -96,14 +96,14 @@ void FocusManager::ClearButtons (void)
void FocusManager::SetDeckTitle (DeckTitleBar* pDeckTitleBar)
{
- if (mpDeckTitleBar != NULL)
+ if (mpDeckTitleBar != nullptr)
{
UnregisterWindow(*mpDeckTitleBar);
UnregisterWindow(mpDeckTitleBar->GetToolBox());
}
mpDeckTitleBar = pDeckTitleBar;
- if (mpDeckTitleBar != NULL)
+ if (mpDeckTitleBar != nullptr)
{
RegisterWindow(*mpDeckTitleBar);
RegisterWindow(mpDeckTitleBar->GetToolBox());
@@ -156,7 +156,7 @@ void FocusManager::UnregisterWindow (vcl::Window& rWindow)
FocusManager::FocusLocation FocusManager::GetFocusLocation (const vcl::Window& rWindow) const
{
// Check the deck title.
- if (mpDeckTitleBar != NULL)
+ if (mpDeckTitleBar != nullptr)
{
if (mpDeckTitleBar == &rWindow)
return FocusLocation(PC_DeckTitle, -1);
@@ -186,7 +186,7 @@ FocusManager::FocusLocation FocusManager::GetFocusLocation (const vcl::Window& r
void FocusManager::FocusDeckTitle (void)
{
- if (mpDeckTitleBar != NULL)
+ if (mpDeckTitleBar != nullptr)
{
if (IsDeckTitleVisible())
{
@@ -207,7 +207,7 @@ void FocusManager::FocusDeckTitle (void)
bool FocusManager::IsDeckTitleVisible (void) const
{
- return mpDeckTitleBar != NULL && mpDeckTitleBar->IsVisible();
+ return mpDeckTitleBar != nullptr && mpDeckTitleBar->IsVisible();
}
bool FocusManager::IsPanelTitleVisible (const sal_Int32 nPanelIndex) const
@@ -286,7 +286,7 @@ void FocusManager::ClickButton (const sal_Int32 nButtonIndex)
void FocusManager::RemoveWindow (vcl::Window& rWindow)
{
- ::std::vector<Panel*>::iterator iPanel (::std::find(maPanels.begin(), maPanels.end(), &rWindow));
+ auto iPanel (::std::find(maPanels.begin(), maPanels.end(), &rWindow));
if (iPanel != maPanels.end())
{
UnregisterWindow(rWindow);
@@ -299,7 +299,7 @@ void FocusManager::RemoveWindow (vcl::Window& rWindow)
return;
}
- ::std::vector<Button*>::iterator iButton (::std::find(maButtons.begin(), maButtons.end(), &rWindow));
+ auto iButton (::std::find(maButtons.begin(), maButtons.end(), &rWindow));
if (iButton != maButtons.end())
{
UnregisterWindow(rWindow);
@@ -596,7 +596,7 @@ IMPL_LINK(FocusManager, ChildEventListener, VclSimpleEvent*, pEvent)
break;
case KEY_TAB:
- if (mpFirstFocusedContentControl!=NULL
+ if (mpFirstFocusedContentControl!=nullptr
&& mpLastFocusedWindow == mpFirstFocusedContentControl)
{
// Move focus back to panel (or deck)
diff --git a/sfx2/source/sidebar/FocusManager.hxx b/sfx2/source/sidebar/FocusManager.hxx
index 0577c8cd88e7..4662517c12ed 100644
--- a/sfx2/source/sidebar/FocusManager.hxx
+++ b/sfx2/source/sidebar/FocusManager.hxx
@@ -68,13 +68,13 @@ public:
void SetButtons (const ::std::vector<Button*>& rButtons);
private:
- DeckTitleBar* mpDeckTitleBar;
- ::std::vector<Panel*> maPanels;
- ::std::vector<Button*> maButtons;
+ VclPtr<DeckTitleBar> mpDeckTitleBar;
+ ::std::vector<VclPtr<Panel> > maPanels;
+ ::std::vector<VclPtr<Button> > maButtons;
const ::boost::function<void(const Panel&)> maShowPanelFunctor;
bool mbObservingContentControlFocus;
- vcl::Window* mpFirstFocusedContentControl;
- vcl::Window* mpLastFocusedWindow;
+ VclPtr<vcl::Window> mpFirstFocusedContentControl;
+ VclPtr<vcl::Window> mpLastFocusedWindow;
enum PanelComponent
{
diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx
index 0f840e3a77d3..30ad8476bba8 100644
--- a/sfx2/source/sidebar/PanelTitleBar.cxx
+++ b/sfx2/source/sidebar/PanelTitleBar.cxx
@@ -51,13 +51,24 @@ PanelTitleBar::PanelTitleBar (
msMoreOptionsCommand(),
msAccessibleNamePrefix(SFX2_RESSTR(SFX_STR_SIDEBAR_ACCESSIBILITY_PANEL_PREFIX))
{
- OSL_ASSERT(mpPanel != NULL);
+ OSL_ASSERT(mpPanel != nullptr);
#ifdef DEBUG
SetText(OUString("PanelTitleBar"));
#endif
}
+PanelTitleBar::~PanelTitleBar()
+{
+ dispose();
+}
+
+void PanelTitleBar::dispose()
+{
+ mpPanel.clear();
+ TitleBar::dispose();
+}
+
void PanelTitleBar::SetMoreOptionsCommand (
const ::rtl::OUString& rsCommandName,
const css::uno::Reference<css::frame::XFrame>& rxFrame)
@@ -94,7 +105,7 @@ void PanelTitleBar::SetMoreOptionsCommand (
Rectangle PanelTitleBar::GetTitleArea (const Rectangle& rTitleBarBox)
{
- if (mpPanel != NULL)
+ if (mpPanel != nullptr)
{
Image aImage (mpPanel->IsExpanded()
? Theme::GetImage(Theme::Image_Expand)
@@ -113,7 +124,7 @@ void PanelTitleBar::PaintDecoration (const Rectangle& rTitleBarBox)
{
(void)rTitleBarBox;
- if (mpPanel != NULL)
+ if (mpPanel != nullptr)
{
Image aImage (mpPanel->IsExpanded()
? Theme::GetImage(Theme::Image_Collapse)
@@ -181,7 +192,7 @@ void PanelTitleBar::MouseButtonUp (const MouseEvent& rMouseEvent)
{
if (mbIsLeftButtonDown)
{
- if (mpPanel != NULL)
+ if (mpPanel != nullptr)
{
mpPanel->SetExpanded( ! mpPanel->IsExpanded());
Invalidate();
diff --git a/sfx2/source/sidebar/PanelTitleBar.hxx b/sfx2/source/sidebar/PanelTitleBar.hxx
index 1fc3eb3ec82e..f1a23f83d1ca 100644
--- a/sfx2/source/sidebar/PanelTitleBar.hxx
+++ b/sfx2/source/sidebar/PanelTitleBar.hxx
@@ -36,6 +36,8 @@ public:
const ::rtl::OUString& rsTitle,
vcl::Window* pParentWindow,
Panel* pPanel );
+ virtual ~PanelTitleBar();
+ virtual void dispose() SAL_OVERRIDE;
void SetMoreOptionsCommand (
const ::rtl::OUString& rsCommandName,
@@ -55,7 +57,7 @@ protected:
private:
bool mbIsLeftButtonDown;
- Panel* mpPanel;
+ VclPtr<Panel> mpPanel;
const sal_uInt16 mnMenuItemIndex;
css::uno::Reference<css::frame::XFrame> mxFrame;
::rtl::OUString msMoreOptionsCommand;
diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx
index 22d71d3ca95a..05fad1caacf8 100644
--- a/sfx2/source/sidebar/SidebarChildWindow.cxx
+++ b/sfx2/source/sidebar/SidebarChildWindow.cxx
@@ -47,7 +47,7 @@ SidebarChildWindow::SidebarChildWindow (
pWindow->SetHelpId(HID_SIDEBAR_WINDOW);
pWindow->SetOutputSizePixel(Size(GetDefaultWidth(pWindow), 450));
- SfxDockingWindow* pDockingParent = dynamic_cast<SfxDockingWindow*>(pWindow);
+ SfxDockingWindow* pDockingParent = dynamic_cast<SfxDockingWindow*>(pWindow.get());
if (pDockingParent != NULL)
{
if (pInfo && pInfo->aExtraString.isEmpty() && pInfo->aModule != "simpress")
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index eb2554df744d..807403248053 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -188,13 +188,13 @@ void SAL_CALL SidebarController::disposing (void)
if (mxReadOnlyModeDispatch.is())
mxReadOnlyModeDispatch->removeStatusListener(this, Tools::GetURL(gsReadOnlyCommandName));
- if (mpSplitWindow != NULL)
+ if (mpSplitWindow != nullptr)
{
mpSplitWindow->RemoveEventListener(LINK(this, SidebarController, WindowEventHandler));
mpSplitWindow = NULL;
}
- if (mpParentWindow != NULL)
+ if (mpParentWindow != nullptr)
{
mpParentWindow->RemoveEventListener(LINK(this, SidebarController, WindowEventHandler));
mpParentWindow = NULL;
@@ -737,7 +737,7 @@ Reference<ui::XUIElement> SidebarController::CreateUIElement (
::comphelper::NamedValueCollection aCreationArguments;
aCreationArguments.put("Frame", makeAny(mxFrame));
aCreationArguments.put("ParentWindow", makeAny(rxWindow));
- SfxDockingWindow* pSfxDockingWindow = dynamic_cast<SfxDockingWindow*>(mpParentWindow);
+ SfxDockingWindow* pSfxDockingWindow = dynamic_cast<SfxDockingWindow*>(mpParentWindow.get());
if (pSfxDockingWindow != NULL)
aCreationArguments.put("SfxBindings", makeAny(sal_uInt64(&pSfxDockingWindow->GetBindings())));
aCreationArguments.put("Theme", Theme::GetPropertySet());
@@ -802,7 +802,7 @@ IMPL_LINK(SidebarController, WindowEventHandler, VclWindowEvent*, pEvent)
break;
}
}
- else if (pEvent->GetWindow()==mpSplitWindow && mpSplitWindow!=NULL)
+ else if (pEvent->GetWindow()==mpSplitWindow && mpSplitWindow!=nullptr)
{
switch (pEvent->GetId())
{
@@ -1060,7 +1060,7 @@ void SidebarController::RestrictWidth (sal_Int32 nWidth)
SfxSplitWindow* pSplitWindow = GetSplitWindow();
if (pSplitWindow != NULL)
{
- const sal_uInt16 nId (pSplitWindow->GetItemId(mpParentWindow));
+ const sal_uInt16 nId (pSplitWindow->GetItemId(mpParentWindow.get()));
const sal_uInt16 nSetId (pSplitWindow->GetSet(nId));
pSplitWindow->SetItemSizeRange(
nSetId,
@@ -1071,17 +1071,17 @@ void SidebarController::RestrictWidth (sal_Int32 nWidth)
SfxSplitWindow* SidebarController::GetSplitWindow (void)
{
- if (mpParentWindow != NULL)
+ if (mpParentWindow != nullptr)
{
SfxSplitWindow* pSplitWindow = dynamic_cast<SfxSplitWindow*>(mpParentWindow->GetParent());
if (pSplitWindow != mpSplitWindow)
{
- if (mpSplitWindow != NULL)
+ if (mpSplitWindow != nullptr)
mpSplitWindow->RemoveEventListener(LINK(this, SidebarController, WindowEventHandler));
mpSplitWindow = pSplitWindow;
- if (mpSplitWindow != NULL)
+ if (mpSplitWindow != nullptr)
mpSplitWindow->AddEventListener(LINK(this, SidebarController, WindowEventHandler));
}
return mpSplitWindow;
@@ -1092,7 +1092,7 @@ SfxSplitWindow* SidebarController::GetSplitWindow (void)
void SidebarController::UpdateCloseIndicator (const bool bCloseAfterDrag)
{
- if (mpParentWindow == NULL)
+ if (mpParentWindow == nullptr)
return;
if (bCloseAfterDrag)
diff --git a/sfx2/source/sidebar/SidebarController.hxx b/sfx2/source/sidebar/SidebarController.hxx
index 15c694d85fea..340aba5c32eb 100644
--- a/sfx2/source/sidebar/SidebarController.hxx
+++ b/sfx2/source/sidebar/SidebarController.hxx
@@ -145,7 +145,7 @@ private:
static SidebarControllerContainer maSidebarControllerContainer;
::boost::scoped_ptr<Deck> mpCurrentDeck;
- SidebarDockingWindow* mpParentWindow;
+ VclPtr<SidebarDockingWindow> mpParentWindow;
::boost::scoped_ptr<TabBar> mpTabBar;
css::uno::Reference<css::frame::XFrame> mxFrame;
Context maCurrentContext;
@@ -177,7 +177,7 @@ private:
FocusManager maFocusManager;
css::uno::Reference<css::frame::XDispatch> mxReadOnlyModeDispatch;
bool mbIsDocumentReadOnly;
- SfxSplitWindow* mpSplitWindow;
+ VclPtr<SfxSplitWindow> mpSplitWindow;
/** When the user moves the splitter then we remember the
width at that time.
*/
diff --git a/sfx2/source/sidebar/SidebarPanelBase.cxx b/sfx2/source/sidebar/SidebarPanelBase.cxx
index a1b54dba617e..fdaaeb4aae67 100644
--- a/sfx2/source/sidebar/SidebarPanelBase.cxx
+++ b/sfx2/source/sidebar/SidebarPanelBase.cxx
@@ -67,7 +67,7 @@ SidebarPanelBase::SidebarPanelBase (
if (xMultiplexer.is())
xMultiplexer->addContextChangeEventListener(this, mxFrame->getController());
}
- if (mpControl != NULL)
+ if (mpControl != nullptr)
{
mpControl->SetBackground(Theme::GetWallpaper(Theme::Paint_PanelBackground));
mpControl->Show();
@@ -81,11 +81,7 @@ SidebarPanelBase::~SidebarPanelBase (void)
void SAL_CALL SidebarPanelBase::disposing (void)
throw (css::uno::RuntimeException)
{
- if (mpControl != NULL)
- {
- delete mpControl;
- mpControl = NULL;
- }
+ mpControl.clear();
if (mxFrame.is())
{
@@ -104,7 +100,7 @@ void SAL_CALL SidebarPanelBase::notifyContextChangeEvent (
throw (css::uno::RuntimeException, std::exception)
{
IContextChangeReceiver* pContextChangeReceiver
- = dynamic_cast<IContextChangeReceiver*>(mpControl);
+ = dynamic_cast<IContextChangeReceiver*>(mpControl.get());
if (pContextChangeReceiver != NULL)
{
const EnumContext aContext(
@@ -161,7 +157,7 @@ Reference<accessibility::XAccessible> SAL_CALL SidebarPanelBase::createAccessibl
Reference<awt::XWindow> SAL_CALL SidebarPanelBase::getWindow (void)
throw(css::uno::RuntimeException, std::exception)
{
- if (mpControl != NULL)
+ if (mpControl != nullptr)
return Reference<awt::XWindow>(
mpControl->GetComponentInterface(),
UNO_QUERY);
@@ -176,7 +172,7 @@ ui::LayoutSize SAL_CALL SidebarPanelBase::getHeightForWidth (const sal_Int32 nWi
return maLayoutSize;
else
{
- ILayoutableWindow* pLayoutableWindow = dynamic_cast<ILayoutableWindow*>(mpControl);
+ ILayoutableWindow* pLayoutableWindow = dynamic_cast<ILayoutableWindow*>(mpControl.get());
if (isLayoutEnabled(mpControl))
{
@@ -186,7 +182,7 @@ ui::LayoutSize SAL_CALL SidebarPanelBase::getHeightForWidth (const sal_Int32 nWi
}
else if (pLayoutableWindow != NULL)
return pLayoutableWindow->GetHeightForWidth(nWidth);
- else if (mpControl != NULL)
+ else if (mpControl != nullptr)
{
const sal_Int32 nHeight (mpControl->GetSizePixel().Height());
return ui::LayoutSize(nHeight,nHeight,nHeight);
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index da1f7e269818..3ebd81948203 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -442,7 +442,7 @@ void SfxStatusBarControl::StateChanged
*/
{
- DBG_ASSERT( pBar != 0, "setting state to dangling StatusBar" );
+ DBG_ASSERT( pBar != nullptr, "setting state to dangling StatusBar" );
const SfxStringItem* pStr = PTR_CAST( SfxStringItem, pState );
if ( eState == SfxItemState::DEFAULT && pStr )
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index befb3c36d9aa..7b355d64b03c 100644
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -45,7 +45,7 @@ const sal_uInt32 IMAGELIST_COUNT = 4; // small, small-hi, large, large-hi
struct ToolBoxInf_Impl
{
- ToolBox* pToolBox;
+ VclPtr<ToolBox> pToolBox;
sal_uInt16 nFlags;
};
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index ca0694d51d2c..6afaec6536eb 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -186,13 +186,13 @@ svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const Reference< X
struct SfxToolBoxControl_Impl
{
- ToolBox* pBox;
+ VclPtr<ToolBox> pBox;
bool bShowString;
SfxTbxCtrlFactory* pFact;
sal_uInt16 nTbxId;
sal_uInt16 nSlotId;
- SfxPopupWindow* mpFloatingWindow;
- SfxPopupWindow* mpPopupWindow;
+ VclPtr<SfxPopupWindow> mpFloatingWindow;
+ VclPtr<SfxPopupWindow> mpPopupWindow;
Reference< XUIElement > mxUIElement;
DECL_LINK( WindowEventListener, VclSimpleEvent* );
@@ -207,10 +207,9 @@ IMPL_LINK( SfxToolBoxControl_Impl, WindowEventListener, VclSimpleEvent*, pEvent
{
vcl::Window* pWindow( static_cast<VclWindowEvent*>(pEvent)->GetWindow() );
if (( pWindow == mpFloatingWindow ) &&
- ( mpPopupWindow != 0 ))
+ ( mpPopupWindow != nullptr ))
{
- delete mpPopupWindow;
- mpPopupWindow = 0;
+ mpPopupWindow.clear();
}
}
@@ -292,11 +291,8 @@ void SAL_CALL SfxToolBoxControl::dispose() throw (::com::sun::star::uno::Runtime
pImpl->mxUIElement = 0;
// Delete my popup windows
- delete pImpl->mpFloatingWindow;
- delete pImpl->mpPopupWindow;
-
- pImpl->mpFloatingWindow = 0;
- pImpl->mpPopupWindow = 0;
+ pImpl->mpFloatingWindow.clear();
+ pImpl->mpPopupWindow.clear();
}
@@ -866,9 +862,9 @@ IMPL_LINK_NOARG(SfxToolBoxControl, PopupModeEndHdl)
{
// Replace floating window with popup window and destroy
// floating window instance.
- delete pImpl->mpFloatingWindow;
+ pImpl->mpFloatingWindow.clear();
pImpl->mpFloatingWindow = pImpl->mpPopupWindow;
- pImpl->mpPopupWindow = 0;
+ pImpl->mpPopupWindow.clear();
// We also need to know when the user tries to use the
// floating window.
pImpl->mpFloatingWindow->AddEventListener( LINK( pImpl, SfxToolBoxControl_Impl, WindowEventListener ));
@@ -877,7 +873,7 @@ IMPL_LINK_NOARG(SfxToolBoxControl, PopupModeEndHdl)
{
// Popup window has been closed by the user. No replacement, instance
// will destroy itself.
- pImpl->mpPopupWindow = 0;
+ pImpl->mpPopupWindow.clear();
}
return 1;
@@ -903,7 +899,7 @@ void SfxToolBoxControl::StateChanged
const SfxPoolItem* pState
)
{
- DBG_ASSERT( pImpl->pBox != 0, "setting state to dangling ToolBox" );
+ DBG_ASSERT( pImpl->pBox != nullptr, "setting state to dangling ToolBox" );
if ( GetId() >= SID_OBJECTMENU0 && GetId() <= SID_OBJECTMENU_LAST )
return;
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 4b3696887b3e..c65bc7bc532b 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -93,7 +93,7 @@ void SfxFrame::Construct_Impl()
SfxFrame::~SfxFrame()
{
RemoveTopFrame_Impl( this );
- DELETEZ( pWindow );
+ pWindow.clear();
SfxFrameArr_Impl::iterator it = std::find( pFramesArr_Impl->begin(), pFramesArr_Impl->end(), this );
if ( it != pFramesArr_Impl->end() )
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index 0c21681aeaf9..f03d12ed07a9 100644
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -345,7 +345,7 @@ SystemWindow* SfxFrame::GetSystemWindow() const
SystemWindow* SfxFrame::GetTopWindow_Impl() const
{
if ( pImp->pExternalContainerWindow->IsSystemWindow() )
- return static_cast<SystemWindow*>( pImp->pExternalContainerWindow );
+ return static_cast<SystemWindow*>( pImp->pExternalContainerWindow.get() );
else
return NULL;
}
diff --git a/sfx2/source/view/impframe.hxx b/sfx2/source/view/impframe.hxx
index 5f1aaae8e4fc..271ef70c1d45 100644
--- a/sfx2/source/view/impframe.hxx
+++ b/sfx2/source/view/impframe.hxx
@@ -41,17 +41,17 @@ public:
SfxViewFrame* pCurrentViewFrame;
SfxFrameDescriptor* pDescr;
sal_uInt16 nLocks;
- bool bClosing : 1;
- bool bPrepClosing : 1;
- bool bInCancelTransfers : 1;
- bool bOwnsBindings : 1;
- bool bReleasingComponent : 1;
- bool bInPlace : 1;
+ bool bClosing : 1;
+ bool bPrepClosing : 1;
+ bool bInCancelTransfers : 1;
+ bool bOwnsBindings : 1;
+ bool bReleasingComponent : 1;
+ bool bInPlace : 1;
SfxFrame* pFrame;
SfxWorkWindow* pWorkWin;
SvBorder aBorder;
// formerly SfxTopFrame
- vcl::Window* pExternalContainerWindow;
+ VclPtr<vcl::Window> pExternalContainerWindow;
bool bHidden;
bool bLockResize;
bool bMenuBarOn;
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index 129d03c5e8ce..0f8bfdc47f85 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -35,9 +35,9 @@ struct SfxViewFrame_Impl
OUString aActualURL;
SfxFrame& rFrame;
svtools::AsynchronLink* pReloader;
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
SfxViewFrame* pActiveChild;
- vcl::Window* pFocusWin;
+ VclPtr<vcl::Window> pFocusWin;
sal_uInt16 nDocViewNo;
sal_uInt16 nCurViewId;
bool bResizeInToOut:1;
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index 2f6867387afb..635ccf0bf89f 100644
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -235,7 +235,7 @@ SfxPrintOptionsDialog::~SfxPrintOptionsDialog()
void SfxPrintOptionsDialog::dispose()
{
delete pDlgImpl;
- delete pPage;
+ pPage.clear();
delete pOptions;
ModalDialog::dispose();
}
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 9f160d7615e9..bf696c4b1949 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1451,7 +1451,7 @@ void SfxBaseController::ShowInfoBars( )
SfxInfoBarWindow* pInfoBar = pViewFrame->AppendInfoBar( "checkout", SfxResId( STR_NONCHECKEDOUT_DOCUMENT ) );
if (pInfoBar)
{
- PushButton* pBtn = new PushButton( &pViewFrame->GetWindow(), SfxResId( BT_CHECKOUT ) );
+ VclPtrInstance<PushButton> pBtn( &pViewFrame->GetWindow(), SfxResId( BT_CHECKOUT ) );
pBtn->SetClickHdl( LINK( this, SfxBaseController, CheckOutHandler ) );
pInfoBar->addButton(pBtn);
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 5d7685af9fbb..f61969f753da 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1369,7 +1369,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
SfxInfoBarWindow* pInfoBar = AppendInfoBar("readonly", SfxResId(STR_READONLY_DOCUMENT));
if (pInfoBar)
{
- PushButton* pBtn = new PushButton( &GetWindow(), SfxResId(BT_READONLY_EDIT));
+ VclPtrInstance<PushButton> pBtn( &GetWindow(), SfxResId(BT_READONLY_EDIT));
pBtn->SetClickHdl(LINK(this, SfxViewFrame, SwitchReadOnlyHandler));
pInfoBar->addButton(pBtn);
}
@@ -1489,7 +1489,7 @@ SfxViewFrame::~SfxViewFrame()
// The Bindings delete the Frame!
KillDispatcher_Impl();
- delete pImp->pWindow;
+ pImp->pWindow.clear();
if ( GetFrame().GetCurrentViewFrame() == this )
GetFrame().SetCurrentViewFrame_Impl( NULL );
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 34716d67aabe..71ff494c5ab0 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -411,9 +411,9 @@ class SfxDialogExecutor_Impl
{
private:
SfxViewShell* _pViewSh;
- PrinterSetupDialog* _pSetupParent;
+ VclPtr<PrinterSetupDialog> _pSetupParent;
SfxItemSet* _pOptions;
- bool _bHelpDisabled;
+ bool _bHelpDisabled;
DECL_LINK( Execute, void * );
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx
index bdb57ac37288..efbd225715f8 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -126,8 +126,8 @@ class SmElementsDockingWindow : public SfxDockingWindow
{
static const sal_uInt16 aCategories[];
- SmElementsControl* mpElementsControl;
- ListBox* mpElementListBox;
+ VclPtr<SmElementsControl> mpElementsControl;
+ VclPtr<ListBox> mpElementListBox;
virtual void Resize() SAL_OVERRIDE;
SmViewShell* GetView();
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 970edddd18e0..9a0bb75b3bdb 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -52,15 +52,15 @@ void SetFontStyle(const OUString &rStyleName, vcl::Font &rFont);
class SmPrintOptionsTabPage : public SfxTabPage
{
- CheckBox* m_pTitle;
- CheckBox* m_pText;
- CheckBox* m_pFrame;
- RadioButton* m_pSizeNormal;
- RadioButton* m_pSizeScaled;
- RadioButton* m_pSizeZoomed;
- MetricField* m_pZoom;
- CheckBox* m_pNoRightSpaces;
- CheckBox* m_pSaveOnlyUsedSymbols;
+ VclPtr<CheckBox> m_pTitle;
+ VclPtr<CheckBox> m_pText;
+ VclPtr<CheckBox> m_pFrame;
+ VclPtr<RadioButton> m_pSizeNormal;
+ VclPtr<RadioButton> m_pSizeScaled;
+ VclPtr<RadioButton> m_pSizeZoomed;
+ VclPtr<MetricField> m_pZoom;
+ VclPtr<CheckBox> m_pNoRightSpaces;
+ VclPtr<CheckBox> m_pSaveOnlyUsedSymbols;
DECL_LINK(SizeButtonClickHdl, Button *);
@@ -71,6 +71,8 @@ public:
static SfxTabPage* Create(vcl::Window *pWindow, const SfxItemSet &rSet);
SmPrintOptionsTabPage(vcl::Window *pParent, const SfxItemSet &rOptions);
+ virtual ~SmPrintOptionsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
};
/**************************************************************************/
@@ -90,11 +92,11 @@ public:
class SmFontDialog : public ModalDialog
{
- ComboBox* m_pFontBox;
- VclContainer* m_pAttrFrame;
- CheckBox* m_pBoldCheckBox;
- CheckBox* m_pItalicCheckBox;
- SmShowFont* m_pShowFont;
+ VclPtr<ComboBox> m_pFontBox;
+ VclPtr<VclContainer> m_pAttrFrame;
+ VclPtr<CheckBox> m_pBoldCheckBox;
+ VclPtr<CheckBox> m_pItalicCheckBox;
+ VclPtr<SmShowFont> m_pShowFont;
vcl::Font Face;
@@ -108,6 +110,8 @@ class SmFontDialog : public ModalDialog
public:
SmFontDialog(vcl::Window * pParent, OutputDevice *pFntListDevice, bool bHideCheckboxes);
+ virtual ~SmFontDialog();
+ virtual void dispose() SAL_OVERRIDE;
const vcl::Font& GetFont() const { return Face; }
void SetFont(const vcl::Font &rFont);
@@ -117,18 +121,20 @@ public:
class SmFontSizeDialog : public ModalDialog
{
- MetricField* m_pBaseSize;
- MetricField* m_pTextSize;
- MetricField* m_pIndexSize;
- MetricField* m_pFunctionSize;
- MetricField* m_pOperatorSize;
- MetricField* m_pBorderSize;
- PushButton* m_pDefaultButton;
+ VclPtr<MetricField> m_pBaseSize;
+ VclPtr<MetricField> m_pTextSize;
+ VclPtr<MetricField> m_pIndexSize;
+ VclPtr<MetricField> m_pFunctionSize;
+ VclPtr<MetricField> m_pOperatorSize;
+ VclPtr<MetricField> m_pBorderSize;
+ VclPtr<PushButton> m_pDefaultButton;
DECL_LINK(DefaultButtonClickHdl, Button *);
public:
SmFontSizeDialog(vcl::Window *pParent);
+ virtual ~SmFontSizeDialog();
+ virtual void dispose() SAL_OVERRIDE;
void ReadFrom(const SmFormat &rFormat);
void WriteTo (SmFormat &rFormat) const;
@@ -138,15 +144,15 @@ public:
class SmFontTypeDialog : public ModalDialog
{
- SmFontPickListBox* m_pVariableFont;
- SmFontPickListBox* m_pFunctionFont;
- SmFontPickListBox* m_pNumberFont;
- SmFontPickListBox* m_pTextFont;
- SmFontPickListBox* m_pSerifFont;
- SmFontPickListBox* m_pSansFont;
- SmFontPickListBox* m_pFixedFont;
- MenuButton* m_pMenuButton;
- PushButton* m_pDefaultButton;
+ VclPtr<SmFontPickListBox> m_pVariableFont;
+ VclPtr<SmFontPickListBox> m_pFunctionFont;
+ VclPtr<SmFontPickListBox> m_pNumberFont;
+ VclPtr<SmFontPickListBox> m_pTextFont;
+ VclPtr<SmFontPickListBox> m_pSerifFont;
+ VclPtr<SmFontPickListBox> m_pSansFont;
+ VclPtr<SmFontPickListBox> m_pFixedFont;
+ VclPtr<MenuButton> m_pMenuButton;
+ VclPtr<PushButton> m_pDefaultButton;
OutputDevice *pFontListDev;
@@ -156,6 +162,8 @@ class SmFontTypeDialog : public ModalDialog
public:
SmFontTypeDialog(vcl::Window *pParent, OutputDevice *pFntListDevice);
+ virtual ~SmFontTypeDialog();
+ virtual void dispose() SAL_OVERRIDE;
void ReadFrom(const SmFormat &rFormat);
void WriteTo (SmFormat &rFormat) const;
@@ -194,19 +202,19 @@ public:
class SmDistanceDialog : public ModalDialog
{
- VclFrame* m_pFrame;
- FixedText* m_pFixedText1;
- MetricField* m_pMetricField1;
- FixedText* m_pFixedText2;
- MetricField* m_pMetricField2;
- FixedText* m_pFixedText3;
- MetricField* m_pMetricField3;
- CheckBox* m_pCheckBox1;
- FixedText* m_pFixedText4;
- MetricField* m_pMetricField4;
- MenuButton* m_pMenuButton;
- PushButton* m_pDefaultButton;
- FixedImage* m_pBitmap;
+ VclPtr<VclFrame> m_pFrame;
+ VclPtr<FixedText> m_pFixedText1;
+ VclPtr<MetricField> m_pMetricField1;
+ VclPtr<FixedText> m_pFixedText2;
+ VclPtr<MetricField> m_pMetricField2;
+ VclPtr<FixedText> m_pFixedText3;
+ VclPtr<MetricField> m_pMetricField3;
+ VclPtr<CheckBox> m_pCheckBox1;
+ VclPtr<FixedText> m_pFixedText4;
+ VclPtr<MetricField> m_pMetricField4;
+ VclPtr<MenuButton> m_pMenuButton;
+ VclPtr<PushButton> m_pDefaultButton;
+ VclPtr<FixedImage> m_pBitmap;
SmCategoryDesc *Categories[NOCATEGORIES];
sal_uInt16 nActiveCategory;
@@ -239,15 +247,17 @@ public:
class SmAlignDialog : public ModalDialog
{
- RadioButton* m_pLeft;
- RadioButton* m_pCenter;
- RadioButton* m_pRight;
- PushButton* m_pDefaultButton;
+ VclPtr<RadioButton> m_pLeft;
+ VclPtr<RadioButton> m_pCenter;
+ VclPtr<RadioButton> m_pRight;
+ VclPtr<PushButton> m_pDefaultButton;
DECL_LINK(DefaultButtonClickHdl, Button *);
public:
SmAlignDialog(vcl::Window *pParent);
+ virtual ~SmAlignDialog();
+ virtual void dispose() SAL_OVERRIDE;
void ReadFrom(const SmFormat &rFormat);
void WriteTo (SmFormat &rFormat) const;
@@ -257,7 +267,7 @@ public:
class SmShowSymbolSetWindow : public Control
{
- ScrollBar* m_pVScrollBar;
+ VclPtr<ScrollBar> m_pVScrollBar;
SymbolPtrVec_t aSymbolSet;
Link aSelectHdlLink;
Link aDblClickHdlLink;
@@ -278,6 +288,8 @@ class SmShowSymbolSetWindow : public Control
DECL_LINK( ScrollHdl, ScrollBar* );
public:
SmShowSymbolSetWindow(vcl::Window *pParent, WinBits nStyle);
+ virtual ~SmShowSymbolSetWindow();
+ virtual void dispose() SAL_OVERRIDE;
void setScrollbar(ScrollBar *pVScrollBar);
void calccols();
void SelectSymbol(sal_uInt16 nSymbol);
@@ -334,12 +346,12 @@ class SmSymDefineDialog;
class SmSymbolDialog : public ModalDialog
{
- ListBox* m_pSymbolSets;
- SmShowSymbolSet* m_pSymbolSetDisplay;
- FixedText* m_pSymbolName;
- SmShowSymbol* m_pSymbolDisplay;
- PushButton* m_pGetBtn;
- PushButton* m_pEditBtn;
+ VclPtr<ListBox> m_pSymbolSets;
+ VclPtr<SmShowSymbolSet> m_pSymbolSetDisplay;
+ VclPtr<FixedText> m_pSymbolName;
+ VclPtr<SmShowSymbol> m_pSymbolDisplay;
+ VclPtr<PushButton> m_pGetBtn;
+ VclPtr<PushButton> m_pEditBtn;
SmViewShell &rViewSh;
SmSymbolManager &rSymbolMgr;
@@ -365,6 +377,8 @@ class SmSymbolDialog : public ModalDialog
public:
SmSymbolDialog(vcl::Window * pParent, OutputDevice *pFntListDevice,
SmSymbolManager &rSymbolMgr, SmViewShell &rViewShell);
+ virtual ~SmSymbolDialog();
+ virtual void dispose() SAL_OVERRIDE;
bool SelectSymbolSet(const OUString &rSymbolSetName);
void SelectSymbol(sal_uInt16 nSymbolPos);
@@ -392,23 +406,23 @@ public:
class SmSymDefineDialog : public ModalDialog
{
- ComboBox* pOldSymbols;
- ComboBox* pOldSymbolSets;
- SvxShowCharSet* pCharsetDisplay;
- ComboBox* pSymbols;
- ComboBox* pSymbolSets;
- ListBox* pFonts;
- ListBox* pFontsSubsetLB;
- FontStyleBox* pStyles;
- FixedText* pOldSymbolName;
- SmShowChar* pOldSymbolDisplay;
- FixedText* pOldSymbolSetName;
- FixedText* pSymbolName;
- SmShowChar* pSymbolDisplay;
- FixedText* pSymbolSetName;
- PushButton* pAddBtn;
- PushButton* pChangeBtn;
- PushButton* pDeleteBtn;
+ VclPtr<ComboBox> pOldSymbols;
+ VclPtr<ComboBox> pOldSymbolSets;
+ VclPtr<SvxShowCharSet> pCharsetDisplay;
+ VclPtr<ComboBox> pSymbols;
+ VclPtr<ComboBox> pSymbolSets;
+ VclPtr<ListBox> pFonts;
+ VclPtr<ListBox> pFontsSubsetLB;
+ VclPtr<FontStyleBox> pStyles;
+ VclPtr<FixedText> pOldSymbolName;
+ VclPtr<SmShowChar> pOldSymbolDisplay;
+ VclPtr<FixedText> pOldSymbolSetName;
+ VclPtr<FixedText> pSymbolName;
+ VclPtr<SmShowChar> pSymbolDisplay;
+ VclPtr<FixedText> pSymbolSetName;
+ VclPtr<PushButton> pAddBtn;
+ VclPtr<PushButton> pChangeBtn;
+ VclPtr<PushButton> pDeleteBtn;
SmSymbolManager aSymbolMgrCopy,
&rSymbolMgr;
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index 2bd99c6c0465..acc384388452 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -54,9 +54,9 @@ class SmEditWindow : public vcl::Window, public DropTargetHelper
SmCmdBoxWindow &rCmdBox;
EditView *pEditView;
- ScrollBar *pHScrollBar,
- *pVScrollBar;
- ScrollBarBox *pScrollBox;
+ VclPtr<ScrollBar> pHScrollBar,
+ pVScrollBar;
+ VclPtr<ScrollBarBox> pScrollBox;
Idle aModifyIdle,
aCursorMoveIdle;
ESelection aOldSelection;
diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx
index 3b3f697890f7..1af665e78954 100644
--- a/starmath/inc/toolbox.hxx
+++ b/starmath/inc/toolbox.hxx
@@ -32,7 +32,7 @@ class SmToolBoxWindow : public SfxFloatingWindow
{
protected:
- ToolBox* m_pToolBoxCat;
+ VclPtr<ToolBox> m_pToolBoxCat;
sal_uInt16 m_nUnbinopsId;
sal_uInt16 m_nRelationsId;
sal_uInt16 m_nSetoperationsId;
@@ -42,8 +42,8 @@ protected:
sal_uInt16 m_nBracketsId;
sal_uInt16 m_nFormatId;
sal_uInt16 m_nMiscId;
- ToolBox *pToolBoxCmd;
- ToolBox *vToolBoxCategories[NUM_TBX_CATEGORIES];
+ VclPtr<ToolBox> pToolBoxCmd;
+ VclPtr<ToolBox> vToolBoxCategories[NUM_TBX_CATEGORIES];
ImageList *aImageLists [NUM_TBX_CATEGORIES + 1]; /* regular */
sal_uInt16 nActiveCategoryRID;
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 8a1fdade04cf..63d71eb2d8bc 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -216,7 +216,7 @@ public:
SmEditWindow& GetEditWindow()
{
- return static_cast<SmCmdBoxWindow *>(pWindow)->GetEditWindow();
+ return static_cast<SmCmdBoxWindow *>(pWindow.get())->GetEditWindow();
}
};
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 17e0738e4be8..0b472e2efae9 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -676,7 +676,8 @@ SmElementsDockingWindow::~SmElementsDockingWindow ()
void SmElementsDockingWindow::dispose()
{
- delete mpElementsControl;
+ mpElementsControl.clear();
+ mpElementListBox.clear();
SfxDockingWindow::dispose();
}
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index ddac5836432f..b626064647b4 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -70,7 +70,7 @@ class SmGraphicAccessible :
/// client id in the AccessibleEventNotifier queue
sal_uInt32 nClientId;
- SmGraphicWindow *pWin;
+ VclPtr<SmGraphicWindow> pWin;
SmGraphicAccessible( const SmGraphicAccessible & ) SAL_DELETED_FUNCTION;
SmGraphicAccessible & operator = ( const SmGraphicAccessible & ) SAL_DELETED_FUNCTION;
@@ -316,7 +316,7 @@ class SmEditAccessible :
{
OUString aAccName;
::accessibility::AccessibleTextHelper *pTextHelper;
- SmEditWindow *pWin;
+ VclPtr<SmEditWindow> pWin;
SmEditAccessible( const SmEditAccessible & ) SAL_DELETED_FUNCTION;
SmEditAccessible & operator = ( const SmEditAccessible & ) SAL_DELETED_FUNCTION;
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 93b66713ddc3..f000e7826210 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -177,6 +177,25 @@ SmPrintOptionsTabPage::SmPrintOptionsTabPage(vcl::Window *pParent, const SfxItem
Reset(&rOptions);
}
+SmPrintOptionsTabPage::~SmPrintOptionsTabPage()
+{
+ dispose();
+}
+
+void SmPrintOptionsTabPage::dispose()
+{
+ m_pTitle.clear();
+ m_pText.clear();
+ m_pFrame.clear();
+ m_pSizeNormal.clear();
+ m_pSizeScaled.clear();
+ m_pSizeZoomed.clear();
+ m_pZoom.clear();
+ m_pNoRightSpaces.clear();
+ m_pSaveOnlyUsedSymbols.clear();
+ SfxTabPage::dispose();
+}
+
bool SmPrintOptionsTabPage::FillItemSet(SfxItemSet* rSet)
{
@@ -366,6 +385,21 @@ SmFontDialog::SmFontDialog(vcl::Window * pParent, OutputDevice *pFntListDevice,
}
}
+SmFontDialog::~SmFontDialog()
+{
+ dispose();
+}
+
+void SmFontDialog::dispose()
+{
+ m_pFontBox.clear();
+ m_pAttrFrame.clear();
+ m_pBoldCheckBox.clear();
+ m_pItalicCheckBox.clear();
+ m_pShowFont.clear();
+ ModalDialog::dispose();
+}
+
namespace
{
void getColors(vcl::Window &rRef, ColorData &rBgCol, ColorData &rTxtCol)
@@ -441,6 +475,23 @@ SmFontSizeDialog::SmFontSizeDialog(vcl::Window * pParent)
m_pDefaultButton->SetClickHdl(LINK(this, SmFontSizeDialog, DefaultButtonClickHdl));
}
+SmFontSizeDialog::~SmFontSizeDialog()
+{
+ dispose();
+}
+
+void SmFontSizeDialog::dispose()
+{
+ m_pBaseSize.clear();
+ m_pTextSize.clear();
+ m_pIndexSize.clear();
+ m_pFunctionSize.clear();
+ m_pOperatorSize.clear();
+ m_pBorderSize.clear();
+ m_pDefaultButton.clear();
+ ModalDialog::dispose();
+}
+
void SmFontSizeDialog::ReadFrom(const SmFormat &rFormat)
{
@@ -538,6 +589,25 @@ SmFontTypeDialog::SmFontTypeDialog(vcl::Window * pParent, OutputDevice *pFntList
m_pMenuButton->GetPopupMenu()->SetSelectHdl(LINK(this, SmFontTypeDialog, MenuSelectHdl));
}
+SmFontTypeDialog::~SmFontTypeDialog()
+{
+ dispose();
+}
+
+void SmFontTypeDialog::dispose()
+{
+ m_pVariableFont.clear();
+ m_pFunctionFont.clear();
+ m_pNumberFont.clear();
+ m_pTextFont.clear();
+ m_pSerifFont.clear();
+ m_pSansFont.clear();
+ m_pFixedFont.clear();
+ m_pMenuButton.clear();
+ m_pDefaultButton.clear();
+ ModalDialog::dispose();
+}
+
void SmFontTypeDialog::ReadFrom(const SmFormat &rFormat)
{
SmModule *pp = SM_MOD();
@@ -898,6 +968,19 @@ void SmDistanceDialog::dispose()
{
for (int i = 0; i < NOCATEGORIES; i++)
DELETEZ(Categories[i]);
+ m_pFrame.clear();
+ m_pFixedText1.clear();
+ m_pMetricField1.clear();
+ m_pFixedText2.clear();
+ m_pMetricField2.clear();
+ m_pFixedText3.clear();
+ m_pMetricField3.clear();
+ m_pCheckBox1.clear();
+ m_pFixedText4.clear();
+ m_pMetricField4.clear();
+ m_pMenuButton.clear();
+ m_pDefaultButton.clear();
+ m_pBitmap.clear();
ModalDialog::dispose();
}
@@ -1001,6 +1084,19 @@ SmAlignDialog::SmAlignDialog(vcl::Window * pParent)
m_pDefaultButton->SetClickHdl(LINK(this, SmAlignDialog, DefaultButtonClickHdl));
}
+SmAlignDialog::~SmAlignDialog()
+{
+ dispose();
+}
+
+void SmAlignDialog::dispose()
+{
+ m_pLeft.clear();
+ m_pCenter.clear();
+ m_pRight.clear();
+ m_pDefaultButton.clear();
+ ModalDialog::dispose();
+}
void SmAlignDialog::ReadFrom(const SmFormat &rFormat)
{
@@ -1060,6 +1156,17 @@ SmShowSymbolSetWindow::SmShowSymbolSetWindow(vcl::Window *pParent, WinBits nStyl
SetTextColor( aTxtColor );
}
+SmShowSymbolSetWindow::~SmShowSymbolSetWindow()
+{
+ dispose();
+}
+
+void SmShowSymbolSetWindow::dispose()
+{
+ m_pVScrollBar.clear();
+ Control::dispose();
+}
+
Point SmShowSymbolSetWindow::OffsetPoint(const Point &rPoint) const
{
return Point(rPoint.X() + nXOffset, rPoint.Y() + nYOffset);
@@ -1501,6 +1608,21 @@ SmSymbolDialog::SmSymbolDialog(vcl::Window *pParent, OutputDevice *pFntListDevic
m_pGetBtn->SetClickHdl(LINK(this, SmSymbolDialog, GetClickHdl));
}
+SmSymbolDialog::~SmSymbolDialog()
+{
+ dispose();
+}
+
+void SmSymbolDialog::dispose()
+{
+ m_pSymbolSets.clear();
+ m_pSymbolSetDisplay.clear();
+ m_pSymbolName.clear();
+ m_pSymbolDisplay.clear();
+ m_pGetBtn.clear();
+ m_pEditBtn.clear();
+ ModalDialog::dispose();
+}
void SmSymbolDialog::InitColor_Impl()
{
@@ -2055,6 +2177,25 @@ SmSymDefineDialog::~SmSymDefineDialog()
void SmSymDefineDialog::dispose()
{
+ pSubsetMap.reset();
+ pOrigSymbol.reset();
+ pOldSymbols.clear();
+ pOldSymbolSets.clear();
+ pCharsetDisplay.clear();
+ pSymbols.clear();
+ pSymbolSets.clear();
+ pFonts.clear();
+ pFontsSubsetLB.clear();
+ pStyles.clear();
+ pOldSymbolName.clear();
+ pOldSymbolDisplay.clear();
+ pOldSymbolSetName.clear();
+ pSymbolName.clear();
+ pSymbolDisplay.clear();
+ pSymbolSetName.clear();
+ pAddBtn.clear();
+ pChangeBtn.clear();
+ pDeleteBtn.clear();
ModalDialog::dispose();
}
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 3d4ac23b99a3..dfd1595bdf1b 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -155,12 +155,10 @@ void SmEditWindow::dispose()
delete pEditView;
pEditView = NULL;
}
- delete pHScrollBar;
- pHScrollBar = NULL;
- delete pVScrollBar;
- pVScrollBar = NULL;
- delete pScrollBox;
- pScrollBox = NULL;
+
+ pHScrollBar.clear();
+ pVScrollBar.clear();
+ pScrollBox.clear();
vcl::Window::dispose();
}
diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx
index f396b5cf3d2d..0b514fdf2c06 100644
--- a/starmath/source/toolbox.cxx
+++ b/starmath/source/toolbox.cxx
@@ -147,9 +147,7 @@ void SmToolBoxWindow::dispose()
int i;
for (i = 0; i < NUM_TBX_CATEGORIES; ++i)
{
- ToolBox *pBox = vToolBoxCategories[i];
- delete pBox;
- vToolBoxCategories[i] = 0;
+ vToolBoxCategories[i].clear();
}
pToolBoxCmd = 0;
for (i = 0; i < NUM_TBX_CATEGORIES + 1; ++i)
@@ -157,6 +155,8 @@ void SmToolBoxWindow::dispose()
delete aImageLists[i];
aImageLists[i] = 0;
}
+ m_pToolBoxCat.clear();
+ pToolBoxCmd.clear();
SfxFloatingWindow::dispose();
}
@@ -363,7 +363,7 @@ SmToolBoxWrapper::SmToolBoxWrapper(vcl::Window *pParentWindow,
eChildAlignment = SfxChildAlignment::NOALIGNMENT;
pWindow = new SmToolBoxWindow(pBindings, this, pParentWindow);
- static_cast<SfxFloatingWindow *>(pWindow)->Initialize(pInfo);
+ static_cast<SfxFloatingWindow *>(pWindow.get())->Initialize(pInfo);
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 0f7fa5b11071..ee50e101fa07 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -906,7 +906,7 @@ SmCmdBoxWrapper::SmCmdBoxWrapper(vcl::Window *pParentWindow, sal_uInt16 nId,
// make window docked to the bottom initially (after first start)
eChildAlignment = SfxChildAlignment::BOTTOM;
- static_cast<SfxDockingWindow *>(pWindow)->Initialize(pInfo);
+ static_cast<SfxDockingWindow *>(pWindow.get())->Initialize(pInfo);
}
diff --git a/svtools/inc/vclxaccessibleheaderbar.hxx b/svtools/inc/vclxaccessibleheaderbar.hxx
index f283821e3b2a..c0d0fb15cd25 100644
--- a/svtools/inc/vclxaccessibleheaderbar.hxx
+++ b/svtools/inc/vclxaccessibleheaderbar.hxx
@@ -36,7 +36,7 @@ class VCLXAccessibleHeaderBar : public VCLXAccessibleComponent
{
public:
- HeaderBar* m_pHeadBar;
+ VclPtr<HeaderBar> m_pHeadBar;
virtual ~VCLXAccessibleHeaderBar();
virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) SAL_OVERRIDE;
diff --git a/svtools/inc/vclxaccessibleheaderbaritem.hxx b/svtools/inc/vclxaccessibleheaderbaritem.hxx
index 301036cb04b5..727c2e7a8177 100644
--- a/svtools/inc/vclxaccessibleheaderbaritem.hxx
+++ b/svtools/inc/vclxaccessibleheaderbaritem.hxx
@@ -25,6 +25,7 @@
#include <cppuhelper/implbase2.hxx>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
#include <vector>
@@ -53,7 +54,7 @@ class VCLXAccessibleHeaderBarItem : public AccessibleExtendedComponentHelper_
{
private:
VCLExternalSolarLock* m_pExternalLock;
- HeaderBar* m_pHeadBar;
+ VclPtr<HeaderBar> m_pHeadBar;
sal_Int32 m_nIndexInParent;
protected:
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 49fb3aa2e02f..6650cbd44e52 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -36,7 +36,7 @@
#define SCROLL_FLAGS (SCROLL_CLIP | SCROLL_NOCHILDREN)
-#define getDataWindow() (static_cast<BrowserDataWin*>(pDataWin))
+#define getDataWindow() (static_cast<BrowserDataWin*>(pDataWin.get()))
using namespace com::sun::star::accessibility::AccessibleEventId;
using namespace com::sun::star::accessibility::AccessibleTableModelChangeType;
@@ -153,10 +153,10 @@ void BrowseBox::dispose()
}
Hide();
- delete getDataWindow()->pHeaderBar;
- delete getDataWindow()->pCornerWin;
- delete pDataWin;
- delete pVScroll;
+ getDataWindow()->pHeaderBar.clear();
+ getDataWindow()->pCornerWin.clear();
+ pDataWin.clear();
+ pVScroll.clear();
aHScroll.disposeAndClear();
// free columns-space
@@ -596,7 +596,7 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
nMaxWidth -= getDataWindow()->bAutoSizeLastCol
? GetFieldRect(nItemId).Left()
: GetFrozenWidth();
- if ( static_cast<BrowserDataWin*>(pDataWin )->bAutoSizeLastCol || nWidth > (sal_uLong)nMaxWidth )
+ if ( static_cast<BrowserDataWin*>( pDataWin.get() )->bAutoSizeLastCol || nWidth > (sal_uLong)nMaxWidth )
{
nWidth = nMaxWidth > 16 ? nMaxWidth : nOldWidth;
nWidth = QueryColumnResize( nItemId, nWidth );
@@ -652,7 +652,7 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
getDataWindow()->Scroll( nWidth-nOldWidth, 0, aScrRect, SCROLL_FLAGS );
Rectangle aInvRect( nX, 0, nX + std::max( nWidth, (sal_uLong)nOldWidth ), USHRT_MAX );
Control::Invalidate( aInvRect, INVALIDATE_NOCHILDREN );
- static_cast<BrowserDataWin*>( pDataWin )->Invalidate( aInvRect );
+ static_cast<BrowserDataWin*>( pDataWin.get() )->Invalidate( aInvRect );
}
else
{
@@ -2255,7 +2255,7 @@ void BrowseBox::SetMode( BrowserMode nMode )
MultiSelection *pOldRowSel = bMultiSelection ? uRow.pSel : 0;
MultiSelection *pOldColSel = pColSel;
- delete pVScroll;
+ pVScroll.clear();
bThumbDragging = ( nMode & BROWSER_THUMBDRAGGING ) == BROWSER_THUMBDRAGGING;
bMultiSelection = ( nMode & BROWSER_MULTISELECTION ) == BROWSER_MULTISELECTION;
@@ -2286,7 +2286,7 @@ void BrowseBox::SetMode( BrowserMode nMode )
WB_VSCROLL | ( ( nMode & BROWSER_THUMBDRAGGING ) ? WB_DRAG : 0 );
pVScroll = ( nMode & BROWSER_TRACKING_TIPS ) == BROWSER_TRACKING_TIPS
? new BrowserScrollBar( this, nVScrollWinBits,
- static_cast<BrowserDataWin*>( pDataWin ) )
+ static_cast<BrowserDataWin*>( pDataWin.get() ) )
: new ScrollBar( this, nVScrollWinBits );
pVScroll->SetLineSize( 1 );
pVScroll->SetPageSize(1);
@@ -2307,7 +2307,7 @@ void BrowseBox::SetMode( BrowserMode nMode )
}
else
{
- DELETEZ(getDataWindow()->pHeaderBar);
+ getDataWindow()->pHeaderBar.clear();
}
@@ -2408,9 +2408,9 @@ BrowserHeader* BrowseBox::CreateHeaderBar( BrowseBox* pParent )
void BrowseBox::SetHeaderBar( BrowserHeader* pHeaderBar )
{
- delete static_cast<BrowserDataWin*>(pDataWin)->pHeaderBar;
- static_cast<BrowserDataWin*>( pDataWin )->pHeaderBar = pHeaderBar;
- static_cast<BrowserDataWin*>( pDataWin )->pHeaderBar->SetStartDragHdl( LINK( this, BrowseBox, StartDragHdl ) );
+ static_cast<BrowserDataWin*>( pDataWin.get() )->pHeaderBar.clear();
+ static_cast<BrowserDataWin*>( pDataWin.get() )->pHeaderBar = pHeaderBar;
+ static_cast<BrowserDataWin*>( pDataWin.get() )->pHeaderBar->SetStartDragHdl( LINK( this, BrowseBox, StartDragHdl ) );
}
long BrowseBox::GetTitleHeight() const
@@ -2418,7 +2418,7 @@ long BrowseBox::GetTitleHeight() const
long nHeight;
// ask the header bar for the text height (if possible), as the header bar's font is adjusted with
// our (and the header's) zoom factor
- HeaderBar* pHeaderBar = static_cast<BrowserDataWin*>( pDataWin )->pHeaderBar;
+ HeaderBar* pHeaderBar = static_cast<BrowserDataWin*>( pDataWin.get() )->pHeaderBar;
if ( pHeaderBar )
nHeight = pHeaderBar->GetTextHeight();
else
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index d931547c13c0..959191e108d6 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -30,7 +30,7 @@
using namespace ::com::sun::star::datatransfer;
-#define getDataWindow() (static_cast<BrowserDataWin*>(pDataWin))
+#define getDataWindow() (static_cast<BrowserDataWin*>(pDataWin.get()))
@@ -43,7 +43,7 @@ void BrowseBox::StartDrag( sal_Int8 /* _nAction */, const Point& /* _rPosPixel *
sal_Int8 BrowseBox::AcceptDrop( const AcceptDropEvent& _rEvt )
{
- BrowserDataWin* pDataWindow = static_cast<BrowserDataWin*>(pDataWin);
+ BrowserDataWin* pDataWindow = static_cast<BrowserDataWin*>(pDataWin.get());
AcceptDropEvent aTransformed( _rEvt );
aTransformed.maPosPixel = pDataWindow->ScreenToOutputPixel( OutputToScreenPixel( _rEvt.maPosPixel ) );
return pDataWindow->AcceptDrop( aTransformed );
@@ -53,7 +53,7 @@ sal_Int8 BrowseBox::AcceptDrop( const AcceptDropEvent& _rEvt )
sal_Int8 BrowseBox::ExecuteDrop( const ExecuteDropEvent& _rEvt )
{
- BrowserDataWin* pDataWindow = static_cast<BrowserDataWin*>(pDataWin);
+ BrowserDataWin* pDataWindow = static_cast<BrowserDataWin*>(pDataWin.get());
ExecuteDropEvent aTransformed( _rEvt );
aTransformed.maPosPixel = pDataWindow->ScreenToOutputPixel( OutputToScreenPixel( _rEvt.maPosPixel ) );
return pDataWindow->ExecuteDrop( aTransformed );
@@ -79,8 +79,8 @@ sal_Int8 BrowseBox::ExecuteDrop( const BrowserExecuteDropEvent& )
void* BrowseBox::implGetDataFlavors() const
{
- if (static_cast<BrowserDataWin*>(pDataWin)->bCallingDropCallback)
- return &static_cast<BrowserDataWin*>(pDataWin)->GetDataFlavorExVector();
+ if (static_cast<BrowserDataWin*>(pDataWin.get())->bCallingDropCallback)
+ return &static_cast<BrowserDataWin*>(pDataWin.get())->GetDataFlavorExVector();
return &GetDataFlavorExVector();
}
@@ -88,8 +88,8 @@ void* BrowseBox::implGetDataFlavors() const
bool BrowseBox::IsDropFormatSupported( SotClipboardFormatId _nFormat )
{
- if ( static_cast< BrowserDataWin* >( pDataWin )->bCallingDropCallback )
- return static_cast< BrowserDataWin* >( pDataWin )->IsDropFormatSupported( _nFormat );
+ if ( static_cast< BrowserDataWin* >( pDataWin.get() )->bCallingDropCallback )
+ return static_cast< BrowserDataWin* >( pDataWin.get() )->IsDropFormatSupported( _nFormat );
return DropTargetHelper::IsDropFormatSupported( _nFormat );
}
@@ -105,8 +105,8 @@ bool BrowseBox::IsDropFormatSupported( SotClipboardFormatId _nFormat ) const
bool BrowseBox::IsDropFormatSupported( const DataFlavor& _rFlavor )
{
- if ( static_cast< BrowserDataWin* >( pDataWin )->bCallingDropCallback )
- return static_cast< BrowserDataWin* >( pDataWin )->IsDropFormatSupported( _rFlavor );
+ if ( static_cast< BrowserDataWin* >( pDataWin.get() )->bCallingDropCallback )
+ return static_cast< BrowserDataWin* >( pDataWin.get() )->IsDropFormatSupported( _rFlavor );
return DropTargetHelper::IsDropFormatSupported( _rFlavor );
}
@@ -189,7 +189,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
// do we have a handle column?
bool bHandleCol = !pCols->empty() && (0 == (*pCols)[ 0 ]->GetId());
// do we have a header bar?
- bool bHeaderBar = (NULL != static_cast<BrowserDataWin&>(GetDataWindow()).pHeaderBar);
+ bool bHeaderBar = (NULL != static_cast<BrowserDataWin&>(GetDataWindow()).pHeaderBar.get());
if ( nTitleLines
&& ( !bHeaderBar
@@ -407,9 +407,9 @@ void BrowseBox::DrawCursor()
{
// on these platforms, the StarView focus works correctly
if ( bReallyHide )
- static_cast<Control*>(pDataWin)->HideFocus();
+ static_cast<Control*>(pDataWin.get())->HideFocus();
else
- static_cast<Control*>(pDataWin)->ShowFocus( aCursor );
+ static_cast<Control*>(pDataWin.get())->ShowFocus( aCursor );
}
else
{
@@ -623,7 +623,7 @@ void BrowseBox::Paint( const Rectangle& rRect )
BrowserColumn *pFirstCol = (*pCols)[ 0 ];
bool bHandleCol = pFirstCol && pFirstCol->GetId() == 0;
- bool bHeaderBar = getDataWindow()->pHeaderBar != NULL;
+ bool bHeaderBar = getDataWindow()->pHeaderBar.get() != NULL;
// draw delimitational lines
if ( !getDataWindow()->bNoHScroll )
@@ -1119,7 +1119,7 @@ void BrowseBox::UpdateScrollbars()
return;
// protect against recursion
- BrowserDataWin *pBDW = static_cast<BrowserDataWin*>( pDataWin );
+ BrowserDataWin *pBDW = static_cast<BrowserDataWin*>( pDataWin.get() );
if ( pBDW->bInUpdateScrollbars )
{
pBDW->bHadRecursion = true;
@@ -1258,7 +1258,7 @@ void BrowseBox::UpdateScrollbars()
getDataWindow()->pCornerWin->Show();
}
else
- DELETEZ( getDataWindow()->pCornerWin );
+ getDataWindow()->pCornerWin.clear();
// scroll headerbar, if necessary
if ( getDataWindow()->pHeaderBar )
@@ -1539,7 +1539,7 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt )
bResizing = false;
}
else
- MouseButtonUp( BrowserMouseEvent( static_cast<BrowserDataWin*>(pDataWin),
+ MouseButtonUp( BrowserMouseEvent( static_cast<BrowserDataWin*>(pDataWin.get()),
MouseEvent( Point( rEvt.GetPosPixel().X(),
rEvt.GetPosPixel().Y() - pDataWin->GetPosPixel().Y() ),
rEvt.GetClicks(), rEvt.GetMode(), rEvt.GetButtons(),
diff --git a/svtools/source/brwbox/brwhead.cxx b/svtools/source/brwbox/brwhead.cxx
index e3758a98c177..6cfbf57c9134 100644
--- a/svtools/source/brwbox/brwhead.cxx
+++ b/svtools/source/brwbox/brwhead.cxx
@@ -36,6 +36,18 @@ BrowserHeader::BrowserHeader( BrowseBox* pParent, WinBits nWinBits )
}
+BrowserHeader::~BrowserHeader()
+{
+ dispose();
+}
+
+void BrowserHeader::dispose()
+{
+ _pBrowseBox.clear();
+ HeaderBar::dispose();
+}
+
+
void BrowserHeader::Command( const CommandEvent& rCEvt )
{
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index 4faea385bf09..682595a00b7c 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -237,6 +237,9 @@ void BrowserDataWin::dispose()
for ( size_t i = 0, n = aInvalidRegion.size(); i < n; ++i )
delete aInvalidRegion[ i ];
aInvalidRegion.clear();
+ pHeaderBar.clear();
+ pEventWin.clear();
+ pCornerWin.clear();
Control::dispose();
}
@@ -727,7 +730,16 @@ void BrowserDataWin::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )
Window::Invalidate( rRect, nFlags );
}
+BrowserScrollBar::~BrowserScrollBar()
+{
+ dispose();
+}
+void BrowserScrollBar::dispose()
+{
+ _pDataWin.clear();
+ ScrollBar::dispose();
+}
void BrowserScrollBar::Tracking( const TrackingEvent& rTEvt )
{
diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx
index b4fd34b0ff16..08f2432dd1a6 100644
--- a/svtools/source/brwbox/datwin.hxx
+++ b/svtools/source/brwbox/datwin.hxx
@@ -103,9 +103,9 @@ class BrowserDataWin
,public DropTargetHelper
{
public:
- BrowserHeader* pHeaderBar; // only for BROWSER_HEADERBAR_NEW
- vcl::Window* pEventWin; // Window of forwarded events
- ScrollBarBox* pCornerWin; // Window in the corner btw the ScrollBars
+ VclPtr<BrowserHeader> pHeaderBar; // only for BROWSER_HEADERBAR_NEW
+ VclPtr<vcl::Window> pEventWin; // Window of forwarded events
+ VclPtr<ScrollBarBox> pCornerWin; // Window in the corner btw the ScrollBars
bool bInDtor;
AutoTimer aMouseTimer; // recalls MouseMove on dragging out
MouseEvent aRepeatEvt; // a MouseEvent to repeat
@@ -197,7 +197,7 @@ class BrowserScrollBar: public ScrollBar
{
sal_uLong _nTip;
sal_uLong _nLastPos;
- BrowserDataWin* _pDataWin;
+ VclPtr<BrowserDataWin> _pDataWin;
public:
BrowserScrollBar( vcl::Window* pParent, WinBits nStyle,
@@ -207,6 +207,8 @@ public:
_nLastPos( ULONG_MAX ),
_pDataWin( pDataWin )
{}
+ virtual ~BrowserScrollBar();
+ virtual void dispose() SAL_OVERRIDE;
//ScrollBar( vcl::Window* pParent, const ResId& rResId );
virtual void Tracking( const TrackingEvent& rTEvt ) SAL_OVERRIDE;
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index b078375ef2ce..532e3409dba4 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -254,7 +254,7 @@ namespace svt
void CheckBoxControl::dispose()
{
- delete pBox;
+ pBox.clear();
Control::dispose();
}
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 597ce9433aa4..1dc9adf8f4ac 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -195,7 +195,9 @@ namespace svt
if (nCellModifiedEvent)
Application::RemoveUserEvent(nCellModifiedEvent);
- delete pCheckBoxPaint;
+ pCheckBoxPaint.clear();
+ m_pFocusWhileRequest.clear();
+ pHeader.clear();
BrowseBox::dispose();
}
@@ -256,7 +258,7 @@ namespace svt
if (IsEditing())
{
EnableAndShow();
- if (!aController->GetWindow().HasFocus() && (m_pFocusWhileRequest == Application::GetFocusWindow()))
+ if (!aController->GetWindow().HasFocus() && (m_pFocusWhileRequest.get() == Application::GetFocusWindow()))
aController->GetWindow().GrabFocus();
}
return 0;
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index e36c2f513041..accd044b9e50 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -168,7 +168,7 @@ private:
Reference< XCommandEnvironment > mxCmdEnv;
::osl::Mutex maMutex;
- HeaderBar* mpHeaderBar;
+ VclPtr<HeaderBar> mpHeaderBar;
SvtFileView_Impl* mpParent;
Timer maResetQuickSearch;
OUString maQuickSearchText;
@@ -406,7 +406,7 @@ class SvtFileView_Impl :public ::svt::IEnumerationResultHandler
,public ITimeoutHandler
{
protected:
- SvtFileView* mpAntiImpl;
+ VclPtr<SvtFileView> mpAntiImpl;
Link m_aSelectHandler;
::rtl::Reference< ::svt::FileViewContentEnumerator >
@@ -424,7 +424,7 @@ public:
::std::vector< SortingData_Impl* > maContent;
::osl::Mutex maMutex;
- ViewTabListBox_Impl* mpView;
+ VclPtr<ViewTabListBox_Impl> mpView;
NameTranslator_Impl* mpNameTrans;
sal_uInt16 mnSortColumn;
bool mbAscending : 1;
@@ -642,7 +642,7 @@ void ViewTabListBox_Impl::dispose()
{
maResetQuickSearch.Stop();
- delete mpHeaderBar;
+ mpHeaderBar.clear();
SvHeaderTabListBox::dispose();
}
@@ -2334,6 +2334,17 @@ QueryDeleteDlg_Impl::QueryDeleteDlg_Impl(vcl::Window* pParent, const OUString& r
set_secondary_text(get_secondary_text().replaceFirst("%s", rName));
}
+QueryDeleteDlg_Impl::~QueryDeleteDlg_Impl()
+{
+ dispose();
+}
+
+void QueryDeleteDlg_Impl::dispose()
+{
+ m_pAllButton.clear();
+ MessageDialog::dispose();
+}
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index 71a175195db1..c17497f5acb8 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -179,14 +179,14 @@ class SvxIconChoiceCtrl_Impl
Point aDDLastRectPos;
Point aDDPaintOffs;
Point aDDStartPos;
- SvtIconChoiceCtrl* pView;
+ VclPtr<SvtIconChoiceCtrl> pView;
IcnCursor_Impl* pImpCursor;
IcnGridMap_Impl* pGridMap;
long nMaxVirtWidth; // max. width aVirtOutputSize for ALIGN_TOP
long nMaxVirtHeight; // max. height aVirtOutputSize for ALIGN_LEFT
SvxIconChoiceCtrlEntryList_impl* pZOrderList;
SvxIconChoiceCtrlColumnInfoMap* pColumns;
- IcnViewEdit_Impl* pEdit;
+ VclPtr<IcnViewEdit_Impl> pEdit;
WinBits nWinBits;
long nMaxBoundHeight; // height of highest BoundRects
sal_uInt16 nFlags;
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 9f26c98ca2d3..1afc9e3120f1 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -157,7 +157,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl()
{
pCurEditedEntry = 0;
- DELETEZ(pEdit);
+ pEdit.clear();
Clear();
StopEditTimer();
CancelUserEvents();
@@ -3127,7 +3127,7 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry )
return;
StopEntryEditing( true );
- DELETEZ(pEdit);
+ pEdit.clear();
SetNoSelection();
pCurEditedEntry = pEntry;
diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx
index aab0683c85dd..61e9bd2a70f7 100644
--- a/svtools/source/contnr/simptabl.cxx
+++ b/svtools/source/contnr/simptabl.cxx
@@ -31,6 +31,17 @@ SvSimpleTableContainer::SvSimpleTableContainer(vcl::Window* pParent, WinBits nBi
{
}
+SvSimpleTableContainer::~SvSimpleTableContainer()
+{
+ dispose();
+}
+
+void SvSimpleTableContainer::dispose()
+{
+ m_pTable.clear();
+ Control::dispose();
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvSimpleTableContainer(vcl::Window *pParent,
VclBuilder::stringmap &)
{
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index a48a8cbbcf50..afb886d1993c 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -503,7 +503,7 @@ namespace svt
{
struct SvHeaderTabListBoxImpl
{
- HeaderBar* m_pHeaderBar;
+ VclPtr<HeaderBar> m_pHeaderBar;
AccessibleFactoryAccess m_aFactoryAccess;
SvHeaderTabListBoxImpl() : m_pHeaderBar( NULL ) { }
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 37e08bb37a1a..ae35ee1fd6a5 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -166,7 +166,7 @@ SvInplaceEdit2::~SvInplaceEdit2()
Application::RemoveAccel( &aAccReturn );
Application::RemoveAccel( &aAccEscape );
}
- delete pEdit;
+ pEdit.clear();
}
OUString SvInplaceEdit2::GetSavedValue() const
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index a0d1c0682bb6..02a8e135cf13 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -2189,10 +2189,10 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine,
class ImplCFieldFloatWin : public FloatingWindow
{
private:
- Calendar* mpCalendar;
- PushButton* mpTodayBtn;
- PushButton* mpNoneBtn;
- FixedLine* mpFixedLine;
+ VclPtr<Calendar> mpCalendar;
+ VclPtr<PushButton> mpTodayBtn;
+ VclPtr<PushButton> mpNoneBtn;
+ VclPtr<FixedLine> mpFixedLine;
public:
ImplCFieldFloatWin( vcl::Window* pParent );
@@ -2229,9 +2229,10 @@ ImplCFieldFloatWin::~ImplCFieldFloatWin()
void ImplCFieldFloatWin::dispose()
{
- delete mpTodayBtn;
- delete mpNoneBtn;
- delete mpFixedLine;
+ mpTodayBtn.clear();
+ mpNoneBtn.clear();
+ mpFixedLine.clear();
+ mpCalendar.clear();
FloatingWindow::dispose();
}
@@ -2257,11 +2258,7 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( bool bEnable )
}
else
{
- if ( mpTodayBtn )
- {
- delete mpTodayBtn;
- mpTodayBtn = NULL;
- }
+ mpTodayBtn.clear();
}
return mpTodayBtn;
@@ -2289,11 +2286,7 @@ PushButton* ImplCFieldFloatWin::EnableNoneBtn( bool bEnable )
}
else
{
- if ( mpNoneBtn )
- {
- delete mpNoneBtn;
- mpNoneBtn = NULL;
- }
+ mpNoneBtn.clear();
}
return mpNoneBtn;
@@ -2357,11 +2350,7 @@ void ImplCFieldFloatWin::ArrangeButtons()
}
else
{
- if ( mpFixedLine )
- {
- delete mpFixedLine;
- mpFixedLine = NULL;
- }
+ mpFixedLine.clear();
}
}
@@ -2399,11 +2388,10 @@ CalendarField::~CalendarField()
void CalendarField::dispose()
{
- if ( mpFloatWin )
- {
- delete mpCalendar;
- delete mpFloatWin;
- }
+ mpCalendar.clear();
+ mpFloatWin.clear();
+ mpTodayBtn.clear();
+ mpNoneBtn.clear();
DateField::dispose();
}
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 826038018245..7f39ff6a30fb 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -91,13 +91,13 @@ class SvtMatchContext_Impl: public salhelper::Thread
{
static ::osl::Mutex* pDirMutex;
- std::vector<OUString> aPickList;
- std::vector<OUString> aCompletions;
- std::vector<OUString> aURLs;
+ std::vector<OUString> aPickList;
+ std::vector<OUString> aCompletions;
+ std::vector<OUString> aURLs;
svtools::AsynchronLink aLink;
OUString aBaseURL;
OUString aText;
- SvtURLBox* pBox;
+ VclPtr<SvtURLBox> pBox;
bool bOnlyDirectories;
bool bNoSelection;
diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index 9e40446eb02f..6a5e20bdd6c2 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -51,8 +51,8 @@ namespace svt
class RoadmapItem : public RoadmapTypes
{
private:
- IDLabel* mpID;
- HyperLabel* mpDescription;
+ VclPtr<IDLabel> mpID;
+ VclPtr<HyperLabel> mpDescription;
const Size m_aItemPlayground;
public:
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index ab6e8d0c49ba..f39c1b748b58 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -328,13 +328,13 @@ IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl)
struct TabBar_Impl
{
- std::unique_ptr<ImplTabSizer> mpSizer;
- std::unique_ptr<ImplTabButton> mpFirstButton;
- std::unique_ptr<ImplTabButton> mpPrevButton;
- std::unique_ptr<ImplTabButton> mpNextButton;
- std::unique_ptr<ImplTabButton> mpLastButton;
- std::unique_ptr<TabBarEdit> mpEdit;
- ImplTabBarList mpItemList;
+ VclPtr<ImplTabSizer> mpSizer;
+ VclPtr<ImplTabButton> mpFirstButton;
+ VclPtr<ImplTabButton> mpPrevButton;
+ VclPtr<ImplTabButton> mpNextButton;
+ VclPtr<ImplTabButton> mpLastButton;
+ VclPtr<TabBarEdit> mpEdit;
+ ImplTabBarList mpItemList;
svt::AccessibleFactoryAccess maAccessibleFactory;
@@ -355,6 +355,12 @@ struct TabBar_Impl
delete mpItemList[i];
}
mpItemList.clear();
+
+ mpPrevBtn.disposeAndClear();
+ mpNextBtn.disposeAndClear();
+ mpFirstBtn.disposeAndClear();
+ mpLastBtn.disposeAndClear();
+ mpEdit.disposeAndClear();
}
sal_uInt16 getItemSize()
@@ -378,6 +384,7 @@ TabBar::~TabBar()
void TabBar::dispose()
{
EndEditMode( true );
+ mpImpl.reset();
Window::dispose();
}
@@ -661,9 +668,7 @@ void TabBar::ImplInitControls()
mpImpl->mpSizer->Show();
}
else
- {
- mpImpl->mpSizer.reset();
- }
+ mpImpl->mpSizer.disposeAndClear();
Link aLink = LINK( this, TabBar, ImplClickHdl );
@@ -687,8 +692,8 @@ void TabBar::ImplInitControls()
}
else
{
- mpImpl->mpPrevButton.reset();
- mpImpl->mpNextButton.reset();
+ mpImpl->mpPrevButton.disposeAndClear();
+ mpImpl->mpNextButton.disposeAndClear();
}
if ( mnWinStyle & WB_SCROLL )
@@ -711,8 +716,8 @@ void TabBar::ImplInitControls()
}
else
{
- mpImpl->mpFirstButton.reset();
- mpImpl->mpLastButton.reset();
+ mpImpl->mpFirstButton.disposeAndClear();
+ mpImpl->mpLastButton.disposeAndClear();
}
mbHasInsertTab = (mnWinStyle & WB_INSERTTAB);
@@ -2268,7 +2273,8 @@ void TabBar::EndEditMode( bool bCancel )
else
{
// close edit and call end hdl
- mpImpl->mpEdit.reset();
+ mpImpl->mpEdit.disposeAndClear();
+
EndRenaming();
mnEditId = 0;
}
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 39ced9f0f453..1cf6fc5b1100 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -129,7 +129,7 @@ ToolbarMenuEntry::~ToolbarMenuEntry()
xComponent->dispose();
mxAccContext.clear();
}
- delete mpControl;
+ mpControl.clear();
}
@@ -292,7 +292,7 @@ Reference< XAccessible > ToolbarMenu_Impl::getAccessibleChild( Control* pControl
for( int nEntry = 0; nEntry < nEntryCount; nEntry++ )
{
ToolbarMenuEntry* pEntry = maEntryVector[nEntry];
- if( pEntry && (pEntry->mpControl == pControl) )
+ if( pEntry && (pEntry->mpControl.get() == pControl) )
{
return pEntry->getAccessibleChild( childIndex );
}
@@ -393,7 +393,7 @@ void ToolbarMenu_Impl::notifyHighlightedEntry()
{
sal_Int32 nChildIndex = 0;
// todo: if other controls than ValueSet are allowed, addapt this code
- ValueSet* pValueSet = dynamic_cast< ValueSet* >( pEntry->mpControl );
+ ValueSet* pValueSet = dynamic_cast< ValueSet* >( pEntry->mpControl.get() );
if( pValueSet )
nChildIndex = static_cast< sal_Int32 >( pValueSet->GetItemPos( pValueSet->GetSelectItemId() ) );
@@ -874,7 +874,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight )
{
if( !bHighlight )
{
- ValueSet* pValueSet = dynamic_cast< ValueSet* >( pEntry->mpControl );
+ ValueSet* pValueSet = dynamic_cast< ValueSet* >( pEntry->mpControl.get() );
if( pValueSet )
{
pValueSet->SetNoSelection();
@@ -1577,7 +1577,7 @@ public:
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
- ToolbarMenu* mpMenu;
+ VclPtr<ToolbarMenu> mpMenu;
};
@@ -1594,7 +1594,7 @@ ToolbarMenuStatusListener::ToolbarMenuStatusListener(
void SAL_CALL ToolbarMenuStatusListener::dispose() throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- mpMenu = 0;
+ mpMenu.clear();
svt::FrameStatusListener::dispose();
}
diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx
index 8029dea5b303..727221b9d688 100644
--- a/svtools/source/control/toolbarmenuimp.hxx
+++ b/svtools/source/control/toolbarmenuimp.hxx
@@ -76,7 +76,7 @@ public:
OUString maText;
Image maImage;
- Control* mpControl;
+ VclPtr<Control> mpControl;
Rectangle maRect;
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > mxAccContext;
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index f552ee5d030c..8bf34c828c85 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -755,7 +755,7 @@ void ValueSetAcc::ThrowIfDisposed (void)
}
else
{
- DBG_ASSERT (mpParent!=NULL, "ValueSetAcc not disposed but mpParent == NULL");
+ DBG_ASSERT (mpParent!=nullptr, "ValueSetAcc not disposed but mpParent == NULL");
}
}
diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx
index d04207434810..fc19f7155898 100644
--- a/svtools/source/control/valueimp.hxx
+++ b/svtools/source/control/valueimp.hxx
@@ -105,7 +105,7 @@ public:
// XComponent
virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { WeakComponentImplHelperBase::dispose(); }
+ { mpParent.clear(); WeakComponentImplHelperBase::dispose(); }
virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ WeakComponentImplHelperBase::addEventListener(xListener); }
virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
@@ -156,7 +156,7 @@ public:
private:
::std::vector< ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessibleEventListener > > mxEventListeners;
- ValueSet* mpParent;
+ VclPtr<ValueSet> mpParent;
bool mbIsTransientChildrenDisabled;
/// The current FOCUSED state.
bool mbIsFocused;
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index b4461747aab5..0539d5bdb21b 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -79,6 +79,22 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Pla
}
}
+PlaceEditDialog::~PlaceEditDialog()
+{
+ dispose();
+}
+
+void PlaceEditDialog::dispose()
+{
+ m_pEDServerName.clear();
+ m_pLBServerType.clear();
+ m_pEDUsername.clear();
+ m_pBTOk.clear();
+ m_pBTCancel.clear();
+ m_pBTDelete.clear();
+ ModalDialog::dispose();
+}
+
OUString PlaceEditDialog::GetServerUrl()
{
OUString sUrl;
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 050cf49b4ee3..65cc4af04b2c 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -739,6 +739,10 @@ void AssignmentPersistentData::ImplCommit()
void AddressBookSourceDialog::dispose()
{
delete m_pImpl;
+ m_pDatasource.clear();
+ m_pAdministrateDatasources.clear();
+ m_pTable.clear();
+ m_pFieldScroller.clear();
ModalDialog::dispose();
}
diff --git a/svtools/source/dialogs/colrdlg.cxx b/svtools/source/dialogs/colrdlg.cxx
index 232aaf42e9b8..96ad7da2c80b 100644
--- a/svtools/source/dialogs/colrdlg.cxx
+++ b/svtools/source/dialogs/colrdlg.cxx
@@ -29,6 +29,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <svtools/colrdlg.hxx>
+#include <vcl/window.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx
index f824d9c48992..77d6fcffca1f 100644
--- a/svtools/source/dialogs/prnsetup.cxx
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -252,6 +252,14 @@ void PrinterSetupDialog::dispose()
{
ImplFreePrnDlgListBox(m_pLbName, false);
delete mpTempPrinter;
+ mpTempPrinter = NULL;
+ m_pLbName.clear();
+ m_pBtnProperties.clear();
+ m_pBtnOptions.clear();
+ m_pFiStatus.clear();
+ m_pFiType.clear();
+ m_pFiLocation.clear();
+ m_pFiComment.clear();
ModalDialog::dispose();
}
diff --git a/svtools/source/dialogs/restartdialog.cxx b/svtools/source/dialogs/restartdialog.cxx
index d116d9b1bfc2..282553b606c5 100644
--- a/svtools/source/dialogs/restartdialog.cxx
+++ b/svtools/source/dialogs/restartdialog.cxx
@@ -47,14 +47,21 @@ public:
btnYes_->SetClickHdl(LINK(this, RestartDialog, hdlYes));
btnNo_->SetClickHdl(LINK(this, RestartDialog, hdlNo));
}
-
+ virtual ~RestartDialog() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ reason_.clear();
+ btnYes_.clear();
+ btnNo_.clear();
+ ModalDialog::dispose();
+ }
private:
DECL_LINK(hdlYes, void *);
DECL_LINK(hdlNo, void *);
- vcl::Window * reason_;
- PushButton * btnYes_;
- PushButton * btnNo_;
+ VclPtr<vcl::Window> reason_;
+ VclPtr<PushButton> btnYes_;
+ VclPtr<PushButton> btnNo_;
};
IMPL_LINK_NOARG(RestartDialog, hdlYes) {
diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx
index 68291f9f1646..1c398cf4767c 100644
--- a/svtools/source/dialogs/roadmapwizard.cxx
+++ b/svtools/source/dialogs/roadmapwizard.cxx
@@ -55,7 +55,7 @@ namespace svt
struct RoadmapWizardImpl : public RoadmapWizardTypes
{
- ORoadmap* pRoadmap;
+ VclPtr<ORoadmap> pRoadmap;
Paths aPaths;
PathId nActivePath;
StateDescriptions aStateDescriptors;
@@ -69,11 +69,6 @@ namespace svt
{
}
- ~RoadmapWizardImpl()
- {
- delete pRoadmap;
- }
-
/// returns the index of the current state in given path, or -1
static sal_Int32 getStateIndexInPath( WizardTypes::WizardState _nState, const WizardPath& _rPath );
/// returns the index of the current state in the path with the given id, or -1
diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx
index 79ffe8649fe3..6cf4a62e5301 100644
--- a/svtools/source/dialogs/wizardmachine.cxx
+++ b/svtools/source/dialogs/wizardmachine.cxx
@@ -207,11 +207,11 @@ namespace svt
void OWizardMachine::dispose()
{
- delete m_pFinish;
- delete m_pCancel;
- delete m_pNextPage;
- delete m_pPrevPage;
- delete m_pHelp;
+ m_pFinish.clear();
+ m_pCancel.clear();
+ m_pNextPage.clear();
+ m_pPrevPage.clear();
+ m_pHelp.clear();
for (WizardState i=0; i<m_pImpl->nFirstUnknownPage; ++i)
delete GetPage(i);
diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx
index c38c6944678d..890cbc491d06 100644
--- a/svtools/source/dialogs/wizdlg.cxx
+++ b/svtools/source/dialogs/wizdlg.cxx
@@ -34,7 +34,7 @@
struct ImplWizPageData
{
ImplWizPageData* mpNext;
- TabPage* mpPage;
+ VclPtr<TabPage> mpPage;
};
@@ -42,7 +42,7 @@ struct ImplWizPageData
struct ImplWizButtonData
{
ImplWizButtonData* mpNext;
- Button* mpButton;
+ VclPtr<Button> mpButton;
long mnOffset;
};
@@ -378,6 +378,10 @@ void WizardDialog::dispose()
while ( mpFirstPage )
RemovePage( mpFirstPage->mpPage );
+ mpCurTabPage.clear();
+ mpPrevBtn.clear();
+ mpNextBtn.clear();
+ mpViewWindow.clear();
ModalDialog::dispose();
}
diff --git a/svtools/source/filter/GraphicExportOptionsDialog.cxx b/svtools/source/filter/GraphicExportOptionsDialog.cxx
index 3fe1d195a35a..da1f2d31a97b 100644
--- a/svtools/source/filter/GraphicExportOptionsDialog.cxx
+++ b/svtools/source/filter/GraphicExportOptionsDialog.cxx
@@ -43,6 +43,19 @@ GraphicExportOptionsDialog::GraphicExportOptionsDialog(vcl::Window* pWindow, con
updateResolution();
}
+GraphicExportOptionsDialog::~GraphicExportOptionsDialog()
+{
+ dispose();
+}
+
+void GraphicExportOptionsDialog::dispose()
+{
+ mpWidth.clear();
+ mpHeight.clear();
+ mpResolution.clear();
+ ModalDialog::dispose();
+}
+
void GraphicExportOptionsDialog::initialize()
{
mCurrentPage = mRenderer.getCurrentPageWriter();
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index 5c63ea853727..93019937a509 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -986,6 +986,39 @@ void ExportDialog::dispose()
{
delete mpFilterOptionsItem;
delete mpOptionsItem;
+ mpMfSizeX.clear();
+ mpLbSizeX.clear();
+ mpMfSizeY.clear();
+ mpFtResolution.clear();
+ mpNfResolution.clear();
+ mpLbResolution.clear();
+ mpColorDepth.clear();
+ mpLbColorDepth.clear();
+ mpJPGQuality.clear();
+ mpPNGCompression.clear();
+ mpSbCompression.clear();
+ mpNfCompression.clear();
+ mpMode.clear();
+ mpCbInterlaced.clear();
+ mpBMPCompression.clear();
+ mpCbRLEEncoding.clear();
+ mpDrawingObjects.clear();
+ mpCbSaveTransparency.clear();
+ mpEncoding.clear();
+ mpRbBinary.clear();
+ mpRbText.clear();
+ mpEPSGrid.clear();
+ mpCbEPSPreviewTIFF.clear();
+ mpCbEPSPreviewEPSI.clear();
+ mpRbEPSLevel1.clear();
+ mpRbEPSLevel2.clear();
+ mpRbEPSColorFormat1.clear();
+ mpRbEPSColorFormat2.clear();
+ mpRbEPSCompressionLZW.clear();
+ mpRbEPSCompressionNone.clear();
+ mpInfo.clear();
+ mpFtEstimatedSize.clear();
+ mpBtnOK.clear();
ModalDialog::dispose();
}
diff --git a/svtools/source/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx
index 8defef2bfd7f..4df7cdc0f5a3 100644
--- a/svtools/source/filter/exportdialog.hxx
+++ b/svtools/source/filter/exportdialog.hxx
@@ -53,49 +53,49 @@ private:
const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >&
mxSourceDocument;
- NumericField* mpMfSizeX;
- ListBox* mpLbSizeX;
- NumericField* mpMfSizeY;
- FixedText* mpFtResolution;
- NumericField* mpNfResolution;
- ListBox* mpLbResolution;
+ VclPtr<NumericField> mpMfSizeX;
+ VclPtr<ListBox> mpLbSizeX;
+ VclPtr<NumericField> mpMfSizeY;
+ VclPtr<FixedText> mpFtResolution;
+ VclPtr<NumericField> mpNfResolution;
+ VclPtr<ListBox> mpLbResolution;
- VclContainer* mpColorDepth;
- ListBox* mpLbColorDepth;
+ VclPtr<VclContainer> mpColorDepth;
+ VclPtr<ListBox> mpLbColorDepth;
- VclContainer* mpJPGQuality;
- VclContainer* mpPNGCompression;
+ VclPtr<VclContainer> mpJPGQuality;
+ VclPtr<VclContainer> mpPNGCompression;
- ScrollBar* mpSbCompression;
- NumericField* mpNfCompression;
+ VclPtr<ScrollBar> mpSbCompression;
+ VclPtr<NumericField> mpNfCompression;
- VclContainer* mpMode;
- CheckBox* mpCbInterlaced;
+ VclPtr<VclContainer> mpMode;
+ VclPtr<CheckBox> mpCbInterlaced;
- VclContainer* mpBMPCompression;
- CheckBox* mpCbRLEEncoding;
+ VclPtr<VclContainer> mpBMPCompression;
+ VclPtr<CheckBox> mpCbRLEEncoding;
- VclContainer* mpDrawingObjects;
- CheckBox* mpCbSaveTransparency;
+ VclPtr<VclContainer> mpDrawingObjects;
+ VclPtr<CheckBox> mpCbSaveTransparency;
- VclContainer* mpEncoding;
- RadioButton* mpRbBinary;
- RadioButton* mpRbText;
+ VclPtr<VclContainer> mpEncoding;
+ VclPtr<RadioButton> mpRbBinary;
+ VclPtr<RadioButton> mpRbText;
- VclContainer* mpEPSGrid;
- CheckBox* mpCbEPSPreviewTIFF;
- CheckBox* mpCbEPSPreviewEPSI;
- RadioButton* mpRbEPSLevel1;
- RadioButton* mpRbEPSLevel2;
- RadioButton* mpRbEPSColorFormat1;
- RadioButton* mpRbEPSColorFormat2;
- RadioButton* mpRbEPSCompressionLZW;
- RadioButton* mpRbEPSCompressionNone;
+ VclPtr<VclContainer> mpEPSGrid;
+ VclPtr<CheckBox> mpCbEPSPreviewTIFF;
+ VclPtr<CheckBox> mpCbEPSPreviewEPSI;
+ VclPtr<RadioButton> mpRbEPSLevel1;
+ VclPtr<RadioButton> mpRbEPSLevel2;
+ VclPtr<RadioButton> mpRbEPSColorFormat1;
+ VclPtr<RadioButton> mpRbEPSColorFormat2;
+ VclPtr<RadioButton> mpRbEPSCompressionLZW;
+ VclPtr<RadioButton> mpRbEPSCompressionNone;
- VclContainer* mpInfo;
- FixedText* mpFtEstimatedSize;
+ VclPtr<VclContainer> mpInfo;
+ VclPtr<FixedText> mpFtEstimatedSize;
- OKButton* mpBtnOK;
+ VclPtr<OKButton> mpBtnOK;
OUString msEstimatedSizePix1;
OUString msEstimatedSizePix2;
diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx
index dc1828d08642..f31e8d14c0ec 100644
--- a/svtools/source/hatchwindow/hatchwindow.cxx
+++ b/svtools/source/hatchwindow/hatchwindow.cxx
@@ -188,7 +188,7 @@ void SAL_CALL VCLXHatchWindow::setController( const uno::Reference< embed::XHatc
void SAL_CALL VCLXHatchWindow::dispose()
throw (uno::RuntimeException, std::exception)
{
- pHatchWindow = 0;
+ pHatchWindow.clear();
VCLXWindow::dispose();
}
diff --git a/svtools/source/inc/hatchwindow.hxx b/svtools/source/inc/hatchwindow.hxx
index b08e13ee0e14..1fb06de64531 100644
--- a/svtools/source/inc/hatchwindow.hxx
+++ b/svtools/source/inc/hatchwindow.hxx
@@ -31,7 +31,7 @@ class VCLXHatchWindow : public ::com::sun::star::embed::XHatchWindow,
{
::com::sun::star::uno::Reference< ::com::sun::star::embed::XHatchWindowController > m_xController;
::com::sun::star::awt::Size aHatchBorderSize;
- SvResizeWindow* pHatchWindow;
+ VclPtr<SvResizeWindow> pHatchWindow;
public:
VCLXHatchWindow();
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index 82683a5bca0e..4f0c79f5e3db 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -47,7 +47,7 @@ class ImpLBSelEng : public FunctionSet
{
SvImpLBox* pImp;
SelectionEngine* pSelEng;
- SvTreeListBox* pView;
+ VclPtr<SvTreeListBox> pView;
public:
ImpLBSelEng( SvImpLBox* pImp, SelectionEngine* pSelEng,
@@ -86,7 +86,7 @@ class SvImpLBox
friend class ImpLBSelEng;
friend class SvTreeListBox;
private:
- SvTreeListBox* pView;
+ VclPtr<SvTreeListBox> pView;
SvTreeList* pTree;
SvTreeListEntry* pCursor;
SvTreeListEntry* pStartEntry;
diff --git a/svtools/source/misc/dialogcontrolling.cxx b/svtools/source/misc/dialogcontrolling.cxx
index 987e841d01ce..b381c43d4bd7 100644
--- a/svtools/source/misc/dialogcontrolling.cxx
+++ b/svtools/source/misc/dialogcontrolling.cxx
@@ -50,7 +50,7 @@ namespace svt
struct DialogController_Data
{
vcl::Window& rInstigator;
- ::std::vector< vcl::Window* > aConcernedWindows;
+ ::std::vector< VclPtr<vcl::Window> > aConcernedWindows;
PWindowEventFilter pEventFilter;
PWindowOperator pOperator;
@@ -111,7 +111,7 @@ namespace svt
void DialogController::impl_updateAll( const VclWindowEvent& _rTriggerEvent )
{
- for ( ::std::vector< vcl::Window* >::iterator loop = m_pImpl->aConcernedWindows.begin();
+ for ( auto loop = m_pImpl->aConcernedWindows.begin();
loop != m_pImpl->aConcernedWindows.end();
++loop
)
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index a9a7607a5c93..6e556b569e38 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -261,10 +261,6 @@ namespace svt { namespace table
TableControl_Impl::~TableControl_Impl()
{
-
- DELETEZ( m_pVScroll );
- DELETEZ( m_pHScroll );
- DELETEZ( m_pScrollCorner );
DELETEZ( m_pTableFunctionSet );
DELETEZ( m_pSelEngine );
}
@@ -632,20 +628,20 @@ namespace svt { namespace table
}
- bool lcl_updateScrollbar( vcl::Window& _rParent, ScrollBar*& _rpBar,
+ bool lcl_updateScrollbar( vcl::Window& _rParent, VclPtr<ScrollBar>& _rpBar,
bool const i_needBar, long _nVisibleUnits,
long _nPosition, long _nLineSize, long _nRange,
bool _bHorizontal, const Link& _rScrollHandler )
{
// do we currently have the scrollbar?
- bool bHaveBar = _rpBar != NULL;
+ bool bHaveBar = _rpBar != nullptr;
// do we need to correct the scrollbar visibility?
if ( bHaveBar && !i_needBar )
{
if ( _rpBar->IsTracking() )
_rpBar->EndTracking();
- DELETEZ( _rpBar );
+ _rpBar.clear();
}
else if ( !bHaveBar && i_needBar )
{
@@ -1162,11 +1158,11 @@ namespace svt { namespace table
}
// the corner window connecting the two scrollbars in the lower right corner
- bool bHaveScrollCorner = NULL != m_pScrollCorner;
- bool bNeedScrollCorner = ( NULL != m_pHScroll ) && ( NULL != m_pVScroll );
+ bool bHaveScrollCorner = nullptr != m_pScrollCorner;
+ bool bNeedScrollCorner = ( nullptr != m_pHScroll ) && ( nullptr != m_pVScroll );
if ( bHaveScrollCorner && !bNeedScrollCorner )
{
- DELETEZ( m_pScrollCorner );
+ m_pScrollCorner.clear();
}
else if ( !bHaveScrollCorner && bNeedScrollCorner )
{
@@ -2111,7 +2107,7 @@ namespace svt { namespace table
}
// update the position at the vertical scrollbar
- if ( m_pVScroll != NULL )
+ if ( m_pVScroll != nullptr )
m_pVScroll->SetThumbPos( m_nTopRow );
}
@@ -2189,7 +2185,7 @@ namespace svt { namespace table
}
// update the position at the horizontal scrollbar
- if ( m_pHScroll != NULL )
+ if ( m_pHScroll != nullptr )
m_pHScroll->SetThumbPos( m_nLeftColumn );
}
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index 5fef6fdd4062..530823a44e1c 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -125,10 +125,10 @@ namespace svt { namespace table
::boost::scoped_ptr< TableDataWindow >
m_pDataWindow;
/// the vertical scrollbar, if any
- ScrollBar* m_pVScroll;
+ VclPtr<ScrollBar> m_pVScroll;
/// the horizontal scrollbar, if any
- ScrollBar* m_pHScroll;
- ScrollBarBox* m_pScrollCorner;
+ VclPtr<ScrollBar> m_pHScroll;
+ VclPtr<ScrollBarBox> m_pScrollCorner;
//selection engine - for determining selection range, e.g. single, multiple
SelectionEngine* m_pSelEngine;
//vector which contains the selected rows
diff --git a/svtools/source/toolpanel/paneltabbarpeer.cxx b/svtools/source/toolpanel/paneltabbarpeer.cxx
index 3a0c473732b1..4fd01f993999 100644
--- a/svtools/source/toolpanel/paneltabbarpeer.cxx
+++ b/svtools/source/toolpanel/paneltabbarpeer.cxx
@@ -64,7 +64,7 @@ namespace svt
Reference< XAccessibleContext > PanelTabBarPeer::CreateAccessibleContext()
{
SolarMutexGuard aSolarGuard;
- if ( m_pTabBar == NULL )
+ if ( m_pTabBar == nullptr )
throw DisposedException( OUString(), *this );
@@ -80,7 +80,7 @@ namespace svt
{
{
SolarMutexGuard aSolarGuard;
- m_pTabBar = NULL;
+ m_pTabBar.clear();
}
VCLXWindow::dispose();
}
diff --git a/svtools/source/toolpanel/paneltabbarpeer.hxx b/svtools/source/toolpanel/paneltabbarpeer.hxx
index 2c9601010208..9e0bc6709524 100644
--- a/svtools/source/toolpanel/paneltabbarpeer.hxx
+++ b/svtools/source/toolpanel/paneltabbarpeer.hxx
@@ -49,7 +49,7 @@ namespace svt
private:
AccessibleFactoryAccess m_aAccessibleFactory;
- PanelTabBar* m_pTabBar;
+ VclPtr<PanelTabBar> m_pTabBar;
};
diff --git a/svtools/source/toolpanel/toolpaneldeckpeer.cxx b/svtools/source/toolpanel/toolpaneldeckpeer.cxx
index 333fa43c10d0..76f15af12ca3 100644
--- a/svtools/source/toolpanel/toolpaneldeckpeer.cxx
+++ b/svtools/source/toolpanel/toolpaneldeckpeer.cxx
@@ -64,7 +64,7 @@ namespace svt
Reference< XAccessibleContext > ToolPanelDeckPeer::CreateAccessibleContext()
{
SolarMutexGuard aSolarGuard;
- if ( m_pDeck == NULL )
+ if ( m_pDeck == nullptr )
throw DisposedException( OUString(), *this );
vcl::Window* pAccessibleParent( m_pDeck->GetAccessibleParentWindow() );
@@ -78,7 +78,7 @@ namespace svt
{
{
SolarMutexGuard aSolarGuard;
- m_pDeck = NULL;
+ m_pDeck.clear();
}
VCLXWindow::dispose();
}
diff --git a/svtools/source/toolpanel/toolpaneldeckpeer.hxx b/svtools/source/toolpanel/toolpaneldeckpeer.hxx
index daa177000128..2ced30f50c4b 100644
--- a/svtools/source/toolpanel/toolpaneldeckpeer.hxx
+++ b/svtools/source/toolpanel/toolpaneldeckpeer.hxx
@@ -49,7 +49,7 @@ namespace svt
private:
AccessibleFactoryAccess m_aAccessibleFactory;
- ToolPanelDeck* m_pDeck;
+ VclPtr<ToolPanelDeck> m_pDeck;
};
diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx
index 1a9a8645ba50..7b6aba43a7c9 100644
--- a/svtools/source/uno/addrtempuno.cxx
+++ b/svtools/source/uno/addrtempuno.cxx
@@ -134,7 +134,7 @@ namespace {
if ( _nExecutionResult )
if ( m_pDialog )
- static_cast< AddressBookSourceDialog* >( m_pDialog )->getFieldMapping( m_aAliases );
+ static_cast< AddressBookSourceDialog* >( m_pDialog.get() )->getFieldMapping( m_aAliases );
}
void SAL_CALL OAddressBookSourceDialogUno::initialize(const Sequence< Any >& rArguments) throw(Exception, RuntimeException, std::exception)
diff --git a/svtools/source/uno/generictoolboxcontroller.cxx b/svtools/source/uno/generictoolboxcontroller.cxx
index 1c78816e63af..04e6203477a4 100644
--- a/svtools/source/uno/generictoolboxcontroller.cxx
+++ b/svtools/source/uno/generictoolboxcontroller.cxx
@@ -74,11 +74,9 @@ void SAL_CALL GenericToolboxController::dispose()
throw ( RuntimeException, std::exception )
{
SolarMutexGuard aSolarMutexGuard;
-
- svt::ToolboxController::dispose();
-
- m_pToolbox = 0;
+ m_pToolbox.clear();
m_nID = 0;
+ svt::ToolboxController::dispose();
}
void SAL_CALL GenericToolboxController::execute( sal_Int16 /*KeyModifier*/ )
diff --git a/svtools/source/uno/genericunodialog.cxx b/svtools/source/uno/genericunodialog.cxx
index b0186d2c8dc0..4026b669386e 100644
--- a/svtools/source/uno/genericunodialog.cxx
+++ b/svtools/source/uno/genericunodialog.cxx
@@ -313,8 +313,7 @@ void SAL_CALL OGenericUnoDialog::initialize( const Sequence< Any >& aArguments )
void OGenericUnoDialog::destroyDialog()
{
- delete m_pDialog;
- m_pDialog = NULL;
+ m_pDialog.clear();
}
diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx
index aa6277a81c07..1f4bfced3026 100644
--- a/svtools/source/uno/popupwindowcontroller.cxx
+++ b/svtools/source/uno/popupwindowcontroller.cxx
@@ -47,8 +47,8 @@ public:
DECL_STATIC_LINK( PopupWindowControllerImpl, AsyncDeleteWindowHdl, vcl::Window* );
private:
- vcl::Window* mpPopupWindow;
- ToolBox* mpToolBox;
+ VclPtr<vcl::Window> mpPopupWindow;
+ VclPtr<ToolBox> mpToolBox;
};
PopupWindowControllerImpl::PopupWindowControllerImpl()
@@ -99,7 +99,7 @@ IMPL_LINK( PopupWindowControllerImpl, WindowEventListener, VclSimpleEvent*, pEve
mpToolBox->CallEventListeners( VCLEVENT_DROPDOWN_OPEN, (void*)mpPopupWindow );
mpPopupWindow->CallEventListeners( VCLEVENT_WINDOW_GETFOCUS, 0 );
- svtools::ToolbarMenu* pToolbarMenu = dynamic_cast< svtools::ToolbarMenu* >( mpPopupWindow );
+ svtools::ToolbarMenu* pToolbarMenu = dynamic_cast< svtools::ToolbarMenu* >( mpPopupWindow.get() );
if( pToolbarMenu )
pToolbarMenu->highlightFirstEntry();
break;
diff --git a/svtools/source/uno/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx
index 870a34fcbc7c..fb6a7870f2a6 100644
--- a/svtools/source/uno/treecontrolpeer.hxx
+++ b/svtools/source/uno/treecontrolpeer.hxx
@@ -159,7 +159,7 @@ private:
TreeExpansionListenerMultiplexer maTreeExpansionListeners;
TreeEditListenerMultiplexer maTreeEditListeners;
bool mbIsRootDisplayed;
- UnoTreeListBoxImpl* mpTreeImpl;
+ VclPtr<UnoTreeListBoxImpl> mpTreeImpl;
sal_Int32 mnEditLock;
OUString msDefaultCollapsedGraphicURL;
OUString msDefaultExpandedGraphicURL;
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
index c9d4a8f7d8e3..20e44f65b0a7 100644
--- a/svtools/source/uno/wizard/unowizard.cxx
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -359,7 +359,7 @@ namespace {
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
- WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::enableButtons: invalid dialog implementation!" );
pWizardImpl->enableButtons( lcl_convertWizardButtonToWZB( i_WizardButton ), i_Enable );
@@ -371,7 +371,7 @@ namespace {
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
- WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::setDefaultButton: invalid dialog implementation!" );
pWizardImpl->defaultButton( lcl_convertWizardButtonToWZB( i_WizardButton ) );
@@ -383,7 +383,7 @@ namespace {
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
- WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::travelNext: invalid dialog implementation!" );
return pWizardImpl->travelNext();
@@ -395,7 +395,7 @@ namespace {
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
- WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::travelPrevious: invalid dialog implementation!" );
return pWizardImpl->travelPrevious();
@@ -407,7 +407,7 @@ namespace {
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
- WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::enablePage: invalid dialog implementation!" );
if ( !pWizardImpl->knowsPage( i_PageID ) )
@@ -425,7 +425,7 @@ namespace {
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
- WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::updateTravelUI: invalid dialog implementation!" );
pWizardImpl->updateTravelUI();
@@ -437,7 +437,7 @@ namespace {
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
- WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::advanceTo: invalid dialog implementation!" );
return pWizardImpl->advanceTo( i_PageId );
@@ -449,7 +449,7 @@ namespace {
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
- WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::goBackTo: invalid dialog implementation!" );
return pWizardImpl->goBackTo( i_PageId );
@@ -461,7 +461,7 @@ namespace {
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
- WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
ENSURE_OR_RETURN( pWizardImpl, "Wizard::getCurrentPage: invalid dialog implementation!", Reference< XWizardPage >() );
return pWizardImpl->getCurrentWizardPage();
@@ -476,7 +476,7 @@ namespace {
if ( ( i_PathIndex < 0 ) || ( i_PathIndex >= m_aWizardSteps.getLength() ) )
throw NoSuchElementException( OUString(), *this );
- WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::activatePath: invalid dialog implementation!" );
pWizardImpl->activatePath( i_PathIndex, i_Final );
diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx
index 19b6e72f67c6..17b4763f5a58 100644
--- a/svtools/source/uno/wizard/wizardshell.hxx
+++ b/svtools/source/uno/wizard/wizardshell.hxx
@@ -117,7 +117,7 @@ namespace svt { namespace uno
using WizardShell_Base::activatePath;
private:
- typedef ::std::map< TabPage*, PWizardPageController > Page2ControllerMap;
+ typedef ::std::map< VclPtr<TabPage>, PWizardPageController > Page2ControllerMap;
const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController;
const sal_Int16 m_nFirstPageID;
diff --git a/svx/inc/extrusiondepthdialog.hxx b/svx/inc/extrusiondepthdialog.hxx
index 46362d7ff4c5..48b932e44e18 100644
--- a/svx/inc/extrusiondepthdialog.hxx
+++ b/svx/inc/extrusiondepthdialog.hxx
@@ -31,10 +31,12 @@ namespace svx {
class ExtrusionDepthDialog : public ModalDialog
{
- MetricField* m_pMtrDepth;
+ VclPtr<MetricField> m_pMtrDepth;
public:
ExtrusionDepthDialog( vcl::Window* pParent, double fDepth, FieldUnit eDefaultUnit );
+ virtual ~ExtrusionDepthDialog();
+ virtual void dispose() SAL_OVERRIDE;
double getDepth() const;
};
diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index 5d1b8a90c469..299d03de1ff8 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -109,9 +109,9 @@ private:
SvtMiscOptions maMiscOptions;
Gallery* mpGallery;
GalleryTheme* mpCurTheme;
- GalleryIconView* mpIconView;
- GalleryListView* mpListView;
- GalleryPreview* mpPreview;
+ VclPtr<GalleryIconView> mpIconView;
+ VclPtr<GalleryListView> mpListView;
+ VclPtr<GalleryPreview> mpPreview;
VclPtr<GalleryToolBox> maViewBox;
VclPtr<FixedLine> maSeparator;
VclPtr<FixedText> maInfoBar;
diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index 9583d43f018e..f1b8aabb9b34 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -34,7 +34,7 @@ class _SdrItemBrowserControl: public BrowseBox
friend class ImpItemEdit;
std::vector<ImpItemListRow*> aList;
long nAktPaintRow;
- Edit* pEditControl;
+ VclPtr<Edit> pEditControl;
OUString aWNamMerk;
Link aEntryChangedHdl;
Link aSetDirtyHdl;
diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx
index dd97162222cb..8aa95e1e99f0 100644
--- a/svx/inc/tbunosearchcontrollers.hxx
+++ b/svx/inc/tbunosearchcontrollers.hxx
@@ -118,7 +118,7 @@ public:
private:
- FindTextFieldControl* m_pFindTextFieldControl;
+ VclPtr<FindTextFieldControl> m_pFindTextFieldControl;
sal_uInt16 m_nDownSearchId; // item position of findbar
sal_uInt16 m_nUpSearchId; // item position of findbar
@@ -220,7 +220,7 @@ public:
virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
private:
- CheckBox* m_pMatchCaseControl;
+ VclPtr<CheckBox> m_pMatchCaseControl;
};
class FindAllToolboxController : public svt::ToolboxController,
diff --git a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx
index 3be00eee0bf4..39e5511b23e0 100644
--- a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx
+++ b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx
@@ -19,6 +19,7 @@
#include <svx/AccessibleShapeTreeInfo.hxx>
+#include <vcl/window.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 12d983ad93b9..238a351d99d0 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -76,7 +76,7 @@ SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext(
mnClientId( 0 ),
mbDisposed( false )
{
- if (mpControl != NULL)
+ if (mpControl != nullptr)
{
mpModel = mpControl->GetSdrModel();
if (mpModel != NULL)
@@ -478,7 +478,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::grabFocus() throw( RuntimeException
{
::SolarMutexGuard aGuard;
- if( NULL == mpControl )
+ if( nullptr == mpControl )
throw DisposedException();
mpControl->GrabFocus();
@@ -729,7 +729,7 @@ Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBoxOnScreen( void ) throw( R
{
::SolarMutexGuard aGuard;
- if( NULL == mpControl )
+ if( nullptr == mpControl )
throw DisposedException();
return Rectangle(
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 4f79f3a4d715..535133608bb0 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -86,12 +86,13 @@ public:
class MaskSet : public ValueSet
{
- SvxBmpMask* pSvxBmpMask;
+ VclPtr<SvxBmpMask> pSvxBmpMask;
public:
MaskSet(SvxBmpMask* pMask, vcl::Window* pParent);
-
+ virtual ~MaskSet() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE { pSvxBmpMask.clear(); ValueSet::dispose(); }
virtual void Select() SAL_OVERRIDE;
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
@@ -162,7 +163,7 @@ void MaskSet::onEditColor()
class MaskData
{
- SvxBmpMask* pMask;
+ VclPtr<SvxBmpMask> pMask;
bool bIsReady;
bool bExecState;
SfxBindings& rBindings;
@@ -490,12 +491,28 @@ SvxBmpMask::~SvxBmpMask()
void SvxBmpMask::dispose()
{
- delete m_pQSet1;
- delete m_pQSet2;
- delete m_pQSet3;
- delete m_pQSet4;
- delete m_pCtlPipette;
+ m_pQSet1.clear();
+ m_pQSet2.clear();
+ m_pQSet3.clear();
+ m_pQSet4.clear();
+ m_pCtlPipette.clear();
delete pData;
+ m_pTbxPipette.clear();
+ m_pBtnExec.clear();
+ m_pCbx1.clear();
+ m_pSp1.clear();
+ m_pLbColor1.clear();
+ m_pCbx2.clear();
+ m_pSp2.clear();
+ m_pLbColor2.clear();
+ m_pCbx3.clear();
+ m_pSp3.clear();
+ m_pLbColor3.clear();
+ m_pCbx4.clear();
+ m_pSp4.clear();
+ m_pLbColor4.clear();
+ m_pCbxTrans.clear();
+ m_pLbColorTrans.clear();
SfxDockingWindow::dispose();
}
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index ad604f2bc7c1..b3e041eeed30 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -86,6 +86,22 @@ SvxContourDlg::SvxContourDlg(SfxBindings* _pBindings, SfxChildWindow* pCW,
{
}
+SvxContourDlg::~SvxContourDlg()
+{
+ dispose();
+}
+
+void SvxContourDlg::dispose()
+{
+ pSuperClass.clear();
+ SfxFloatingWindow::dispose();
+}
+
+void SvxContourDlg::SetSuperClass( SvxSuperContourDlg& rSuperClass )
+{
+ pSuperClass = &rSuperClass;
+}
+
tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
const Rectangle* pRect,
const sal_uIntPtr nFlags )
@@ -285,7 +301,10 @@ void SvxSuperContourDlg::dispose()
{
SvtMiscOptions aMiscOptions;
aMiscOptions.RemoveListenerLink( LINK(this, SvxSuperContourDlg, MiscHdl) );
- delete m_pContourWnd;
+ m_pContourWnd.clear();
+ m_pTbx1.clear();
+ m_pMtfTolerance.clear();
+ m_pStbStatus.clear();
SvxContourDlg::dispose();
}
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 336bfdc9268b..e8fc165edc79 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -65,6 +65,31 @@ CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, Graphic& r
Initialize();
}
+CompressGraphicsDialog::~CompressGraphicsDialog()
+{
+ dispose();
+}
+
+void CompressGraphicsDialog::dispose()
+{
+ m_pLabelGraphicType.clear();
+ m_pFixedText2.clear();
+ m_pFixedText3.clear();
+ m_pFixedText5.clear();
+ m_pFixedText6.clear();
+ m_pReduceResolutionCB.clear();
+ m_pMFNewWidth.clear();
+ m_pMFNewHeight.clear();
+ m_pResolutionLB.clear();
+ m_pLosslessRB.clear();
+ m_pJpegCompRB.clear();
+ m_pCompressionMF.clear();
+ m_pQualityMF.clear();
+ m_pBtnCalculate.clear();
+ m_pInterpolationCombo.clear();
+ ModalDialog::dispose();
+}
+
void CompressGraphicsDialog::Initialize()
{
get(m_pLabelGraphicType, "label-graphic-type");
diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx
index 13bc7be668ee..432f7b91aba7 100644
--- a/svx/source/dialog/contimp.hxx
+++ b/svx/source/dialog/contimp.hxx
@@ -42,10 +42,10 @@ class SvxSuperContourDlg : public SvxContourDlg
void* pUpdateEditingObject;
void* pCheckObj;
SvxContourDlgItem aContourItem;
- ToolBox* m_pTbx1;
- MetricField* m_pMtfTolerance;
- ContourWindow* m_pContourWnd;
- StatusBar* m_pStbStatus;
+ VclPtr<ToolBox> m_pTbx1;
+ VclPtr<MetricField> m_pMtfTolerance;
+ VclPtr<ContourWindow> m_pContourWnd;
+ VclPtr<StatusBar> m_pStbStatus;
sal_uIntPtr nGrfChanged;
bool bExecState;
bool bUpdateGraphicLinked;
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 0d2e53039841..ac7957d8061c 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -423,7 +423,12 @@ SvxTPView::~SvxTPView()
void SvxTPView::dispose()
{
- delete m_pViewData;
+ m_pViewData.clear();
+ m_pAccept.clear();
+ m_pReject.clear();
+ m_pAcceptAll.clear();
+ m_pRejectAll.clear();
+ m_pUndo.clear();
TabPage::dispose();
}
@@ -597,6 +602,35 @@ SvxTPFilter::SvxTPFilter( vcl::Window * pParent)
bModified=false;
}
+SvxTPFilter::~SvxTPFilter()
+{
+ dispose();
+}
+
+void SvxTPFilter::dispose()
+{
+ pRedlinTable.clear();
+ m_pCbDate.clear();
+ m_pLbDate.clear();
+ m_pDfDate.clear();
+ m_pTfDate.clear();
+ m_pIbClock.clear();
+ m_pFtDate2.clear();
+ m_pDfDate2.clear();
+ m_pTfDate2.clear();
+ m_pIbClock2.clear();
+ m_pCbAuthor.clear();
+ m_pLbAuthor.clear();
+ m_pCbRange.clear();
+ m_pEdRange.clear();
+ m_pBtnRange.clear();
+ m_pCbAction.clear();
+ m_pLbAction.clear();
+ m_pCbComment.clear();
+ m_pEdComment.clear();
+ TabPage::dispose();
+}
+
void SvxTPFilter::SetRedlinTable(SvxRedlinTable* pTable)
{
pRedlinTable=pTable;
@@ -963,7 +997,7 @@ void SvxTPFilter::DeactivatePage()
{
if(bModified)
{
- if(pRedlinTable!=NULL)
+ if(pRedlinTable!=nullptr)
{
pRedlinTable->SetFilterDate(IsDate());
pRedlinTable->SetDateTimeMode(GetDateMode());
@@ -1016,7 +1050,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF)
if(m_pDfDate->GetText().isEmpty())
m_pDfDate->SetDate(aDate);
- if(pRedlinTable!=NULL)
+ if(pRedlinTable!=nullptr)
pRedlinTable->SetFirstDate(m_pDfDate->GetDate());
}
else if (m_pDfDate2==pTF)
@@ -1024,7 +1058,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF)
if(m_pDfDate2->GetText().isEmpty())
m_pDfDate2->SetDate(aDate);
- if(pRedlinTable!=NULL)
+ if(pRedlinTable!=nullptr)
pRedlinTable->SetLastDate(m_pDfDate2->GetDate());
}
else if (m_pTfDate==pTF)
@@ -1032,7 +1066,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF)
if(m_pTfDate->GetText().isEmpty())
m_pTfDate->SetTime(aTime);
- if(pRedlinTable!=NULL)
+ if(pRedlinTable!=nullptr)
pRedlinTable->SetFirstTime(m_pTfDate->GetTime());
}
else if (m_pTfDate2==pTF)
@@ -1040,7 +1074,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF)
if(m_pTfDate2->GetText().isEmpty())
m_pTfDate2->SetTime(aTime);
- if(pRedlinTable!=NULL)
+ if(pRedlinTable!=nullptr)
pRedlinTable->SetLastTime(m_pTfDate2->GetTime());
}
@@ -1084,11 +1118,9 @@ SvxAcceptChgCtr::~SvxAcceptChgCtr()
void SvxAcceptChgCtr::dispose()
{
- delete pTPView;
- pTPView = NULL;
- delete pTPFilter;
- pTPFilter = NULL;
disposeBuilder();
+ pTPFilter.clear();
+ pTPView.clear();
TabControl::dispose();
}
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index f704de3a0cd1..9de79a90c576 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -666,6 +666,19 @@ SaveDialog::SaveDialog(vcl::Window* pParent, RecoveryCore* pCore)
}
}
+SaveDialog::~SaveDialog()
+{
+ dispose();
+}
+
+void SaveDialog::dispose()
+{
+ m_pTitleFT.clear();
+ m_pFileListLB.clear();
+ m_pOkBtn.clear();
+ Dialog::dispose();
+}
+
IMPL_LINK_NOARG(SaveDialog, OKButtonHdl)
{
// start crash-save with progress
@@ -696,6 +709,17 @@ SaveProgressDialog::SaveProgressDialog(vcl::Window* pParent, RecoveryCore* pCore
m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW);
}
+SaveProgressDialog::~SaveProgressDialog()
+{
+ dispose();
+}
+
+void SaveProgressDialog::dispose()
+{
+ m_pProgrParent.clear();
+ ModalDialog::dispose();
+}
+
short SaveProgressDialog::Execute()
{
::SolarMutexGuard aLock;
@@ -908,8 +932,12 @@ RecoveryDialog::~RecoveryDialog()
void RecoveryDialog::dispose()
{
- delete m_pFileListLB;
- m_pFileListLB = NULL;
+ m_pFileListLB.clear();
+ m_pTitleFT.clear();
+ m_pDescrFT.clear();
+ m_pProgrParent.clear();
+ m_pNextBtn.clear();
+ m_pCancelBtn.clear();
Dialog::dispose();
}
@@ -1240,6 +1268,21 @@ BrokenRecoveryDialog::BrokenRecoveryDialog(vcl::Window* pParent ,
impl_refresh();
}
+BrokenRecoveryDialog::~BrokenRecoveryDialog()
+{
+ dispose();
+}
+
+void BrokenRecoveryDialog::dispose()
+{
+ m_pFileListLB.clear();
+ m_pSaveDirED.clear();
+ m_pSaveDirBtn.clear();
+ m_pOkBtn.clear();
+ m_pCancelBtn.clear();
+ ModalDialog::dispose();
+}
+
void BrokenRecoveryDialog::impl_refresh()
{
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index 9a4777c516db..a2e705e144f0 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -163,8 +163,14 @@ SvxFontWorkChildWindow::SvxFontWorkChildWindow
SfxChildWindow( _pParent, nId )
{
+<<<<<<< HEAD
SvxFontWorkDialog* pDlg = new SvxFontWorkDialog(pBindings, this, _pParent);
pWindow = pDlg;
+=======
+ pWindow = new SvxFontWorkDialog( pBindings, this, _pParent,
+ SVX_RES( RID_SVXDLG_FONTWORK ) );
+ SvxFontWorkDialog* pDlg = static_cast<SvxFontWorkDialog*>(pWindow.get());
+>>>>>>> 765a16f... vclwidget: change all vcl::window fields to be wrapped in VclPtr
eChildAlignment = SfxChildAlignment::NOALIGNMENT;
@@ -243,7 +249,6 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx,
pCtrlItems[9] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWXVAL, *this, rBindings);
pCtrlItems[10] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWYVAL, *this, rBindings);
-<<<<<<< HEAD
Size aSize = m_pTbxStyle->CalcWindowSizePixel();
m_pTbxStyle->SetSizePixel(aSize);
m_pTbxStyle->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectStyleHdl_Impl) );
@@ -282,46 +287,6 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx,
}
m_pShadowColorLB->SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) );
-=======
- Size aSize = aTbxStyle->CalcWindowSizePixel();
- aTbxStyle->SetSizePixel(aSize);
- aTbxStyle->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectStyleHdl_Impl) );
-
- aTbxAdjust->SetSizePixel(aSize);
- aTbxAdjust->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectAdjustHdl_Impl) );
-
- aTbxShadow->SetSizePixel(aSize);
- aTbxShadow->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectShadowHdl_Impl) );
-
- Link aLink = LINK(this, SvxFontWorkDialog, ModifyInputHdl_Impl);
- aMtrFldDistance->SetModifyHdl( aLink );
- aMtrFldTextStart->SetModifyHdl( aLink );
- aMtrFldShadowX->SetModifyHdl( aLink );
- aMtrFldShadowY->SetModifyHdl( aLink );
-
- // Set System metric
- const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
- SetFieldUnit( *aMtrFldDistance.get(), eDlgUnit, true );
- SetFieldUnit( *aMtrFldTextStart.get(), eDlgUnit, true );
- SetFieldUnit( *aMtrFldShadowX.get(), eDlgUnit, true );
- SetFieldUnit( *aMtrFldShadowY.get(), eDlgUnit, true );
- if( eDlgUnit == FUNIT_MM )
- {
- aMtrFldDistance->SetSpinSize( 50 );
- aMtrFldTextStart->SetSpinSize( 50 );
- aMtrFldShadowX->SetSpinSize( 50 );
- aMtrFldShadowY->SetSpinSize( 50 );
- }
- else
- {
- aMtrFldDistance->SetSpinSize( 10 );
- aMtrFldTextStart->SetSpinSize( 10 );
- aMtrFldShadowX->SetSpinSize( 10 );
- aMtrFldShadowY->SetSpinSize( 10 );
- }
-
- aShadowColorLB->SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) );
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
aInputIdle.SetPriority(SchedulerPriority::LOWEST);
aInputIdle.SetIdleHdl(LINK(this, SvxFontWorkDialog, InputTimoutHdl_Impl));
@@ -406,16 +371,11 @@ void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem)
case XFT_SLANTY : nId = nStyleSlantYId; break;
default: ;//prevent warning
}
-<<<<<<< HEAD
m_pTbxStyle->Enable();
-=======
- aTbxStyle->Enable();
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
// Make sure that there is always exactly one checked toolbox item.
if ( pItem->GetValue() == XFT_NONE )
{
-<<<<<<< HEAD
m_pTbxStyle->CheckItem(nStyleRotateId, false);
m_pTbxStyle->CheckItem(nStyleUprightId, false);
m_pTbxStyle->CheckItem(nStyleSlantXId, false);
@@ -427,29 +387,12 @@ void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem)
{
m_pTbxStyle->CheckItem(nStyleOffId, false);
m_pTbxStyle->CheckItem(nId);
-=======
- aTbxStyle->CheckItem(TBI_STYLE_ROTATE, false);
- aTbxStyle->CheckItem(TBI_STYLE_UPRIGHT, false);
- aTbxStyle->CheckItem(TBI_STYLE_SLANTX, false);
- aTbxStyle->CheckItem(TBI_STYLE_SLANTY, false);
-
- aTbxStyle->CheckItem(TBI_STYLE_OFF, true);
- }
- else
- {
- aTbxStyle->CheckItem(TBI_STYLE_OFF, false);
- aTbxStyle->CheckItem(nId);
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
nLastStyleTbxId = nId;
}
else
-<<<<<<< HEAD
m_pTbxStyle->Disable();
-=======
- aTbxStyle->Disable();
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Set adjust buttons
@@ -460,7 +403,6 @@ void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem)
{
sal_uInt16 nId;
-<<<<<<< HEAD
m_pTbxAdjust->Enable();
m_pMtrFldDistance->Enable();
@@ -480,41 +422,14 @@ void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem)
if ( !m_pTbxAdjust->IsItemChecked(nId) )
{
m_pTbxAdjust->CheckItem(nId);
-=======
- aTbxAdjust->Enable();
- aMtrFldDistance->Enable();
-
- if ( pItem->GetValue() == XFT_LEFT || pItem->GetValue() == XFT_RIGHT )
- {
- if ( pItem->GetValue() == XFT_LEFT ) nId = TBI_ADJUST_LEFT;
- else nId = TBI_ADJUST_RIGHT;
- aMtrFldTextStart->Enable();
- }
- else
- {
- if ( pItem->GetValue() == XFT_CENTER ) nId = TBI_ADJUST_CENTER;
- else nId = TBI_ADJUST_AUTOSIZE;
- aMtrFldTextStart->Disable();
- }
-
- if ( !aTbxAdjust->IsItemChecked(nId) )
- {
- aTbxAdjust->CheckItem(nId);
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
nLastAdjustTbxId = nId;
}
else
{
-<<<<<<< HEAD
m_pTbxAdjust->Disable();
m_pMtrFldTextStart->Disable();
m_pMtrFldDistance->Disable();
-=======
- aTbxAdjust->Disable();
- aMtrFldTextStart->Disable();
- aMtrFldDistance->Disable();
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
@@ -523,15 +438,9 @@ void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem)
void SvxFontWorkDialog::SetDistance_Impl(const XFormTextDistanceItem* pItem)
{
// Use HasChildPathFocus() instead of HasFocus() at SpinFields
-<<<<<<< HEAD
if ( pItem && !m_pMtrFldDistance->HasChildPathFocus() )
{
SetMetricValue(*m_pMtrFldDistance, pItem->GetValue(), SFX_MAPUNIT_100TH_MM);
-=======
- if ( pItem && !aMtrFldDistance->HasChildPathFocus() )
- {
- SetMetricValue( *aMtrFldDistance.get(), pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
@@ -540,15 +449,9 @@ void SvxFontWorkDialog::SetDistance_Impl(const XFormTextDistanceItem* pItem)
void SvxFontWorkDialog::SetStart_Impl(const XFormTextStartItem* pItem)
{
// Use HasChildPathFocus() instead of HasFocus() at SpinFields
-<<<<<<< HEAD
if ( pItem && !m_pMtrFldTextStart->HasChildPathFocus() )
{
SetMetricValue(*m_pMtrFldTextStart, pItem->GetValue(), SFX_MAPUNIT_100TH_MM);
-=======
- if ( pItem && !aMtrFldTextStart->HasChildPathFocus() )
- {
- SetMetricValue( *aMtrFldTextStart.get(), pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
@@ -557,11 +460,7 @@ void SvxFontWorkDialog::SetStart_Impl(const XFormTextStartItem* pItem)
void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem)
{
if ( pItem )
-<<<<<<< HEAD
m_pTbxAdjust->CheckItem(nAdjustMirrorId, pItem->GetValue());
-=======
- aTbxAdjust->CheckItem(TBI_ADJUST_MIRROR, pItem->GetValue());
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Set button for contour display
@@ -569,11 +468,7 @@ void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem)
void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem)
{
if ( pItem )
-<<<<<<< HEAD
m_pTbxShadow->CheckItem(nShowFormId, !pItem->GetValue());
-=======
- aTbxShadow->CheckItem(TBI_SHOWFORM, !pItem->GetValue());
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Set button for text border
@@ -581,11 +476,7 @@ void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem)
void SvxFontWorkDialog::SetOutline_Impl(const XFormTextOutlineItem* pItem)
{
if ( pItem )
-<<<<<<< HEAD
m_pTbxShadow->CheckItem(nOutlineId, pItem->GetValue());
-=======
- aTbxShadow->CheckItem(TBI_OUTLINE, pItem->GetValue());
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Set shadow buttons
@@ -597,7 +488,6 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
{
sal_uInt16 nId;
-<<<<<<< HEAD
m_pTbxShadow->Enable();
if ( pItem->GetValue() == XFTSHADOW_NONE )
@@ -616,33 +506,12 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
m_pMtrFldShadowX->Enable();
m_pMtrFldShadowY->Enable();
m_pShadowColorLB->Enable();
-=======
- aTbxShadow->Enable();
-
- if ( pItem->GetValue() == XFTSHADOW_NONE )
- {
- nId = TBI_SHADOW_OFF;
- aFbShadowX->Hide();
- aFbShadowY->Hide();
- aMtrFldShadowX->Disable();
- aMtrFldShadowY->Disable();
- aShadowColorLB->Disable();
- }
- else
- {
- aFbShadowX->Show();
- aFbShadowY->Show();
- aMtrFldShadowX->Enable();
- aMtrFldShadowY->Enable();
- aShadowColorLB->Enable();
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
if ( pItem->GetValue() == XFTSHADOW_NORMAL )
{
nId = nShadowNormalId;
const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
-<<<<<<< HEAD
m_pMtrFldShadowX->SetUnit( eDlgUnit );
m_pMtrFldShadowX->SetDecimalDigits(2);
m_pMtrFldShadowX->SetMin(LONG_MIN);
@@ -665,30 +534,6 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
{
SetMetricValue(*m_pMtrFldShadowX, nSaveShadowX, SFX_MAPUNIT_100TH_MM);
SetMetricValue(*m_pMtrFldShadowY, nSaveShadowY, SFX_MAPUNIT_100TH_MM);
-=======
- aMtrFldShadowX->SetUnit( eDlgUnit );
- aMtrFldShadowX->SetDecimalDigits(2);
- aMtrFldShadowX->SetMin(LONG_MIN);
- aMtrFldShadowX->SetMax(LONG_MAX);
- if( eDlgUnit == FUNIT_MM )
- aMtrFldShadowX->SetSpinSize( 50 );
- else
- aMtrFldShadowX->SetSpinSize( 10 );
-
- aMtrFldShadowY->SetUnit( eDlgUnit );
- aMtrFldShadowY->SetDecimalDigits(2);
- aMtrFldShadowY->SetMin(LONG_MIN);
- aMtrFldShadowY->SetMax(LONG_MAX);
- if( eDlgUnit == FUNIT_MM )
- aMtrFldShadowY->SetSpinSize( 50 );
- else
- aMtrFldShadowY->SetSpinSize( 10 );
-
- if ( bRestoreValues )
- {
- SetMetricValue( *aMtrFldShadowX.get(), nSaveShadowX, SFX_MAPUNIT_100TH_MM );
- SetMetricValue( *aMtrFldShadowY.get(), nSaveShadowY, SFX_MAPUNIT_100TH_MM );
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
XFormTextShadowXValItem aXItem( nSaveShadowX );
XFormTextShadowYValItem aYItem( nSaveShadowY );
@@ -701,7 +546,6 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
{
nId = nShadowSlantId;
-<<<<<<< HEAD
m_pMtrFldShadowX->SetUnit(FUNIT_DEGREE);
m_pMtrFldShadowX->SetDecimalDigits(1);
m_pMtrFldShadowX->SetMin(-1800);
@@ -718,24 +562,6 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
{
m_pMtrFldShadowX->SetValue(nSaveShadowAngle);
m_pMtrFldShadowY->SetValue(nSaveShadowSize);
-=======
- aMtrFldShadowX->SetUnit(FUNIT_CUSTOM);
- aMtrFldShadowX->SetDecimalDigits(1);
- aMtrFldShadowX->SetMin(-1800);
- aMtrFldShadowX->SetMax( 1800);
- aMtrFldShadowX->SetSpinSize(10);
-
- aMtrFldShadowY->SetUnit(FUNIT_PERCENT);
- aMtrFldShadowY->SetDecimalDigits(0);
- aMtrFldShadowY->SetMin(-999);
- aMtrFldShadowY->SetMax( 999);
- aMtrFldShadowY->SetSpinSize(10);
-
- if ( bRestoreValues )
- {
- aMtrFldShadowX->SetValue(nSaveShadowAngle);
- aMtrFldShadowY->SetValue(nSaveShadowSize);
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
XFormTextShadowXValItem aXItem(nSaveShadowAngle);
XFormTextShadowYValItem aYItem(nSaveShadowSize);
GetBindings().GetDispatcher()->Execute(
@@ -744,15 +570,9 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
}
}
-<<<<<<< HEAD
if ( !m_pTbxShadow->IsItemChecked(nId) )
{
m_pTbxShadow->CheckItem(nId);
-=======
- if ( !aTbxShadow->IsItemChecked(nId) )
- {
- aTbxShadow->CheckItem(nId);
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
nLastShadowTbxId = nId;
@@ -760,17 +580,10 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
}
else
{
-<<<<<<< HEAD
m_pTbxShadow->Disable();
m_pMtrFldShadowX->Disable();
m_pMtrFldShadowY->Disable();
m_pShadowColorLB->Disable();
-=======
- aTbxShadow->Disable();
- aMtrFldShadowX->Disable();
- aMtrFldShadowY->Disable();
- aShadowColorLB->Disable();
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
@@ -779,11 +592,7 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
void SvxFontWorkDialog::SetShadowColor_Impl(const XFormTextShadowColorItem* pItem)
{
if ( pItem )
-<<<<<<< HEAD
m_pShadowColorLB->SelectEntry(pItem->GetColorValue());
-=======
- aShadowColorLB->SelectEntry(pItem->GetColorValue());
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Enter X-value for shadow in edit field
@@ -791,11 +600,7 @@ void SvxFontWorkDialog::SetShadowColor_Impl(const XFormTextShadowColorItem* pIte
void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
{
// Use HasChildPathFocus() instead of HasFocus() at SpinFields
-<<<<<<< HEAD
if ( pItem && !m_pMtrFldShadowX->HasChildPathFocus() )
-=======
- if ( pItem && !aMtrFldShadowX->HasChildPathFocus() )
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
{
// #i19251#
// sal_Int32 nValue = pItem->GetValue();
@@ -804,11 +609,7 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
// The two involved fields/items are used double and contain/give different
// values regarding to the access method. Thus, here we need to separate the access
// methos regarding to the kind of value accessed.
-<<<<<<< HEAD
if (m_pTbxShadow->IsItemChecked(nShadowSlantId))
-=======
- if(aTbxShadow->IsItemChecked(TBI_SHADOW_SLANT))
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
{
// #i19251#
// There is no value correction necessary at all, i think this
@@ -816,19 +617,11 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
// involved fields/items are used double and contain/give different
// values regarding to the access method.
// nValue = nValue - ( int( float( nValue ) / 360.0 ) * 360 );
-<<<<<<< HEAD
m_pMtrFldShadowX->SetValue(pItem->GetValue());
}
else
{
SetMetricValue(*m_pMtrFldShadowX, pItem->GetValue(), SFX_MAPUNIT_100TH_MM);
-=======
- aMtrFldShadowX->SetValue(pItem->GetValue());
- }
- else
- {
- SetMetricValue( *aMtrFldShadowX.get(), pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
}
@@ -838,17 +631,12 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
void SvxFontWorkDialog::SetShadowYVal_Impl(const XFormTextShadowYValItem* pItem)
{
// Use HasChildPathFocus() instead of HasFocus() at SpinFields
-<<<<<<< HEAD
if ( pItem && !m_pMtrFldShadowY->HasChildPathFocus() )
-=======
- if ( pItem && !aMtrFldShadowY->HasChildPathFocus() )
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
{
// #i19251#
// The two involved fields/items are used double and contain/give different
// values regarding to the access method. Thus, here we need to separate the access
// methos regarding to the kind of value accessed.
-<<<<<<< HEAD
if (m_pTbxShadow->IsItemChecked(nShadowSlantId))
{
m_pMtrFldShadowY->SetValue(pItem->GetValue());
@@ -856,26 +644,13 @@ void SvxFontWorkDialog::SetShadowYVal_Impl(const XFormTextShadowYValItem* pItem)
else
{
SetMetricValue(*m_pMtrFldShadowY, pItem->GetValue(), SFX_MAPUNIT_100TH_MM);
-=======
- if(aTbxShadow->IsItemChecked(TBI_SHADOW_SLANT))
- {
- aMtrFldShadowY->SetValue(pItem->GetValue());
- }
- else
- {
- SetMetricValue( *aMtrFldShadowY.get(), pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
}
IMPL_LINK_NOARG(SvxFontWorkDialog, SelectStyleHdl_Impl)
{
-<<<<<<< HEAD
sal_uInt16 nId = m_pTbxStyle->GetCurItemId();
-=======
- sal_uInt16 nId = aTbxStyle->GetCurItemId();
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
// Execute this block when a different toolbox item has been clicked or
// when the off item has been clicked. The later is necessary to
@@ -905,19 +680,11 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, SelectStyleHdl_Impl)
IMPL_LINK_NOARG(SvxFontWorkDialog, SelectAdjustHdl_Impl)
{
-<<<<<<< HEAD
sal_uInt16 nId = m_pTbxAdjust->GetCurItemId();
-=======
- sal_uInt16 nId = aTbxAdjust->GetCurItemId();
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
if (nId == nAdjustMirrorId)
{
-<<<<<<< HEAD
XFormTextMirrorItem aItem(m_pTbxAdjust->IsItemChecked(nId));
-=======
- XFormTextMirrorItem aItem(aTbxAdjust->IsItemChecked(nId));
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_MIRROR, SfxCallMode::SLOT, &aItem, 0L );
}
else if ( nId != nLastAdjustTbxId )
@@ -941,28 +708,16 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, SelectAdjustHdl_Impl)
IMPL_LINK_NOARG(SvxFontWorkDialog, SelectShadowHdl_Impl)
{
-<<<<<<< HEAD
sal_uInt16 nId = m_pTbxShadow->GetCurItemId();
-=======
- sal_uInt16 nId = aTbxShadow->GetCurItemId();
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
if (nId == nShowFormId)
{
-<<<<<<< HEAD
XFormTextHideFormItem aItem(!m_pTbxShadow->IsItemChecked(nId));
-=======
- XFormTextHideFormItem aItem(!aTbxShadow->IsItemChecked(nId));
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_HIDEFORM, SfxCallMode::RECORD, &aItem, 0L );
}
else if (nId == nOutlineId)
{
-<<<<<<< HEAD
XFormTextOutlineItem aItem(m_pTbxShadow->IsItemChecked(nId));
-=======
- XFormTextOutlineItem aItem(aTbxShadow->IsItemChecked(nId));
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_OUTLINE, SfxCallMode::RECORD, &aItem, 0L );
}
else if (nId != nLastShadowTbxId)
@@ -971,23 +726,13 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, SelectShadowHdl_Impl)
if (nLastShadowTbxId == nShadowNormalId)
{
-<<<<<<< HEAD
nSaveShadowX = GetCoreValue(*m_pMtrFldShadowX, SFX_MAPUNIT_100TH_MM);
nSaveShadowY = GetCoreValue(*m_pMtrFldShadowY, SFX_MAPUNIT_100TH_MM);
-=======
- nSaveShadowX = GetCoreValue( *aMtrFldShadowX.get(), SFX_MAPUNIT_100TH_MM );
- nSaveShadowY = GetCoreValue( *aMtrFldShadowY.get(), SFX_MAPUNIT_100TH_MM );
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
else if (nLastShadowTbxId == nShadowSlantId)
{
-<<<<<<< HEAD
nSaveShadowAngle = static_cast<long>(m_pMtrFldShadowX->GetValue());
nSaveShadowSize = static_cast<long>(m_pMtrFldShadowY->GetValue());
-=======
- nSaveShadowAngle = static_cast<long>(aMtrFldShadowX->GetValue());
- nSaveShadowSize = static_cast<long>(aMtrFldShadowY->GetValue());
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
nLastShadowTbxId = nId;
@@ -1014,7 +759,6 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl)
// listen, this is however not possible at the moment due to compabillity
// issues.
const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
-<<<<<<< HEAD
if( eDlgUnit != m_pMtrFldDistance->GetUnit() )
{
SetFieldUnit(*m_pMtrFldDistance, eDlgUnit, true);
@@ -1034,27 +778,6 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl)
long nValue = GetCoreValue(*m_pMtrFldDistance, SFX_MAPUNIT_100TH_MM);
XFormTextDistanceItem aDistItem( nValue );
nValue = GetCoreValue(*m_pMtrFldTextStart, SFX_MAPUNIT_100TH_MM);
-=======
- if( eDlgUnit != aMtrFldDistance->GetUnit() )
- {
- SetFieldUnit( *aMtrFldDistance.get(), eDlgUnit, true );
- SetFieldUnit( *aMtrFldTextStart.get(), eDlgUnit, true );
- aMtrFldDistance->SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
- aMtrFldTextStart->SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
- }
- if( eDlgUnit != aMtrFldShadowX->GetUnit() &&
- aTbxShadow->IsItemChecked( TBI_SHADOW_NORMAL ) )
- {
- SetFieldUnit( *aMtrFldShadowX.get(), eDlgUnit, true );
- SetFieldUnit( *aMtrFldShadowY.get(), eDlgUnit, true );
- aMtrFldShadowX->SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
- aMtrFldShadowY->SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
- }
-
- long nValue = GetCoreValue( *aMtrFldDistance.get(), SFX_MAPUNIT_100TH_MM );
- XFormTextDistanceItem aDistItem( nValue );
- nValue = GetCoreValue( *aMtrFldTextStart.get(), SFX_MAPUNIT_100TH_MM );
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
XFormTextStartItem aStartItem( nValue );
sal_Int32 nValueX(0L);
@@ -1066,23 +789,13 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl)
// methos regarding to the kind of value accessed.
if (nLastShadowTbxId == nShadowNormalId)
{
-<<<<<<< HEAD
nValueX = GetCoreValue(*m_pMtrFldShadowX, SFX_MAPUNIT_100TH_MM);
nValueY = GetCoreValue(*m_pMtrFldShadowY, SFX_MAPUNIT_100TH_MM);
-=======
- nValueX = GetCoreValue( *aMtrFldShadowX.get(), SFX_MAPUNIT_100TH_MM );
- nValueY = GetCoreValue( *aMtrFldShadowY.get(), SFX_MAPUNIT_100TH_MM );
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
else if (nLastShadowTbxId == nShadowSlantId)
{
-<<<<<<< HEAD
nValueX = static_cast<long>(m_pMtrFldShadowX->GetValue());
nValueY = static_cast<long>(m_pMtrFldShadowY->GetValue());
-=======
- nValueX = static_cast<long>(aMtrFldShadowX->GetValue());
- nValueY = static_cast<long>(aMtrFldShadowY->GetValue());
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
XFormTextShadowXValItem aShadowXItem( nValueX );
@@ -1096,11 +809,7 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl)
IMPL_LINK_NOARG(SvxFontWorkDialog, ColorSelectHdl_Impl)
{
-<<<<<<< HEAD
XFormTextShadowColorItem aItem( "", m_pShadowColorLB->GetSelectEntryColor() );
-=======
- XFormTextShadowColorItem aItem( "", aShadowColorLB->GetSelectEntryColor() );
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_SHDWCOLOR, SfxCallMode::RECORD, &aItem, 0L );
return 0;
}
@@ -1110,19 +819,13 @@ void SvxFontWorkDialog::SetColorList(const XColorListRef &pList)
if ( pList.is() && pList != pColorList )
{
pColorList = pList;
-<<<<<<< HEAD
m_pShadowColorLB->Clear();
m_pShadowColorLB->Fill(pColorList);
-=======
- aShadowColorLB->Clear();
- aShadowColorLB->Fill(pColorList);
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
void SvxFontWorkDialog::ApplyImageList()
{
-<<<<<<< HEAD
if (nLastShadowTbxId == nShadowSlantId)
{
m_pFbShadowX->SetImage(Image(SVX_RES(RID_SVXIMG_SHADOW_ANGLE)));
@@ -1133,29 +836,6 @@ void SvxFontWorkDialog::ApplyImageList()
m_pFbShadowX->SetImage(Image(SVX_RES(RID_SVXIMG_SHADOW_XDIST)));
m_pFbShadowY->SetImage(Image(SVX_RES(RID_SVXIMG_SHADOW_YDIST)));
}
-=======
- ImageList& rImgLst = maImageList;
-
- aTbxStyle->SetImageList( rImgLst );
- aTbxAdjust->SetImageList( rImgLst );
- aTbxShadow->SetImageList( rImgLst );
-
- switch( nLastShadowTbxId )
- {
- case TBI_SHADOW_SLANT:
- aFbShadowX->SetImage( rImgLst.GetImage( TBI_SHADOW_ANGLE ) );
- aFbShadowY->SetImage( rImgLst.GetImage( TBI_SHADOW_SIZE ) );
- break;
- default:
- aFbShadowX->SetImage( rImgLst.GetImage( TBI_SHADOW_XDIST ) );
- aFbShadowY->SetImage( rImgLst.GetImage( TBI_SHADOW_YDIST ) );
- break;
- }
-
- aFbDistance->SetImage( rImgLst.GetImage( TBI_DISTANCE ) );
- aFbTextStart->SetImage( rImgLst.GetImage( TBI_TEXTSTART ) );
-
->>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index dd463c0460fc..65ea63526eaf 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -209,6 +209,22 @@ SvxHFPage::~SvxHFPage()
void SvxHFPage::dispose()
{
delete pBBSet;
+ m_pPageLbl.clear();
+ m_pTurnOnBox.clear();
+ m_pCntSharedBox.clear();
+ m_pCntSharedFirstBox.clear();
+ m_pLMLbl.clear();
+ m_pLMEdit.clear();
+ m_pRMLbl.clear();
+ m_pRMEdit.clear();
+ m_pDistFT.clear();
+ m_pDistEdit.clear();
+ m_pDynSpacingCB.clear();
+ m_pHeightFT.clear();
+ m_pHeightEdit.clear();
+ m_pHeightDynBtn.clear();
+ m_pBspWin.clear();
+ m_pBackgroundBtn.clear();
SfxTabPage::dispose();
}
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 534b0168b3cd..b7a9c2e256d9 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -96,7 +96,7 @@ SvxIMapDlgChildWindow::SvxIMapDlgChildWindow( vcl::Window* _pParent, sal_uInt16
SfxChildWindow( _pParent, nId )
{
pWindow = new SvxIMapDlg( pBindings, this, _pParent );
- SvxIMapDlg* pDlg = static_cast<SvxIMapDlg*>(pWindow);
+ SvxIMapDlg* pDlg = static_cast<SvxIMapDlg*>(pWindow.get());
if ( pInfo->nFlags & SfxChildWindowFlags::ZOOMIN )
pDlg->RollUp();
@@ -223,8 +223,16 @@ SvxIMapDlg::~SvxIMapDlg()
void SvxIMapDlg::dispose()
{
// Delete URL-List
- delete pIMapWnd;
+ pIMapWnd.clear();
delete pOwnData;
+ m_pTbxIMapDlg1.clear();
+ m_pFtURL.clear();
+ m_pURLBox.clear();
+ m_pFtText.clear();
+ m_pEdtText.clear();
+ m_pFtTarget.clear();
+ m_pCbbTarget.clear();
+ m_pStbStatus.clear();
SfxModelessDialog::dispose();
}
diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx
index a256374ae7cd..8aeab4bf4748 100644
--- a/svx/source/dialog/linkwarn.cxx
+++ b/svx/source/dialog/linkwarn.cxx
@@ -53,6 +53,7 @@ void SvxLinkWarningDialog::dispose()
bool bChecked = m_pWarningOnBox->IsChecked();
if ( aMiscOpt.ShowLinkWarningDialog() != bChecked )
aMiscOpt.SetShowLinkWarningDialog( bChecked );
+ m_pWarningOnBox.clear();
MessageDialog::dispose();
}
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index aaea253bf8da..58c0f4a22d09 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -171,6 +171,33 @@ SvxGridTabPage::SvxGridTabPage( vcl::Window* pParent, const SfxItemSet& rCoreSet
LINK( this, SvxGridTabPage, ChangeDivisionHdl_Impl ) );
}
+SvxGridTabPage::~SvxGridTabPage()
+{
+ dispose();
+}
+
+void SvxGridTabPage::dispose()
+{
+ pCbxUseGridsnap.clear();
+ pCbxGridVisible.clear();
+ pMtrFldDrawX.clear();
+ pMtrFldDrawY.clear();
+ pNumFldDivisionX.clear();
+ pNumFldDivisionY.clear();
+ pCbxSynchronize.clear();
+ pSnapFrames.clear();
+ pCbxSnapHelplines.clear();
+ pCbxSnapBorder.clear();
+ pCbxSnapFrame.clear();
+ pCbxSnapPoints.clear();
+ pMtrFldSnapArea.clear();
+ pCbxOrtho.clear();
+ pCbxBigOrtho.clear();
+ pCbxRotate.clear();
+ pMtrFldAngle.clear();
+ pMtrFldBezAngle.clear();
+ SfxTabPage::dispose();
+}
SfxTabPage* SvxGridTabPage::Create( vcl::Window* pParent, const SfxItemSet& rAttrSet )
diff --git a/svx/source/dialog/orienthelper.cxx b/svx/source/dialog/orienthelper.cxx
index b1b61e9ed1a0..89ecc71dfed8 100644
--- a/svx/source/dialog/orienthelper.cxx
+++ b/svx/source/dialog/orienthelper.cxx
@@ -31,7 +31,7 @@ namespace svx {
struct OrientationHelper_Impl
{
- typedef std::pair< vcl::Window*, TriState > WindowPair;
+ typedef std::pair< VclPtr<vcl::Window>, TriState > WindowPair;
typedef std::vector< WindowPair > WindowVec;
DialControl& mrCtrlDial;
diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx
index 8f80ab8119c7..84e56e032d4a 100644
--- a/svx/source/dialog/passwd.cxx
+++ b/svx/source/dialog/passwd.cxx
@@ -97,6 +97,21 @@ SvxPasswordDialog::SvxPasswordDialog(vcl::Window* pParent, bool bAllowEmptyPassw
}
}
+SvxPasswordDialog::~SvxPasswordDialog()
+{
+ dispose();
+}
+
+void SvxPasswordDialog::dispose()
+{
+ m_pOldFL.clear();
+ m_pOldPasswdFT.clear();
+ m_pOldPasswdED.clear();
+ m_pNewPasswdED.clear();
+ m_pRepeatPasswdED.clear();
+ m_pOKBtn.clear();
+ SfxModalDialog::dispose();
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 2400f2db2a84..2ebbbeca831e 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -271,6 +271,28 @@ void SvxRubyDialog::dispose()
ClearCharStyleList();
EventObject aEvent;
xImpl->disposing(aEvent);
+ m_pLeftFT.clear();
+ m_pRightFT.clear();
+ m_pLeft1ED.clear();
+ m_pRight1ED.clear();
+ m_pLeft2ED.clear();
+ m_pRight2ED.clear();
+ m_pLeft3ED.clear();
+ m_pRight3ED.clear();
+ m_pLeft4ED.clear();
+ m_pRight4ED.clear();
+ for (int i=0; i<7; i++)
+ aEditArr[i].clear();
+ m_pScrolledWindow.clear();
+ m_pScrollSB.clear();
+ m_pAdjustLB.clear();
+ m_pPositionLB.clear();
+ m_pCharStyleFT.clear();
+ m_pCharStyleLB.clear();
+ m_pStylistPB.clear();
+ m_pPreviewWin.clear();
+ m_pApplyPB.clear();
+ m_pClosePB.clear();
SfxModelessDialog::dispose();
}
@@ -766,6 +788,17 @@ RubyPreview::RubyPreview(vcl::Window *pParent)
SetBorderStyle( WindowBorderStyle::MONO );
}
+RubyPreview::~RubyPreview()
+{
+ dispose();
+}
+
+void RubyPreview::dispose()
+{
+ m_pParentDlg.clear();
+ vcl::Window::dispose();
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeRubyPreview(vcl::Window *pParent, VclBuilder::stringmap &)
{
return new RubyPreview(pParent);
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 5820f2847cc5..24a5d33f3f43 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -364,6 +364,48 @@ void SvxSearchDialog::dispose()
delete pImpl;
delete pSearchList;
delete pReplaceList;
+ mpDocWin.clear();
+ m_pSearchFrame.clear();
+ m_pSearchLB.clear();
+ m_pSearchTmplLB.clear();
+ m_pSearchAttrText.clear();
+ m_pSearchLabel.clear();
+ m_pReplaceFrame.clear();
+ m_pReplaceLB.clear();
+ m_pReplaceTmplLB.clear();
+ m_pReplaceAttrText.clear();
+ m_pSearchBtn.clear();
+ m_pSearchAllBtn.clear();
+ m_pReplaceBtn.clear();
+ m_pReplaceAllBtn.clear();
+ m_pComponentFrame.clear();
+ m_pSearchComponent1PB.clear();
+ m_pSearchComponent2PB.clear();
+ m_pMatchCaseCB.clear();
+ m_pWordBtn.clear();
+ m_pCloseBtn.clear();
+ m_pIgnoreDiacritics.clear();
+ m_pIgnoreKashida.clear();
+ m_pSelectionBtn.clear();
+ m_pBackwardsBtn.clear();
+ m_pRegExpBtn.clear();
+ m_pSimilarityBox.clear();
+ m_pSimilarityBtn.clear();
+ m_pLayoutBtn.clear();
+ m_pNotesBtn.clear();
+ m_pJapMatchFullHalfWidthCB.clear();
+ m_pJapOptionsCB.clear();
+ m_pJapOptionsBtn.clear();
+ m_pAttributeBtn.clear();
+ m_pFormatBtn.clear();
+ m_pNoFormatBtn.clear();
+ m_pCalcGrid.clear();
+ m_pCalcSearchInFT.clear();
+ m_pCalcSearchInLB.clear();
+ m_pCalcSearchDirFT.clear();
+ m_pRowsBtn.clear();
+ m_pColumnsBtn.clear();
+ m_pAllSheetsCB.clear();
SfxModelessDialog::dispose();
}
@@ -2227,7 +2269,7 @@ SvxSearchDialogWrapper::SvxSearchDialogWrapper( vcl::Window* _pParent, sal_uInt1
: SfxChildWindow( _pParent, nId )
, dialog (new SvxSearchDialog (_pParent, this, *pBindings))
{
- pWindow = dialog;
+ pWindow = dialog.get();
dialog->Initialize( pInfo );
pBindings->Update( SID_SEARCH_ITEM );
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index adf08f015683..b2bfffdda52c 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -363,6 +363,7 @@ void SvxRuler::dispose()
pBindings->LeaveRegistrations();
+ pEditWin.clear();
Ruler::dispose();
}
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 7e194f6bc5ca..66984dbc86af 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -643,9 +643,6 @@ DbCellControl::~DbCellControl()
{
lcl_clearBroadCaster(m_pModelChangeBroadcaster);
lcl_clearBroadCaster(m_pFieldChangeBroadcaster);
-
- delete m_pWindow;
- delete m_pPainter;
}
@@ -838,7 +835,7 @@ void DbCellControl::implAdjustReadOnly( const Reference< XPropertySet >& _rxMode
DBG_ASSERT( _rxModel.is(), "DbCellControl::implAdjustReadOnly: invalid model!" );
if ( m_pWindow && _rxModel.is() )
{
- Edit* pEditWindow = dynamic_cast< Edit* >( m_pWindow );
+ Edit* pEditWindow = dynamic_cast< Edit* >( m_pWindow.get() );
if ( pEditWindow )
{
bool bReadOnly = m_rColumn.IsReadOnly();
@@ -846,7 +843,7 @@ void DbCellControl::implAdjustReadOnly( const Reference< XPropertySet >& _rxMode
{
_rxModel->getPropertyValue( i_bReadOnly ? OUString(FM_PROP_READONLY) : OUString(FM_PROP_ISREADONLY)) >>= bReadOnly;
}
- static_cast< Edit* >( m_pWindow )->SetReadOnly( bReadOnly );
+ static_cast< Edit* >( m_pWindow.get() )->SetReadOnly( bReadOnly );
}
}
}
@@ -1126,18 +1123,18 @@ void DbTextField::Init( vcl::Window& rParent, const Reference< XRowSet >& xCurso
if ( bIsMultiLine )
{
m_pWindow = new MultiLineTextCell( &rParent, nStyle );
- m_pEdit = new MultiLineEditImplementation( *static_cast< MultiLineTextCell* >( m_pWindow ) );
+ m_pEdit = new MultiLineEditImplementation( *static_cast< MultiLineTextCell* >( m_pWindow.get() ) );
m_pPainter = new MultiLineTextCell( &rParent, nStyle );
- m_pPainterImplementation = new MultiLineEditImplementation( *static_cast< MultiLineTextCell* >( m_pPainter ) );
+ m_pPainterImplementation = new MultiLineEditImplementation( *static_cast< MultiLineTextCell* >( m_pPainter.get() ) );
}
else
{
m_pWindow = new Edit( &rParent, nStyle );
- m_pEdit = new EditImplementation( *static_cast< Edit* >( m_pWindow ) );
+ m_pEdit = new EditImplementation( *static_cast< Edit* >( m_pWindow.get() ) );
m_pPainter = new Edit( &rParent, nStyle );
- m_pPainterImplementation = new EditImplementation( *static_cast< Edit* >( m_pPainter ) );
+ m_pPainterImplementation = new EditImplementation( *static_cast< Edit* >( m_pPainter.get() ) );
}
if ( WB_LEFT == nStyle )
@@ -1281,8 +1278,8 @@ void DbFormattedField::Init( vcl::Window& rParent, const Reference< XRowSet >& x
implAdjustGenericFieldSetting( xUnoModel );
- static_cast< FormattedField* >( m_pWindow )->SetStrictFormat( false );
- static_cast< FormattedField* >( m_pPainter )->SetStrictFormat( false );
+ static_cast< FormattedField* >( m_pWindow.get() )->SetStrictFormat( false );
+ static_cast< FormattedField* >( m_pPainter.get() )->SetStrictFormat( false );
// wenn man _irgendeine_ Formatierung zulaesst, kann man da sowieso keine Eingabe-Ueberpruefung
// machen (das FormattedField unterstuetzt das sowieso nicht, nur abgeleitete Klassen)
@@ -1350,7 +1347,7 @@ void DbFormattedField::Init( vcl::Window& rParent, const Reference< XRowSet >& x
// einen Standard-Formatter ...
if (pFormatterUsed == NULL)
{
- pFormatterUsed = static_cast<FormattedField*>(m_pWindow)->StandardFormatter();
+ pFormatterUsed = static_cast<FormattedField*>(m_pWindow.get())->StandardFormatter();
DBG_ASSERT(pFormatterUsed != NULL, "DbFormattedField::Init : no standard formatter given by the numeric field !");
}
// ... und einen Standard-Key
@@ -1359,14 +1356,14 @@ void DbFormattedField::Init( vcl::Window& rParent, const Reference< XRowSet >& x
m_nKeyType = comphelper::getNumberFormatType(m_xSupplier->getNumberFormats(), nFormatKey);
- static_cast<FormattedField*>(m_pWindow)->SetFormatter(pFormatterUsed);
- static_cast<FormattedField*>(m_pPainter)->SetFormatter(pFormatterUsed);
+ static_cast<FormattedField*>(m_pWindow.get())->SetFormatter(pFormatterUsed);
+ static_cast<FormattedField*>(m_pPainter.get())->SetFormatter(pFormatterUsed);
- static_cast<FormattedField*>(m_pWindow)->SetFormatKey(nFormatKey);
- static_cast<FormattedField*>(m_pPainter)->SetFormatKey(nFormatKey);
+ static_cast<FormattedField*>(m_pWindow.get())->SetFormatKey(nFormatKey);
+ static_cast<FormattedField*>(m_pPainter.get())->SetFormatKey(nFormatKey);
- static_cast<FormattedField*>(m_pWindow)->TreatAsNumber(m_rColumn.IsNumeric());
- static_cast<FormattedField*>(m_pPainter)->TreatAsNumber(m_rColumn.IsNumeric());
+ static_cast<FormattedField*>(m_pWindow.get())->TreatAsNumber(m_rColumn.IsNumeric());
+ static_cast<FormattedField*>(m_pPainter.get())->TreatAsNumber(m_rColumn.IsNumeric());
// Min- und Max-Werte
if (m_rColumn.IsNumeric())
@@ -1379,15 +1376,15 @@ void DbFormattedField::Init( vcl::Window& rParent, const Reference< XRowSet >& x
{
DBG_ASSERT(aMin.getValueType().getTypeClass() == TypeClass_DOUBLE, "DbFormattedField::Init : the model has an invalid min value !");
double dMin = ::comphelper::getDouble(aMin);
- static_cast<FormattedField*>(m_pWindow)->SetMinValue(dMin);
- static_cast<FormattedField*>(m_pPainter)->SetMinValue(dMin);
+ static_cast<FormattedField*>(m_pWindow.get())->SetMinValue(dMin);
+ static_cast<FormattedField*>(m_pPainter.get())->SetMinValue(dMin);
bClearMin = false;
}
}
if (bClearMin)
{
- static_cast<FormattedField*>(m_pWindow)->ClearMinValue();
- static_cast<FormattedField*>(m_pPainter)->ClearMinValue();
+ static_cast<FormattedField*>(m_pWindow.get())->ClearMinValue();
+ static_cast<FormattedField*>(m_pPainter.get())->ClearMinValue();
}
bool bClearMax = true;
if (::comphelper::hasProperty(FM_PROP_EFFECTIVE_MAX, xUnoModel))
@@ -1397,15 +1394,15 @@ void DbFormattedField::Init( vcl::Window& rParent, const Reference< XRowSet >& x
{
DBG_ASSERT(aMin.getValueType().getTypeClass() == TypeClass_DOUBLE, "DbFormattedField::Init : the model has an invalid max value !");
double dMin = ::comphelper::getDouble(aMin);
- static_cast<FormattedField*>(m_pWindow)->SetMaxValue(dMin);
- static_cast<FormattedField*>(m_pPainter)->SetMaxValue(dMin);
+ static_cast<FormattedField*>(m_pWindow.get())->SetMaxValue(dMin);
+ static_cast<FormattedField*>(m_pPainter.get())->SetMaxValue(dMin);
bClearMax = false;
}
}
if (bClearMax)
{
- static_cast<FormattedField*>(m_pWindow)->ClearMaxValue();
- static_cast<FormattedField*>(m_pPainter)->ClearMaxValue();
+ static_cast<FormattedField*>(m_pWindow.get())->ClearMaxValue();
+ static_cast<FormattedField*>(m_pPainter.get())->ClearMaxValue();
}
}
@@ -1418,16 +1415,16 @@ void DbFormattedField::Init( vcl::Window& rParent, const Reference< XRowSet >& x
case TypeClass_DOUBLE:
if (m_rColumn.IsNumeric())
{
- static_cast<FormattedField*>(m_pWindow)->SetDefaultValue(::comphelper::getDouble(aDefault));
- static_cast<FormattedField*>(m_pPainter)->SetDefaultValue(::comphelper::getDouble(aDefault));
+ static_cast<FormattedField*>(m_pWindow.get())->SetDefaultValue(::comphelper::getDouble(aDefault));
+ static_cast<FormattedField*>(m_pPainter.get())->SetDefaultValue(::comphelper::getDouble(aDefault));
}
else
{
OUString sConverted;
Color* pDummy;
pFormatterUsed->GetOutputString(::comphelper::getDouble(aDefault), 0, sConverted, &pDummy);
- static_cast<FormattedField*>(m_pWindow)->SetDefaultText(sConverted);
- static_cast<FormattedField*>(m_pPainter)->SetDefaultText(sConverted);
+ static_cast<FormattedField*>(m_pWindow.get())->SetDefaultText(sConverted);
+ static_cast<FormattedField*>(m_pPainter.get())->SetDefaultText(sConverted);
}
break;
case TypeClass_STRING:
@@ -1439,14 +1436,14 @@ void DbFormattedField::Init( vcl::Window& rParent, const Reference< XRowSet >& x
sal_uInt32 nTestFormat(0);
if (pFormatterUsed->IsNumberFormat(sDefault, nTestFormat, dVal))
{
- static_cast<FormattedField*>(m_pWindow)->SetDefaultValue(dVal);
- static_cast<FormattedField*>(m_pPainter)->SetDefaultValue(dVal);
+ static_cast<FormattedField*>(m_pWindow.get())->SetDefaultValue(dVal);
+ static_cast<FormattedField*>(m_pPainter.get())->SetDefaultValue(dVal);
}
}
else
{
- static_cast<FormattedField*>(m_pWindow)->SetDefaultText(sDefault);
- static_cast<FormattedField*>(m_pPainter)->SetDefaultText(sDefault);
+ static_cast<FormattedField*>(m_pWindow.get())->SetDefaultText(sDefault);
+ static_cast<FormattedField*>(m_pPainter.get())->SetDefaultText(sDefault);
}
}
break;
@@ -1461,7 +1458,7 @@ void DbFormattedField::Init( vcl::Window& rParent, const Reference< XRowSet >& x
CellControllerRef DbFormattedField::CreateController() const
{
- return new ::svt::FormattedFieldCellController( static_cast< FormattedField* >( m_pWindow ) );
+ return new ::svt::FormattedFieldCellController( static_cast< FormattedField* >( m_pWindow.get() ) );
}
@@ -1474,9 +1471,9 @@ void DbFormattedField::_propertyChanged( const PropertyChangeEvent& _rEvent ) th
DBG_ASSERT(m_pWindow && m_pPainter, "DbFormattedField::_propertyChanged : where are my windows ?");
if (m_pWindow)
- static_cast< FormattedField* >( m_pWindow )->SetFormatKey( nNewKey );
+ static_cast< FormattedField* >( m_pWindow.get() )->SetFormatKey( nNewKey );
if (m_pPainter)
- static_cast< FormattedField* >( m_pPainter )->SetFormatKey( nNewKey );
+ static_cast< FormattedField* >( m_pPainter.get() )->SetFormatKey( nNewKey );
}
else
{
@@ -1508,7 +1505,7 @@ OUString DbFormattedField::GetFormatText(const Reference< ::com::sun::star::sdb:
double dValue = getValue( _rxField, m_rColumn.GetParent().getNullDate() );
if (_rxField->wasNull())
return aText;
- static_cast<FormattedField*>(m_pPainter)->SetValue(dValue);
+ static_cast<FormattedField*>(m_pPainter.get())->SetValue(dValue);
}
else
{
@@ -1517,7 +1514,7 @@ OUString DbFormattedField::GetFormatText(const Reference< ::com::sun::star::sdb:
aText = _rxField->getString();
if (_rxField->wasNull())
return aText;
- static_cast<FormattedField*>(m_pPainter)->SetTextFormatted(aText);
+ static_cast<FormattedField*>(m_pPainter.get())->SetTextFormatted(aText);
}
}
catch( const Exception& )
@@ -1527,7 +1524,7 @@ OUString DbFormattedField::GetFormatText(const Reference< ::com::sun::star::sdb:
aText = m_pPainter->GetText();
if (ppColor != NULL)
- *ppColor = static_cast<FormattedField*>(m_pPainter)->GetLastOutputColor();
+ *ppColor = static_cast<FormattedField*>(m_pPainter.get())->GetLastOutputColor();
return aText;
}
@@ -1537,7 +1534,7 @@ void DbFormattedField::UpdateFromField(const Reference< ::com::sun::star::sdb::X
{
try
{
- FormattedField* pFormattedWindow = static_cast<FormattedField*>(m_pWindow);
+ FormattedField* pFormattedWindow = static_cast<FormattedField*>(m_pWindow.get());
if (!_rxField.is())
{ // NULL-Wert -> leerer Text
m_pWindow->SetText(OUString());
@@ -1576,7 +1573,7 @@ void DbFormattedField::updateFromModel( Reference< XPropertySet > _rxModel )
{
OSL_ENSURE( _rxModel.is() && m_pWindow, "DbFormattedField::updateFromModel: invalid call!" );
- FormattedField* pFormattedWindow = static_cast< FormattedField* >( m_pWindow );
+ FormattedField* pFormattedWindow = static_cast< FormattedField* >( m_pWindow.get() );
OUString sText;
Any aValue = _rxModel->getPropertyValue( FM_PROP_EFFECTIVE_VALUE );
@@ -1597,7 +1594,7 @@ void DbFormattedField::updateFromModel( Reference< XPropertySet > _rxModel )
bool DbFormattedField::commitControl()
{
Any aNewVal;
- FormattedField& rField = *static_cast<FormattedField*>(m_pWindow);
+ FormattedField& rField = *static_cast<FormattedField*>(m_pWindow.get());
DBG_ASSERT(&rField == m_pWindow, "DbFormattedField::commitControl : can't work with a window other than my own !");
if (m_rColumn.IsNumeric())
{
@@ -1658,8 +1655,8 @@ void DbCheckBox::Init( vcl::Window& rParent, const Reference< XRowSet >& xCursor
bool bTristate = true;
OSL_VERIFY( xModel->getPropertyValue( FM_PROP_TRISTATE ) >>= bTristate );
- static_cast< CheckBoxControl* >( m_pWindow )->GetBox().EnableTriState( bTristate );
- static_cast< CheckBoxControl* >( m_pPainter )->GetBox().EnableTriState( bTristate );
+ static_cast< CheckBoxControl* >( m_pWindow.get() )->GetBox().EnableTriState( bTristate );
+ static_cast< CheckBoxControl* >( m_pPainter.get() )->GetBox().EnableTriState( bTristate );
}
catch( const Exception& )
{
@@ -1672,7 +1669,7 @@ void DbCheckBox::Init( vcl::Window& rParent, const Reference< XRowSet >& xCursor
CellControllerRef DbCheckBox::CreateController() const
{
- return new CheckBoxCellController(static_cast<CheckBoxControl*>(m_pWindow));
+ return new CheckBoxCellController(static_cast<CheckBoxControl*>(m_pWindow.get()));
}
static void lcl_setCheckBoxState( const Reference< ::com::sun::star::sdb::XColumn >& _rxField,
@@ -1698,7 +1695,7 @@ static void lcl_setCheckBoxState( const Reference< ::com::sun::star::sdb::XCol
void DbCheckBox::UpdateFromField(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/)
{
- lcl_setCheckBoxState( _rxField, static_cast<CheckBoxControl*>(m_pWindow) );
+ lcl_setCheckBoxState( _rxField, static_cast<CheckBoxControl*>(m_pWindow.get()) );
}
@@ -1706,7 +1703,7 @@ void DbCheckBox::PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect,
const Reference< ::com::sun::star::sdb::XColumn >& _rxField,
const Reference< XNumberFormatter >& xFormatter)
{
- lcl_setCheckBoxState( _rxField, static_cast<CheckBoxControl*>(m_pPainter) );
+ lcl_setCheckBoxState( _rxField, static_cast<CheckBoxControl*>(m_pPainter.get()) );
DbCellControl::PaintFieldToCell( rDev, rRect, _rxField, xFormatter );
}
@@ -1717,14 +1714,14 @@ void DbCheckBox::updateFromModel( Reference< XPropertySet > _rxModel )
sal_Int16 nState = TRISTATE_INDET;
_rxModel->getPropertyValue( FM_PROP_STATE ) >>= nState;
- static_cast< CheckBoxControl* >( m_pWindow )->GetBox().SetState( static_cast< TriState >( nState ) );
+ static_cast< CheckBoxControl* >( m_pWindow.get() )->GetBox().SetState( static_cast< TriState >( nState ) );
}
bool DbCheckBox::commitControl()
{
m_rColumn.getModel()->setPropertyValue( FM_PROP_STATE,
- makeAny( (sal_Int16)( static_cast< CheckBoxControl* >( m_pWindow )->GetBox().GetState() ) ) );
+ makeAny( (sal_Int16)( static_cast< CheckBoxControl* >( m_pWindow.get() )->GetBox().GetState() ) ) );
return true;
}
@@ -1760,10 +1757,10 @@ void DbPatternField::implAdjustGenericFieldSetting( const Reference< XPropertySe
OString aAsciiEditMask(OUStringToOString(aEditMask, RTL_TEXTENCODING_ASCII_US));
- static_cast< PatternField* >( m_pWindow )->SetMask( aAsciiEditMask, aLitMask );
- static_cast< PatternField* >( m_pPainter )->SetMask( aAsciiEditMask, aLitMask );
- static_cast< PatternField* >( m_pWindow )->SetStrictFormat( bStrict );
- static_cast< PatternField* >( m_pPainter )->SetStrictFormat( bStrict );
+ static_cast< PatternField* >( m_pWindow.get() )->SetMask( aAsciiEditMask, aLitMask );
+ static_cast< PatternField* >( m_pPainter.get() )->SetMask( aAsciiEditMask, aLitMask );
+ static_cast< PatternField* >( m_pWindow.get() )->SetStrictFormat( bStrict );
+ static_cast< PatternField* >( m_pPainter.get() )->SetStrictFormat( bStrict );
}
}
@@ -1784,14 +1781,14 @@ void DbPatternField::Init( vcl::Window& rParent, const Reference< XRowSet >& xCu
CellControllerRef DbPatternField::CreateController() const
{
- return new SpinCellController( static_cast< PatternField* >( m_pWindow ) );
+ return new SpinCellController( static_cast< PatternField* >( m_pWindow.get() ) );
}
OUString DbPatternField::impl_formatText( const OUString& _rText )
{
m_pPainter->SetText( _rText );
- static_cast< PatternField* >( m_pPainter )->ReformatAll();
+ static_cast< PatternField* >( m_pPainter.get() )->ReformatAll();
return m_pPainter->GetText();
}
@@ -1822,8 +1819,8 @@ OUString DbPatternField::GetFormatText(const Reference< ::com::sun::star::sdb::X
void DbPatternField::UpdateFromField( const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& _rxFormatter )
{
- static_cast< Edit* >( m_pWindow )->SetText( GetFormatText( _rxField, _rxFormatter ) );
- static_cast< Edit* >( m_pWindow )->SetSelection( Selection( SELECTION_MAX, SELECTION_MIN ) );
+ static_cast< Edit* >( m_pWindow.get() )->SetText( GetFormatText( _rxField, _rxFormatter ) );
+ static_cast< Edit* >( m_pWindow.get() )->SetSelection( Selection( SELECTION_MAX, SELECTION_MIN ) );
}
@@ -1834,8 +1831,8 @@ void DbPatternField::updateFromModel( Reference< XPropertySet > _rxModel )
OUString sText;
_rxModel->getPropertyValue( FM_PROP_TEXT ) >>= sText;
- static_cast< Edit* >( m_pWindow )->SetText( impl_formatText( sText ) );
- static_cast< Edit* >( m_pWindow )->SetSelection( Selection( SELECTION_MAX, SELECTION_MIN ) );
+ static_cast< Edit* >( m_pWindow.get() )->SetText( impl_formatText( sText ) );
+ static_cast< Edit* >( m_pWindow.get() )->SetSelection( Selection( SELECTION_MAX, SELECTION_MIN ) );
}
@@ -1877,7 +1874,7 @@ void DbSpinField::Init( vcl::Window& _rParent, const Reference< XRowSet >& _rxCu
CellControllerRef DbSpinField::CreateController() const
{
- return new SpinCellController( static_cast< SpinField* >( m_pWindow ) );
+ return new SpinCellController( static_cast< SpinField* >( m_pWindow.get() ) );
}
DbNumericField::DbNumericField( DbGridColumn& _rColumn )
@@ -1905,14 +1902,14 @@ void DbNumericField::implAdjustGenericFieldSetting( const Reference< XPropertySe
sal_Int16 nScale = getINT16( _rxModel->getPropertyValue( FM_PROP_DECIMAL_ACCURACY ) );
bool bThousand = getBOOL( _rxModel->getPropertyValue( FM_PROP_SHOWTHOUSANDSEP ) );
- static_cast< DoubleNumericField* >( m_pWindow )->SetMinValue(nMin);
- static_cast< DoubleNumericField* >( m_pWindow )->SetMaxValue(nMax);
- static_cast< DoubleNumericField* >( m_pWindow )->SetSpinSize(nStep);
- static_cast< DoubleNumericField* >( m_pWindow )->SetStrictFormat(bStrict);
+ static_cast< DoubleNumericField* >( m_pWindow.get() )->SetMinValue(nMin);
+ static_cast< DoubleNumericField* >( m_pWindow.get() )->SetMaxValue(nMax);
+ static_cast< DoubleNumericField* >( m_pWindow.get() )->SetSpinSize(nStep);
+ static_cast< DoubleNumericField* >( m_pWindow.get() )->SetStrictFormat(bStrict);
- static_cast< DoubleNumericField* >( m_pPainter )->SetMinValue(nMin);
- static_cast< DoubleNumericField* >( m_pPainter )->SetMaxValue(nMax);
- static_cast< DoubleNumericField* >( m_pPainter )->SetStrictFormat(bStrict);
+ static_cast< DoubleNumericField* >( m_pPainter.get() )->SetMinValue(nMin);
+ static_cast< DoubleNumericField* >( m_pPainter.get() )->SetMaxValue(nMax);
+ static_cast< DoubleNumericField* >( m_pPainter.get() )->SetStrictFormat(bStrict);
// dem Field und dem Painter einen Formatter spendieren
@@ -1931,18 +1928,18 @@ void DbNumericField::implAdjustGenericFieldSetting( const Reference< XPropertySe
}
if ( NULL == pFormatterUsed )
{ // der Cursor fuehrte nicht zum Erfolg -> Standard
- pFormatterUsed = static_cast< DoubleNumericField* >( m_pWindow )->StandardFormatter();
+ pFormatterUsed = static_cast< DoubleNumericField* >( m_pWindow.get() )->StandardFormatter();
DBG_ASSERT( pFormatterUsed != NULL, "DbNumericField::implAdjustGenericFieldSetting: no standard formatter given by the numeric field !" );
}
- static_cast< DoubleNumericField* >( m_pWindow )->SetFormatter( pFormatterUsed );
- static_cast< DoubleNumericField* >( m_pPainter )->SetFormatter( pFormatterUsed );
+ static_cast< DoubleNumericField* >( m_pWindow.get() )->SetFormatter( pFormatterUsed );
+ static_cast< DoubleNumericField* >( m_pPainter.get() )->SetFormatter( pFormatterUsed );
// und dann ein Format generieren, dass die gewuenschten Nachkommastellen usw. hat
LanguageType aAppLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType();
OUString sFormatString = pFormatterUsed->GenerateFormat(0, aAppLanguage, bThousand, false, nScale);
- static_cast< DoubleNumericField* >( m_pWindow )->SetFormat( sFormatString, aAppLanguage );
- static_cast< DoubleNumericField* >( m_pPainter )->SetFormat( sFormatString, aAppLanguage );
+ static_cast< DoubleNumericField* >( m_pWindow.get() )->SetFormat( sFormatString, aAppLanguage );
+ static_cast< DoubleNumericField* >( m_pPainter.get() )->SetFormat( sFormatString, aAppLanguage );
}
}
@@ -1998,7 +1995,7 @@ void DbNumericField::updateFromModel( Reference< XPropertySet > _rxModel )
double dValue = 0;
if ( _rxModel->getPropertyValue( FM_PROP_VALUE ) >>= dValue )
- static_cast< DoubleNumericField* >( m_pWindow )->SetValue( dValue );
+ static_cast< DoubleNumericField* >( m_pWindow.get() )->SetValue( dValue );
else
m_pWindow->SetText( OUString() );
}
@@ -2011,7 +2008,7 @@ bool DbNumericField::commitControl()
if (!aText.isEmpty()) // not empty
{
- double fValue = static_cast<DoubleNumericField*>(m_pWindow)->GetValue();
+ double fValue = static_cast<DoubleNumericField*>(m_pWindow.get())->GetValue();
aVal <<= (double)fValue;
}
m_rColumn.getModel()->setPropertyValue(FM_PROP_VALUE, aVal);
@@ -2053,24 +2050,24 @@ void DbCurrencyField::implAdjustGenericFieldSetting( const Reference< XPropertyS
nMin *= nMul;
nMax *= nMul;
- static_cast< LongCurrencyField* >( m_pWindow )->SetUseThousandSep( bThousand );
- static_cast< LongCurrencyField* >( m_pWindow )->SetDecimalDigits( m_nScale );
- static_cast< LongCurrencyField* >( m_pWindow )->SetCurrencySymbol( aStr );
- static_cast< LongCurrencyField* >( m_pWindow )->SetFirst( nMin );
- static_cast< LongCurrencyField* >( m_pWindow )->SetLast( nMax );
- static_cast< LongCurrencyField* >( m_pWindow )->SetMin( nMin );
- static_cast< LongCurrencyField* >( m_pWindow )->SetMax( nMax );
- static_cast< LongCurrencyField* >( m_pWindow )->SetSpinSize( nStep );
- static_cast< LongCurrencyField* >( m_pWindow )->SetStrictFormat( bStrict );
+ static_cast< LongCurrencyField* >( m_pWindow.get() )->SetUseThousandSep( bThousand );
+ static_cast< LongCurrencyField* >( m_pWindow.get() )->SetDecimalDigits( m_nScale );
+ static_cast< LongCurrencyField* >( m_pWindow.get() )->SetCurrencySymbol( aStr );
+ static_cast< LongCurrencyField* >( m_pWindow.get() )->SetFirst( nMin );
+ static_cast< LongCurrencyField* >( m_pWindow.get() )->SetLast( nMax );
+ static_cast< LongCurrencyField* >( m_pWindow.get() )->SetMin( nMin );
+ static_cast< LongCurrencyField* >( m_pWindow.get() )->SetMax( nMax );
+ static_cast< LongCurrencyField* >( m_pWindow.get() )->SetSpinSize( nStep );
+ static_cast< LongCurrencyField* >( m_pWindow.get() )->SetStrictFormat( bStrict );
- static_cast< LongCurrencyField* >( m_pPainter )->SetUseThousandSep( bThousand );
- static_cast< LongCurrencyField* >( m_pPainter )->SetDecimalDigits( m_nScale );
- static_cast< LongCurrencyField* >( m_pPainter )->SetCurrencySymbol( aStr );
- static_cast< LongCurrencyField* >( m_pPainter )->SetFirst( nMin );
- static_cast< LongCurrencyField* >( m_pPainter )->SetLast( nMax );
- static_cast< LongCurrencyField* >( m_pPainter )->SetMin( nMin );
- static_cast< LongCurrencyField* >( m_pPainter )->SetMax( nMax );
- static_cast< LongCurrencyField* >( m_pPainter )->SetStrictFormat( bStrict );
+ static_cast< LongCurrencyField* >( m_pPainter.get() )->SetUseThousandSep( bThousand );
+ static_cast< LongCurrencyField* >( m_pPainter.get() )->SetDecimalDigits( m_nScale );
+ static_cast< LongCurrencyField* >( m_pPainter.get() )->SetCurrencySymbol( aStr );
+ static_cast< LongCurrencyField* >( m_pPainter.get() )->SetFirst( nMin );
+ static_cast< LongCurrencyField* >( m_pPainter.get() )->SetLast( nMax );
+ static_cast< LongCurrencyField* >( m_pPainter.get() )->SetMin( nMin );
+ static_cast< LongCurrencyField* >( m_pPainter.get() )->SetMax( nMax );
+ static_cast< LongCurrencyField* >( m_pPainter.get() )->SetStrictFormat( bStrict );
}
}
@@ -2146,7 +2143,7 @@ void DbCurrencyField::updateFromModel( Reference< XPropertySet > _rxModel )
dValue = ::rtl::math::round(dValue, 0);
}
- static_cast< LongCurrencyField* >( m_pWindow )->SetValue( dValue );
+ static_cast< LongCurrencyField* >( m_pWindow.get() )->SetValue( dValue );
}
else
m_pWindow->SetText( OUString() );
@@ -2159,7 +2156,7 @@ bool DbCurrencyField::commitControl()
Any aVal;
if (!aText.isEmpty()) // not empty
{
- double fValue = static_cast<LongCurrencyField*>(m_pWindow)->GetValue();
+ double fValue = static_cast<LongCurrencyField*>(m_pWindow.get())->GetValue();
if (m_nScale)
{
fValue /= ::rtl::math::pow10Exp(1.0, m_nScale);
@@ -2216,21 +2213,21 @@ void DbDateField::implAdjustGenericFieldSetting( const Reference< XPropertySet >
{
bool bShowDateCentury = getBOOL( aCentury );
- static_cast<DateField*>( m_pWindow )->SetShowDateCentury( bShowDateCentury );
- static_cast<DateField*>( m_pPainter )->SetShowDateCentury( bShowDateCentury );
+ static_cast<DateField*>( m_pWindow.get() )->SetShowDateCentury( bShowDateCentury );
+ static_cast<DateField*>( m_pPainter.get() )->SetShowDateCentury( bShowDateCentury );
}
- static_cast< DateField* >( m_pWindow )->SetExtDateFormat( (ExtDateFieldFormat)nFormat );
- static_cast< DateField* >( m_pWindow )->SetMin( aMin );
- static_cast< DateField* >( m_pWindow )->SetMax( aMax );
- static_cast< DateField* >( m_pWindow )->SetStrictFormat( bStrict );
- static_cast< DateField* >( m_pWindow )->EnableEmptyFieldValue( true );
+ static_cast< DateField* >( m_pWindow.get() )->SetExtDateFormat( (ExtDateFieldFormat)nFormat );
+ static_cast< DateField* >( m_pWindow.get() )->SetMin( aMin );
+ static_cast< DateField* >( m_pWindow.get() )->SetMax( aMax );
+ static_cast< DateField* >( m_pWindow.get() )->SetStrictFormat( bStrict );
+ static_cast< DateField* >( m_pWindow.get() )->EnableEmptyFieldValue( true );
- static_cast< DateField* >( m_pPainter )->SetExtDateFormat( (ExtDateFieldFormat)nFormat );
- static_cast< DateField* >( m_pPainter )->SetMin( aMin );
- static_cast< DateField* >( m_pPainter )->SetMax( aMax );
- static_cast< DateField* >( m_pPainter )->SetStrictFormat( bStrict );
- static_cast< DateField* >( m_pPainter )->EnableEmptyFieldValue( true );
+ static_cast< DateField* >( m_pPainter.get() )->SetExtDateFormat( (ExtDateFieldFormat)nFormat );
+ static_cast< DateField* >( m_pPainter.get() )->SetMin( aMin );
+ static_cast< DateField* >( m_pPainter.get() )->SetMax( aMax );
+ static_cast< DateField* >( m_pPainter.get() )->SetStrictFormat( bStrict );
+ static_cast< DateField* >( m_pPainter.get() )->EnableEmptyFieldValue( true );
}
}
@@ -2264,13 +2261,13 @@ namespace
OUString DbDateField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
{
- return lcl_setFormattedDate_nothrow(dynamic_cast<DateField&>(*m_pPainter), _rxField);
+ return lcl_setFormattedDate_nothrow(dynamic_cast<DateField&>(*m_pPainter.get()), _rxField);
}
void DbDateField::UpdateFromField(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/)
{
- lcl_setFormattedDate_nothrow(dynamic_cast<DateField&>(*m_pWindow), _rxField);
+ lcl_setFormattedDate_nothrow(dynamic_cast<DateField&>(*m_pWindow.get()), _rxField);
}
@@ -2280,9 +2277,9 @@ void DbDateField::updateFromModel( Reference< XPropertySet > _rxModel )
util::Date aDate;
if ( _rxModel->getPropertyValue( FM_PROP_DATE ) >>= aDate )
- static_cast< DateField* >( m_pWindow )->SetDate( ::Date( aDate ) );
+ static_cast< DateField* >( m_pWindow.get() )->SetDate( ::Date( aDate ) );
else
- static_cast< DateField* >( m_pWindow )->SetText( OUString() );
+ static_cast< DateField* >( m_pWindow.get() )->SetText( OUString() );
}
@@ -2291,7 +2288,7 @@ bool DbDateField::commitControl()
OUString aText(m_pWindow->GetText());
Any aVal;
if (!aText.isEmpty())
- aVal <<= static_cast<DateField*>(m_pWindow)->GetDate().GetUNODate();
+ aVal <<= static_cast<DateField*>(m_pWindow.get())->GetDate().GetUNODate();
else
aVal.clear();
@@ -2328,17 +2325,17 @@ void DbTimeField::implAdjustGenericFieldSetting( const Reference< XPropertySet >
OSL_VERIFY( _rxModel->getPropertyValue( FM_PROP_TIMEMAX ) >>= aMax );
bool bStrict = getBOOL( _rxModel->getPropertyValue( FM_PROP_STRICTFORMAT ) );
- static_cast< TimeField* >( m_pWindow )->SetExtFormat( (ExtTimeFieldFormat)nFormat );
- static_cast< TimeField* >( m_pWindow )->SetMin( aMin );
- static_cast< TimeField* >( m_pWindow )->SetMax( aMax );
- static_cast< TimeField* >( m_pWindow )->SetStrictFormat( bStrict );
- static_cast< TimeField* >( m_pWindow )->EnableEmptyFieldValue( true );
+ static_cast< TimeField* >( m_pWindow.get() )->SetExtFormat( (ExtTimeFieldFormat)nFormat );
+ static_cast< TimeField* >( m_pWindow.get() )->SetMin( aMin );
+ static_cast< TimeField* >( m_pWindow.get() )->SetMax( aMax );
+ static_cast< TimeField* >( m_pWindow.get() )->SetStrictFormat( bStrict );
+ static_cast< TimeField* >( m_pWindow.get() )->EnableEmptyFieldValue( true );
- static_cast< TimeField* >( m_pPainter )->SetExtFormat( (ExtTimeFieldFormat)nFormat );
- static_cast< TimeField* >( m_pPainter )->SetMin( aMin );
- static_cast< TimeField* >( m_pPainter )->SetMax( aMax );
- static_cast< TimeField* >( m_pPainter )->SetStrictFormat( bStrict );
- static_cast< TimeField* >( m_pPainter )->EnableEmptyFieldValue( true );
+ static_cast< TimeField* >( m_pPainter.get() )->SetExtFormat( (ExtTimeFieldFormat)nFormat );
+ static_cast< TimeField* >( m_pPainter.get() )->SetMin( aMin );
+ static_cast< TimeField* >( m_pPainter.get() )->SetMax( aMax );
+ static_cast< TimeField* >( m_pPainter.get() )->SetStrictFormat( bStrict );
+ static_cast< TimeField* >( m_pPainter.get() )->EnableEmptyFieldValue( true );
}
}
@@ -2372,13 +2369,13 @@ namespace
OUString DbTimeField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/)
{
- return lcl_setFormattedTime_nothrow( *static_cast< TimeField* >( m_pPainter ), _rxField );
+ return lcl_setFormattedTime_nothrow( *static_cast< TimeField* >( m_pPainter.get() ), _rxField );
}
void DbTimeField::UpdateFromField(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/)
{
- lcl_setFormattedTime_nothrow( *static_cast< TimeField* >( m_pWindow ), _rxField );
+ lcl_setFormattedTime_nothrow( *static_cast< TimeField* >( m_pWindow.get() ), _rxField );
}
@@ -2388,9 +2385,9 @@ void DbTimeField::updateFromModel( Reference< XPropertySet > _rxModel )
util::Time aTime;
if ( _rxModel->getPropertyValue( FM_PROP_TIME ) >>= aTime )
- static_cast< TimeField* >( m_pWindow )->SetTime( ::tools::Time( aTime ) );
+ static_cast< TimeField* >( m_pWindow.get() )->SetTime( ::tools::Time( aTime ) );
else
- static_cast< TimeField* >( m_pWindow )->SetText( OUString() );
+ static_cast< TimeField* >( m_pWindow.get() )->SetText( OUString() );
}
@@ -2399,7 +2396,7 @@ bool DbTimeField::commitControl()
OUString aText(m_pWindow->GetText());
Any aVal;
if (!aText.isEmpty())
- aVal <<= static_cast<TimeField*>(m_pWindow)->GetTime().GetUNOTime();
+ aVal <<= static_cast<TimeField*>(m_pWindow.get())->GetTime().GetUNOTime();
else
aVal.clear();
@@ -2432,7 +2429,7 @@ void DbComboBox::_propertyChanged( const PropertyChangeEvent& _rEvent ) throw( R
void DbComboBox::SetList(const Any& rItems)
{
- ComboBoxControl* pField = static_cast<ComboBoxControl*>(m_pWindow);
+ ComboBoxControl* pField = static_cast<ComboBoxControl*>(m_pWindow.get());
pField->Clear();
::comphelper::StringSequence aTest;
@@ -2456,7 +2453,7 @@ void DbComboBox::implAdjustGenericFieldSetting( const Reference< XPropertySet >&
if ( m_pWindow && _rxModel.is() )
{
sal_Int16 nLines = getINT16( _rxModel->getPropertyValue( FM_PROP_LINECOUNT ) );
- static_cast< ComboBoxControl* >( m_pWindow )->SetDropDownLineCount( nLines );
+ static_cast< ComboBoxControl* >( m_pWindow.get() )->SetDropDownLineCount( nLines );
}
}
@@ -2486,7 +2483,7 @@ void DbComboBox::Init( vcl::Window& rParent, const Reference< XRowSet >& xCursor
CellControllerRef DbComboBox::CreateController() const
{
- return new ComboBoxCellController(static_cast<ComboBoxControl*>(m_pWindow));
+ return new ComboBoxCellController(static_cast<ComboBoxControl*>(m_pWindow.get()));
}
@@ -2512,8 +2509,8 @@ void DbComboBox::updateFromModel( Reference< XPropertySet > _rxModel )
OUString sText;
_rxModel->getPropertyValue( FM_PROP_TEXT ) >>= sText;
- static_cast< ComboBox* >( m_pWindow )->SetText( sText );
- static_cast< ComboBox* >( m_pWindow )->SetSelection( Selection( SELECTION_MAX, SELECTION_MIN ) );
+ static_cast< ComboBox* >( m_pWindow.get() )->SetText( sText );
+ static_cast< ComboBox* >( m_pWindow.get() )->SetSelection( Selection( SELECTION_MAX, SELECTION_MIN ) );
}
@@ -2551,7 +2548,7 @@ void DbListBox::_propertyChanged( const ::com::sun::star::beans::PropertyChangeE
void DbListBox::SetList(const Any& rItems)
{
- ListBoxControl* pField = static_cast<ListBoxControl*>(m_pWindow);
+ ListBoxControl* pField = static_cast<ListBoxControl*>(m_pWindow.get());
pField->Clear();
m_bBound = false;
@@ -2598,14 +2595,14 @@ void DbListBox::implAdjustGenericFieldSetting( const Reference< XPropertySet >&
if ( m_pWindow && _rxModel.is() )
{
sal_Int16 nLines = getINT16( _rxModel->getPropertyValue( FM_PROP_LINECOUNT ) );
- static_cast< ListBoxControl* >( m_pWindow )->SetDropDownLineCount( nLines );
+ static_cast< ListBoxControl* >( m_pWindow.get() )->SetDropDownLineCount( nLines );
}
}
CellControllerRef DbListBox::CreateController() const
{
- return new ListBoxCellController(static_cast<ListBoxControl*>(m_pWindow));
+ return new ListBoxCellController(static_cast<ListBoxControl*>(m_pWindow.get()));
}
@@ -2621,7 +2618,7 @@ OUString DbListBox::GetFormatText(const Reference< ::com::sun::star::sdb::XColum
{
Sequence< sal_Int16 > aPosSeq = ::comphelper::findValue( m_aValueList, sText, true );
if ( aPosSeq.getLength() )
- sText = static_cast<ListBox*>(m_pWindow)->GetEntry(aPosSeq.getConstArray()[0]);
+ sText = static_cast<ListBox*>(m_pWindow.get())->GetEntry(aPosSeq.getConstArray()[0]);
else
sText.clear();
}
@@ -2639,9 +2636,9 @@ void DbListBox::UpdateFromField(const Reference< ::com::sun::star::sdb::XColumn
{
OUString sFormattedText( GetFormatText( _rxField, xFormatter ) );
if (!sFormattedText.isEmpty())
- static_cast< ListBox* >( m_pWindow )->SelectEntry( sFormattedText );
+ static_cast< ListBox* >( m_pWindow.get() )->SelectEntry( sFormattedText );
else
- static_cast< ListBox* >( m_pWindow )->SetNoSelection();
+ static_cast< ListBox* >( m_pWindow.get() )->SetNoSelection();
}
@@ -2656,7 +2653,7 @@ void DbListBox::updateFromModel( Reference< XPropertySet > _rxModel )
if ( aSelection.getLength() > 0 )
nSelection = aSelection[ 0 ];
- ListBox* pListBox = static_cast< ListBox* >( m_pWindow );
+ ListBox* pListBox = static_cast< ListBox* >( m_pWindow.get() );
if ( ( nSelection >= 0 ) && ( nSelection < pListBox->GetEntryCount() ) )
pListBox->SelectEntryPos( nSelection );
@@ -2669,10 +2666,10 @@ bool DbListBox::commitControl()
{
Any aVal;
Sequence<sal_Int16> aSelectSeq;
- if (static_cast<ListBox*>(m_pWindow)->GetSelectEntryCount())
+ if (static_cast<ListBox*>(m_pWindow.get())->GetSelectEntryCount())
{
aSelectSeq.realloc(1);
- *(sal_Int16 *)aSelectSeq.getArray() = (sal_Int16)static_cast<ListBox*>(m_pWindow)->GetSelectEntryPos();
+ *(sal_Int16 *)aSelectSeq.getArray() = (sal_Int16)static_cast<ListBox*>(m_pWindow.get())->GetSelectEntryPos();
}
aVal <<= aSelectSeq;
m_rColumn.getModel()->setPropertyValue(FM_PROP_SELECT_SEQ, aVal);
@@ -2695,7 +2692,7 @@ DbFilterField::DbFilterField(const Reference< XComponentContext >& rxContext,DbG
DbFilterField::~DbFilterField()
{
if (m_nControlClass == ::com::sun::star::form::FormComponentType::CHECKBOX)
- static_cast<CheckBoxControl*>(m_pWindow)->SetClickHdl( Link() );
+ static_cast<CheckBoxControl*>(m_pWindow.get())->SetClickHdl( Link() );
}
@@ -2709,7 +2706,7 @@ void DbFilterField::PaintCell(OutputDevice& rDev, const Rectangle& rRect)
DbCellControl::PaintCell( rDev, rRect );
break;
case FormComponentType::LISTBOX:
- rDev.DrawText(rRect, static_cast<ListBox*>(m_pWindow)->GetSelectEntry(), nStyle);
+ rDev.DrawText(rRect, static_cast<ListBox*>(m_pWindow.get())->GetSelectEntry(), nStyle);
break;
default:
rDev.DrawText(rRect, m_aText, nStyle);
@@ -2727,13 +2724,13 @@ void DbFilterField::SetList(const Any& rItems, bool bComboBox)
{
if (bComboBox)
{
- ComboBox* pField = static_cast<ComboBox*>(m_pWindow);
+ ComboBox* pField = static_cast<ComboBox*>(m_pWindow.get());
for (sal_Int32 i = 0; i < nItems; ++i, ++pStrings )
pField->InsertEntry(*pStrings, LISTBOX_APPEND);
}
else
{
- ListBox* pField = static_cast<ListBox*>(m_pWindow);
+ ListBox* pField = static_cast<ListBox*>(m_pWindow.get());
for (sal_Int32 i = 0; i < nItems; ++i, ++pStrings )
pField->InsertEntry(*pStrings, LISTBOX_APPEND);
@@ -2751,7 +2748,7 @@ void DbFilterField::CreateControl(vcl::Window* pParent, const Reference< ::com::
case ::com::sun::star::form::FormComponentType::CHECKBOX:
m_pWindow = new CheckBoxControl(pParent);
m_pWindow->SetPaintTransparent( true );
- static_cast<CheckBoxControl*>(m_pWindow)->SetClickHdl( LINK( this, DbFilterField, OnClick ) );
+ static_cast<CheckBoxControl*>(m_pWindow.get())->SetClickHdl( LINK( this, DbFilterField, OnClick ) );
m_pPainter = new CheckBoxControl(pParent);
m_pPainter->SetPaintTransparent( true );
@@ -2763,7 +2760,7 @@ void DbFilterField::CreateControl(vcl::Window* pParent, const Reference< ::com::
sal_Int16 nLines = ::comphelper::getINT16(xModel->getPropertyValue(FM_PROP_LINECOUNT));
Any aItems = xModel->getPropertyValue(FM_PROP_STRINGITEMLIST);
SetList(aItems, m_nControlClass == ::com::sun::star::form::FormComponentType::COMBOBOX);
- static_cast<ListBox*>(m_pWindow)->SetDropDownLineCount(nLines);
+ static_cast<ListBox*>(m_pWindow.get())->SetDropDownLineCount(nLines);
} break;
case ::com::sun::star::form::FormComponentType::COMBOBOX:
{
@@ -2781,10 +2778,10 @@ void DbFilterField::CreateControl(vcl::Window* pParent, const Reference< ::com::
sal_Int16 nLines = ::comphelper::getINT16(xModel->getPropertyValue(FM_PROP_LINECOUNT));
Any aItems = xModel->getPropertyValue(FM_PROP_STRINGITEMLIST);
SetList(aItems, m_nControlClass == ::com::sun::star::form::FormComponentType::COMBOBOX);
- static_cast<ComboBox*>(m_pWindow)->SetDropDownLineCount(nLines);
+ static_cast<ComboBox*>(m_pWindow.get())->SetDropDownLineCount(nLines);
}
else
- static_cast<ComboBox*>(m_pWindow)->SetDropDownLineCount(5);
+ static_cast<ComboBox*>(m_pWindow.get())->SetDropDownLineCount(5);
} break;
default:
@@ -2834,7 +2831,7 @@ void DbFilterField::Init( vcl::Window& rParent, const Reference< XRowSet >& xCur
DbCellControl::Init( rParent, xCursor );
// filter cells are never readonly
- Edit* pAsEdit = dynamic_cast< Edit* >( m_pWindow );
+ Edit* pAsEdit = dynamic_cast< Edit* >( m_pWindow.get() );
if ( pAsEdit )
pAsEdit->SetReadOnly( false );
}
@@ -2846,19 +2843,19 @@ CellControllerRef DbFilterField::CreateController() const
switch (m_nControlClass)
{
case ::com::sun::star::form::FormComponentType::CHECKBOX:
- xController = new CheckBoxCellController(static_cast<CheckBoxControl*>(m_pWindow));
+ xController = new CheckBoxCellController(static_cast<CheckBoxControl*>(m_pWindow.get()));
break;
case ::com::sun::star::form::FormComponentType::LISTBOX:
- xController = new ListBoxCellController(static_cast<ListBoxControl*>(m_pWindow));
+ xController = new ListBoxCellController(static_cast<ListBoxControl*>(m_pWindow.get()));
break;
case ::com::sun::star::form::FormComponentType::COMBOBOX:
- xController = new ComboBoxCellController(static_cast<ComboBoxControl*>(m_pWindow));
+ xController = new ComboBoxCellController(static_cast<ComboBoxControl*>(m_pWindow.get()));
break;
default:
if (m_bFilterList)
- xController = new ComboBoxCellController(static_cast<ComboBoxControl*>(m_pWindow));
+ xController = new ComboBoxCellController(static_cast<ComboBoxControl*>(m_pWindow.get()));
else
- xController = new EditCellController(static_cast<Edit*>(m_pWindow));
+ xController = new EditCellController(static_cast<Edit*>(m_pWindow.get()));
}
return xController;
}
@@ -2884,9 +2881,9 @@ bool DbFilterField::commitControl()
return true;
case ::com::sun::star::form::FormComponentType::LISTBOX:
aText.clear();
- if (static_cast<ListBox*>(m_pWindow)->GetSelectEntryCount())
+ if (static_cast<ListBox*>(m_pWindow.get())->GetSelectEntryCount())
{
- sal_Int16 nPos = (sal_Int16)static_cast<ListBox*>(m_pWindow)->GetSelectEntryPos();
+ sal_Int16 nPos = (sal_Int16)static_cast<ListBox*>(m_pWindow.get())->GetSelectEntryPos();
if ( ( nPos >= 0 ) && ( nPos < m_aValueList.getLength() ) )
aText = m_aValueList.getConstArray()[nPos];
}
@@ -2967,16 +2964,16 @@ void DbFilterField::SetText(const OUString& rText)
else
eState = TRISTATE_INDET;
- static_cast<CheckBoxControl*>(m_pWindow)->GetBox().SetState(eState);
- static_cast<CheckBoxControl*>(m_pPainter)->GetBox().SetState(eState);
+ static_cast<CheckBoxControl*>(m_pWindow.get())->GetBox().SetState(eState);
+ static_cast<CheckBoxControl*>(m_pPainter.get())->GetBox().SetState(eState);
} break;
case ::com::sun::star::form::FormComponentType::LISTBOX:
{
Sequence<sal_Int16> aPosSeq = ::comphelper::findValue(m_aValueList, m_aText, true);
if (aPosSeq.getLength())
- static_cast<ListBox*>(m_pWindow)->SelectEntryPos(aPosSeq.getConstArray()[0], true);
+ static_cast<ListBox*>(m_pWindow.get())->SelectEntryPos(aPosSeq.getConstArray()[0], true);
else
- static_cast<ListBox*>(m_pWindow)->SetNoSelection();
+ static_cast<ListBox*>(m_pWindow.get())->SetNoSelection();
} break;
default:
m_pWindow->SetText(m_aText);
@@ -3099,7 +3096,7 @@ void DbFilterField::Update()
// filling the entries for the combobox
for (::std::vector< OUString >::const_iterator iter = aStringList.begin();
iter != aStringList.end(); ++iter)
- static_cast<ComboBox*>(m_pWindow)->InsertEntry(*iter, LISTBOX_APPEND);
+ static_cast<ComboBox*>(m_pWindow.get())->InsertEntry(*iter, LISTBOX_APPEND);
}
}
}
@@ -3119,7 +3116,7 @@ void DbFilterField::UpdateFromField(const Reference< XColumn >& /*_rxField*/, co
IMPL_LINK_NOARG(DbFilterField, OnClick)
{
- TriState eState = static_cast<CheckBoxControl*>(m_pWindow)->GetBox().GetState();
+ TriState eState = static_cast<CheckBoxControl*>(m_pWindow.get())->GetBox().GetState();
OUString aText;
switch (eState)
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 89caf2621282..21ba11a36f03 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -88,7 +88,7 @@ using namespace com::sun::star::accessibility;
class RowSetEventListener : public ::cppu::WeakImplHelper1<XRowsChangeListener>
{
- DbGridControl* m_pControl;
+ VclPtr<DbGridControl> m_pControl;
public:
RowSetEventListener(DbGridControl* i_pControl) : m_pControl(i_pControl)
{
@@ -250,10 +250,10 @@ bool CompareBookmark(const Any& aLeft, const Any& aRight)
class FmXGridSourcePropListener : public ::comphelper::OPropertyChangeListener
{
- DbGridControl* m_pParent;
+ VclPtr<DbGridControl> m_pParent;
// a DbGridControl has no mutex, so we use our own as the base class expects one
- osl::Mutex m_aMutex;
+ osl::Mutex m_aMutex;
sal_Int16 m_nSuspended;
public:
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index c09637e7e59d..b6823a2e0ae5 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -148,6 +148,7 @@ namespace svxform
void DataTreeListBox::dispose()
{
DeleteAndClear();
+ m_pXFormsPage.clear();
SvTreeListBox::dispose();
}
@@ -374,6 +375,19 @@ namespace svxform
ItemSelectHdl( m_pItemList );
}
+ XFormsPage::~XFormsPage()
+ {
+ dispose();
+ }
+
+ void XFormsPage::dispose()
+ {
+ m_pToolBox.clear();
+ m_pItemList.clear();
+ m_pNaviWin.clear();
+ TabPage::dispose();
+ }
+
IMPL_LINK_NOARG(XFormsPage, TbxSelectHdl)
{
DoToolBoxAction( m_pToolBox->GetCurItemId() );
@@ -1418,16 +1432,10 @@ namespace svxform
aAny <<= m_bShowDetails;
aViewOpt.SetUserItem(CFGNAME_SHOWDETAILS,aAny);
- delete m_pInstPage;
- m_pInstPage = NULL;
- delete m_pSubmissionPage;
- m_pSubmissionPage = NULL;
- delete m_pBindingPage;
- m_pBindingPage = NULL;
+ m_pInstPage.clear();
+ m_pSubmissionPage.clear();
+ m_pBindingPage.clear();
- sal_Int32 i, nCount = m_aPageList.size();
- for ( i = 0; i < nCount; ++i )
- delete m_aPageList[i];
m_aPageList.clear();
Reference< XFrameActionListener > xListener(
@@ -1436,6 +1444,10 @@ namespace svxform
RemoveBroadcaster();
m_xDataListener.clear();
disposeBuilder();
+ m_pModelsBox.clear();
+ m_pModelBtn.clear();
+ m_pTabCtrl.clear();
+ m_pInstanceBtn.clear();
vcl::Window::dispose();
}
@@ -1712,7 +1724,7 @@ namespace svxform
}
else
{
- DELETEZ( m_pInstPage );
+ m_pInstPage.clear();
bDoRemove = true;
}
@@ -2244,7 +2256,7 @@ namespace svxform
pWindow = new DataNavigator( _pBindings, this, _pParent );
eChildAlignment = SfxChildAlignment::RIGHT;
pWindow->SetSizePixel( Size( 250, 400 ) );
- static_cast<SfxDockingWindow*>(pWindow)->Initialize( _pInfo );
+ static_cast<SfxDockingWindow*>(pWindow.get())->Initialize( _pInfo );
}
AddDataItemDialog::AddDataItemDialog(vcl::Window* pParent, ItemNode* _pNode,
@@ -2316,6 +2328,26 @@ namespace svxform
// remove binding, if it does not convey 'useful' information
m_xUIHelper->removeBindingIfUseless( m_xBinding );
}
+ m_pItemFrame.clear();
+ m_pNameFT.clear();
+ m_pNameED.clear();
+ m_pDefaultFT.clear();
+ m_pDefaultED.clear();
+ m_pDefaultBtn.clear();
+ m_pSettingsFrame.clear();
+ m_pDataTypeFT.clear();
+ m_pDataTypeLB.clear();
+ m_pRequiredCB.clear();
+ m_pRequiredBtn.clear();
+ m_pRelevantCB.clear();
+ m_pRelevantBtn.clear();
+ m_pConstraintCB.clear();
+ m_pConstraintBtn.clear();
+ m_pReadonlyCB.clear();
+ m_pReadonlyBtn.clear();
+ m_pCalculateCB.clear();
+ m_pCalculateBtn.clear();
+ m_pOKBtn.clear();
ModalDialog::dispose();
}
@@ -2785,6 +2817,19 @@ namespace svxform
ResultHdl( &m_aResultIdle );
}
+ AddConditionDialog::~AddConditionDialog()
+ {
+ dispose();
+ }
+
+ void AddConditionDialog::dispose()
+ {
+ m_pConditionED.clear();
+ m_pResultWin.clear();
+ m_pEditNamespacesBtn.clear();
+ m_pOKBtn.clear();
+ ModalDialog::dispose();
+ }
IMPL_LINK_NOARG(AddConditionDialog, EditHdl)
{
@@ -2903,7 +2948,12 @@ namespace svxform
void NamespaceItemDialog::dispose()
{
- delete m_pNamespacesList;
+ m_pNamespacesList.clear();
+ m_pAddNamespaceBtn.clear();
+ m_pEditNamespaceBtn.clear();
+ m_pDeleteNamespaceBtn.clear();
+ m_pOKBtn.clear();
+ m_pConditionDlg.clear();
ModalDialog::dispose();
}
@@ -3045,6 +3095,19 @@ namespace svxform
m_pOKBtn->SetClickHdl( LINK( this, ManageNamespaceDialog, OKHdl ) );
}
+ ManageNamespaceDialog::~ManageNamespaceDialog()
+ {
+ dispose();
+ }
+
+ void ManageNamespaceDialog::dispose()
+ {
+ m_pOKBtn.clear();
+ m_pPrefixED.clear();
+ m_pUrlED.clear();
+ m_pConditionDlg.clear();
+ ModalDialog::dispose();
+ }
IMPL_LINK_NOARG(ManageNamespaceDialog, OKHdl)
{
@@ -3103,6 +3166,14 @@ namespace svxform
// #i38991# if we have added a binding, we need to remove it as well.
if( m_xCreatedBinding.is() && m_xUIHelper.is() )
m_xUIHelper->removeBindingIfUseless( m_xCreatedBinding );
+ m_pNameED.clear();
+ m_pActionED.clear();
+ m_pMethodLB.clear();
+ m_pRefED.clear();
+ m_pRefBtn.clear();
+ m_pBindLB.clear();
+ m_pReplaceLB.clear();
+ m_pOKBtn.clear();
ModalDialog::dispose();
}
@@ -3304,6 +3375,18 @@ namespace svxform
SetText(get<FixedText>("alttitle")->GetText());
}
+ AddModelDialog::~AddModelDialog()
+ {
+ dispose();
+ }
+
+ void AddModelDialog::dispose()
+ {
+ m_pNameED.clear();
+ m_pModifyCB.clear();
+ ModalDialog::dispose();
+ }
+
AddInstanceDialog::AddInstanceDialog(vcl::Window* pParent, bool _bEdit)
: ModalDialog(pParent, "AddInstanceDialog" , "svx/ui/addinstancedialog.ui")
{
@@ -3323,6 +3406,20 @@ namespace svxform
m_sAllFilterName = ResId(STR_FILTERNAME_ALL, *ResMgr::CreateResMgr("fps_office")).toString();
}
+ AddInstanceDialog::~AddInstanceDialog()
+ {
+ dispose();
+ }
+
+ void AddInstanceDialog::dispose()
+ {
+ m_pNameED.clear();
+ m_pURLFT.clear();
+ m_pURLED.clear();
+ m_pFilePickerBtn.clear();
+ m_pLinkInstanceCB.clear();
+ ModalDialog::dispose();
+ }
IMPL_LINK_NOARG(AddInstanceDialog, FilePickerHdl)
{
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index d5a48f67b5ef..ccfce934dbb2 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1872,7 +1872,7 @@ FmFilterNavigatorWin::~FmFilterNavigatorWin()
void FmFilterNavigatorWin::dispose()
{
- delete m_pNavigator;
+ m_pNavigator.clear();
SfxDockingWindow::dispose();
}
@@ -1996,7 +1996,7 @@ FmFilterNavigatorWinMgr::FmFilterNavigatorWinMgr( vcl::Window *_pParent, sal_uIn
{
pWindow = new FmFilterNavigatorWin( _pBindings, this, _pParent );
eChildAlignment = SfxChildAlignment::NOALIGNMENT;
- static_cast<SfxDockingWindow*>(pWindow)->Initialize( _pInfo );
+ static_cast<SfxDockingWindow*>(pWindow.get())->Initialize( _pInfo );
}
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index f3a43260a1cc..caef3efe94be 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -85,11 +85,10 @@ FmPropBrwMgr::FmPropBrwMgr( vcl::Window* _pParent, sal_uInt16 _nId,
{
pWindow = new FmPropBrw( ::comphelper::getProcessComponentContext(), _pBindings, this, _pParent, _pInfo );
eChildAlignment = SfxChildAlignment::NOALIGNMENT;
- static_cast<SfxFloatingWindow*>(pWindow)->Initialize( _pInfo );
+ static_cast<SfxFloatingWindow*>(pWindow.get())->Initialize( _pInfo );
}
-
const long STD_WIN_SIZE_X = 300;
const long STD_WIN_SIZE_Y = 350;
diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx
index 49caf56b6154..635d53f1e94f 100644
--- a/svx/source/form/fmexpl.cxx
+++ b/svx/source/form/fmexpl.cxx
@@ -519,7 +519,7 @@ namespace svxform
void NavigatorFrame::dispose()
{
- delete m_pNavigatorTree;
+ m_pNavigatorTree.clear();
SfxDockingWindow::dispose();
}
@@ -615,7 +615,7 @@ namespace svxform
{
pWindow = new NavigatorFrame( _pBindings, this, _pParent );
eChildAlignment = SfxChildAlignment::NOALIGNMENT;
- static_cast<SfxDockingWindow*>(pWindow)->Initialize( _pInfo );
+ static_cast<SfxDockingWindow*>(pWindow.get())->Initialize( _pInfo );
}
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 19a306d8e43c..942f95a46f15 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -113,6 +113,17 @@ FmFieldWinListBox::FmFieldWinListBox( FmFieldWin* pParent )
SetHighlightRange( );
}
+FmFieldWinListBox::~FmFieldWinListBox()
+{
+ dispose();
+}
+
+void FmFieldWinListBox::dispose()
+{
+ pTabWin.clear();
+ SvTreeListBox::dispose();
+}
+
sal_Int8 FmFieldWinListBox::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
{
@@ -198,7 +209,7 @@ void FmFieldWin::dispose()
m_pChangeListener->release();
// delete m_pChangeListener;
}
- delete pListBox;
+ pListBox.clear();
delete pData;
SfxFloatingWindow::dispose();
}
@@ -416,7 +427,7 @@ FmFieldWinMgr::FmFieldWinMgr(vcl::Window* _pParent, sal_uInt16 _nId,
pWindow = new FmFieldWin(_pBindings, this, _pParent);
SetHideNotDelete(true);
eChildAlignment = SfxChildAlignment::NOALIGNMENT;
- static_cast<SfxFloatingWindow*>(pWindow)->Initialize( _pInfo );
+ static_cast<SfxFloatingWindow*>(pWindow.get())->Initialize( _pInfo );
}
diff --git a/svx/source/form/xfm_addcondition.cxx b/svx/source/form/xfm_addcondition.cxx
index 8a0c27557564..a0da5da65266 100644
--- a/svx/source/form/xfm_addcondition.cxx
+++ b/svx/source/form/xfm_addcondition.cxx
@@ -158,7 +158,7 @@ namespace svxform
{
OAddConditionDialogBase::executedDialog( _nExecutionResult );
if ( _nExecutionResult == RET_OK )
- m_sConditionValue = static_cast< AddConditionDialog* >( m_pDialog )->GetCondition();
+ m_sConditionValue = static_cast< AddConditionDialog* >( m_pDialog.get() )->GetCondition();
}
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index e245dee4480e..e64bd9a96ded 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -152,8 +152,7 @@ GalleryBrowser1::~GalleryBrowser1()
void GalleryBrowser1::dispose()
{
EndListening( *mpGallery );
- delete mpThemes;
- mpThemes = NULL;
+ mpThemes.clear();
delete mpExchangeData;
mpExchangeData = NULL;
maNewTheme.disposeAndClear();
diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx
index 1b24dd9c63a4..bda3bdcbbae8 100644
--- a/svx/source/gallery2/galbrws1.hxx
+++ b/svx/source/gallery2/galbrws1.hxx
@@ -81,7 +81,7 @@ class GalleryBrowser1 : public Control, SfxListener
private:
VclPtr<GalleryButton> maNewTheme;
- GalleryThemeListBox* mpThemes;
+ VclPtr<GalleryThemeListBox> mpThemes;
Gallery* mpGallery;
ExchangeData* mpExchangeData;
SfxItemSet* mpThemePropsDlgItemSet;
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 83849bf2b161..15bfd3646a2f 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -110,10 +110,10 @@ class GalleryThemePopup : public ::cppu::WeakImplHelper1< css::frame::XStatusLis
private:
const GalleryTheme* mpTheme;
sal_uIntPtr mnObjectPos;
- bool mbPreview;
+ bool mbPreview;
PopupMenu maPopupMenu;
PopupMenu maBackgroundPopup;
- GalleryBrowser2* mpBrowser;
+ VclPtr<GalleryBrowser2> mpBrowser;
typedef std::map< int, CommandInfo > CommandInfoMap;
CommandInfoMap m_aCommandInfo;
@@ -481,9 +481,9 @@ void GalleryBrowser2::dispose()
{
maMiscOptions.RemoveListenerLink( LINK( this, GalleryBrowser2, MiscHdl ) );
- delete mpPreview;
- delete mpListView;
- delete mpIconView;
+ mpPreview.clear();
+ mpListView.clear();
+ mpIconView.clear();
if( mpCurTheme )
mpGallery->ReleaseTheme( mpCurTheme, *this );
@@ -740,9 +740,9 @@ bool GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, vcl::Window* pWindow )
void GalleryBrowser2::SelectTheme( const OUString& rThemeName )
{
- delete mpIconView, mpIconView = NULL;
- delete mpListView, mpListView = NULL;
- delete mpPreview, mpPreview = NULL;
+ mpIconView.clear();
+ mpListView.clear();
+ mpPreview.clear();
if( mpCurTheme )
mpGallery->ReleaseTheme( mpCurTheme, *this );
diff --git a/svx/source/inc/AccessibleFrameSelector.hxx b/svx/source/inc/AccessibleFrameSelector.hxx
index 62cf8cf486fc..f1a5c9140052 100644
--- a/svx/source/inc/AccessibleFrameSelector.hxx
+++ b/svx/source/inc/AccessibleFrameSelector.hxx
@@ -34,6 +34,7 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <comphelper/accessibleeventnotifier.hxx>
#include <svx/framebordertype.hxx>
+#include <vcl/vclptr.hxx>
class VclSimpleEvent;
class VclWindowEvent;
@@ -109,7 +110,7 @@ private:
void IsValid() throw (::com::sun::star::uno::RuntimeException);
void RemoveFrameSelEventListener();
- FrameSelector* mpFrameSel;
+ VclPtr<FrameSelector> mpFrameSel;
::osl::Mutex maFocusMutex;
::osl::Mutex maPropertyMutex;
diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx
index 1c0955c26f85..accef9c952c3 100644
--- a/svx/source/inc/GraphCtlAccessibleContext.hxx
+++ b/svx/source/inc/GraphCtlAccessibleContext.hxx
@@ -225,7 +225,7 @@ private:
typedef ::std::map< const SdrObject*, ::accessibility::AccessibleShape*, SdrObjectCompareLess > ShapesMapType;
ShapesMapType mxShapes;
- GraphCtrl* mpControl;
+ VclPtr<GraphCtrl> mpControl;
SdrModel* mpModel;
SdrPage* mpPage;
diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx
index cc964f8b6155..1c09cfcd1ffd 100644
--- a/svx/source/inc/charmapacc.hxx
+++ b/svx/source/inc/charmapacc.hxx
@@ -40,7 +40,7 @@ namespace svx
class SvxShowCharSetVirtualAcc : public ::comphelper::OAccessibleComponentHelper,
public OAccessibleHelper_Base_2
{
- SvxShowCharSet* mpParent; // the vcl control
+ VclPtr<SvxShowCharSet> mpParent; // the vcl control
SvxShowCharSetAcc* m_pTable; // the table, which holds the characters shown by the vcl control
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xAcc; // the ref to the table
protected:
diff --git a/svx/source/inc/datalistener.hxx b/svx/source/inc/datalistener.hxx
index 875a7d5bd1e1..32132b24d2ae 100644
--- a/svx/source/inc/datalistener.hxx
+++ b/svx/source/inc/datalistener.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/frame/XFrameActionListener.hpp>
#include <com/sun/star/xml/dom/events/XEventListener.hpp>
+#include <vcl/vclptr.hxx>
namespace svxform
@@ -39,7 +40,7 @@ namespace svxform
class DataListener : public DataListener_t
{
private:
- DataNavigatorWindow* m_pNaviWin;
+ VclPtr<DataNavigatorWindow> m_pNaviWin;
public:
DataListener( DataNavigatorWindow* pNaviWin );
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 9c54186727b5..b2b605d8de09 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -115,7 +115,7 @@ namespace svxform
class DataTreeListBox : public SvTreeListBox
{
private:
- XFormsPage* m_pXFormsPage;
+ VclPtr<XFormsPage> m_pXFormsPage;
DataGroupType m_eGroup;
sal_uInt16 m_nAddId;
sal_uInt16 m_nAddElementId;
@@ -250,8 +250,8 @@ namespace svxform
MethodString m_aMethodString;
ReplaceString m_aReplaceString;
- ToolBox *m_pToolBox;
- DataTreeListBox *m_pItemList;
+ VclPtr<ToolBox> m_pToolBox;
+ VclPtr<DataTreeListBox> m_pItemList;
sal_uInt16 m_nAddId;
sal_uInt16 m_nAddElementId;
sal_uInt16 m_nAddAttributeId;
@@ -260,7 +260,7 @@ namespace svxform
XFormsUIHelper1_ref m_xUIHelper;
- DataNavigatorWindow* m_pNaviWin;
+ VclPtr<DataNavigatorWindow> m_pNaviWin;
bool m_bHasModel;
DataGroupType m_eGroup;
ImageList m_TbxImageList;
@@ -289,6 +289,8 @@ namespace svxform
public:
XFormsPage( vcl::Window* pParent, DataNavigatorWindow* _pNaviWin, DataGroupType _eGroup );
+ virtual ~XFormsPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
@@ -319,20 +321,20 @@ namespace svxform
- typedef std::vector< XFormsPage* > PageList;
+ typedef std::vector< VclPtr<XFormsPage> > PageList;
typedef ::rtl::Reference < DataListener > DataListener_ref;
class DataNavigatorWindow : public vcl::Window, public VclBuilderContainer
{
private:
- ListBox* m_pModelsBox;
- MenuButton* m_pModelBtn;
- TabControl* m_pTabCtrl;
- MenuButton* m_pInstanceBtn;
+ VclPtr<ListBox> m_pModelsBox;
+ VclPtr<MenuButton> m_pModelBtn;
+ VclPtr<TabControl> m_pTabCtrl;
+ VclPtr<MenuButton> m_pInstanceBtn;
- XFormsPage* m_pInstPage;
- XFormsPage* m_pSubmissionPage;
- XFormsPage* m_pBindingPage;
+ VclPtr<XFormsPage> m_pInstPage;
+ VclPtr<XFormsPage> m_pSubmissionPage;
+ VclPtr<XFormsPage> m_pBindingPage;
sal_Int32 m_nLastSelectedPos;
bool m_bShowDetails;
@@ -424,30 +426,30 @@ namespace svxform
{
private:
- VclFrame* m_pItemFrame;
- FixedText* m_pNameFT;
- Edit* m_pNameED;
- FixedText* m_pDefaultFT;
- Edit* m_pDefaultED;
- PushButton* m_pDefaultBtn;
+ VclPtr<VclFrame> m_pItemFrame;
+ VclPtr<FixedText> m_pNameFT;
+ VclPtr<Edit> m_pNameED;
+ VclPtr<FixedText> m_pDefaultFT;
+ VclPtr<Edit> m_pDefaultED;
+ VclPtr<PushButton> m_pDefaultBtn;
- VclFrame* m_pSettingsFrame;
+ VclPtr<VclFrame> m_pSettingsFrame;
- FixedText* m_pDataTypeFT;
- ListBox* m_pDataTypeLB;
+ VclPtr<FixedText> m_pDataTypeFT;
+ VclPtr<ListBox> m_pDataTypeLB;
- CheckBox* m_pRequiredCB;
- PushButton* m_pRequiredBtn;
- CheckBox* m_pRelevantCB;
- PushButton* m_pRelevantBtn;
- CheckBox* m_pConstraintCB;
- PushButton* m_pConstraintBtn;
- CheckBox* m_pReadonlyCB;
- PushButton* m_pReadonlyBtn;
- CheckBox* m_pCalculateCB;
- PushButton* m_pCalculateBtn;
+ VclPtr<CheckBox> m_pRequiredCB;
+ VclPtr<PushButton> m_pRequiredBtn;
+ VclPtr<CheckBox> m_pRelevantCB;
+ VclPtr<PushButton> m_pRelevantBtn;
+ VclPtr<CheckBox> m_pConstraintCB;
+ VclPtr<PushButton> m_pConstraintBtn;
+ VclPtr<CheckBox> m_pReadonlyCB;
+ VclPtr<PushButton> m_pReadonlyBtn;
+ VclPtr<CheckBox> m_pCalculateCB;
+ VclPtr<PushButton> m_pCalculateBtn;
- OKButton* m_pOKBtn;
+ VclPtr<OKButton> m_pOKBtn;
XFormsUIHelper1_ref m_xUIHelper;
XPropertySet_ref m_xBinding;
@@ -481,13 +483,13 @@ namespace svxform
class AddConditionDialog : public ModalDialog
{
private:
- VclMultiLineEdit* m_pConditionED;
- VclMultiLineEdit* m_pResultWin;
- PushButton* m_pEditNamespacesBtn;
- OKButton* m_pOKBtn;
+ VclPtr<VclMultiLineEdit> m_pConditionED;
+ VclPtr<VclMultiLineEdit> m_pResultWin;
+ VclPtr<PushButton> m_pEditNamespacesBtn;
+ VclPtr<OKButton> m_pOKBtn;
Idle m_aResultIdle;
- OUString m_sPropertyName;
+ OUString m_sPropertyName;
XFormsUIHelper1_ref m_xUIHelper;
XPropertySet_ref m_xBinding;
@@ -500,6 +502,8 @@ namespace svxform
public:
AddConditionDialog(vcl::Window* pParent,
const OUString& _rPropertyName, const XPropertySet_ref& _rBinding);
+ virtual ~AddConditionDialog();
+ virtual void dispose() SAL_OVERRIDE;
XFormsUIHelper1_ref GetUIHelper() const { return m_xUIHelper; }
OUString GetCondition() const { return m_pConditionED->GetText(); }
@@ -516,13 +520,13 @@ namespace svxform
private:
typedef std::vector< OUString > PrefixList;
- SvSimpleTable* m_pNamespacesList;
- PushButton* m_pAddNamespaceBtn;
- PushButton* m_pEditNamespaceBtn;
- PushButton* m_pDeleteNamespaceBtn;
- OKButton* m_pOKBtn;
+ VclPtr<SvSimpleTable> m_pNamespacesList;
+ VclPtr<PushButton> m_pAddNamespaceBtn;
+ VclPtr<PushButton> m_pEditNamespaceBtn;
+ VclPtr<PushButton> m_pDeleteNamespaceBtn;
+ VclPtr<OKButton> m_pOKBtn;
- AddConditionDialog* m_pConditionDlg;
+ VclPtr<AddConditionDialog> m_pConditionDlg;
PrefixList m_aRemovedList;
XNameContainer_ref& m_rNamespaces;
@@ -543,16 +547,18 @@ namespace svxform
class ManageNamespaceDialog : public ModalDialog
{
private:
- Edit* m_pPrefixED;
- Edit* m_pUrlED;
- OKButton* m_pOKBtn;
+ VclPtr<Edit> m_pPrefixED;
+ VclPtr<Edit> m_pUrlED;
+ VclPtr<OKButton> m_pOKBtn;
- AddConditionDialog* m_pConditionDlg;
+ VclPtr<AddConditionDialog> m_pConditionDlg;
DECL_LINK(OKHdl, void *);
public:
ManageNamespaceDialog(vcl::Window* pParent, AddConditionDialog* _pCondDlg, bool bIsEdit);
+ virtual ~ManageNamespaceDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetNamespace(const OUString& _rPrefix, const OUString& _rURL)
{
@@ -570,15 +576,15 @@ namespace svxform
MethodString m_aMethodString;
ReplaceString m_aReplaceString;
- Edit* m_pNameED;
- Edit* m_pActionED;
- ListBox* m_pMethodLB;
- Edit* m_pRefED;
- PushButton* m_pRefBtn;
- ListBox* m_pBindLB;
- ListBox* m_pReplaceLB;
+ VclPtr<Edit> m_pNameED;
+ VclPtr<Edit> m_pActionED;
+ VclPtr<ListBox> m_pMethodLB;
+ VclPtr<Edit> m_pRefED;
+ VclPtr<PushButton> m_pRefBtn;
+ VclPtr<ListBox> m_pBindLB;
+ VclPtr<ListBox> m_pReplaceLB;
- OKButton* m_pOKBtn;
+ VclPtr<OKButton> m_pOKBtn;
ItemNode* m_pItemNode;
@@ -606,11 +612,13 @@ namespace svxform
class AddModelDialog : public ModalDialog
{
private:
- Edit* m_pNameED;
- CheckBox* m_pModifyCB;
+ VclPtr<Edit> m_pNameED;
+ VclPtr<CheckBox> m_pModifyCB;
public:
AddModelDialog( vcl::Window* pParent, bool _bEdit );
+ virtual ~AddModelDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetName() const { return m_pNameED->GetText(); }
void SetName( const OUString& _rName ) { m_pNameED->SetText( _rName );}
@@ -623,11 +631,11 @@ namespace svxform
class AddInstanceDialog : public ModalDialog
{
private:
- Edit* m_pNameED;
- FixedText* m_pURLFT;
- SvtURLBox* m_pURLED;
- PushButton* m_pFilePickerBtn;
- CheckBox* m_pLinkInstanceCB;
+ VclPtr<Edit> m_pNameED;
+ VclPtr<FixedText> m_pURLFT;
+ VclPtr<SvtURLBox> m_pURLED;
+ VclPtr<PushButton> m_pFilePickerBtn;
+ VclPtr<CheckBox> m_pLinkInstanceCB;
OUString m_sAllFilterName;
@@ -635,6 +643,8 @@ namespace svxform
public:
AddInstanceDialog( vcl::Window* pParent, bool _bEdit );
+ virtual ~AddInstanceDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetRenameMode()
{
diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx
index 216ca9ec0a9c..326260e42f52 100644
--- a/svx/source/inc/docrecovery.hxx
+++ b/svx/source/inc/docrecovery.hxx
@@ -319,7 +319,7 @@ class PluginProgress : public ::cppu::WeakImplHelper2< css::task::XStatusIndicat
css::uno::Reference< css::task::XStatusIndicator > m_xProgress;
- PluginProgressWindow* m_pPlugProgressWindow;
+ VclPtr<PluginProgressWindow> m_pPlugProgressWindow;
// native interface
@@ -370,9 +370,9 @@ class SaveDialog : public Dialog
{
// member
private:
- FixedText* m_pTitleFT;
- ListBox* m_pFileListLB;
- OKButton* m_pOkBtn;
+ VclPtr<FixedText> m_pTitleFT;
+ VclPtr<ListBox> m_pFileListLB;
+ VclPtr<OKButton> m_pOkBtn;
RecoveryCore* m_pCore;
// interface
@@ -393,6 +393,8 @@ class SaveDialog : public Dialog
which should be shown inside this dialog.
*/
SaveDialog(vcl::Window* pParent, RecoveryCore* pCore);
+ virtual ~SaveDialog();
+ virtual void dispose() SAL_OVERRIDE;
DECL_LINK(OKButtonHdl, void*);
};
@@ -402,7 +404,7 @@ class SaveProgressDialog : public ModalDialog
{
// member
private:
- vcl::Window* m_pProgrParent;
+ VclPtr<vcl::Window> m_pProgrParent;
// @short TODO
RecoveryCore* m_pCore;
@@ -426,6 +428,8 @@ class SaveProgressDialog : public ModalDialog
*/
SaveProgressDialog(vcl::Window* pParent,
RecoveryCore* pCore );
+ virtual ~SaveProgressDialog();
+ virtual void dispose() SAL_OVERRIDE;
/** @short start the emergency save operation. */
virtual short Execute() SAL_OVERRIDE;
@@ -493,12 +497,12 @@ class RecoveryDialog : public Dialog
{
// member
private:
- FixedText* m_pTitleFT;
- FixedText* m_pDescrFT;
- vcl::Window* m_pProgrParent;
- RecovDocList* m_pFileListLB;
- PushButton* m_pNextBtn;
- PushButton* m_pCancelBtn;
+ VclPtr<FixedText> m_pTitleFT;
+ VclPtr<FixedText> m_pDescrFT;
+ VclPtr<vcl::Window> m_pProgrParent;
+ VclPtr<RecovDocList> m_pFileListLB;
+ VclPtr<PushButton> m_pNextBtn;
+ VclPtr<PushButton> m_pCancelBtn;
OUString m_aTitleRecoveryInProgress;
OUString m_aRecoveryOnlyFinish;
OUString m_aRecoveryOnlyFinishDescr;
@@ -554,11 +558,11 @@ class BrokenRecoveryDialog : public ModalDialog
// member
private:
- ListBox *m_pFileListLB;
- Edit *m_pSaveDirED;
- PushButton *m_pSaveDirBtn;
- PushButton *m_pOkBtn;
- CancelButton *m_pCancelBtn;
+ VclPtr<ListBox> m_pFileListLB;
+ VclPtr<Edit> m_pSaveDirED;
+ VclPtr<PushButton> m_pSaveDirBtn;
+ VclPtr<PushButton> m_pOkBtn;
+ VclPtr<CancelButton> m_pCancelBtn;
OUString m_sSavePath;
RecoveryCore* m_pCore;
@@ -574,6 +578,8 @@ class BrokenRecoveryDialog : public ModalDialog
BrokenRecoveryDialog(vcl::Window* pParent ,
RecoveryCore* pCore ,
bool bBeforeRecovery);
+ virtual ~BrokenRecoveryDialog();
+ virtual void dispose() SAL_OVERRIDE;
/** @short TODO */
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index 0fbd75111899..966a0f892fee 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -316,7 +316,7 @@ private:
class FmFilterNavigatorWin : public SfxDockingWindow, public SfxControllerItem
{
private:
- FmFilterNavigator* m_pNavigator;
+ VclPtr<FmFilterNavigator> m_pNavigator;
protected:
virtual void Resize() SAL_OVERRIDE;
diff --git a/svx/source/inc/fmexch.hxx b/svx/source/inc/fmexch.hxx
index 5f77950826de..8c2c6b2c6240 100644
--- a/svx/source/inc/fmexch.hxx
+++ b/svx/source/inc/fmexch.hxx
@@ -98,7 +98,7 @@ namespace svxform
class SVX_DLLPUBLIC OLocalExchangeHelper
{
protected:
- vcl::Window* m_pDragSource;
+ VclPtr<vcl::Window> m_pDragSource;
OLocalExchange* m_pTransferable;
public:
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index e5baf40a8fce..187cd750f8ba 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -556,7 +556,7 @@ namespace svxform
class NavigatorFrame : public SfxDockingWindow, public SfxControllerItem
{
private:
- ::svxform::NavigatorTree* m_pNavigatorTree;
+ VclPtr<::svxform::NavigatorTree> m_pNavigatorTree;
protected:
virtual void Resize() SAL_OVERRIDE;
diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx
index bc725c197426..31a6adc3f444 100644
--- a/svx/source/inc/fmvwimp.hxx
+++ b/svx/source/inc/fmvwimp.hxx
@@ -45,6 +45,7 @@
#include <cppuhelper/implbase3.hxx>
#include <comphelper/uno3.hxx>
#include <rtl/ref.hxx>
+#include <vcl/vclptr.hxx>
class SdrPageWindow;
@@ -93,7 +94,7 @@ class FormViewPageWindowAdapter : public FormViewPageWindowAdapter_Base
::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > m_xControlContainer;
css::uno::Reference<css::uno::XComponentContext> m_xContext;
FmXFormView* m_pViewImpl;
- vcl::Window* m_pWindow;
+ VclPtr<vcl::Window> m_pWindow;
protected:
virtual ~FormViewPageWindowAdapter();
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 8d1ddf95be69..0df523fffa2d 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -214,8 +214,8 @@ private:
protected:
DbGridColumn& m_rColumn;
- vcl::Window* m_pPainter;
- vcl::Window* m_pWindow;
+ VclPtr<vcl::Window> m_pPainter;
+ VclPtr<vcl::Window> m_pWindow;
protected:
// attribute access
@@ -946,8 +946,8 @@ class FmXCheckBoxCell : public FmXDataCell,
{
::cppu::OInterfaceContainerHelper m_aItemListeners;
::cppu::OInterfaceContainerHelper m_aActionListeners;
- OUString m_aActionCommand;
- CheckBox* m_pBox;
+ OUString m_aActionCommand;
+ VclPtr<CheckBox> m_pBox;
protected:
virtual ~FmXCheckBoxCell();
@@ -991,7 +991,7 @@ class FmXListBoxCell :public FmXTextCell
{
::cppu::OInterfaceContainerHelper m_aItemListeners,
m_aActionListeners;
- ListBox* m_pBox;
+ VclPtr<ListBox> m_pBox;
protected:
virtual ~FmXListBoxCell();
@@ -1046,7 +1046,7 @@ class FmXComboBoxCell :public FmXTextCell
private:
::cppu::OInterfaceContainerHelper m_aItemListeners,
m_aActionListeners;
- ComboBox* m_pComboBox;
+ VclPtr<ComboBox> m_pComboBox;
protected:
virtual ~FmXComboBoxCell();
diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx
index 2ef95908230d..871016352b0b 100644
--- a/svx/source/inc/svxrectctaccessiblecontext.hxx
+++ b/svx/source/inc/svxrectctaccessiblecontext.hxx
@@ -46,6 +46,7 @@
#include <cppuhelper/implbase7.hxx>
#include <comphelper/servicehelper.hxx>
#include <svx/rectenum.hxx>
+#include <vcl/vclptr.hxx>
namespace com { namespace sun { namespace star { namespace awt {
struct Point;
@@ -266,7 +267,7 @@ private:
mxParent;
/// pointer to internal representation
- SvxRectCtl* mpRepr;
+ VclPtr<SvxRectCtl> mpRepr;
/// array for all possible children
SvxRectCtlChildAccessibleContext** mpChildren;
diff --git a/svx/source/inc/tabwin.hxx b/svx/source/inc/tabwin.hxx
index 67230a998865..77c17dcf31ee 100644
--- a/svx/source/inc/tabwin.hxx
+++ b/svx/source/inc/tabwin.hxx
@@ -35,13 +35,15 @@ class FmFieldWin;
class FmFieldWinListBox
:public SvTreeListBox
{
- FmFieldWin* pTabWin;
+ VclPtr<FmFieldWin> pTabWin;
protected:
// virtual void Command( const CommandEvent& rEvt );
public:
FmFieldWinListBox( FmFieldWin* pParent );
+ virtual ~FmFieldWinListBox();
+ virtual void dispose() SAL_OVERRIDE;
sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) SAL_OVERRIDE;
sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) SAL_OVERRIDE;
@@ -72,7 +74,7 @@ class FmFieldWin :public SfxFloatingWindow
,public ::svxform::OStaticDataAccessTools
{
::osl::Mutex m_aMutex;
- FmFieldWinListBox* pListBox;
+ VclPtr<FmFieldWinListBox> pListBox;
FmFieldWinData* pData;
::svxform::SharedConnection
m_aConnection;
diff --git a/svx/source/inc/tbxform.hxx b/svx/source/inc/tbxform.hxx
index 12bccf10ab13..0014ba65d4b9 100644
--- a/svx/source/inc/tbxform.hxx
+++ b/svx/source/inc/tbxform.hxx
@@ -104,7 +104,7 @@ public:
class SvxFmTbxCtlRecTotal : public SfxToolBoxControl
{
- FixedText* pFixedText;
+ VclPtr<FixedText> pFixedText;
public:
SFX_DECL_TOOLBOX_CONTROL();
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index 43cf9d5246c4..5a66785f4735 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -113,6 +113,23 @@ AreaPropertyPanel::AreaPropertyPanel(
}
+AreaPropertyPanel::~AreaPropertyPanel()
+{
+ dispose();
+}
+
+void AreaPropertyPanel::dispose()
+{
+ mpColorTextFT.clear();
+ mpLbFillType.clear();
+ mpLbFillAttr.clear();
+ mpToolBoxColor.clear();
+ mpTrspTextFT.clear();
+ mpLBTransType.clear();
+ mpMTRTransparent.clear();
+ mpBTNGradient.clear();
+ PanelLayout::dispose();
+}
void AreaPropertyPanel::Initialize()
{
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hxx b/svx/source/sidebar/area/AreaPropertyPanel.hxx
index aec98db7790d..12243fd32afd 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.hxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.hxx
@@ -35,6 +35,7 @@
#include <vcl/lstbox.hxx>
#include <vcl/field.hxx>
#include <vcl/fixed.hxx>
+#include <vcl/vclptr.hxx>
#include <svl/intitem.hxx>
#include <com/sun/star/ui/XUIElement.hpp>
#include <boost/scoped_ptr.hpp>
@@ -53,6 +54,9 @@ class AreaPropertyPanel
public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
{
public:
+ virtual ~AreaPropertyPanel();
+ virtual void dispose() SAL_OVERRIDE;
+
static AreaPropertyPanel* Create(
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
@@ -96,14 +100,14 @@ private:
XGradient maGradientRect;
//ui controls
- FixedText* mpColorTextFT;
- SvxFillTypeBox* mpLbFillType;
- SvxFillAttrBox* mpLbFillAttr;
- ToolBox* mpToolBoxColor; // for new color picker
- FixedText* mpTrspTextFT;
- ListBox* mpLBTransType;
- MetricField* mpMTRTransparent;
- ToolBox* mpBTNGradient;
+ VclPtr<FixedText> mpColorTextFT;
+ VclPtr<SvxFillTypeBox> mpLbFillType;
+ VclPtr<SvxFillAttrBox> mpLbFillAttr;
+ VclPtr<ToolBox> mpToolBoxColor; // for new color picker
+ VclPtr<FixedText> mpTrspTextFT;
+ VclPtr<ListBox> mpLBTransType;
+ VclPtr<MetricField> mpMTRTransparent;
+ VclPtr<ToolBox> mpBTNGradient;
::boost::scoped_ptr< XFillStyleItem > mpStyleItem;
::boost::scoped_ptr< XFillColorItem > mpColorItem;
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
index b1e6075860fa..98e26fba3d35 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
@@ -66,6 +66,23 @@ GraphicPropertyPanel::GraphicPropertyPanel(
Initialize();
}
+GraphicPropertyPanel::~GraphicPropertyPanel()
+{
+ dispose();
+}
+
+void GraphicPropertyPanel::dispose()
+{
+ mpMtrBrightness.clear();
+ mpMtrContrast.clear();
+ mpLBColorMode.clear();
+ mpMtrTrans.clear();
+ mpMtrRed.clear();
+ mpMtrGreen.clear();
+ mpMtrBlue.clear();
+ mpMtrGamma.clear();
+ PanelLayout::dispose();
+}
void GraphicPropertyPanel::Initialize()
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
index 11cb2282a9b7..691d45f62c4c 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
@@ -39,6 +39,9 @@ class GraphicPropertyPanel
public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
{
public:
+ virtual ~GraphicPropertyPanel();
+ virtual void dispose() SAL_OVERRIDE;
+
static GraphicPropertyPanel* Create(
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
@@ -57,14 +60,14 @@ public:
private:
//ui controls
- MetricField* mpMtrBrightness;
- MetricField* mpMtrContrast;
- ListBox* mpLBColorMode;
- MetricField* mpMtrTrans;
- MetricField* mpMtrRed;
- MetricField* mpMtrGreen;
- MetricField* mpMtrBlue;
- MetricField* mpMtrGamma;
+ VclPtr<MetricField> mpMtrBrightness;
+ VclPtr<MetricField> mpMtrContrast;
+ VclPtr<ListBox> mpLBColorMode;
+ VclPtr<MetricField> mpMtrTrans;
+ VclPtr<MetricField> mpMtrRed;
+ VclPtr<MetricField> mpMtrGreen;
+ VclPtr<MetricField> mpMtrBlue;
+ VclPtr<MetricField> mpMtrGamma;
::sfx2::sidebar::ControllerItem maBrightControl;
::sfx2::sidebar::ControllerItem maContrastControl;
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.cxx b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
index 70fae60f543e..08f2dad99387 100644
--- a/svx/source/sidebar/insert/InsertPropertyPanel.cxx
+++ b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
@@ -87,6 +87,8 @@ void InsertPropertyPanel::dispose()
while (pTopWindow->GetParent() != NULL)
pTopWindow = pTopWindow->GetParent();
pTopWindow->RemoveChildEventListener(LINK(this, InsertPropertyPanel, WindowEventListener));
+ mpStandardShapesToolBox.clear();
+ mpCustomShapesToolBox.clear();
PanelLayout::dispose();
}
@@ -124,13 +126,13 @@ IMPL_LINK(InsertPropertyPanel, WindowEventListener, VclSimpleEvent*, pEvent)
if (nId == 0)
return 1;
- SidebarToolBox* pSidebarToolBox = dynamic_cast<SidebarToolBox*>(mpStandardShapesToolBox);
+ SidebarToolBox* pSidebarToolBox = dynamic_cast<SidebarToolBox*>(mpStandardShapesToolBox.get());
if (pSidebarToolBox == NULL)
return 1;
sal_uInt16 nItemId (pSidebarToolBox->GetItemIdForSubToolbarName(aURL.Path));
if (nItemId == 0)
{
- pSidebarToolBox = dynamic_cast<SidebarToolBox*>(mpCustomShapesToolBox);
+ pSidebarToolBox = dynamic_cast<SidebarToolBox*>(mpCustomShapesToolBox.get());
if (pSidebarToolBox == NULL)
return 1;
nItemId = pSidebarToolBox->GetItemIdForSubToolbarName(aURL.Path);
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.hxx b/svx/source/sidebar/insert/InsertPropertyPanel.hxx
index 391b69f7e8be..2539695313bf 100644
--- a/svx/source/sidebar/insert/InsertPropertyPanel.hxx
+++ b/svx/source/sidebar/insert/InsertPropertyPanel.hxx
@@ -45,8 +45,8 @@ public:
virtual void dispose() SAL_OVERRIDE;
private:
- ToolBox* mpStandardShapesToolBox;
- ToolBox* mpCustomShapesToolBox;
+ VclPtr<ToolBox> mpStandardShapesToolBox;
+ VclPtr<ToolBox> mpCustomShapesToolBox;
const css::uno::Reference<css::frame::XFrame> mxFrame;
DECL_LINK(WindowEventListener, VclSimpleEvent*);
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index d830f337ebd8..f2c7a94bb309 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -192,6 +192,29 @@ LinePropertyPanel::LinePropertyPanel(
Initialize();
}
+LinePropertyPanel::~LinePropertyPanel()
+{
+ dispose();
+}
+
+void LinePropertyPanel::dispose()
+{
+ mpFTWidth.clear();
+ mpTBWidth.clear();
+ mpFTStyle.clear();
+ mpLBStyle.clear();
+ mpFTTrancparency.clear();
+ mpMFTransparent.clear();
+ mpFTArrow.clear();
+ mpLBStart.clear();
+ mpLBEnd.clear();
+ mpFTEdgeStyle.clear();
+ mpLBEdgeStyle.clear();
+ mpFTCapStyle.clear();
+ mpLBCapStyle.clear();
+ PanelLayout::dispose();
+}
+
void LinePropertyPanel::Initialize()
{
mpIMGWidthIcon.reset(new Image[8]);
diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx b/svx/source/sidebar/line/LinePropertyPanel.hxx
index 84354e44ecd5..2567a5e37339 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.hxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.hxx
@@ -60,6 +60,9 @@ class LinePropertyPanel : public PanelLayout,
public sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
{
public:
+ virtual ~LinePropertyPanel();
+ virtual void dispose() SAL_OVERRIDE;
+
static LinePropertyPanel* Create(
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
@@ -84,19 +87,19 @@ public:
private:
//ui controls
- FixedText* mpFTWidth;
- ToolBox* mpTBWidth;
- FixedText* mpFTStyle;
- ListBox* mpLBStyle;
- FixedText* mpFTTrancparency;
- MetricField* mpMFTransparent;
- FixedText* mpFTArrow;
- ListBox* mpLBStart;
- ListBox* mpLBEnd;
- FixedText* mpFTEdgeStyle;
- ListBox* mpLBEdgeStyle;
- FixedText* mpFTCapStyle;
- ListBox* mpLBCapStyle;
+ VclPtr<FixedText> mpFTWidth;
+ VclPtr<ToolBox> mpTBWidth;
+ VclPtr<FixedText> mpFTStyle;
+ VclPtr<ListBox> mpLBStyle;
+ VclPtr<FixedText> mpFTTrancparency;
+ VclPtr<MetricField> mpMFTransparent;
+ VclPtr<FixedText> mpFTArrow;
+ VclPtr<ListBox> mpLBStart;
+ VclPtr<ListBox> mpLBEnd;
+ VclPtr<FixedText> mpFTEdgeStyle;
+ VclPtr<ListBox> mpLBEdgeStyle;
+ VclPtr<FixedText> mpFTCapStyle;
+ VclPtr<ListBox> mpLBCapStyle;
//ControllerItem
sfx2::sidebar::ControllerItem maStyleControl;
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 9f3fe4ab74ab..ccb0b24974f4 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -62,7 +62,7 @@ ParaLineSpacingControl::ParaLineSpacingControl(sal_uInt16 nId)
mpLineDistAtPercentBox = get<MetricField>("percent_box");
mpLineDistAtMetricBox = get<MetricField>("metric_box");
- mpActLineDistFld = mpLineDistAtPercentBox;
+ mpActLineDistFld = mpLineDistAtPercentBox.get();
meLNSpaceUnit = SFX_MAPUNIT_100TH_MM;
@@ -92,6 +92,25 @@ ParaLineSpacingControl::ParaLineSpacingControl(sal_uInt16 nId)
Initialize();
}
+ParaLineSpacingControl::~ParaLineSpacingControl()
+{
+ dispose();
+}
+
+void ParaLineSpacingControl::dispose()
+{
+ mpActLineDistFld.clear();
+ mpSpacing1Button.clear();
+ mpSpacing115Button.clear();
+ mpSpacing15Button.clear();
+ mpSpacing2Button.clear();
+ mpLineDist.clear();
+ mpLineDistLabel.clear();
+ mpLineDistAtPercentBox.clear();
+ mpLineDistAtMetricBox.clear();
+ SfxPopupWindow::dispose();
+}
+
void ParaLineSpacingControl::Initialize()
{
const SfxPoolItem* pItem;
@@ -241,7 +260,7 @@ void ParaLineSpacingControl::UpdateMetricFields()
case LLINESPACE_DURCH:
mpLineDistAtPercentBox->Hide();
- mpActLineDistFld = mpLineDistAtMetricBox;
+ mpActLineDistFld = mpLineDistAtMetricBox.get();
mpLineDistAtMetricBox->SetMin(0);
if (mpLineDistAtMetricBox->GetText().isEmpty())
@@ -255,7 +274,7 @@ void ParaLineSpacingControl::UpdateMetricFields()
case LLINESPACE_MIN:
mpLineDistAtPercentBox->Hide();
- mpActLineDistFld = mpLineDistAtMetricBox;
+ mpActLineDistFld = mpLineDistAtMetricBox.get();
mpLineDistAtMetricBox->SetMin(0);
if (mpLineDistAtMetricBox->GetText().isEmpty())
@@ -269,7 +288,7 @@ void ParaLineSpacingControl::UpdateMetricFields()
case LLINESPACE_PROP:
mpLineDistAtMetricBox->Hide();
- mpActLineDistFld = mpLineDistAtPercentBox;
+ mpActLineDistFld = mpLineDistAtPercentBox.get();
if (mpLineDistAtPercentBox->GetText().isEmpty())
mpLineDistAtPercentBox->SetValue(mpLineDistAtPercentBox->Normalize(100), FUNIT_TWIP);
@@ -282,7 +301,7 @@ void ParaLineSpacingControl::UpdateMetricFields()
case LLINESPACE_FIX:
mpLineDistAtPercentBox->Hide();
- mpActLineDistFld = mpLineDistAtMetricBox;
+ mpActLineDistFld = mpLineDistAtMetricBox.get();
sal_Int64 nTemp = mpLineDistAtMetricBox->GetValue();
mpLineDistAtMetricBox->SetMin(mpLineDistAtMetricBox->Normalize(MIN_FIXED_DISTANCE), FUNIT_TWIP);
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
index cabcba511f4d..d5609eb195e3 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
@@ -30,22 +30,24 @@ class ParaLineSpacingControl : public SfxPopupWindow
{
public:
ParaLineSpacingControl(sal_uInt16 nId);
+ virtual ~ParaLineSpacingControl();
+ virtual void dispose() SAL_OVERRIDE;
private:
SfxMapUnit meLNSpaceUnit;
- Edit* mpActLineDistFld;
+ VclPtr<Edit> mpActLineDistFld;
- PushButton* mpSpacing1Button;
- PushButton* mpSpacing115Button;
- PushButton* mpSpacing15Button;
- PushButton* mpSpacing2Button;
+ VclPtr<PushButton> mpSpacing1Button;
+ VclPtr<PushButton> mpSpacing115Button;
+ VclPtr<PushButton> mpSpacing15Button;
+ VclPtr<PushButton> mpSpacing2Button;
- ListBox* mpLineDist;
+ VclPtr<ListBox> mpLineDist;
- FixedText* mpLineDistLabel;
- MetricField* mpLineDistAtPercentBox;
- MetricField* mpLineDistAtMetricBox;
+ VclPtr<FixedText> mpLineDistLabel;
+ VclPtr<MetricField> mpLineDistAtPercentBox;
+ VclPtr<MetricField> mpLineDistAtMetricBox;
private:
/// Setup the widgets with values from the document.
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 93a789693d22..0c9759bf690e 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -746,6 +746,26 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent,
m_aMetricCtl.RequestUpdate();
}
+ParaPropertyPanel::~ParaPropertyPanel()
+{
+ dispose();
+}
+
+void ParaPropertyPanel::dispose()
+{
+ mpTBxVertAlign.clear();
+ mpTBxNumBullet.clear();
+ mpTBxBackColor.clear();
+ mpTopDist.clear();
+ mpBottomDist.clear();
+ mpTbxIndent_IncDec.clear();
+ mpTbxProDemote.clear();
+ mpLeftIndent.clear();
+ mpRightIndent.clear();
+ mpFLineIndent.clear();
+ PanelLayout::dispose();
+}
+
} } // end of namespace svx::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
index f49ce15fb3e3..2b4d877344f1 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
@@ -43,6 +43,9 @@ class ParaPropertyPanel
public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
{
public:
+ virtual ~ParaPropertyPanel();
+ virtual void dispose() SAL_OVERRIDE;
+
static ParaPropertyPanel* Create (
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
@@ -66,18 +69,18 @@ public:
private:
// UI controls
//Alignment
- ToolBox* mpTBxVertAlign;
+ VclPtr<ToolBox> mpTBxVertAlign;
//NumBullet&Backcolor
- ToolBox* mpTBxNumBullet;
- ToolBox* mpTBxBackColor;
+ VclPtr<ToolBox> mpTBxNumBullet;
+ VclPtr<ToolBox> mpTBxBackColor;
//Paragraph spacing
- SvxRelativeField* mpTopDist;
- SvxRelativeField* mpBottomDist;
- ToolBox* mpTbxIndent_IncDec;
- ToolBox* mpTbxProDemote;
- SvxRelativeField* mpLeftIndent;
- SvxRelativeField* mpRightIndent;
- SvxRelativeField* mpFLineIndent;
+ VclPtr<SvxRelativeField> mpTopDist;
+ VclPtr<SvxRelativeField> mpBottomDist;
+ VclPtr<ToolBox> mpTbxIndent_IncDec;
+ VclPtr<ToolBox> mpTbxProDemote;
+ VclPtr<SvxRelativeField> mpLeftIndent;
+ VclPtr<SvxRelativeField> mpRightIndent;
+ VclPtr<SvxRelativeField> mpFLineIndent;
// Resources
Image maSpace3;
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 6d4d5ea6bb59..24dfebd71b85 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -115,6 +115,29 @@ PosSizePropertyPanel::PosSizePropertyPanel(
mpBindings->Update( SID_ATTR_METRIC );
}
+PosSizePropertyPanel::~PosSizePropertyPanel()
+{
+ dispose();
+}
+
+void PosSizePropertyPanel::dispose()
+{
+ mpFtPosX.clear();
+ mpMtrPosX.clear();
+ mpFtPosY.clear();
+ mpMtrPosY.clear();
+ mpFtWidth.clear();
+ mpMtrWidth.clear();
+ mpFtHeight.clear();
+ mpMtrHeight.clear();
+ mpCbxScale.clear();
+ mpFtAngle.clear();
+ mpMtrAngle.clear();
+ mpDial.clear();
+ mpFtFlip.clear();
+ mpFlipTbx.clear();
+ PanelLayout::dispose();
+}
namespace
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index 2eb297d32582..d8a2685e1cde 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -50,6 +50,9 @@ class PosSizePropertyPanel
public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
{
public:
+ virtual ~PosSizePropertyPanel();
+ virtual void dispose() SAL_OVERRIDE;
+
static PosSizePropertyPanel* Create(
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
@@ -72,28 +75,28 @@ public:
private:
//Position
- FixedText* mpFtPosX;
- MetricField* mpMtrPosX;
- FixedText* mpFtPosY;
- MetricField* mpMtrPosY;
+ VclPtr<FixedText> mpFtPosX;
+ VclPtr<MetricField> mpMtrPosX;
+ VclPtr<FixedText> mpFtPosY;
+ VclPtr<MetricField> mpMtrPosY;
// size
- FixedText* mpFtWidth;
- MetricField* mpMtrWidth;
- FixedText* mpFtHeight;
- MetricField* mpMtrHeight;
- CheckBox* mpCbxScale;
+ VclPtr<FixedText> mpFtWidth;
+ VclPtr<MetricField> mpMtrWidth;
+ VclPtr<FixedText> mpFtHeight;
+ VclPtr<MetricField> mpMtrHeight;
+ VclPtr<CheckBox> mpCbxScale;
//rotation
- FixedText* mpFtAngle;
- MetricBox* mpMtrAngle;
+ VclPtr<FixedText> mpFtAngle;
+ VclPtr<MetricBox> mpMtrAngle;
//rotation control
- SidebarDialControl* mpDial;
+ VclPtr<SidebarDialControl> mpDial;
//flip
- FixedText* mpFtFlip;
- ToolBox* mpFlipTbx;
+ VclPtr<FixedText> mpFtFlip;
+ VclPtr<ToolBox> mpFlipTbx;
// Internal variables
basegfx::B2DRange maRect;
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index ee3048354b93..667bb91d3d04 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -114,6 +114,21 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref
mlKerning = 0;
}
+TextPropertyPanel::~TextPropertyPanel()
+{
+ dispose();
+}
+
+void TextPropertyPanel::dispose()
+{
+ mpToolBoxFont.clear();
+ mpToolBoxIncDec.clear();
+ mpToolBoxSpacing.clear();
+ mpToolBoxFontColorSw.clear();
+ mpToolBoxFontColor.clear();
+ PanelLayout::dispose();
+}
+
void TextPropertyPanel::HandleContextChange (
const ::sfx2::sidebar::EnumContext& rContext)
{
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx
index 87b12dc63be8..a5f295f264d8 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.hxx
@@ -46,6 +46,9 @@ class TextPropertyPanel
public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
{
public:
+ virtual ~TextPropertyPanel();
+ virtual void dispose() SAL_OVERRIDE;
+
static TextPropertyPanel* Create (
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
@@ -73,11 +76,11 @@ public:
private:
//ui controls
- ToolBox* mpToolBoxFont;
- ToolBox* mpToolBoxIncDec;
- ToolBox* mpToolBoxSpacing;
- ToolBox* mpToolBoxFontColorSw;
- ToolBox* mpToolBoxFontColor;
+ VclPtr<ToolBox> mpToolBoxFont;
+ VclPtr<ToolBox> mpToolBoxIncDec;
+ VclPtr<ToolBox> mpToolBoxSpacing;
+ VclPtr<ToolBox> mpToolBoxFontColorSw;
+ VclPtr<ToolBox> mpToolBoxFontColor;
//control items
::sfx2::sidebar::ControllerItem maFontSizeControl;
diff --git a/svx/source/sidebar/tools/Popup.cxx b/svx/source/sidebar/tools/Popup.cxx
index 18109ec39f9d..91301c8cfca5 100644
--- a/svx/source/sidebar/tools/Popup.cxx
+++ b/svx/source/sidebar/tools/Popup.cxx
@@ -36,7 +36,7 @@ Popup::Popup (
msAccessibleName(rsAccessibleName),
mxContainer()
{
- OSL_ASSERT(mpParent!=NULL);
+ OSL_ASSERT(mpParent!=nullptr);
OSL_ASSERT(maControlCreator);
}
@@ -94,8 +94,8 @@ void Popup::SetPopupModeEndHandler (const ::boost::function<void(void)>& rCallba
void Popup::ProvideContainerAndControl (void)
{
if ( ! (mxContainer && mxControl)
- && mpParent!=NULL
- && maControlCreator)
+ && mpParent != nullptr
+ && maControlCreator)
{
CreateContainerAndControl();
}
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index 8692c53bdfae..22e4167850de 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -33,8 +33,8 @@
//sibling after that is going to fail hard
class CandidateMgr
{
- std::vector<vcl::Window*> m_aCandidates;
- std::set<vcl::Window*> m_aDeletedCandidates;
+ std::vector<VclPtr<vcl::Window> > m_aCandidates;
+ std::set<VclPtr<vcl::Window> > m_aDeletedCandidates;
DECL_LINK(WindowEventListener, VclSimpleEvent*);
public:
void PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect);
@@ -58,10 +58,9 @@ IMPL_LINK(CandidateMgr, WindowEventListener, VclSimpleEvent*, pEvent)
CandidateMgr::~CandidateMgr()
{
- for (std::vector<vcl::Window*>::iterator aI = m_aCandidates.begin();
- aI != m_aCandidates.end(); ++aI)
+ for (auto aI = m_aCandidates.begin(); aI != m_aCandidates.end(); ++aI)
{
- vcl::Window* pCandidate = *aI;
+ VclPtr<vcl::Window> pCandidate = *aI;
if (m_aDeletedCandidates.find(pCandidate) != m_aDeletedCandidates.end())
continue;
pCandidate->RemoveEventListener(LINK(this, CandidateMgr, WindowEventListener));
@@ -97,8 +96,7 @@ void CandidateMgr::PaintTransparentChildren(vcl::Window & rWindow, Rectangle con
pCandidate = pCandidate->GetWindow( WINDOW_NEXT );
}
- for (std::vector<vcl::Window*>::iterator aI = m_aCandidates.begin();
- aI != m_aCandidates.end(); ++aI)
+ for (auto aI = m_aCandidates.begin(); aI != m_aCandidates.end(); ++aI)
{
pCandidate = *aI;
if (m_aDeletedCandidates.find(pCandidate) != m_aDeletedCandidates.end())
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 367cd8fbedea..660bb9041a16 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -722,7 +722,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
pTextEditOutlinerView->ShowCursor();
pTextEditOutliner->SetStatusEventHdl(LINK(this,SdrObjEditView,ImpOutlinerStatusEventHdl));
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ if (pItemBrowser!=nullptr) pItemBrowser->SetDirty();
#endif
pTextEditOutliner->ClearModifyFlag();
@@ -1202,7 +1202,7 @@ bool SdrObjEditView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
if (pWin!=NULL && pWin!=pTextEditWin) SetTextEditWin(pWin);
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ if (pItemBrowser!=nullptr) pItemBrowser->SetDirty();
#endif
ImpMakeTextCursorAreaVisible();
return true;
@@ -1218,7 +1218,7 @@ bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin)
if (!bPostIt) {
Point aPt(rMEvt.GetPosPixel());
if (pWin!=NULL) aPt=pWin->PixelToLogic(aPt);
- else if (pTextEditWin!=NULL) aPt=pTextEditWin->PixelToLogic(aPt);
+ else if (pTextEditWin!=nullptr) aPt=pTextEditWin->PixelToLogic(aPt);
bPostIt=IsTextEditHit(aPt,nHitTolLog);
}
if (bPostIt) {
@@ -1236,7 +1236,7 @@ bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin)
if (pTextEditOutlinerView->MouseButtonDown(aMEvt)) {
if (pWin!=NULL && pWin!=pTextEditWin) SetTextEditWin(pWin);
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ if (pItemBrowser!=nullptr) pItemBrowser->SetDirty();
#endif
ImpMakeTextCursorAreaVisible();
return true;
@@ -1253,7 +1253,7 @@ bool SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin)
if (!bPostIt) {
Point aPt(rMEvt.GetPosPixel());
if (pWin!=NULL) aPt=pWin->PixelToLogic(aPt);
- else if (pTextEditWin!=NULL) aPt=pTextEditWin->PixelToLogic(aPt);
+ else if (pTextEditWin!=nullptr) aPt=pTextEditWin->PixelToLogic(aPt);
bPostIt=IsTextEditHit(aPt,nHitTolLog);
}
if (bPostIt) {
@@ -1267,7 +1267,7 @@ bool SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin)
rMEvt.GetButtons(),rMEvt.GetModifier());
if (pTextEditOutlinerView->MouseButtonUp(aMEvt)) {
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ if (pItemBrowser!=nullptr) pItemBrowser->SetDirty();
#endif
ImpMakeTextCursorAreaVisible();
return true;
@@ -1305,7 +1305,7 @@ bool SdrObjEditView::MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin)
rMEvt.GetButtons(),rMEvt.GetModifier());
if (pTextEditOutlinerView->MouseMove(aMEvt) && bSelMode) {
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ if (pItemBrowser!=nullptr) pItemBrowser->SetDirty();
#endif
ImpMakeTextCursorAreaVisible();
return true;
@@ -1325,7 +1325,7 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
if (!bPostIt && rCEvt.IsMouseEvent()) {
Point aPt(rCEvt.GetMousePosPixel());
if (pWin!=NULL) aPt=pWin->PixelToLogic(aPt);
- else if (pTextEditWin!=NULL) aPt=pTextEditWin->PixelToLogic(aPt);
+ else if (pTextEditWin!=nullptr) aPt=pTextEditWin->PixelToLogic(aPt);
bPostIt=IsTextEditHit(aPt,nHitTolLog);
}
if (bPostIt) {
@@ -1342,7 +1342,7 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
pTextEditOutlinerView->Command(aCEvt);
if (pWin!=NULL && pWin!=pTextEditWin) SetTextEditWin(pWin);
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ if (pItemBrowser!=nullptr) pItemBrowser->SetDirty();
#endif
ImpMakeTextCursorAreaVisible();
return true;
@@ -1392,7 +1392,7 @@ bool SdrObjEditView::ImpIsTextEditAllSelected() const
void SdrObjEditView::ImpMakeTextCursorAreaVisible()
{
- if (pTextEditOutlinerView!=NULL && pTextEditWin!=NULL) {
+ if (pTextEditOutlinerView!=nullptr && pTextEditWin!=nullptr) {
vcl::Cursor* pCsr=pTextEditWin->GetCursor();
if (pCsr!=NULL) {
Size aSiz(pCsr->GetSize());
@@ -1613,7 +1613,7 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
pTextEditOutlinerView->SetAttribs(rSet);
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL)
+ if (pItemBrowser!=nullptr)
pItemBrowser->SetDirty();
#endif
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index eb1fcfbce81f..cc0b28dd59eb 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -162,14 +162,15 @@ bool ImpItemListRow::operator==(const ImpItemListRow& rEntry) const
class ImpItemEdit: public Edit
{
- _SdrItemBrowserControl* pBrowse;
+ VclPtr<_SdrItemBrowserControl> pBrowse;
public:
ImpItemEdit(vcl::Window* pParent, _SdrItemBrowserControl* pBrowse_, WinBits nBits=0)
: Edit(pParent, nBits),
pBrowse(pBrowse_)
{}
-
+ virtual ~ImpItemEdit() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE { pBrowse.clear(); Edit::dispose(); }
virtual void KeyInput(const KeyEvent& rEvt) SAL_OVERRIDE;
};
@@ -217,7 +218,7 @@ _SdrItemBrowserControl::~_SdrItemBrowserControl()
void _SdrItemBrowserControl::dispose()
{
- delete pEditControl;
+ pEditControl.clear();
delete pAktChangeEntry;
@@ -529,10 +530,9 @@ bool _SdrItemBrowserControl::BegChangeEntry(sal_uIntPtr nPos)
bool _SdrItemBrowserControl::EndChangeEntry()
{
bool bRet = false;
- if (pEditControl!=NULL) {
+ if (pEditControl!=nullptr) {
aEntryChangedHdl.Call(this);
- delete pEditControl;
- pEditControl=NULL;
+ pEditControl.clear();
delete pAktChangeEntry;
pAktChangeEntry=NULL;
vcl::Window* pParent=GetParent();
@@ -545,9 +545,8 @@ bool _SdrItemBrowserControl::EndChangeEntry()
void _SdrItemBrowserControl::BrkChangeEntry()
{
- if (pEditControl!=NULL) {
- delete pEditControl;
- pEditControl=NULL;
+ if (pEditControl!=nullptr) {
+ pEditControl.clear();
delete pAktChangeEntry;
pAktChangeEntry=NULL;
vcl::Window* pParent=GetParent();
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 52194e44620a..cfc0cb9e5e31 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -2091,7 +2091,7 @@ void SdrMarkView::MarkListHasChanged()
bMarkedObjRectDirty=true;
bMarkedPointsRectsDirty=true;
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ if (pItemBrowser!=nullptr) pItemBrowser->SetDirty();
#endif
bool bOneEdgeMarked=false;
if (GetMarkedObjectCount()==1) {
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index c50ba5876059..a30737b72f9a 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -235,10 +235,7 @@ SdrPaintView::~SdrPaintView()
ClearPageView();
#ifdef DBG_UTIL
- if(pItemBrowser)
- {
- delete pItemBrowser;
- }
+ pItemBrowser.clear();
#endif
// delete existing SdrPaintWindows
@@ -474,7 +471,7 @@ void SdrPaintView::AddWindowToPaintView(OutputDevice* pNewWin)
}
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL)
+ if (pItemBrowser!=nullptr)
pItemBrowser->ForceParent();
#endif
}
@@ -496,7 +493,7 @@ void SdrPaintView::DeleteWindowFromPaintView(OutputDevice* pOldWin)
}
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL)
+ if (pItemBrowser!=nullptr)
pItemBrowser->ForceParent();
#endif
}
@@ -1061,7 +1058,7 @@ void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, bool bReplaceAll)
else aDefaultAttr.Put(rAttr,false); // if FALSE, regard InvalidItems as "holes," not as Default
SetNotPersistDefaultAttr(rAttr,bReplaceAll);
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ if (pItemBrowser!=nullptr) pItemBrowser->SetDirty();
#endif
}
@@ -1084,7 +1081,7 @@ void SdrPaintView::SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRe
}
}
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ if (pItemBrowser!=nullptr) pItemBrowser->SetDirty();
#endif
}
@@ -1127,16 +1124,15 @@ bool SdrPaintView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHar
void SdrPaintView::ShowItemBrowser(bool bShow)
{
if (bShow) {
- if (pItemBrowser==NULL) {
+ if (pItemBrowser==nullptr) {
pItemBrowser=new SdrItemBrowser(*static_cast<SdrView*>(this));
}
pItemBrowser->Show();
pItemBrowser->GrabFocus();
} else {
- if (pItemBrowser!=NULL) {
+ if (pItemBrowser!=nullptr) {
pItemBrowser->Hide();
- delete pItemBrowser;
- pItemBrowser=NULL;
+ pItemBrowser.clear();
}
}
}
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 89589ba4e1bc..44cb7f006792 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -1362,7 +1362,7 @@ void SdrView::MarkAll()
if (IsTextEdit()) {
GetTextEditOutlinerView()->SetSelection(ESelection(0,0,EE_PARA_ALL,EE_TEXTPOS_ALL));
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ if (pItemBrowser!=nullptr) pItemBrowser->SetDirty();
#endif
} else if (IsGluePointEditMode()) MarkAllGluePoints();
else if (HasMarkablePoints()) MarkAllPoints();
@@ -1377,7 +1377,7 @@ void SdrView::UnmarkAll()
eSel.nStartPos=eSel.nEndPos;
GetTextEditOutlinerView()->SetSelection(eSel);
#ifdef DBG_UTIL
- if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ if (pItemBrowser!=nullptr) pItemBrowser->SetDirty();
#endif
} else if (HasMarkedGluePoints()) UnmarkAllGluePoints();
else if (HasMarkedPoints()) UnmarkAllPoints(); // Marked, not Markable!
diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx
index bc47a66ec219..4e7c2db0f274 100644
--- a/svx/source/tbxctrls/bulletsnumbering.cxx
+++ b/svx/source/tbxctrls/bulletsnumbering.cxx
@@ -40,13 +40,15 @@ class NumberingPopup : public svtools::ToolbarMenu
{
bool mbBulletItem;
NumberingToolBoxControl& mrController;
- SvxNumValueSet* mpValueSet;
+ VclPtr<SvxNumValueSet> mpValueSet;
DECL_LINK( VSSelectHdl, void * );
public:
NumberingPopup( NumberingToolBoxControl& rController,
const css::uno::Reference< css::frame::XFrame >& rFrame,
vcl::Window* pParent, bool bBulletItem );
+ virtual ~NumberingPopup();
+ virtual void dispose() SAL_OVERRIDE;
virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent )
throw ( css::uno::RuntimeException ) SAL_OVERRIDE;
@@ -133,6 +135,17 @@ NumberingPopup::NumberingPopup( NumberingToolBoxControl& rController,
AddStatusListener( ".uno:CurrentNumListType" );
}
+NumberingPopup::~NumberingPopup()
+{
+ dispose();
+}
+
+void NumberingPopup::dispose()
+{
+ mpValueSet.clear();
+ ToolbarMenu::dispose();
+}
+
void NumberingPopup::statusChanged( const css::frame::FeatureStateEvent& rEvent )
throw ( css::uno::RuntimeException )
{
diff --git a/svx/source/tbxctrls/colorwindow.hxx b/svx/source/tbxctrls/colorwindow.hxx
index a05ec801717e..eae25a8d9467 100644
--- a/svx/source/tbxctrls/colorwindow.hxx
+++ b/svx/source/tbxctrls/colorwindow.hxx
@@ -37,13 +37,13 @@ class SvxColorWindow_Impl : public SfxPopupWindow
private:
const sal_uInt16 theSlotId;
- SvxColorValueSet* mpColorSet;
- SvxColorValueSet* mpRecentColorSet;
+ VclPtr<SvxColorValueSet> mpColorSet;
+ VclPtr<SvxColorValueSet> mpRecentColorSet;
- ListBox* mpPaletteListBox;
- PushButton* mpButtonAutoColor;
- PushButton* mpButtonPicker;
- FixedLine* mpAutomaticSeparator;
+ VclPtr<ListBox> mpPaletteListBox;
+ VclPtr<PushButton> mpButtonAutoColor;
+ VclPtr<PushButton> mpButtonPicker;
+ VclPtr<FixedLine> mpAutomaticSeparator;
OUString maCommand;
Link maSelectedLink;
@@ -67,6 +67,8 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
const OUString& rWndTitle,
vcl::Window* pParentWindow);
+ virtual ~SvxColorWindow_Impl();
+ virtual void dispose() SAL_OVERRIDE;
void StartSelection();
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index cafd700302df..4366ac12c74e 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -104,6 +104,17 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow(
AddStatusListener( msExtrusionProjection );
}
+ExtrusionDirectionWindow::~ExtrusionDirectionWindow()
+{
+ dispose();
+}
+
+void ExtrusionDirectionWindow::dispose()
+{
+ mpDirectionSet.clear();
+ ToolbarMenu::dispose();
+}
+
void ExtrusionDirectionWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
ToolbarMenu::DataChanged( rDCEvt );
@@ -298,6 +309,17 @@ ExtrusionDepthDialog::ExtrusionDepthDialog( vcl::Window* pParent, double fDepth,
m_pMtrDepth->SetValue( (int) fDepth * 100, FUNIT_100TH_MM );
}
+ExtrusionDepthDialog::~ExtrusionDepthDialog()
+{
+ dispose();
+}
+
+void ExtrusionDepthDialog::dispose()
+{
+ m_pMtrDepth.clear();
+ ModalDialog::dispose();
+}
+
double ExtrusionDepthDialog::getDepth() const
{
return (double)( m_pMtrDepth->GetValue( FUNIT_100TH_MM ) ) / 100.0;
@@ -578,6 +600,17 @@ ExtrusionLightingWindow::ExtrusionLightingWindow(svt::ToolboxController& rContro
AddStatusListener( msExtrusionLightingIntensity );
}
+ExtrusionLightingWindow::~ExtrusionLightingWindow()
+{
+ dispose();
+}
+
+void ExtrusionLightingWindow::dispose()
+{
+ mpLightingSet.clear();
+ ToolbarMenu::dispose();
+}
+
void ExtrusionLightingWindow::implSetIntensity( int nLevel, bool bEnabled )
{
mnLevel = nLevel;
diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx
index 4371153b00ea..210d64d63267 100644
--- a/svx/source/tbxctrls/extrusioncontrols.hxx
+++ b/svx/source/tbxctrls/extrusioncontrols.hxx
@@ -41,13 +41,15 @@ class ExtrusionDirectionWindow : public svtools::ToolbarMenu
{
public:
ExtrusionDirectionWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
+ virtual ~ExtrusionDirectionWindow();
+ virtual void dispose() SAL_OVERRIDE;
virtual void statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
private:
svt::ToolboxController& mrController;
- ValueSet* mpDirectionSet;
+ VclPtr<ValueSet> mpDirectionSet;
Image maImgDirection[9];
Image maImgPerspective;
@@ -137,7 +139,7 @@ class ExtrusionLightingWindow : public svtools::ToolbarMenu
{
private:
svt::ToolboxController& mrController;
- ValueSet* mpLightingSet;
+ VclPtr<ValueSet> mpLightingSet;
Image maImgLightingOff[9];
Image maImgLightingOn[9];
@@ -161,6 +163,8 @@ private:
DECL_LINK( SelectHdl, void * );
public:
ExtrusionLightingWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
+ virtual ~ExtrusionLightingWindow();
+ virtual void dispose() SAL_OVERRIDE;
virtual void statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index 0ce6f92d7bce..eb677739acf1 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -567,8 +567,8 @@ FillControl::~FillControl()
void FillControl::dispose()
{
- delete mpLbFillType;
- delete mpLbFillAttr;
+ mpLbFillType.clear();
+ mpLbFillAttr.clear();
vcl::Window::dispose();
}
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index a0ec59088431..c36e58220267 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -94,6 +94,17 @@ FontWorkGalleryDialog::FontWorkGalleryDialog( SdrView* pSdrView, vcl::Window* pP
fillFavorites( GALLERY_THEME_FONTWORK );
}
+FontWorkGalleryDialog::~FontWorkGalleryDialog()
+{
+ dispose();
+}
+
+void FontWorkGalleryDialog::dispose()
+{
+ mpCtlFavorites.clear();
+ mpOKButton.clear();
+ ModalDialog::dispose();
+}
void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId)
{
@@ -708,6 +719,17 @@ FontworkCharacterSpacingDialog::FontworkCharacterSpacingDialog( vcl::Window* pPa
m_pMtrScale->SetValue( nScale );
}
+FontworkCharacterSpacingDialog::~FontworkCharacterSpacingDialog()
+{
+ dispose();
+}
+
+void FontworkCharacterSpacingDialog::dispose()
+{
+ m_pMtrScale.clear();
+ ModalDialog::dispose();
+}
+
sal_Int32 FontworkCharacterSpacingDialog::getScale() const
{
return (sal_Int32)m_pMtrScale->GetValue();
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index f65d68ff4daf..1f500a711886 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -54,14 +54,16 @@ class SvxPopupWindowListBox: public SfxPopupWindow
{
using FloatingWindow::StateChanged;
- ListBox * m_pListBox;
+ VclPtr<ListBox> m_pListBox;
ToolBox & rToolBox;
bool bUserSel;
- sal_uInt16 nTbxId;
- OUString maCommandURL;
+ sal_uInt16 nTbxId;
+ OUString maCommandURL;
public:
SvxPopupWindowListBox( sal_uInt16 nSlotId, const OUString& rCommandURL, sal_uInt16 nTbxId, ToolBox& rTbx );
+ virtual ~SvxPopupWindowListBox();
+ virtual void dispose() SAL_OVERRIDE;
// SfxPopupWindow
virtual SfxPopupWindow * Clone() const SAL_OVERRIDE;
@@ -96,6 +98,17 @@ SvxPopupWindowListBox::SvxPopupWindowListBox(sal_uInt16 nSlotId, const OUString&
AddStatusListener( rCommandURL );
}
+SvxPopupWindowListBox::~SvxPopupWindowListBox()
+{
+ dispose();
+}
+
+void SvxPopupWindowListBox::dispose()
+{
+ m_pListBox.clear();
+ SfxPopupWindow::dispose();
+}
+
SfxPopupWindow* SvxPopupWindowListBox::Clone() const
{
return new SvxPopupWindowListBox( GetId(), maCommandURL, nTbxId, rToolBox );
@@ -140,9 +153,7 @@ SvxListBoxControl::SvxListBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBo
SvxListBoxControl::~SvxListBoxControl()
-{
-}
-
+{}
SfxPopupWindow* SvxListBoxControl::CreatePopupWindow()
{
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index b2926fd970f9..79f1edfc703b 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1242,6 +1242,22 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
}
}
+SvxColorWindow_Impl::~SvxColorWindow_Impl()
+{
+ dispose();
+}
+
+void SvxColorWindow_Impl::dispose()
+{
+ mpColorSet.clear();
+ mpRecentColorSet.clear();
+ mpPaletteListBox.clear();
+ mpButtonAutoColor.clear();
+ mpButtonPicker.clear();
+ mpAutomaticSeparator.clear();
+ SfxPopupWindow::dispose();
+}
+
void SvxColorWindow_Impl::KeyInput( const KeyEvent& rKEvt )
{
mpColorSet->KeyInput(rKEvt);
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index 680e9a32040d..18bb2ba05bc9 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -80,7 +80,7 @@ class FontHeightToolBoxControl : public svt::ToolboxController,
using svt::ToolboxController::dispatchCommand;
private:
- SvxFontSizeBox_Impl* m_pBox;
+ VclPtr<SvxFontSizeBox_Impl> m_pBox;
::com::sun::star::awt::FontDescriptor m_aCurrentFont;
};
@@ -343,8 +343,7 @@ throw (uno::RuntimeException, std::exception)
svt::ToolboxController::dispose();
SolarMutexGuard aSolarMutexGuard;
- delete m_pBox;
- m_pBox = 0;
+ m_pBox.clear();
}
// XStatusListener
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 4931df050026..1d175ff54704 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -415,8 +415,7 @@ void SAL_CALL FindTextToolbarController::dispose() throw ( css::uno::RuntimeExce
if (m_pFindTextFieldControl != nullptr) {
SearchToolbarControllersManager::createControllersManager()
.saveSearchHistory(m_pFindTextFieldControl);
- delete m_pFindTextFieldControl;
- m_pFindTextFieldControl = 0;
+ m_pFindTextFieldControl.disposeAndClear();
}
}
@@ -661,8 +660,7 @@ void SAL_CALL MatchCaseToolboxController::dispose() throw ( css::uno::RuntimeExc
svt::ToolboxController::dispose();
- delete m_pMatchCaseControl;
- m_pMatchCaseControl = 0;
+ m_pMatchCaseControl.clear();
}
// XInitialization
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index 3cae7ead6f03..7a461ef72dc2 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -60,6 +60,19 @@ DictionaryList::DictionaryList(SvSimpleTableContainer& rParent, WinBits nBits)
{
}
+DictionaryList::~DictionaryList()
+{
+ dispose();
+}
+
+void DictionaryList::dispose()
+{
+ m_pED_Term.clear();
+ m_pED_Mapping.clear();
+ m_pLB_Property.clear();
+ SvSimpleTable::dispose();
+}
+
OUString DictionaryList::getPropertyTypeName( sal_Int16 nConversionPropertyType ) const
{
if(!m_pLB_Property || !m_pLB_Property->GetEntryCount())
@@ -548,8 +561,22 @@ ChineseDictionaryDialog::~ChineseDictionaryDialog()
void ChineseDictionaryDialog::dispose()
{
m_xContext=0;
- delete m_pCT_DictionaryToSimplified;
- delete m_pCT_DictionaryToTraditional;
+ m_pCT_DictionaryToSimplified.clear();
+ m_pCT_DictionaryToTraditional.clear();
+ m_pRB_To_Simplified.clear();
+ m_pRB_To_Traditional.clear();
+ m_pCB_Reverse.clear();
+ m_pFT_Term.clear();
+ m_pED_Term.clear();
+ m_pFT_Mapping.clear();
+ m_pED_Mapping.clear();
+ m_pFT_Property.clear();
+ m_pLB_Property.clear();
+ mpToSimplifiedContainer.clear();
+ mpToTraditionalContainer.clear();
+ m_pPB_Add.clear();
+ m_pPB_Modify.clear();
+ m_pPB_Delete.clear();
ModalDialog::dispose();
}
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
index 6b50ef7b0397..50498b4d5d91 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
@@ -61,6 +61,8 @@ class DictionaryList : public SvSimpleTable
{
public:
DictionaryList(SvSimpleTableContainer& rParent, WinBits nBits);
+ virtual ~DictionaryList();
+ virtual void dispose() SAL_OVERRIDE;
void init(const css::uno::Reference< css::linguistic2::XConversionDictionary>& xDictionary,
vcl::Window *pED_Term, vcl::Window *pED_Mapping, ListBox *pLB_Property,
@@ -99,9 +101,9 @@ public:
css::uno::Reference<css::linguistic2::XConversionDictionary> m_xDictionary;
private:
- vcl::Window* m_pED_Term;
- vcl::Window* m_pED_Mapping;
- ListBox* m_pLB_Property;
+ VclPtr<vcl::Window> m_pED_Term;
+ VclPtr<vcl::Window> m_pED_Mapping;
+ VclPtr<ListBox> m_pLB_Property;
std::vector< DictionaryEntry* > m_aToBeDeleted;
@@ -147,28 +149,28 @@ private:
private:
sal_Int32 m_nTextConversionOptions; //i18n::TextConversionOption
- RadioButton* m_pRB_To_Simplified;
- RadioButton* m_pRB_To_Traditional;
+ VclPtr<RadioButton> m_pRB_To_Simplified;
+ VclPtr<RadioButton> m_pRB_To_Traditional;
- CheckBox* m_pCB_Reverse;
+ VclPtr<CheckBox> m_pCB_Reverse;
- FixedText* m_pFT_Term;
- Edit* m_pED_Term;
+ VclPtr<FixedText> m_pFT_Term;
+ VclPtr<Edit> m_pED_Term;
- FixedText* m_pFT_Mapping;
- Edit* m_pED_Mapping;
+ VclPtr<FixedText> m_pFT_Mapping;
+ VclPtr<Edit> m_pED_Mapping;
- FixedText* m_pFT_Property;
- ListBox* m_pLB_Property;
+ VclPtr<FixedText> m_pFT_Property;
+ VclPtr<ListBox> m_pLB_Property;
- SvSimpleTableContainer* mpToSimplifiedContainer;
- DictionaryList* m_pCT_DictionaryToSimplified;
- SvSimpleTableContainer* mpToTraditionalContainer;
- DictionaryList* m_pCT_DictionaryToTraditional;
+ VclPtr<SvSimpleTableContainer> mpToSimplifiedContainer;
+ VclPtr<DictionaryList> m_pCT_DictionaryToSimplified;
+ VclPtr<SvSimpleTableContainer> mpToTraditionalContainer;
+ VclPtr<DictionaryList> m_pCT_DictionaryToTraditional;
- PushButton* m_pPB_Add;
- PushButton* m_pPB_Modify;
- PushButton* m_pPB_Delete;
+ VclPtr<PushButton> m_pPB_Add;
+ VclPtr<PushButton> m_pPB_Modify;
+ VclPtr<PushButton> m_pPB_Delete;
css::uno::Reference<css::uno::XComponentContext> m_xContext;
};
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx
index 0de8dbbf73cf..7cdf4a98f9ef 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx
@@ -58,8 +58,7 @@ void ChineseTranslation_UnoDialog::impl_DeleteDialog()
{
if(m_pDialog->IsInExecute())
m_pDialog->EndDialog(RET_CANCEL);
- delete m_pDialog;
- m_pDialog = 0;
+ m_pDialog.clear();
}
}
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx
index 5349c555c332..9c39681f77f8 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx
@@ -29,6 +29,7 @@
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase5.hxx>
+#include <vcl/vclptr.hxx>
namespace textconversiondlgs
@@ -121,7 +122,7 @@ private:
com::sun::star::uno::Reference<
com::sun::star::awt::XWindow > m_xParentWindow;
- ChineseTranslationDialog* m_pDialog;
+ VclPtr<ChineseTranslationDialog> m_pDialog;
bool m_bDisposed; ///Dispose call ready.
bool m_bInDispose;///In dispose call
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
index 2253d3419749..feaaf3bbc392 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
@@ -72,8 +72,13 @@ void ChineseTranslationDialog::dispose()
{
if(m_pDictionaryDialog->IsInExecute())
m_pDictionaryDialog->EndDialog();
- delete m_pDictionaryDialog;
}
+ m_pDictionaryDialog.clear();
+ m_pRB_To_Simplified.clear();
+ m_pRB_To_Traditional.clear();
+ m_pCB_Translate_Commonterms.clear();
+ m_pPB_Editterms.clear();
+ m_pBP_OK.clear();
ModalDialog::dispose();
}
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx
index 6afeadf965c2..0ec0bf32f2be 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx
@@ -51,15 +51,15 @@ private:
void impl_UpdateVariantsCheckBox();
private:
- RadioButton* m_pRB_To_Simplified;
- RadioButton* m_pRB_To_Traditional;
+ VclPtr<RadioButton> m_pRB_To_Simplified;
+ VclPtr<RadioButton> m_pRB_To_Traditional;
- CheckBox* m_pCB_Translate_Commonterms;
- PushButton* m_pPB_Editterms;
+ VclPtr<CheckBox> m_pCB_Translate_Commonterms;
+ VclPtr<PushButton> m_pPB_Editterms;
- OKButton* m_pBP_OK;
+ VclPtr<OKButton> m_pBP_OK;
- ChineseDictionaryDialog* m_pDictionaryDialog;
+ VclPtr<ChineseDictionaryDialog> m_pDictionaryDialog;
};
diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index 74515045415c..3c9ce9282de6 100644
--- a/svx/source/unodraw/recoveryui.cxx
+++ b/svx/source/unodraw/recoveryui.cxx
@@ -67,7 +67,7 @@ class RecoveryUI : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo
css::uno::Reference< css::uno::XComponentContext > m_xContext;
/** @short TODO */
- vcl::Window* m_pParentWindow;
+ VclPtr<vcl::Window> m_pParentWindow;
/** @short TODO */
RecoveryUI::EJob m_eJob;
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 377cf00d4eda..d4172b1efdc4 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -88,7 +88,7 @@ private:
SdrObject* mpObject;
SdrText* mpText;
SdrView* mpView;
- const vcl::Window* mpWindow;
+ VclPtr<const vcl::Window> mpWindow;
SdrModel* mpModel;
SdrOutliner* mpOutliner;
SvxOutlinerForwarder* mpTextForwarder;
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index f880d609b34a..c74fc3ba5fba 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -32,6 +32,7 @@
#include <com/sun/star/uno/Any.hxx>
#include <SidebarWindowsTypes.hxx>
#include <svl/lstner.hxx>
+#include <vcl/vclptr.hxx>
class OutputDevice;
class SwWrtShell;
@@ -139,12 +140,12 @@ class SwPostItMgr: public SfxListener
private:
SwView* mpView;
SwWrtShell* mpWrtShell;
- SwEditWin* mpEditWin;
+ VclPtr<SwEditWin> mpEditWin;
std::list< SwSidebarItem*> mvPostItFlds;
std::vector<SwPostItPageItem*> mPages;
ImplSVEvent * mnEventId;
bool mbWaitingForCalcRects;
- sw::sidebarwindows::SwSidebarWin* mpActivePostIt;
+ VclPtr<sw::sidebarwindows::SwSidebarWin> mpActivePostIt;
bool mbLayout;
long mbLayoutHeight;
bool mbLayouting;
diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
index 5d3dcda36137..34957135b6b6 100644
--- a/sw/inc/SidebarWin.hxx
+++ b/sw/inc/SidebarWin.hxx
@@ -211,11 +211,11 @@ class SwSidebarWin : public vcl::Window
OutlinerView* mpOutlinerView;
Outliner* mpOutliner;
- sw::sidebarwindows::SidebarTxtControl* mpSidebarTxtControl;
- ScrollBar* mpVScrollbar;
- Edit* mpMetadataAuthor;
- Edit* mpMetadataDate;
- MenuButton* mpMenuButton;
+ VclPtr<sw::sidebarwindows::SidebarTxtControl> mpSidebarTxtControl;
+ VclPtr<ScrollBar> mpVScrollbar;
+ VclPtr<Edit> mpMetadataAuthor;
+ VclPtr<Edit> mpMetadataDate;
+ VclPtr<MenuButton> mpMenuButton;
sw::sidebarwindows::AnchorOverlayObject* mpAnchor;
sw::sidebarwindows::ShadowOverlayObject* mpShadow;
diff --git a/sw/inc/colwd.hxx b/sw/inc/colwd.hxx
index 448e07efaca6..1e466c477f4f 100644
--- a/sw/inc/colwd.hxx
+++ b/sw/inc/colwd.hxx
@@ -28,8 +28,8 @@ class SwTableFUNC;
class SwTableWidthDlg : public SvxStandardDialog
{
- NumericField* m_pColNF;
- MetricField* m_pWidthMF;
+ VclPtr<NumericField> m_pColNF;
+ VclPtr<MetricField> m_pWidthMF;
SwTableFUNC &rFnc;
protected:
@@ -38,6 +38,8 @@ protected:
public:
SwTableWidthDlg(vcl::Window *pParent, SwTableFUNC &rFnc );
+ virtual ~SwTableWidthDlg();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif
diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
index 138c72c25427..43c1e326f53c 100644
--- a/sw/inc/hhcwrp.hxx
+++ b/sw/inc/hhcwrp.hxx
@@ -30,7 +30,7 @@ class SwPaM;
class SW_DLLPUBLIC SwHHCWrapper : public editeng::HangulHanjaConversion
{
SwView * m_pView;
- vcl::Window* m_pWin;
+ VclPtr<vcl::Window> m_pWin;
SwWrtShell &m_rWrtShell;
SwConversionArgs *m_pConvArgs; /**< object for arguments (and results) needed
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 80b26ac520e6..cf1f7c069c02 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -89,7 +89,7 @@ namespace SwPostItHelper
class SwSidebarItem
{
public:
- sw::sidebarwindows::SwSidebarWin* pPostIt;
+ VclPtr<sw::sidebarwindows::SwSidebarWin> pPostIt;
bool bShow;
bool bFocus;
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 01b308311287..7ad04e5c948b 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -128,7 +128,7 @@ class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell>
SwViewShellImp *mpImp; // Core-internals of SwViewShell.
// The pointer is never 0.
- ::vcl::Window *mpWin; ///< = 0 during printing or pdf export
+ VclPtr<::vcl::Window> mpWin; ///< = 0 during printing or pdf export
OutputDevice *mpOut; ///< Window, Printer, VirtDev, ...
OutputDevice* mpTmpRef; // Temporariy reference device. Is used
// during (printer depending) prospect
diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx
index f3c245db2d0e..00a4b1f8296c 100644
--- a/sw/qa/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/tiledrendering/tiledrendering.cxx
@@ -58,24 +58,24 @@ class TiledRenderingDialog: public ModalDialog
{
private:
TiledRenderingApp *mpApp;
- NumericField *mpContextWidth;
- NumericField *mpContextHeight;
- NumericField *mpTilePosX;
- NumericField *mpTilePosY;
- NumericField *mpTileWidth;
- NumericField *mpTileHeight;
- FixedImage *mpImage;
+ VclPtr<NumericField> mpContextWidth;
+ VclPtr<NumericField> mpContextHeight;
+ VclPtr<NumericField> mpTilePosX;
+ VclPtr<NumericField> mpTilePosY;
+ VclPtr<NumericField> mpTileWidth;
+ VclPtr<NumericField> mpTileHeight;
+ VclPtr<FixedImage> mpImage;
public:
TiledRenderingDialog(TiledRenderingApp * app) :
ModalDialog(DIALOG_NO_PARENT, "TiledRendering", "qa/sw/ui/tiledrendering.ui"),
mpApp(app)
{
- PushButton * renderButton;
+ VclPtr<PushButton> renderButton;
get(renderButton, "buttonRenderTile");
renderButton->SetClickHdl( LINK( this, TiledRenderingDialog, RenderHdl));
- PushButton * chooseDocumentButton;
+ VclPtr<PushButton> chooseDocumentButton;
get(chooseDocumentButton, "buttonChooseDocument");
chooseDocumentButton->SetClickHdl( LINK( this, TiledRenderingDialog, ChooseDocumentHdl));
@@ -92,6 +92,19 @@ public:
virtual ~TiledRenderingDialog()
{
+ dispose();
+ }
+
+ virtual void dispose() SAL_OVERRIDE
+ {
+ mpContextWidth.clear();
+ mpContextHeight.clear();
+ mpTilePosX.clear();
+ mpTilePosY.clear();
+ mpTileWidth.clear();
+ mpTileHeight.clear();
+ mpImage.clear();
+ ModalDialog::dispose();
}
DECL_LINK ( RenderHdl, Button * );
diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx
index 7f630af8355e..1ed2be42e750 100644
--- a/sw/source/core/access/accdoc.hxx
+++ b/sw/source/core/access/accdoc.hxx
@@ -36,7 +36,7 @@ class SwAccessibleDocumentBase : public SwAccessibleContext
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible> mxParent;
- vcl::Window* mpChildWin; // protected by solar mutext
+ VclPtr<vcl::Window> mpChildWin; // protected by solar mutext
using SwAccessibleFrame::SetVisArea;
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index 0953d7f9b04d..b3409938dfdf 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -213,7 +213,7 @@ bool SwAccessibleChild::IsValid() const
{
return mpFrm != 0 ||
mpDrawObj != 0 ||
- mpWindow != 0;
+ mpWindow != nullptr;
}
bool SwAccessibleChild::IsVisibleChildrenOnly() const
diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx
index bfd188f79ad1..31a489e43640 100644
--- a/sw/source/core/access/accfrmobj.hxx
+++ b/sw/source/core/access/accfrmobj.hxx
@@ -20,6 +20,7 @@
#ifndef INCLUDED_SW_SOURCE_CORE_ACCESS_ACCFRMOBJ_HXX
#define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCFRMOBJ_HXX
+#include <vcl/vclptr.hxx>
class SwAccessibleMap;
class SwFrm;
@@ -71,7 +72,7 @@ class SwAccessibleChild
private:
const SwFrm* mpFrm;
const SdrObject* mpDrawObj;
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
void Init( const SdrObject* pDrawObj );
void Init( const SwFrm* pFrm );
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 7af4b3bb2850..0d2893c16057 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -2262,7 +2262,7 @@ SwViewShell::CreateAccessiblePreview()
void SwViewShell::InvalidateAccessibleFocus()
{
- if( this && Imp() && Imp()->IsAccessible() )
+ if( Imp() && Imp()->IsAccessible() )
Imp()->GetAccessibleMap().InvalidateFocus();
}
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index a7616885ad21..9db5c7da2d0d 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -173,6 +173,23 @@ SwBreakDlg::SwBreakDlg( vcl::Window *pParent, SwWrtShell &rS )
m_pPageNumEdit->SetText(OUString());
}
+SwBreakDlg::~SwBreakDlg()
+{
+ dispose();
+}
+
+void SwBreakDlg::dispose()
+{
+ m_pLineBtn.clear();
+ m_pColumnBtn.clear();
+ m_pPageBtn.clear();
+ m_pPageCollText.clear();
+ m_pPageCollBox.clear();
+ m_pPageNumBox.clear();
+ m_pPageNumEdit.clear();
+ SvxStandardDialog::dispose();
+}
+
void SwBreakDlg::CheckEnable()
{
bool bEnable = true;
@@ -206,8 +223,4 @@ void SwBreakDlg::CheckEnable()
m_pPageNumEdit->Enable(bEnable);
}
-SwBreakDlg::~SwBreakDlg()
-{
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 688ea18dd6ab..e19be029b52c 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -191,6 +191,16 @@ SwCharURLPage::~SwCharURLPage()
void SwCharURLPage::dispose()
{
delete pINetItem;
+ m_pURLED.clear();
+ m_pTextFT.clear();
+ m_pTextED.clear();
+ m_pNameED.clear();
+ m_pTargetFrmLB.clear();
+ m_pURLPB.clear();
+ m_pEventPB.clear();
+ m_pVisitedLB.clear();
+ m_pNotVisitedLB.clear();
+ m_pCharStyleContainer.clear();
SfxTabPage::dispose();
}
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index d06e0d662629..6390f463db6e 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -62,7 +62,7 @@ const sal_uInt16 SwDropCapsPage::aPageRg[] = {
class SwDropCapsPict : public Control
{
- SwDropCapsPage* mpPage;
+ VclPtr<SwDropCapsPage> mpPage;
OUString maText;
OUString maScriptText;
Color maBackColor;
@@ -210,6 +210,7 @@ void SwDropCapsPict::dispose()
{
if( mbDelPrinter )
delete mpPrinter;
+ mpPage.clear();
Control::dispose();
}
@@ -575,6 +576,25 @@ SwDropCapsPage::SwDropCapsPage(vcl::Window *pParent, const SfxItemSet &rSet)
SwDropCapsPage::~SwDropCapsPage()
{
+ dispose();
+}
+
+void SwDropCapsPage::dispose()
+{
+ m_pDropCapsBox.clear();
+ m_pWholeWordCB.clear();
+ m_pSwitchText.clear();
+ m_pDropCapsField.clear();
+ m_pLinesText.clear();
+ m_pLinesField.clear();
+ m_pDistanceText.clear();
+ m_pDistanceField.clear();
+ m_pTextText.clear();
+ m_pTextEdit.clear();
+ m_pTemplateText.clear();
+ m_pTemplateBox.clear();
+ m_pPict.clear();
+ SfxTabPage::dispose();
}
int SwDropCapsPage::DeactivatePage(SfxItemSet * _pSet)
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 29429aa16da0..04e923cc4d2d 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -101,6 +101,26 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(vcl::Window* pParent, const SfxItem
SwParagraphNumTabPage::~SwParagraphNumTabPage()
{
+ dispose();
+}
+
+void SwParagraphNumTabPage::dispose()
+{
+ m_pOutlineStartBX.clear();
+ m_pOutlineLvLB.clear();
+ m_pNumberStyleBX.clear();
+ m_pNumberStyleLB.clear();
+ m_pEditNumStyleBtn.clear();
+ m_pNewStartCB.clear();
+ m_pNewStartBX.clear();
+ m_pNewStartNumberCB.clear();
+ m_pNewStartNF.clear();
+ m_pCountParaFram.clear();
+ m_pCountParaCB.clear();
+ m_pRestartParaCountCB.clear();
+ m_pRestartBX.clear();
+ m_pRestartNF.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* SwParagraphNumTabPage::Create( vcl::Window* pParent,
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index bc1346861bcf..f279d5493897 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -132,6 +132,16 @@ void SwCondCollPage::dispose()
for(sal_Int32 i = 0; i < m_pFilterLB->GetEntryCount(); ++i)
delete static_cast<sal_uInt16*>(m_pFilterLB->GetEntryData(i));
+ m_pConditionCB.clear();
+ m_pContextFT.clear();
+ m_pUsedFT.clear();
+ m_pTbLinks.clear();
+ m_pStyleFT.clear();
+ m_pStyleLB.clear();
+ m_pFilterLB.clear();
+ m_pRemovePB.clear();
+ m_pAssignPB.clear();
+
SfxTabPage::dispose();
}
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 4b006c0a1381..c902ed7acc02 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -45,16 +45,16 @@ using namespace ::com::sun::star::beans;
class SwTestAccountSettingsDialog : public SfxModalDialog
{
- VclMultiLineEdit* m_pErrorsED;
+ VclPtr<VclMultiLineEdit> m_pErrorsED;
- PushButton* m_pStopPB;
+ VclPtr<PushButton> m_pStopPB;
- FixedText* m_pEstablish;
- FixedText* m_pFind;
- FixedText* m_pResult1;
- FixedText* m_pResult2;
- FixedImage* m_pImage1;
- FixedImage* m_pImage2;
+ VclPtr<FixedText> m_pEstablish;
+ VclPtr<FixedText> m_pFind;
+ VclPtr<FixedText> m_pResult1;
+ VclPtr<FixedText> m_pResult2;
+ VclPtr<FixedImage> m_pImage1;
+ VclPtr<FixedImage> m_pImage2;
Image m_aCompletedImg;
Image m_aFailedImg;
@@ -62,7 +62,7 @@ class SwTestAccountSettingsDialog : public SfxModalDialog
OUString m_sFailed;
OUString m_sErrorServer;
- SwMailConfigPage* m_pParent;
+ VclPtr<SwMailConfigPage> m_pParent;
bool m_bStop;
@@ -71,35 +71,37 @@ class SwTestAccountSettingsDialog : public SfxModalDialog
DECL_STATIC_LINK(SwTestAccountSettingsDialog, TestHdl, void*);
public:
SwTestAccountSettingsDialog(SwMailConfigPage* pParent);
+ virtual ~SwTestAccountSettingsDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
class SwAuthenticationSettingsDialog : public SfxModalDialog
{
- CheckBox* m_pAuthenticationCB;
-
- RadioButton* m_pSeparateAuthenticationRB;
- RadioButton* m_pSMTPAfterPOPRB;
-
- FixedText* m_pOutgoingServerFT;
- FixedText* m_pUserNameFT;
- Edit* m_pUserNameED;
- FixedText* m_pOutPasswordFT;
- Edit* m_pOutPasswordED;
-
- FixedText* m_pIncomingServerFT;
- FixedText* m_pServerFT;
- Edit* m_pServerED;
- FixedText* m_pPortFT;
- NumericField* m_pPortNF;
- FixedText* m_pProtocolFT;
- RadioButton* m_pPOP3RB;
- RadioButton* m_pIMAPRB;
- FixedText* m_pInUsernameFT;
- Edit* m_pInUsernameED;
- FixedText* m_pInPasswordFT;
- Edit* m_pInPasswordED;
-
- OKButton* m_pOKPB;
+ VclPtr<CheckBox> m_pAuthenticationCB;
+
+ VclPtr<RadioButton> m_pSeparateAuthenticationRB;
+ VclPtr<RadioButton> m_pSMTPAfterPOPRB;
+
+ VclPtr<FixedText> m_pOutgoingServerFT;
+ VclPtr<FixedText> m_pUserNameFT;
+ VclPtr<Edit> m_pUserNameED;
+ VclPtr<FixedText> m_pOutPasswordFT;
+ VclPtr<Edit> m_pOutPasswordED;
+
+ VclPtr<FixedText> m_pIncomingServerFT;
+ VclPtr<FixedText> m_pServerFT;
+ VclPtr<Edit> m_pServerED;
+ VclPtr<FixedText> m_pPortFT;
+ VclPtr<NumericField> m_pPortNF;
+ VclPtr<FixedText> m_pProtocolFT;
+ VclPtr<RadioButton> m_pPOP3RB;
+ VclPtr<RadioButton> m_pIMAPRB;
+ VclPtr<FixedText> m_pInUsernameFT;
+ VclPtr<Edit> m_pInUsernameED;
+ VclPtr<FixedText> m_pInPasswordFT;
+ VclPtr<Edit> m_pInPasswordED;
+
+ VclPtr<OKButton> m_pOKPB;
SwMailMergeConfigItem& rConfigItem;
@@ -110,6 +112,7 @@ class SwAuthenticationSettingsDialog : public SfxModalDialog
public:
SwAuthenticationSettingsDialog(SwMailConfigPage* pParent, SwMailMergeConfigItem& rItem);
virtual ~SwAuthenticationSettingsDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
SwMailConfigPage::SwMailConfigPage( vcl::Window* pParent, const SfxItemSet& rSet ) :
@@ -141,6 +144,16 @@ SwMailConfigPage::~SwMailConfigPage()
void SwMailConfigPage::dispose()
{
delete m_pConfigItem;
+ m_pDisplayNameED.clear();
+ m_pAddressED.clear();
+ m_pReplyToCB.clear();
+ m_pReplyToFT.clear();
+ m_pReplyToED.clear();
+ m_pServerED.clear();
+ m_pPortNF.clear();
+ m_pSecureCB.clear();
+ m_pServerAuthenticationPB.clear();
+ m_pTestPB.clear();
SfxTabPage::dispose();
}
@@ -244,6 +257,25 @@ SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare
Application::PostUserEvent( STATIC_LINK( this, SwTestAccountSettingsDialog, TestHdl ), this );
}
+SwTestAccountSettingsDialog::~SwTestAccountSettingsDialog()
+{
+ dispose();
+}
+
+void SwTestAccountSettingsDialog::dispose()
+{
+ m_pErrorsED.clear();
+ m_pStopPB.clear();
+ m_pEstablish.clear();
+ m_pFind.clear();
+ m_pResult1.clear();
+ m_pResult2.clear();
+ m_pImage1.clear();
+ m_pImage2.clear();
+ m_pParent.clear();
+ SfxModalDialog::dispose();
+}
+
IMPL_LINK_NOARG(SwTestAccountSettingsDialog, StopHdl)
{
m_bStop = true;
@@ -420,6 +452,33 @@ SwAuthenticationSettingsDialog::SwAuthenticationSettingsDialog(
SwAuthenticationSettingsDialog::~SwAuthenticationSettingsDialog()
{
+ dispose();
+}
+
+void SwAuthenticationSettingsDialog::dispose()
+{
+ m_pAuthenticationCB.clear();
+ m_pSeparateAuthenticationRB.clear();
+ m_pSMTPAfterPOPRB.clear();
+ m_pOutgoingServerFT.clear();
+ m_pUserNameFT.clear();
+ m_pUserNameED.clear();
+ m_pOutPasswordFT.clear();
+ m_pOutPasswordED.clear();
+ m_pIncomingServerFT.clear();
+ m_pServerFT.clear();
+ m_pServerED.clear();
+ m_pPortFT.clear();
+ m_pPortNF.clear();
+ m_pProtocolFT.clear();
+ m_pPOP3RB.clear();
+ m_pIMAPRB.clear();
+ m_pInUsernameFT.clear();
+ m_pInUsernameED.clear();
+ m_pInPasswordFT.clear();
+ m_pInPasswordED.clear();
+ m_pOKPB.clear();
+ SfxModalDialog::dispose();
}
IMPL_LINK_NOARG(SwAuthenticationSettingsDialog, OKHdl_Impl)
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index a0deaa471e9a..b90215015468 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -134,6 +134,10 @@ SwCompatibilityOptPage::~SwCompatibilityOptPage()
void SwCompatibilityOptPage::dispose()
{
delete m_pImpl;
+ m_pMain.clear();
+ m_pFormattingLB.clear();
+ m_pOptionsLB.clear();
+ m_pDefaultPB.clear();
SfxTabPage::dispose();
}
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 643e6437dd78..d0c8d8a67707 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -125,6 +125,30 @@ SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet)
m_pShowStandardizedPageCount->SetClickHdl(aLink);
}
+SwLoadOptPage::~SwLoadOptPage()
+{
+ dispose();
+}
+
+void SwLoadOptPage::dispose()
+{
+ m_pAlwaysRB.clear();
+ m_pRequestRB.clear();
+ m_pNeverRB.clear();
+ m_pAutoUpdateFields.clear();
+ m_pAutoUpdateCharts.clear();
+ m_pMetricLB.clear();
+ m_pTabFT.clear();
+ m_pTabMF.clear();
+ m_pUseSquaredPageMode.clear();
+ m_pUseCharUnit.clear();
+ m_pWordCountED.clear();
+ m_pShowStandardizedPageCount.clear();
+ m_pStandardizedPageSizeNF.clear();
+ SfxTabPage::dispose();
+}
+
+
SfxTabPage* SwLoadOptPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet )
{
@@ -524,6 +548,24 @@ void SwCaptionOptPage::dispose()
{
DelUserData();
delete pMgr;
+ m_pCheckLB.clear();
+ m_pLbCaptionOrder.clear();
+ m_pPreview.clear();
+ m_pSettingsGroup.clear();
+ m_pCategoryBox.clear();
+ m_pFormatText.clear();
+ m_pFormatBox.clear();
+ m_pNumberingSeparatorFT.clear();
+ m_pNumberingSeparatorED.clear();
+ m_pTextText.clear();
+ m_pTextEdit.clear();
+ m_pPosBox.clear();
+ m_pNumCapt.clear();
+ m_pLbLevel.clear();
+ m_pEdDelim.clear();
+ m_pCategory.clear();
+ m_pCharStyleLB.clear();
+ m_pApplyBorderCB.clear();
SfxTabPage::dispose();
}
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 5d7bafc7a834..5acc585686cf 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -156,8 +156,34 @@ SwContentOptPage::SwContentOptPage( vcl::Window* pParent,
SwContentOptPage::~SwContentOptPage()
{
+ dispose();
}
+void SwContentOptPage::dispose()
+{
+ m_pCrossCB.clear();
+ m_pHScrollBox.clear();
+ m_pVScrollBox.clear();
+ m_pAnyRulerCB.clear();
+ m_pHRulerCBox.clear();
+ m_pHMetric.clear();
+ m_pVRulerCBox.clear();
+ m_pVRulerRightCBox.clear();
+ m_pVMetric.clear();
+ m_pSmoothCBox.clear();
+ m_pGrfCB.clear();
+ m_pTblCB.clear();
+ m_pDrwCB.clear();
+ m_pFldNameCB.clear();
+ m_pPostItCB.clear();
+ m_pSettingsFrame.clear();
+ m_pSettingsLabel.clear();
+ m_pMetricLabel.clear();
+ m_pMetricLB.clear();
+ SfxTabPage::dispose();
+}
+
+
SfxTabPage* SwContentOptPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet)
{
@@ -352,6 +378,36 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(vcl::Window* pParent,
m_pProspectCB_RTL->Show(aCTLOptions.IsCTLFontEnabled());
}
+SwAddPrinterTabPage::~SwAddPrinterTabPage()
+{
+ dispose();
+}
+
+void SwAddPrinterTabPage::dispose()
+{
+ m_pGrfCB.clear();
+ m_pCtrlFldCB.clear();
+ m_pBackgroundCB.clear();
+ m_pBlackFontCB.clear();
+ m_pPrintHiddenTextCB.clear();
+ m_pPrintTextPlaceholderCB.clear();
+ m_pPagesFrame.clear();
+ m_pLeftPageCB.clear();
+ m_pRightPageCB.clear();
+ m_pProspectCB.clear();
+ m_pProspectCB_RTL.clear();
+ m_pCommentsFrame.clear();
+ m_pNoRB.clear();
+ m_pOnlyRB.clear();
+ m_pEndRB.clear();
+ m_pEndPageRB.clear();
+ m_pInMarginsRB.clear();
+ m_pPrintEmptyPagesCB.clear();
+ m_pPaperFromSetupCB.clear();
+ m_pFaxLB.clear();
+ SfxTabPage::dispose();
+}
+
void SwAddPrinterTabPage::SetPreview(bool bPrev)
{
bPreview = bPrev;
@@ -583,6 +639,19 @@ void SwStdFontTabPage::dispose()
{
delete pPrt;
}
+ pLabelFT.clear();
+ pStandardBox.clear();
+ pStandardHeightLB.clear();
+ pTitleBox.clear();
+ pTitleHeightLB.clear();
+ pListBox.clear();
+ pListHeightLB.clear();
+ pLabelBox.clear();
+ pLabelHeightLB.clear();
+ pIdxBox.clear();
+ pIndexHeightLB.clear();
+ pDocOnlyCB.clear();
+ pStandardPB.clear();
SfxTabPage::dispose();
}
@@ -1088,6 +1157,26 @@ SwTableOptionsTabPage::SwTableOptionsTabPage( vcl::Window* pParent, const SfxIte
SwTableOptionsTabPage::~SwTableOptionsTabPage()
{
+ dispose();
+}
+
+void SwTableOptionsTabPage::dispose()
+{
+ pHeaderCB.clear();
+ pRepeatHeaderCB.clear();
+ pDontSplitCB.clear();
+ pBorderCB.clear();
+ pNumFormattingCB.clear();
+ pNumFmtFormattingCB.clear();
+ pNumAlignmentCB.clear();
+ pRowMoveMF.clear();
+ pColMoveMF.clear();
+ pRowInsertMF.clear();
+ pColInsertMF.clear();
+ pFixRB.clear();
+ pFixPropRB.clear();
+ pVarRB.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* SwTableOptionsTabPage::Create( vcl::Window* pParent,
@@ -1324,6 +1413,31 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( vcl::Window* pParent,
SwShdwCrsrOptionsTabPage::~SwShdwCrsrOptionsTabPage()
{
+ dispose();
+}
+
+void SwShdwCrsrOptionsTabPage::dispose()
+{
+ m_pParaCB.clear();
+ m_pSHyphCB.clear();
+ m_pSpacesCB.clear();
+ m_pHSpacesCB.clear();
+ m_pTabCB.clear();
+ m_pBreakCB.clear();
+ m_pCharHiddenCB.clear();
+ m_pFldHiddenCB.clear();
+ m_pFldHiddenParaCB.clear();
+ m_pDirectCursorFrame.clear();
+ m_pOnOffCB.clear();
+ m_pFillMarginRB.clear();
+ m_pFillIndentRB.clear();
+ m_pFillTabRB.clear();
+ m_pFillSpaceRB.clear();
+ m_pCursorProtFrame.clear();
+ m_pCrsrInProtCB.clear();
+ m_pIgnoreProtCB.clear();
+ m_pMathBaselineAlignmentCB.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* SwShdwCrsrOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
@@ -1737,6 +1851,24 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( vcl::Window* pParent,
SwRedlineOptionsTabPage::~SwRedlineOptionsTabPage()
{
+ dispose();
+}
+
+void SwRedlineOptionsTabPage::dispose()
+{
+ pInsertLB.clear();
+ pInsertColorLB.clear();
+ pInsertedPreviewWN.clear();
+ pDeletedLB.clear();
+ pDeletedColorLB.clear();
+ pDeletedPreviewWN.clear();
+ pChangedLB.clear();
+ pChangedColorLB.clear();
+ pChangedPreviewWN.clear();
+ pMarkPosLB.clear();
+ pMarkColorLB.clear();
+ pMarkPreviewWN.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* SwRedlineOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
@@ -2238,6 +2370,19 @@ SwCompareOptionsTabPage::SwCompareOptionsTabPage( vcl::Window* pParent, const S
SwCompareOptionsTabPage::~SwCompareOptionsTabPage()
{
+ dispose();
+}
+
+void SwCompareOptionsTabPage::dispose()
+{
+ m_pAutoRB.clear();
+ m_pWordRB.clear();
+ m_pCharRB.clear();
+ m_pRsidCB.clear();
+ m_pIgnoreCB.clear();
+ m_pLenNF.clear();
+ m_pStoreRsidCB.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* SwCompareOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
@@ -2373,6 +2518,26 @@ SwTestTabPage::SwTestTabPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
}
+SwTestTabPage::~SwTestTabPage()
+{
+ dispose();
+}
+
+void SwTestTabPage::dispose()
+{
+ m_pTest1CBox.clear();
+ m_pTest2CBox.clear();
+ m_pTest3CBox.clear();
+ m_pTest4CBox.clear();
+ m_pTest5CBox.clear();
+ m_pTest6CBox.clear();
+ m_pTest7CBox.clear();
+ m_pTest8CBox.clear();
+ m_pTest9CBox.clear();
+ m_pTest10CBox.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* SwTestTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet )
{
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 3a469aca6ac6..71d69b25823c 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -277,7 +277,15 @@ void SwAddressListDialog::dispose()
delete pUserData;
pEntry = m_pListLB->Next( pEntry );
}
- delete m_pListLB;
+ m_pAddressPage.clear();
+ m_pListLB.clear();
+ m_pDescriptionFI.clear();
+ m_pLoadListPB.clear();
+ m_pCreateListPB.clear();
+ m_pFilterPB.clear();
+ m_pEditPB.clear();
+ m_pTablePB.clear();
+ m_pOK.clear();
SfxModalDialog::dispose();
}
diff --git a/sw/source/ui/dbui/addresslistdialog.hxx b/sw/source/ui/dbui/addresslistdialog.hxx
index 59d2c4051e3c..708876448579 100644
--- a/sw/source/ui/dbui/addresslistdialog.hxx
+++ b/sw/source/ui/dbui/addresslistdialog.hxx
@@ -46,17 +46,17 @@ class SwAddrSourceLB;
class SwAddressListDialog : public SfxModalDialog
{
- FixedText* m_pDescriptionFI;
+ VclPtr<FixedText> m_pDescriptionFI;
- SwAddrSourceLB* m_pListLB;
+ VclPtr<SwAddrSourceLB> m_pListLB;
- PushButton* m_pLoadListPB;
- PushButton* m_pCreateListPB;
- PushButton* m_pFilterPB;
- PushButton* m_pEditPB;
- PushButton* m_pTablePB;
+ VclPtr<PushButton> m_pLoadListPB;
+ VclPtr<PushButton> m_pCreateListPB;
+ VclPtr<PushButton> m_pFilterPB;
+ VclPtr<PushButton> m_pEditPB;
+ VclPtr<PushButton> m_pTablePB;
- OKButton* m_pOK;
+ VclPtr<OKButton> m_pOK;
OUString m_sName;
OUString m_sTable;
@@ -66,7 +66,7 @@ class SwAddressListDialog : public SfxModalDialog
bool m_bInSelectHdl;
- SwMailMergeAddressBlockPage* m_pAddressPage;
+ VclPtr<SwMailMergeAddressBlockPage> m_pAddressPage;
::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseContext> m_xDBContext;
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 2806672bba9a..d54a313ac875 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -46,11 +46,11 @@ using namespace ::com::sun::star::ui::dialogs;
class SwAddressControl_Impl : public Control
{
- ScrollBar *m_pScrollBar;
- Window *m_pWindow;
+ VclPtr<ScrollBar> m_pScrollBar;
+ VclPtr<Window> m_pWindow;
- ::std::vector<FixedText*> m_aFixedTexts;
- ::std::vector<Edit*> m_aEdits;
+ ::std::vector<VclPtr<FixedText> > m_aFixedTexts;
+ ::std::vector<VclPtr<Edit> > m_aEdits;
SwCSVData* m_pData;
Size m_aWinOutputSize;
@@ -119,14 +119,10 @@ SwAddressControl_Impl::~SwAddressControl_Impl()
void SwAddressControl_Impl::dispose()
{
- ::std::vector<FixedText*>::iterator aTextIter;
- for(aTextIter = m_aFixedTexts.begin(); aTextIter != m_aFixedTexts.end(); ++aTextIter)
- delete *aTextIter;
- ::std::vector<Edit*>::iterator aEditIter;
- for(aEditIter = m_aEdits.begin(); aEditIter != m_aEdits.end(); ++aEditIter)
- delete *aEditIter;
- delete m_pScrollBar;
- delete m_pWindow;
+ m_aFixedTexts.clear();
+ m_aEdits.clear();
+ m_pScrollBar.clear();
+ m_pWindow.clear();
Control::dispose();
}
@@ -136,12 +132,6 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
//when the address data is updated then remove the controls an build again
if(m_aFixedTexts.size())
{
- ::std::vector<FixedText*>::iterator aTextIter;
- for(aTextIter = m_aFixedTexts.begin(); aTextIter != m_aFixedTexts.end(); ++aTextIter)
- delete *aTextIter;
- ::std::vector<Edit*>::iterator aEditIter;
- for(aEditIter = m_aEdits.begin(); aEditIter != m_aEdits.end(); ++aEditIter)
- delete *aEditIter;
m_aFixedTexts.clear();
m_aEdits.clear();
m_bNoDataSet = true;
@@ -251,9 +241,8 @@ void SwAddressControl_Impl::SetCurrentDataSet(sal_uInt32 nSet)
OSL_ENSURE(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index");
if(m_pData->aDBData.size() > m_nCurrentDataSet)
{
- ::std::vector<Edit*>::iterator aEditIter;
sal_uInt32 nIndex = 0;
- for(aEditIter = m_aEdits.begin(); aEditIter != m_aEdits.end(); ++aEditIter, ++nIndex)
+ for(auto aEditIter = m_aEdits.begin(); aEditIter != m_aEdits.end(); ++aEditIter, ++nIndex)
{
OSL_ENSURE(nIndex < m_pData->aDBData[m_nCurrentDataSet].size(),
"number of columns doesn't match number of Edits");
@@ -387,8 +376,7 @@ void SwAddressControl_Impl::Resize()
{
long nNewEditSize = aSize.Width() - (*m_aEdits.begin())->GetPosPixel().X() - nScrollBarWidth - 6;
- ::std::vector<Edit*>::iterator aEditIter;
- for(aEditIter = m_aEdits.begin(); aEditIter != m_aEdits.end(); ++aEditIter)
+ for(auto aEditIter = m_aEdits.begin(); aEditIter != m_aEdits.end(); ++aEditIter)
{
(*aEditIter)->SetSizePixel(Size(nNewEditSize, (*aEditIter)->GetSizePixel().Height()));
}
@@ -508,7 +496,18 @@ SwCreateAddressListDialog::~SwCreateAddressListDialog()
void SwCreateAddressListDialog::dispose()
{
delete m_pCSVData;
- delete m_pFindDlg;
+ m_pAddressControl.clear();
+ m_pNewPB.clear();
+ m_pDeletePB.clear();
+ m_pFindPB.clear();
+ m_pCustomizePB.clear();
+ m_pStartPB.clear();
+ m_pPrevPB.clear();
+ m_pSetNoNF.clear();
+ m_pNextPB.clear();
+ m_pEndPB.clear();
+ m_pOK.clear();
+ m_pFindDlg.clear();
SfxModalDialog::dispose();
}
@@ -764,6 +763,23 @@ SwFindEntryDialog::SwFindEntryDialog(SwCreateAddressListDialog* pParent)
m_pCancel->SetClickHdl(LINK(this, SwFindEntryDialog, CloseHdl_Impl));
}
+SwFindEntryDialog::~SwFindEntryDialog()
+{
+ dispose();
+}
+
+void SwFindEntryDialog::dispose()
+{
+ m_pFindED.clear();
+ m_pFindOnlyCB.clear();
+ m_pFindOnlyLB.clear();
+ m_pFindPB.clear();
+ m_pCancel.clear();
+ m_pParent.clear();
+ ModelessDialog::dispose();
+}
+
+
IMPL_LINK_NOARG(SwFindEntryDialog, FindHdl_Impl)
{
sal_Int32 nColumn = -1;
diff --git a/sw/source/ui/dbui/createaddresslistdialog.hxx b/sw/source/ui/dbui/createaddresslistdialog.hxx
index dec027a5514f..ac6ed41cfab2 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.hxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.hxx
@@ -40,27 +40,27 @@ struct SwCSVData
class SwFindEntryDialog;
class SwCreateAddressListDialog : public SfxModalDialog
{
- SwAddressControl_Impl* m_pAddressControl;
+ VclPtr<SwAddressControl_Impl> m_pAddressControl;
- PushButton *m_pNewPB;
- PushButton *m_pDeletePB;
- PushButton *m_pFindPB;
- PushButton *m_pCustomizePB;
+ VclPtr<PushButton> m_pNewPB;
+ VclPtr<PushButton> m_pDeletePB;
+ VclPtr<PushButton> m_pFindPB;
+ VclPtr<PushButton> m_pCustomizePB;
- PushButton *m_pStartPB;
- PushButton *m_pPrevPB;
- NumericField *m_pSetNoNF;
- PushButton *m_pNextPB;
- PushButton *m_pEndPB;
+ VclPtr<PushButton> m_pStartPB;
+ VclPtr<PushButton> m_pPrevPB;
+ VclPtr<NumericField> m_pSetNoNF;
+ VclPtr<PushButton> m_pNextPB;
+ VclPtr<PushButton> m_pEndPB;
- OKButton *m_pOK;
+ VclPtr<OKButton> m_pOK;
OUString m_sAddressListFilterName;
OUString m_sURL;
SwCSVData* m_pCSVData;
- SwFindEntryDialog* m_pFindDlg;
+ VclPtr<SwFindEntryDialog> m_pFindDlg;
DECL_LINK(NewHdl_Impl, void *);
DECL_LINK(DeleteHdl_Impl, void *);
@@ -84,14 +84,14 @@ public:
class SwFindEntryDialog : public ModelessDialog
{
- Edit* m_pFindED;
- CheckBox* m_pFindOnlyCB;
- ListBox* m_pFindOnlyLB;
+ VclPtr<Edit> m_pFindED;
+ VclPtr<CheckBox> m_pFindOnlyCB;
+ VclPtr<ListBox> m_pFindOnlyLB;
- PushButton* m_pFindPB;
- CancelButton* m_pCancel;
+ VclPtr<PushButton> m_pFindPB;
+ VclPtr<CancelButton> m_pCancel;
- SwCreateAddressListDialog* m_pParent;
+ VclPtr<SwCreateAddressListDialog> m_pParent;
DECL_LINK(FindHdl_Impl, void *);
DECL_LINK(FindEnableHdl_Impl, void *);
@@ -99,6 +99,8 @@ class SwFindEntryDialog : public ModelessDialog
public:
SwFindEntryDialog(SwCreateAddressListDialog* pParent);
+ virtual ~SwFindEntryDialog();
+ virtual void dispose() SAL_OVERRIDE;
ListBox& GetFieldsListBox()
{
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index c812fcd37a1a..5db3c7c13238 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -24,7 +24,6 @@
#include <vcl/msgbox.hxx>
#include <dbui.hrc>
#include <helpid.h>
-#include <boost/scoped_ptr.hpp>
SwCustomizeAddressListDialog::SwCustomizeAddressListDialog(
vcl::Window* pParent, const SwCSVData& rOldData)
@@ -61,8 +60,21 @@ SwCustomizeAddressListDialog::SwCustomizeAddressListDialog(
SwCustomizeAddressListDialog::~SwCustomizeAddressListDialog()
{
+ dispose();
}
+void SwCustomizeAddressListDialog::dispose()
+{
+ m_pFieldsLB.clear();
+ m_pAddPB.clear();
+ m_pDeletePB.clear();
+ m_pRenamePB.clear();
+ m_pUpPB.clear();
+ m_pDownPB.clear();
+ SfxModalDialog::dispose();
+}
+
+
IMPL_LINK_NOARG(SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl)
{
UpdateButtons();
@@ -76,11 +88,11 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
- boost::scoped_ptr<SwAddRenameEntryDialog> pDlg;
+ VclPtr<SwAddRenameEntryDialog> pDlg;
if (bRename)
- pDlg.reset(new SwRenameEntryDialog(pButton, m_pNewData->aDBColumnHeaders));
+ pDlg = new SwRenameEntryDialog(pButton, m_pNewData->aDBColumnHeaders);
else
- pDlg.reset(new SwAddEntryDialog(pButton, m_pNewData->aDBColumnHeaders));
+ pDlg = new SwAddEntryDialog(pButton, m_pNewData->aDBColumnHeaders);
if(bRename)
{
OUString aTemp = m_pFieldsLB->GetEntry(nPos);
@@ -111,7 +123,6 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
m_pFieldsLB->InsertEntry(sNew, nPos);
m_pFieldsLB->SelectEntryPos(nPos);
}
- pDlg.reset();
UpdateButtons();
return 0;
}
@@ -184,6 +195,18 @@ SwAddRenameEntryDialog::SwAddRenameEntryDialog(
ModifyHdl_Impl(m_pFieldNameED);
}
+SwAddRenameEntryDialog::~SwAddRenameEntryDialog()
+{
+ dispose();
+}
+
+void SwAddRenameEntryDialog::dispose()
+{
+ m_pFieldNameED.clear();
+ m_pOK.clear();
+ SfxModalDialog::dispose();
+}
+
IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
{
OUString sEntry = pEdit->GetText();
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hxx b/sw/source/ui/dbui/customizeaddresslistdialog.hxx
index e0592085047f..e943f657b3f3 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.hxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.hxx
@@ -29,14 +29,14 @@ struct SwCSVData;
class SwCustomizeAddressListDialog : public SfxModalDialog
{
- ListBox* m_pFieldsLB;
+ VclPtr<ListBox> m_pFieldsLB;
- PushButton* m_pAddPB;
- PushButton* m_pDeletePB;
- PushButton* m_pRenamePB;
+ VclPtr<PushButton> m_pAddPB;
+ VclPtr<PushButton> m_pDeletePB;
+ VclPtr<PushButton> m_pRenamePB;
- PushButton* m_pUpPB;
- PushButton* m_pDownPB;
+ VclPtr<PushButton> m_pUpPB;
+ VclPtr<PushButton> m_pDownPB;
SwCSVData* m_pNewData;
@@ -49,20 +49,24 @@ class SwCustomizeAddressListDialog : public SfxModalDialog
public:
SwCustomizeAddressListDialog(vcl::Window* pParent, const SwCSVData& rOldData);
virtual ~SwCustomizeAddressListDialog();
+ virtual void dispose() SAL_OVERRIDE;
SwCSVData* GetNewData() { return m_pNewData;}
};
class SwAddRenameEntryDialog : public SfxModalDialog
{
- Edit* m_pFieldNameED;
- OKButton* m_pOK;
+ VclPtr<Edit> m_pFieldNameED;
+ VclPtr<OKButton> m_pOK;
const std::vector< OUString >& m_rCSVHeader;
DECL_LINK(ModifyHdl_Impl, Edit*);
protected:
SwAddRenameEntryDialog(vcl::Window* pParent, const OUString& rID,
const OUString& rUIXMLDescription, const std::vector< OUString >& rCSVHeader);
+ virtual ~SwAddRenameEntryDialog();
+ virtual void dispose() SAL_OVERRIDE;
+
public:
void SetFieldName(const OUString& rName) {m_pFieldNameED->SetText(rName);}
OUString GetFieldName() const {return m_pFieldNameED->GetText();};
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 247a531a73ce..4c8da211625c 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -421,6 +421,31 @@ void SwInsertDBColAutoPilot::dispose()
delete pRep;
delete pTAutoFmt;
+ m_pRbAsTable.clear();
+ m_pRbAsField.clear();
+ m_pRbAsText.clear();
+ m_pHeadFrame.clear();
+ m_pLbTblDbColumn.clear();
+ m_pLbTxtDbColumn.clear();
+ m_pFormatFrame.clear();
+ m_pRbDbFmtFromDb.clear();
+ m_pRbDbFmtFromUsr.clear();
+ m_pLbDbFmtFromUsr.clear();
+ m_pIbDbcolToEdit.clear();
+ m_pEdDbText.clear();
+ m_pFtDbParaColl.clear();
+ m_pLbDbParaColl.clear();
+ m_pIbDbcolAllTo.clear();
+ m_pIbDbcolOneTo.clear();
+ m_pIbDbcolOneFrom.clear();
+ m_pIbDbcolAllFrom.clear();
+ m_pFtTableCol.clear();
+ m_pLbTableCol.clear();
+ m_pCbTableHeadon.clear();
+ m_pRbHeadlColnms.clear();
+ m_pRbHeadlEmpty.clear();
+ m_pPbTblFormat.clear();
+ m_pPbTblAutofmt.clear();
SfxModalDialog::dispose();
}
@@ -773,9 +798,9 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
ListBox* pGetBox = pBox == m_pLbDbFmtFromUsr
? ( m_pRbAsTable->IsChecked()
? ( 0 == m_pLbTableCol->GetEntryData( 0 )
- ? m_pLbTblDbColumn
- : m_pLbTableCol )
- : m_pLbTxtDbColumn )
+ ? m_pLbTblDbColumn.get()
+ : m_pLbTableCol.get() )
+ : m_pLbTxtDbColumn.get() )
: pBox;
SwInsDBColumn aSrch( pGetBox->GetSelectEntry(), 0 );
@@ -823,7 +848,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
// to know later on, what ListBox was the "active", a Flag
// is remembered in the 1st entry
- void* pPtr = pBox == m_pLbTableCol ? m_pLbTableCol : 0;
+ void* pPtr = pBox == m_pLbTableCol ? m_pLbTableCol.get() : 0;
m_pLbTableCol->SetEntryData( 0, pPtr );
}
return 0;
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
index 76c66c7b7449..d62f410a56b6 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
@@ -91,6 +91,8 @@ void SwDBTablePreviewDialog::dispose()
m_xFrame->setComponent(NULL, NULL);
m_xFrame->dispose();
}
+ m_pDescriptionFI.clear();
+ m_pBeamerWIN.clear();
SfxModalDialog::dispose();
}
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.hxx b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
index a1d9dcefe802..bae176de7b74 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.hxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
@@ -31,8 +31,8 @@ namespace com{ namespace sun{ namespace star{
class SwDBTablePreviewDialog : public SfxModalDialog
{
- FixedText* m_pDescriptionFI;
- vcl::Window* m_pBeamerWIN;
+ VclPtr<FixedText> m_pDescriptionFI;
+ VclPtr<vcl::Window> m_pBeamerWIN;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 > m_xFrame;
public:
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 4698f3d77104..73476fd633cd 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -93,6 +93,32 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage( SwMailMergeWizard* _pP
m_pNextSetIB->SetClickHdl(aLink);
}
+SwMailMergeAddressBlockPage::~SwMailMergeAddressBlockPage()
+{
+ dispose();
+}
+
+void SwMailMergeAddressBlockPage::dispose()
+{
+ m_pAddressListPB.clear();
+ m_pCurrentAddressFI.clear();
+ m_pStep2.clear();
+ m_pStep3.clear();
+ m_pStep4.clear();
+ m_pSettingsFI.clear();
+ m_pAddressCB.clear();
+ m_pSettingsWIN.clear();
+ m_pSettingsPB.clear();
+ m_pHideEmptyParagraphsCB.clear();
+ m_pAssignPB.clear();
+ m_pPreviewWIN.clear();
+ m_pDocumentIndexFI.clear();
+ m_pPrevSetIB.clear();
+ m_pNextSetIB.clear();
+ m_pWizard.clear();
+ svt::OWizardPage::dispose();
+}
+
bool SwMailMergeAddressBlockPage::canAdvance() const
{
return m_pWizard->GetConfigItem().GetResultSet().is();
@@ -330,6 +356,20 @@ SwSelectAddressBlockDialog::SwSelectAddressBlockDialog(
SwSelectAddressBlockDialog::~SwSelectAddressBlockDialog()
{
+ dispose();
+}
+
+void SwSelectAddressBlockDialog::dispose()
+{
+ m_pPreview.clear();
+ m_pNewPB.clear();
+ m_pCustomizePB.clear();
+ m_pDeletePB.clear();
+ m_pNeverRB.clear();
+ m_pAlwaysRB.clear();
+ m_pDependentRB.clear();
+ m_pCountryED.clear();
+ SfxModalDialog::dispose();
}
void SwSelectAddressBlockDialog::SetAddressBlocks(const uno::Sequence< OUString>& rBlocks,
@@ -533,6 +573,26 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
SwCustomizeAddressBlockDialog::~SwCustomizeAddressBlockDialog()
{
+ dispose();
+}
+
+void SwCustomizeAddressBlockDialog::dispose()
+{
+ m_pAddressElementsFT.clear();
+ m_pAddressElementsLB.clear();
+ m_pInsertFieldIB.clear();
+ m_pRemoveFieldIB.clear();
+ m_pDragFT.clear();
+ m_pDragED.clear();
+ m_pUpIB.clear();
+ m_pLeftIB.clear();
+ m_pRightIB.clear();
+ m_pDownIB.clear();
+ m_pFieldFT.clear();
+ m_pFieldCB.clear();
+ m_pPreviewWIN.clear();
+ m_pOK.clear();
+ SfxModalDialog::dispose();
}
IMPL_LINK_NOARG(SwCustomizeAddressBlockDialog, OKHdl_Impl)
@@ -750,9 +810,9 @@ class SwAssignFieldsControl : public Control
VclPtr<HeaderBar> m_aHeaderHB;
VclPtr<Window> m_aWindow;
- ::std::vector<FixedText*> m_aFieldNames;
- ::std::vector<ListBox*> m_aMatches;
- ::std::vector<FixedText*> m_aPreviews;
+ ::std::vector<VclPtr<FixedText> > m_aFieldNames;
+ ::std::vector<VclPtr<ListBox> > m_aMatches;
+ ::std::vector<VclPtr<FixedText> > m_aPreviews;
SwMailMergeConfigItem* m_rConfigItem;
@@ -929,14 +989,9 @@ SwAssignFieldsControl::~SwAssignFieldsControl()
void SwAssignFieldsControl::dispose()
{
- ::std::vector<FixedText*>::iterator aFIIter;
- for(aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter)
- delete *aFIIter;
- ::std::vector<ListBox*>::iterator aLBIter;
- for(aLBIter = m_aMatches.begin(); aLBIter != m_aMatches.end(); ++aLBIter)
- delete *aLBIter;
- for(aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter)
- delete *aFIIter;
+ m_aFieldNames.clear();
+ m_aMatches.clear();
+ m_aPreviews.clear();
m_aVScroll.disposeAndClear();
m_aHeaderHB.disposeAndClear();
@@ -972,16 +1027,14 @@ void SwAssignFieldsControl::Resize()
long nControlHeight = std::max(m_aFieldNames[0]->get_preferred_size().Height(),
m_aMatches[0]->get_preferred_size().Height());
- ::std::vector<FixedText*>::iterator aFIIter;
- for(aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter)
+ for(auto aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter)
(*aFIIter)->SetSizePixel(Size(nColWidth - 6, nControlHeight));
- ::std::vector<ListBox*>::iterator aLBIter;
- for(aLBIter = m_aMatches.begin(); aLBIter != m_aMatches.end(); ++aLBIter)
+ for(auto aLBIter = m_aMatches.begin(); aLBIter != m_aMatches.end(); ++aLBIter)
{
long nPosY = (*aLBIter)->GetPosPixel().Y();
(*aLBIter)->SetPosSizePixel(Point(nColWidth, nPosY), Size(nColWidth - 6, nControlHeight));
}
- for(aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter)
+ for(auto aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter)
{
long nPosY = (*aFIIter)->GetPosPixel().Y();
(*aFIIter)->SetPosSizePixel(Point(2 * nColWidth + 6, nPosY), Size(nColWidth, nControlHeight));
@@ -1046,14 +1099,11 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
long nMove = m_nFirstYPos - (*m_aMatches.begin())->GetPosPixel().Y() - (nThumb * m_nYOffset);
SetUpdateMode(false);
- long nIndex;
- ::std::vector<FixedText*>::iterator aFIIter;
- for(nIndex = 0, aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter, ++nIndex)
+ for(auto aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter)
lcl_Move(*aFIIter, nMove);
- ::std::vector<ListBox*>::iterator aLBIter;
- for(nIndex = 0, aLBIter = m_aMatches.begin(); aLBIter != m_aMatches.end(); ++aLBIter, ++nIndex)
+ for(auto aLBIter = m_aMatches.begin(); aLBIter != m_aMatches.end(); ++aLBIter)
lcl_Move(*aLBIter, nMove);
- for(nIndex = 0, aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter, ++nIndex)
+ for(auto aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter)
lcl_Move(*aFIIter, nMove);
SetUpdateMode(true);
@@ -1082,9 +1132,8 @@ IMPL_LINK(SwAssignFieldsControl, MatchHdl_Impl, ListBox*, pBox)
}
}
}
- ::std::vector<ListBox*>::iterator aLBIter;
sal_Int32 nIndex = 0;
- for(aLBIter = m_aMatches.begin(); aLBIter != m_aMatches.end(); ++aLBIter, ++nIndex)
+ for(auto aLBIter = m_aMatches.begin(); aLBIter != m_aMatches.end(); ++aLBIter, ++nIndex)
{
if(*aLBIter == pBox)
{
@@ -1101,8 +1150,7 @@ IMPL_LINK(SwAssignFieldsControl, GotFocusHdl_Impl, ListBox*, pBox)
if(0 != (GETFOCUS_TAB & pBox->GetGetFocusFlags()))
{
sal_Int32 nIndex = 0;
- ::std::vector<ListBox*>::iterator aLBIter;
- for(aLBIter = m_aMatches.begin(); aLBIter != m_aMatches.end(); ++aLBIter, ++nIndex)
+ for(auto aLBIter = m_aMatches.begin(); aLBIter != m_aMatches.end(); ++aLBIter, ++nIndex)
{
if(*aLBIter == pBox)
{
@@ -1161,6 +1209,17 @@ SwAssignFieldsDialog::SwAssignFieldsDialog(
SwAssignFieldsDialog::~SwAssignFieldsDialog()
{
+ dispose();
+}
+
+void SwAssignFieldsDialog::dispose()
+{
+ m_pMatchingFI.clear();
+ m_pFieldsControl.clear();
+ m_pPreviewFI.clear();
+ m_pPreviewWIN.clear();
+ m_pOK.clear();
+ SfxModalDialog::dispose();
}
uno::Sequence< OUString > SwAssignFieldsDialog::CreateAssignments()
@@ -1168,9 +1227,8 @@ uno::Sequence< OUString > SwAssignFieldsDialog::CreateAssignments()
uno::Sequence< OUString > aAssignments(
m_rConfigItem.GetDefaultAddressHeaders().Count());
OUString* pAssignments = aAssignments.getArray();
- ::std::vector<ListBox*>::iterator aLBIter;
sal_Int32 nIndex = 0;
- for(aLBIter = m_pFieldsControl->m_aMatches.begin();
+ for(auto aLBIter = m_pFieldsControl->m_aMatches.begin();
aLBIter != m_pFieldsControl->m_aMatches.end();
++aLBIter, ++nIndex)
{
@@ -1213,6 +1271,18 @@ DDListBox::DDListBox(vcl::Window* pParent, WinBits nStyle)
}
+DDListBox::~DDListBox()
+{
+ dispose();
+}
+
+void DDListBox::dispose()
+{
+ m_pParentDialog.clear();
+ SvTreeListBox::dispose();
+}
+
+
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeDDListBox(vcl::Window *pParent, VclBuilder::stringmap &rMap)
{
WinBits nWinStyle = WB_TABSTOP;
@@ -1257,6 +1327,19 @@ AddressMultiLineEdit::AddressMultiLineEdit(vcl::Window* pParent, WinBits nBits)
EnableFocusSelectionHide(false);
}
+AddressMultiLineEdit::~AddressMultiLineEdit()
+{
+ dispose();
+}
+
+void AddressMultiLineEdit::dispose()
+{
+ EndListening(*GetTextEngine());
+ m_pParentDialog.clear();
+ VclMultiLineEdit::dispose();
+}
+
+
Size AddressMultiLineEdit::GetOptimalSize() const
{
return LogicToPixel(Size(160, 60), MAP_APPFONT);
@@ -1276,11 +1359,6 @@ void AddressMultiLineEdit::SetAddressDialog(SwCustomizeAddressBlockDialog *pPare
m_pParentDialog = pParent;
}
-AddressMultiLineEdit::~AddressMultiLineEdit()
-{
- EndListening(*GetTextEngine());
-}
-
void AddressMultiLineEdit::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
if (m_aSelectionLink.IsSet() && dynamic_cast<const TextHint*>(&rHint))
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index 6824bed6f897..2f93a750f1b1 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -37,31 +37,31 @@ class SwMailMergeConfigItem;
class SwMailMergeAddressBlockPage : public svt::OWizardPage
{
- PushButton* m_pAddressListPB;
- FixedText* m_pCurrentAddressFI;
+ VclPtr<PushButton> m_pAddressListPB;
+ VclPtr<FixedText> m_pCurrentAddressFI;
- VclContainer* m_pStep2;
- VclContainer* m_pStep3;
- VclContainer* m_pStep4;
+ VclPtr<VclContainer> m_pStep2;
+ VclPtr<VclContainer> m_pStep3;
+ VclPtr<VclContainer> m_pStep4;
- FixedText* m_pSettingsFI;
- CheckBox* m_pAddressCB;
- SwAddressPreview* m_pSettingsWIN;
- PushButton* m_pSettingsPB;
- CheckBox* m_pHideEmptyParagraphsCB;
+ VclPtr<FixedText> m_pSettingsFI;
+ VclPtr<CheckBox> m_pAddressCB;
+ VclPtr<SwAddressPreview> m_pSettingsWIN;
+ VclPtr<PushButton> m_pSettingsPB;
+ VclPtr<CheckBox> m_pHideEmptyParagraphsCB;
- PushButton* m_pAssignPB;
+ VclPtr<PushButton> m_pAssignPB;
- SwAddressPreview* m_pPreviewWIN;
- FixedText* m_pDocumentIndexFI;
- PushButton* m_pPrevSetIB;
- PushButton* m_pNextSetIB;
+ VclPtr<SwAddressPreview> m_pPreviewWIN;
+ VclPtr<FixedText> m_pDocumentIndexFI;
+ VclPtr<PushButton> m_pPrevSetIB;
+ VclPtr<PushButton> m_pNextSetIB;
OUString m_sDocument;
OUString m_sCurrentAddress;
OUString m_sChangeAddress;
- SwMailMergeWizard* m_pWizard;
+ VclPtr<SwMailMergeWizard> m_pWizard;
DECL_LINK(AddressListHdl_Impl, void *);
DECL_LINK(SettingsHdl_Impl, PushButton*);
@@ -79,20 +79,22 @@ class SwMailMergeAddressBlockPage : public svt::OWizardPage
public:
SwMailMergeAddressBlockPage(SwMailMergeWizard* _pParent);
+ virtual ~SwMailMergeAddressBlockPage();
+ virtual void dispose() SAL_OVERRIDE;
SwMailMergeWizard* GetWizard() { return m_pWizard; }
};
class SwSelectAddressBlockDialog : public SfxModalDialog
{
- SwAddressPreview* m_pPreview;
- PushButton* m_pNewPB;
- PushButton* m_pCustomizePB;
- PushButton* m_pDeletePB;
+ VclPtr<SwAddressPreview> m_pPreview;
+ VclPtr<PushButton> m_pNewPB;
+ VclPtr<PushButton> m_pCustomizePB;
+ VclPtr<PushButton> m_pDeletePB;
- RadioButton* m_pNeverRB;
- RadioButton* m_pAlwaysRB;
- RadioButton* m_pDependentRB;
- Edit* m_pCountryED;
+ VclPtr<RadioButton> m_pNeverRB;
+ VclPtr<RadioButton> m_pAlwaysRB;
+ VclPtr<RadioButton> m_pDependentRB;
+ VclPtr<Edit> m_pCountryED;
com::sun::star::uno::Sequence< OUString> m_aAddressBlocks;
SwMailMergeConfigItem& m_rConfig;
@@ -106,6 +108,7 @@ class SwSelectAddressBlockDialog : public SfxModalDialog
public:
SwSelectAddressBlockDialog(vcl::Window* pParent, SwMailMergeConfigItem& rConfig);
virtual ~SwSelectAddressBlockDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetAddressBlocks(const com::sun::star::uno::Sequence< OUString>& rBlocks,
sal_uInt16 nSelected);
@@ -119,9 +122,11 @@ public:
class SwCustomizeAddressBlockDialog;
class DDListBox : public SvTreeListBox
{
- SwCustomizeAddressBlockDialog* m_pParentDialog;
+ VclPtr<SwCustomizeAddressBlockDialog> m_pParentDialog;
public:
DDListBox(vcl::Window* pParent, const WinBits nStyle);
+ virtual ~DDListBox();
+ virtual void dispose() SAL_OVERRIDE;
void SetAddressDialog(SwCustomizeAddressBlockDialog *pParent);
@@ -136,7 +141,7 @@ public:
class AddressMultiLineEdit : public VclMultiLineEdit, public SfxListener
{
Link m_aSelectionLink;
- SwCustomizeAddressBlockDialog* m_pParentDialog;
+ VclPtr<SwCustomizeAddressBlockDialog> m_pParentDialog;
using VclMultiLineEdit::Notify;
@@ -147,6 +152,7 @@ protected:
public:
AddressMultiLineEdit(vcl::Window* pParent, WinBits nWinStyle = WB_LEFT | WB_BORDER);
virtual ~AddressMultiLineEdit();
+ virtual void dispose() SAL_OVERRIDE;
void SetAddressDialog(SwCustomizeAddressBlockDialog *pParent);
@@ -183,26 +189,26 @@ public:
GREETING_MALE
};
private:
- FixedText* m_pAddressElementsFT;
- DDListBox* m_pAddressElementsLB;
+ VclPtr<FixedText> m_pAddressElementsFT;
+ VclPtr<DDListBox> m_pAddressElementsLB;
- PushButton* m_pInsertFieldIB;
- PushButton* m_pRemoveFieldIB;
+ VclPtr<PushButton> m_pInsertFieldIB;
+ VclPtr<PushButton> m_pRemoveFieldIB;
- FixedText* m_pDragFT;
- AddressMultiLineEdit* m_pDragED;
- PushButton* m_pUpIB;
- PushButton* m_pLeftIB;
- PushButton* m_pRightIB;
- PushButton* m_pDownIB;
+ VclPtr<FixedText> m_pDragFT;
+ VclPtr<AddressMultiLineEdit> m_pDragED;
+ VclPtr<PushButton> m_pUpIB;
+ VclPtr<PushButton> m_pLeftIB;
+ VclPtr<PushButton> m_pRightIB;
+ VclPtr<PushButton> m_pDownIB;
- FixedText* m_pFieldFT;
- ComboBox* m_pFieldCB;
+ VclPtr<FixedText> m_pFieldFT;
+ VclPtr<ComboBox> m_pFieldCB;
TextFilter m_aTextFilter;
- SwAddressPreview* m_pPreviewWIN;
+ VclPtr<SwAddressPreview> m_pPreviewWIN;
- OKButton* m_pOK;
+ VclPtr<OKButton> m_pOK;
::std::vector<OUString> m_aSalutations;
::std::vector<OUString> m_aPunctuations;
@@ -228,6 +234,7 @@ private:
public:
SwCustomizeAddressBlockDialog(vcl::Window* pParent, SwMailMergeConfigItem& rConfig, DialogType);
virtual ~SwCustomizeAddressBlockDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetAddress(const OUString& rAddress);
OUString GetAddress();
@@ -236,14 +243,13 @@ public:
class SwAssignFieldsControl;
class SwAssignFieldsDialog : public SfxModalDialog
{
- FixedText *m_pMatchingFI;
- SwAssignFieldsControl *m_pFieldsControl;
+ VclPtr<FixedText> m_pMatchingFI;
+ VclPtr<SwAssignFieldsControl> m_pFieldsControl;
- FixedText *m_pPreviewFI;
- SwAddressPreview *m_pPreviewWIN;
+ VclPtr<FixedText> m_pPreviewFI;
+ VclPtr<SwAddressPreview> m_pPreviewWIN;
-
- OKButton *m_pOK;
+ VclPtr<OKButton> m_pOK;
OUString m_sNone;
OUString m_rPreviewString;
@@ -260,6 +266,7 @@ public:
const OUString& rPreview,
bool bIsAddressBlock);
virtual ~SwAssignFieldsDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 85440c6a4833..fff60188bdd3 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -92,6 +92,21 @@ SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(SwMailMergeWizard* pParent)
SwMailMergeDocSelectPage::~SwMailMergeDocSelectPage()
{
+ dispose();
+}
+
+void SwMailMergeDocSelectPage::dispose()
+{
+ m_pCurrentDocRB.clear();
+ m_pNewDocRB.clear();
+ m_pLoadDocRB.clear();
+ m_pLoadTemplateRB.clear();
+ m_pRecentDocRB.clear();
+ m_pBrowseDocPB.clear();
+ m_pBrowseTemplatePB.clear();
+ m_pRecentDocLB.clear();
+ m_pWizard.clear();
+ svt::OWizardPage::dispose();
}
IMPL_LINK(SwMailMergeDocSelectPage, DocSelectHdl, RadioButton*, pButton)
diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx
index b2e241270faf..931fc4dbfce4 100644
--- a/sw/source/ui/dbui/mmdocselectpage.hxx
+++ b/sw/source/ui/dbui/mmdocselectpage.hxx
@@ -28,21 +28,21 @@ class SwMailMergeWizard;
class SwMailMergeDocSelectPage : public svt::OWizardPage
{
- RadioButton* m_pCurrentDocRB;
- RadioButton* m_pNewDocRB;
- RadioButton* m_pLoadDocRB;
- RadioButton* m_pLoadTemplateRB;
- RadioButton* m_pRecentDocRB;
+ VclPtr<RadioButton> m_pCurrentDocRB;
+ VclPtr<RadioButton> m_pNewDocRB;
+ VclPtr<RadioButton> m_pLoadDocRB;
+ VclPtr<RadioButton> m_pLoadTemplateRB;
+ VclPtr<RadioButton> m_pRecentDocRB;
- PushButton* m_pBrowseDocPB;
- PushButton* m_pBrowseTemplatePB;
+ VclPtr<PushButton> m_pBrowseDocPB;
+ VclPtr<PushButton> m_pBrowseTemplatePB;
- ListBox* m_pRecentDocLB;
+ VclPtr<ListBox> m_pRecentDocLB;
OUString m_sLoadFileName;
OUString m_sLoadTemplateName;
- SwMailMergeWizard* m_pWizard;
+ VclPtr<SwMailMergeWizard> m_pWizard;
DECL_LINK(DocSelectHdl, RadioButton*);
DECL_LINK(FileSelectHdl, PushButton*);
@@ -52,6 +52,7 @@ class SwMailMergeDocSelectPage : public svt::OWizardPage
public:
SwMailMergeDocSelectPage( SwMailMergeWizard* _pParent);
virtual ~SwMailMergeDocSelectPage();
+ virtual void dispose() SAL_OVERRIDE;
};
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 7355613e3ad2..15aa60b137cb 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -292,6 +292,18 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* _pParent)
SwMailMergeGreetingsPage::~SwMailMergeGreetingsPage()
{
+ dispose();
+}
+
+void SwMailMergeGreetingsPage::dispose()
+{
+ m_pPreviewFI.clear();
+ m_pPreviewWIN.clear();
+ m_pAssignPB.clear();
+ m_pDocumentIndexFI.clear();
+ m_pPrevSetIB.clear();
+ m_pNextSetIB.clear();
+ svt::OWizardPage::dispose();
}
void SwMailMergeGreetingsPage::ActivatePage()
@@ -472,6 +484,15 @@ SwMailBodyDialog::SwMailBodyDialog(vcl::Window* pParent, SwMailMergeWizard* _pWi
SwMailBodyDialog::~SwMailBodyDialog()
{
+ dispose();
+}
+
+void SwMailBodyDialog::dispose()
+{
+ m_pBodyFT.clear();
+ m_pBodyMLE.clear();
+ m_pOK.clear();
+ SfxModalDialog::dispose();
}
IMPL_LINK(SwMailBodyDialog, ContainsHdl_Impl, CheckBox*, pBox)
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index d74b54224df9..d351191b6121 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -33,30 +33,30 @@ class SwMailMergeWizard;
class SwGreetingsHandler
{
protected:
- CheckBox* m_pGreetingLineCB;
+ VclPtr<CheckBox> m_pGreetingLineCB;
- CheckBox* m_pPersonalizedCB;
+ VclPtr<CheckBox> m_pPersonalizedCB;
- FixedText* m_pFemaleFT;
- ListBox* m_pFemaleLB;
- PushButton* m_pFemalePB;
+ VclPtr<FixedText> m_pFemaleFT;
+ VclPtr<ListBox> m_pFemaleLB;
+ VclPtr<PushButton> m_pFemalePB;
- FixedText* m_pMaleFT;
- ListBox* m_pMaleLB;
- PushButton* m_pMalePB;
+ VclPtr<FixedText> m_pMaleFT;
+ VclPtr<ListBox> m_pMaleLB;
+ VclPtr<PushButton> m_pMalePB;
- FixedText* m_pFemaleFI;
- FixedText* m_pFemaleColumnFT;
- ListBox* m_pFemaleColumnLB;
- FixedText* m_pFemaleFieldFT;
- ComboBox* m_pFemaleFieldCB;
+ VclPtr<FixedText> m_pFemaleFI;
+ VclPtr<FixedText> m_pFemaleColumnFT;
+ VclPtr<ListBox> m_pFemaleColumnLB;
+ VclPtr<FixedText> m_pFemaleFieldFT;
+ VclPtr<ComboBox> m_pFemaleFieldCB;
- FixedText* m_pNeutralFT;
- ComboBox* m_pNeutralCB;
+ VclPtr<FixedText> m_pNeutralFT;
+ VclPtr<ComboBox> m_pNeutralCB;
bool m_bIsTabPage;
- SwMailMergeWizard* m_pWizard;
+ VclPtr<SwMailMergeWizard> m_pWizard;
~SwGreetingsHandler() {}
@@ -70,12 +70,12 @@ protected:
class SwMailMergeGreetingsPage : public svt::OWizardPage,
public SwGreetingsHandler
{
- FixedText* m_pPreviewFI;
- SwAddressPreview* m_pPreviewWIN;
- PushButton* m_pAssignPB;
- FixedText* m_pDocumentIndexFI;
- PushButton* m_pPrevSetIB;
- PushButton* m_pNextSetIB;
+ VclPtr<FixedText> m_pPreviewFI;
+ VclPtr<SwAddressPreview> m_pPreviewWIN;
+ VclPtr<PushButton> m_pAssignPB;
+ VclPtr<FixedText> m_pDocumentIndexFI;
+ VclPtr<PushButton> m_pPrevSetIB;
+ VclPtr<PushButton> m_pNextSetIB;
OUString m_sDocument;
@@ -90,21 +90,23 @@ class SwMailMergeGreetingsPage : public svt::OWizardPage,
public:
SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent);
virtual ~SwMailMergeGreetingsPage();
+ virtual void dispose() SAL_OVERRIDE;
};
class SwMailBodyDialog : public SfxModalDialog, public SwGreetingsHandler
{
- FixedText *m_pBodyFT;
- VclMultiLineEdit *m_pBodyMLE;
+ VclPtr<FixedText> m_pBodyFT;
+ VclPtr<VclMultiLineEdit> m_pBodyMLE;
- OKButton *m_pOK;
+ VclPtr<OKButton> m_pOK;
DECL_LINK(ContainsHdl_Impl, CheckBox*);
DECL_LINK(OKHdl, void *);
public:
SwMailBodyDialog(vcl::Window* pParent, SwMailMergeWizard* pWizard);
virtual ~SwMailBodyDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetBody(const OUString& rBody ) {m_pBodyMLE->SetText(rBody);}
OUString GetBody() const {return m_pBodyMLE->GetText();}
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 67b12453ddc0..c02333126595 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -162,6 +162,17 @@ void SwMailMergeLayoutPage::dispose()
{
delete m_pExampleFrame;
File::remove( m_sExampleURL );
+ m_pPosition.clear();
+ m_pAlignToBodyCB.clear();
+ m_pLeftFT.clear();
+ m_pLeftMF.clear();
+ m_pTopMF.clear();
+ m_pGreetingLine.clear();
+ m_pUpPB.clear();
+ m_pDownPB.clear();
+ m_pExampleContainerWIN.clear();
+ m_pZoomLB.clear();
+ m_pWizard.clear();
svt::OWizardPage::dispose();
}
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx
index 69e534b002bb..5b9f9a8c3cc1 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -38,20 +38,20 @@ namespace com{ namespace sun{ namespace star{ namespace beans{ class XPropertySe
class SwMailMergeLayoutPage : public svt::OWizardPage
{
- VclContainer* m_pPosition;
+ VclPtr<VclContainer> m_pPosition;
- CheckBox* m_pAlignToBodyCB;
- FixedText* m_pLeftFT;
- MetricField* m_pLeftMF;
- MetricField* m_pTopMF;
+ VclPtr<CheckBox> m_pAlignToBodyCB;
+ VclPtr<FixedText> m_pLeftFT;
+ VclPtr<MetricField> m_pLeftMF;
+ VclPtr<MetricField> m_pTopMF;
- VclContainer* m_pGreetingLine;
- PushButton* m_pUpPB;
- PushButton* m_pDownPB;
+ VclPtr<VclContainer> m_pGreetingLine;
+ VclPtr<PushButton> m_pUpPB;
+ VclPtr<PushButton> m_pDownPB;
- vcl::Window* m_pExampleContainerWIN;
+ VclPtr<vcl::Window> m_pExampleContainerWIN;
- ListBox* m_pZoomLB;
+ VclPtr<ListBox> m_pZoomLB;
SwOneExampleFrame* m_pExampleFrame;
SwWrtShell* m_pExampleWrtShell;
@@ -61,7 +61,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage
bool m_bIsGreetingInserted;
- SwMailMergeWizard* m_pWizard;
+ VclPtr<SwMailMergeWizard> m_pWizard;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xViewProperties;
diff --git a/sw/source/ui/dbui/mmmergepage.cxx b/sw/source/ui/dbui/mmmergepage.cxx
index f0fbebcaf046..f2e416933d8f 100644
--- a/sw/source/ui/dbui/mmmergepage.cxx
+++ b/sw/source/ui/dbui/mmmergepage.cxx
@@ -50,6 +50,25 @@ SwMailMergeMergePage::SwMailMergeMergePage(SwMailMergeWizard* _pParent)
}
+SwMailMergeMergePage::~SwMailMergeMergePage()
+{
+ dispose();
+}
+
+void SwMailMergeMergePage::dispose()
+{
+ m_pEditFI.clear();
+ m_pEditPB.clear();
+ m_pFindED.clear();
+ m_pFindPB.clear();
+ m_pWholeWordsCB.clear();
+ m_pBackwardsCB.clear();
+ m_pMatchCaseCB.clear();
+ m_pWizard.clear();
+ svt::OWizardPage::dispose();
+}
+
+
IMPL_LINK_NOARG(SwMailMergeMergePage, EditDocumentHdl_Impl)
{
m_pWizard->SetRestartPage(MM_MERGEPAGE);
diff --git a/sw/source/ui/dbui/mmmergepage.hxx b/sw/source/ui/dbui/mmmergepage.hxx
index b415586acc7d..2ff8187eff10 100644
--- a/sw/source/ui/dbui/mmmergepage.hxx
+++ b/sw/source/ui/dbui/mmmergepage.hxx
@@ -29,17 +29,17 @@ class SwMailMergeWizard;
class SwMailMergeMergePage : public svt::OWizardPage
{
- FixedText* m_pEditFI;
- PushButton* m_pEditPB;
+ VclPtr<FixedText> m_pEditFI;
+ VclPtr<PushButton> m_pEditPB;
- ReturnActionEdit* m_pFindED;
- PushButton* m_pFindPB;
+ VclPtr<ReturnActionEdit> m_pFindED;
+ VclPtr<PushButton> m_pFindPB;
- CheckBox* m_pWholeWordsCB;
- CheckBox* m_pBackwardsCB;
- CheckBox* m_pMatchCaseCB;
+ VclPtr<CheckBox> m_pWholeWordsCB;
+ VclPtr<CheckBox> m_pBackwardsCB;
+ VclPtr<CheckBox> m_pMatchCaseCB;
- SwMailMergeWizard* m_pWizard;
+ VclPtr<SwMailMergeWizard> m_pWizard;
DECL_LINK(EditDocumentHdl_Impl, void *);
DECL_LINK(FindHdl_Impl, void *);
@@ -47,6 +47,8 @@ class SwMailMergeMergePage : public svt::OWizardPage
public:
SwMailMergeMergePage( SwMailMergeWizard* _pParent);
+ virtual ~SwMailMergeMergePage();
+ virtual void dispose() SAL_OVERRIDE;
};
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index c75a8d6afce6..1de413396689 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -194,8 +194,8 @@ IMPL_LINK( SwSendQueryBox_Impl, ModifyHdl, Edit*, pEdit)
class SwCopyToDialog : public SfxModalDialog
{
- Edit* m_pCCED;
- Edit* m_pBCCED;
+ VclPtr<Edit> m_pCCED;
+ VclPtr<Edit> m_pBCCED;
public:
SwCopyToDialog(vcl::Window* pParent)
@@ -205,6 +205,13 @@ public:
get(m_pCCED, "cc");
get(m_pBCCED, "bcc");
}
+ virtual ~SwCopyToDialog() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ m_pCCED.clear();
+ m_pBCCED.clear();
+ SfxModalDialog::dispose();
+ }
OUString GetCC() {return m_pCCED->GetText();}
void SetCC(const OUString& rSet) {m_pCCED->SetText(rSet);}
@@ -306,6 +313,37 @@ SwMailMergeOutputPage::~SwMailMergeOutputPage()
void SwMailMergeOutputPage::dispose()
{
delete m_pTempPrinter;
+ m_pSaveStartDocRB.clear();
+ m_pSaveMergedDocRB.clear();
+ m_pPrintRB.clear();
+ m_pSendMailRB.clear();
+ m_pSeparator.clear();
+ m_pSaveStartDocPB.clear();
+ m_pSaveAsOneRB.clear();
+ m_pSaveIndividualRB.clear();
+ m_pPrintAllRB.clear();
+ m_pSendAllRB.clear();
+ m_pFromRB.clear();
+ m_pFromNF.clear();
+ m_pToFT.clear();
+ m_pToNF.clear();
+ m_pSaveNowPB.clear();
+ m_pPrinterFT.clear();
+ m_pPrinterLB.clear();
+ m_pPrinterSettingsPB.clear();
+ m_pPrintNowPB.clear();
+ m_pMailToFT.clear();
+ m_pMailToLB.clear();
+ m_pCopyToPB.clear();
+ m_pSubjectFT.clear();
+ m_pSubjectED.clear();
+ m_pSendAsFT.clear();
+ m_pSendAsLB.clear();
+ m_pAttachmentGroup.clear();
+ m_pAttachmentED.clear();
+ m_pSendAsPB.clear();
+ m_pSendDocumentsPB.clear();
+ m_pWizard.clear();
svt::OWizardPage::dispose();
}
@@ -485,7 +523,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
SendTypeHdl_Impl(m_pSendAsLB);
}
}
- m_pFromRB->GetClickHdl().Call(m_pFromRB->IsChecked() ? m_pFromRB : 0);
+ m_pFromRB->GetClickHdl().Call(m_pFromRB->IsChecked() ? m_pFromRB.get() : 0);
SetUpdateMode(false);
return 0;
diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx
index 37cc92c34ee2..41e318884a15 100644
--- a/sw/source/ui/dbui/mmoutputpage.hxx
+++ b/sw/source/ui/dbui/mmoutputpage.hxx
@@ -45,42 +45,42 @@ namespace com{ namespace sun{ namespace star{
class SwMailMergeOutputPage : public svt::OWizardPage
{
- RadioButton* m_pSaveStartDocRB;
- RadioButton* m_pSaveMergedDocRB;
- RadioButton* m_pPrintRB;
- RadioButton* m_pSendMailRB;
+ VclPtr<RadioButton> m_pSaveStartDocRB;
+ VclPtr<RadioButton> m_pSaveMergedDocRB;
+ VclPtr<RadioButton> m_pPrintRB;
+ VclPtr<RadioButton> m_pSendMailRB;
- VclFrame* m_pSeparator;
+ VclPtr<VclFrame> m_pSeparator;
- PushButton* m_pSaveStartDocPB;
+ VclPtr<PushButton> m_pSaveStartDocPB;
- RadioButton* m_pSaveAsOneRB;
- RadioButton* m_pSaveIndividualRB;
- RadioButton* m_pPrintAllRB; //has to be here for tab control reasons
- RadioButton* m_pSendAllRB; //has to be here for tab control reasons
+ VclPtr<RadioButton> m_pSaveAsOneRB;
+ VclPtr<RadioButton> m_pSaveIndividualRB;
+ VclPtr<RadioButton> m_pPrintAllRB; //has to be here for tab control reasons
+ VclPtr<RadioButton> m_pSendAllRB; //has to be here for tab control reasons
//this group is used in save and print
- RadioButton* m_pFromRB;
- NumericField* m_pFromNF;
- FixedText* m_pToFT;
- NumericField* m_pToNF;
- PushButton* m_pSaveNowPB;
-
- FixedText* m_pPrinterFT;
- ListBox* m_pPrinterLB;
- PushButton* m_pPrinterSettingsPB;
- PushButton* m_pPrintNowPB;
-
- FixedText* m_pMailToFT;
- ListBox* m_pMailToLB;
- PushButton* m_pCopyToPB;
- FixedText* m_pSubjectFT;
- Edit* m_pSubjectED;
- FixedText* m_pSendAsFT;
- ListBox* m_pSendAsLB;
- VclContainer* m_pAttachmentGroup;
- Edit* m_pAttachmentED;
- PushButton* m_pSendAsPB;
- PushButton* m_pSendDocumentsPB;
+ VclPtr<RadioButton> m_pFromRB;
+ VclPtr<NumericField> m_pFromNF;
+ VclPtr<FixedText> m_pToFT;
+ VclPtr<NumericField> m_pToNF;
+ VclPtr<PushButton> m_pSaveNowPB;
+
+ VclPtr<FixedText> m_pPrinterFT;
+ VclPtr<ListBox> m_pPrinterLB;
+ VclPtr<PushButton> m_pPrinterSettingsPB;
+ VclPtr<PushButton> m_pPrintNowPB;
+
+ VclPtr<FixedText> m_pMailToFT;
+ VclPtr<ListBox> m_pMailToLB;
+ VclPtr<PushButton> m_pCopyToPB;
+ VclPtr<FixedText> m_pSubjectFT;
+ VclPtr<Edit> m_pSubjectED;
+ VclPtr<FixedText> m_pSendAsFT;
+ VclPtr<ListBox> m_pSendAsLB;
+ VclPtr<VclContainer> m_pAttachmentGroup;
+ VclPtr<Edit> m_pAttachmentED;
+ VclPtr<PushButton> m_pSendAsPB;
+ VclPtr<PushButton> m_pSendDocumentsPB;
//some FixedLine labels
OUString m_sSaveStartST;
@@ -97,7 +97,7 @@ class SwMailMergeOutputPage : public svt::OWizardPage
bool m_bCancelSaving;
- SwMailMergeWizard* m_pWizard;
+ VclPtr<SwMailMergeWizard> m_pWizard;
//some dialog data
Printer* m_pTempPrinter;
@@ -147,17 +147,17 @@ struct SwSendMailDialog_Impl;
class SwMailMergeConfigItem;
class SwSendMailDialog : public ModelessDialog //SfxModalDialog
{
- FixedText *m_pTransferStatus;
- FixedText *m_pPaused;
- ProgressBar *m_pProgressBar;
- FixedText *m_pErrorStatus;
+ VclPtr<FixedText> m_pTransferStatus;
+ VclPtr<FixedText> m_pPaused;
+ VclPtr<ProgressBar> m_pProgressBar;
+ VclPtr<FixedText> m_pErrorStatus;
- SvSimpleTableContainer *m_pContainer;
- HeaderBar *m_pStatusHB;
- SvSimpleTable *m_pStatus;
+ VclPtr<SvSimpleTableContainer> m_pContainer;
+ VclPtr<HeaderBar> m_pStatusHB;
+ VclPtr<SvSimpleTable> m_pStatus;
- PushButton *m_pStop;
- PushButton *m_pClose;
+ VclPtr<PushButton> m_pStop;
+ VclPtr<PushButton> m_pClose;
OUString m_sContinue;
OUString m_sStop;
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index cc4f519cd7f1..9ce000b6c072 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -48,6 +48,22 @@ SwMailMergeOutputTypePage::SwMailMergeOutputTypePage(SwMailMergeWizard* pParent)
}
+SwMailMergeOutputTypePage::~SwMailMergeOutputTypePage()
+{
+ dispose();
+}
+
+void SwMailMergeOutputTypePage::dispose()
+{
+ m_pLetterRB.clear();
+ m_pMailRB.clear();
+ m_pLetterHint.clear();
+ m_pMailHint.clear();
+ m_pWizard.clear();
+ svt::OWizardPage::dispose();
+}
+
+
IMPL_LINK_NOARG(SwMailMergeOutputTypePage, TypeHdl_Impl)
{
bool bLetter = m_pLetterRB->IsChecked();
@@ -123,7 +139,7 @@ const SwMailDescriptor* SwSendMailDialog_Impl::GetNextDescriptor()
using namespace ::com::sun::star;
class SwMailDispatcherListener_Impl : public IMailDispatcherListener
{
- SwSendMailDialog* m_pSendMailDialog;
+ VclPtr<SwSendMailDialog> m_pSendMailDialog;
public:
SwMailDispatcherListener_Impl(SwSendMailDialog& rParentDlg);
@@ -208,9 +224,15 @@ void SwMailDispatcherListener_Impl::DeleteAttachments( uno::Reference< mail::XMa
class SwSendWarningBox_Impl : public MessageDialog
{
- VclMultiLineEdit *m_pDetailED;
+ VclPtr<VclMultiLineEdit> m_pDetailED;
public:
SwSendWarningBox_Impl(vcl::Window* pParent, const OUString& rDetails);
+ virtual ~SwSendWarningBox_Impl() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ m_pDetailED.clear();
+ MessageDialog::dispose();
+ }
};
SwSendWarningBox_Impl::SwSendWarningBox_Impl(vcl::Window* pParent, const OUString& rDetails)
@@ -311,8 +333,16 @@ void SwSendMailDialog::dispose()
{
}
}
- delete m_pStatus;
delete m_pImpl;
+ m_pStatus.clear();
+ m_pTransferStatus.clear();
+ m_pPaused.clear();
+ m_pProgressBar.clear();
+ m_pErrorStatus.clear();
+ m_pContainer.clear();
+ m_pStatusHB.clear();
+ m_pStop.clear();
+ m_pClose.clear();
ModelessDialog::dispose();
}
diff --git a/sw/source/ui/dbui/mmoutputtypepage.hxx b/sw/source/ui/dbui/mmoutputtypepage.hxx
index 81769f2b6863..9c967c05f7fb 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.hxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.hxx
@@ -27,18 +27,20 @@ class SwMailMergeWizard;
class SwMailMergeOutputTypePage : public svt::OWizardPage
{
- RadioButton* m_pLetterRB;
- RadioButton* m_pMailRB;
+ VclPtr<RadioButton> m_pLetterRB;
+ VclPtr<RadioButton> m_pMailRB;
- FixedText* m_pLetterHint;
- FixedText* m_pMailHint;
+ VclPtr<FixedText> m_pLetterHint;
+ VclPtr<FixedText> m_pMailHint;
- SwMailMergeWizard* m_pWizard;
+ VclPtr<SwMailMergeWizard> m_pWizard;
DECL_LINK(TypeHdl_Impl, void *);
public:
SwMailMergeOutputTypePage( SwMailMergeWizard* _pParent);
+ virtual ~SwMailMergeOutputTypePage();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx
index 272ae0f6cb8e..d768c8842c95 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.cxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.cxx
@@ -58,6 +58,24 @@ SwMailMergePrepareMergePage::SwMailMergePrepareMergePage( SwMailMergeWizard* _pP
aMoveLink.Call(m_pRecordED);
}
+SwMailMergePrepareMergePage::~SwMailMergePrepareMergePage()
+{
+ dispose();
+}
+
+void SwMailMergePrepareMergePage::dispose()
+{
+ m_pFirstPB.clear();
+ m_pPrevPB.clear();
+ m_pRecordED.clear();
+ m_pNextPB.clear();
+ m_pLastPB.clear();
+ m_pExcludeCB.clear();
+ m_pEditPB.clear();
+ m_pWizard.clear();
+ svt::OWizardPage::dispose();
+}
+
IMPL_LINK_NOARG(SwMailMergePrepareMergePage, EditDocumentHdl_Impl)
{
m_pWizard->SetRestartPage(MM_PREPAREMERGEPAGE);
diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx
index bdaef54ae3ff..8bfdfbe94158 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.hxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.hxx
@@ -29,16 +29,16 @@ class SwMailMergeWizard;
class SwMailMergePrepareMergePage : public svt::OWizardPage
{
- PushButton* m_pFirstPB;
- PushButton* m_pPrevPB;
- NumericField* m_pRecordED;
- PushButton* m_pNextPB;
- PushButton* m_pLastPB;
- CheckBox* m_pExcludeCB;
+ VclPtr<PushButton> m_pFirstPB;
+ VclPtr<PushButton> m_pPrevPB;
+ VclPtr<NumericField> m_pRecordED;
+ VclPtr<PushButton> m_pNextPB;
+ VclPtr<PushButton> m_pLastPB;
+ VclPtr<CheckBox> m_pExcludeCB;
- PushButton* m_pEditPB;
+ VclPtr<PushButton> m_pEditPB;
- SwMailMergeWizard* m_pWizard;
+ VclPtr<SwMailMergeWizard> m_pWizard;
DECL_LINK(EditDocumentHdl_Impl, void *);
DECL_LINK(ExcludeHdl_Impl, CheckBox*);
@@ -49,6 +49,8 @@ class SwMailMergePrepareMergePage : public svt::OWizardPage
public:
SwMailMergePrepareMergePage( SwMailMergeWizard* _pParent);
+ virtual ~SwMailMergePrepareMergePage();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index ec74985f0875..c31485ad971c 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -152,7 +152,8 @@ SwSelectDBTableDialog::~SwSelectDBTableDialog()
void SwSelectDBTableDialog::dispose()
{
- delete m_pTable;
+ m_pTable.clear();
+ m_pPreviewPB.clear();
SfxModalDialog::dispose();
}
diff --git a/sw/source/ui/dbui/selectdbtabledialog.hxx b/sw/source/ui/dbui/selectdbtabledialog.hxx
index 52c8c055fe0d..b02b74b2cb72 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.hxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.hxx
@@ -35,8 +35,8 @@ class SwAddressTable;
class SwSelectDBTableDialog : public SfxModalDialog
{
- SwAddressTable* m_pTable;
- PushButton* m_pPreviewPB;
+ VclPtr<SwAddressTable> m_pTable;
+ VclPtr<PushButton> m_pPreviewPB;
OUString m_sName;
OUString m_sType;
diff --git a/sw/source/ui/dialog/abstract.cxx b/sw/source/ui/dialog/abstract.cxx
index f33577268b82..192da3c1db61 100644
--- a/sw/source/ui/dialog/abstract.cxx
+++ b/sw/source/ui/dialog/abstract.cxx
@@ -31,6 +31,18 @@ SwInsertAbstractDlg::SwInsertAbstractDlg(vcl::Window* pParent)
get(m_pParaNF, "paras");
}
+SwInsertAbstractDlg::~SwInsertAbstractDlg()
+{
+ dispose();
+}
+
+void SwInsertAbstractDlg::dispose()
+{
+ m_pLevelNF.clear();
+ m_pParaNF.clear();
+ SfxModalDialog::dispose();
+}
+
sal_uInt8 SwInsertAbstractDlg::GetLevel() const
{
return static_cast<sal_uInt8>(m_pLevelNF->GetValue() - 1);
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index f097f0f89903..6960908454c5 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -242,8 +242,23 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh,
SwAsciiFilterDlg::~SwAsciiFilterDlg()
{
+ dispose();
}
+void SwAsciiFilterDlg::dispose()
+{
+ m_pCharSetLB.clear();
+ m_pFontFT.clear();
+ m_pFontLB.clear();
+ m_pLanguageFT.clear();
+ m_pLanguageLB.clear();
+ m_pCRLF_RB.clear();
+ m_pCR_RB.clear();
+ m_pLF_RB.clear();
+ SfxModalDialog::dispose();
+}
+
+
void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
{
sal_uLong nCCode = m_pCharSetLB->GetSelectTextEncoding();
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index 48ae2aa587d1..9e7612165935 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -73,8 +73,25 @@ SwDocStatPage::SwDocStatPage(vcl::Window *pParent, const SfxItemSet &rSet)
}
- SwDocStatPage::~SwDocStatPage()
+SwDocStatPage::~SwDocStatPage()
{
+ dispose();
+}
+
+void SwDocStatPage::dispose()
+{
+ m_pPageNo.clear();
+ m_pTableNo.clear();
+ m_pGrfNo.clear();
+ m_pOLENo.clear();
+ m_pParaNo.clear();
+ m_pWordNo.clear();
+ m_pCharNo.clear();
+ m_pCharExclSpacesNo.clear();
+ m_pLineLbl.clear();
+ m_pLineNo.clear();
+ m_pUpdatePB.clear();
+ SfxTabPage::dispose();
}
// Description: fill ItemSet when changed
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index a64cb0820089..a65a7cbccb6a 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -595,7 +595,6 @@ void AbstractSwWordCountFloatDlg_Impl::SetCounts(const SwDocStat &rCurrCnt, cons
AbstractMailMergeWizard_Impl::~AbstractMailMergeWizard_Impl()
{
- delete pDlg;
}
void AbstractMailMergeWizard_Impl::StartExecuteModal( const Link& rEndDialogHdl )
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 9e6ff470c404..ea38f7156601 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -48,7 +48,7 @@ class DropDownFieldDialog;
#define DECL_ABSTDLG_BASE(Class,DialogClass) \
protected: \
- DialogClass* pDlg; \
+ VclPtr<DialogClass> pDlg; \
public: \
Class( DialogClass* p) \
: pDlg(p) \
@@ -59,7 +59,6 @@ public: \
#define IMPL_ABSTDLG_BASE(Class) \
Class::~Class() \
{ \
- delete pDlg; \
} \
short Class::Execute() \
{ \
@@ -350,7 +349,7 @@ class AbstractAuthMarkFloatDlg_Impl : public AbstractMarkFloatDlg
class SwMailMergeWizard;
class AbstractMailMergeWizard_Impl : public AbstractMailMergeWizard
{
- SwMailMergeWizard* pDlg;
+ VclPtr<SwMailMergeWizard> pDlg;
Link aEndDlgHdl;
DECL_LINK( EndDialogHdl, SwMailMergeWizard* );
diff --git a/sw/source/ui/dialog/swmessdialog.cxx b/sw/source/ui/dialog/swmessdialog.cxx
index 2e085f464686..a93e12a1de40 100644
--- a/sw/source/ui/dialog/swmessdialog.cxx
+++ b/sw/source/ui/dialog/swmessdialog.cxx
@@ -30,4 +30,19 @@ SwMessageAndEditDialog::SwMessageAndEditDialog(vcl::Window* pParent, const OUStr
get(m_pEdit, "edit");
}
+SwMessageAndEditDialog::~SwMessageAndEditDialog()
+{
+ dispose();
+}
+
+void SwMessageAndEditDialog::dispose()
+{
+ m_pOKPB.clear();
+ m_pImageIM.clear();
+ m_pPrimaryMessage.clear();
+ m_pSecondaryMessage.clear();
+ m_pEdit.clear();
+ ModalDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index f90812fa4681..dbbac541e03a 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ b/sw/source/ui/dialog/swuiexp.cxx
@@ -18,7 +18,32 @@
*/
#include "swdlgfact.hxx"
+
+#include "abstract.hxx"
+#include "ascfldlg.hxx"
+#include "break.hxx"
+#include "convert.hxx"
#include "dialmgr.hxx"
+#include "dbinsdlg.hxx"
+#include "DropDownFieldDialog.hxx"
+#include "fldtdlg.hxx"
+#include "glossary.hxx"
+#include "inpdlg.hxx"
+#include "insfnote.hxx"
+#include "instable.hxx"
+#include "javaedit.hxx"
+#include "label.hxx"
+#include "mailmrge.hxx"
+#include "mailmergewizard.hxx"
+#include "regionsw.hxx"
+#include "selglos.hxx"
+#include "splittbl.hxx"
+#include "tautofmt.hxx"
+#include "swmodalredlineacceptdlg.hxx"
+#include "swrenamexnameddlg.hxx"
+#include "swuiidxmrk.hxx"
+#include "swuicnttab.hxx"
+#include "wordcountdialog.hxx"
#include <swuiexp.hxx>
namespace swui
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 8d16c7aae2df..6896f5c9b457 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -529,6 +529,28 @@ void SwEditRegionDlg::dispose()
}
delete m_pDocInserter;
+ m_pCurName.clear();
+ m_pTree.clear();
+ m_pFileCB.clear();
+ m_pDDECB.clear();
+ m_pDDEFrame.clear();
+ m_pFileNameFT.clear();
+ m_pDDECommandFT.clear();
+ m_pFileNameED.clear();
+ m_pFilePB.clear();
+ m_pSubRegionFT.clear();
+ m_pSubRegionED.clear();
+ m_pProtectCB.clear();
+ m_pPasswdCB.clear();
+ m_pPasswdPB.clear();
+ m_pHideCB.clear();
+ m_pConditionFT.clear();
+ m_pConditionED.clear();
+ m_pEditInReadonlyCB.clear();
+ m_pOK.clear();
+ m_pOptionsPB.clear();
+ m_pDismiss.clear();
+ m_pOldDefDlgParent.clear();
SfxModalDialog::dispose();
}
@@ -1545,6 +1567,23 @@ SwInsertSectionTabPage::~SwInsertSectionTabPage()
void SwInsertSectionTabPage::dispose()
{
delete m_pDocInserter;
+ m_pCurName.clear();
+ m_pFileCB.clear();
+ m_pDDECB.clear();
+ m_pDDECommandFT.clear();
+ m_pFileNameFT.clear();
+ m_pFileNameED.clear();
+ m_pFilePB.clear();
+ m_pSubRegionFT.clear();
+ m_pSubRegionED.clear();
+ m_pProtectCB.clear();
+ m_pPasswdCB.clear();
+ m_pPasswdPB.clear();
+ m_pHideCB.clear();
+ m_pConditionFT.clear();
+ m_pConditionED.clear();
+ m_pEditInReadonlyCB.clear();
+ m_pOldDefDlgParent.clear();
SfxTabPage::dispose();
}
@@ -1847,6 +1886,32 @@ SwSectionFtnEndTabPage::SwSectionFtnEndTabPage( vcl::Window *pParent,
SwSectionFtnEndTabPage::~SwSectionFtnEndTabPage()
{
+ dispose();
+}
+
+void SwSectionFtnEndTabPage::dispose()
+{
+ pFtnNtAtTextEndCB.clear();
+ pFtnNtNumCB.clear();
+ pFtnOffsetLbl.clear();
+ pFtnOffsetFld.clear();
+ pFtnNtNumFmtCB.clear();
+ pFtnPrefixFT.clear();
+ pFtnPrefixED.clear();
+ pFtnNumViewBox.clear();
+ pFtnSuffixFT.clear();
+ pFtnSuffixED.clear();
+ pEndNtAtTextEndCB.clear();
+ pEndNtNumCB.clear();
+ pEndOffsetLbl.clear();
+ pEndOffsetFld.clear();
+ pEndNtNumFmtCB.clear();
+ pEndPrefixFT.clear();
+ pEndPrefixED.clear();
+ pEndNumViewBox.clear();
+ pEndSuffixFT.clear();
+ pEndSuffixED.clear();
+ SfxTabPage::dispose();
}
bool SwSectionFtnEndTabPage::FillItemSet( SfxItemSet* rSet )
@@ -2108,6 +2173,15 @@ SwSectionIndentTabPage::SwSectionIndentTabPage(vcl::Window *pParent, const SfxIt
SwSectionIndentTabPage::~SwSectionIndentTabPage()
{
+ dispose();
+}
+
+void SwSectionIndentTabPage::dispose()
+{
+ m_pBeforeMF.clear();
+ m_pAfterMF.clear();
+ m_pPreviewWin.clear();
+ SfxTabPage::dispose();
}
bool SwSectionIndentTabPage::FillItemSet( SfxItemSet* rSet)
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx
index 9f5f562c3990..8f0ff7daaefa 100644
--- a/sw/source/ui/dialog/wordcountdialog.cxx
+++ b/sw/source/ui/dialog/wordcountdialog.cxx
@@ -52,6 +52,19 @@ SwWordCountFloatDlg::~SwWordCountFloatDlg()
void SwWordCountFloatDlg::dispose()
{
SwViewShell::SetCareWin( 0 );
+ m_pCurrentWordFT.clear();
+ m_pCurrentCharacterFT.clear();
+ m_pCurrentCharacterExcludingSpacesFT.clear();
+ m_pCurrentCjkcharsFT.clear();
+ m_pCurrentStandardizedPagesFT.clear();
+ m_pDocWordFT.clear();
+ m_pDocCharacterFT.clear();
+ m_pDocCharacterExcludingSpacesFT.clear();
+ m_pDocCjkcharsFT.clear();
+ m_pDocStandardizedPagesFT.clear();
+ m_pCjkcharsLabelFT.clear();
+ m_pStandardizedPagesLabelFT.clear();
+ m_pClosePB.clear();
SfxModelessDialog::dispose();
}
diff --git a/sw/source/ui/dochdl/selglos.cxx b/sw/source/ui/dochdl/selglos.cxx
index 5cdc698f750d..5809ab2c5667 100644
--- a/sw/source/ui/dochdl/selglos.cxx
+++ b/sw/source/ui/dochdl/selglos.cxx
@@ -35,6 +35,17 @@ SwSelGlossaryDlg::SwSelGlossaryDlg(vcl::Window * pParent, const OUString &rShort
m_pGlosBox->SetDoubleClickHdl(LINK(this, SwSelGlossaryDlg, DoubleClickHdl));
}
+SwSelGlossaryDlg::~SwSelGlossaryDlg()
+{
+ dispose();
+}
+
+void SwSelGlossaryDlg::dispose()
+{
+ m_pGlosBox.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK(SwSelGlossaryDlg, DoubleClickHdl, ListBox*, /*pBox*/)
{
EndDialog(RET_OK);
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index a18dd071692e..943aa0b3c298 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -197,6 +197,27 @@ SwEnvFmtPage::SwEnvFmtPage(vcl::Window* pParent, const SfxItemSet& rSet)
}
+SwEnvFmtPage::~SwEnvFmtPage()
+{
+ dispose();
+}
+
+void SwEnvFmtPage::dispose()
+{
+ m_pAddrLeftField.clear();
+ m_pAddrTopField.clear();
+ m_pAddrEditButton.clear();
+ m_pSendLeftField.clear();
+ m_pSendTopField.clear();
+ m_pSendEditButton.clear();
+ m_pSizeFormatBox.clear();
+ m_pSizeWidthField.clear();
+ m_pSizeHeightField.clear();
+ m_pPreview.clear();
+ SfxTabPage::dispose();
+}
+
+
IMPL_LINK_INLINE_START( SwEnvFmtPage, ModifyHdl, Edit *, pEdit )
{
long lWVal = static_cast< long >(GetFldVal(*m_pSizeWidthField ));
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index 0d89e4f79d3e..6a0b09635daa 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -30,16 +30,16 @@ class SwTxtFmtColl;
class SwEnvFmtPage : public SfxTabPage
{
- MetricField* m_pAddrLeftField;
- MetricField* m_pAddrTopField;
- MenuButton* m_pAddrEditButton;
- MetricField* m_pSendLeftField;
- MetricField* m_pSendTopField;
- MenuButton* m_pSendEditButton;
- ListBox* m_pSizeFormatBox;
- MetricField* m_pSizeWidthField;
- MetricField* m_pSizeHeightField;
- SwEnvPreview* m_pPreview;
+ VclPtr<MetricField> m_pAddrLeftField;
+ VclPtr<MetricField> m_pAddrTopField;
+ VclPtr<MenuButton> m_pAddrEditButton;
+ VclPtr<MetricField> m_pSendLeftField;
+ VclPtr<MetricField> m_pSendTopField;
+ VclPtr<MenuButton> m_pSendEditButton;
+ VclPtr<ListBox> m_pSizeFormatBox;
+ VclPtr<MetricField> m_pSizeWidthField;
+ VclPtr<MetricField> m_pSizeHeightField;
+ VclPtr<SwEnvPreview> m_pPreview;
std::vector<sal_uInt16> aIDs;
@@ -59,6 +59,8 @@ class SwEnvFmtPage : public SfxTabPage
using TabPage::DeactivatePage;
public:
+ virtual ~SwEnvFmtPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index edaab64b424d..b0df406c14d0 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -235,6 +235,20 @@ SwEnvPage::SwEnvPage(vcl::Window* pParent, const SfxItemSet& rSet)
SwEnvPage::~SwEnvPage()
{
+ dispose();
+}
+
+void SwEnvPage::dispose()
+{
+ m_pAddrEdit.clear();
+ m_pDatabaseLB.clear();
+ m_pTableLB.clear();
+ m_pDBFieldLB.clear();
+ m_pInsertBT.clear();
+ m_pSenderBox.clear();
+ m_pSenderEdit.clear();
+ m_pPreview.clear();
+ SfxTabPage::dispose();
}
IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox )
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index 288884a9a2d2..02c99db21905 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -67,6 +67,23 @@ SwEnvPrtPage::SwEnvPrtPage(vcl::Window* pParent, const SfxItemSet& rSet)
m_aIds[ENV_VER_RGHT] = m_pAlignBox->GetItemId("vertright");
}
+SwEnvPrtPage::~SwEnvPrtPage()
+{
+ dispose();
+}
+
+void SwEnvPrtPage::dispose()
+{
+ m_pAlignBox.clear();
+ m_pTopButton.clear();
+ m_pBottomButton.clear();
+ m_pRightField.clear();
+ m_pDownField.clear();
+ m_pPrinterInfo.clear();
+ m_pPrtSetup.clear();
+ SfxTabPage::dispose();
+}
+
IMPL_LINK_NOARG(SwEnvPrtPage, ClickHdl)
{
if (m_pBottomButton->IsChecked())
diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx
index bee494477667..e0f37dff6eef 100644
--- a/sw/source/ui/envelp/envprt.hxx
+++ b/sw/source/ui/envelp/envprt.hxx
@@ -35,13 +35,13 @@ class SwEnvDlg;
class SwEnvPrtPage : public SfxTabPage
{
- ToolBox* m_pAlignBox;
- RadioButton* m_pTopButton;
- RadioButton* m_pBottomButton;
- MetricField* m_pRightField;
- MetricField* m_pDownField;
- FixedText* m_pPrinterInfo;
- PushButton* m_pPrtSetup;
+ VclPtr<ToolBox> m_pAlignBox;
+ VclPtr<RadioButton> m_pTopButton;
+ VclPtr<RadioButton> m_pBottomButton;
+ VclPtr<MetricField> m_pRightField;
+ VclPtr<MetricField> m_pDownField;
+ VclPtr<FixedText> m_pPrinterInfo;
+ VclPtr<PushButton> m_pPrtSetup;
sal_uInt16 m_aIds[ENV_VER_RGHT-ENV_HOR_LEFT+1];
@@ -59,6 +59,8 @@ class SwEnvPrtPage : public SfxTabPage
using TabPage::DeactivatePage;
public:
+ virtual ~SwEnvPrtPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 5f163c79f4ae..c91582b3a92c 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -176,6 +176,7 @@ SwLabDlg::~SwLabDlg()
void SwLabDlg::dispose()
{
delete pRecs;
+ pPrtPage.clear();
SfxTabDialog::dispose();
}
@@ -292,6 +293,29 @@ SwLabPage::SwLabPage(vcl::Window* pParent, const SfxItemSet& rSet)
m_pMakeBox->GetSelectHdl().Call(m_pMakeBox);
}
+SwLabPage::~SwLabPage()
+{
+ dispose();
+}
+
+void SwLabPage::dispose()
+{
+ m_pAddressFrame.clear();
+ m_pAddrBox.clear();
+ m_pWritingEdit.clear();
+ m_pDatabaseLB.clear();
+ m_pTableLB.clear();
+ m_pInsertBT.clear();
+ m_pDBFieldLB.clear();
+ m_pContButton.clear();
+ m_pSheetButton.clear();
+ m_pMakeBox.clear();
+ m_pTypeBox.clear();
+ m_pHiddenSortTypeBox.clear();
+ m_pFormatInfo.clear();
+ SfxTabPage::dispose();
+}
+
void SwLabPage::SetToBusinessCard()
{
SetHelpId(HID_BUSINESS_FMT_PAGE);
@@ -603,6 +627,9 @@ void SwVisitingCardPage::dispose()
ClearUserData();
delete pExampleFrame;
+ m_pAutoTextLB.clear();
+ m_pAutoTextGroupLB.clear();
+ m_pExampleWIN.clear();
SfxTabPage::dispose();
}
@@ -739,6 +766,34 @@ SwPrivateDataPage::SwPrivateDataPage(vcl::Window* pParent, const SfxItemSet& rSe
SetExchangeSupport();
}
+SwPrivateDataPage::~SwPrivateDataPage()
+{
+ dispose();
+}
+
+void SwPrivateDataPage::dispose()
+{
+ m_pFirstNameED.clear();
+ m_pNameED.clear();
+ m_pShortCutED.clear();
+ m_pFirstName2ED.clear();
+ m_pName2ED.clear();
+ m_pShortCut2ED.clear();
+ m_pStreetED.clear();
+ m_pZipED.clear();
+ m_pCityED.clear();
+ m_pCountryED.clear();
+ m_pStateED.clear();
+ m_pTitleED.clear();
+ m_pProfessionED.clear();
+ m_pPhoneED.clear();
+ m_pMobilePhoneED.clear();
+ m_pFaxED.clear();
+ m_pHomePageED.clear();
+ m_pMailED.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* SwPrivateDataPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
{
return new SwPrivateDataPage(pParent, *rSet);
@@ -827,6 +882,31 @@ SwBusinessDataPage::SwBusinessDataPage(vcl::Window* pParent, const SfxItemSet& r
SetExchangeSupport();
}
+SwBusinessDataPage::~SwBusinessDataPage()
+{
+ dispose();
+}
+
+void SwBusinessDataPage::dispose()
+{
+ m_pCompanyED.clear();
+ m_pCompanyExtED.clear();
+ m_pSloganED.clear();
+ m_pStreetED.clear();
+ m_pZipED.clear();
+ m_pCityED.clear();
+ m_pCountryED.clear();
+ m_pStateED.clear();
+ m_pPositionED.clear();
+ m_pPhoneED.clear();
+ m_pMobilePhoneED.clear();
+ m_pFaxED.clear();
+ m_pHomePageED.clear();
+ m_pMailED.clear();
+ SfxTabPage::dispose();
+}
+
+
SfxTabPage* SwBusinessDataPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
{
return new SwBusinessDataPage(pParent, *rSet);
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index f0ce86273f93..0b2a826bfedf 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -353,8 +353,29 @@ SwLabFmtPage::SwLabFmtPage(vcl::Window* pParent, const SfxItemSet& rSet)
SwLabFmtPage::~SwLabFmtPage()
{
+ dispose();
}
+void SwLabFmtPage::dispose()
+{
+ m_pMakeFI.clear();
+ m_pTypeFI.clear();
+ m_pPreview.clear();
+ m_pHDistField.clear();
+ m_pVDistField.clear();
+ m_pWidthField.clear();
+ m_pHeightField.clear();
+ m_pLeftField.clear();
+ m_pUpperField.clear();
+ m_pColsField.clear();
+ m_pRowsField.clear();
+ m_pPWidthField.clear();
+ m_pPHeightField.clear();
+ m_pSavePB.clear();
+ SfxTabPage::dispose();
+}
+
+
// Modify-handler of MetricFields. start preview timer
IMPL_LINK_NOARG_INLINE_START(SwLabFmtPage, ModifyHdl)
{
@@ -600,6 +621,20 @@ SwSaveLabelDlg::SwSaveLabelDlg(SwLabFmtPage* pParent, SwLabRec& rRec)
}
}
+SwSaveLabelDlg::~SwSaveLabelDlg()
+{
+ dispose();
+}
+
+void SwSaveLabelDlg::dispose()
+{
+ m_pMakeCB.clear();
+ m_pTypeED.clear();
+ m_pOKPB.clear();
+ pLabPage.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl)
{
SwLabelConfig& rCfg = pLabPage->GetParentSwLabDlg()->GetLabelsConfig();
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index 13dc53353229..1606ccd9ea27 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -69,20 +69,20 @@ public:
class SwLabFmtPage : public SfxTabPage
{
- FixedText* m_pMakeFI;
- FixedText* m_pTypeFI;
- SwLabPreview* m_pPreview;
- MetricField* m_pHDistField;
- MetricField* m_pVDistField;
- MetricField* m_pWidthField;
- MetricField* m_pHeightField;
- MetricField* m_pLeftField;
- MetricField* m_pUpperField;
- NumericField* m_pColsField;
- NumericField* m_pRowsField;
- MetricField* m_pPWidthField;
- MetricField* m_pPHeightField;
- PushButton* m_pSavePB;
+ VclPtr<FixedText> m_pMakeFI;
+ VclPtr<FixedText> m_pTypeFI;
+ VclPtr<SwLabPreview> m_pPreview;
+ VclPtr<MetricField> m_pHDistField;
+ VclPtr<MetricField> m_pVDistField;
+ VclPtr<MetricField> m_pWidthField;
+ VclPtr<MetricField> m_pHeightField;
+ VclPtr<MetricField> m_pLeftField;
+ VclPtr<MetricField> m_pUpperField;
+ VclPtr<NumericField> m_pColsField;
+ VclPtr<NumericField> m_pRowsField;
+ VclPtr<MetricField> m_pPWidthField;
+ VclPtr<MetricField> m_pPHeightField;
+ VclPtr<PushButton> m_pSavePB;
Idle aPreviewIdle;
bool bModified;
@@ -90,7 +90,6 @@ class SwLabFmtPage : public SfxTabPage
SwLabItem aItem;
SwLabFmtPage(vcl::Window* pParent, const SfxItemSet& rSet);
- virtual ~SwLabFmtPage();
DECL_LINK(ModifyHdl, void *);
DECL_LINK(PreviewHdl, void *);
@@ -103,6 +102,8 @@ class SwLabFmtPage : public SfxTabPage
using TabPage::DeactivatePage;
public:
+ virtual ~SwLabFmtPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
@@ -117,12 +118,12 @@ public:
class SwSaveLabelDlg : public ModalDialog
{
- ComboBox* m_pMakeCB;
- Edit* m_pTypeED;
- OKButton* m_pOKPB;
+ VclPtr<ComboBox> m_pMakeCB;
+ VclPtr<Edit> m_pTypeED;
+ VclPtr<OKButton> m_pOKPB;
bool bSuccess;
- SwLabFmtPage* pLabPage;
+ VclPtr<SwLabFmtPage> pLabPage;
SwLabRec& rLabRec;
DECL_LINK(OkHdl, void *);
@@ -130,6 +131,8 @@ class SwSaveLabelDlg : public ModalDialog
public:
SwSaveLabelDlg(SwLabFmtPage* pParent, SwLabRec& rRec);
+ virtual ~SwSaveLabelDlg();
+ virtual void dispose() SAL_OVERRIDE;
void SetLabel(const OUString& rMake, const OUString& rType)
{
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index dab2e8ac8e42..c52b88f07885 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -68,6 +68,15 @@ SwLabPrtPage::~SwLabPrtPage()
void SwLabPrtPage::dispose()
{
delete pPrinter;
+ m_pPageButton.clear();
+ m_pSingleButton.clear();
+ m_pSingleGrid.clear();
+ m_pPrinterFrame.clear();
+ m_pColField.clear();
+ m_pRowField.clear();
+ m_pSynchronCB.clear();
+ m_pPrinterInfo.clear();
+ m_pPrtSetup.clear();
SfxTabPage::dispose();
}
diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx
index ee0bf43f1602..1953c29ffceb 100644
--- a/sw/source/ui/envelp/labprt.hxx
+++ b/sw/source/ui/envelp/labprt.hxx
@@ -33,20 +33,18 @@ class SwLabPrtPage : public SfxTabPage
{
Printer* pPrinter; // for the shaft setting - unfortunately
- RadioButton* m_pPageButton;
- RadioButton* m_pSingleButton;
- VclContainer* m_pSingleGrid;
- VclContainer* m_pPrinterFrame;
- NumericField* m_pColField;
- NumericField* m_pRowField;
- CheckBox* m_pSynchronCB;
+ VclPtr<RadioButton> m_pPageButton;
+ VclPtr<RadioButton> m_pSingleButton;
+ VclPtr<VclContainer> m_pSingleGrid;
+ VclPtr<VclContainer> m_pPrinterFrame;
+ VclPtr<NumericField> m_pColField;
+ VclPtr<NumericField> m_pRowField;
+ VclPtr<CheckBox> m_pSynchronCB;
- FixedText* m_pPrinterInfo;
- PushButton* m_pPrtSetup;
+ VclPtr<FixedText> m_pPrinterInfo;
+ VclPtr<PushButton> m_pPrtSetup;
SwLabPrtPage(vcl::Window* pParent, const SfxItemSet& rSet);
- virtual ~SwLabPrtPage();
- virtual void dispose() SAL_OVERRIDE;
DECL_LINK( CountHdl, Button * );
@@ -56,6 +54,8 @@ class SwLabPrtPage : public SfxTabPage
using TabPage::DeactivatePage;
public:
+ virtual ~SwLabPrtPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 315f0965c65c..e7f9173940cc 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -406,6 +406,38 @@ void SwMailMergeDlg::dispose()
delete pData;
}
delete pImpl;
+ m_pBeamerWin.clear();
+ m_pAllRB.clear();
+ m_pMarkedRB.clear();
+ m_pFromRB.clear();
+ m_pFromNF.clear();
+ m_pToNF.clear();
+ m_pPrinterRB.clear();
+ m_pMailingRB.clear();
+ m_pFileRB.clear();
+ m_pSingleJobsCB.clear();
+ m_pSaveMergedDocumentFT.clear();
+ m_pSaveSingleDocRB.clear();
+ m_pSaveIndividualRB.clear();
+ m_pGenerateFromDataBaseCB.clear();
+ m_pColumnFT.clear();
+ m_pColumnLB.clear();
+ m_pPathFT.clear();
+ m_pPathED.clear();
+ m_pPathPB.clear();
+ m_pFilterFT.clear();
+ m_pFilterLB.clear();
+ m_pAddressFldLB.clear();
+ m_pSubjectFT.clear();
+ m_pSubjectED.clear();
+ m_pFormatFT.clear();
+ m_pAttachFT.clear();
+ m_pAttachED.clear();
+ m_pAttachPB.clear();
+ m_pFormatHtmlCB.clear();
+ m_pFormatRtfCB.clear();
+ m_pFormatSwCB.clear();
+ m_pOkBTN.clear();
SvxStandardDialog::dispose();
}
@@ -639,6 +671,17 @@ SwMailMergeCreateFromDlg::SwMailMergeCreateFromDlg(vcl::Window* pParent)
get(m_pThisDocRB, "document");
}
+SwMailMergeCreateFromDlg::~SwMailMergeCreateFromDlg()
+{
+ dispose();
+}
+
+void SwMailMergeCreateFromDlg::dispose()
+{
+ m_pThisDocRB.clear();
+ ModalDialog::dispose();
+}
+
SwMailMergeFieldConnectionsDlg::SwMailMergeFieldConnectionsDlg(vcl::Window* pParent)
: ModalDialog(pParent, "MergeConnectDialog",
"modules/swriter/ui/mergeconnectdialog.ui")
@@ -646,4 +689,15 @@ SwMailMergeFieldConnectionsDlg::SwMailMergeFieldConnectionsDlg(vcl::Window* pPar
get(m_pUseExistingRB, "existing");
}
+SwMailMergeFieldConnectionsDlg::~SwMailMergeFieldConnectionsDlg()
+{
+ dispose();
+}
+
+void SwMailMergeFieldConnectionsDlg::dispose()
+{
+ m_pUseExistingRB.clear();
+ ModalDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index 126c1a752793..f6ca588c7045 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -29,21 +29,21 @@ class SwLabPage : public SfxTabPage
OUString sActDBName;
SwLabItem aItem;
- VclContainer* m_pAddressFrame;
-
- CheckBox* m_pAddrBox;
- VclMultiLineEdit* m_pWritingEdit;
- ListBox* m_pDatabaseLB;
- ListBox* m_pTableLB;
- PushButton* m_pInsertBT;
- ListBox* m_pDBFieldLB;
-
- RadioButton* m_pContButton;
- RadioButton* m_pSheetButton;
- ListBox* m_pMakeBox;
- ListBox* m_pTypeBox;
- ListBox* m_pHiddenSortTypeBox;
- FixedText* m_pFormatInfo;
+ VclPtr<VclContainer> m_pAddressFrame;
+
+ VclPtr<CheckBox> m_pAddrBox;
+ VclPtr<VclMultiLineEdit> m_pWritingEdit;
+ VclPtr<ListBox> m_pDatabaseLB;
+ VclPtr<ListBox> m_pTableLB;
+ VclPtr<PushButton> m_pInsertBT;
+ VclPtr<ListBox> m_pDBFieldLB;
+
+ VclPtr<RadioButton> m_pContButton;
+ VclPtr<RadioButton> m_pSheetButton;
+ VclPtr<ListBox> m_pMakeBox;
+ VclPtr<ListBox> m_pTypeBox;
+ VclPtr<ListBox> m_pHiddenSortTypeBox;
+ VclPtr<FixedText> m_pFormatInfo;
bool m_bLabel;
@@ -63,6 +63,8 @@ class SwLabPage : public SfxTabPage
using TabPage::DeactivatePage;
public:
+ virtual ~SwLabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
@@ -84,9 +86,9 @@ public:
class SwOneExampleFrame;
class SwVisitingCardPage : public SfxTabPage
{
- SvTreeListBox* m_pAutoTextLB;
- ListBox* m_pAutoTextGroupLB;
- vcl::Window* m_pExampleWIN;
+ VclPtr<SvTreeListBox> m_pAutoTextLB;
+ VclPtr<ListBox> m_pAutoTextGroupLB;
+ VclPtr<vcl::Window> m_pExampleWIN;
OUString sTempURL;
@@ -127,26 +129,26 @@ public:
class SwPrivateDataPage : public SfxTabPage
{
- Edit* m_pFirstNameED;
- Edit* m_pNameED;
- Edit* m_pShortCutED;
-
- Edit* m_pFirstName2ED;
- Edit* m_pName2ED;
- Edit* m_pShortCut2ED;
-
- Edit* m_pStreetED;
- Edit* m_pZipED;
- Edit* m_pCityED;
- Edit* m_pCountryED;
- Edit* m_pStateED;
- Edit* m_pTitleED;
- Edit* m_pProfessionED;
- Edit* m_pPhoneED;
- Edit* m_pMobilePhoneED;
- Edit* m_pFaxED;
- Edit* m_pHomePageED;
- Edit* m_pMailED;
+ VclPtr<Edit> m_pFirstNameED;
+ VclPtr<Edit> m_pNameED;
+ VclPtr<Edit> m_pShortCutED;
+
+ VclPtr<Edit> m_pFirstName2ED;
+ VclPtr<Edit> m_pName2ED;
+ VclPtr<Edit> m_pShortCut2ED;
+
+ VclPtr<Edit> m_pStreetED;
+ VclPtr<Edit> m_pZipED;
+ VclPtr<Edit> m_pCityED;
+ VclPtr<Edit> m_pCountryED;
+ VclPtr<Edit> m_pStateED;
+ VclPtr<Edit> m_pTitleED;
+ VclPtr<Edit> m_pProfessionED;
+ VclPtr<Edit> m_pPhoneED;
+ VclPtr<Edit> m_pMobilePhoneED;
+ VclPtr<Edit> m_pFaxED;
+ VclPtr<Edit> m_pHomePageED;
+ VclPtr<Edit> m_pMailED;
SwPrivateDataPage(vcl::Window* pParent, const SfxItemSet& rSet);
@@ -154,6 +156,8 @@ class SwPrivateDataPage : public SfxTabPage
using TabPage::DeactivatePage;
public:
+ virtual ~SwPrivateDataPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
@@ -165,24 +169,24 @@ public:
class SwBusinessDataPage : public SfxTabPage
{
- Edit* m_pCompanyED;
- Edit* m_pCompanyExtED;
- Edit* m_pSloganED;
+ VclPtr<Edit> m_pCompanyED;
+ VclPtr<Edit> m_pCompanyExtED;
+ VclPtr<Edit> m_pSloganED;
- Edit* m_pStreetED;
- Edit* m_pZipED;
- Edit* m_pCityED;
- Edit* m_pCountryED;
- Edit* m_pStateED;
+ VclPtr<Edit> m_pStreetED;
+ VclPtr<Edit> m_pZipED;
+ VclPtr<Edit> m_pCityED;
+ VclPtr<Edit> m_pCountryED;
+ VclPtr<Edit> m_pStateED;
- Edit* m_pPositionED;
+ VclPtr<Edit> m_pPositionED;
- Edit* m_pPhoneED;
- Edit* m_pMobilePhoneED;
- Edit* m_pFaxED;
+ VclPtr<Edit> m_pPhoneED;
+ VclPtr<Edit> m_pMobilePhoneED;
+ VclPtr<Edit> m_pFaxED;
- Edit* m_pHomePageED;
- Edit* m_pMailED;
+ VclPtr<Edit> m_pHomePageED;
+ VclPtr<Edit> m_pMailED;
SwBusinessDataPage(vcl::Window* pParent, const SfxItemSet& rSet);
@@ -190,6 +194,8 @@ class SwBusinessDataPage : public SfxTabPage
using TabPage::DeactivatePage;
public:
+ virtual ~SwBusinessDataPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index fce5029d6e32..13453cadb517 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -71,6 +71,20 @@ sw::DropDownFieldDialog::DropDownFieldDialog(vcl::Window *pParent, SwWrtShell &r
m_pListItemsLB->GrabFocus();
}
+sw::DropDownFieldDialog::~DropDownFieldDialog()
+{
+ dispose();
+}
+
+void sw::DropDownFieldDialog::dispose()
+{
+ m_pListItemsLB.clear();
+ m_pOKPB.clear();
+ m_pNextPB.clear();
+ m_pEditPB.clear();
+ SvxStandardDialog::dispose();
+}
+
void sw::DropDownFieldDialog::Apply()
{
if(pDropField)
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index a2a9c7c1e6b6..224f56b9184e 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -170,6 +170,11 @@ SwChangeDBDlg::~SwChangeDBDlg()
void SwChangeDBDlg::dispose()
{
delete pMgr;
+ m_pUsedDBTLB.clear();
+ m_pAvailDBTLB.clear();
+ m_pAddDBPB.clear();
+ m_pDocDBNameFT.clear();
+ m_pDefineBT.clear();
SvxStandardDialog::dispose();
}
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index a2af66a9d61a..5faa704ee43c 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -74,6 +74,24 @@ SwFldDBPage::SwFldDBPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
SwFldDBPage::~SwFldDBPage()
{
+ dispose();
+}
+
+void SwFldDBPage::dispose()
+{
+ m_pTypeLB.clear();
+ m_pDatabaseTLB.clear();
+ m_pAddDBPB.clear();
+ m_pCondition.clear();
+ m_pConditionED.clear();
+ m_pValue.clear();
+ m_pValueED.clear();
+ m_pDBFormatRB.clear();
+ m_pNewFormatRB.clear();
+ m_pNumFormatLB.clear();
+ m_pFormatLB.clear();
+ m_pFormat.clear();
+ SwFldPage::dispose();
}
// initialise TabPage
diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx
index 6163cb9566d3..a54efb90095d 100644
--- a/sw/source/ui/fldui/flddb.hxx
+++ b/sw/source/ui/fldui/flddb.hxx
@@ -32,20 +32,20 @@
class SwFldDBPage : public SwFldPage
{
- ListBox* m_pTypeLB;
- SwDBTreeList* m_pDatabaseTLB;
+ VclPtr<ListBox> m_pTypeLB;
+ VclPtr<SwDBTreeList> m_pDatabaseTLB;
- PushButton* m_pAddDBPB;
+ VclPtr<PushButton> m_pAddDBPB;
- VclContainer* m_pCondition;
- ConditionEdit* m_pConditionED;
- VclContainer* m_pValue;
- Edit* m_pValueED;
- RadioButton* m_pDBFormatRB;
- RadioButton* m_pNewFormatRB;
- NumFormatListBox* m_pNumFormatLB;
- ListBox* m_pFormatLB;
- VclContainer* m_pFormat;
+ VclPtr<VclContainer> m_pCondition;
+ VclPtr<ConditionEdit> m_pConditionED;
+ VclPtr<VclContainer> m_pValue;
+ VclPtr<Edit> m_pValueED;
+ VclPtr<RadioButton> m_pDBFormatRB;
+ VclPtr<RadioButton> m_pNewFormatRB;
+ VclPtr<NumFormatListBox> m_pNumFormatLB;
+ VclPtr<ListBox> m_pFormatLB;
+ VclPtr<VclContainer> m_pFormat;
OUString m_sOldDBName;
OUString m_sOldTableName;
@@ -71,6 +71,7 @@ public:
SwFldDBPage(vcl::Window* pParent, const SfxItemSet& rSet);
virtual ~SwFldDBPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 1655f570b768..58a9fd04a051 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -89,6 +89,18 @@ SwFldDokInfPage::SwFldDokInfPage(vcl::Window* pParent, const SfxItemSet& rCoreSe
SwFldDokInfPage::~SwFldDokInfPage()
{
+ dispose();
+}
+
+void SwFldDokInfPage::dispose()
+{
+ m_pTypeTLB.clear();
+ m_pSelection.clear();
+ m_pSelectionLB.clear();
+ m_pFormat.clear();
+ m_pFormatLB.clear();
+ m_pFixedCB.clear();
+ SwFldPage::dispose();
}
void SwFldDokInfPage::Reset(const SfxItemSet* )
diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx
index 596d3bc2d3b7..5b7f44451a4d 100644
--- a/sw/source/ui/fldui/flddinf.hxx
+++ b/sw/source/ui/fldui/flddinf.hxx
@@ -36,12 +36,12 @@ namespace com{namespace sun{ namespace star{ namespace beans{
class SwFldDokInfPage : public SwFldPage
{
- SvTreeListBox* m_pTypeTLB;
- VclContainer* m_pSelection;
- ListBox* m_pSelectionLB;
- VclContainer* m_pFormat;
- NumFormatListBox* m_pFormatLB;
- CheckBox* m_pFixedCB;
+ VclPtr<SvTreeListBox> m_pTypeTLB;
+ VclPtr<VclContainer> m_pSelection;
+ VclPtr<ListBox> m_pSelectionLB;
+ VclPtr<VclContainer> m_pFormat;
+ VclPtr<NumFormatListBox> m_pFormatLB;
+ VclPtr<CheckBox> m_pFixedCB;
SvTreeListEntry* pSelEntry;
com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > xCustomPropertySet;
@@ -62,6 +62,7 @@ public:
SwFldDokInfPage(vcl::Window* pWindow, const SfxItemSet& rSet);
virtual ~SwFldDokInfPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index ea3ec74a5bb9..18df09e769c6 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -80,8 +80,29 @@ SwFldDokPage::SwFldDokPage(vcl::Window* pParent, const SfxItemSet& rCoreSet )
SwFldDokPage::~SwFldDokPage()
{
+ dispose();
}
+void SwFldDokPage::dispose()
+{
+ m_pTypeLB.clear();
+ m_pSelection.clear();
+ m_pSelectionLB.clear();
+ m_pValueFT.clear();
+ m_pValueED.clear();
+ m_pLevelFT.clear();
+ m_pLevelED.clear();
+ m_pDateFT.clear();
+ m_pTimeFT.clear();
+ m_pDateOffsetED.clear();
+ m_pFormat.clear();
+ m_pFormatLB.clear();
+ m_pNumFormatLB.clear();
+ m_pFixedCB.clear();
+ SwFldPage::dispose();
+}
+
+
void SwFldDokPage::Reset(const SfxItemSet* )
{
SavePos(m_pTypeLB);
diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx
index 4e8abc27e2b0..ab98dc558cd3 100644
--- a/sw/source/ui/fldui/flddok.hxx
+++ b/sw/source/ui/fldui/flddok.hxx
@@ -32,20 +32,20 @@
class SwFldDokPage : public SwFldPage
{
- ListBox* m_pTypeLB;
- VclContainer* m_pSelection;
- ListBox* m_pSelectionLB;
- FixedText* m_pValueFT;
- Edit* m_pValueED;
- FixedText* m_pLevelFT;
- NumericField* m_pLevelED;
- FixedText* m_pDateFT;
- FixedText* m_pTimeFT;
- NumericField* m_pDateOffsetED;
- VclContainer* m_pFormat;
- ListBox* m_pFormatLB;
- NumFormatListBox* m_pNumFormatLB;
- CheckBox* m_pFixedCB;
+ VclPtr<ListBox> m_pTypeLB;
+ VclPtr<VclContainer> m_pSelection;
+ VclPtr<ListBox> m_pSelectionLB;
+ VclPtr<FixedText> m_pValueFT;
+ VclPtr<Edit> m_pValueED;
+ VclPtr<FixedText> m_pLevelFT;
+ VclPtr<NumericField> m_pLevelED;
+ VclPtr<FixedText> m_pDateFT;
+ VclPtr<FixedText> m_pTimeFT;
+ VclPtr<NumericField> m_pDateOffsetED;
+ VclPtr<VclContainer> m_pFormat;
+ VclPtr<ListBox> m_pFormatLB;
+ VclPtr<NumFormatListBox> m_pNumFormatLB;
+ VclPtr<CheckBox> m_pFixedCB;
sal_Int32 nOldSel;
sal_uLong nOldFormat;
@@ -64,6 +64,7 @@ public:
SwFldDokPage(vcl::Window* pWindow, const SfxItemSet& rSet);
virtual ~SwFldDokPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index fc40ec580b7c..f936b66cff47 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -221,6 +221,9 @@ void SwFldEditDlg::dispose()
{
SwViewShell::SetCareWin(NULL);
pSh->EnterStdMode();
+ m_pPrevBT.clear();
+ m_pNextBT.clear();
+ m_pAddressBT.clear();
SfxSingleTabDialog::dispose();
}
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index b190d69c67bd..944512b429d8 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -91,6 +91,37 @@ SwFldFuncPage::SwFldFuncPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
SwFldFuncPage::~SwFldFuncPage()
{
+ dispose();
+}
+
+void SwFldFuncPage::dispose()
+{
+ m_pTypeLB.clear();
+ m_pSelectionLB.clear();
+ m_pFormat.clear();
+ m_pFormatLB.clear();
+ m_pNameFT.clear();
+ m_pNameED.clear();
+ m_pValueGroup.clear();
+ m_pValueFT.clear();
+ m_pValueED.clear();
+ m_pCond1FT.clear();
+ m_pCond1ED.clear();
+ m_pCond2FT.clear();
+ m_pCond2ED.clear();
+ m_pMacroBT.clear();
+ m_pListGroup.clear();
+ m_pListItemFT.clear();
+ m_pListItemED.clear();
+ m_pListAddPB.clear();
+ m_pListItemsFT.clear();
+ m_pListItemsLB.clear();
+ m_pListRemovePB.clear();
+ m_pListUpPB.clear();
+ m_pListDownPB.clear();
+ m_pListNameFT.clear();
+ m_pListNameED.clear();
+ SwFldPage::dispose();
}
void SwFldFuncPage::Reset(const SfxItemSet* )
diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx
index fb8cfa906969..6ec851baa848 100644
--- a/sw/source/ui/fldui/fldfunc.hxx
+++ b/sw/source/ui/fldui/fldfunc.hxx
@@ -32,33 +32,33 @@
class SwFldFuncPage : public SwFldPage
{
- ListBox* m_pTypeLB;
- ListBox* m_pSelectionLB;
- VclContainer* m_pFormat;
- ListBox* m_pFormatLB;
- FixedText* m_pNameFT;
- ConditionEdit* m_pNameED;
- VclContainer* m_pValueGroup;
- FixedText* m_pValueFT;
- Edit* m_pValueED;
- FixedText* m_pCond1FT;
- ConditionEdit* m_pCond1ED;
- FixedText* m_pCond2FT;
- ConditionEdit* m_pCond2ED;
- PushButton* m_pMacroBT;
+ VclPtr<ListBox> m_pTypeLB;
+ VclPtr<ListBox> m_pSelectionLB;
+ VclPtr<VclContainer> m_pFormat;
+ VclPtr<ListBox> m_pFormatLB;
+ VclPtr<FixedText> m_pNameFT;
+ VclPtr<ConditionEdit> m_pNameED;
+ VclPtr<VclContainer> m_pValueGroup;
+ VclPtr<FixedText> m_pValueFT;
+ VclPtr<Edit> m_pValueED;
+ VclPtr<FixedText> m_pCond1FT;
+ VclPtr<ConditionEdit> m_pCond1ED;
+ VclPtr<FixedText> m_pCond2FT;
+ VclPtr<ConditionEdit> m_pCond2ED;
+ VclPtr<PushButton> m_pMacroBT;
//controls of "Input list"
- VclContainer* m_pListGroup;
- FixedText* m_pListItemFT;
- ReturnActionEdit* m_pListItemED;
- PushButton* m_pListAddPB;
- FixedText* m_pListItemsFT;
- ListBox* m_pListItemsLB;
- PushButton* m_pListRemovePB;
- PushButton* m_pListUpPB;
- PushButton* m_pListDownPB;
- FixedText* m_pListNameFT;
- Edit* m_pListNameED;
+ VclPtr<VclContainer> m_pListGroup;
+ VclPtr<FixedText> m_pListItemFT;
+ VclPtr<ReturnActionEdit> m_pListItemED;
+ VclPtr<PushButton> m_pListAddPB;
+ VclPtr<FixedText> m_pListItemsFT;
+ VclPtr<ListBox> m_pListItemsLB;
+ VclPtr<PushButton> m_pListRemovePB;
+ VclPtr<PushButton> m_pListUpPB;
+ VclPtr<PushButton> m_pListDownPB;
+ VclPtr<FixedText> m_pListNameFT;
+ VclPtr<Edit> m_pListNameED;
OUString m_sOldValueFT;
OUString m_sOldNameFT;
@@ -86,6 +86,7 @@ public:
SwFldFuncPage(vcl::Window* pParent, const SfxItemSet& rSet);
virtual ~SwFldFuncPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 247dda169e18..4bb357ea51f0 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -107,6 +107,21 @@ SwFldRefPage::SwFldRefPage(vcl::Window* pParent, const SfxItemSet& rCoreSet )
SwFldRefPage::~SwFldRefPage()
{
+ dispose();
+}
+
+void SwFldRefPage::dispose()
+{
+ m_pTypeLB.clear();
+ m_pSelection.clear();
+ m_pSelectionLB.clear();
+ m_pSelectionToolTipLB.clear();
+ m_pFormat.clear();
+ m_pFormatLB.clear();
+ m_pNameFT.clear();
+ m_pNameED.clear();
+ m_pValueED.clear();
+ SwFldPage::dispose();
}
// #i83479#
diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx
index 27e5ab4fb22e..959c1e00382f 100644
--- a/sw/source/ui/fldui/fldref.hxx
+++ b/sw/source/ui/fldui/fldref.hxx
@@ -34,16 +34,16 @@ class SwTxtNode;
class SwFldRefPage : public SwFldPage
{
- ListBox* m_pTypeLB;
- VclContainer* m_pSelection;
- ListBox* m_pSelectionLB;
+ VclPtr<ListBox> m_pTypeLB;
+ VclPtr<VclContainer> m_pSelection;
+ VclPtr<ListBox> m_pSelectionLB;
// #i83479#
- SwFldRefTreeListBox* m_pSelectionToolTipLB;
- VclContainer* m_pFormat;
- ListBox* m_pFormatLB;
- FixedText* m_pNameFT;
- Edit* m_pNameED;
- Edit* m_pValueED;
+ VclPtr<SwFldRefTreeListBox> m_pSelectionToolTipLB;
+ VclPtr<VclContainer> m_pFormat;
+ VclPtr<ListBox> m_pFormatLB;
+ VclPtr<FixedText> m_pNameFT;
+ VclPtr<Edit> m_pNameED;
+ VclPtr<Edit> m_pValueED;
OUString sBookmarkTxt;
OUString sFootnoteTxt;
OUString sEndnoteTxt;
@@ -77,6 +77,7 @@ public:
SwFldRefPage(vcl::Window* pParent, const SfxItemSet& rSet);
virtual ~SwFldRefPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index a72e4c99662e..9452d9847eac 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -87,6 +87,28 @@ SwFldVarPage::SwFldVarPage(vcl::Window* pParent, const SfxItemSet& rCoreSet )
SwFldVarPage::~SwFldVarPage()
{
+ dispose();
+}
+
+void SwFldVarPage::dispose()
+{
+ m_pTypeLB.clear();
+ m_pSelection.clear();
+ m_pSelectionLB.clear();
+ m_pNameFT.clear();
+ m_pNameED.clear();
+ m_pValueFT.clear();
+ m_pValueED.clear();
+ m_pFormat.clear();
+ m_pNumFormatLB.clear();
+ m_pFormatLB.clear();
+ m_pChapterFrame.clear();
+ m_pChapterLevelLB.clear();
+ m_pInvisibleCB.clear();
+ m_pSeparatorFT.clear();
+ m_pSeparatorED.clear();
+ m_pNewDelTBX.clear();
+ SwFldPage::dispose();
}
void SwFldVarPage::Reset(const SfxItemSet* )
diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx
index 9d1a37f0a5a9..bac7fc733d46 100644
--- a/sw/source/ui/fldui/fldvar.hxx
+++ b/sw/source/ui/fldui/fldvar.hxx
@@ -51,22 +51,22 @@ class SwFldVarPage : public SwFldPage
{
friend class SelectionListBox;
- ListBox* m_pTypeLB;
- VclContainer* m_pSelection;
- SelectionListBox* m_pSelectionLB;
- FixedText* m_pNameFT;
- Edit* m_pNameED;
- FixedText* m_pValueFT;
- ConditionEdit* m_pValueED;
- VclContainer* m_pFormat;
- NumFormatListBox* m_pNumFormatLB;
- ListBox* m_pFormatLB;
- VclContainer* m_pChapterFrame;
- ListBox* m_pChapterLevelLB;
- CheckBox* m_pInvisibleCB;
- FixedText* m_pSeparatorFT;
- Edit* m_pSeparatorED;
- ToolBox* m_pNewDelTBX;
+ VclPtr<ListBox> m_pTypeLB;
+ VclPtr<VclContainer> m_pSelection;
+ VclPtr<SelectionListBox> m_pSelectionLB;
+ VclPtr<FixedText> m_pNameFT;
+ VclPtr<Edit> m_pNameED;
+ VclPtr<FixedText> m_pValueFT;
+ VclPtr<ConditionEdit> m_pValueED;
+ VclPtr<VclContainer> m_pFormat;
+ VclPtr<NumFormatListBox> m_pNumFormatLB;
+ VclPtr<ListBox> m_pFormatLB;
+ VclPtr<VclContainer> m_pChapterFrame;
+ VclPtr<ListBox> m_pChapterLevelLB;
+ VclPtr<CheckBox> m_pInvisibleCB;
+ VclPtr<FixedText> m_pSeparatorFT;
+ VclPtr<Edit> m_pSeparatorED;
+ VclPtr<ToolBox> m_pNewDelTBX;
sal_uInt16 m_nApplyId;
sal_uInt16 m_nDeleteId;
@@ -93,6 +93,7 @@ public:
SwFldVarPage(vcl::Window* pParent, const SfxItemSet& rSet);
virtual ~SwFldVarPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx
index 3346d84d9615..38226fa20b53 100644
--- a/sw/source/ui/fldui/inpdlg.cxx
+++ b/sw/source/ui/fldui/inpdlg.cxx
@@ -106,6 +106,20 @@ SwFldInputDlg::SwFldInputDlg( vcl::Window *pParent, SwWrtShell &rS,
m_pEditED->SetText(convertLineEnd(aStr, GetSystemLineEnd()));
}
+SwFldInputDlg::~SwFldInputDlg()
+{
+ dispose();
+}
+
+void SwFldInputDlg::dispose()
+{
+ m_pLabelED.clear();
+ m_pEditED.clear();
+ m_pOKBT.clear();
+ m_pNextBT.clear();
+ SvxStandardDialog::dispose();
+}
+
void SwFldInputDlg::StateChanged( StateChangedType nType )
{
if ( nType == StateChangedType::INITSHOW )
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index 8a7cf86638a6..a265ff895ddf 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -97,6 +97,16 @@ void SwJavaEditDialog::dispose()
delete pMgr;
delete pFileDlg;
Application::SetDefDialogParent( pOldDefDlgParent );
+ m_pTypeED.clear();
+ m_pUrlRB.clear();
+ m_pEditRB.clear();
+ m_pUrlPB.clear();
+ m_pUrlED.clear();
+ m_pEditED.clear();
+ m_pOKBtn.clear();
+ m_pPrevBtn.clear();
+ m_pNextBtn.clear();
+ pOldDefDlgParent.clear();
SvxStandardDialog::dispose();
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index bf0ca5f19e57..01eab608b18c 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -219,10 +219,11 @@ SwColumnDlg::~SwColumnDlg()
void SwColumnDlg::dispose()
{
- delete pTabPage;
delete pPageSet;
delete pSectionSet;
delete pSelectionSet;
+ m_pApplyToLB.clear();
+ pTabPage.clear();
SfxModalDialog::dispose();
}
@@ -554,6 +555,29 @@ SwColumnPage::~SwColumnPage()
void SwColumnPage::dispose()
{
delete pColMgr;
+ m_pCLNrEdt.clear();
+ m_pDefaultVS.clear();
+ m_pBalanceColsCB.clear();
+ m_pBtnBack.clear();
+ m_pLbl1.clear();
+ m_pLbl2.clear();
+ m_pLbl3.clear();
+ m_pBtnNext.clear();
+ m_pAutoWidthBox.clear();
+ m_pLineTypeLbl.clear();
+ m_pLineTypeDLB.clear();
+ m_pLineWidthLbl.clear();
+ m_pLineWidthEdit.clear();
+ m_pLineColorLbl.clear();
+ m_pLineColorDLB.clear();
+ m_pLineHeightLbl.clear();
+ m_pLineHeightEdit.clear();
+ m_pLinePosLbl.clear();
+ m_pLinePosDLB.clear();
+ m_pTextDirectionFT.clear();
+ m_pTextDirectionLB.clear();
+ m_pPgeExampleWN.clear();
+ m_pFrmExampleWN.clear();
SfxTabPage::dispose();
}
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 89b798c8d7b7..82d350bddb20 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -51,14 +51,14 @@ using namespace ::com::sun::star;
class SwSequenceOptionDialog : public SvxStandardDialog
{
- ListBox* m_pLbLevel;
- Edit* m_pEdDelim;
+ VclPtr<ListBox> m_pLbLevel;
+ VclPtr<Edit> m_pEdDelim;
- ListBox* m_pLbCharStyle;
- CheckBox* m_pApplyBorderAndShadowCB;
+ VclPtr<ListBox> m_pLbCharStyle;
+ VclPtr<CheckBox> m_pApplyBorderAndShadowCB;
//#i61007# order of captions
- ListBox* m_pLbCaptionOrder;
+ VclPtr<ListBox> m_pLbCaptionOrder;
SwView& rView;
OUString aFldTypeName;
@@ -67,6 +67,7 @@ public:
SwSequenceOptionDialog( vcl::Window *pParent, SwView &rV,
const OUString& rSeqFldType );
virtual ~SwSequenceOptionDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual void Apply() SAL_OVERRIDE;
bool IsApplyBorderAndShadow( void ) { return m_pApplyBorderAndShadowCB->IsChecked(); }
@@ -417,6 +418,20 @@ SwCaptionDialog::~SwCaptionDialog()
void SwCaptionDialog::dispose()
{
delete pMgr;
+ m_pTextEdit.clear();
+ m_pCategoryBox.clear();
+ m_pFormatText.clear();
+ m_pFormatBox.clear();
+ m_pNumberingSeparatorFT.clear();
+ m_pNumberingSeparatorED.clear();
+ m_pSepText.clear();
+ m_pSepEdit.clear();
+ m_pPosText.clear();
+ m_pPosBox.clear();
+ m_pOKButton.clear();
+ m_pAutoCaptionButton.clear();
+ m_pOptionButton.clear();
+ m_pPreview.clear();
SvxStandardDialog::dispose();
}
@@ -461,8 +476,20 @@ SwSequenceOptionDialog::SwSequenceOptionDialog( vcl::Window *pParent, SwView &rV
SwSequenceOptionDialog::~SwSequenceOptionDialog()
{
+ dispose();
+}
+
+void SwSequenceOptionDialog::dispose()
+{
+ m_pLbLevel.clear();
+ m_pEdDelim.clear();
+ m_pLbCharStyle.clear();
+ m_pApplyBorderAndShadowCB.clear();
+ m_pLbCaptionOrder.clear();
+ SvxStandardDialog::dispose();
}
+
void SwSequenceOptionDialog::Apply()
{
SwWrtShell &rSh = rView.GetWrtShell();
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index dfa735d06136..34254ac6b705 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -712,6 +712,49 @@ SwFrmPage::SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet)
m_pAutoHeightCB->SetClickHdl( LINK( this, SwFrmPage, AutoHeightClickHdl ) );
}
+SwFrmPage::~SwFrmPage()
+{
+ dispose();
+}
+
+void SwFrmPage::dispose()
+{
+ m_pWidthFT.clear();
+ m_pWidthAutoFT.clear();
+ m_pRelWidthCB.clear();
+ m_pRelWidthRelationLB.clear();
+ m_pAutoWidthCB.clear();
+ m_pHeightFT.clear();
+ m_pHeightAutoFT.clear();
+ m_pRelHeightCB.clear();
+ m_pRelHeightRelationLB.clear();
+ m_pAutoHeightCB.clear();
+ m_pFixedRatioCB.clear();
+ m_pRealSizeBT.clear();
+ m_pAnchorFrame.clear();
+ m_pAnchorAtPageRB.clear();
+ m_pAnchorAtParaRB.clear();
+ m_pAnchorAtCharRB.clear();
+ m_pAnchorAsCharRB.clear();
+ m_pAnchorAtFrameRB.clear();
+ m_pHorizontalFT.clear();
+ m_pHorizontalDLB.clear();
+ m_pAtHorzPosFT.clear();
+ m_pAtHorzPosED.clear();
+ m_pHoriRelationFT.clear();
+ m_pHoriRelationLB.clear();
+ m_pMirrorPagesCB.clear();
+ m_pVerticalFT.clear();
+ m_pVerticalDLB.clear();
+ m_pAtVertPosFT.clear();
+ m_pAtVertPosED.clear();
+ m_pVertRelationFT.clear();
+ m_pVertRelationLB.clear();
+ m_pFollowTextFlowCB.clear();
+ m_pExampleWN.clear();
+ SfxTabPage::dispose();
+}
+
namespace
{
struct FrmMaps
@@ -815,10 +858,6 @@ void SwFrmPage::setOptimalRelWidth()
m_pHoriRelationLB->Clear();
}
-SwFrmPage::~SwFrmPage()
-{
-}
-
SfxTabPage* SwFrmPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
return new SwFrmPage( pParent, *rSet );
@@ -2370,6 +2409,15 @@ SwGrfExtPage::~SwGrfExtPage()
void SwGrfExtPage::dispose()
{
delete pGrfDlg;
+ m_pMirror.clear();
+ m_pMirrorVertBox.clear();
+ m_pMirrorHorzBox.clear();
+ m_pAllPagesRB.clear();
+ m_pLeftPagesRB.clear();
+ m_pRightPagesRB.clear();
+ m_pBmpWin.clear();
+ m_pConnectED.clear();
+ m_pBrowseBT.clear();
SfxTabPage::dispose();
}
@@ -2708,6 +2756,18 @@ SwFrmURLPage::SwFrmURLPage( vcl::Window *pParent, const SfxItemSet &rSet ) :
SwFrmURLPage::~SwFrmURLPage()
{
+ dispose();
+}
+
+void SwFrmURLPage::dispose()
+{
+ pURLED.clear();
+ pSearchPB.clear();
+ pNameED.clear();
+ pFrameCB.clear();
+ pServerCB.clear();
+ pClientCB.clear();
+ SfxTabPage::dispose();
}
void SwFrmURLPage::Reset( const SfxItemSet *rSet )
@@ -2850,8 +2910,35 @@ SwFrmAddPage::SwFrmAddPage(vcl::Window *pParent, const SfxItemSet &rSet)
SwFrmAddPage::~SwFrmAddPage()
{
+ dispose();
}
+void SwFrmAddPage::dispose()
+{
+ pNameFrame.clear();
+ pNameFT.clear();
+ pNameED.clear();
+ pAltNameFT.clear();
+ pAltNameED.clear();
+ pPrevFT.clear();
+ pPrevLB.clear();
+ pNextFT.clear();
+ pNextLB.clear();
+ pProtectFrame.clear();
+ pProtectContentCB.clear();
+ pProtectFrameCB.clear();
+ pProtectSizeCB.clear();
+ m_pContentAlignFrame.clear();
+ m_pVertAlignLB.clear();
+ pPropertiesFrame.clear();
+ pEditInReadonlyCB.clear();
+ pPrintFrameCB.clear();
+ pTextFlowFT.clear();
+ pTextFlowLB.clear();
+ SfxTabPage::dispose();
+}
+
+
SfxTabPage* SwFrmAddPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
return new SwFrmAddPage(pParent, *rSet);
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 898a1c69e568..df3c5c76e676 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -133,6 +133,26 @@ SwWrapTabPage::SwWrapTabPage(vcl::Window *pParent, const SfxItemSet &rSet)
SwWrapTabPage::~SwWrapTabPage()
{
+ dispose();
+}
+
+void SwWrapTabPage::dispose()
+{
+ m_pNoWrapRB.clear();
+ m_pWrapLeftRB.clear();
+ m_pWrapRightRB.clear();
+ m_pWrapParallelRB.clear();
+ m_pWrapThroughRB.clear();
+ m_pIdealWrapRB.clear();
+ m_pLeftMarginED.clear();
+ m_pRightMarginED.clear();
+ m_pTopMarginED.clear();
+ m_pBottomMarginED.clear();
+ m_pWrapAnchorOnlyCB.clear();
+ m_pWrapTransparentCB.clear();
+ m_pWrapOutlineCB.clear();
+ m_pWrapOutsideCB.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* SwWrapTabPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 0005136836ed..589d1a75ded7 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -188,9 +188,9 @@ public:
class SwAutoMarkDlg_Impl : public ModalDialog
{
- OKButton* m_pOKPB;
+ VclPtr<OKButton> m_pOKPB;
- SwEntryBrowseBox* m_pEntriesBB;
+ VclPtr<SwEntryBrowseBox> m_pEntriesBB;
OUString sAutoMarkURL;
@@ -344,6 +344,8 @@ void SwMultiTOXTabDialog::dispose()
delete[] pDescArr;
delete pMgr;
delete pExampleFrame;
+ m_pExampleContainerWIN.clear();
+ m_pShowExampleCB.clear();
SfxTabDialog::dispose();
}
@@ -509,7 +511,7 @@ IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl )
&& pExampleFrame && pExampleFrame->IsServiceAvailable();
m_pExampleContainerWIN->Show( bSetViewWindow );
- SetViewWindow( bSetViewWindow ? m_pExampleContainerWIN : 0 );
+ SetViewWindow( bSetViewWindow ? m_pExampleContainerWIN.get() : 0 );
setOptimalLayoutSize();
@@ -626,11 +628,11 @@ void SwIndexTreeLB::setColSizes()
class SwAddStylesDlg_Impl : public SfxModalDialog
{
- OKButton* m_pOk;
+ VclPtr<OKButton> m_pOk;
- SwIndexTreeLB* m_pHeaderTree;
- PushButton* m_pLeftPB;
- PushButton* m_pRightPB;
+ VclPtr<SwIndexTreeLB> m_pHeaderTree;
+ VclPtr<PushButton> m_pLeftPB;
+ VclPtr<PushButton> m_pRightPB;
OUString* pStyleArr;
@@ -721,7 +723,10 @@ SwAddStylesDlg_Impl::~SwAddStylesDlg_Impl()
void SwAddStylesDlg_Impl::dispose()
{
- delete m_pHeaderTree;
+ m_pHeaderTree.clear();
+ m_pOk.clear();
+ m_pLeftPB.clear();
+ m_pRightPB.clear();
SfxModalDialog::dispose();
}
@@ -904,6 +909,47 @@ void SwTOXSelectTabPage::dispose()
{
delete pIndexRes;
delete pIndexEntryWrapper;
+ m_pTitleED.clear();
+ m_pTypeFT.clear();
+ m_pTypeLB.clear();
+ m_pReadOnlyCB.clear();
+ m_pAreaFrame.clear();
+ m_pAreaLB.clear();
+ m_pLevelFT.clear();
+ m_pLevelNF.clear();
+ m_pCreateFrame.clear();
+ m_pFromHeadingsCB.clear();
+ m_pAddStylesCB.clear();
+ m_pAddStylesPB.clear();
+ m_pFromTablesCB.clear();
+ m_pFromFramesCB.clear();
+ m_pFromGraphicsCB.clear();
+ m_pFromOLECB.clear();
+ m_pLevelFromChapterCB.clear();
+ m_pFromCaptionsRB.clear();
+ m_pFromObjectNamesRB.clear();
+ m_pCaptionSequenceFT.clear();
+ m_pCaptionSequenceLB.clear();
+ m_pDisplayTypeFT.clear();
+ m_pDisplayTypeLB.clear();
+ m_pTOXMarksCB.clear();
+ m_pIdxOptionsFrame.clear();
+ m_pCollectSameCB.clear();
+ m_pUseFFCB.clear();
+ m_pUseDashCB.clear();
+ m_pCaseSensitiveCB.clear();
+ m_pInitialCapsCB.clear();
+ m_pKeyAsEntryCB.clear();
+ m_pFromFileCB.clear();
+ m_pAutoMarkPB.clear();
+ m_pFromObjCLB.clear();
+ m_pFromObjFrame.clear();
+ m_pSequenceCB.clear();
+ m_pBracketLB.clear();
+ m_pAuthorityFrame.clear();
+ m_pSortFrame.clear();
+ m_pLanguageLB.clear();
+ m_pSortAlgorithmLB.clear();
SfxTabPage::dispose();
}
@@ -1482,7 +1528,7 @@ class SwTOXEdit : public Edit
SwFormToken aFormToken;
Link aPrevNextControlLink;
bool bNextControl;
- SwTokenWindow* m_pParent;
+ VclPtr<SwTokenWindow> m_pParent;
public:
SwTOXEdit( vcl::Window* pParent, SwTokenWindow* pTokenWin,
const SwFormToken& aToken)
@@ -1492,6 +1538,8 @@ public:
m_pParent( pTokenWin )
{
}
+ virtual ~SwTOXEdit() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE { m_pParent.clear(); Edit::dispose(); }
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
@@ -1567,7 +1615,7 @@ class SwTOXButton : public PushButton
SwFormToken aFormToken;
Link aPrevNextControlLink;
bool bNextControl;
- SwTokenWindow* m_pParent;
+ VclPtr<SwTokenWindow> m_pParent;
public:
SwTOXButton( vcl::Window* pParent, SwTokenWindow* pTokenWin,
const SwFormToken& rToken)
@@ -1577,6 +1625,8 @@ public:
m_pParent(pTokenWin)
{
}
+ virtual ~SwTOXButton() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE { m_pParent.clear(); PushButton::dispose(); }
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
@@ -1697,6 +1747,17 @@ SwIdxTreeListBox::SwIdxTreeListBox(vcl::Window* pPar, WinBits nStyle)
{
}
+SwIdxTreeListBox::~SwIdxTreeListBox()
+{
+ dispose();
+}
+
+void SwIdxTreeListBox::dispose()
+{
+ pParent.clear();
+ SvTreeListBox::dispose();
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSwIdxTreeListBox(vcl::Window *pParent, VclBuilder::stringmap &rMap)
{
WinBits nWinStyle = WB_TABSTOP;
@@ -1895,6 +1956,63 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(vcl::Window* pParent, const SfxItemSet& rAt
m_pSecondKeyLB->SelectEntryPos(0);
m_pThirdKeyLB->SelectEntryPos(0);
}
+
+SwTOXEntryTabPage::~SwTOXEntryTabPage()
+{
+ dispose();
+}
+
+void SwTOXEntryTabPage::dispose()
+{
+ m_pLevelFT.clear();
+ m_pLevelLB.clear();
+ m_pTokenWIN.clear();
+ m_pAllLevelsPB.clear();
+ m_pEntryNoPB.clear();
+ m_pEntryPB.clear();
+ m_pTabPB.clear();
+ m_pChapterInfoPB.clear();
+ m_pPageNoPB.clear();
+ m_pHyperLinkPB.clear();
+ m_pAuthFieldsLB.clear();
+ m_pAuthInsertPB.clear();
+ m_pAuthRemovePB.clear();
+ m_pCharStyleLB.clear();
+ m_pEditStylePB.clear();
+ m_pChapterEntryFT.clear();
+ m_pChapterEntryLB.clear();
+ m_pNumberFormatFT.clear();
+ m_pNumberFormatLB.clear();
+ m_pEntryOutlineLevelFT.clear();
+ m_pEntryOutlineLevelNF.clear();
+ m_pFillCharFT.clear();
+ m_pFillCharCB.clear();
+ m_pTabPosFT.clear();
+ m_pTabPosMF.clear();
+ m_pAutoRightCB.clear();
+ m_pFormatFrame.clear();
+ m_pMainEntryStyleFT.clear();
+ m_pMainEntryStyleLB.clear();
+ m_pAlphaDelimCB.clear();
+ m_pCommaSeparatedCB.clear();
+ m_pRelToStyleCB.clear();
+ m_pSortingFrame.clear();
+ m_pSortDocPosRB.clear();
+ m_pSortContentRB.clear();
+ m_pSortKeyFrame.clear();
+ m_pFirstKeyLB.clear();
+ m_pFirstSortUpRB.clear();
+ m_pFirstSortDownRB.clear();
+ m_pSecondKeyLB.clear();
+ m_pSecondSortUpRB.clear();
+ m_pSecondSortDownRB.clear();
+ m_pThirdKeyLB.clear();
+ m_pThirdSortUpRB.clear();
+ m_pThirdSortDownRB.clear();
+ SfxTabPage::dispose();
+}
+
+
// pVoid is used as signal to change all levels of the example
IMPL_LINK(SwTOXEntryTabPage, ModifyHdl, void*, pVoid)
{
@@ -1912,10 +2030,6 @@ IMPL_LINK(SwTOXEntryTabPage, ModifyHdl, void*, pVoid)
return 0;
}
-SwTOXEntryTabPage::~SwTOXEntryTabPage()
-{
-}
-
bool SwTOXEntryTabPage::FillItemSet( SfxItemSet* )
{
// nothing to do
@@ -2660,6 +2774,11 @@ void SwTokenWindow::dispose()
}
aControlList.clear();
disposeBuilder();
+ m_pLeftScrollWin.clear();
+ m_pCtrlParentWin.clear();
+ m_pRightScrollWin.clear();
+ pActiveCtrl.clear();
+ m_pParent.clear();
VclHBox::dispose();
}
@@ -2671,9 +2790,6 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
if(pForm)
{
//apply current level settings to the form
- for (ctrl_iterator iter = aControlList.begin(); iter != aControlList.end(); ++iter)
- delete (*iter);
-
aControlList.clear();
}
@@ -2755,9 +2871,9 @@ void SwTokenWindow::SetActiveControl(Control* pSet)
//it must be a SwTOXEdit
const SwFormToken* pFToken;
if( WINDOW_EDIT == pActiveCtrl->GetType() )
- pFToken = &static_cast<SwTOXEdit*>(pActiveCtrl)->GetFormToken();
+ pFToken = &static_cast<SwTOXEdit*>(pActiveCtrl.get())->GetFormToken();
else
- pFToken = &static_cast<SwTOXButton*>(pActiveCtrl)->GetFormToken();
+ pFToken = &static_cast<SwTOXButton*>(pActiveCtrl.get())->GetFormToken();
SwFormToken aTemp( *pFToken );
aButtonSelectedHdl.Call( &aTemp );
@@ -2978,15 +3094,15 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken&
{
++iterActive;
- Selection aSel = static_cast<SwTOXEdit*>(pActiveCtrl)->GetSelection();
+ Selection aSel = static_cast<SwTOXEdit*>(pActiveCtrl.get())->GetSelection();
aSel.Justify();
- const OUString sEditText = static_cast<SwTOXEdit*>(pActiveCtrl)->GetText();
+ const OUString sEditText = static_cast<SwTOXEdit*>(pActiveCtrl.get())->GetText();
const OUString sLeft = sEditText.copy( 0, aSel.A() );
const OUString sRight = sEditText.copy( aSel.B() );
- static_cast<SwTOXEdit*>(pActiveCtrl)->SetText(sLeft);
- static_cast<SwTOXEdit*>(pActiveCtrl)->AdjustSize();
+ static_cast<SwTOXEdit*>(pActiveCtrl.get())->SetText(sLeft);
+ static_cast<SwTOXEdit*>(pActiveCtrl.get())->AdjustSize();
SwFormToken aTmpToken(TOKEN_TEXT);
SwTOXEdit* pEdit = new SwTOXEdit(m_pCtrlParentWin, this, aTmpToken);
@@ -3017,7 +3133,7 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken&
{
iterActive = aControlList.erase(iterActive);
pActiveCtrl->Hide();
- delete pActiveCtrl;
+ pActiveCtrl.clear();
}
//now the new button
@@ -3082,7 +3198,7 @@ void SwTokenWindow::RemoveControl(SwTOXButton* pDel, bool bInternalCall )
aControlList.erase(it);
pActiveCtrl->Hide();
- delete pActiveCtrl;
+ pActiveCtrl.clear();
SetActiveControl(pLeftEdit);
AdjustPositions();
@@ -3541,6 +3657,11 @@ SwTOXStylesTabPage::~SwTOXStylesTabPage()
void SwTOXStylesTabPage::dispose()
{
delete m_pCurrentForm;
+ m_pLevelLB.clear();
+ m_pAssignBT.clear();
+ m_pParaLayLB.clear();
+ m_pStdBT.clear();
+ m_pEditStyleBT.clear();
SfxTabPage::dispose();
}
@@ -4095,7 +4216,8 @@ SwAutoMarkDlg_Impl::~SwAutoMarkDlg_Impl()
void SwAutoMarkDlg_Impl::dispose()
{
- delete m_pEntriesBB;
+ m_pEntriesBB.clear();
+ m_pOKPB.clear();
ModalDialog::dispose();
}
diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx
index 7fe0e656888e..5d1dfa03fbee 100644
--- a/sw/source/ui/index/multmrk.cxx
+++ b/sw/source/ui/index/multmrk.cxx
@@ -61,6 +61,17 @@ void SwMultiTOXMarkDlg::Apply()
rMgr.SetCurTOXMark(nPos);
}
-SwMultiTOXMarkDlg::~SwMultiTOXMarkDlg() {}
+SwMultiTOXMarkDlg::~SwMultiTOXMarkDlg()
+{
+ dispose();
+}
+
+void SwMultiTOXMarkDlg::dispose()
+{
+ m_pTextFT.clear();
+ m_pTOXLB.clear();
+ SvxStandardDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 9a5f7985b783..75e48ab27b8a 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -546,8 +546,8 @@ void SwIndexMarkPane::UpdateKeyBoxes()
class SwNewUserIdxDlg : public ModalDialog
{
- OKButton* m_pOKPB;
- Edit* m_pNameED;
+ VclPtr<OKButton> m_pOKPB;
+ VclPtr<Edit> m_pNameED;
SwIndexMarkPane* m_pDlg;
@@ -565,6 +565,13 @@ class SwNewUserIdxDlg : public ModalDialog
m_pOKPB->Enable(false);
m_pNameED->GrabFocus();
}
+ virtual ~SwNewUserIdxDlg() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ m_pOKPB.clear();
+ m_pNameED.clear();
+ ModalDialog::dispose();
+ }
OUString GetName(){return m_pNameED->GetText();}
};
@@ -982,12 +989,12 @@ void SwIndexMarkModalDlg::Apply()
class SwCreateAuthEntryDlg_Impl : public ModalDialog
{
- FixedText* pFixedTexts[AUTH_FIELD_END];
- ListBox* pTypeListBox;
- ComboBox* pIdentifierBox;
- Edit* pEdits[AUTH_FIELD_END];
+ VclPtr<FixedText> pFixedTexts[AUTH_FIELD_END];
+ VclPtr<ListBox> pTypeListBox;
+ VclPtr<ComboBox> pIdentifierBox;
+ VclPtr<Edit> pEdits[AUTH_FIELD_END];
- OKButton* m_pOKBT;
+ VclPtr<OKButton> m_pOKBT;
Link aShortNameCheckLink;
@@ -1527,11 +1534,12 @@ void SwCreateAuthEntryDlg_Impl::dispose()
{
for(int i = 0; i < AUTH_FIELD_END; i++)
{
- delete pFixedTexts[i];
- delete pEdits[i];
+ pFixedTexts[i].clear();
+ pEdits[i].clear();
}
- delete pTypeListBox;
- delete pIdentifierBox;
+ pTypeListBox.clear();
+ pIdentifierBox.clear();
+ m_pOKBT.clear();
ModalDialog::dispose();
}
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 59576289d831..13bc3e733168 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -147,6 +147,15 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rS,
SwInsertBookmarkDlg::~SwInsertBookmarkDlg()
{
+ dispose();
+}
+
+void SwInsertBookmarkDlg::dispose()
+{
+ m_pBookmarkBox.clear();
+ m_pOkBtn.clear();
+ m_pDeleteBtn.clear();
+ SvxStandardDialog::dispose();
}
BookmarkCombo::BookmarkCombo(vcl::Window* pWin, WinBits nStyle)
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 15cfb9493333..49bd6c9e0624 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -117,6 +117,33 @@ SwEndNoteOptionPage::SwEndNoteOptionPage(vcl::Window *pParent, bool bEN,
get(m_pFtnCharTextTemplBox, "charstylelb");
}
+SwEndNoteOptionPage::~SwEndNoteOptionPage()
+{
+ dispose();
+}
+
+void SwEndNoteOptionPage::dispose()
+{
+ m_pNumViewBox.clear();
+ m_pOffsetLbl.clear();
+ m_pOffsetFld.clear();
+ m_pNumCountBox.clear();
+ m_pPrefixED.clear();
+ m_pSuffixED.clear();
+ m_pPosFT.clear();
+ m_pPosPageBox.clear();
+ m_pPosChapterBox.clear();
+ m_pStylesContainer.clear();
+ m_pParaTemplBox.clear();
+ m_pPageTemplLbl.clear();
+ m_pPageTemplBox.clear();
+ m_pFtnCharAnchorTemplBox.clear();
+ m_pFtnCharTextTemplBox.clear();
+ m_pContEdit.clear();
+ m_pContFromEdit.clear();
+ SfxTabPage::dispose();
+}
+
void SwEndNoteOptionPage::Reset( const SfxItemSet* )
{
boost::scoped_ptr<SwEndNoteInfo> pInf(bEndNote ? new SwEndNoteInfo( pSh->GetEndNoteInfo() )
@@ -219,10 +246,6 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet* )
m_pPageTemplBox->SelectEntry( pInf->GetPageDesc( *pSh->GetDoc() )->GetName());
}
-SwEndNoteOptionPage::~SwEndNoteOptionPage()
-{
-}
-
SfxTabPage *SwEndNoteOptionPage::Create( vcl::Window *pParent, const SfxItemSet *rSet )
{
return new SwEndNoteOptionPage( pParent, true, *rSet );
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index fcdec5ab38bf..26b2b9407202 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -112,6 +112,18 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(vcl::Window * pParent,
SwGlossaryGroupDlg::~SwGlossaryGroupDlg()
{
+ dispose();
+}
+
+void SwGlossaryGroupDlg::dispose()
+{
+ m_pNameED.clear();
+ m_pPathLB.clear();
+ m_pGroupTLB.clear();
+ m_pNewPB.clear();
+ m_pDelPB.clear();
+ m_pRenamePB.clear();
+ SvxStandardDialog::dispose();
}
void SwGlossaryGroupDlg::Apply()
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 47fb56870532..42f0b992a54c 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -115,12 +115,12 @@ struct GroupUserData
// dialog for new block name
class SwNewGlosNameDlg : public ModalDialog
{
- Edit* m_pNewName;
- TextFilter m_aNoSpaceFilter;
- Edit* m_pNewShort;
- OKButton* m_pOk;
- Edit* m_pOldName;
- Edit* m_pOldShort;
+ VclPtr<Edit> m_pNewName;
+ TextFilter m_aNoSpaceFilter;
+ VclPtr<Edit> m_pNewShort;
+ VclPtr<OKButton> m_pOk;
+ VclPtr<Edit> m_pOldName;
+ VclPtr<Edit> m_pOldShort;
protected:
DECL_LINK( Modify, Edit * );
@@ -130,6 +130,8 @@ public:
SwNewGlosNameDlg( vcl::Window* pParent,
const OUString& rOldName,
const OUString& rOldShort );
+ virtual ~SwNewGlosNameDlg();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetNewName() const { return m_pNewName->GetText(); }
OUString GetNewShort() const { return m_pNewShort->GetText(); }
@@ -156,6 +158,21 @@ SwNewGlosNameDlg::SwNewGlosNameDlg(vcl::Window* pParent,
m_pNewName->GrabFocus();
}
+SwNewGlosNameDlg::~SwNewGlosNameDlg()
+{
+ dispose();
+}
+
+void SwNewGlosNameDlg::dispose()
+{
+ m_pNewName.clear();
+ m_pNewShort.clear();
+ m_pOk.clear();
+ m_pOldName.clear();
+ m_pOldShort.clear();
+ ModalDialog::dispose();
+}
+
// query / set currently set group
OUString SwGlossaryDlg::GetCurrGroup()
{
@@ -239,6 +256,18 @@ void SwGlossaryDlg::dispose()
{
m_pCategoryBox->Clear();
delete pExampleFrame;
+ m_pInsertTipCB.clear();
+ m_pNameED.clear();
+ m_pShortNameLbl.clear();
+ m_pShortNameEdit.clear();
+ m_pCategoryBox.clear();
+ m_pFileRelCB.clear();
+ m_pNetRelCB.clear();
+ m_pExampleWIN.clear();
+ m_pInsertBtn.clear();
+ m_pEditBtn.clear();
+ m_pBibBtn.clear();
+ m_pPathBtn.clear();
SvxStandardDialog::dispose();
}
diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx
index f9808c4dc040..02f4c076bb05 100644
--- a/sw/source/ui/misc/impfnote.hxx
+++ b/sw/source/ui/misc/impfnote.hxx
@@ -30,27 +30,27 @@ class SwWrtShell;
class SwEndNoteOptionPage : public SfxTabPage
{
- SwNumberingTypeListBox* m_pNumViewBox;
- FixedText* m_pOffsetLbl;
- NumericField* m_pOffsetFld;
- ListBox* m_pNumCountBox;
- Edit* m_pPrefixED;
- Edit* m_pSuffixED;
- FixedText* m_pPosFT;
- RadioButton* m_pPosPageBox;
- RadioButton* m_pPosChapterBox;
+ VclPtr<SwNumberingTypeListBox> m_pNumViewBox;
+ VclPtr<FixedText> m_pOffsetLbl;
+ VclPtr<NumericField> m_pOffsetFld;
+ VclPtr<ListBox> m_pNumCountBox;
+ VclPtr<Edit> m_pPrefixED;
+ VclPtr<Edit> m_pSuffixED;
+ VclPtr<FixedText> m_pPosFT;
+ VclPtr<RadioButton> m_pPosPageBox;
+ VclPtr<RadioButton> m_pPosChapterBox;
- VclContainer *m_pStylesContainer;
+ VclPtr<VclContainer> m_pStylesContainer;
- ListBox* m_pParaTemplBox;
- FixedText* m_pPageTemplLbl;
- ListBox* m_pPageTemplBox;
+ VclPtr<ListBox> m_pParaTemplBox;
+ VclPtr<FixedText> m_pPageTemplLbl;
+ VclPtr<ListBox> m_pPageTemplBox;
- ListBox* m_pFtnCharAnchorTemplBox;
- ListBox* m_pFtnCharTextTemplBox;
+ VclPtr<ListBox> m_pFtnCharAnchorTemplBox;
+ VclPtr<ListBox> m_pFtnCharTextTemplBox;
- Edit* m_pContEdit;
- Edit* m_pContFromEdit;
+ VclPtr<Edit> m_pContEdit;
+ VclPtr<Edit> m_pContFromEdit;
OUString aNumDoc;
OUString aNumPage;
@@ -70,6 +70,7 @@ public:
SwEndNoteOptionPage( vcl::Window *pParent, bool bEndNote,
const SfxItemSet &rSet );
virtual ~SwEndNoteOptionPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index dd403bcb0b78..023db178128d 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -214,6 +214,16 @@ void SwInsFootNoteDlg::dispose()
if (bEdit)
rSh.ResetSelect(0, false);
+ m_pNumberFrame.clear();
+ m_pNumberAutoBtn.clear();
+ m_pNumberCharBtn.clear();
+ m_pNumberCharEdit.clear();
+ m_pNumberExtChar.clear();
+ m_pFtnBtn.clear();
+ m_pEndNoteBtn.clear();
+ m_pOkBtn.clear();
+ m_pPrevBT.clear();
+ m_pNextBT.clear();
SvxStandardDialog::dispose();
}
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index db98b1ce87b1..ee634066417d 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -169,8 +169,30 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw)
SwLineNumberingDlg::~SwLineNumberingDlg()
{
+ dispose();
}
+void SwLineNumberingDlg::dispose()
+{
+ m_pBodyContent.clear();
+ m_pDivIntervalFT.clear();
+ m_pDivIntervalNF.clear();
+ m_pDivRowsFT.clear();
+ m_pNumIntervalNF.clear();
+ m_pCharStyleLB.clear();
+ m_pFormatLB.clear();
+ m_pPosLB.clear();
+ m_pOffsetMF.clear();
+ m_pDivisorED.clear();
+ m_pCountEmptyLinesCB.clear();
+ m_pCountFrameLinesCB.clear();
+ m_pRestartEachPageCB.clear();
+ m_pNumberingOnCB.clear();
+ m_pNumberingOnFooterHeader.clear();
+ SfxModalDialog::dispose();
+}
+
+
IMPL_LINK_NOARG(SwLineNumberingDlg, OKHdl)
{
SwLineNumberInfo aInf(pSh->GetLineNumberInfo());
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 65543804b845..69d7d24f605e 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -169,6 +169,30 @@ SwNumPositionTabPage::~SwNumPositionTabPage()
void SwNumPositionTabPage::dispose()
{
delete pActNum;
+ m_pLevelLB.clear();
+ m_pPositionFrame.clear();
+ m_pDistBorderFT.clear();
+ m_pDistBorderMF.clear();
+ m_pRelativeCB.clear();
+ m_pIndentFT.clear();
+ m_pIndentMF.clear();
+ m_pDistNumFT.clear();
+ m_pDistNumMF.clear();
+ m_pAlignFT.clear();
+ m_pAlignLB.clear();
+ m_pLabelFollowedByFT.clear();
+ m_pLabelFollowedByLB.clear();
+ m_pListtabFT.clear();
+ m_pListtabMF.clear();
+ m_pAlign2FT.clear();
+ m_pAlign2LB.clear();
+ m_pAlignedAtFT.clear();
+ m_pAlignedAtMF.clear();
+ m_pIndentAtFT.clear();
+ m_pIndentAtMF.clear();
+ m_pStandardPB.clear();
+ m_pPreviewWIN.clear();
+ pOutlineDlg.clear();
SfxTabPage::dispose();
}
@@ -181,9 +205,9 @@ void SwNumPositionTabPage::InitControls()
USHRT_MAX != nActNumLvl;
m_pDistBorderMF->Enable( !bLabelAlignmentPosAndSpaceModeActive &&
- ( bSingleSelection || bRelative || pOutlineDlg != 0 ) );
+ ( bSingleSelection || bRelative || pOutlineDlg.get() != 0 ) );
m_pDistBorderFT->Enable( !bLabelAlignmentPosAndSpaceModeActive &&
- ( bSingleSelection || bRelative || pOutlineDlg != 0 ) );
+ ( bSingleSelection || bRelative || pOutlineDlg.get() != 0 ) );
bool bSetDistEmpty = false;
bool bSameDistBorderNum = !bLabelAlignmentPosAndSpaceModeActive;
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 0230c94e4e2e..c4216d09eab1 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -60,9 +60,9 @@ using namespace ::com::sun::star;
class SwNumNamesDlg : public ModalDialog
{
- Edit* m_pFormEdit;
- ListBox* m_pFormBox;
- OKButton* m_pOKBtn;
+ VclPtr<Edit> m_pFormEdit;
+ VclPtr<ListBox> m_pFormBox;
+ VclPtr<OKButton> m_pOKBtn;
DECL_LINK( ModifyHdl, Edit * );
DECL_LINK( SelectHdl, ListBox * );
@@ -70,11 +70,27 @@ class SwNumNamesDlg : public ModalDialog
public:
SwNumNamesDlg(vcl::Window *pParent);
+ virtual ~SwNumNamesDlg();
+ virtual void dispose() SAL_OVERRIDE;
void SetUserNames(const OUString *pList[]);
OUString GetName() const { return m_pFormEdit->GetText(); }
sal_Int32 GetCurEntryPos() const { return m_pFormBox->GetSelectEntryPos(); }
};
+SwNumNamesDlg::~SwNumNamesDlg()
+{
+ dispose();
+}
+
+void SwNumNamesDlg::dispose()
+{
+ m_pFormEdit.clear();
+ m_pFormBox.clear();
+ m_pOKBtn.clear();
+ ModalDialog::dispose();
+}
+
+
// remember selected entry
IMPL_LINK_INLINE_START( SwNumNamesDlg, SelectHdl, ListBox *, pBox )
{
@@ -746,8 +762,25 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFmtHdl)
SwOutlineSettingsTabPage::~SwOutlineSettingsTabPage()
{
+ dispose();
+}
+
+void SwOutlineSettingsTabPage::dispose()
+{
+ m_pLevelLB.clear();
+ m_pCollBox.clear();
+ m_pNumberBox.clear();
+ m_pCharFmtLB.clear();
+ m_pAllLevelFT.clear();
+ m_pAllLevelNF.clear();
+ m_pPrefixED.clear();
+ m_pSuffixED.clear();
+ m_pStartEdit.clear();
+ m_pPreviewWIN.clear();
+ SfxTabPage::dispose();
}
+
void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
{
pSh = pShell;
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 68e6d1a1d510..cd75060e3e82 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -135,8 +135,25 @@ SwFootNotePage::SwFootNotePage(vcl::Window *pParent, const SfxItemSet &rSet)
SwFootNotePage::~SwFootNotePage()
{
+ dispose();
}
+void SwFootNotePage::dispose()
+{
+ m_pMaxHeightPageBtn.clear();
+ m_pMaxHeightBtn.clear();
+ m_pMaxHeightEdit.clear();
+ m_pDistEdit.clear();
+ m_pLinePosBox.clear();
+ m_pLineTypeBox.clear();
+ m_pLineWidthEdit.clear();
+ m_pLineColorBox.clear();
+ m_pLineLengthEdit.clear();
+ m_pLineDistEdit.clear();
+ SfxTabPage::dispose();
+}
+
+
SfxTabPage* SwFootNotePage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
return new SwFootNotePage(pParent, *rSet);
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 76ab9a1c80a9..0ff7f97a51ac 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -151,6 +151,33 @@ SwTextGridPage::SwTextGridPage(vcl::Window *pParent, const SfxItemSet &rSet) :
SwTextGridPage::~SwTextGridPage()
{
+ dispose();
+}
+
+void SwTextGridPage::dispose()
+{
+ m_pNoGridRB.clear();
+ m_pLinesGridRB.clear();
+ m_pCharsGridRB.clear();
+ m_pSnapToCharsCB.clear();
+ m_pExampleWN.clear();
+ m_pLayoutFL.clear();
+ m_pLinesPerPageNF.clear();
+ m_pLinesRangeFT.clear();
+ m_pTextSizeMF.clear();
+ m_pCharsPerLineFT.clear();
+ m_pCharsPerLineNF.clear();
+ m_pCharsRangeFT.clear();
+ m_pCharWidthFT.clear();
+ m_pCharWidthMF.clear();
+ m_pRubySizeFT.clear();
+ m_pRubySizeMF.clear();
+ m_pRubyBelowCB.clear();
+ m_pDisplayFL.clear();
+ m_pDisplayCB.clear();
+ m_pPrintCB.clear();
+ m_pColorLB.clear();
+ SfxTabPage::dispose();
}
SfxTabPage *SwTextGridPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
@@ -460,7 +487,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField)
IMPL_LINK(SwTextGridPage, GridTypeHdl, RadioButton*, pButton)
{
- bool bEnable = m_pNoGridRB != pButton;
+ bool bEnable = m_pNoGridRB.get() != pButton;
m_pLayoutFL->Enable(bEnable);
m_pDisplayFL->Enable(bEnable);
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index 90904c54bc06..1b947836bced 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -259,6 +259,31 @@ void SwSortDlg::dispose()
::lcl_ClearLstBoxAndDelUserData(*m_pTypDLB2);
::lcl_ClearLstBoxAndDelUserData(*m_pTypDLB3);
delete pColRes;
+ m_pColLbl.clear();
+ m_pTypLbl.clear();
+ m_pKeyCB1.clear();
+ m_pColEdt1.clear();
+ m_pTypDLB1.clear();
+ m_pSortUp1RB.clear();
+ m_pSortDn1RB.clear();
+ m_pKeyCB2.clear();
+ m_pColEdt2.clear();
+ m_pTypDLB2.clear();
+ m_pSortUp2RB.clear();
+ m_pSortDn2RB.clear();
+ m_pKeyCB3.clear();
+ m_pColEdt3.clear();
+ m_pTypDLB3.clear();
+ m_pSortUp3RB.clear();
+ m_pSortDn3RB.clear();
+ m_pColumnRB.clear();
+ m_pRowRB.clear();
+ m_pDelimTabRB.clear();
+ m_pDelimFreeRB.clear();
+ m_pDelimEdt.clear();
+ m_pDelimPB.clear();
+ m_pLangLB.clear();
+ m_pCaseCB.clear();
SvxStandardDialog::dispose();
}
@@ -387,7 +412,8 @@ IMPL_LINK_NOARG(SwSortDlg, DelimCharHdl)
IMPL_LINK( SwSortDlg, CheckHdl, void *, pControl )
{
- if( pControl == m_pRowRB)
+ if( pControl == m_pRowRB.get())
+r
{
m_pColLbl->SetText(aColTxt);
m_pColEdt1->SetMax(nY);
@@ -398,7 +424,7 @@ IMPL_LINK( SwSortDlg, CheckHdl, void *, pControl )
m_pColEdt2->SetAccessibleName(aColTxt);
m_pColEdt3->SetAccessibleName(aColTxt);
}
- else if( pControl == m_pColumnRB)
+ else if( pControl == m_pColumnRB.get())
{
m_pColLbl->SetText(aRowTxt);
m_pColEdt1->SetMax(nX);
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 76fe927955f8..da0a0d42e712 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -276,6 +276,18 @@ SwTitlePageDlg::~SwTitlePageDlg()
void SwTitlePageDlg::dispose()
{
delete mpPageFmtDesc;
+ m_pUseExistingPagesRB.clear();
+ m_pPageCountNF.clear();
+ m_pDocumentStartRB.clear();
+ m_pPageStartRB.clear();
+ m_pPageStartNF.clear();
+ m_pRestartNumberingCB.clear();
+ m_pRestartNumberingNF.clear();
+ m_pSetPageNumberCB.clear();
+ m_pSetPageNumberNF.clear();
+ m_pPagePropertiesLB.clear();
+ m_pPagePropertiesPB.clear();
+ m_pOkPB.clear();
SfxModalDialog::dispose();
}
diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx
index 751b5a4c029d..b7a212bf6891 100644
--- a/sw/source/ui/table/colwd.cxx
+++ b/sw/source/ui/table/colwd.cxx
@@ -66,6 +66,18 @@ SwTableWidthDlg::SwTableWidthDlg(vcl::Window *pParent, SwTableFUNC &rTableFnc )
LoseFocusHdl();
}
+SwTableWidthDlg::~SwTableWidthDlg()
+{
+ dispose();
+}
+
+void SwTableWidthDlg::dispose()
+{
+ m_pColNF.clear();
+ m_pWidthMF.clear();
+ SvxStandardDialog::dispose();
+}
+
void SwTableWidthDlg::Apply()
{
rFnc.InitTabCols();
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 5d0567df4ed0..907b6cdc8d39 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -180,6 +180,20 @@ SwConvertTableDlg:: ~SwConvertTableDlg()
void SwConvertTableDlg::dispose()
{
delete pTAutoFmt;
+ mpTabBtn.clear();
+ mpSemiBtn.clear();
+ mpParaBtn.clear();
+ mpOtherBtn.clear();
+ mpOtherEd.clear();
+ mpKeepColumn.clear();
+ mpOptions.clear();
+ mpHeaderCB.clear();
+ mpRepeatHeaderCB.clear();
+ mpRepeatRows.clear();
+ mpRepeatHeaderNF.clear();
+ mpDontSplitCB.clear();
+ mpBorderCB.clear();
+ mpAutoFmtBtn.clear();
SfxModalDialog::dispose();
}
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index 817667f020d9..d4f9d3a23dfb 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -143,6 +143,17 @@ SwInsTableDlg::~SwInsTableDlg()
void SwInsTableDlg::dispose()
{
delete pTAutoFmt;
+ m_pNameEdit.clear();
+ m_pColNF.clear();
+ m_pRowNF.clear();
+ m_pHeaderCB.clear();
+ m_pRepeatHeaderCB.clear();
+ m_pRepeatHeaderNF.clear();
+ m_pRepeatGroup.clear();
+ m_pDontSplitCB.clear();
+ m_pBorderCB.clear();
+ m_pInsertBtn.clear();
+ m_pAutoFmtBtn.clear();
SfxModalDialog::dispose();
}
diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx
index 6c1dd9449336..6e687b7658ce 100644
--- a/sw/source/ui/table/mergetbl.cxx
+++ b/sw/source/ui/table/mergetbl.cxx
@@ -28,6 +28,18 @@ SwMergeTblDlg::SwMergeTblDlg( vcl::Window *pParent, bool& rWithPrev )
m_pMergePrevRB->Check();
}
+SwMergeTblDlg::~SwMergeTblDlg()
+{
+ dispose();
+}
+
+void SwMergeTblDlg::dispose()
+{
+ m_pMergePrevRB.clear();
+ SvxStandardDialog::dispose();
+}
+
+
void SwMergeTblDlg::Apply()
{
m_rMergePrev = m_pMergePrevRB->IsChecked();
diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx
index f745f3f9356d..70cc897d4280 100644
--- a/sw/source/ui/table/rowht.cxx
+++ b/sw/source/ui/table/rowht.cxx
@@ -75,4 +75,16 @@ SwTableHeightDlg::SwTableHeightDlg(vcl::Window *pParent, SwWrtShell &rS)
}
}
+SwTableHeightDlg::~SwTableHeightDlg()
+{
+ dispose();
+}
+
+void SwTableHeightDlg::dispose()
+{
+ m_pHeightEdit.clear();
+ m_pAutoHeightCB.clear();
+ SvxStandardDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/splittbl.cxx b/sw/source/ui/table/splittbl.cxx
index d6d7b62ca16b..7fab28173baf 100644
--- a/sw/source/ui/table/splittbl.cxx
+++ b/sw/source/ui/table/splittbl.cxx
@@ -33,6 +33,20 @@ SwSplitTblDlg::SwSplitTblDlg( vcl::Window *pParent, SwWrtShell &rSh )
get(mpBorderCopyRB, "noheading");
}
+SwSplitTblDlg::~SwSplitTblDlg()
+{
+ dispose();
+}
+
+void SwSplitTblDlg::dispose()
+{
+ mpCntntCopyRB.clear();
+ mpBoxAttrCopyWithParaRB.clear();
+ mpBoxAttrCopyNoParaRB.clear();
+ mpBorderCopyRB.clear();
+ SvxStandardDialog::dispose();
+}
+
void SwSplitTblDlg::Apply()
{
m_nSplit = HEADLINE_CNTNTCOPY;
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 0f4930909dec..b3d529ce14a8 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -105,6 +105,32 @@ SwFormatTablePage::SwFormatTablePage(vcl::Window* pParent, const SfxItemSet& rSe
Init();
}
+SwFormatTablePage::~SwFormatTablePage()
+{
+ dispose();
+}
+
+void SwFormatTablePage::dispose()
+{
+ m_pNameED.clear();
+ m_pWidthFT.clear();
+ m_pRelWidthCB.clear();
+ m_pFullBtn.clear();
+ m_pLeftBtn.clear();
+ m_pFromLeftBtn.clear();
+ m_pRightBtn.clear();
+ m_pCenterBtn.clear();
+ m_pFreeBtn.clear();
+ m_pLeftFT.clear();
+ m_pRightFT.clear();
+ m_pTopFT.clear();
+ m_pTopMF.clear();
+ m_pBottomFT.clear();
+ m_pBottomMF.clear();
+ m_pTextDirectionLB.clear();
+ SfxTabPage::dispose();
+}
+
void SwFormatTablePage::Init()
{
m_aLeftMF.SetMetricFieldMin(-999999);
@@ -749,9 +775,22 @@ SwTableColumnPage::SwTableColumnPage(vcl::Window* pParent, const SfxItemSet& rSe
&& static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON));
}
-//Description: Page column configuration
- SwTableColumnPage::~SwTableColumnPage()
+SwTableColumnPage::~SwTableColumnPage()
{
+ dispose();
+}
+
+void SwTableColumnPage::dispose()
+{
+ m_pModifyTableCB.clear();
+ m_pProportionalCB.clear();
+ m_pSpaceFT.clear();
+ m_pSpaceED.clear();
+ m_pUpBtn.clear();
+ m_pDownBtn.clear();
+ for (auto p : m_pTextArr)
+ p.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* SwTableColumnPage::Create( vcl::Window* pParent,
@@ -832,7 +871,7 @@ void SwTableColumnPage::Init(bool bWeb)
IMPL_LINK( SwTableColumnPage, AutoClickHdl, void *, pControl )
{
//move display window
- if(pControl == m_pDownBtn)
+ if(pControl == m_pDownBtn.get())
{
if(aValueTbl[0] > 0)
{
@@ -840,7 +879,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, void *, pControl )
aValueTbl[i] -= 1;
}
}
- if (pControl == m_pUpBtn)
+ if (pControl == m_pUpBtn.get())
{
if( aValueTbl[ MET_FIELDS -1 ] < nNoOfVisibleCols -1 )
{
@@ -1311,8 +1350,31 @@ SwTextFlowPage::SwTextFlowPage(vcl::Window* pParent, const SfxItemSet& rSet)
HeadLineCBClickHdl();
}
- SwTextFlowPage::~SwTextFlowPage()
+SwTextFlowPage::~SwTextFlowPage()
+{
+ dispose();
+}
+
+void SwTextFlowPage::dispose()
{
+ m_pPgBrkCB.clear();
+ m_pPgBrkRB.clear();
+ m_pColBrkRB.clear();
+ m_pPgBrkBeforeRB.clear();
+ m_pPgBrkAfterRB.clear();
+ m_pPageCollCB.clear();
+ m_pPageCollLB.clear();
+ m_pPageNoFT.clear();
+ m_pPageNoNF.clear();
+ m_pSplitCB.clear();
+ m_pSplitRowCB.clear();
+ m_pKeepCB.clear();
+ m_pHeadLineCB.clear();
+ m_pRepeatHeaderNF.clear();
+ m_pRepeatHeaderCombo.clear();
+ m_pTextDirectionLB.clear();
+ m_pVertOrientLB.clear();
+ SfxTabPage::dispose();
}
SfxTabPage* SwTextFlowPage::Create( vcl::Window* pParent,
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 49107998bec0..7ddf9351d0d7 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -106,11 +106,12 @@ public:
const OUString& rEditTitle,
const OUString& rDefault );
virtual ~SwStringInputDlg();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetInputString() const;
private:
- Edit* m_pEdInput; // Edit obtains the focus.
+ VclPtr<Edit> m_pEdInput; // Edit obtains the focus.
};
SwStringInputDlg::SwStringInputDlg(vcl::Window* pParent, const OUString& rTitle,
@@ -131,6 +132,13 @@ OUString SwStringInputDlg::GetInputString() const
SwStringInputDlg::~SwStringInputDlg()
{
+ dispose();
+}
+
+void SwStringInputDlg::dispose()
+{
+ m_pEdInput.clear();
+ ModalDialog::dispose();
}
// AutoFormat-Dialogue:
@@ -183,6 +191,19 @@ void SwAutoFormatDlg::dispose()
if (bCoreDataChanged)
pTableTbl->Save();
delete pTableTbl;
+ m_pLbFormat.clear();
+ m_pFormatting.clear();
+ m_pBtnNumFormat.clear();
+ m_pBtnBorder.clear();
+ m_pBtnFont.clear();
+ m_pBtnPattern.clear();
+ m_pBtnAlignment.clear();
+ m_pBtnOk.clear();
+ m_pBtnCancel.clear();
+ m_pBtnAdd.clear();
+ m_pBtnRemove.clear();
+ m_pBtnRename.clear();
+ m_pWndPreview.clear();
SfxModalDialog::dispose();
}
diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx
index 15902b8a076a..34aae676751f 100644
--- a/sw/source/ui/utlui/swrenamexnameddlg.cxx
+++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx
@@ -74,6 +74,18 @@ SwRenameXNamedDlg::SwRenameXNamedDlg( vcl::Window* pWin,
m_pOk->Enable(false);
}
+SwRenameXNamedDlg::~SwRenameXNamedDlg()
+{
+ dispose();
+}
+
+void SwRenameXNamedDlg::dispose()
+{
+ m_pNewNameED.clear();
+ m_pOk.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK_NOARG(SwRenameXNamedDlg, OkHdl)
{
try
diff --git a/sw/source/uibase/dbui/dbui.cxx b/sw/source/uibase/dbui/dbui.cxx
index fd94b2818d49..b768d117527f 100644
--- a/sw/source/uibase/dbui/dbui.cxx
+++ b/sw/source/uibase/dbui/dbui.cxx
@@ -42,6 +42,20 @@ PrintMonitor::PrintMonitor(vcl::Window *pParent, bool modal, PrintMonitorType eT
m_pPrinting->Show();
}
+PrintMonitor::~PrintMonitor()
+{
+ dispose();
+}
+
+void PrintMonitor::dispose()
+{
+ m_pDocName.clear();
+ m_pPrinting.clear();
+ m_pPrinter.clear();
+ m_pPrintInfo.clear();
+ CancelableModelessDialog::dispose();
+}
+
// Progress Indicator for Creation of personalized Mail Merge documents:
CreateMonitor::CreateMonitor( vcl::Window *pParent, bool modal )
: CancelableDialog(pParent, modal, "MMCreatingDialog",
@@ -57,6 +71,18 @@ CreateMonitor::CreateMonitor( vcl::Window *pParent, bool modal )
m_pCounting->SetText("...");
}
+CreateMonitor::~CreateMonitor()
+{
+ dispose();
+}
+
+void CreateMonitor::dispose()
+{
+ m_pCancelButton.clear();
+ m_pCounting.clear();
+ CancelableModelessDialog::dispose();
+}
+
void CreateMonitor::UpdateCountingText()
{
OUString sText(m_sCountingPattern);
@@ -88,7 +114,14 @@ CancelableDialog::CancelableDialog( vcl::Window *pParent, bool modal,
CancelableDialog::~CancelableDialog()
{
+ dispose();
+}
+
+void CancelableDialog::dispose()
+{
EndDialog( 0 );
+ m_pCancelButton.clear();
+ ModelessDialog::dispose();
}
void CancelableDialog::SetCancelHdl( const Link& rLink )
diff --git a/sw/source/uibase/dbui/mailmergechildwindow.cxx b/sw/source/uibase/dbui/mailmergechildwindow.cxx
index e43731b1e399..df756fb7be3a 100644
--- a/sw/source/uibase/dbui/mailmergechildwindow.cxx
+++ b/sw/source/uibase/dbui/mailmergechildwindow.cxx
@@ -59,7 +59,7 @@ SwMailMergeChildWindow::SwMailMergeChildWindow( vcl::Window* _pParent,
pInfo->aSize = pWindow->GetSizePixel();
}
- static_cast<SwMailMergeChildWin *>(pWindow)->Initialize(pInfo);
+ static_cast<SwMailMergeChildWin *>(pWindow.get())->Initialize(pInfo);
pWindow->Show();
}
@@ -73,6 +73,17 @@ SwMailMergeChildWin::SwMailMergeChildWin(SfxBindings* _pBindings,
m_pBackTB->SetButtonType( ButtonType::SYMBOLTEXT );
}
+SwMailMergeChildWin::~SwMailMergeChildWin()
+{
+ dispose();
+}
+
+void SwMailMergeChildWin::dispose()
+{
+ m_pBackTB.clear();
+ SfxFloatingWindow::dispose();
+}
+
IMPL_LINK_NOARG(SwMailMergeChildWin, BackHdl)
{
GetBindings().GetDispatcher()->Execute(FN_MAILMERGE_WIZARD, SfxCallMode::ASYNCHRON);
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index 5474731df15d..12d958655b91 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -175,7 +175,7 @@ SwHeaderFooterWin::~SwHeaderFooterWin( )
void SwHeaderFooterWin::dispose()
{
delete m_pPopupMenu;
- delete m_pLine;
+ m_pLine.clear();
MenuButton::dispose();
}
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx
index 01d95bab3a76..b8e459dcf2ce 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -56,12 +56,14 @@ namespace
class SwBreakDashedLine : public SwDashedLine
{
private:
- SwPageBreakWin* m_pWin;
+ VclPtr<SwPageBreakWin> m_pWin;
public:
SwBreakDashedLine( vcl::Window* pParent, Color& ( *pColorFn )(), SwPageBreakWin* pWin ) :
SwDashedLine( pParent, pColorFn ),
m_pWin( pWin ) {};
+ virtual ~SwBreakDashedLine() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE { m_pWin.clear(); SwDashedLine::dispose(); }
virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
};
@@ -124,13 +126,12 @@ void SwPageBreakWin::dispose()
m_bDestroyed = true;
m_aFadeTimer.Stop();
- delete m_pLine;
- m_pLine = NULL;
delete m_pPopupMenu;
m_pPopupMenu = NULL;
delete m_pMousePt;
m_pMousePt = NULL;
+ m_pLine.clear();
MenuButton::dispose();
}
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 85834017931d..b16c1c6d41b6 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -193,8 +193,6 @@ void SwPostItMgr::CheckForRemovedPostIts()
mvPostItFlds.remove(*it);
if (GetActiveSidebarWin() == p->pPostIt)
SetActiveSidebarWin(0);
- if (p->pPostIt)
- delete p->pPostIt;
delete p;
bRemoved = true;
}
@@ -244,7 +242,6 @@ void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast )
if (GetActiveSidebarWin() == p->pPostIt)
SetActiveSidebarWin(0);
mvPostItFlds.erase(i);
- delete p->pPostIt;
delete p;
break;
}
@@ -1177,8 +1174,6 @@ void SwPostItMgr::RemoveSidebarWin()
for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i)
{
EndListening( *(const_cast<SfxBroadcaster*>((*i)->GetBroadCaster())) );
- if ((*i)->pPostIt)
- delete (*i)->pPostIt;
delete (*i);
}
mvPostItFlds.clear();
@@ -1497,7 +1492,7 @@ sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItFie
for(const_iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i)
{
if ( (*i)->GetFmtFld().GetField() == pFld )
- return dynamic_cast<sw::annotation::SwAnnotationWin*>((*i)->pPostIt);
+ return dynamic_cast<sw::annotation::SwAnnotationWin*>((*i)->pPostIt.get());
}
return NULL;
}
@@ -2030,13 +2025,13 @@ void SwPostItMgr::AssureStdModeAtShell()
bool SwPostItMgr::HasActiveSidebarWin() const
{
- return mpActivePostIt != 0;
+ return mpActivePostIt != nullptr;
}
bool SwPostItMgr::HasActiveAnnotationWin() const
{
return HasActiveSidebarWin() &&
- dynamic_cast<sw::annotation::SwAnnotationWin*>(mpActivePostIt) != 0;
+ dynamic_cast<sw::annotation::SwAnnotationWin*>(mpActivePostIt.get()) != 0;
}
void SwPostItMgr::GrabFocusOnActiveSidebarWin()
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 21e6404427ba..4db2d5d8ab6f 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -156,9 +156,8 @@ void SwSidebarWin::dispose()
{
mpOutlinerView->SetWindow( 0 );
}
- delete mpSidebarTxtControl;
- mpSidebarTxtControl = 0;
}
+ mpSidebarTxtControl.clear();
if ( mpOutlinerView )
{
@@ -175,23 +174,20 @@ void SwSidebarWin::dispose()
if (mpMetadataAuthor)
{
mpMetadataAuthor->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
- delete mpMetadataAuthor;
- mpMetadataAuthor = 0;
}
+ mpMetadataAuthor.clear();
if (mpMetadataDate)
{
mpMetadataDate->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
- delete mpMetadataDate;
- mpMetadataDate = 0;
}
+ mpMetadataDate.clear();
if (mpVScrollbar)
{
mpVScrollbar->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
- delete mpVScrollbar;
- mpVScrollbar = 0;
}
+ mpVScrollbar.clear();
RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
@@ -204,8 +200,7 @@ void SwSidebarWin::dispose()
delete mpTextRangeOverlay;
mpTextRangeOverlay = NULL;
- delete mpMenuButton;
- mpMenuButton = 0;
+ mpMenuButton.clear();
if (mnEventId)
Application::RemoveUserEvent( mnEventId );
@@ -1380,7 +1375,7 @@ void SwSidebarWin::SetChangeTracking( const SwPostItHelper::SwLayoutStatus aLayo
bool SwSidebarWin::HasScrollbar() const
{
- return mpVScrollbar != 0;
+ return mpVScrollbar != nullptr;
}
bool SwSidebarWin::IsScrollbarVisible() const
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 013fb24355ce..0522f13caee1 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -289,13 +289,12 @@ void SwSrcEditWindow::dispose()
EndListening( *pTextEngine );
pTextEngine->RemoveView( pTextView );
- delete pHScrollbar;
- delete pVScrollbar;
-
delete pTextView;
delete pTextEngine;
}
- delete pOutWin;
+ pOutWin.clear();
+ pHScrollbar.clear();
+ pVScrollbar.clear();
vcl::Window::dispose();
}
diff --git a/sw/source/uibase/envelp/syncbtn.cxx b/sw/source/uibase/envelp/syncbtn.cxx
index a6b73da14126..361f2ba30989 100644
--- a/sw/source/uibase/envelp/syncbtn.cxx
+++ b/sw/source/uibase/envelp/syncbtn.cxx
@@ -53,7 +53,7 @@ SwSyncChildWin::SwSyncChildWin( vcl::Window* _pParent,
pInfo->aSize = pWindow->GetSizePixel();
}
- static_cast<SwSyncBtnDlg *>(pWindow)->Initialize(pInfo);
+ static_cast<SwSyncBtnDlg *>(pWindow.get())->Initialize(pInfo);
pWindow->Show();
}
@@ -68,6 +68,17 @@ SwSyncBtnDlg::SwSyncBtnDlg( SfxBindings* _pBindings,
Show();
}
+SwSyncBtnDlg::~SwSyncBtnDlg()
+{
+ dispose();
+}
+
+void SwSyncBtnDlg::dispose()
+{
+ m_pSyncBtn.clear();
+ SfxFloatingWindow::dispose();
+}
+
IMPL_LINK_NOARG(SwSyncBtnDlg, BtnHdl)
{
SfxViewFrame::Current()->GetDispatcher()->Execute(FN_UPDATE_ALL_LINKS, SfxCallMode::ASYNCHRON);
diff --git a/sw/source/uibase/inc/DropDownFieldDialog.hxx b/sw/source/uibase/inc/DropDownFieldDialog.hxx
index 19c42cf7dbfc..a7ef05f126f1 100644
--- a/sw/source/uibase/inc/DropDownFieldDialog.hxx
+++ b/sw/source/uibase/inc/DropDownFieldDialog.hxx
@@ -33,12 +33,12 @@ namespace sw
{
class DropDownFieldDialog : public SvxStandardDialog
{
- ListBox* m_pListItemsLB;
+ VclPtr<ListBox> m_pListItemsLB;
- OKButton* m_pOKPB;
- PushButton* m_pNextPB;
+ VclPtr<OKButton> m_pOKPB;
+ VclPtr<PushButton> m_pNextPB;
- PushButton* m_pEditPB;
+ VclPtr<PushButton> m_pEditPB;
SwWrtShell &rSh;
SwDropDownField* pDropField;
@@ -48,6 +48,8 @@ class DropDownFieldDialog : public SvxStandardDialog
public:
DropDownFieldDialog( vcl::Window *pParent, SwWrtShell &rSh,
SwField* pField, bool bNextButton = false );
+ virtual ~DropDownFieldDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
} //namespace sw
diff --git a/sw/source/uibase/inc/FrameControl.hxx b/sw/source/uibase/inc/FrameControl.hxx
index 0235084c4160..936be2a1cbc8 100644
--- a/sw/source/uibase/inc/FrameControl.hxx
+++ b/sw/source/uibase/inc/FrameControl.hxx
@@ -17,7 +17,7 @@ class Point;
*/
class SwFrameControl
{
- SwEditWin* m_pEditWin;
+ VclPtr<SwEditWin> m_pEditWin;
const SwFrm* m_pFrm;
public:
diff --git a/sw/source/uibase/inc/FrameControlsManager.hxx b/sw/source/uibase/inc/FrameControlsManager.hxx
index 42584a1c1da3..e87124b64be5 100644
--- a/sw/source/uibase/inc/FrameControlsManager.hxx
+++ b/sw/source/uibase/inc/FrameControlsManager.hxx
@@ -30,7 +30,7 @@ typedef std::map<const SwFrm*, SwFrameControlPtr> SwFrameControlPtrMap;
class SwFrameControlsManager
{
private:
- SwEditWin* m_pEditWin;
+ VclPtr<SwEditWin> m_pEditWin;
std::map< FrameControlType, SwFrameControlPtrMap > m_aControls;
public:
diff --git a/sw/source/uibase/inc/HeaderFooterWin.hxx b/sw/source/uibase/inc/HeaderFooterWin.hxx
index 78005bdb5777..32e30f5cc70b 100644
--- a/sw/source/uibase/inc/HeaderFooterWin.hxx
+++ b/sw/source/uibase/inc/HeaderFooterWin.hxx
@@ -20,10 +20,10 @@
*/
class SwHeaderFooterWin : public MenuButton, public SwFrameControl
{
- OUString m_sLabel;
+ OUString m_sLabel;
bool m_bIsHeader;
PopupMenu* m_pPopupMenu;
- vcl::Window* m_pLine;
+ VclPtr<vcl::Window> m_pLine;
bool m_bIsAppearing;
int m_nFadeRate;
Timer m_aFadeTimer;
diff --git a/sw/source/uibase/inc/PageBreakWin.hxx b/sw/source/uibase/inc/PageBreakWin.hxx
index 1c6987b5dec5..d1b048fbc1a3 100644
--- a/sw/source/uibase/inc/PageBreakWin.hxx
+++ b/sw/source/uibase/inc/PageBreakWin.hxx
@@ -23,7 +23,7 @@ class SwPageFrm;
class SwPageBreakWin : public MenuButton, public SwFrameControl
{
PopupMenu* m_pPopupMenu;
- vcl::Window* m_pLine;
+ VclPtr<vcl::Window> m_pLine;
bool m_bIsAppearing;
int m_nFadeRate;
int m_nDelayAppearing; ///< Before we show the control, let it transparent for a few timer ticks to avoid appearing with every mouse over.
diff --git a/sw/source/uibase/inc/abstract.hxx b/sw/source/uibase/inc/abstract.hxx
index 92443efa9d9d..0c12d35e1812 100644
--- a/sw/source/uibase/inc/abstract.hxx
+++ b/sw/source/uibase/inc/abstract.hxx
@@ -25,13 +25,13 @@
class SwInsertAbstractDlg : public SfxModalDialog
{
- NumericField* m_pLevelNF;
- NumericField* m_pParaNF;
-
-protected:
+ VclPtr<NumericField> m_pLevelNF;
+ VclPtr<NumericField> m_pParaNF;
public:
SwInsertAbstractDlg( vcl::Window* pParent );
+ virtual ~SwInsertAbstractDlg();
+ virtual void dispose() SAL_OVERRIDE;
sal_uInt8 GetLevel() const;
sal_uInt8 GetPara() const;
diff --git a/sw/source/uibase/inc/ascfldlg.hxx b/sw/source/uibase/inc/ascfldlg.hxx
index 827d5032bcbc..b7e693814c3c 100644
--- a/sw/source/uibase/inc/ascfldlg.hxx
+++ b/sw/source/uibase/inc/ascfldlg.hxx
@@ -32,14 +32,14 @@ class SwDocShell;
class SwAsciiFilterDlg : public SfxModalDialog
{
- SvxTextEncodingBox* m_pCharSetLB;
- FixedText* m_pFontFT;
- ListBox* m_pFontLB;
- FixedText* m_pLanguageFT;
- SvxLanguageBox* m_pLanguageLB;
- RadioButton* m_pCRLF_RB;
- RadioButton* m_pCR_RB;
- RadioButton* m_pLF_RB;
+ VclPtr<SvxTextEncodingBox> m_pCharSetLB;
+ VclPtr<FixedText> m_pFontFT;
+ VclPtr<ListBox> m_pFontLB;
+ VclPtr<FixedText> m_pLanguageFT;
+ VclPtr<SvxLanguageBox> m_pLanguageLB;
+ VclPtr<RadioButton> m_pCRLF_RB;
+ VclPtr<RadioButton> m_pCR_RB;
+ VclPtr<RadioButton> m_pLF_RB;
bool m_bSaveLineStatus;
DECL_LINK( CharSetSelHdl, SvxTextEncodingBox* );
@@ -53,6 +53,7 @@ public:
SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh,
SvStream* pStream );
virtual ~SwAsciiFilterDlg();
+ virtual void dispose() SAL_OVERRIDE;
void FillOptions( SwAsciiOptions& rOptions );
};
diff --git a/sw/source/uibase/inc/bookmark.hxx b/sw/source/uibase/inc/bookmark.hxx
index d64a08e69a8f..1185317191d6 100644
--- a/sw/source/uibase/inc/bookmark.hxx
+++ b/sw/source/uibase/inc/bookmark.hxx
@@ -47,9 +47,9 @@ public:
class SwInsertBookmarkDlg: public SvxStandardDialog
{
- BookmarkCombo* m_pBookmarkBox;
- OKButton* m_pOkBtn;
- PushButton* m_pDeleteBtn;
+ VclPtr<BookmarkCombo> m_pBookmarkBox;
+ VclPtr<OKButton> m_pOkBtn;
+ VclPtr<PushButton> m_pDeleteBtn;
OUString sRemoveWarning;
SwWrtShell &rSh;
@@ -63,6 +63,7 @@ class SwInsertBookmarkDlg: public SvxStandardDialog
public:
SwInsertBookmarkDlg(vcl::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq);
virtual ~SwInsertBookmarkDlg();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/uibase/inc/break.hxx b/sw/source/uibase/inc/break.hxx
index 55610b7dbe8c..85ce67b0ce26 100644
--- a/sw/source/uibase/inc/break.hxx
+++ b/sw/source/uibase/inc/break.hxx
@@ -37,13 +37,13 @@ class SwWrtShell;
class SwBreakDlg: public SvxStandardDialog
{
SwWrtShell &rSh;
- RadioButton* m_pLineBtn;
- RadioButton* m_pColumnBtn;
- RadioButton* m_pPageBtn;
- FixedText* m_pPageCollText;
- ListBox* m_pPageCollBox;
- CheckBox* m_pPageNumBox;
- NumericField* m_pPageNumEdit;
+ VclPtr<RadioButton> m_pLineBtn;
+ VclPtr<RadioButton> m_pColumnBtn;
+ VclPtr<RadioButton> m_pPageBtn;
+ VclPtr<FixedText> m_pPageCollText;
+ VclPtr<ListBox> m_pPageCollBox;
+ VclPtr<CheckBox> m_pPageNumBox;
+ VclPtr<NumericField> m_pPageNumEdit;
OUString aTemplate;
sal_uInt16 nKind;
@@ -64,6 +64,7 @@ protected:
public:
SwBreakDlg( vcl::Window *pParent, SwWrtShell &rSh );
virtual ~SwBreakDlg();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetTemplateName() { return aTemplate; }
sal_uInt16 GetKind() { return nKind; }
diff --git a/sw/source/uibase/inc/changedb.hxx b/sw/source/uibase/inc/changedb.hxx
index 558ea2f2d9e9..c10948bab9c2 100644
--- a/sw/source/uibase/inc/changedb.hxx
+++ b/sw/source/uibase/inc/changedb.hxx
@@ -35,11 +35,11 @@ struct SwDBData;
// exchange database at fields
class SwChangeDBDlg: public SvxStandardDialog
{
- SvTreeListBox* m_pUsedDBTLB;
- SwDBTreeList* m_pAvailDBTLB;
- PushButton* m_pAddDBPB;
- FixedText* m_pDocDBNameFT;
- PushButton* m_pDefineBT;
+ VclPtr<SvTreeListBox> m_pUsedDBTLB;
+ VclPtr<SwDBTreeList> m_pAvailDBTLB;
+ VclPtr<PushButton> m_pAddDBPB;
+ VclPtr<FixedText> m_pDocDBNameFT;
+ VclPtr<PushButton> m_pDefineBT;
ImageList aImageList;
diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx
index 27e394ce5529..66914be44690 100644
--- a/sw/source/uibase/inc/chrdlg.hxx
+++ b/sw/source/uibase/inc/chrdlg.hxx
@@ -59,17 +59,17 @@ public:
class SwCharURLPage : public SfxTabPage
{
- Edit* m_pURLED;
- FixedText* m_pTextFT;
- Edit* m_pTextED;
- Edit* m_pNameED;
- ComboBox* m_pTargetFrmLB;
- PushButton* m_pURLPB;
- PushButton* m_pEventPB;
- ListBox* m_pVisitedLB;
- ListBox* m_pNotVisitedLB;
-
- VclContainer* m_pCharStyleContainer;
+ VclPtr<Edit> m_pURLED;
+ VclPtr<FixedText> m_pTextFT;
+ VclPtr<Edit> m_pTextED;
+ VclPtr<Edit> m_pNameED;
+ VclPtr<ComboBox> m_pTargetFrmLB;
+ VclPtr<PushButton> m_pURLPB;
+ VclPtr<PushButton> m_pEventPB;
+ VclPtr<ListBox> m_pVisitedLB;
+ VclPtr<ListBox> m_pNotVisitedLB;
+
+ VclPtr<VclContainer> m_pCharStyleContainer;
SvxMacroItem* pINetItem;
bool bModified;
diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx
index 548784e3ee46..19d3f72dd20b 100644
--- a/sw/source/uibase/inc/column.hxx
+++ b/sw/source/uibase/inc/column.hxx
@@ -42,10 +42,10 @@ class SwColumnPage;
class SwColumnDlg : public SfxModalDialog
{
- ListBox* m_pApplyToLB;
+ VclPtr<ListBox> m_pApplyToLB;
SwWrtShell& rWrtShell;
- SwColumnPage* pTabPage;
+ VclPtr<SwColumnPage> pTabPage;
SfxItemSet* pPageSet;
SfxItemSet* pSectionSet;
SfxItemSet* pSelectionSet;
@@ -89,39 +89,39 @@ public:
// column dialog now as TabPage
class SwColumnPage : public SfxTabPage
{
- NumericField* m_pCLNrEdt;
- ColumnValueSet* m_pDefaultVS;
- CheckBox* m_pBalanceColsCB;
+ VclPtr<NumericField> m_pCLNrEdt;
+ VclPtr<ColumnValueSet> m_pDefaultVS;
+ VclPtr<CheckBox> m_pBalanceColsCB;
- PushButton* m_pBtnBack;
- FixedText* m_pLbl1;
+ VclPtr<PushButton> m_pBtnBack;
+ VclPtr<FixedText> m_pLbl1;
PercentField aEd1;
- FixedText* m_pLbl2;
+ VclPtr<FixedText> m_pLbl2;
PercentField aEd2;
- FixedText* m_pLbl3;
+ VclPtr<FixedText> m_pLbl3;
PercentField aEd3;
- PushButton* m_pBtnNext;
+ VclPtr<PushButton> m_pBtnNext;
PercentField aDistEd1;
PercentField aDistEd2;
- CheckBox* m_pAutoWidthBox;
-
- FixedText* m_pLineTypeLbl;
- LineListBox* m_pLineTypeDLB;
- FixedText* m_pLineWidthLbl;
- MetricField* m_pLineWidthEdit;
- FixedText* m_pLineColorLbl;
- ColorListBox* m_pLineColorDLB;
- FixedText* m_pLineHeightLbl;
- MetricField* m_pLineHeightEdit;
- FixedText* m_pLinePosLbl;
- ListBox* m_pLinePosDLB;
-
- FixedText* m_pTextDirectionFT;
- ListBox* m_pTextDirectionLB;
+ VclPtr<CheckBox> m_pAutoWidthBox;
+
+ VclPtr<FixedText> m_pLineTypeLbl;
+ VclPtr<LineListBox> m_pLineTypeDLB;
+ VclPtr<FixedText> m_pLineWidthLbl;
+ VclPtr<MetricField> m_pLineWidthEdit;
+ VclPtr<FixedText> m_pLineColorLbl;
+ VclPtr<ColorListBox> m_pLineColorDLB;
+ VclPtr<FixedText> m_pLineHeightLbl;
+ VclPtr<MetricField> m_pLineHeightEdit;
+ VclPtr<FixedText> m_pLinePosLbl;
+ VclPtr<ListBox> m_pLinePosDLB;
+
+ VclPtr<FixedText> m_pTextDirectionFT;
+ VclPtr<ListBox> m_pTextDirectionLB;
// Example
- SwColExample* m_pPgeExampleWN;
- SwColumnOnlyExample* m_pFrmExampleWN;
+ VclPtr<SwColExample> m_pPgeExampleWN;
+ VclPtr<SwColumnOnlyExample> m_pFrmExampleWN;
SwColMgr* pColMgr;
@@ -132,7 +132,7 @@ class SwColumnPage : public SfxTabPage
sal_uInt16 nMinWidth;
PercentField* pModifiedField;
- std::map<MetricField*, PercentField*> m_aPercentFieldsMap;
+ std::map<VclPtr<MetricField>, PercentField*> m_aPercentFieldsMap;
bool bFormat;
bool bFrm;
diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx
index 1d955ad5d851..18a69d987dcb 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -233,11 +233,11 @@ private:
ImageList aEntryImages;
SwWrtShell* pActiveShell;
- SvTreeListEntry* pEmphasisEntry; // Drag'n Drop emphasis
- SvTreeListEntry* pDDSource; // source for Drag'n Drop
+ SvTreeListEntry* pEmphasisEntry; // Drag'n Drop emphasis
+ SvTreeListEntry* pDDSource; // source for Drag'n Drop
SwGlblDocContents* pSwGlblDocContents; // array with sorted content
- vcl::Window* pDefParentWin;
+ VclPtr<vcl::Window> pDefParentWin;
SwGlblDocContent* pDocContent;
sfx2::DocumentInserter* pDocInserter;
diff --git a/sw/source/uibase/inc/convert.hxx b/sw/source/uibase/inc/convert.hxx
index 083103728c8c..1a52d8ba2c99 100644
--- a/sw/source/uibase/inc/convert.hxx
+++ b/sw/source/uibase/inc/convert.hxx
@@ -32,24 +32,24 @@ struct SwInsertTableOptions;
class SwConvertTableDlg: public SfxModalDialog
{
- RadioButton* mpTabBtn;
- RadioButton* mpSemiBtn;
- RadioButton* mpParaBtn;
- RadioButton* mpOtherBtn;
- Edit* mpOtherEd;
- CheckBox* mpKeepColumn;
+ VclPtr<RadioButton> mpTabBtn;
+ VclPtr<RadioButton> mpSemiBtn;
+ VclPtr<RadioButton> mpParaBtn;
+ VclPtr<RadioButton> mpOtherBtn;
+ VclPtr<Edit> mpOtherEd;
+ VclPtr<CheckBox> mpKeepColumn;
- VclContainer* mpOptions;
+ VclPtr<VclContainer> mpOptions;
- CheckBox* mpHeaderCB;
- CheckBox* mpRepeatHeaderCB;
+ VclPtr<CheckBox> mpHeaderCB;
+ VclPtr<CheckBox> mpRepeatHeaderCB;
- VclContainer* mpRepeatRows;
- NumericField* mpRepeatHeaderNF;
+ VclPtr<VclContainer> mpRepeatRows;
+ VclPtr<NumericField> mpRepeatHeaderNF;
- CheckBox* mpDontSplitCB;
- CheckBox* mpBorderCB;
- PushButton* mpAutoFmtBtn;
+ VclPtr<CheckBox> mpDontSplitCB;
+ VclPtr<CheckBox> mpBorderCB;
+ VclPtr<PushButton> mpAutoFmtBtn;
OUString sConvertTextTable;
SwTableAutoFmt* pTAutoFmt;
diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx
index 4fef9bbbabe9..5f99c2025360 100644
--- a/sw/source/uibase/inc/cption.hxx
+++ b/sw/source/uibase/inc/cption.hxx
@@ -63,24 +63,24 @@ public:
class SwCaptionDialog : public SvxStandardDialog
{
- Edit* m_pTextEdit;
- ComboBox* m_pCategoryBox;
+ VclPtr<Edit> m_pTextEdit;
+ VclPtr<ComboBox> m_pCategoryBox;
OUString m_sNone;
TextFilterAutoConvert m_aTextFilter;
- FixedText* m_pFormatText;
- ListBox* m_pFormatBox;
+ VclPtr<FixedText> m_pFormatText;
+ VclPtr<ListBox> m_pFormatBox;
//#i61007# order of captions
- FixedText* m_pNumberingSeparatorFT;
- Edit* m_pNumberingSeparatorED;
- FixedText* m_pSepText;
- Edit* m_pSepEdit;
- FixedText* m_pPosText;
- ListBox* m_pPosBox;
- OKButton* m_pOKButton;
- PushButton* m_pAutoCaptionButton;
- PushButton* m_pOptionButton;
-
- SwCaptionPreview* m_pPreview;
+ VclPtr<FixedText> m_pNumberingSeparatorFT;
+ VclPtr<Edit> m_pNumberingSeparatorED;
+ VclPtr<FixedText> m_pSepText;
+ VclPtr<Edit> m_pSepEdit;
+ VclPtr<FixedText> m_pPosText;
+ VclPtr<ListBox> m_pPosBox;
+ VclPtr<OKButton> m_pOKButton;
+ VclPtr<PushButton> m_pAutoCaptionButton;
+ VclPtr<PushButton> m_pOptionButton;
+
+ VclPtr<SwCaptionPreview> m_pPreview;
SwView &rView; // search per active, avoid View
SwFldMgr *pMgr; // pointer to save the include
diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx
index 4d6471536ff7..260a7fcc96e1 100644
--- a/sw/source/uibase/inc/dbinsdlg.hxx
+++ b/sw/source/uibase/inc/dbinsdlg.hxx
@@ -87,38 +87,38 @@ public:
class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem
{
- RadioButton* m_pRbAsTable;
- RadioButton* m_pRbAsField;
- RadioButton* m_pRbAsText;
+ VclPtr<RadioButton> m_pRbAsTable;
+ VclPtr<RadioButton> m_pRbAsField;
+ VclPtr<RadioButton> m_pRbAsText;
- VclFrame* m_pHeadFrame;
+ VclPtr<VclFrame> m_pHeadFrame;
- ListBox* m_pLbTblDbColumn;
- ListBox* m_pLbTxtDbColumn;
+ VclPtr<ListBox> m_pLbTblDbColumn;
+ VclPtr<ListBox> m_pLbTxtDbColumn;
- VclFrame* m_pFormatFrame;
- RadioButton* m_pRbDbFmtFromDb;
- RadioButton* m_pRbDbFmtFromUsr;
- NumFormatListBox* m_pLbDbFmtFromUsr;
+ VclPtr<VclFrame> m_pFormatFrame;
+ VclPtr<RadioButton> m_pRbDbFmtFromDb;
+ VclPtr<RadioButton> m_pRbDbFmtFromUsr;
+ VclPtr<NumFormatListBox> m_pLbDbFmtFromUsr;
// Page Text/Field
- PushButton* m_pIbDbcolToEdit;
- VclMultiLineEdit* m_pEdDbText;
- FixedText* m_pFtDbParaColl;
- ListBox* m_pLbDbParaColl;
+ VclPtr<PushButton> m_pIbDbcolToEdit;
+ VclPtr<VclMultiLineEdit> m_pEdDbText;
+ VclPtr<FixedText> m_pFtDbParaColl;
+ VclPtr<ListBox> m_pLbDbParaColl;
// Page Table
- PushButton* m_pIbDbcolAllTo;
- PushButton* m_pIbDbcolOneTo;
- PushButton* m_pIbDbcolOneFrom;
- PushButton* m_pIbDbcolAllFrom;
- FixedText* m_pFtTableCol;
- ListBox* m_pLbTableCol;
- CheckBox* m_pCbTableHeadon;
- RadioButton* m_pRbHeadlColnms;
- RadioButton* m_pRbHeadlEmpty;
- PushButton* m_pPbTblFormat;
- PushButton* m_pPbTblAutofmt;
+ VclPtr<PushButton> m_pIbDbcolAllTo;
+ VclPtr<PushButton> m_pIbDbcolOneTo;
+ VclPtr<PushButton> m_pIbDbcolOneFrom;
+ VclPtr<PushButton> m_pIbDbcolAllFrom;
+ VclPtr<FixedText> m_pFtTableCol;
+ VclPtr<ListBox> m_pLbTableCol;
+ VclPtr<CheckBox> m_pCbTableHeadon;
+ VclPtr<RadioButton> m_pRbHeadlColnms;
+ VclPtr<RadioButton> m_pRbHeadlEmpty;
+ VclPtr<PushButton> m_pPbTblFormat;
+ VclPtr<PushButton> m_pPbTblAutofmt;
SwInsDBColumns aDBColumns;
const SwDBData aDBData;
diff --git a/sw/source/uibase/inc/dbui.hxx b/sw/source/uibase/inc/dbui.hxx
index 0649bcb9ca6e..00f1320ea75a 100644
--- a/sw/source/uibase/inc/dbui.hxx
+++ b/sw/source/uibase/inc/dbui.hxx
@@ -29,7 +29,7 @@ class SW_DLLPUBLIC CancelableDialog : public Dialog
bool mbModal;
protected:
- CancelButton* m_pCancelButton;
+ VclPtr<CancelButton> m_pCancelButton;
CancelableDialog( vcl::Window *pParent, bool modal, const OUString& rID,
const OUString& rUIXMLDescription );
@@ -39,7 +39,9 @@ protected:
using Dialog::StartExecuteModal;
public:
- virtual ~CancelableDialog();
+ virtual ~CancelableModelessDialog();
+ virtual void dispose() SAL_OVERRIDE;
+
void SetCancelHdl( const Link& rLink );
void Show();
};
@@ -53,18 +55,22 @@ public:
MONITOR_TYPE_SAVE
};
- FixedText* m_pDocName;
- FixedText* m_pPrinting;
- FixedText* m_pPrinter;
- FixedText* m_pPrintInfo;
+ VclPtr<FixedText> m_pDocName;
+ VclPtr<FixedText> m_pPrinting;
+ VclPtr<FixedText> m_pPrinter;
+ VclPtr<FixedText> m_pPrintInfo;
PrintMonitor( vcl::Window *pParent, bool modal, PrintMonitorType eType );
+ virtual ~PrintMonitor();
+ virtual void dispose() SAL_OVERRIDE;
};
class CreateMonitor : public CancelableDialog
{
public:
CreateMonitor( vcl::Window *pParent, bool modal );
+ virtual ~CreateMonitor();
+ virtual void dispose() SAL_OVERRIDE;
void SetTotalCount( sal_Int32 nTotal );
void SetCurrentPosition( sal_Int32 nCurrent );
@@ -73,7 +79,7 @@ private:
void UpdateCountingText();
private:
- FixedText* m_pCounting;
+ VclPtr<FixedText> m_pCounting;
OUString m_sCountingPattern;
OUString m_sVariable_Total;
diff --git a/sw/source/uibase/inc/docstdlg.hxx b/sw/source/uibase/inc/docstdlg.hxx
index e02a80ea0369..67c5d5484e6a 100644
--- a/sw/source/uibase/inc/docstdlg.hxx
+++ b/sw/source/uibase/inc/docstdlg.hxx
@@ -32,6 +32,7 @@ class SwDocStatPage: public SfxTabPage
public:
SwDocStatPage(vcl::Window *pParent, const SfxItemSet &rSet);
virtual ~SwDocStatPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
@@ -42,18 +43,18 @@ protected:
DECL_LINK(UpdateHdl, void *);
private:
- FixedText* m_pPageNo;
- FixedText* m_pTableNo;
- FixedText* m_pGrfNo;
- FixedText* m_pOLENo;
- FixedText* m_pParaNo;
- FixedText* m_pWordNo;
- FixedText* m_pCharNo;
- FixedText* m_pCharExclSpacesNo;
+ VclPtr<FixedText> m_pPageNo;
+ VclPtr<FixedText> m_pTableNo;
+ VclPtr<FixedText> m_pGrfNo;
+ VclPtr<FixedText> m_pOLENo;
+ VclPtr<FixedText> m_pParaNo;
+ VclPtr<FixedText> m_pWordNo;
+ VclPtr<FixedText> m_pCharNo;
+ VclPtr<FixedText> m_pCharExclSpacesNo;
- FixedText* m_pLineLbl;
- FixedText* m_pLineNo;
- PushButton* m_pUpdatePB;
+ VclPtr<FixedText> m_pLineLbl;
+ VclPtr<FixedText> m_pLineNo;
+ VclPtr<PushButton> m_pUpdatePB;
SwDocStat aDocStat;
diff --git a/sw/source/uibase/inc/drawbase.hxx b/sw/source/uibase/inc/drawbase.hxx
index b6aa7ea849ce..42c3adada3d1 100644
--- a/sw/source/uibase/inc/drawbase.hxx
+++ b/sw/source/uibase/inc/drawbase.hxx
@@ -33,7 +33,7 @@ class SwDrawBase
protected:
SwView* m_pView;
SwWrtShell* m_pSh;
- SwEditWin* m_pWin;
+ VclPtr<SwEditWin> m_pWin;
Point m_aStartPos; // position of BeginCreate
Point m_aMDPos; // position of MouseButtonDown
sal_uInt16 m_nSlotId;
diff --git a/sw/source/uibase/inc/drpcps.hxx b/sw/source/uibase/inc/drpcps.hxx
index da73ac61c573..2cfb11f25385 100644
--- a/sw/source/uibase/inc/drpcps.hxx
+++ b/sw/source/uibase/inc/drpcps.hxx
@@ -45,20 +45,20 @@ class SwDropCapsPict;
class SwDropCapsPage : public SfxTabPage
{
friend class SwDropCapsPict;
- CheckBox* m_pDropCapsBox;
- CheckBox* m_pWholeWordCB;
- FixedText* m_pSwitchText;
- NumericField* m_pDropCapsField;
- FixedText* m_pLinesText;
- NumericField* m_pLinesField;
- FixedText* m_pDistanceText;
- MetricField* m_pDistanceField;
- FixedText* m_pTextText;
- Edit* m_pTextEdit;
- FixedText* m_pTemplateText;
- ListBox* m_pTemplateBox;
-
- SwDropCapsPict* m_pPict;
+ VclPtr<CheckBox> m_pDropCapsBox;
+ VclPtr<CheckBox> m_pWholeWordCB;
+ VclPtr<FixedText> m_pSwitchText;
+ VclPtr<NumericField> m_pDropCapsField;
+ VclPtr<FixedText> m_pLinesText;
+ VclPtr<NumericField> m_pLinesField;
+ VclPtr<FixedText> m_pDistanceText;
+ VclPtr<MetricField> m_pDistanceField;
+ VclPtr<FixedText> m_pTextText;
+ VclPtr<Edit> m_pTextEdit;
+ VclPtr<FixedText> m_pTemplateText;
+ VclPtr<ListBox> m_pTemplateBox;
+
+ VclPtr<SwDropCapsPict> m_pPict;
bool bModified;
bool bFormat;
@@ -66,8 +66,7 @@ friend class SwDropCapsPict;
SwWrtShell &rSh;
- SwDropCapsPage(vcl::Window *pParent, const SfxItemSet &rSet);
- virtual ~SwDropCapsPage();
+ SwDropCapsPage(vcl::Window *pParent, const SfxItemSet &rSet);
virtual int DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE;
void FillSet( SfxItemSet &rSet );
@@ -83,6 +82,8 @@ friend class SwDropCapsPict;
static const sal_uInt16 aPageRg[];
public:
+ virtual ~SwDropCapsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
static const sal_uInt16* GetRanges() { return aPageRg; }
diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx
index 9245e9ec5c49..84d369bfd624 100644
--- a/sw/source/uibase/inc/envlop.hxx
+++ b/sw/source/uibase/inc/envlop.hxx
@@ -78,20 +78,19 @@ public:
class SwEnvPage : public SfxTabPage
{
- VclMultiLineEdit* m_pAddrEdit;
- ListBox* m_pDatabaseLB;
- ListBox* m_pTableLB;
- ListBox* m_pDBFieldLB;
- PushButton* m_pInsertBT;
- CheckBox* m_pSenderBox;
- VclMultiLineEdit* m_pSenderEdit;
- SwEnvPreview* m_pPreview;
+ VclPtr<VclMultiLineEdit> m_pAddrEdit;
+ VclPtr<ListBox> m_pDatabaseLB;
+ VclPtr<ListBox> m_pTableLB;
+ VclPtr<ListBox> m_pDBFieldLB;
+ VclPtr<PushButton> m_pInsertBT;
+ VclPtr<CheckBox> m_pSenderBox;
+ VclPtr<VclMultiLineEdit> m_pSenderEdit;
+ VclPtr<SwEnvPreview> m_pPreview;
SwWrtShell* pSh;
OUString sActDBName;
SwEnvPage(vcl::Window* pParent, const SfxItemSet& rSet);
- virtual ~SwEnvPage();
DECL_LINK( DatabaseHdl, ListBox * );
DECL_LINK(FieldHdl, void *);
@@ -105,6 +104,8 @@ class SwEnvPage : public SfxTabPage
using SfxTabPage::DeactivatePage;
public:
+ virtual ~SwEnvPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rSet);
diff --git a/sw/source/uibase/inc/fldedt.hxx b/sw/source/uibase/inc/fldedt.hxx
index 23f0685f6270..cb7bd4f718f7 100644
--- a/sw/source/uibase/inc/fldedt.hxx
+++ b/sw/source/uibase/inc/fldedt.hxx
@@ -28,9 +28,9 @@ class SwFldMgr;
class SwFldEditDlg : public SfxSingleTabDialog
{
SwWrtShell* pSh;
- PushButton* m_pPrevBT;
- PushButton* m_pNextBT;
- PushButton* m_pAddressBT;
+ VclPtr<PushButton> m_pPrevBT;
+ VclPtr<PushButton> m_pNextBT;
+ VclPtr<PushButton> m_pAddressBT;
DECL_LINK(AddressHdl, void *);
DECL_LINK(NextPrevHdl, Button *pBt = 0);
diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx
index e24f19d89303..57cfeda448c8 100644
--- a/sw/source/uibase/inc/fldmgr.hxx
+++ b/sw/source/uibase/inc/fldmgr.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Any.h>
#include <vector>
+#include <vcl/vclptr.hxx>
namespace com{namespace sun{namespace star{
namespace container{
@@ -75,7 +76,7 @@ struct SwInsertFld_Data
::com::sun::star::uno::Any aDBDataSource;
::com::sun::star::uno::Any aDBConnection;
::com::sun::star::uno::Any aDBColumn;
- vcl::Window* pParent; // parent dialog used for SwWrtShell::StartInputFldDlg()
+ VclPtr<vcl::Window> pParent; // parent dialog used for SwWrtShell::StartInputFldDlg()
SwInsertFld_Data(sal_uInt16 nType, sal_uInt16 nSub, const OUString& rPar1, const OUString& rPar2,
sal_uLong nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', bool bIsAutoLanguage = true) :
diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx
index 6a3b396eb776..f87adb2f073c 100644
--- a/sw/source/uibase/inc/frmpage.hxx
+++ b/sw/source/uibase/inc/frmpage.hxx
@@ -42,52 +42,52 @@ struct SwPosition;
class SwFrmPage: public SfxTabPage
{
// size
- FixedText* m_pWidthFT;
- FixedText* m_pWidthAutoFT;
- PercentField m_aWidthED;
- CheckBox* m_pRelWidthCB;
- ListBox* m_pRelWidthRelationLB;
- CheckBox* m_pAutoWidthCB;
-
- FixedText* m_pHeightFT;
- FixedText* m_pHeightAutoFT;
- PercentField m_aHeightED;
- CheckBox* m_pRelHeightCB;
- ListBox* m_pRelHeightRelationLB;
- CheckBox* m_pAutoHeightCB;
-
- CheckBox* m_pFixedRatioCB;
- PushButton* m_pRealSizeBT;
+ VclPtr<FixedText> m_pWidthFT;
+ VclPtr<FixedText> m_pWidthAutoFT;
+ PercentField m_aWidthED;
+ VclPtr<CheckBox> m_pRelWidthCB;
+ VclPtr<ListBox> m_pRelWidthRelationLB;
+ VclPtr<CheckBox> m_pAutoWidthCB;
+
+ VclPtr<FixedText> m_pHeightFT;
+ VclPtr<FixedText> m_pHeightAutoFT;
+ PercentField m_aHeightED;
+ VclPtr<CheckBox> m_pRelHeightCB;
+ VclPtr<ListBox> m_pRelHeightRelationLB;
+ VclPtr<CheckBox> m_pAutoHeightCB;
+
+ VclPtr<CheckBox> m_pFixedRatioCB;
+ VclPtr<PushButton> m_pRealSizeBT;
// anchor
- VclContainer* m_pAnchorFrame;
- RadioButton* m_pAnchorAtPageRB;
- RadioButton* m_pAnchorAtParaRB;
- RadioButton* m_pAnchorAtCharRB;
- RadioButton* m_pAnchorAsCharRB;
- RadioButton* m_pAnchorAtFrameRB;
+ VclPtr<VclContainer> m_pAnchorFrame;
+ VclPtr<RadioButton> m_pAnchorAtPageRB;
+ VclPtr<RadioButton> m_pAnchorAtParaRB;
+ VclPtr<RadioButton> m_pAnchorAtCharRB;
+ VclPtr<RadioButton> m_pAnchorAsCharRB;
+ VclPtr<RadioButton> m_pAnchorAtFrameRB;
// position
- FixedText* m_pHorizontalFT;
- ListBox* m_pHorizontalDLB;
- FixedText* m_pAtHorzPosFT;
- MetricField* m_pAtHorzPosED;
- FixedText* m_pHoriRelationFT;
- ListBox* m_pHoriRelationLB;
-
- CheckBox* m_pMirrorPagesCB;
-
- FixedText* m_pVerticalFT;
- ListBox* m_pVerticalDLB;
- FixedText* m_pAtVertPosFT;
- MetricField* m_pAtVertPosED;
- FixedText* m_pVertRelationFT;
- ListBox* m_pVertRelationLB;
+ VclPtr<FixedText> m_pHorizontalFT;
+ VclPtr<ListBox> m_pHorizontalDLB;
+ VclPtr<FixedText> m_pAtHorzPosFT;
+ VclPtr<MetricField> m_pAtHorzPosED;
+ VclPtr<FixedText> m_pHoriRelationFT;
+ VclPtr<ListBox> m_pHoriRelationLB;
+
+ VclPtr<CheckBox> m_pMirrorPagesCB;
+
+ VclPtr<FixedText> m_pVerticalFT;
+ VclPtr<ListBox> m_pVerticalDLB;
+ VclPtr<FixedText> m_pAtVertPosFT;
+ VclPtr<MetricField> m_pAtVertPosED;
+ VclPtr<FixedText> m_pVertRelationFT;
+ VclPtr<ListBox> m_pVertRelationLB;
// #i18732# - check box for new option 'FollowTextFlow'
- CheckBox* m_pFollowTextFlowCB;
+ VclPtr<CheckBox> m_pFollowTextFlowCB;
// example
- SvxSwFrameExample* m_pExampleWN;
+ VclPtr<SvxSwFrameExample> m_pExampleWN;
//'string provider'
SvxSwFramePosString aFramePosString;
@@ -175,7 +175,6 @@ class SwFrmPage: public SfxTabPage
void EnableGraficMode( void ); // hides auto check boxes and re-org controls for "Real Size" button
SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet);
- virtual ~SwFrmPage();
SwWrtShell *getFrmDlgParentShell();
@@ -185,6 +184,8 @@ class SwFrmPage: public SfxTabPage
static const sal_uInt16 aPageRg[];
public:
+ virtual ~SwFrmPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
static const sal_uInt16* GetRanges() { return aPageRg; }
@@ -202,16 +203,16 @@ public:
class SwGrfExtPage: public SfxTabPage
{
// mirror
- VclContainer* m_pMirror;
- CheckBox* m_pMirrorVertBox;
- CheckBox* m_pMirrorHorzBox;
- RadioButton* m_pAllPagesRB;
- RadioButton* m_pLeftPagesRB;
- RadioButton* m_pRightPagesRB;
- BmpWindow* m_pBmpWin;
+ VclPtr<VclContainer> m_pMirror;
+ VclPtr<CheckBox> m_pMirrorVertBox;
+ VclPtr<CheckBox> m_pMirrorHorzBox;
+ VclPtr<RadioButton> m_pAllPagesRB;
+ VclPtr<RadioButton> m_pLeftPagesRB;
+ VclPtr<RadioButton> m_pRightPagesRB;
+ VclPtr<BmpWindow> m_pBmpWin;
- Edit* m_pConnectED;
- PushButton* m_pBrowseBT;
+ VclPtr<Edit> m_pConnectED;
+ VclPtr<PushButton> m_pBrowseBT;
OUString aFilterName;
OUString aGrfName, aNewGrfName;
@@ -244,24 +245,25 @@ public:
class SwFrmURLPage : public SfxTabPage
{
// hyperlink
- Edit* pURLED;
- PushButton* pSearchPB;
- Edit* pNameED;
- ComboBox* pFrameCB;
+ VclPtr<Edit> pURLED;
+ VclPtr<PushButton> pSearchPB;
+ VclPtr<Edit> pNameED;
+ VclPtr<ComboBox> pFrameCB;
// image map
- CheckBox* pServerCB;
- CheckBox* pClientCB;
+ VclPtr<CheckBox> pServerCB;
+ VclPtr<CheckBox> pClientCB;
DECL_LINK(InsertFileHdl, void *);
SwFrmURLPage(vcl::Window *pParent, const SfxItemSet &rSet);
- virtual ~SwFrmURLPage();
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
public:
+ virtual ~SwFrmURLPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
@@ -271,29 +273,29 @@ public:
class SwFrmAddPage : public SfxTabPage
{
- VclContainer* pNameFrame;
- FixedText* pNameFT;
- Edit* pNameED;
- FixedText* pAltNameFT;
- Edit* pAltNameED;
- FixedText* pPrevFT;
- ListBox* pPrevLB;
- FixedText* pNextFT;
- ListBox* pNextLB;
-
- VclContainer* pProtectFrame;
- CheckBox* pProtectContentCB;
- CheckBox* pProtectFrameCB;
- CheckBox* pProtectSizeCB;
-
- VclContainer* m_pContentAlignFrame;
- ListBox* m_pVertAlignLB;
-
- VclContainer* pPropertiesFrame;
- CheckBox* pEditInReadonlyCB;
- CheckBox* pPrintFrameCB;
- FixedText* pTextFlowFT;
- ListBox* pTextFlowLB;
+ VclPtr<VclContainer> pNameFrame;
+ VclPtr<FixedText> pNameFT;
+ VclPtr<Edit> pNameED;
+ VclPtr<FixedText> pAltNameFT;
+ VclPtr<Edit> pAltNameED;
+ VclPtr<FixedText> pPrevFT;
+ VclPtr<ListBox> pPrevLB;
+ VclPtr<FixedText> pNextFT;
+ VclPtr<ListBox> pNextLB;
+
+ VclPtr<VclContainer> pProtectFrame;
+ VclPtr<CheckBox> pProtectContentCB;
+ VclPtr<CheckBox> pProtectFrameCB;
+ VclPtr<CheckBox> pProtectSizeCB;
+
+ VclPtr<VclContainer> m_pContentAlignFrame;
+ VclPtr<ListBox> m_pVertAlignLB;
+
+ VclPtr<VclContainer> pPropertiesFrame;
+ VclPtr<CheckBox> pEditInReadonlyCB;
+ VclPtr<CheckBox> pPrintFrameCB;
+ VclPtr<FixedText> pTextFlowFT;
+ VclPtr<ListBox> pTextFlowLB;
SwWrtShell* pWrtSh;
@@ -306,11 +308,12 @@ class SwFrmAddPage : public SfxTabPage
DECL_LINK(ChainModifyHdl, ListBox*);
SwFrmAddPage(vcl::Window *pParent, const SfxItemSet &rSet);
- virtual ~SwFrmAddPage();
static const sal_uInt16 aAddPgRg[];
public:
+ virtual ~SwFrmAddPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window *pParent, const SfxItemSet *rSet);
static const sal_uInt16* GetRanges() { return aAddPgRg; }
diff --git a/sw/source/uibase/inc/glosbib.hxx b/sw/source/uibase/inc/glosbib.hxx
index 622b3cb20692..bcfe4a229eae 100644
--- a/sw/source/uibase/inc/glosbib.hxx
+++ b/sw/source/uibase/inc/glosbib.hxx
@@ -70,13 +70,13 @@ public:
class SwGlossaryGroupDlg : public SvxStandardDialog
{
- FEdit* m_pNameED;
- ListBox* m_pPathLB;
- SwGlossaryGroupTLB* m_pGroupTLB;
+ VclPtr<FEdit> m_pNameED;
+ VclPtr<ListBox> m_pPathLB;
+ VclPtr<SwGlossaryGroupTLB> m_pGroupTLB;
- PushButton* m_pNewPB;
- PushButton* m_pDelPB;
- PushButton* m_pRenamePB;
+ VclPtr<PushButton> m_pNewPB;
+ VclPtr<PushButton> m_pDelPB;
+ VclPtr<PushButton> m_pRenamePB;
typedef std::vector< OUString> OUVector_t;
OUVector_t m_RemovedArr;
@@ -102,6 +102,7 @@ public:
std::vector<OUString> const& rPathArr,
SwGlossaryHdl *pGlosHdl);
virtual ~SwGlossaryGroupDlg();
+ virtual void dispose() SAL_OVERRIDE;
const OUString& GetCreatedGroupName() const {return sCreatedGroup;}
};
diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx
index 53b1d5c32d74..62ae7b46198e 100644
--- a/sw/source/uibase/inc/glossary.hxx
+++ b/sw/source/uibase/inc/glossary.hxx
@@ -88,19 +88,19 @@ class SwGlossaryDlg : public SvxStandardDialog
friend class SwNewGlosNameDlg;
friend class SwGlTreeListBox;
- CheckBox* m_pInsertTipCB;
- Edit* m_pNameED;
- FixedText* m_pShortNameLbl;
+ VclPtr<CheckBox> m_pInsertTipCB;
+ VclPtr<Edit> m_pNameED;
+ VclPtr<FixedText> m_pShortNameLbl;
TextFilter m_aNoSpaceFilter;
- Edit* m_pShortNameEdit;
- SwGlTreeListBox* m_pCategoryBox;
- CheckBox* m_pFileRelCB;
- CheckBox* m_pNetRelCB;
- vcl::Window* m_pExampleWIN;
- PushButton* m_pInsertBtn;
- MenuButton* m_pEditBtn;
- PushButton* m_pBibBtn;
- PushButton* m_pPathBtn;
+ VclPtr<Edit> m_pShortNameEdit;
+ VclPtr<SwGlTreeListBox> m_pCategoryBox;
+ VclPtr<CheckBox> m_pFileRelCB;
+ VclPtr<CheckBox> m_pNetRelCB;
+ VclPtr<vcl::Window> m_pExampleWIN;
+ VclPtr<PushButton> m_pInsertBtn;
+ VclPtr<MenuButton> m_pEditBtn;
+ VclPtr<PushButton> m_pBibBtn;
+ VclPtr<PushButton> m_pPathBtn;
OUString sReadonlyPath;
diff --git a/sw/source/uibase/inc/inpdlg.hxx b/sw/source/uibase/inc/inpdlg.hxx
index bf42fa788cf6..260423a01ba4 100644
--- a/sw/source/uibase/inc/inpdlg.hxx
+++ b/sw/source/uibase/inc/inpdlg.hxx
@@ -42,17 +42,19 @@ class SwFldInputDlg: public SvxStandardDialog
SwSetExpField* pSetFld;
SwUserFieldType* pUsrType;
- Edit* m_pLabelED;
+ VclPtr<Edit> m_pLabelED;
- VclMultiLineEdit* m_pEditED;
+ VclPtr<VclMultiLineEdit> m_pEditED;
- OKButton* m_pOKBT;
- PushButton* m_pNextBT;
+ VclPtr<OKButton> m_pOKBT;
+ VclPtr<PushButton> m_pNextBT;
DECL_LINK(NextHdl, void *);
public:
SwFldInputDlg( vcl::Window *pParent, SwWrtShell &rSh,
SwField* pField, bool bNextButton = false );
+ virtual ~SwFldInputDlg();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/uibase/inc/inputwin.hxx b/sw/source/uibase/inc/inputwin.hxx
index c4af0b0f8fc0..fdb4a6f4fb69 100644
--- a/sw/source/uibase/inc/inputwin.hxx
+++ b/sw/source/uibase/inc/inputwin.hxx
@@ -109,9 +109,9 @@ public:
virtual ~SwInputChild();
SFX_DECL_CHILDWINDOW_WITHID( SwInputChild );
void SetFormula( const OUString& rFormula, bool bDelSel = true )
- { static_cast<SwInputWindow*>(pWindow)->SetFormula(
+ { static_cast<SwInputWindow*>(pWindow.get())->SetFormula(
rFormula, bDelSel ); }
- const SwView* GetView() const{return static_cast<SwInputWindow*>(pWindow)->GetView();}
+ const SwView* GetView() const{return static_cast<SwInputWindow*>(pWindow.get())->GetView();}
};
diff --git a/sw/source/uibase/inc/insfnote.hxx b/sw/source/uibase/inc/insfnote.hxx
index 05aace768913..8fee498f4022 100644
--- a/sw/source/uibase/inc/insfnote.hxx
+++ b/sw/source/uibase/inc/insfnote.hxx
@@ -40,19 +40,19 @@ class SwInsFootNoteDlg: public SvxStandardDialog
bool bExtCharAvailable;
bool bEdit;
- VclFrame* m_pNumberFrame;
- RadioButton* m_pNumberAutoBtn;
- RadioButton* m_pNumberCharBtn;
- Edit* m_pNumberCharEdit;
- PushButton* m_pNumberExtChar;
+ VclPtr<VclFrame> m_pNumberFrame;
+ VclPtr<RadioButton> m_pNumberAutoBtn;
+ VclPtr<RadioButton> m_pNumberCharBtn;
+ VclPtr<Edit> m_pNumberCharEdit;
+ VclPtr<PushButton> m_pNumberExtChar;
// everything for the selection footnote/endnote
- RadioButton* m_pFtnBtn;
- RadioButton* m_pEndNoteBtn;
+ VclPtr<RadioButton> m_pFtnBtn;
+ VclPtr<RadioButton> m_pEndNoteBtn;
- PushButton* m_pOkBtn;
- PushButton* m_pPrevBT;
- PushButton* m_pNextBT;
+ VclPtr<PushButton> m_pOkBtn;
+ VclPtr<PushButton> m_pPrevBT;
+ VclPtr<PushButton> m_pNextBT;
DECL_LINK(NumberCharHdl, void *);
DECL_LINK(NumberEditHdl, void *);
diff --git a/sw/source/uibase/inc/instable.hxx b/sw/source/uibase/inc/instable.hxx
index 99659247baa6..1e1178306d4c 100644
--- a/sw/source/uibase/inc/instable.hxx
+++ b/sw/source/uibase/inc/instable.hxx
@@ -34,22 +34,22 @@ struct SwInsertTableOptions;
class SwInsTableDlg : public SfxModalDialog
{
- Edit* m_pNameEdit;
+ VclPtr<Edit> m_pNameEdit;
TextFilter m_aTextFilter;
- NumericField* m_pColNF;
- NumericField* m_pRowNF;
+ VclPtr<NumericField> m_pColNF;
+ VclPtr<NumericField> m_pRowNF;
- CheckBox* m_pHeaderCB;
- CheckBox* m_pRepeatHeaderCB;
- NumericField* m_pRepeatHeaderNF;
- VclContainer* m_pRepeatGroup;
+ VclPtr<CheckBox> m_pHeaderCB;
+ VclPtr<CheckBox> m_pRepeatHeaderCB;
+ VclPtr<NumericField> m_pRepeatHeaderNF;
+ VclPtr<VclContainer> m_pRepeatGroup;
- CheckBox* m_pDontSplitCB;
- CheckBox* m_pBorderCB;
+ VclPtr<CheckBox> m_pDontSplitCB;
+ VclPtr<CheckBox> m_pBorderCB;
- PushButton* m_pInsertBtn;
- PushButton* m_pAutoFmtBtn;
+ VclPtr<PushButton> m_pInsertBtn;
+ VclPtr<PushButton> m_pAutoFmtBtn;
SwWrtShell* pShell;
SwTableAutoFmt* pTAutoFmt;
diff --git a/sw/source/uibase/inc/javaedit.hxx b/sw/source/uibase/inc/javaedit.hxx
index 9768f41af15a..13b5295dc973 100644
--- a/sw/source/uibase/inc/javaedit.hxx
+++ b/sw/source/uibase/inc/javaedit.hxx
@@ -33,16 +33,16 @@ namespace sfx2 { class FileDialogHelper; }
class SwJavaEditDialog : public SvxStandardDialog
{
private:
- Edit* m_pTypeED;
- RadioButton* m_pUrlRB;
- RadioButton* m_pEditRB;
- PushButton* m_pUrlPB;
- Edit* m_pUrlED;
- VclMultiLineEdit* m_pEditED;
+ VclPtr<Edit> m_pTypeED;
+ VclPtr<RadioButton> m_pUrlRB;
+ VclPtr<RadioButton> m_pEditRB;
+ VclPtr<PushButton> m_pUrlPB;
+ VclPtr<Edit> m_pUrlED;
+ VclPtr<VclMultiLineEdit> m_pEditED;
- OKButton* m_pOKBtn;
- PushButton* m_pPrevBtn;
- PushButton* m_pNextBtn;
+ VclPtr<OKButton> m_pOKBtn;
+ VclPtr<PushButton> m_pPrevBtn;
+ VclPtr<PushButton> m_pNextBtn;
OUString aText;
OUString aType;
@@ -54,7 +54,7 @@ private:
SwFldMgr* pMgr;
SwWrtShell* pSh;
sfx2::FileDialogHelper* pFileDlg;
- vcl::Window* pOldDefDlgParent;
+ VclPtr<vcl::Window> pOldDefDlgParent;
DECL_LINK(OKHdl, void *);
DECL_LINK(PrevHdl, void *);
diff --git a/sw/source/uibase/inc/label.hxx b/sw/source/uibase/inc/label.hxx
index 8369daa4e6c8..bb23e44c80e7 100644
--- a/sw/source/uibase/inc/label.hxx
+++ b/sw/source/uibase/inc/label.hxx
@@ -33,7 +33,7 @@ class SwLabDlg : public SfxTabDialog
{
SwLabelConfig aLabelsCfg;
SwDBManager* pDBManager;
- SwLabPrtPage* pPrtPage;
+ VclPtr<SwLabPrtPage> pPrtPage;
std::vector<sal_uInt16> aTypeIds;
std::vector<OUString> aMakes;
diff --git a/sw/source/uibase/inc/linenum.hxx b/sw/source/uibase/inc/linenum.hxx
index 7b3f0734dee6..ef0cb2b8dbdd 100644
--- a/sw/source/uibase/inc/linenum.hxx
+++ b/sw/source/uibase/inc/linenum.hxx
@@ -33,21 +33,21 @@ class SwLineNumberingDlg : public SfxModalDialog
{
private:
SwWrtShell* pSh;
- VclContainer* m_pBodyContent;
- vcl::Window* m_pDivIntervalFT;
- NumericField* m_pDivIntervalNF;
- vcl::Window* m_pDivRowsFT;
- NumericField* m_pNumIntervalNF;
- ListBox* m_pCharStyleLB;
- SwNumberingTypeListBox* m_pFormatLB;
- ListBox* m_pPosLB;
- MetricField* m_pOffsetMF;
- Edit* m_pDivisorED;
- CheckBox* m_pCountEmptyLinesCB;
- CheckBox* m_pCountFrameLinesCB;
- CheckBox* m_pRestartEachPageCB;
- CheckBox* m_pNumberingOnCB;
- CheckBox* m_pNumberingOnFooterHeader;
+ VclPtr<VclContainer> m_pBodyContent;
+ VclPtr<vcl::Window> m_pDivIntervalFT;
+ VclPtr<NumericField> m_pDivIntervalNF;
+ VclPtr<vcl::Window> m_pDivRowsFT;
+ VclPtr<NumericField> m_pNumIntervalNF;
+ VclPtr<ListBox> m_pCharStyleLB;
+ VclPtr<SwNumberingTypeListBox> m_pFormatLB;
+ VclPtr<ListBox> m_pPosLB;
+ VclPtr<MetricField> m_pOffsetMF;
+ VclPtr<Edit> m_pDivisorED;
+ VclPtr<CheckBox> m_pCountEmptyLinesCB;
+ VclPtr<CheckBox> m_pCountFrameLinesCB;
+ VclPtr<CheckBox> m_pRestartEachPageCB;
+ VclPtr<CheckBox> m_pNumberingOnCB;
+ VclPtr<CheckBox> m_pNumberingOnFooterHeader;
DECL_LINK(OKHdl, void *);
DECL_LINK(LineOnOffHdl, void * = 0);
DECL_LINK(ModifyHdl, void * = 0);
@@ -56,6 +56,7 @@ public:
SwWrtShell* GetWrtShell() const { return pSh; }
SwLineNumberingDlg(SwView *pVw);
virtual ~SwLineNumberingDlg();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/uibase/inc/mailconfigpage.hxx b/sw/source/uibase/inc/mailconfigpage.hxx
index 3e98da59dad1..96ecd2436217 100644
--- a/sw/source/uibase/inc/mailconfigpage.hxx
+++ b/sw/source/uibase/inc/mailconfigpage.hxx
@@ -33,20 +33,20 @@ class SwMailConfigPage : public SfxTabPage
{
friend class SwTestAccountSettingsDialog;
- Edit* m_pDisplayNameED;
- Edit* m_pAddressED;
+ VclPtr<Edit> m_pDisplayNameED;
+ VclPtr<Edit> m_pAddressED;
- CheckBox* m_pReplyToCB;
- FixedText* m_pReplyToFT;
- Edit* m_pReplyToED;
+ VclPtr<CheckBox> m_pReplyToCB;
+ VclPtr<FixedText> m_pReplyToFT;
+ VclPtr<Edit> m_pReplyToED;
- Edit* m_pServerED;
- NumericField* m_pPortNF;
+ VclPtr<Edit> m_pServerED;
+ VclPtr<NumericField> m_pPortNF;
- CheckBox* m_pSecureCB;
+ VclPtr<CheckBox> m_pSecureCB;
- PushButton* m_pServerAuthenticationPB;
- PushButton* m_pTestPB;
+ VclPtr<PushButton> m_pServerAuthenticationPB;
+ VclPtr<PushButton> m_pTestPB;
SwMailMergeConfigItem* m_pConfigItem;
diff --git a/sw/source/uibase/inc/mailmergechildwindow.hxx b/sw/source/uibase/inc/mailmergechildwindow.hxx
index 35a76131c26f..742cb322437d 100644
--- a/sw/source/uibase/inc/mailmergechildwindow.hxx
+++ b/sw/source/uibase/inc/mailmergechildwindow.hxx
@@ -25,11 +25,13 @@
class SwMailMergeChildWin : public SfxFloatingWindow
{
- ToolBox* m_pBackTB;
+ VclPtr<ToolBox> m_pBackTB;
DECL_LINK( BackHdl, void* );
public:
SwMailMergeChildWin(SfxBindings*, SfxChildWindow*, vcl::Window *pParent);
+ virtual ~SwMailMergeChildWin();
+ virtual void dispose() SAL_OVERRIDE;
virtual void FillInfo(SfxChildWinInfo&) const SAL_OVERRIDE;
};
diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx
index 5b4321bb2840..deb715c98e79 100644
--- a/sw/source/uibase/inc/mailmergehelper.hxx
+++ b/sw/source/uibase/inc/mailmergehelper.hxx
@@ -142,7 +142,7 @@ class SW_DLLPUBLIC SwAuthenticator :
{
OUString m_aUserName;
OUString m_aPassword;
- vcl::Window* m_pParentWindow;
+ VclPtr<vcl::Window> m_pParentWindow;
public:
SwAuthenticator() : m_pParentWindow(0) {}
SwAuthenticator(const OUString& username, const OUString& password, vcl::Window* pParent) :
diff --git a/sw/source/uibase/inc/mailmrge.hxx b/sw/source/uibase/inc/mailmrge.hxx
index 615fb035553f..1ae4b78829de 100644
--- a/sw/source/uibase/inc/mailmrge.hxx
+++ b/sw/source/uibase/inc/mailmrge.hxx
@@ -51,46 +51,46 @@ class SwMailMergeDlg : public SvxStandardDialog
{
friend class SwXSelChgLstnr_Impl;
- vcl::Window* m_pBeamerWin;
-
- RadioButton* m_pAllRB;
- RadioButton* m_pMarkedRB;
- RadioButton* m_pFromRB;
- NumericField* m_pFromNF;
- NumericField* m_pToNF;
-
- RadioButton* m_pPrinterRB;
- RadioButton* m_pMailingRB;
- RadioButton* m_pFileRB;
-
- CheckBox* m_pSingleJobsCB;
-
- FixedText* m_pSaveMergedDocumentFT;
- RadioButton* m_pSaveSingleDocRB;
- RadioButton* m_pSaveIndividualRB;
-
- CheckBox* m_pGenerateFromDataBaseCB;
-
- FixedText* m_pColumnFT;
- ListBox* m_pColumnLB;
- FixedText* m_pPathFT;
- Edit* m_pPathED;
- PushButton* m_pPathPB;
- FixedText* m_pFilterFT;
- ListBox* m_pFilterLB;
-
- ListBox* m_pAddressFldLB;
- FixedText* m_pSubjectFT;
- Edit* m_pSubjectED;
- FixedText* m_pFormatFT;
- FixedText* m_pAttachFT;
- Edit* m_pAttachED;
- PushButton* m_pAttachPB;
- CheckBox* m_pFormatHtmlCB;
- CheckBox* m_pFormatRtfCB;
- CheckBox* m_pFormatSwCB;
-
- OKButton* m_pOkBTN;
+ VclPtr<vcl::Window> m_pBeamerWin;
+
+ VclPtr<RadioButton> m_pAllRB;
+ VclPtr<RadioButton> m_pMarkedRB;
+ VclPtr<RadioButton> m_pFromRB;
+ VclPtr<NumericField> m_pFromNF;
+ VclPtr<NumericField> m_pToNF;
+
+ VclPtr<RadioButton> m_pPrinterRB;
+ VclPtr<RadioButton> m_pMailingRB;
+ VclPtr<RadioButton> m_pFileRB;
+
+ VclPtr<CheckBox> m_pSingleJobsCB;
+
+ VclPtr<FixedText> m_pSaveMergedDocumentFT;
+ VclPtr<RadioButton> m_pSaveSingleDocRB;
+ VclPtr<RadioButton> m_pSaveIndividualRB;
+
+ VclPtr<CheckBox> m_pGenerateFromDataBaseCB;
+
+ VclPtr<FixedText> m_pColumnFT;
+ VclPtr<ListBox> m_pColumnLB;
+ VclPtr<FixedText> m_pPathFT;
+ VclPtr<Edit> m_pPathED;
+ VclPtr<PushButton> m_pPathPB;
+ VclPtr<FixedText> m_pFilterFT;
+ VclPtr<ListBox> m_pFilterLB;
+
+ VclPtr<ListBox> m_pAddressFldLB;
+ VclPtr<FixedText> m_pSubjectFT;
+ VclPtr<Edit> m_pSubjectED;
+ VclPtr<FixedText> m_pFormatFT;
+ VclPtr<FixedText> m_pAttachFT;
+ VclPtr<Edit> m_pAttachED;
+ VclPtr<PushButton> m_pAttachPB;
+ VclPtr<CheckBox> m_pFormatHtmlCB;
+ VclPtr<CheckBox> m_pFormatRtfCB;
+ VclPtr<CheckBox> m_pFormatSwCB;
+
+ VclPtr<OKButton> m_pOkBTN;
SwMailMergeDlg_Impl* pImpl;
@@ -139,9 +139,11 @@ public:
class SwMailMergeCreateFromDlg : public ModalDialog
{
- RadioButton* m_pThisDocRB;
+ VclPtr<RadioButton> m_pThisDocRB;
public:
SwMailMergeCreateFromDlg(vcl::Window* pParent);
+ virtual ~SwMailMergeCreateFromDlg();
+ virtual void dispose() SAL_OVERRIDE;
bool IsThisDocument() const
{
return m_pThisDocRB->IsChecked();
@@ -150,9 +152,12 @@ public:
class SwMailMergeFieldConnectionsDlg : public ModalDialog
{
- RadioButton* m_pUseExistingRB;
+ VclPtr<RadioButton> m_pUseExistingRB;
public:
SwMailMergeFieldConnectionsDlg(vcl::Window* pParent);
+ virtual ~SwMailMergeFieldConnectionsDlg();
+ virtual void dispose() SAL_OVERRIDE;
+
bool IsUseExistingConnections() const
{
return m_pUseExistingRB->IsChecked();
diff --git a/sw/source/uibase/inc/mergetbl.hxx b/sw/source/uibase/inc/mergetbl.hxx
index fe9882a1429b..5bd7548ca358 100644
--- a/sw/source/uibase/inc/mergetbl.hxx
+++ b/sw/source/uibase/inc/mergetbl.hxx
@@ -26,7 +26,7 @@
class SwMergeTblDlg : public SvxStandardDialog
{
- RadioButton* m_pMergePrevRB;
+ VclPtr<RadioButton> m_pMergePrevRB;
bool& m_rMergePrev;
protected:
@@ -34,6 +34,8 @@ protected:
public:
SwMergeTblDlg( vcl::Window *pParent, bool& rWithPrev );
+ virtual ~SwMergeTblDlg();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/uibase/inc/multmrk.hxx b/sw/source/uibase/inc/multmrk.hxx
index 62ab97399cd8..2e9c26abaf82 100644
--- a/sw/source/uibase/inc/multmrk.hxx
+++ b/sw/source/uibase/inc/multmrk.hxx
@@ -32,8 +32,8 @@ class SwTOXMgr;
class SwMultiTOXMarkDlg : public SvxStandardDialog
{
DECL_LINK( SelectHdl, ListBox * );
- FixedText* m_pTextFT;
- ListBox* m_pTOXLB;
+ VclPtr<FixedText> m_pTextFT;
+ VclPtr<ListBox> m_pTOXLB;
SwTOXMgr& rMgr;
sal_uInt16 nPos;
@@ -42,6 +42,7 @@ class SwMultiTOXMarkDlg : public SvxStandardDialog
public:
SwMultiTOXMarkDlg( vcl::Window* pParent, SwTOXMgr &rTOXMgr );
virtual ~SwMultiTOXMarkDlg();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif // INCLUDED_SW_SOURCE_UIBASE_INC_MULTMRK_HXX
diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index 8b5b59565caa..1cb6b9fe021d 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -72,8 +72,8 @@ class SwNavigationPI : public vcl::Window,
SwWrtShell *pContentWrtShell;
SwView *pActContView;
SwView *pCreateView;
- SfxPopupWindow *pPopupWindow;
- SfxPopupWindow *pFloatingWindow;
+ VclPtr<SfxPopupWindow> pPopupWindow;
+ VclPtr<SfxPopupWindow> pFloatingWindow;
SfxChildWindowContext* pContextWin;
diff --git a/sw/source/uibase/inc/num.hxx b/sw/source/uibase/inc/num.hxx
index c4719c46ca4a..6e565c1b4431 100644
--- a/sw/source/uibase/inc/num.hxx
+++ b/sw/source/uibase/inc/num.hxx
@@ -49,43 +49,43 @@ struct SwBmpItemInfo
class SwNumPositionTabPage : public SfxTabPage
{
- ListBox* m_pLevelLB;
- VclFrame* m_pPositionFrame;
+ VclPtr<ListBox> m_pLevelLB;
+ VclPtr<VclFrame> m_pPositionFrame;
// former set of controls shown for numbering rules containing list level
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
- FixedText* m_pDistBorderFT;
- MetricField* m_pDistBorderMF;
- CheckBox* m_pRelativeCB;
- FixedText* m_pIndentFT;
- MetricField* m_pIndentMF;
- FixedText* m_pDistNumFT;
- MetricField* m_pDistNumMF;
- FixedText* m_pAlignFT;
- ListBox* m_pAlignLB;
+ VclPtr<FixedText> m_pDistBorderFT;
+ VclPtr<MetricField> m_pDistBorderMF;
+ VclPtr<CheckBox> m_pRelativeCB;
+ VclPtr<FixedText> m_pIndentFT;
+ VclPtr<MetricField> m_pIndentMF;
+ VclPtr<FixedText> m_pDistNumFT;
+ VclPtr<MetricField> m_pDistNumMF;
+ VclPtr<FixedText> m_pAlignFT;
+ VclPtr<ListBox> m_pAlignLB;
// new set of controls shown for numbering rules containing list level
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
- FixedText* m_pLabelFollowedByFT;
- ListBox* m_pLabelFollowedByLB;
- FixedText* m_pListtabFT;
- MetricField* m_pListtabMF;
- FixedText* m_pAlign2FT;
- ListBox* m_pAlign2LB;
- FixedText* m_pAlignedAtFT;
- MetricField* m_pAlignedAtMF;
- FixedText* m_pIndentAtFT;
- MetricField* m_pIndentAtMF;
+ VclPtr<FixedText> m_pLabelFollowedByFT;
+ VclPtr<ListBox> m_pLabelFollowedByLB;
+ VclPtr<FixedText> m_pListtabFT;
+ VclPtr<MetricField> m_pListtabMF;
+ VclPtr<FixedText> m_pAlign2FT;
+ VclPtr<ListBox> m_pAlign2LB;
+ VclPtr<FixedText> m_pAlignedAtFT;
+ VclPtr<MetricField> m_pAlignedAtMF;
+ VclPtr<FixedText> m_pIndentAtFT;
+ VclPtr<MetricField> m_pIndentAtMF;
- PushButton* m_pStandardPB;
+ VclPtr<PushButton> m_pStandardPB;
- NumberingPreview* m_pPreviewWIN;
+ VclPtr<NumberingPreview> m_pPreviewWIN;
SwNumRule* pActNum;
SwNumRule* pSaveNum;
SwWrtShell* pWrtSh;
- SwOutlineTabDialog* pOutlineDlg;
+ VclPtr<SwOutlineTabDialog> pOutlineDlg;
sal_uInt16 nActNumLvl;
bool bModified : 1;
diff --git a/sw/source/uibase/inc/numpara.hxx b/sw/source/uibase/inc/numpara.hxx
index ab84db3e5cda..f17660d08f9f 100644
--- a/sw/source/uibase/inc/numpara.hxx
+++ b/sw/source/uibase/inc/numpara.hxx
@@ -29,23 +29,23 @@
// are performed.
class SwParagraphNumTabPage : public SfxTabPage
{
- VclHBox* m_pOutlineStartBX;
- ListBox* m_pOutlineLvLB;
- VclHBox* m_pNumberStyleBX;
- ListBox* m_pNumberStyleLB;
- PushButton* m_pEditNumStyleBtn;
+ VclPtr<VclHBox> m_pOutlineStartBX;
+ VclPtr<ListBox> m_pOutlineLvLB;
+ VclPtr<VclHBox> m_pNumberStyleBX;
+ VclPtr<ListBox> m_pNumberStyleLB;
+ VclPtr<PushButton> m_pEditNumStyleBtn;
- TriStateBox* m_pNewStartCB;
- VclHBox* m_pNewStartBX;
- TriStateBox* m_pNewStartNumberCB;
- NumericField* m_pNewStartNF;
+ VclPtr<TriStateBox> m_pNewStartCB;
+ VclPtr<VclHBox> m_pNewStartBX;
+ VclPtr<TriStateBox> m_pNewStartNumberCB;
+ VclPtr<NumericField> m_pNewStartNF;
- VclFrame* m_pCountParaFram;
- TriStateBox* m_pCountParaCB;
- TriStateBox* m_pRestartParaCountCB;
+ VclPtr<VclFrame> m_pCountParaFram;
+ VclPtr<TriStateBox> m_pCountParaCB;
+ VclPtr<TriStateBox> m_pRestartParaCountCB;
- VclHBox* m_pRestartBX;
- NumericField* m_pRestartNF;
+ VclPtr<VclHBox> m_pRestartBX;
+ VclPtr<NumericField> m_pRestartNF;
// --> OD 2008-04-14 #outlinelevel#
const OUString msOutlineNumbering;
@@ -70,6 +70,7 @@ protected:
public:
virtual ~SwParagraphNumTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rSet );
diff --git a/sw/source/uibase/inc/optcomp.hxx b/sw/source/uibase/inc/optcomp.hxx
index d33d22222fd4..7e486c22d3a4 100644
--- a/sw/source/uibase/inc/optcomp.hxx
+++ b/sw/source/uibase/inc/optcomp.hxx
@@ -34,10 +34,10 @@ class SwCompatibilityOptPage : public SfxTabPage
{
private:
// controls
- VclFrame* m_pMain;
- ListBox* m_pFormattingLB;
- SvxCheckListBox* m_pOptionsLB;
- PushButton* m_pDefaultPB;
+ VclPtr<VclFrame> m_pMain;
+ VclPtr<ListBox> m_pFormattingLB;
+ VclPtr<SvxCheckListBox> m_pOptionsLB;
+ VclPtr<PushButton> m_pDefaultPB;
// config item
SvtCompatibilityOptions m_aConfigItem;
// text of the user entry
diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx
index 71c1759a1bea..6b1e53880ce1 100644
--- a/sw/source/uibase/inc/optload.hxx
+++ b/sw/source/uibase/inc/optload.hxx
@@ -39,21 +39,21 @@ class SwWrtShell;
class SwLoadOptPage : public SfxTabPage
{
private:
- RadioButton* m_pAlwaysRB;
- RadioButton* m_pRequestRB;
- RadioButton* m_pNeverRB;
-
- CheckBox* m_pAutoUpdateFields;
- CheckBox* m_pAutoUpdateCharts;
-
- ListBox* m_pMetricLB;
- FixedText* m_pTabFT;
- MetricField* m_pTabMF;
- CheckBox* m_pUseSquaredPageMode;
- CheckBox* m_pUseCharUnit;
- Edit* m_pWordCountED;
- CheckBox* m_pShowStandardizedPageCount;
- NumericField* m_pStandardizedPageSizeNF;
+ VclPtr<RadioButton> m_pAlwaysRB;
+ VclPtr<RadioButton> m_pRequestRB;
+ VclPtr<RadioButton> m_pNeverRB;
+
+ VclPtr<CheckBox> m_pAutoUpdateFields;
+ VclPtr<CheckBox> m_pAutoUpdateCharts;
+
+ VclPtr<ListBox> m_pMetricLB;
+ VclPtr<FixedText> m_pTabFT;
+ VclPtr<MetricField> m_pTabMF;
+ VclPtr<CheckBox> m_pUseSquaredPageMode;
+ VclPtr<CheckBox> m_pUseCharUnit;
+ VclPtr<Edit> m_pWordCountED;
+ VclPtr<CheckBox> m_pShowStandardizedPageCount;
+ VclPtr<NumericField> m_pStandardizedPageSizeNF;
SwWrtShell* m_pWrtShell;
sal_uInt16 m_nLastTab;
@@ -64,6 +64,8 @@ private:
public:
SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet);
+ virtual ~SwLoadOptPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
@@ -105,28 +107,28 @@ public:
class SwCaptionOptPage : public SfxTabPage
{
private:
- SvxCheckListBox* m_pCheckLB;
- ListBox* m_pLbCaptionOrder;
- SwCaptionPreview* m_pPreview;
-
- VclContainer* m_pSettingsGroup;
- CaptionComboBox* m_pCategoryBox;
- FixedText* m_pFormatText;
- ListBox* m_pFormatBox;
+ VclPtr<SvxCheckListBox> m_pCheckLB;
+ VclPtr<ListBox> m_pLbCaptionOrder;
+ VclPtr<SwCaptionPreview> m_pPreview;
+
+ VclPtr<VclContainer> m_pSettingsGroup;
+ VclPtr<CaptionComboBox> m_pCategoryBox;
+ VclPtr<FixedText> m_pFormatText;
+ VclPtr<ListBox> m_pFormatBox;
//#i61007# order of captions
- FixedText* m_pNumberingSeparatorFT;
- Edit* m_pNumberingSeparatorED;
- FixedText* m_pTextText;
- Edit* m_pTextEdit;
- ListBox* m_pPosBox;
-
- VclContainer* m_pNumCapt;
- ListBox* m_pLbLevel;
- Edit* m_pEdDelim;
-
- VclContainer* m_pCategory;
- ListBox* m_pCharStyleLB;
- CheckBox* m_pApplyBorderCB;
+ VclPtr<FixedText> m_pNumberingSeparatorFT;
+ VclPtr<Edit> m_pNumberingSeparatorED;
+ VclPtr<FixedText> m_pTextText;
+ VclPtr<Edit> m_pTextEdit;
+ VclPtr<ListBox> m_pPosBox;
+
+ VclPtr<VclContainer> m_pNumCapt;
+ VclPtr<ListBox> m_pLbLevel;
+ VclPtr<Edit> m_pEdDelim;
+
+ VclPtr<VclContainer> m_pCategory;
+ VclPtr<ListBox> m_pCharStyleLB;
+ VclPtr<CheckBox> m_pApplyBorderCB;
OUString m_sSWTable;
OUString m_sSWFrame;
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index 63ebf50dd8e3..a586243ca71f 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -41,28 +41,28 @@ class FontList;
// Tools->Options->Writer/Web->View
class SwContentOptPage : public SfxTabPage
{
- CheckBox* m_pCrossCB;
-
- CheckBox* m_pHScrollBox;
- CheckBox* m_pVScrollBox;
- CheckBox* m_pAnyRulerCB;
- CheckBox* m_pHRulerCBox;
- ListBox* m_pHMetric;
- CheckBox* m_pVRulerCBox;
- CheckBox* m_pVRulerRightCBox;
- ListBox* m_pVMetric;
- CheckBox* m_pSmoothCBox;
-
- CheckBox* m_pGrfCB;
- CheckBox* m_pTblCB;
- CheckBox* m_pDrwCB;
- CheckBox* m_pFldNameCB;
- CheckBox* m_pPostItCB;
-
- VclFrame* m_pSettingsFrame;
- FixedText* m_pSettingsLabel;
- FixedText* m_pMetricLabel;
- ListBox* m_pMetricLB;
+ VclPtr<CheckBox> m_pCrossCB;
+
+ VclPtr<CheckBox> m_pHScrollBox;
+ VclPtr<CheckBox> m_pVScrollBox;
+ VclPtr<CheckBox> m_pAnyRulerCB;
+ VclPtr<CheckBox> m_pHRulerCBox;
+ VclPtr<ListBox> m_pHMetric;
+ VclPtr<CheckBox> m_pVRulerCBox;
+ VclPtr<CheckBox> m_pVRulerRightCBox;
+ VclPtr<ListBox> m_pVMetric;
+ VclPtr<CheckBox> m_pSmoothCBox;
+
+ VclPtr<CheckBox> m_pGrfCB;
+ VclPtr<CheckBox> m_pTblCB;
+ VclPtr<CheckBox> m_pDrwCB;
+ VclPtr<CheckBox> m_pFldNameCB;
+ VclPtr<CheckBox> m_pPostItCB;
+
+ VclPtr<VclFrame> m_pSettingsFrame;
+ VclPtr<FixedText> m_pSettingsLabel;
+ VclPtr<FixedText> m_pMetricLabel;
+ VclPtr<ListBox> m_pMetricLB;
DECL_LINK(VertRulerHdl, CheckBox*);
DECL_LINK(AnyRulerHdl, CheckBox*);
@@ -70,6 +70,7 @@ public:
SwContentOptPage( vcl::Window* pParent,
const SfxItemSet& rSet );
virtual ~SwContentOptPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
@@ -82,29 +83,29 @@ public:
// TabPage printer settings additions
class SwAddPrinterTabPage : public SfxTabPage
{
- CheckBox* m_pGrfCB;
- CheckBox* m_pCtrlFldCB;
- CheckBox* m_pBackgroundCB;
- CheckBox* m_pBlackFontCB;
- CheckBox* m_pPrintHiddenTextCB;
- CheckBox* m_pPrintTextPlaceholderCB;
-
- VclFrame* m_pPagesFrame;
- CheckBox* m_pLeftPageCB;
- CheckBox* m_pRightPageCB;
- CheckBox* m_pProspectCB;
- CheckBox* m_pProspectCB_RTL;
-
- VclFrame* m_pCommentsFrame;
- RadioButton* m_pNoRB;
- RadioButton* m_pOnlyRB;
- RadioButton* m_pEndRB;
- RadioButton* m_pEndPageRB;
- RadioButton* m_pInMarginsRB;
-
- CheckBox* m_pPrintEmptyPagesCB;
- CheckBox* m_pPaperFromSetupCB;
- ListBox* m_pFaxLB;
+ VclPtr<CheckBox> m_pGrfCB;
+ VclPtr<CheckBox> m_pCtrlFldCB;
+ VclPtr<CheckBox> m_pBackgroundCB;
+ VclPtr<CheckBox> m_pBlackFontCB;
+ VclPtr<CheckBox> m_pPrintHiddenTextCB;
+ VclPtr<CheckBox> m_pPrintTextPlaceholderCB;
+
+ VclPtr<VclFrame> m_pPagesFrame;
+ VclPtr<CheckBox> m_pLeftPageCB;
+ VclPtr<CheckBox> m_pRightPageCB;
+ VclPtr<CheckBox> m_pProspectCB;
+ VclPtr<CheckBox> m_pProspectCB_RTL;
+
+ VclPtr<VclFrame> m_pCommentsFrame;
+ VclPtr<RadioButton> m_pNoRB;
+ VclPtr<RadioButton> m_pOnlyRB;
+ VclPtr<RadioButton> m_pEndRB;
+ VclPtr<RadioButton> m_pEndPageRB;
+ VclPtr<RadioButton> m_pInMarginsRB;
+
+ VclPtr<CheckBox> m_pPrintEmptyPagesCB;
+ VclPtr<CheckBox> m_pPaperFromSetupCB;
+ VclPtr<ListBox> m_pFaxLB;
OUString sNone;
@@ -117,6 +118,8 @@ class SwAddPrinterTabPage : public SfxTabPage
SwAddPrinterTabPage( vcl::Window* pParent,
const SfxItemSet& rSet );
public:
+ virtual ~SwAddPrinterTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet );
@@ -132,20 +135,20 @@ public:
class SwStdFontTabPage : public SfxTabPage
{
- FixedText* pLabelFT;
-
- ComboBox* pStandardBox;
- FontSizeBox* pStandardHeightLB;
- ComboBox* pTitleBox ;
- FontSizeBox* pTitleHeightLB;
- ComboBox* pListBox ;
- FontSizeBox* pListHeightLB;
- ComboBox* pLabelBox ;
- FontSizeBox* pLabelHeightLB;
- ComboBox* pIdxBox ;
- FontSizeBox* pIndexHeightLB;
- CheckBox* pDocOnlyCB ;
- PushButton* pStandardPB;
+ VclPtr<FixedText> pLabelFT;
+
+ VclPtr<ComboBox> pStandardBox;
+ VclPtr<FontSizeBox> pStandardHeightLB;
+ VclPtr<ComboBox> pTitleBox ;
+ VclPtr<FontSizeBox> pTitleHeightLB;
+ VclPtr<ComboBox> pListBox ;
+ VclPtr<FontSizeBox> pListHeightLB;
+ VclPtr<ComboBox> pLabelBox ;
+ VclPtr<FontSizeBox> pLabelHeightLB;
+ VclPtr<ComboBox> pIdxBox ;
+ VclPtr<FontSizeBox> pIndexHeightLB;
+ VclPtr<CheckBox> pDocOnlyCB ;
+ VclPtr<PushButton> pStandardPB;
OUString sShellStd;
OUString sShellTitle;
@@ -203,24 +206,24 @@ public:
class SwTableOptionsTabPage : public SfxTabPage
{
- CheckBox* pHeaderCB;
- CheckBox* pRepeatHeaderCB;
- CheckBox* pDontSplitCB;
- CheckBox* pBorderCB;
+ VclPtr<CheckBox> pHeaderCB;
+ VclPtr<CheckBox> pRepeatHeaderCB;
+ VclPtr<CheckBox> pDontSplitCB;
+ VclPtr<CheckBox> pBorderCB;
- CheckBox* pNumFormattingCB;
- CheckBox* pNumFmtFormattingCB;
- CheckBox* pNumAlignmentCB;
+ VclPtr<CheckBox> pNumFormattingCB;
+ VclPtr<CheckBox> pNumFmtFormattingCB;
+ VclPtr<CheckBox> pNumAlignmentCB;
- MetricField* pRowMoveMF;
- MetricField* pColMoveMF;
+ VclPtr<MetricField> pRowMoveMF;
+ VclPtr<MetricField> pColMoveMF;
- MetricField* pRowInsertMF;
- MetricField* pColInsertMF;
+ VclPtr<MetricField> pRowInsertMF;
+ VclPtr<MetricField> pColInsertMF;
- RadioButton* pFixRB;
- RadioButton* pFixPropRB;
- RadioButton* pVarRB;
+ VclPtr<RadioButton> pFixRB;
+ VclPtr<RadioButton> pFixPropRB;
+ VclPtr<RadioButton> pVarRB;
SwWrtShell* pWrtShell;
bool bHTMLMode;
@@ -229,9 +232,9 @@ class SwTableOptionsTabPage : public SfxTabPage
SwTableOptionsTabPage( vcl::Window* pParent,
const SfxItemSet& rSet );
- virtual ~SwTableOptionsTabPage();
-
public:
+ virtual ~SwTableOptionsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet );
@@ -248,36 +251,37 @@ public:
class SwShdwCrsrOptionsTabPage : public SfxTabPage
{
//nonprinting characters
- CheckBox* m_pParaCB;
- CheckBox* m_pSHyphCB;
- CheckBox* m_pSpacesCB;
- CheckBox* m_pHSpacesCB;
- CheckBox* m_pTabCB;
- CheckBox* m_pBreakCB;
- CheckBox* m_pCharHiddenCB;
- CheckBox* m_pFldHiddenCB;
- CheckBox* m_pFldHiddenParaCB;
-
- VclFrame* m_pDirectCursorFrame;
- CheckBox* m_pOnOffCB;
-
- RadioButton* m_pFillMarginRB;
- RadioButton* m_pFillIndentRB;
- RadioButton* m_pFillTabRB;
- RadioButton* m_pFillSpaceRB;
-
- VclFrame* m_pCursorProtFrame;
- CheckBox* m_pCrsrInProtCB;
- CheckBox* m_pIgnoreProtCB;
-
- CheckBox* m_pMathBaselineAlignmentCB;
+ VclPtr<CheckBox> m_pParaCB;
+ VclPtr<CheckBox> m_pSHyphCB;
+ VclPtr<CheckBox> m_pSpacesCB;
+ VclPtr<CheckBox> m_pHSpacesCB;
+ VclPtr<CheckBox> m_pTabCB;
+ VclPtr<CheckBox> m_pBreakCB;
+ VclPtr<CheckBox> m_pCharHiddenCB;
+ VclPtr<CheckBox> m_pFldHiddenCB;
+ VclPtr<CheckBox> m_pFldHiddenParaCB;
+
+ VclPtr<VclFrame> m_pDirectCursorFrame;
+ VclPtr<CheckBox> m_pOnOffCB;
+
+ VclPtr<RadioButton> m_pFillMarginRB;
+ VclPtr<RadioButton> m_pFillIndentRB;
+ VclPtr<RadioButton> m_pFillTabRB;
+ VclPtr<RadioButton> m_pFillSpaceRB;
+
+ VclPtr<VclFrame> m_pCursorProtFrame;
+ VclPtr<CheckBox> m_pCrsrInProtCB;
+ VclPtr<CheckBox> m_pIgnoreProtCB;
+
+ VclPtr<CheckBox> m_pMathBaselineAlignmentCB;
SwWrtShell * m_pWrtShell;
SwShdwCrsrOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
- virtual ~SwShdwCrsrOptionsTabPage();
public:
+ virtual ~SwShdwCrsrOptionsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
@@ -329,27 +333,26 @@ public:
// redlining options
class SwRedlineOptionsTabPage : public SfxTabPage
{
- ListBox* pInsertLB;
- ColorListBox* pInsertColorLB;
- SvxFontPrevWindow* pInsertedPreviewWN;
+ VclPtr<ListBox> pInsertLB;
+ VclPtr<ColorListBox> pInsertColorLB;
+ VclPtr<SvxFontPrevWindow> pInsertedPreviewWN;
- ListBox* pDeletedLB;
- ColorListBox* pDeletedColorLB;
- SvxFontPrevWindow* pDeletedPreviewWN;
+ VclPtr<ListBox> pDeletedLB;
+ VclPtr<ColorListBox> pDeletedColorLB;
+ VclPtr<SvxFontPrevWindow> pDeletedPreviewWN;
- ListBox* pChangedLB;
- ColorListBox* pChangedColorLB;
- SvxFontPrevWindow* pChangedPreviewWN;
+ VclPtr<ListBox> pChangedLB;
+ VclPtr<ColorListBox> pChangedColorLB;
+ VclPtr<SvxFontPrevWindow> pChangedPreviewWN;
- ListBox* pMarkPosLB;
- ColorListBox* pMarkColorLB;
- SwMarkPreview* pMarkPreviewWN;
+ VclPtr<ListBox> pMarkPosLB;
+ VclPtr<ColorListBox> pMarkColorLB;
+ VclPtr<SwMarkPreview> pMarkPreviewWN;
OUString sAuthor;
OUString sNone;
SwRedlineOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
- virtual ~SwRedlineOptionsTabPage();
DECL_LINK( AttribHdl, ListBox *pLB );
DECL_LINK(ChangedMaskPrevHdl, void * = 0);
@@ -358,6 +361,8 @@ class SwRedlineOptionsTabPage : public SfxTabPage
void InitFontStyle(SvxFontPrevWindow& rExampleWin);
public:
+ virtual ~SwRedlineOptionsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
@@ -374,6 +379,8 @@ class SwTestTabPage : public SfxTabPage
public:
SwTestTabPage( vcl::Window* pParent,
const SfxItemSet& rSet );
+ virtual ~SwTestTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet );
@@ -382,16 +389,16 @@ public:
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
private:
- CheckBox* m_pTest1CBox;
- CheckBox* m_pTest2CBox;
- CheckBox* m_pTest3CBox;
- CheckBox* m_pTest4CBox;
- CheckBox* m_pTest5CBox;
- CheckBox* m_pTest6CBox;
- CheckBox* m_pTest7CBox;
- CheckBox* m_pTest8CBox;
- CheckBox* m_pTest9CBox;
- CheckBox* m_pTest10CBox;
+ VclPtr<CheckBox> m_pTest1CBox;
+ VclPtr<CheckBox> m_pTest2CBox;
+ VclPtr<CheckBox> m_pTest3CBox;
+ VclPtr<CheckBox> m_pTest4CBox;
+ VclPtr<CheckBox> m_pTest5CBox;
+ VclPtr<CheckBox> m_pTest6CBox;
+ VclPtr<CheckBox> m_pTest7CBox;
+ VclPtr<CheckBox> m_pTest8CBox;
+ VclPtr<CheckBox> m_pTest9CBox;
+ VclPtr<CheckBox> m_pTest10CBox;
bool bAttrModified;
@@ -403,22 +410,23 @@ private:
class SwCompareOptionsTabPage : public SfxTabPage
{
- RadioButton* m_pAutoRB;
- RadioButton* m_pWordRB;
- RadioButton* m_pCharRB;
+ VclPtr<RadioButton> m_pAutoRB;
+ VclPtr<RadioButton> m_pWordRB;
+ VclPtr<RadioButton> m_pCharRB;
- CheckBox* m_pRsidCB;
- CheckBox* m_pIgnoreCB;
- NumericField* m_pLenNF;
- CheckBox* m_pStoreRsidCB;
+ VclPtr<CheckBox> m_pRsidCB;
+ VclPtr<CheckBox> m_pIgnoreCB;
+ VclPtr<NumericField> m_pLenNF;
+ VclPtr<CheckBox> m_pStoreRsidCB;
SwCompareOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
- virtual ~SwCompareOptionsTabPage();
DECL_LINK(ComparisonHdl, void *);
DECL_LINK(IgnoreHdl, void *);
public:
+ virtual ~SwCompareOptionsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx
index 45317fba3fc2..36e564e11241 100644
--- a/sw/source/uibase/inc/outline.hxx
+++ b/sw/source/uibase/inc/outline.hxx
@@ -83,17 +83,17 @@ public:
class SwOutlineSettingsTabPage : public SfxTabPage
{
- ListBox* m_pLevelLB;
-
- ListBox* m_pCollBox;
- SwNumberingTypeListBox* m_pNumberBox;
- ListBox* m_pCharFmtLB;
- FixedText* m_pAllLevelFT;
- NumericField* m_pAllLevelNF;
- Edit* m_pPrefixED;
- Edit* m_pSuffixED;
- NumericField* m_pStartEdit;
- NumberingPreview* m_pPreviewWIN;
+ VclPtr<ListBox> m_pLevelLB;
+
+ VclPtr<ListBox> m_pCollBox;
+ VclPtr<SwNumberingTypeListBox> m_pNumberBox;
+ VclPtr<ListBox> m_pCharFmtLB;
+ VclPtr<FixedText> m_pAllLevelFT;
+ VclPtr<NumericField> m_pAllLevelNF;
+ VclPtr<Edit> m_pPrefixED;
+ VclPtr<Edit> m_pSuffixED;
+ VclPtr<NumericField> m_pStartEdit;
+ VclPtr<NumberingPreview> m_pPreviewWIN;
OUString aNoFmtName;
OUString aSaveCollNames[MAXLEVEL];
@@ -122,6 +122,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage
public:
SwOutlineSettingsTabPage(vcl::Window* pParent, const SfxItemSet& rSet);
virtual ~SwOutlineSettingsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void SetWrtShell(SwWrtShell* pShell);
diff --git a/sw/source/uibase/inc/pgfnote.hxx b/sw/source/uibase/inc/pgfnote.hxx
index 6d37616473a2..90e850fbce10 100644
--- a/sw/source/uibase/inc/pgfnote.hxx
+++ b/sw/source/uibase/inc/pgfnote.hxx
@@ -39,21 +39,22 @@ public:
virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
virtual void Reset(const SfxItemSet *rSet) SAL_OVERRIDE;
+ virtual ~SwFootNotePage();
+ virtual void dispose() SAL_OVERRIDE;
private:
SwFootNotePage(vcl::Window *pParent, const SfxItemSet &rSet);
- virtual ~SwFootNotePage();
- RadioButton* m_pMaxHeightPageBtn;
- RadioButton* m_pMaxHeightBtn;
- MetricField* m_pMaxHeightEdit;
- MetricField* m_pDistEdit;
-
- ListBox* m_pLinePosBox;
- LineListBox* m_pLineTypeBox;
- MetricField* m_pLineWidthEdit;
- ColorListBox* m_pLineColorBox;
- MetricField* m_pLineLengthEdit;
- MetricField* m_pLineDistEdit;
+ VclPtr<RadioButton> m_pMaxHeightPageBtn;
+ VclPtr<RadioButton> m_pMaxHeightBtn;
+ VclPtr<MetricField> m_pMaxHeightEdit;
+ VclPtr<MetricField> m_pDistEdit;
+
+ VclPtr<ListBox> m_pLinePosBox;
+ VclPtr<LineListBox> m_pLineTypeBox;
+ VclPtr<MetricField> m_pLineWidthEdit;
+ VclPtr<ColorListBox> m_pLineColorBox;
+ VclPtr<MetricField> m_pLineLengthEdit;
+ VclPtr<MetricField> m_pLineDistEdit;
DECL_LINK(HeightPage, void *);
DECL_LINK(HeightMetric, void *);
diff --git a/sw/source/uibase/inc/pggrid.hxx b/sw/source/uibase/inc/pggrid.hxx
index 92a5d333c55a..a70dccfc3315 100644
--- a/sw/source/uibase/inc/pggrid.hxx
+++ b/sw/source/uibase/inc/pggrid.hxx
@@ -28,36 +28,36 @@
// TabPage Format/(Styles/)Page/Text grid
class SwTextGridPage: public SfxTabPage
{
- RadioButton* m_pNoGridRB;
- RadioButton* m_pLinesGridRB;
- RadioButton* m_pCharsGridRB;
- CheckBox* m_pSnapToCharsCB;
+ VclPtr<RadioButton> m_pNoGridRB;
+ VclPtr<RadioButton> m_pLinesGridRB;
+ VclPtr<RadioButton> m_pCharsGridRB;
+ VclPtr<CheckBox> m_pSnapToCharsCB;
- SwPageGridExample* m_pExampleWN;
+ VclPtr<SwPageGridExample> m_pExampleWN;
- VclFrame* m_pLayoutFL;
- NumericField* m_pLinesPerPageNF;
- FixedText* m_pLinesRangeFT;
+ VclPtr<VclFrame> m_pLayoutFL;
+ VclPtr<NumericField> m_pLinesPerPageNF;
+ VclPtr<FixedText> m_pLinesRangeFT;
- MetricField* m_pTextSizeMF;
+ VclPtr<MetricField> m_pTextSizeMF;
- FixedText* m_pCharsPerLineFT;
- NumericField* m_pCharsPerLineNF;
- FixedText* m_pCharsRangeFT;
+ VclPtr<FixedText> m_pCharsPerLineFT;
+ VclPtr<NumericField> m_pCharsPerLineNF;
+ VclPtr<FixedText> m_pCharsRangeFT;
- FixedText* m_pCharWidthFT;
- MetricField* m_pCharWidthMF;
+ VclPtr<FixedText> m_pCharWidthFT;
+ VclPtr<MetricField> m_pCharWidthMF;
- FixedText* m_pRubySizeFT;
- MetricField* m_pRubySizeMF;
+ VclPtr<FixedText> m_pRubySizeFT;
+ VclPtr<MetricField> m_pRubySizeMF;
- CheckBox* m_pRubyBelowCB;
+ VclPtr<CheckBox> m_pRubyBelowCB;
- VclFrame* m_pDisplayFL;
+ VclPtr<VclFrame> m_pDisplayFL;
- CheckBox* m_pDisplayCB;
- CheckBox* m_pPrintCB;
- ColorListBox* m_pColorLB;
+ VclPtr<CheckBox> m_pDisplayCB;
+ VclPtr<CheckBox> m_pPrintCB;
+ VclPtr<ColorListBox> m_pColorLB;
sal_Int32 m_nRubyUserValue;
bool m_bRubyUserValue;
@@ -68,7 +68,6 @@ class SwTextGridPage: public SfxTabPage
bool m_bVRulerChanged;
SwTextGridPage(vcl::Window *pParent, const SfxItemSet &rSet);
- virtual ~SwTextGridPage();
void UpdatePageSize(const SfxItemSet& rSet);
void PutGridItem(SfxItemSet& rSet);
@@ -84,6 +83,9 @@ class SwTextGridPage: public SfxTabPage
using SfxTabPage::DeactivatePage;
public:
+ virtual ~SwTextGridPage();
+ 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/prcntfld.hxx b/sw/source/uibase/inc/prcntfld.hxx
index 6675290b20b0..314b0b624060 100644
--- a/sw/source/uibase/inc/prcntfld.hxx
+++ b/sw/source/uibase/inc/prcntfld.hxx
@@ -26,7 +26,7 @@
//Wraps a MetricField with extra features, preferred to PercentField
class SW_DLLPUBLIC PercentField
{
- MetricField* m_pField;
+ VclPtr<MetricField> m_pField;
sal_Int64 nRefValue; // 100% value for conversion (in Twips)
sal_Int64 nOldMax;
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index b33a4518b625..60668bfbeabc 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -150,7 +150,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
{
// ViewWindow and handle to core
// current dispatcher shell
- SwPagePreviewWin* pViewWin;
+ VclPtr<SwPagePreviewWin> pViewWin;
//viewdata of the previous SwView and the new crsrposition
OUString sSwViewData;
//and the new cursor position if the user double click in the PagePreview
@@ -163,14 +163,14 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
Rectangle aVisArea;
// MDI control elements
- SwScrollbar *pHScrollbar;
- SwScrollbar *pVScrollbar;
+ VclPtr<SwScrollbar> pHScrollbar;
+ VclPtr<SwScrollbar> pVScrollbar;
bool mbHScrollbarEnabled;
bool mbVScrollbarEnabled;
- ImageButton *pPageUpBtn,
- *pPageDownBtn;
+ VclPtr<ImageButton> pPageUpBtn,
+ pPageDownBtn;
// dummy window for filling the lower right edge when both scrollbars are active
- ::vcl::Window *pScrollFill;
+ VclPtr<::vcl::Window> pScrollFill;
sal_uInt16 mnPageCount;
bool bNormalPrint;
diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx
index 39cfa7f47567..69121137d3e5 100644
--- a/sw/source/uibase/inc/redlndlg.hxx
+++ b/sw/source/uibase/inc/redlndlg.hxx
@@ -67,7 +67,7 @@ typedef std::vector<SvLBoxEntryPtr> SvLBoxEntryArr;
class SW_DLLPUBLIC SwRedlineAcceptDlg
{
- vcl::Window* pParentDlg;
+ VclPtr<vcl::Window> pParentDlg;
SwRedlineDataParentArr aRedlineParents;
SwRedlineDataChildArr aRedlineChildren;
SwRedlineDataParentSortArr aUsedSeqNo;
@@ -82,8 +82,8 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg
OUString sFmtCollSet;
OUString sFilterAction;
OUString sAutoFormat;
- SvxTPView* pTPView;
- SvxRedlinTable* pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
+ VclPtr<SvxTPView> pTPView;
+ VclPtr<SvxRedlinTable> pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
Link aOldSelectHdl;
Link aOldDeselectHdl;
bool bOnlyFormatedRedlines;
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index 21e444057659..5344404b3f22 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -61,41 +61,41 @@ typedef boost::ptr_set<SectRepr> SectReprArr;
class SwEditRegionDlg : public SfxModalDialog
{
- Edit* m_pCurName;
- SvTreeListBox* m_pTree;
-
- TriStateBox* m_pFileCB;
- CheckBox* m_pDDECB;
- VclContainer* m_pDDEFrame;
- FixedText* m_pFileNameFT;
- FixedText* m_pDDECommandFT;
- Edit* m_pFileNameED;
- PushButton* m_pFilePB;
- FixedText* m_pSubRegionFT;
- ComboBox* m_pSubRegionED;
+ VclPtr<Edit> m_pCurName;
+ VclPtr<SvTreeListBox> m_pTree;
+
+ VclPtr<TriStateBox> m_pFileCB;
+ VclPtr<CheckBox> m_pDDECB;
+ VclPtr<VclContainer> m_pDDEFrame;
+ VclPtr<FixedText> m_pFileNameFT;
+ VclPtr<FixedText> m_pDDECommandFT;
+ VclPtr<Edit> m_pFileNameED;
+ VclPtr<PushButton> m_pFilePB;
+ VclPtr<FixedText> m_pSubRegionFT;
+ VclPtr<ComboBox> m_pSubRegionED;
bool m_bSubRegionsFilled;
- TriStateBox* m_pProtectCB;
- CheckBox* m_pPasswdCB;
- PushButton* m_pPasswdPB;
+ VclPtr<TriStateBox> m_pProtectCB;
+ VclPtr<CheckBox> m_pPasswdCB;
+ VclPtr<PushButton> m_pPasswdPB;
- TriStateBox* m_pHideCB;
- FixedText* m_pConditionFT;
- ConditionEdit* m_pConditionED;
+ VclPtr<TriStateBox> m_pHideCB;
+ VclPtr<FixedText> m_pConditionFT;
+ VclPtr<ConditionEdit> m_pConditionED;
// #114856# edit in readonly sections
- TriStateBox* m_pEditInReadonlyCB;
+ VclPtr<TriStateBox> m_pEditInReadonlyCB;
- OKButton* m_pOK;
- PushButton* m_pOptionsPB;
- PushButton* m_pDismiss;
+ VclPtr<OKButton> m_pOK;
+ VclPtr<PushButton> m_pOptionsPB;
+ VclPtr<PushButton> m_pDismiss;
ImageList aImageIL;
SwWrtShell& rSh;
SectReprArr aSectReprArr;
const SwSection* pCurrSect;
sfx2::DocumentInserter* m_pDocInserter;
- vcl::Window* m_pOldDefDlgParent;
+ VclPtr<vcl::Window> m_pOldDefDlgParent;
bool bDontCheckPasswd :1;
bool bWeb :1;
@@ -140,27 +140,27 @@ public:
// dialog "insert region"
class SwInsertSectionTabPage : public SfxTabPage
{
- ComboBox* m_pCurName;
+ VclPtr<ComboBox> m_pCurName;
- CheckBox* m_pFileCB;
- CheckBox* m_pDDECB;
- FixedText* m_pDDECommandFT;
- FixedText* m_pFileNameFT;
- Edit* m_pFileNameED;
- PushButton* m_pFilePB;
- FixedText* m_pSubRegionFT;
- ComboBox* m_pSubRegionED;
+ VclPtr<CheckBox> m_pFileCB;
+ VclPtr<CheckBox> m_pDDECB;
+ VclPtr<FixedText> m_pDDECommandFT;
+ VclPtr<FixedText> m_pFileNameFT;
+ VclPtr<Edit> m_pFileNameED;
+ VclPtr<PushButton> m_pFilePB;
+ VclPtr<FixedText> m_pSubRegionFT;
+ VclPtr<ComboBox> m_pSubRegionED;
- CheckBox* m_pProtectCB;
- CheckBox* m_pPasswdCB;
- PushButton* m_pPasswdPB;
+ VclPtr<CheckBox> m_pProtectCB;
+ VclPtr<CheckBox> m_pPasswdCB;
+ VclPtr<PushButton> m_pPasswdPB;
- CheckBox* m_pHideCB;
- FixedText* m_pConditionFT;
- ConditionEdit* m_pConditionED;
+ VclPtr<CheckBox> m_pHideCB;
+ VclPtr<FixedText> m_pConditionFT;
+ VclPtr<ConditionEdit> m_pConditionED;
// #114856# edit in readonly sections
- CheckBox* m_pEditInReadonlyCB;
+ VclPtr<CheckBox> m_pEditInReadonlyCB;
OUString m_sFileName;
OUString m_sFilterName;
@@ -169,7 +169,7 @@ class SwInsertSectionTabPage : public SfxTabPage
::com::sun::star::uno::Sequence <sal_Int8 > m_aNewPasswd;
SwWrtShell* m_pWrtSh;
sfx2::DocumentInserter* m_pDocInserter;
- vcl::Window* m_pOldDefDlgParent;
+ VclPtr<vcl::Window> m_pOldDefDlgParent;
DECL_LINK( ChangeHideHdl, CheckBox * );
// #114856# edit in readonly sections
@@ -198,31 +198,31 @@ public:
class SwSectionFtnEndTabPage : public SfxTabPage
{
- CheckBox* pFtnNtAtTextEndCB;
+ VclPtr<CheckBox> pFtnNtAtTextEndCB;
- CheckBox* pFtnNtNumCB;
- FixedText* pFtnOffsetLbl;
- NumericField* pFtnOffsetFld;
+ VclPtr<CheckBox> pFtnNtNumCB;
+ VclPtr<FixedText> pFtnOffsetLbl;
+ VclPtr<NumericField> pFtnOffsetFld;
- CheckBox* pFtnNtNumFmtCB;
- FixedText* pFtnPrefixFT;
- Edit* pFtnPrefixED;
- SwNumberingTypeListBox* pFtnNumViewBox;
- FixedText* pFtnSuffixFT;
- Edit* pFtnSuffixED;
+ VclPtr<CheckBox> pFtnNtNumFmtCB;
+ VclPtr<FixedText> pFtnPrefixFT;
+ VclPtr<Edit> pFtnPrefixED;
+ VclPtr<SwNumberingTypeListBox> pFtnNumViewBox;
+ VclPtr<FixedText> pFtnSuffixFT;
+ VclPtr<Edit> pFtnSuffixED;
- CheckBox* pEndNtAtTextEndCB;
+ VclPtr<CheckBox> pEndNtAtTextEndCB;
- CheckBox* pEndNtNumCB;
- FixedText* pEndOffsetLbl;
- NumericField* pEndOffsetFld;
+ VclPtr<CheckBox> pEndNtNumCB;
+ VclPtr<FixedText> pEndOffsetLbl;
+ VclPtr<NumericField> pEndOffsetFld;
- CheckBox* pEndNtNumFmtCB;
- FixedText* pEndPrefixFT;
- Edit* pEndPrefixED;
- SwNumberingTypeListBox* pEndNumViewBox;
- FixedText* pEndSuffixFT;
- Edit* pEndSuffixED;
+ VclPtr<CheckBox> pEndNtNumFmtCB;
+ VclPtr<FixedText> pEndPrefixFT;
+ VclPtr<Edit> pEndPrefixED;
+ VclPtr<SwNumberingTypeListBox> pEndNumViewBox;
+ VclPtr<FixedText> pEndSuffixFT;
+ VclPtr<Edit> pEndSuffixED;
DECL_LINK( FootEndHdl, CheckBox * );
void ResetState( bool bFtn, const SwFmtFtnEndAtTxtEnd& );
@@ -230,6 +230,7 @@ class SwSectionFtnEndTabPage : public SfxTabPage
public:
SwSectionFtnEndTabPage( vcl::Window *pParent, const SfxItemSet &rAttrSet );
virtual ~SwSectionFtnEndTabPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;
@@ -240,14 +241,15 @@ public:
class SwSectionIndentTabPage : public SfxTabPage
{
- MetricField* m_pBeforeMF;
- MetricField* m_pAfterMF;
- SvxParaPrevWindow* m_pPreviewWin;
+ VclPtr<MetricField> m_pBeforeMF;
+ VclPtr<MetricField> m_pAfterMF;
+ VclPtr<SvxParaPrevWindow> m_pPreviewWin;
DECL_LINK(IndentModifyHdl, void *);
public:
SwSectionIndentTabPage( vcl::Window *pParent, const SfxItemSet &rAttrSet );
virtual ~SwSectionIndentTabPage();
+ 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/rowht.hxx b/sw/source/uibase/inc/rowht.hxx
index 25d9e7c918f3..9727c8d9d555 100644
--- a/sw/source/uibase/inc/rowht.hxx
+++ b/sw/source/uibase/inc/rowht.hxx
@@ -28,8 +28,8 @@ class SwWrtShell;
class SwTableHeightDlg : public SvxStandardDialog
{
- MetricField* m_pHeightEdit;
- CheckBox* m_pAutoHeightCB;
+ VclPtr<MetricField> m_pHeightEdit;
+ VclPtr<CheckBox> m_pAutoHeightCB;
SwWrtShell &rSh;
protected:
@@ -37,6 +37,8 @@ protected:
public:
SwTableHeightDlg( vcl::Window *pParent, SwWrtShell &rS );
+ virtual ~SwTableHeightDlg();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/uibase/inc/selglos.hxx b/sw/source/uibase/inc/selglos.hxx
index 501af9a28200..e67f3788a2f2 100644
--- a/sw/source/uibase/inc/selglos.hxx
+++ b/sw/source/uibase/inc/selglos.hxx
@@ -29,11 +29,14 @@
class SwSelGlossaryDlg : public ModalDialog
{
protected:
- ListBox* m_pGlosBox;
+ VclPtr<ListBox> m_pGlosBox;
DECL_LINK(DoubleClickHdl, ListBox*);
public:
SwSelGlossaryDlg(vcl::Window * pParent, const OUString &rShortName);
+ virtual ~SwSelGlossaryDlg();
+ virtual void dispose() SAL_OVERRIDE;
+
void InsertGlos(const OUString &rRegion, const OUString &rGlosName)
{
const OUString aTmp = rRegion + ":" + rGlosName;
diff --git a/sw/source/uibase/inc/shdwcrsr.hxx b/sw/source/uibase/inc/shdwcrsr.hxx
index 631fde3d7f5b..dcb38480dd16 100644
--- a/sw/source/uibase/inc/shdwcrsr.hxx
+++ b/sw/source/uibase/inc/shdwcrsr.hxx
@@ -27,7 +27,7 @@ namespace vcl { class Window; }
class SwShadowCursor
{
- vcl::Window* pWin;
+ VclPtr<vcl::Window> pWin;
Color aCol;
Point aOldPt;
long nOldHeight;
diff --git a/sw/source/uibase/inc/splittbl.hxx b/sw/source/uibase/inc/splittbl.hxx
index 3bcce8bb03bc..cc6a96d2c5f7 100644
--- a/sw/source/uibase/inc/splittbl.hxx
+++ b/sw/source/uibase/inc/splittbl.hxx
@@ -27,10 +27,10 @@ class SwWrtShell;
class SwSplitTblDlg : public SvxStandardDialog
{
- RadioButton* mpCntntCopyRB;
- RadioButton* mpBoxAttrCopyWithParaRB ;
- RadioButton* mpBoxAttrCopyNoParaRB ;
- RadioButton* mpBorderCopyRB;
+ VclPtr<RadioButton> mpCntntCopyRB;
+ VclPtr<RadioButton> mpBoxAttrCopyWithParaRB ;
+ VclPtr<RadioButton> mpBoxAttrCopyNoParaRB ;
+ VclPtr<RadioButton> mpBorderCopyRB;
SwWrtShell &rShell;
sal_uInt16 m_nSplit;
@@ -40,6 +40,8 @@ protected:
public:
SwSplitTblDlg( vcl::Window *pParent, SwWrtShell &rSh );
+ virtual ~SwSplitTblDlg();
+ virtual void dispose() SAL_OVERRIDE;
sal_uInt16 GetSplitMode() const { return m_nSplit; }
};
diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx
index 0ead065a48d2..8e1a411c645a 100644
--- a/sw/source/uibase/inc/srcedtw.hxx
+++ b/sw/source/uibase/inc/srcedtw.hxx
@@ -69,9 +69,9 @@ private:
ExtTextView* pTextView;
ExtTextEngine* pTextEngine;
- TextViewOutWin* pOutWin;
- ScrollBar *pHScrollbar,
- *pVScrollbar;
+ VclPtr<TextViewOutWin> pOutWin;
+ VclPtr<ScrollBar> pHScrollbar,
+ pVScrollbar;
SwSrcView* pSrcView;
diff --git a/sw/source/uibase/inc/srtdlg.hxx b/sw/source/uibase/inc/srtdlg.hxx
index 592e1007b2b1..7facf548a45d 100644
--- a/sw/source/uibase/inc/srtdlg.hxx
+++ b/sw/source/uibase/inc/srtdlg.hxx
@@ -31,38 +31,38 @@ class CollatorResource;
class SwSortDlg : public SvxStandardDialog
{
- FixedText* m_pColLbl;
- FixedText* m_pTypLbl;
-
- CheckBox* m_pKeyCB1;
- NumericField* m_pColEdt1;
- ListBox* m_pTypDLB1;
- RadioButton* m_pSortUp1RB;
- RadioButton* m_pSortDn1RB;
-
- CheckBox* m_pKeyCB2;
- NumericField* m_pColEdt2;
- ListBox* m_pTypDLB2;
- RadioButton* m_pSortUp2RB;
- RadioButton* m_pSortDn2RB;
-
- CheckBox* m_pKeyCB3;
- NumericField* m_pColEdt3;
- ListBox* m_pTypDLB3;
- RadioButton* m_pSortUp3RB;
- RadioButton* m_pSortDn3RB;
-
- RadioButton* m_pColumnRB;
- RadioButton* m_pRowRB;
-
- RadioButton* m_pDelimTabRB;
- RadioButton* m_pDelimFreeRB;
- Edit* m_pDelimEdt;
- PushButton* m_pDelimPB;
-
- SvxLanguageBox* m_pLangLB;
-
- CheckBox* m_pCaseCB;
+ VclPtr<FixedText> m_pColLbl;
+ VclPtr<FixedText> m_pTypLbl;
+
+ VclPtr<CheckBox> m_pKeyCB1;
+ VclPtr<NumericField> m_pColEdt1;
+ VclPtr<ListBox> m_pTypDLB1;
+ VclPtr<RadioButton> m_pSortUp1RB;
+ VclPtr<RadioButton> m_pSortDn1RB;
+
+ VclPtr<CheckBox> m_pKeyCB2;
+ VclPtr<NumericField> m_pColEdt2;
+ VclPtr<ListBox> m_pTypDLB2;
+ VclPtr<RadioButton> m_pSortUp2RB;
+ VclPtr<RadioButton> m_pSortDn2RB;
+
+ VclPtr<CheckBox> m_pKeyCB3;
+ VclPtr<NumericField> m_pColEdt3;
+ VclPtr<ListBox> m_pTypDLB3;
+ VclPtr<RadioButton> m_pSortUp3RB;
+ VclPtr<RadioButton> m_pSortDn3RB;
+
+ VclPtr<RadioButton> m_pColumnRB;
+ VclPtr<RadioButton> m_pRowRB;
+
+ VclPtr<RadioButton> m_pDelimTabRB;
+ VclPtr<RadioButton> m_pDelimFreeRB;
+ VclPtr<Edit> m_pDelimEdt;
+ VclPtr<PushButton> m_pDelimPB;
+
+ VclPtr<SvxLanguageBox> m_pLangLB;
+
+ VclPtr<CheckBox> m_pCaseCB;
OUString aColTxt;
OUString aRowTxt;
diff --git a/sw/source/uibase/inc/swmessdialog.hxx b/sw/source/uibase/inc/swmessdialog.hxx
index da9c8afe32fd..c8028265e616 100644
--- a/sw/source/uibase/inc/swmessdialog.hxx
+++ b/sw/source/uibase/inc/swmessdialog.hxx
@@ -20,14 +20,16 @@ class VclMultiLineEdit;
class SwMessageAndEditDialog : public ModalDialog
{
protected:
- OKButton* m_pOKPB;
- FixedImage* m_pImageIM;
- VclMultiLineEdit* m_pPrimaryMessage;
- VclMultiLineEdit* m_pSecondaryMessage;
- Edit* m_pEdit;
+ VclPtr<OKButton> m_pOKPB;
+ VclPtr<FixedImage> m_pImageIM;
+ VclPtr<VclMultiLineEdit> m_pPrimaryMessage;
+ VclPtr<VclMultiLineEdit> m_pSecondaryMessage;
+ VclPtr<Edit> m_pEdit;
public:
SwMessageAndEditDialog(vcl::Window* pParent, const OUString& rID,
const OUString& rUIXMLDescription);
+ virtual ~SwMessageAndEditDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
#endif // INCLUDED_SW_SOURCE_UIBASE_INC_SWMESSDIALOG_HXX
diff --git a/sw/source/uibase/inc/swrenamexnameddlg.hxx b/sw/source/uibase/inc/swrenamexnameddlg.hxx
index aefb1efe0e91..84967e6fd9df 100644
--- a/sw/source/uibase/inc/swrenamexnameddlg.hxx
+++ b/sw/source/uibase/inc/swrenamexnameddlg.hxx
@@ -32,9 +32,9 @@
class SwRenameXNamedDlg : public ModalDialog
{
- Edit* m_pNewNameED;
+ VclPtr<Edit> m_pNewNameED;
TextFilter m_aTextFilter;
- OKButton* m_pOk;
+ VclPtr<OKButton> m_pOk;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess;
@@ -48,6 +48,8 @@ public:
SwRenameXNamedDlg( vcl::Window* pParent,
::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed,
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess );
+ virtual ~SwRenameXNamedDlg();
+ virtual void dispose() SAL_OVERRIDE;
void SetForbiddenChars(const OUString& rSet)
{
diff --git a/sw/source/uibase/inc/swruler.hxx b/sw/source/uibase/inc/swruler.hxx
index 19b877f8253f..6d2469015bdd 100644
--- a/sw/source/uibase/inc/swruler.hxx
+++ b/sw/source/uibase/inc/swruler.hxx
@@ -34,6 +34,7 @@ public:
SfxBindings& rBindings,
WinBits nWinStyle);
virtual ~SwCommentRuler ();
+ virtual void dispose() SAL_OVERRIDE;
/**
* Paint the ruler.
@@ -43,7 +44,7 @@ public:
protected:
SwViewShell * mpViewShell; //< Shell to check if there is any comments on doc and their visibility
- SwEditWin * mpSwWin; //< Used to get SwView to change the SideBar visibility
+ VclPtr<SwEditWin> mpSwWin; //< Used to get SwView to change the SideBar visibility
bool mbIsHighlighted; //< If comment control is highlighted (mouse is over it)
Timer maFadeTimer; //< Timer for high/'low'light fading
int mnFadeRate; //< From 0 to 100. 0 means not highlighted.
diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx
index a36b10853ba0..f9b4a2e50d57 100644
--- a/sw/source/uibase/inc/swuiccoll.hxx
+++ b/sw/source/uibase/inc/swuiccoll.hxx
@@ -26,18 +26,18 @@ class SwFmt;
class SwCondCollPage : public SfxTabPage
{
- CheckBox* m_pConditionCB;
+ VclPtr<CheckBox> m_pConditionCB;
- FixedText* m_pContextFT;
- FixedText* m_pUsedFT;
- SvTabListBox* m_pTbLinks;
+ VclPtr<FixedText> m_pContextFT;
+ VclPtr<FixedText> m_pUsedFT;
+ VclPtr<SvTabListBox> m_pTbLinks;
- FixedText* m_pStyleFT;
- ListBox* m_pStyleLB;
- ListBox* m_pFilterLB;
+ VclPtr<FixedText> m_pStyleFT;
+ VclPtr<ListBox> m_pStyleLB;
+ VclPtr<ListBox> m_pFilterLB;
- PushButton* m_pRemovePB;
- PushButton* m_pAssignPB;
+ VclPtr<PushButton> m_pRemovePB;
+ VclPtr<PushButton> m_pAssignPB;
std::vector<OUString> m_aStrArr;
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index 47cfee668785..27e0430578f3 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -61,8 +61,8 @@ struct SwIndexSections_Impl;
class SwMultiTOXTabDialog : public SfxTabDialog
{
- vcl::Window* m_pExampleContainerWIN;
- CheckBox* m_pShowExampleCB;
+ VclPtr<vcl::Window> m_pExampleContainerWIN;
+ VclPtr<CheckBox> m_pShowExampleCB;
SwTOXMgr* pMgr;
SwWrtShell& rSh;
@@ -131,65 +131,65 @@ class IndexEntrySupplierWrapper;
class SwTOXSelectTabPage : public SfxTabPage
{
- Edit* m_pTitleED;
- FixedText* m_pTypeFT;
- ListBox* m_pTypeLB;
- CheckBox* m_pReadOnlyCB;
+ VclPtr<Edit> m_pTitleED;
+ VclPtr<FixedText> m_pTypeFT;
+ VclPtr<ListBox> m_pTypeLB;
+ VclPtr<CheckBox> m_pReadOnlyCB;
- VclContainer* m_pAreaFrame;
- ListBox* m_pAreaLB;
- FixedText* m_pLevelFT; //content, user
- NumericField* m_pLevelNF; //content, user
+ VclPtr<VclContainer> m_pAreaFrame;
+ VclPtr<ListBox> m_pAreaLB;
+ VclPtr<FixedText> m_pLevelFT; //content, user
+ VclPtr<NumericField> m_pLevelNF; //content, user
//content
- VclContainer* m_pCreateFrame; // content, user, illustration
- CheckBox* m_pFromHeadingsCB;
- CheckBox* m_pAddStylesCB;
- PushButton* m_pAddStylesPB;
+ VclPtr<VclContainer> m_pCreateFrame; // content, user, illustration
+ VclPtr<CheckBox> m_pFromHeadingsCB;
+ VclPtr<CheckBox> m_pAddStylesCB;
+ VclPtr<PushButton> m_pAddStylesPB;
//user
- CheckBox* m_pFromTablesCB;
- CheckBox* m_pFromFramesCB;
- CheckBox* m_pFromGraphicsCB;
- CheckBox* m_pFromOLECB;
- CheckBox* m_pLevelFromChapterCB;
+ VclPtr<CheckBox> m_pFromTablesCB;
+ VclPtr<CheckBox> m_pFromFramesCB;
+ VclPtr<CheckBox> m_pFromGraphicsCB;
+ VclPtr<CheckBox> m_pFromOLECB;
+ VclPtr<CheckBox> m_pLevelFromChapterCB;
//illustration + table
- RadioButton* m_pFromCaptionsRB;
- RadioButton* m_pFromObjectNamesRB;
+ VclPtr<RadioButton> m_pFromCaptionsRB;
+ VclPtr<RadioButton> m_pFromObjectNamesRB;
//illustration and tables
- FixedText* m_pCaptionSequenceFT;
- ListBox* m_pCaptionSequenceLB;
- FixedText* m_pDisplayTypeFT;
- ListBox* m_pDisplayTypeLB;
+ VclPtr<FixedText> m_pCaptionSequenceFT;
+ VclPtr<ListBox> m_pCaptionSequenceLB;
+ VclPtr<FixedText> m_pDisplayTypeFT;
+ VclPtr<ListBox> m_pDisplayTypeLB;
//all but illustration and table
- CheckBox* m_pTOXMarksCB;
+ VclPtr<CheckBox> m_pTOXMarksCB;
//index only
- VclContainer* m_pIdxOptionsFrame;
- CheckBox* m_pCollectSameCB;
- CheckBox* m_pUseFFCB;
- CheckBox* m_pUseDashCB;
- CheckBox* m_pCaseSensitiveCB;
- CheckBox* m_pInitialCapsCB;
- CheckBox* m_pKeyAsEntryCB;
- CheckBox* m_pFromFileCB;
- MenuButton* m_pAutoMarkPB;
+ VclPtr<VclContainer> m_pIdxOptionsFrame;
+ VclPtr<CheckBox> m_pCollectSameCB;
+ VclPtr<CheckBox> m_pUseFFCB;
+ VclPtr<CheckBox> m_pUseDashCB;
+ VclPtr<CheckBox> m_pCaseSensitiveCB;
+ VclPtr<CheckBox> m_pInitialCapsCB;
+ VclPtr<CheckBox> m_pKeyAsEntryCB;
+ VclPtr<CheckBox> m_pFromFileCB;
+ VclPtr<MenuButton> m_pAutoMarkPB;
// object only
SwOLENames aFromNames;
- SvxCheckListBox* m_pFromObjCLB;
- VclContainer* m_pFromObjFrame;
+ VclPtr<SvxCheckListBox> m_pFromObjCLB;
+ VclPtr<VclContainer> m_pFromObjFrame;
- CheckBox* m_pSequenceCB;
- ListBox* m_pBracketLB;
- VclContainer* m_pAuthorityFrame;
+ VclPtr<CheckBox> m_pSequenceCB;
+ VclPtr<ListBox> m_pBracketLB;
+ VclPtr<VclContainer> m_pAuthorityFrame;
//all
- VclContainer* m_pSortFrame;
- SvxLanguageBox* m_pLanguageLB;
- ListBox* m_pSortAlgorithmLB;
+ VclPtr<VclContainer> m_pSortFrame;
+ VclPtr<SvxLanguageBox> m_pLanguageLB;
+ VclPtr<ListBox> m_pSortAlgorithmLB;
IndexEntryResource* pIndexRes;
@@ -243,15 +243,15 @@ class SwTOXEntryTabPage;
class SwTokenWindow : public VclHBox, public VclBuilderContainer
{
- typedef std::vector<Control*>::iterator ctrl_iterator;
- typedef std::vector<Control*>::const_iterator ctrl_const_iterator;
- typedef std::vector<Control*>::reverse_iterator ctrl_reverse_iterator;
- typedef std::vector<Control*>::const_reverse_iterator ctrl_const_reverse_iterator;
-
- Button* m_pLeftScrollWin;
- vcl::Window* m_pCtrlParentWin;
- Button* m_pRightScrollWin;
- std::vector<Control*> aControlList;
+ typedef std::vector<VclPtr<Control> >::iterator ctrl_iterator;
+ typedef std::vector<VclPtr<Control> >::const_iterator ctrl_const_iterator;
+ typedef std::vector<VclPtr<Control> >::reverse_iterator ctrl_reverse_iterator;
+ typedef std::vector<VclPtr<Control> >::const_reverse_iterator ctrl_const_reverse_iterator;
+
+ VclPtr<Button> m_pLeftScrollWin;
+ VclPtr<vcl::Window> m_pCtrlParentWin;
+ VclPtr<Button> m_pRightScrollWin;
+ std::vector<VclPtr<Control> > aControlList;
SwForm* pForm;
sal_uInt16 nLevel;
bool bValid;
@@ -259,14 +259,14 @@ class SwTokenWindow : public VclHBox, public VclBuilderContainer
OUString aButtonHelpTexts[TOKEN_END]; // QuickHelpText of the buttons
OUString sCharStyle;
Link aButtonSelectedHdl;
- Control* pActiveCtrl;
+ VclPtr<Control> pActiveCtrl;
Link aModifyHdl;
OUString accessibleName;
OUString sAdditionalAccnameString1;
OUString sAdditionalAccnameString2;
OUString sAdditionalAccnameString3;
- SwTOXEntryTabPage* m_pParent;
+ VclPtr<SwTOXEntryTabPage> m_pParent;
DECL_LINK(EditResize, Edit*);
DECL_LINK(NextItemHdl, SwTOXEdit* );
@@ -328,76 +328,79 @@ class SwTOXEntryTabPage;
class SwIdxTreeListBox : public SvTreeListBox
{
- SwTOXEntryTabPage* pParent;
+ VclPtr<SwTOXEntryTabPage> pParent;
virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
public:
SwIdxTreeListBox(vcl::Window* pPar, WinBits nStyle);
+ virtual ~SwIdxTreeListBox();
+ virtual void dispose() SAL_OVERRIDE;
+
void SetTabPage(SwTOXEntryTabPage* pPar) { pParent = pPar; }
};
class SwTOXEntryTabPage : public SfxTabPage
{
- FixedText* m_pLevelFT;
- SwIdxTreeListBox* m_pLevelLB;
+ VclPtr<FixedText> m_pLevelFT;
+ VclPtr<SwIdxTreeListBox> m_pLevelLB;
- SwTokenWindow* m_pTokenWIN;
+ VclPtr<SwTokenWindow> m_pTokenWIN;
- PushButton* m_pAllLevelsPB;
+ VclPtr<PushButton> m_pAllLevelsPB;
- PushButton* m_pEntryNoPB;
- PushButton* m_pEntryPB;
- PushButton* m_pTabPB;
- PushButton* m_pChapterInfoPB;
- PushButton* m_pPageNoPB;
- PushButton* m_pHyperLinkPB;
+ VclPtr<PushButton> m_pEntryNoPB;
+ VclPtr<PushButton> m_pEntryPB;
+ VclPtr<PushButton> m_pTabPB;
+ VclPtr<PushButton> m_pChapterInfoPB;
+ VclPtr<PushButton> m_pPageNoPB;
+ VclPtr<PushButton> m_pHyperLinkPB;
- ListBox* m_pAuthFieldsLB;
- PushButton* m_pAuthInsertPB;
- PushButton* m_pAuthRemovePB;
+ VclPtr<ListBox> m_pAuthFieldsLB;
+ VclPtr<PushButton> m_pAuthInsertPB;
+ VclPtr<PushButton> m_pAuthRemovePB;
- ListBox* m_pCharStyleLB; // character style of the current token
- PushButton* m_pEditStylePB;
+ VclPtr<ListBox> m_pCharStyleLB; // character style of the current token
+ VclPtr<PushButton> m_pEditStylePB;
- FixedText* m_pChapterEntryFT;
- ListBox* m_pChapterEntryLB; // type of chapter info
+ VclPtr<FixedText> m_pChapterEntryFT;
+ VclPtr<ListBox> m_pChapterEntryLB; // type of chapter info
- FixedText* m_pNumberFormatFT;
- ListBox* m_pNumberFormatLB; //!< format for numbering (E#)
+ VclPtr<FixedText> m_pNumberFormatFT;
+ VclPtr<ListBox> m_pNumberFormatLB; //!< format for numbering (E#)
- FixedText* m_pEntryOutlineLevelFT; //!< Fixed text, for i53420
- NumericField* m_pEntryOutlineLevelNF; //!< level to evaluate outline level to, for i53420
+ VclPtr<FixedText> m_pEntryOutlineLevelFT; //!< Fixed text, for i53420
+ VclPtr<NumericField> m_pEntryOutlineLevelNF; //!< level to evaluate outline level to, for i53420
- FixedText* m_pFillCharFT;
- ComboBox* m_pFillCharCB; // fill char for tab stop
+ VclPtr<FixedText> m_pFillCharFT;
+ VclPtr<ComboBox> m_pFillCharCB; // fill char for tab stop
- FixedText* m_pTabPosFT;
- MetricField* m_pTabPosMF; // tab stop position
- CheckBox* m_pAutoRightCB;
+ VclPtr<FixedText> m_pTabPosFT;
+ VclPtr<MetricField> m_pTabPosMF; // tab stop position
+ VclPtr<CheckBox> m_pAutoRightCB;
- VclContainer* m_pFormatFrame;
- FixedText* m_pMainEntryStyleFT;
- ListBox* m_pMainEntryStyleLB; // character style of main entries in indexes
- CheckBox* m_pAlphaDelimCB;
- CheckBox* m_pCommaSeparatedCB;
- CheckBox* m_pRelToStyleCB; // position relative to the right margin of the para style
+ VclPtr<VclContainer> m_pFormatFrame;
+ VclPtr<FixedText> m_pMainEntryStyleFT;
+ VclPtr<ListBox> m_pMainEntryStyleLB; // character style of main entries in indexes
+ VclPtr<CheckBox> m_pAlphaDelimCB;
+ VclPtr<CheckBox> m_pCommaSeparatedCB;
+ VclPtr<CheckBox> m_pRelToStyleCB; // position relative to the right margin of the para style
- VclContainer* m_pSortingFrame;
- RadioButton* m_pSortDocPosRB;
- RadioButton* m_pSortContentRB;
+ VclPtr<VclContainer> m_pSortingFrame;
+ VclPtr<RadioButton> m_pSortDocPosRB;
+ VclPtr<RadioButton> m_pSortContentRB;
- VclContainer* m_pSortKeyFrame;
- ListBox* m_pFirstKeyLB;
- RadioButton* m_pFirstSortUpRB;
- RadioButton* m_pFirstSortDownRB;
+ VclPtr<VclContainer> m_pSortKeyFrame;
+ VclPtr<ListBox> m_pFirstKeyLB;
+ VclPtr<RadioButton> m_pFirstSortUpRB;
+ VclPtr<RadioButton> m_pFirstSortDownRB;
- ListBox* m_pSecondKeyLB;
- RadioButton* m_pSecondSortUpRB;
- RadioButton* m_pSecondSortDownRB;
+ VclPtr<ListBox> m_pSecondKeyLB;
+ VclPtr<RadioButton> m_pSecondSortUpRB;
+ VclPtr<RadioButton> m_pSecondSortDownRB;
- ListBox* m_pThirdKeyLB;
- RadioButton* m_pThirdSortUpRB;
- RadioButton* m_pThirdSortDownRB;
+ VclPtr<ListBox> m_pThirdKeyLB;
+ VclPtr<RadioButton> m_pThirdSortUpRB;
+ VclPtr<RadioButton> m_pThirdSortDownRB;
OUString sDelimStr;
OUString sLevelStr;
@@ -437,6 +440,7 @@ class SwTOXEntryTabPage : public SfxTabPage
public:
SwTOXEntryTabPage(vcl::Window* pParent, const SfxItemSet& rAttrSet);
virtual ~SwTOXEntryTabPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;
@@ -456,11 +460,11 @@ public:
class SwTOXStylesTabPage : public SfxTabPage
{
- ListBox* m_pLevelLB;
- PushButton* m_pAssignBT;
- ListBox* m_pParaLayLB;
- PushButton* m_pStdBT;
- PushButton* m_pEditStyleBT;
+ VclPtr<ListBox> m_pLevelLB;
+ VclPtr<PushButton> m_pAssignBT;
+ VclPtr<ListBox> m_pParaLayLB;
+ VclPtr<PushButton> m_pStdBT;
+ VclPtr<PushButton> m_pEditStyleBT;
SwForm* m_pCurrentForm;
diff --git a/sw/source/uibase/inc/swuiidxmrk.hxx b/sw/source/uibase/inc/swuiidxmrk.hxx
index 0f559a63eb85..040c97d7628a 100644
--- a/sw/source/uibase/inc/swuiidxmrk.hxx
+++ b/sw/source/uibase/inc/swuiidxmrk.hxx
@@ -51,40 +51,40 @@ class SwIndexMarkPane
friend class SwIndexMarkFloatDlg;
friend class SwIndexMarkModalDlg;
- VclFrame* m_pFrame;
- FixedText* m_pTypeFT;
- ListBox* m_pTypeDCB;
- PushButton* m_pNewBT;
-
- Edit* m_pEntryED;
- FixedText* m_pPhoneticFT0;
- Edit* m_pPhoneticED0;
-
- FixedText* m_pKey1FT;
- ComboBox* m_pKey1DCB;
- FixedText* m_pPhoneticFT1;
- Edit* m_pPhoneticED1;
-
- FixedText* m_pKey2FT;
- ComboBox* m_pKey2DCB;
- FixedText* m_pPhoneticFT2;
- Edit* m_pPhoneticED2;
-
- FixedText* m_pLevelFT;
- NumericField* m_pLevelNF;
- CheckBox* m_pMainEntryCB;
- CheckBox* m_pApplyToAllCB;
- CheckBox* m_pSearchCaseSensitiveCB;
- CheckBox* m_pSearchCaseWordOnlyCB;
-
- PushButton* m_pOKBT;
- CloseButton* m_pCloseBT;
- PushButton* m_pDelBT;
-
- PushButton* m_pPrevSameBT;
- PushButton* m_pNextSameBT;
- PushButton* m_pPrevBT;
- PushButton* m_pNextBT;
+ VclPtr<VclFrame> m_pFrame;
+ VclPtr<FixedText> m_pTypeFT;
+ VclPtr<ListBox> m_pTypeDCB;
+ VclPtr<PushButton> m_pNewBT;
+
+ VclPtr<Edit> m_pEntryED;
+ VclPtr<FixedText> m_pPhoneticFT0;
+ VclPtr<Edit> m_pPhoneticED0;
+
+ VclPtr<FixedText> m_pKey1FT;
+ VclPtr<ComboBox> m_pKey1DCB;
+ VclPtr<FixedText> m_pPhoneticFT1;
+ VclPtr<Edit> m_pPhoneticED1;
+
+ VclPtr<FixedText> m_pKey2FT;
+ VclPtr<ComboBox> m_pKey2DCB;
+ VclPtr<FixedText> m_pPhoneticFT2;
+ VclPtr<Edit> m_pPhoneticED2;
+
+ VclPtr<FixedText> m_pLevelFT;
+ VclPtr<NumericField> m_pLevelNF;
+ VclPtr<CheckBox> m_pMainEntryCB;
+ VclPtr<CheckBox> m_pApplyToAllCB;
+ VclPtr<CheckBox> m_pSearchCaseSensitiveCB;
+ VclPtr<CheckBox> m_pSearchCaseWordOnlyCB;
+
+ VclPtr<PushButton> m_pOKBT;
+ VclPtr<CloseButton> m_pCloseBT;
+ VclPtr<PushButton> m_pDelBT;
+
+ VclPtr<PushButton> m_pPrevSameBT;
+ VclPtr<PushButton> m_pNextSameBT;
+ VclPtr<PushButton> m_pPrevBT;
+ VclPtr<PushButton> m_pNextBT;
OUString aOrgStr;
bool bDel;
@@ -182,17 +182,17 @@ class SwAuthorMarkPane
friend class SwAuthMarkModalDlg;
friend class SwAuthMarkFloatDlg;
- RadioButton* m_pFromComponentRB;
- RadioButton* m_pFromDocContentRB;
- FixedText* m_pAuthorFI;
- FixedText* m_pTitleFI;
- Edit* m_pEntryED;
- ListBox* m_pEntryLB;
-
- PushButton* m_pActionBT;
- CloseButton* m_pCloseBT;
- PushButton* m_pCreateEntryPB;
- PushButton* m_pEditEntryPB;
+ VclPtr<RadioButton> m_pFromComponentRB;
+ VclPtr<RadioButton> m_pFromDocContentRB;
+ VclPtr<FixedText> m_pAuthorFI;
+ VclPtr<FixedText> m_pTitleFI;
+ VclPtr<Edit> m_pEntryED;
+ VclPtr<ListBox> m_pEntryLB;
+
+ VclPtr<PushButton> m_pActionBT;
+ VclPtr<CloseButton> m_pCloseBT;
+ VclPtr<PushButton> m_pCreateEntryPB;
+ VclPtr<PushButton> m_pEditEntryPB;
bool bNewEntry;
bool bBibAccessInitialized;
diff --git a/sw/source/uibase/inc/syncbtn.hxx b/sw/source/uibase/inc/syncbtn.hxx
index 76f8be74749a..83a16070a5d7 100644
--- a/sw/source/uibase/inc/syncbtn.hxx
+++ b/sw/source/uibase/inc/syncbtn.hxx
@@ -25,12 +25,14 @@
class SwSyncBtnDlg : public SfxFloatingWindow
{
- PushButton* m_pSyncBtn;
+ VclPtr<PushButton> m_pSyncBtn;
DECL_LINK( BtnHdl, void* );
public:
SwSyncBtnDlg(SfxBindings*, SfxChildWindow*, vcl::Window *pParent);
+ virtual ~SwSyncBtnDlg();
+ virtual void dispose() SAL_OVERRIDE;
};
class SwSyncChildWin : public SfxChildWindow
diff --git a/sw/source/uibase/inc/tautofmt.hxx b/sw/source/uibase/inc/tautofmt.hxx
index 019de4103b9c..fac2b1224840 100644
--- a/sw/source/uibase/inc/tautofmt.hxx
+++ b/sw/source/uibase/inc/tautofmt.hxx
@@ -39,18 +39,18 @@ enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE };
class SwAutoFormatDlg : public SfxModalDialog
{
- ListBox* m_pLbFormat;
- VclContainer* m_pFormatting;
- CheckBox* m_pBtnNumFormat;
- CheckBox* m_pBtnBorder;
- CheckBox* m_pBtnFont;
- CheckBox* m_pBtnPattern;
- CheckBox* m_pBtnAlignment;
- OKButton* m_pBtnOk;
- CancelButton* m_pBtnCancel;
- PushButton* m_pBtnAdd;
- PushButton* m_pBtnRemove;
- PushButton* m_pBtnRename;
+ VclPtr<ListBox> m_pLbFormat;
+ VclPtr<VclContainer> m_pFormatting;
+ VclPtr<CheckBox> m_pBtnNumFormat;
+ VclPtr<CheckBox> m_pBtnBorder;
+ VclPtr<CheckBox> m_pBtnFont;
+ VclPtr<CheckBox> m_pBtnPattern;
+ VclPtr<CheckBox> m_pBtnAlignment;
+ VclPtr<OKButton> m_pBtnOk;
+ VclPtr<CancelButton> m_pBtnCancel;
+ VclPtr<PushButton> m_pBtnAdd;
+ VclPtr<PushButton> m_pBtnRemove;
+ VclPtr<PushButton> m_pBtnRename;
OUString aStrTitle;
OUString aStrLabel;
OUString aStrClose;
@@ -58,7 +58,7 @@ class SwAutoFormatDlg : public SfxModalDialog
OUString aStrDelMsg;
OUString aStrRenameTitle;
OUString aStrInvalidFmt;
- AutoFmtPreview* m_pWndPreview;
+ VclPtr<AutoFmtPreview> m_pWndPreview;
SwWrtShell* pShell;
SwTableAutoFmtTbl* pTableTbl;
diff --git a/sw/source/uibase/inc/titlepage.hxx b/sw/source/uibase/inc/titlepage.hxx
index 59ee2e180fab..a881cc41ff6c 100644
--- a/sw/source/uibase/inc/titlepage.hxx
+++ b/sw/source/uibase/inc/titlepage.hxx
@@ -24,22 +24,22 @@ class SwPageDesc;
class SwTitlePageDlg : public SfxModalDialog
{
private:
- RadioButton* m_pUseExistingPagesRB;
- NumericField* m_pPageCountNF;
+ VclPtr<RadioButton> m_pUseExistingPagesRB;
+ VclPtr<NumericField> m_pPageCountNF;
- RadioButton* m_pDocumentStartRB;
- RadioButton* m_pPageStartRB;
- NumericField* m_pPageStartNF;
+ VclPtr<RadioButton> m_pDocumentStartRB;
+ VclPtr<RadioButton> m_pPageStartRB;
+ VclPtr<NumericField> m_pPageStartNF;
- CheckBox* m_pRestartNumberingCB;
- NumericField* m_pRestartNumberingNF;
- CheckBox* m_pSetPageNumberCB;
- NumericField* m_pSetPageNumberNF;
+ VclPtr<CheckBox> m_pRestartNumberingCB;
+ VclPtr<NumericField> m_pRestartNumberingNF;
+ VclPtr<CheckBox> m_pSetPageNumberCB;
+ VclPtr<NumericField> m_pSetPageNumberNF;
- ListBox* m_pPagePropertiesLB;
- PushButton* m_pPagePropertiesPB;
+ VclPtr<ListBox> m_pPagePropertiesLB;
+ VclPtr<PushButton> m_pPagePropertiesPB;
- OKButton* m_pOkPB;
+ VclPtr<OKButton> m_pOkPB;
SwWrtShell *mpSh;
diff --git a/sw/source/uibase/inc/view.hxx b/sw/source/uibase/inc/view.hxx
index 8cd1d5cf01ca..c1a341eadce4 100644
--- a/sw/source/uibase/inc/view.hxx
+++ b/sw/source/uibase/inc/view.hxx
@@ -187,7 +187,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
Size m_aDocSz; // current document size
Rectangle m_aVisArea; // visible region
- SwEditWin *m_pEditWin;
+ VclPtr<SwEditWin> m_pEditWin;
SwWrtShell *m_pWrtShell;
SfxShell *m_pShell; // current SubShell at the dispatcher
@@ -195,21 +195,21 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SwView_Impl *m_pViewImpl; // Impl-data for UNO + Basic
- SwScrollbar *m_pHScrollbar, // MDI control elements
- *m_pVScrollbar;
+ VclPtr<SwScrollbar> m_pHScrollbar, // MDI control elements
+ m_pVScrollbar;
bool m_bHScrollbarEnabled;
bool m_bVScrollbarEnabled;
- ::vcl::Window *m_pScrollFill; // dummy window for filling the lower right edge
+ VclPtr<::vcl::Window> m_pScrollFill; // dummy window for filling the lower right edge
// when both scrollbars are active
- SvxRuler *m_pHRuler,
- *m_pVRuler;
- ImageButton *m_pTogglePageBtn;
+ VclPtr<SvxRuler> m_pHRuler,
+ m_pVRuler;
+ VclPtr<ImageButton> m_pTogglePageBtn;
- SwHlpImageButton *m_pPageUpBtn,
- *m_pPageDownBtn;
+ VclPtr<SwHlpImageButton> m_pPageUpBtn,
+ m_pPageDownBtn;
SwGlossaryHdl *m_pGlosHdl; // handle text block
SwDrawBase *m_pDrawActual;
@@ -221,7 +221,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SwPostItMgr *m_pPostItMgr;
int m_nSelectionType;
- FloatingWindow *m_pFieldPopup;
+ VclPtr<FloatingWindow> m_pFieldPopup;
static const int m_nMASTERENUMCOMMANDS = 6;
diff --git a/sw/source/uibase/inc/wordcountdialog.hxx b/sw/source/uibase/inc/wordcountdialog.hxx
index faf67d4240b9..63aa450f3aeb 100644
--- a/sw/source/uibase/inc/wordcountdialog.hxx
+++ b/sw/source/uibase/inc/wordcountdialog.hxx
@@ -33,22 +33,22 @@ class SwWordCountFloatDlg : public SfxModelessDialog
void showCJK(bool bShowCJK);
void showStandardizedPages(bool bShowStandardizedPages);
- FixedText* m_pCurrentWordFT;
- FixedText* m_pCurrentCharacterFT;
- FixedText* m_pCurrentCharacterExcludingSpacesFT;
- FixedText* m_pCurrentCjkcharsFT;
- FixedText* m_pCurrentStandardizedPagesFT;
+ VclPtr<FixedText> m_pCurrentWordFT;
+ VclPtr<FixedText> m_pCurrentCharacterFT;
+ VclPtr<FixedText> m_pCurrentCharacterExcludingSpacesFT;
+ VclPtr<FixedText> m_pCurrentCjkcharsFT;
+ VclPtr<FixedText> m_pCurrentStandardizedPagesFT;
- FixedText* m_pDocWordFT;
- FixedText* m_pDocCharacterFT;
- FixedText* m_pDocCharacterExcludingSpacesFT;
- FixedText* m_pDocCjkcharsFT;
- FixedText* m_pDocStandardizedPagesFT;
+ VclPtr<FixedText> m_pDocWordFT;
+ VclPtr<FixedText> m_pDocCharacterFT;
+ VclPtr<FixedText> m_pDocCharacterExcludingSpacesFT;
+ VclPtr<FixedText> m_pDocCjkcharsFT;
+ VclPtr<FixedText> m_pDocStandardizedPagesFT;
- FixedText* m_pCjkcharsLabelFT;
- FixedText* m_pStandardizedPagesLabelFT;
+ VclPtr<FixedText> m_pCjkcharsLabelFT;
+ VclPtr<FixedText> m_pStandardizedPagesLabelFT;
- CloseButton* m_pClosePB;
+ VclPtr<CloseButton> m_pClosePB;
DECL_LINK( CloseHdl, void* );
public:
diff --git a/sw/source/uibase/inc/workctrl.hxx b/sw/source/uibase/inc/workctrl.hxx
index bac81d6750e7..31638e22679a 100644
--- a/sw/source/uibase/inc/workctrl.hxx
+++ b/sw/source/uibase/inc/workctrl.hxx
@@ -129,8 +129,8 @@ public:
class SwScrollNaviPopup : public SfxPopupWindow
{
- SwScrollNaviToolBox* m_pToolBox;
- FixedText* m_pInfoField;
+ VclPtr<SwScrollNaviToolBox> m_pToolBox;
+ VclPtr<FixedText> m_pInfoField;
ImageList aIList;
OUString sQuickHelp[2 * NID_COUNT];
diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx
index 20b162e8cfd4..34002c9ea35b 100644
--- a/sw/source/uibase/inc/wrap.hxx
+++ b/sw/source/uibase/inc/wrap.hxx
@@ -43,24 +43,24 @@ public:
class SwWrapTabPage: public SfxTabPage
{
// WRAPPING
- RadioButton* m_pNoWrapRB;
- RadioButton* m_pWrapLeftRB;
- RadioButton* m_pWrapRightRB;
- RadioButton* m_pWrapParallelRB;
- RadioButton* m_pWrapThroughRB;
- RadioButton* m_pIdealWrapRB;
+ VclPtr<RadioButton> m_pNoWrapRB;
+ VclPtr<RadioButton> m_pWrapLeftRB;
+ VclPtr<RadioButton> m_pWrapRightRB;
+ VclPtr<RadioButton> m_pWrapParallelRB;
+ VclPtr<RadioButton> m_pWrapThroughRB;
+ VclPtr<RadioButton> m_pIdealWrapRB;
// MARGIN
- MetricField* m_pLeftMarginED;
- MetricField* m_pRightMarginED;
- MetricField* m_pTopMarginED;
- MetricField* m_pBottomMarginED;
+ VclPtr<MetricField> m_pLeftMarginED;
+ VclPtr<MetricField> m_pRightMarginED;
+ VclPtr<MetricField> m_pTopMarginED;
+ VclPtr<MetricField> m_pBottomMarginED;
// OPTIONS
- CheckBox* m_pWrapAnchorOnlyCB;
- CheckBox* m_pWrapTransparentCB;
- CheckBox* m_pWrapOutlineCB;
- CheckBox* m_pWrapOutsideCB;
+ VclPtr<CheckBox> m_pWrapAnchorOnlyCB;
+ VclPtr<CheckBox> m_pWrapTransparentCB;
+ VclPtr<CheckBox> m_pWrapOutlineCB;
+ VclPtr<CheckBox> m_pWrapOutsideCB;
sal_uInt16 nOldLeftMargin;
sal_uInt16 nOldRightMargin;
@@ -81,6 +81,7 @@ class SwWrapTabPage: public SfxTabPage
SwWrapTabPage(vcl::Window *pParent, const SfxItemSet &rSet);
virtual ~SwWrapTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void ApplyImageList();
void EnableModes(const SfxItemSet& rSet);
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index a0cd1e257498..0f0b34c27948 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -69,7 +69,7 @@ SwRedlineAcceptChild::SwRedlineAcceptChild( vcl::Window* _pParent,
{
pWindow = new SwModelessRedlineAcceptDlg( pBindings, this, _pParent);
- static_cast<SwModelessRedlineAcceptDlg *>(pWindow)->Initialize(pInfo);
+ static_cast<SwModelessRedlineAcceptDlg *>(pWindow.get())->Initialize(pInfo);
}
// newly initialise dialog after document switch
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index b9d43d094ec1..675a17b58294 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -51,6 +51,13 @@ SwCommentRuler::SwCommentRuler( SwViewShell* pViewSh, vcl::Window* pParent, SwEd
// Destructor
SwCommentRuler::~SwCommentRuler()
{
+ dispose();
+}
+
+void SwCommentRuler::dispose()
+{
+ mpSwWin.clear();
+ SvxRuler::dispose();
}
void SwCommentRuler::Paint( const Rectangle& rRect )
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 2303c3dad6b9..6f01222b27e4 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -626,7 +626,7 @@ SwInputChild::SwInputChild(vcl::Window* _pParent,
{
pDispatch = pBindings->GetDispatcher();
pWindow = new SwInputWindow( _pParent, pBindings );
- static_cast<SwInputWindow*>(pWindow)->ShowWin();
+ static_cast<SwInputWindow*>(pWindow.get())->ShowWin();
eChildAlignment = SfxChildAlignment::LOWESTTOP;
}
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 58d0e32a051f..ca9059586706 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -453,7 +453,8 @@ SwScrollNaviPopup::~SwScrollNaviPopup()
void SwScrollNaviPopup::dispose()
{
- delete m_pToolBox;
+ m_pToolBox.clear();
+ m_pInfoField.clear();
SfxPopupWindow::dispose();
}
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index 49fc1741a7ce..2ec2772c72f5 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -54,6 +54,7 @@
#include <shells.hrc>
#include <SwStyleNameMapper.hxx>
#include "swabstdlg.hxx"
+#include "outline.hxx"
#include "chrdlg.hrc"
#include <boost/scoped_ptr.hpp>
diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx
index fa98cf0f1ec4..8c1f4ed082dc 100644
--- a/sw/source/uibase/shells/txtcrsr.cxx
+++ b/sw/source/uibase/shells/txtcrsr.cxx
@@ -43,6 +43,7 @@
#include <svx/svdouno.hxx>
#include <svx/fmshell.hxx>
#include <svx/sdrobjectfilter.hxx>
+#include "outline.hxx"
using namespace ::com::sun::star;
diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx b/sw/source/uibase/sidebar/PageColumnControl.cxx
index 703b4cee03f4..6e9c39f62f51 100644
--- a/sw/source/uibase/sidebar/PageColumnControl.cxx
+++ b/sw/source/uibase/sidebar/PageColumnControl.cxx
@@ -82,7 +82,7 @@ PageColumnControl::~PageColumnControl(void)
void PageColumnControl::dispose()
{
- delete mpColumnValueSet;
+ mpColumnValueSet.clear();
maMoreButton.disposeAndClear();
::svx::sidebar::PopupControl::dispose();
}
diff --git a/sw/source/uibase/sidebar/PageColumnControl.hxx b/sw/source/uibase/sidebar/PageColumnControl.hxx
index ef81b4d1dbb8..79e22ccfd40f 100644
--- a/sw/source/uibase/sidebar/PageColumnControl.hxx
+++ b/sw/source/uibase/sidebar/PageColumnControl.hxx
@@ -48,7 +48,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
private:
- ::svx::sidebar::ValueSetWithTextControl* mpColumnValueSet;
+ VclPtr<::svx::sidebar::ValueSetWithTextControl> mpColumnValueSet;
VclPtr<PushButton> maMoreButton;
sal_uInt16 mnColumnType;
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index d0f71e6c4055..46eb3960b2f4 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -138,7 +138,7 @@ PageMarginControl::~PageMarginControl()
void PageMarginControl::dispose()
{
- delete mpMarginValueSet;
+ mpMarginValueSet.clear();
StoreUserCustomValues();
diff --git a/sw/source/uibase/sidebar/PageMarginControl.hxx b/sw/source/uibase/sidebar/PageMarginControl.hxx
index 8ab4c1b34917..f6d8d28cef61 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.hxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.hxx
@@ -64,7 +64,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
private:
- ::svx::sidebar::ValueSetWithTextControl* mpMarginValueSet;
+ VclPtr<::svx::sidebar::ValueSetWithTextControl> mpMarginValueSet;
VclPtr<FixedText> maCustom;
VclPtr<FixedText> maLeft;
diff --git a/sw/source/uibase/sidebar/PageOrientationControl.cxx b/sw/source/uibase/sidebar/PageOrientationControl.cxx
index 96494e601220..c4d9357d0d4f 100644
--- a/sw/source/uibase/sidebar/PageOrientationControl.cxx
+++ b/sw/source/uibase/sidebar/PageOrientationControl.cxx
@@ -68,7 +68,7 @@ PageOrientationControl::~PageOrientationControl(void)
void PageOrientationControl::dispose()
{
- delete mpOrientationValueSet;
+ mpOrientationValueSet.clear();
::svx::sidebar::PopupControl::dispose();
}
diff --git a/sw/source/uibase/sidebar/PageOrientationControl.hxx b/sw/source/uibase/sidebar/PageOrientationControl.hxx
index 2f86a48df859..2bf1f6773e72 100644
--- a/sw/source/uibase/sidebar/PageOrientationControl.hxx
+++ b/sw/source/uibase/sidebar/PageOrientationControl.hxx
@@ -41,7 +41,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
private:
- ::svx::sidebar::ValueSetWithTextControl* mpOrientationValueSet;
+ VclPtr<::svx::sidebar::ValueSetWithTextControl> mpOrientationValueSet;
bool mbLandscape;
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
index 13db3215afb9..1ce8f61fe3af 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
@@ -215,6 +215,10 @@ void PagePropertyPanel::dispose()
mpPageULMarginItem.reset();
mpPageSizeItem.reset();
+ mpToolBoxOrientation.clear();
+ mpToolBoxMargin.clear();
+ mpToolBoxSize.clear();
+ mpToolBoxColumn.clear();
PanelLayout::dispose();
}
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.hxx b/sw/source/uibase/sidebar/PagePropertyPanel.hxx
index b2c0d6c16eed..f9dd2c09190b 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.hxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.hxx
@@ -108,10 +108,10 @@ namespace sw { namespace sidebar {
SfxBindings* mpBindings;
// toolboxes - on click open corresponding popup
- ToolBox* mpToolBoxOrientation;
- ToolBox* mpToolBoxMargin;
- ToolBox* mpToolBoxSize;
- ToolBox* mpToolBoxColumn;
+ VclPtr<ToolBox> mpToolBoxOrientation;
+ VclPtr<ToolBox> mpToolBoxMargin;
+ VclPtr<ToolBox> mpToolBoxSize;
+ VclPtr<ToolBox> mpToolBoxColumn;
Image* maImgSize;
Image* maImgSize_L;
diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx
index 576350850aab..0906c8f02a2c 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -148,7 +148,7 @@ PageSizeControl::~PageSizeControl()
void PageSizeControl::dispose()
{
- delete mpSizeValueSet;
+ mpSizeValueSet.clear();
maMoreButton.disposeAndClear();
maWidthHeightField.disposeAndClear();
::svx::sidebar::PopupControl::dispose();
diff --git a/sw/source/uibase/sidebar/PageSizeControl.hxx b/sw/source/uibase/sidebar/PageSizeControl.hxx
index 5377655b556b..91f63cea737f 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.hxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.hxx
@@ -51,7 +51,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
private:
- ::svx::sidebar::ValueSetWithTextControl* mpSizeValueSet;
+ VclPtr<::svx::sidebar::ValueSetWithTextControl> mpSizeValueSet;
VclPtr<PushButton> maMoreButton;
// hidden metric field
VclPtr<MetricField> maWidthHeightField;
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
index 9c7204921934..d1fffd6b7029 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
@@ -89,6 +89,18 @@ WrapPropertyPanel::WrapPropertyPanel(
WrapPropertyPanel::~WrapPropertyPanel()
{
+ dispose();
+}
+
+void WrapPropertyPanel::dispose()
+{
+ mpRBNoWrap.clear();
+ mpRBWrapLeft.clear();
+ mpRBWrapRight.clear();
+ mpRBWrapParallel.clear();
+ mpRBWrapThrough.clear();
+ mpRBIdealWrap.clear();
+ PanelLayout::dispose();
}
void WrapPropertyPanel::Initialize()
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
index d1c53394021f..c64b1331587b 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
@@ -47,23 +47,24 @@ namespace sw { namespace sidebar {
const SfxPoolItem* pState,
const bool bIsEnabled) SAL_OVERRIDE;
+ virtual ~WrapPropertyPanel();
+ virtual void dispose() SAL_OVERRIDE;
private:
WrapPropertyPanel(
vcl::Window* pParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
SfxBindings* pBindings );
- virtual ~WrapPropertyPanel();
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
SfxBindings* mpBindings;
- RadioButton* mpRBNoWrap;
- RadioButton* mpRBWrapLeft;
- RadioButton* mpRBWrapRight;
- RadioButton* mpRBWrapParallel;
- RadioButton* mpRBWrapThrough;
- RadioButton* mpRBIdealWrap;
+ VclPtr<RadioButton> mpRBNoWrap;
+ VclPtr<RadioButton> mpRBWrapLeft;
+ VclPtr<RadioButton> mpRBWrapRight;
+ VclPtr<RadioButton> mpRBWrapParallel;
+ VclPtr<RadioButton> mpRBWrapThrough;
+ VclPtr<RadioButton> mpRBIdealWrap;
//Image resource.
ImageList aWrapIL;
diff --git a/sw/source/uibase/table/tablepg.hxx b/sw/source/uibase/table/tablepg.hxx
index f89d66e7bb14..b0ca2e5b815d 100644
--- a/sw/source/uibase/table/tablepg.hxx
+++ b/sw/source/uibase/table/tablepg.hxx
@@ -37,29 +37,29 @@ struct TColumn
class SwFormatTablePage : public SfxTabPage
{
- Edit* m_pNameED;
+ VclPtr<Edit> m_pNameED;
TextFilter m_aTextFilter;
- FixedText* m_pWidthFT;
+ VclPtr<FixedText> m_pWidthFT;
PercentField m_aWidthMF;
- CheckBox* m_pRelWidthCB;
+ VclPtr<CheckBox> m_pRelWidthCB;
- RadioButton* m_pFullBtn;
- RadioButton* m_pLeftBtn;
- RadioButton* m_pFromLeftBtn;
- RadioButton* m_pRightBtn;
- RadioButton* m_pCenterBtn;
- RadioButton* m_pFreeBtn;
+ VclPtr<RadioButton> m_pFullBtn;
+ VclPtr<RadioButton> m_pLeftBtn;
+ VclPtr<RadioButton> m_pFromLeftBtn;
+ VclPtr<RadioButton> m_pRightBtn;
+ VclPtr<RadioButton> m_pCenterBtn;
+ VclPtr<RadioButton> m_pFreeBtn;
- FixedText* m_pLeftFT;
+ VclPtr<FixedText> m_pLeftFT;
PercentField m_aLeftMF;
- FixedText* m_pRightFT;
+ VclPtr<FixedText> m_pRightFT;
PercentField m_aRightMF;
- FixedText* m_pTopFT;
- MetricField* m_pTopMF;
- FixedText* m_pBottomFT;
- MetricField* m_pBottomMF;
+ VclPtr<FixedText> m_pTopFT;
+ VclPtr<MetricField> m_pTopMF;
+ VclPtr<FixedText> m_pBottomFT;
+ VclPtr<MetricField> m_pBottomMF;
- ListBox* m_pTextDirectionLB;
+ VclPtr<ListBox> m_pTextDirectionLB;
SwTableRep* pTblData;
SwTwips nSaveWidth;
@@ -81,6 +81,8 @@ class SwFormatTablePage : public SfxTabPage
public:
SwFormatTablePage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~SwFormatTablePage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -94,16 +96,16 @@ public:
class SwTableColumnPage : public SfxTabPage
{
- CheckBox* m_pModifyTableCB;
- CheckBox* m_pProportionalCB;
- FixedText* m_pSpaceFT;
- MetricField* m_pSpaceED;
- PushButton* m_pUpBtn;
- PushButton* m_pDownBtn;
+ VclPtr<CheckBox> m_pModifyTableCB;
+ VclPtr<CheckBox> m_pProportionalCB;
+ VclPtr<FixedText> m_pSpaceFT;
+ VclPtr<MetricField> m_pSpaceED;
+ VclPtr<PushButton> m_pUpBtn;
+ VclPtr<PushButton> m_pDownBtn;
SwTableRep* pTblData;
PercentField m_aFieldArr[MET_FIELDS];
- FixedText* m_pTextArr[MET_FIELDS];
+ VclPtr<FixedText> m_pTextArr[MET_FIELDS];
SwTwips nTableWidth;
SwTwips nMinWidth;
sal_uInt16 nNoOfCols;
@@ -131,6 +133,7 @@ class SwTableColumnPage : public SfxTabPage
public:
SwTableColumnPage( vcl::Window* pParent, const SfxItemSet& rSet );
virtual ~SwTableColumnPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -142,27 +145,27 @@ public:
class SwTextFlowPage : public SfxTabPage
{
- CheckBox* m_pPgBrkCB;
+ VclPtr<CheckBox> m_pPgBrkCB;
- RadioButton* m_pPgBrkRB;
- RadioButton* m_pColBrkRB;
+ VclPtr<RadioButton> m_pPgBrkRB;
+ VclPtr<RadioButton> m_pColBrkRB;
- RadioButton* m_pPgBrkBeforeRB;
- RadioButton* m_pPgBrkAfterRB;
+ VclPtr<RadioButton> m_pPgBrkBeforeRB;
+ VclPtr<RadioButton> m_pPgBrkAfterRB;
- CheckBox* m_pPageCollCB;
- ListBox* m_pPageCollLB;
- FixedText* m_pPageNoFT;
- NumericField* m_pPageNoNF;
- CheckBox* m_pSplitCB;
- TriStateBox* m_pSplitRowCB;
- CheckBox* m_pKeepCB;
- CheckBox* m_pHeadLineCB;
- NumericField* m_pRepeatHeaderNF;
- VclContainer* m_pRepeatHeaderCombo;
- ListBox* m_pTextDirectionLB;
+ VclPtr<CheckBox> m_pPageCollCB;
+ VclPtr<ListBox> m_pPageCollLB;
+ VclPtr<FixedText> m_pPageNoFT;
+ VclPtr<NumericField> m_pPageNoNF;
+ VclPtr<CheckBox> m_pSplitCB;
+ VclPtr<TriStateBox> m_pSplitRowCB;
+ VclPtr<CheckBox> m_pKeepCB;
+ VclPtr<CheckBox> m_pHeadLineCB;
+ VclPtr<NumericField> m_pRepeatHeaderNF;
+ VclPtr<VclContainer> m_pRepeatHeaderCombo;
+ VclPtr<ListBox> m_pTextDirectionLB;
- ListBox* m_pVertOrientLB;
+ VclPtr<ListBox> m_pVertOrientLB;
SwWrtShell* pShell;
@@ -178,9 +181,9 @@ class SwTextFlowPage : public SfxTabPage
DECL_LINK( HeadLineCBClickHdl, void* p = 0 );
SwTextFlowPage( vcl::Window* pParent, const SfxItemSet& rSet );
- virtual ~SwTextFlowPage();
-
public:
+ virtual ~SwTextFlowPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index fa80f75052a0..ccd5cb168bd0 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -145,13 +145,15 @@ static void lcl_InvalidateZoomSlots(SfxBindings& rBindings)
// At first the zoom dialog
class SwPreviewZoomDlg : public SvxStandardDialog
{
- NumericField* m_pRowEdit;
- NumericField* m_pColEdit;
+ VclPtr<NumericField> m_pRowEdit;
+ VclPtr<NumericField> m_pColEdit;
virtual void Apply() SAL_OVERRIDE;
public:
SwPreviewZoomDlg( SwPagePreviewWin& rParent );
+ virtual ~SwPreviewZoomDlg();
+ virtual void dispose() SAL_OVERRIDE;
};
SwPreviewZoomDlg::SwPreviewZoomDlg( SwPagePreviewWin& rParent )
@@ -164,6 +166,18 @@ SwPreviewZoomDlg::SwPreviewZoomDlg( SwPagePreviewWin& rParent )
m_pColEdit->SetValue( rParent.GetCol() );
}
+SwPreviewZoomDlg::~SwPreviewZoomDlg()
+{
+ dispose();
+}
+
+void SwPreviewZoomDlg::dispose()
+{
+ m_pRowEdit.clear();
+ m_pColEdit.clear();
+ SvxStandardDialog::dispose();
+}
+
void SwPreviewZoomDlg::Apply()
{
static_cast<SwPagePreviewWin*>(GetParent())->CalcWish(
@@ -1224,11 +1238,6 @@ SwPagePreview::~SwPagePreview()
SwViewShell* pVShell = pViewWin->GetViewShell();
pVShell->SetWin(0);
delete pVShell;
- delete pViewWin;
-
- delete pScrollFill;
- delete pHScrollbar;
- delete pVScrollbar;
}
SwDocShell* SwPagePreview::GetDocShell()
@@ -1239,20 +1248,20 @@ SwDocShell* SwPagePreview::GetDocShell()
int SwPagePreview::_CreateScrollbar( bool bHori )
{
vcl::Window *pMDI = &GetViewFrame()->GetWindow();
- SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
+ VclPtr<SwScrollbar>& ppScrollbar = bHori ? pHScrollbar : pVScrollbar;
- assert(!*ppScrollbar); //check beforehand!
+ assert(!ppScrollbar.get()); //check beforehand!
- *ppScrollbar = new SwScrollbar( pMDI, bHori );
+ ppScrollbar = new SwScrollbar( pMDI, bHori );
ScrollDocSzChg();
- (*ppScrollbar)->EnableDrag( true );
- (*ppScrollbar)->SetEndScrollHdl( LINK( this, SwPagePreview, EndScrollHdl ));
+ ppScrollbar->EnableDrag( true );
+ ppScrollbar->SetEndScrollHdl( LINK( this, SwPagePreview, EndScrollHdl ));
- (*ppScrollbar)->SetScrollHdl( LINK( this, SwPagePreview, ScrollHdl ));
+ ppScrollbar->SetScrollHdl( LINK( this, SwPagePreview, ScrollHdl ));
InvalidateBorder();
- (*ppScrollbar)->ExtendedShow();
+ ppScrollbar->ExtendedShow();
return 1;
}
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 8c16a79f3f5e..350cf294f21d 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1051,18 +1051,18 @@ SwView::~SwView()
m_pViewImpl->Invalidate();
EndListening(*GetViewFrame());
EndListening(*GetDocShell());
- delete m_pScrollFill;
+ m_pScrollFill.clear();
delete m_pWrtShell;
m_pWrtShell = 0; // Set to 0, so that it is not accessible by the following dtors cannot.
m_pShell = 0;
- delete m_pHScrollbar;
- delete m_pVScrollbar;
- delete m_pHRuler;
- delete m_pVRuler;
- delete m_pTogglePageBtn;
+ m_pHScrollbar.clear();
+ m_pVScrollbar.clear();
+ m_pHRuler.clear();
+ m_pVRuler.clear();
+ m_pTogglePageBtn.clear();
delete m_pGlosHdl;
delete m_pViewImpl;
- delete m_pEditWin;
+ m_pEditWin.clear();
delete m_pFormatClipboard;
}
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 001f48dad3ce..98a9da9d14c5 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -888,11 +888,7 @@ IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox )
IMPL_LINK_NOARG(SwView, FieldPopupModeEndHdl)
{
- if ( m_pFieldPopup )
- {
- delete m_pFieldPopup;
- m_pFieldPopup = NULL;
- }
+ m_pFieldPopup.clear();
return 0;
}
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index 8d63bcb4580a..11c4a574b96e 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -290,25 +290,25 @@ IMPL_LINK( SwView, WindowChildEventListener, VclSimpleEvent*, pEvent )
int SwView::_CreateScrollbar( bool bHori )
{
vcl::Window *pMDI = &GetViewFrame()->GetWindow();
- SwScrollbar** ppScrollbar = bHori ? &m_pHScrollbar : &m_pVScrollbar;
+ VclPtr<SwScrollbar>& ppScrollbar = bHori ? m_pHScrollbar : m_pVScrollbar;
- assert(!*ppScrollbar); //check beforehand!
+ assert(!ppScrollbar.get()); //check beforehand!
- *ppScrollbar = new SwScrollbar( pMDI, bHori );
+ ppScrollbar = new SwScrollbar( pMDI, bHori );
UpdateScrollbars();
if(bHori)
- (*ppScrollbar)->SetScrollHdl( LINK( this, SwView, EndScrollHdl ));
+ ppScrollbar->SetScrollHdl( LINK( this, SwView, EndScrollHdl ));
else
- (*ppScrollbar)->SetScrollHdl( LINK( this, SwView, ScrollHdl ));
- (*ppScrollbar)->SetEndScrollHdl( LINK( this, SwView, EndScrollHdl ));
+ ppScrollbar->SetScrollHdl( LINK( this, SwView, ScrollHdl ));
+ ppScrollbar->SetEndScrollHdl( LINK( this, SwView, EndScrollHdl ));
- (*ppScrollbar)->EnableDrag( true );
+ ppScrollbar->EnableDrag( true );
if(GetWindow())
InvalidateBorder();
if (!m_bShowAtResize)
- (*ppScrollbar)->ExtendedShow();
+ ppScrollbar->ExtendedShow();
return 1;
}
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 7a589c022710..32203071852e 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -91,6 +91,7 @@
#include <unomid.h>
#include "navmgr.hxx"
+#include "SidebarWin.hxx"
#include <boost/scoped_ptr.hpp>
#define CTYPE_CNT 0
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 718fa2cd4cc8..7a9fafe65932 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -187,6 +187,7 @@ void SwGlobalTree::dispose()
{
delete pSwGlblDocContents;
delete pDocInserter;
+ pDefParentWin.clear();
SvTreeListBox::dispose();
}
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index 4951847ff958..1e4e79490080 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -51,14 +51,17 @@ struct TripleString
class SwGlossDecideDlg : public ModalDialog
{
- OKButton* m_pOk;
- ListBox* m_pListLB;
+ VclPtr<OKButton> m_pOk;
+ VclPtr<ListBox> m_pListLB;
DECL_LINK(DoubleClickHdl, void*);
DECL_LINK(SelectHdl, void*);
- public:
- SwGlossDecideDlg(vcl::Window* pParent);
+public:
+ SwGlossDecideDlg(vcl::Window* pParent);
+ virtual ~SwGlossDecideDlg();
+ virtual void dispose() SAL_OVERRIDE;
+
ListBox& GetListBox() {return *m_pListLB;}
};
@@ -73,6 +76,18 @@ SwGlossDecideDlg::SwGlossDecideDlg(vcl::Window* pParent)
m_pListLB->SetSelectHdl(LINK(this, SwGlossDecideDlg, SelectHdl));
}
+SwGlossDecideDlg::~SwGlossDecideDlg()
+{
+ dispose();
+}
+
+void SwGlossDecideDlg::dispose()
+{
+ m_pOk.clear();
+ m_pListLB.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK_NOARG(SwGlossDecideDlg, DoubleClickHdl)
{
EndDialog(RET_OK);
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 504e3928d688..c1fbaec60ba0 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -867,12 +867,12 @@ void SwNavigationPI::dispose()
(*pxObjectShell)->DoClose();
delete pxObjectShell;
}
- delete pPopupWindow;
- delete pFloatingWindow;
if ( IsBound() )
rBindings.Release(*this);
+ pPopupWindow.clear();
+ pFloatingWindow.clear();
aContentToolBox.disposeAndClear();
aGlobalToolBox.disposeAndClear();
aContentTree.disposeAndClear();
@@ -894,7 +894,6 @@ IMPL_LINK_NOARG(SwNavigationPI, PopupModeEndHdl)
{
// Replace floating window with popup window and destroy
// floating window instance.
- delete pFloatingWindow;
pFloatingWindow = pPopupWindow;
pPopupWindow = 0;
}
diff --git a/tools/source/ref/errinf.cxx b/tools/source/ref/errinf.cxx
index 0ddbafdbad66..babe0acd776f 100644
--- a/tools/source/ref/errinf.cxx
+++ b/tools/source/ref/errinf.cxx
@@ -23,6 +23,7 @@
#include <tools/errinf.hxx>
#include <rtl/strbuf.hxx>
#include <osl/diagnose.h>
+#include <vcl/window.hxx>
class ErrorHandler;
diff --git a/uui/source/authfallbackdlg.cxx b/uui/source/authfallbackdlg.cxx
index eac0d301b300..0f568fc1d0fa 100644
--- a/uui/source/authfallbackdlg.cxx
+++ b/uui/source/authfallbackdlg.cxx
@@ -32,6 +32,21 @@ AuthFallbackDlg::AuthFallbackDlg(Window* pParent, const OUString& instructions,
m_pEDUrl->SetText( url );
}
+AuthFallbackDlg::~AuthFallbackDlg()
+{
+ dispose();
+}
+
+void AuthFallbackDlg::dispose()
+{
+ m_pTVInstructions.clear();
+ m_pEDUrl.clear();
+ m_pEDCode.clear();
+ m_pBTOk.clear();
+ m_pBTCancel.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK ( AuthFallbackDlg, OKHdl, Button *, EMPTYARG )
{
EndDialog( RET_OK );
diff --git a/uui/source/authfallbackdlg.hxx b/uui/source/authfallbackdlg.hxx
index d73eebf70f4f..29634d1f69b0 100644
--- a/uui/source/authfallbackdlg.hxx
+++ b/uui/source/authfallbackdlg.hxx
@@ -19,15 +19,17 @@
class AuthFallbackDlg : public ModalDialog
{
private:
- VclMultiLineEdit* m_pTVInstructions;
- Edit* m_pEDUrl;
- Edit* m_pEDCode;
- PushButton* m_pBTOk;
- PushButton* m_pBTCancel;
+ VclPtr<VclMultiLineEdit> m_pTVInstructions;
+ VclPtr<Edit> m_pEDUrl;
+ VclPtr<Edit> m_pEDCode;
+ VclPtr<PushButton> m_pBTOk;
+ VclPtr<PushButton> m_pBTCancel;
public:
AuthFallbackDlg(Window* pParent, const OUString& instructions,
const OUString& url);
+ virtual ~AuthFallbackDlg();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetCode() const { return m_pEDCode->GetText(); }
diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx
index a24a34e1e35a..ca0ef809abac 100644
--- a/uui/source/fltdlg.cxx
+++ b/uui/source/fltdlg.cxx
@@ -57,6 +57,18 @@ FilterDialog::FilterDialog( vcl::Window* pParentWindow )
m_pFtURL->SetSizePixel(Size(aSize.Width(), m_pFtURL->GetOptimalSize().Height()));
}
+FilterDialog::~FilterDialog()
+{
+ dispose();
+}
+
+void FilterDialog::dispose()
+{
+ m_pFtURL.clear();
+ m_pLbFilters.clear();
+ ModalDialog::dispose();
+}
+
/*-************************************************************************************************************
@short set file name on dialog control
@descr We convert given URL (it must be an URL!) into valid file name and show it on our dialog.
diff --git a/uui/source/fltdlg.hxx b/uui/source/fltdlg.hxx
index 6c245445ab97..958ad99f5f54 100644
--- a/uui/source/fltdlg.hxx
+++ b/uui/source/fltdlg.hxx
@@ -47,6 +47,8 @@ class FilterDialog : public ModalDialog
// public interface
public:
FilterDialog ( vcl::Window* pParentWindow );
+ virtual ~FilterDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetURL ( const OUString& sURL );
void ChangeFilters( const FilterNameList* pFilterNames );
bool AskForFilter ( FilterNameListPtr& pSelectedItem );
@@ -58,8 +60,8 @@ class FilterDialog : public ModalDialog
// member
private:
- FixedText *m_pFtURL ;
- ListBox *m_pLbFilters ;
+ VclPtr<FixedText> m_pFtURL ;
+ VclPtr<ListBox> m_pLbFilters ;
const FilterNameList* m_pFilterNames;
}; // class FilterDialog
diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx
index c28e17098a51..facfdf63d12e 100644
--- a/uui/source/logindlg.cxx
+++ b/uui/source/logindlg.cxx
@@ -36,6 +36,31 @@
using namespace com::sun::star;
+LoginDialog::~LoginDialog()
+{
+ dispose();
+}
+
+void LoginDialog::dispose()
+{
+ m_pErrorFT.clear();
+ m_pErrorInfo.clear();
+ m_pRequestInfo.clear();
+ m_pPathFT.clear();
+ m_pPathED.clear();
+ m_pPathBtn.clear();
+ m_pNameFT.clear();
+ m_pNameED.clear();
+ m_pPasswordFT.clear();
+ m_pPasswordED.clear();
+ m_pAccountFT.clear();
+ m_pAccountED.clear();
+ m_pSavePasswdBtn.clear();
+ m_pUseSysCredsCB.clear();
+ m_pOKBtn.clear();
+ ModalDialog::dispose();
+}
+
void LoginDialog::HideControls_Impl( sal_uInt16 nFlags )
{
if ( ( nFlags & LF_NO_PATH ) == LF_NO_PATH )
diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx
index 0cd7eb6e2016..cc32d5e94ae9 100644
--- a/uui/source/logindlg.hxx
+++ b/uui/source/logindlg.hxx
@@ -43,21 +43,21 @@
class LoginDialog : public ModalDialog
{
- FixedText* m_pErrorFT;
- FixedText* m_pErrorInfo;
- FixedText* m_pRequestInfo;
- FixedText* m_pPathFT;
- Edit* m_pPathED;
- PushButton* m_pPathBtn;
- FixedText* m_pNameFT;
- Edit* m_pNameED;
- FixedText* m_pPasswordFT;
- Edit* m_pPasswordED;
- FixedText* m_pAccountFT;
- Edit* m_pAccountED;
- CheckBox* m_pSavePasswdBtn;
- CheckBox* m_pUseSysCredsCB;
- OKButton* m_pOKBtn;
+ VclPtr<FixedText> m_pErrorFT;
+ VclPtr<FixedText> m_pErrorInfo;
+ VclPtr<FixedText> m_pRequestInfo;
+ VclPtr<FixedText> m_pPathFT;
+ VclPtr<Edit> m_pPathED;
+ VclPtr<PushButton> m_pPathBtn;
+ VclPtr<FixedText> m_pNameFT;
+ VclPtr<Edit> m_pNameED;
+ VclPtr<FixedText> m_pPasswordFT;
+ VclPtr<Edit> m_pPasswordED;
+ VclPtr<FixedText> m_pAccountFT;
+ VclPtr<Edit> m_pAccountED;
+ VclPtr<CheckBox> m_pSavePasswdBtn;
+ VclPtr<CheckBox> m_pUseSysCredsCB;
+ VclPtr<OKButton> m_pOKBtn;
void HideControls_Impl( sal_uInt16 nFlags );
void EnableUseSysCredsControls_Impl( bool bUseSysCredsEnabled );
@@ -69,6 +69,8 @@ class LoginDialog : public ModalDialog
public:
LoginDialog(vcl::Window* pParent, sal_uInt16 nFlags,
const OUString& rServer, const OUString &rRealm);
+ virtual ~LoginDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetPath() const { return m_pPathED->GetText(); }
void SetPath( const OUString& rNewPath ) { m_pPathED->SetText( rNewPath ); }
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index f54078ad9435..95289017d55d 100644
--- a/uui/source/masterpasscrtdlg.cxx
+++ b/uui/source/masterpasscrtdlg.cxx
@@ -63,4 +63,17 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog(vcl::Window* pParent, Res
m_pEDMasterPasswordCrt->SetModifyHdl( LINK( this, MasterPasswordCreateDialog, EditHdl_Impl ) );
}
+MasterPasswordCreateDialog::~MasterPasswordCreateDialog()
+{
+ dispose();
+}
+
+void MasterPasswordCreateDialog::dispose()
+{
+ m_pEDMasterPasswordCrt.clear();
+ m_pEDMasterPasswordRepeat.clear();
+ m_pOKBtn.clear();
+ ModalDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/masterpasscrtdlg.hxx b/uui/source/masterpasscrtdlg.hxx
index 31e9eb60ab87..b8279fcec363 100644
--- a/uui/source/masterpasscrtdlg.hxx
+++ b/uui/source/masterpasscrtdlg.hxx
@@ -32,9 +32,9 @@
class MasterPasswordCreateDialog : public ModalDialog
{
private:
- Edit* m_pEDMasterPasswordCrt;
- Edit* m_pEDMasterPasswordRepeat;
- OKButton* m_pOKBtn;
+ VclPtr<Edit> m_pEDMasterPasswordCrt;
+ VclPtr<Edit> m_pEDMasterPasswordRepeat;
+ VclPtr<OKButton> m_pOKBtn;
DECL_LINK(OKHdl_Impl, void *);
@@ -42,6 +42,8 @@ private:
public:
MasterPasswordCreateDialog( vcl::Window* pParent, ResMgr * pResMgr );
+ virtual ~MasterPasswordCreateDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetMasterPassword() const { return m_pEDMasterPasswordCrt->GetText(); }
diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx
index 0b219a62b835..7a10b3044a82 100644
--- a/uui/source/masterpassworddlg.cxx
+++ b/uui/source/masterpassworddlg.cxx
@@ -56,4 +56,16 @@ MasterPasswordDialog::MasterPasswordDialog
m_pOKBtn->SetClickHdl( LINK( this, MasterPasswordDialog, OKHdl_Impl ) );
};
+MasterPasswordDialog::~MasterPasswordDialog()
+{
+ dispose();
+}
+
+void MasterPasswordDialog::dispose()
+{
+ m_pEDMasterPassword.clear();
+ m_pOKBtn.clear();
+ ModalDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/masterpassworddlg.hxx b/uui/source/masterpassworddlg.hxx
index 4b834d4fa5ed..1d37d0d93d78 100644
--- a/uui/source/masterpassworddlg.hxx
+++ b/uui/source/masterpassworddlg.hxx
@@ -30,13 +30,15 @@
class MasterPasswordDialog : public ModalDialog
{
- Edit* m_pEDMasterPassword;
- OKButton* m_pOKBtn;
+ VclPtr<Edit> m_pEDMasterPassword;
+ VclPtr<OKButton> m_pOKBtn;
DECL_LINK(OKHdl_Impl, void *);
public:
MasterPasswordDialog( vcl::Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr );
+ virtual ~MasterPasswordDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetMasterPassword() const { return m_pEDMasterPassword->GetText(); }
diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx
index 105ba878a4fd..4329dd68660d 100644
--- a/uui/source/nameclashdlg.cxx
+++ b/uui/source/nameclashdlg.cxx
@@ -94,4 +94,19 @@ NameClashDialog::NameClashDialog( vcl::Window* pParent, ResMgr* pResMgr,
m_pEDNewName->SetText( rClashingName );
}
+NameClashDialog::~NameClashDialog()
+{
+ dispose();
+}
+
+void NameClashDialog::dispose()
+{
+ m_pFTMessage.clear();
+ m_pEDNewName.clear();
+ m_pBtnOverwrite.clear();
+ m_pBtnRename.clear();
+ m_pBtnCancel.clear();
+ ModalDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/nameclashdlg.hxx b/uui/source/nameclashdlg.hxx
index 6185e996305c..545f581dd077 100644
--- a/uui/source/nameclashdlg.hxx
+++ b/uui/source/nameclashdlg.hxx
@@ -31,11 +31,11 @@ enum NameClashResolveDialogResult { ABORT, RENAME, OVERWRITE };
class NameClashDialog : public ModalDialog
{
- FixedText *m_pFTMessage;
- Edit *m_pEDNewName;
- PushButton *m_pBtnOverwrite;
- PushButton *m_pBtnRename;
- CancelButton *m_pBtnCancel;
+ VclPtr<FixedText> m_pFTMessage;
+ VclPtr<Edit> m_pEDNewName;
+ VclPtr<PushButton> m_pBtnOverwrite;
+ VclPtr<PushButton> m_pBtnRename;
+ VclPtr<CancelButton> m_pBtnCancel;
OUString maSameName;
OUString maNewName;
@@ -48,6 +48,8 @@ public:
OUString const & rClashingName,
OUString const & rProposedNewName,
bool bAllowOverwrite );
+ virtual ~NameClashDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString getNewName() const { return maNewName; }
};
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index 421b84681ad7..c0872bc30342 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -82,6 +82,21 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent,
m_pOKBtn->SetClickHdl( LINK( this, PasswordDialog, OKHdl_Impl ) );
}
+PasswordDialog::~PasswordDialog()
+{
+ dispose();
+}
+
+void PasswordDialog::dispose()
+{
+ m_pFTPassword.clear();
+ m_pEDPassword.clear();
+ m_pFTConfirmPassword.clear();
+ m_pEDConfirmPassword.clear();
+ m_pOKBtn.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK_NOARG(PasswordDialog, OKHdl_Impl)
{
bool bEDPasswdValid = m_pEDPassword->GetText().getLength() >= nMinLen;
diff --git a/uui/source/passworddlg.hxx b/uui/source/passworddlg.hxx
index 3cec5ca190d3..712bcfae0ee3 100644
--- a/uui/source/passworddlg.hxx
+++ b/uui/source/passworddlg.hxx
@@ -32,11 +32,11 @@
class PasswordDialog : public ModalDialog
{
- FixedText* m_pFTPassword;
- Edit* m_pEDPassword;
- FixedText* m_pFTConfirmPassword;
- Edit* m_pEDConfirmPassword;
- OKButton* m_pOKBtn;
+ VclPtr<FixedText> m_pFTPassword;
+ VclPtr<Edit> m_pEDPassword;
+ VclPtr<FixedText> m_pFTConfirmPassword;
+ VclPtr<Edit> m_pEDConfirmPassword;
+ VclPtr<OKButton> m_pOKBtn;
sal_uInt16 nMinLen;
OUString aPasswdMismatch;
@@ -46,6 +46,8 @@ class PasswordDialog : public ModalDialog
public:
PasswordDialog( vcl::Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr, const OUString& aDocURL,
bool bOpenToModify = false, bool bIsSimplePasswordRequest = false );
+ virtual ~PasswordDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetMinLen( sal_uInt16 nMin ) { nMinLen = nMin; }
OUString GetPassword() const { return m_pEDPassword->GetText(); }
diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx
index 935ecf66ecf4..bde5dc287e4c 100644
--- a/uui/source/secmacrowarnings.cxx
+++ b/uui/source/secmacrowarnings.cxx
@@ -89,6 +89,21 @@ MacroWarning::MacroWarning( vcl::Window* _pParent, bool _bWithSignatures, ResMgr
MacroWarning::~MacroWarning()
{
+ dispose();
+}
+
+void MacroWarning::dispose()
+{
+ mpSymbolImg.clear();
+ mpDocNameFI.clear();
+ mpDescr1FI.clear();
+ mpSignsFI.clear();
+ mpViewSignsBtn.clear();
+ mpDescr2FI.clear();
+ mpAlwaysTrustCB.clear();
+ mpEnableBtn.clear();
+ mpDisableBtn.clear();
+ ModalDialog::dispose();
}
void MacroWarning::SetDocumentURL( const OUString& rDocURL )
diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx
index 84daaad9ee3a..076916fc10cc 100644
--- a/uui/source/secmacrowarnings.hxx
+++ b/uui/source/secmacrowarnings.hxx
@@ -44,15 +44,15 @@ private:
OUString maODFVersion;
const css::uno::Sequence< css::security::DocumentSignatureInformation >* mpInfos;
- FixedImage* mpSymbolImg;
- FixedText* mpDocNameFI;
- FixedText* mpDescr1FI;
- FixedText* mpSignsFI;
- PushButton* mpViewSignsBtn;
- FixedText* mpDescr2FI;
- CheckBox* mpAlwaysTrustCB;
- PushButton* mpEnableBtn;
- PushButton* mpDisableBtn;
+ VclPtr<FixedImage> mpSymbolImg;
+ VclPtr<FixedText> mpDocNameFI;
+ VclPtr<FixedText> mpDescr1FI;
+ VclPtr<FixedText> mpSignsFI;
+ VclPtr<PushButton> mpViewSignsBtn;
+ VclPtr<FixedText> mpDescr2FI;
+ VclPtr<CheckBox> mpAlwaysTrustCB;
+ VclPtr<PushButton> mpEnableBtn;
+ VclPtr<PushButton> mpDisableBtn;
const bool mbSignedMode; // modus of dialog (signed / unsigned macros)
const bool mbShowSignatures;
@@ -68,6 +68,7 @@ private:
public:
MacroWarning( vcl::Window* pParent, bool _bShowSignatures, ResMgr& rResMgr );
virtual ~MacroWarning();
+ virtual void dispose() SAL_OVERRIDE;
void SetDocumentURL( const OUString& rDocURL );
diff --git a/uui/source/unknownauthdlg.cxx b/uui/source/unknownauthdlg.cxx
index 34f706fec139..8a30bd54b44d 100644
--- a/uui/source/unknownauthdlg.cxx
+++ b/uui/source/unknownauthdlg.cxx
@@ -75,4 +75,18 @@ UnknownAuthDialog::UnknownAuthDialog(vcl::Window* pParent,
m_pCommandButtonOK->SetClickHdl(LINK(this, UnknownAuthDialog, OKHdl_Impl));
}
+UnknownAuthDialog::~UnknownAuthDialog()
+{
+ dispose();
+}
+
+void UnknownAuthDialog::dispose()
+{
+ m_pCommandButtonOK.clear();
+ m_pView_Certificate.clear();
+ m_pOptionButtonAccept.clear();
+ m_pOptionButtonDontAccept.clear();
+ MessageDialog::dispose();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/unknownauthdlg.hxx b/uui/source/unknownauthdlg.hxx
index 0b8d1e64ab2b..2eafe5e3b5f0 100644
--- a/uui/source/unknownauthdlg.hxx
+++ b/uui/source/unknownauthdlg.hxx
@@ -31,10 +31,10 @@
class UnknownAuthDialog : public MessageDialog
{
private:
- PushButton* m_pCommandButtonOK;
- PushButton* m_pView_Certificate;
- RadioButton* m_pOptionButtonAccept;
- RadioButton* m_pOptionButtonDontAccept;
+ VclPtr<PushButton> m_pCommandButtonOK;
+ VclPtr<PushButton> m_pView_Certificate;
+ VclPtr<RadioButton> m_pOptionButtonAccept;
+ VclPtr<RadioButton> m_pOptionButtonDontAccept;
const css::uno::Reference< css::uno::XComponentContext >& m_xContext;
const css::uno::Reference< css::security::XCertificate >& m_rXCert;
@@ -46,6 +46,8 @@ public:
UnknownAuthDialog(vcl::Window* pParent,
const css::uno::Reference< css::security::XCertificate >& rXCert,
const css::uno::Reference< css::uno::XComponentContext >& xContext);
+ virtual ~UnknownAuthDialog();
+ virtual void dispose() SAL_OVERRIDE;
css::uno::Reference< css::security::XCertificate > getCert()
{
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx
index a6f4822b07f5..d8c184973bb1 100644
--- a/vcl/generic/print/genprnpsp.cxx
+++ b/vcl/generic/print/genprnpsp.cxx
@@ -91,16 +91,24 @@ namespace
class QueryString : public ModalDialog
{
private:
- OKButton* m_pOKButton;
- FixedText* m_pFixedText;
- Edit* m_pEdit;
- OUString& m_rReturnValue;
+ VclPtr<OKButton> m_pOKButton;
+ VclPtr<FixedText> m_pFixedText;
+ VclPtr<Edit> m_pEdit;
+ OUString& m_rReturnValue;
DECL_LINK( ClickBtnHdl, Button* );
public:
// parent window, Query text, initial value
QueryString(vcl::Window*, OUString &, OUString &);
+ virtual ~QueryString() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ m_pOKButton.clear();
+ m_pFixedText.clear();
+ m_pEdit.clear();
+ ModalDialog::dispose();
+ }
};
/*
diff --git a/vcl/generic/print/prtsetup.cxx b/vcl/generic/print/prtsetup.cxx
index a22f912071e2..57839084eac5 100644
--- a/vcl/generic/print/prtsetup.cxx
+++ b/vcl/generic/print/prtsetup.cxx
@@ -98,8 +98,11 @@ RTSDialog::~RTSDialog()
void RTSDialog::dispose()
{
- delete m_pPaperPage;
- delete m_pDevicePage;
+ m_pTabControl.clear();
+ m_pOKButton.clear();
+ m_pCancelButton.clear();
+ m_pPaperPage.clear();
+ m_pDevicePage.clear();
TabDialog::dispose();
}
@@ -191,6 +194,24 @@ RTSPaperPage::RTSPaperPage(RTSDialog* pParent)
update();
}
+RTSPaperPage::~RTSPaperPage()
+{
+ dispose();
+}
+
+void RTSPaperPage::dispose()
+{
+ m_pParent.clear();
+ m_pPaperText.clear();
+ m_pPaperBox.clear();
+ m_pOrientBox.clear();
+ m_pDuplexText.clear();
+ m_pDuplexBox.clear();
+ m_pSlotText.clear();
+ m_pSlotBox.clear();
+ TabPage::dispose();
+}
+
void RTSPaperPage::update()
{
const PPDKey* pKey = NULL;
@@ -355,6 +376,23 @@ RTSDevicePage::RTSDevicePage( RTSDialog* pParent )
}
}
+RTSDevicePage::~RTSDevicePage()
+{
+ dispose();
+}
+
+void RTSDevicePage::dispose()
+{
+ m_pParent.clear();
+ m_pPPDKeyBox.clear();
+ m_pPPDValueBox.clear();
+ m_pCustomEdit.clear();
+ m_pLevelBox.clear();
+ m_pSpaceBox.clear();
+ m_pDepthBox.clear();
+ TabPage::dispose();
+}
+
sal_uLong RTSDevicePage::getDepth()
{
sal_uInt16 nSelectPos = m_pDepthBox->GetSelectEntryPos();
diff --git a/vcl/generic/print/prtsetup.hxx b/vcl/generic/print/prtsetup.hxx
index 17852fc1a3fd..67b6cd2216b8 100644
--- a/vcl/generic/print/prtsetup.hxx
+++ b/vcl/generic/print/prtsetup.hxx
@@ -45,13 +45,13 @@ class RTSDialog : public TabDialog
::psp::PrinterInfo m_aJobData;
// controls
- TabControl* m_pTabControl;
- OKButton* m_pOKButton;
- CancelButton* m_pCancelButton;
+ VclPtr<TabControl> m_pTabControl;
+ VclPtr<OKButton> m_pOKButton;
+ VclPtr<CancelButton> m_pCancelButton;
// pages
- RTSPaperPage* m_pPaperPage;
- RTSDevicePage* m_pDevicePage;
+ VclPtr<RTSPaperPage> m_pPaperPage;
+ VclPtr<RTSDevicePage> m_pDevicePage;
// some resources
OUString m_aInvalidString;
@@ -71,22 +71,24 @@ public:
class RTSPaperPage : public TabPage
{
- RTSDialog* m_pParent;
+ VclPtr<RTSDialog> m_pParent;
- FixedText* m_pPaperText;
- ListBox* m_pPaperBox;
+ VclPtr<FixedText> m_pPaperText;
+ VclPtr<ListBox> m_pPaperBox;
- ListBox* m_pOrientBox;
+ VclPtr<ListBox> m_pOrientBox;
- FixedText* m_pDuplexText;
- ListBox* m_pDuplexBox;
+ VclPtr<FixedText> m_pDuplexText;
+ VclPtr<ListBox> m_pDuplexBox;
- FixedText* m_pSlotText;
- ListBox* m_pSlotBox;
+ VclPtr<FixedText> m_pSlotText;
+ VclPtr<ListBox> m_pSlotBox;
DECL_LINK( SelectHdl, ListBox* );
public:
RTSPaperPage( RTSDialog* );
+ virtual ~RTSPaperPage();
+ virtual void dispose() SAL_OVERRIDE;
void update();
@@ -95,16 +97,16 @@ public:
class RTSDevicePage : public TabPage
{
- RTSDialog* m_pParent;
+ VclPtr<RTSDialog> m_pParent;
- ListBox* m_pPPDKeyBox;
- ListBox* m_pPPDValueBox;
+ VclPtr<ListBox> m_pPPDKeyBox;
+ VclPtr<ListBox> m_pPPDValueBox;
const psp::PPDValue* m_pCustomValue;
- Edit* m_pCustomEdit;
+ VclPtr<Edit> m_pCustomEdit;
- ListBox* m_pLevelBox;
- ListBox* m_pSpaceBox;
- ListBox* m_pDepthBox;
+ VclPtr<ListBox> m_pLevelBox;
+ VclPtr<ListBox> m_pSpaceBox;
+ VclPtr<ListBox> m_pDepthBox;
void FillValueBox( const ::psp::PPDKey* );
@@ -112,6 +114,8 @@ class RTSDevicePage : public TabPage
DECL_LINK( ModifyHdl, Edit* );
public:
RTSDevicePage( RTSDialog* );
+ virtual ~RTSDevicePage();
+ virtual void dispose() SAL_OVERRIDE;
sal_uLong getLevel();
sal_uLong getPDFDevice();
diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx
index fc9f04b8d686..fe1361fc84b8 100644
--- a/vcl/inc/brdwin.hxx
+++ b/vcl/inc/brdwin.hxx
@@ -83,7 +83,7 @@ class ImplBorderWindow : public vcl::Window
private:
ImplBorderWindowView* mpBorderView;
- vcl::Window* mpMenuBarWindow;
+ VclPtr<vcl::Window> mpMenuBarWindow;
long mnMinWidth;
long mnMinHeight;
long mnMaxWidth;
@@ -174,7 +174,7 @@ public:
struct ImplBorderFrameData
{
- ImplBorderWindow* mpBorderWindow;
+ VclPtr<ImplBorderWindow> mpBorderWindow;
OutputDevice* mpOutDev;
Rectangle maTitleRect;
Rectangle maPinRect;
@@ -253,7 +253,7 @@ public:
class ImplSmallBorderWindowView : public ImplBorderWindowView
{
- ImplBorderWindow* mpBorderWindow;
+ VclPtr<ImplBorderWindow> mpBorderWindow;
OutputDevice* mpOutDev;
long mnWidth;
long mnHeight;
diff --git a/vcl/inc/dndevdis.hxx b/vcl/inc/dndevdis.hxx
index 978910a46f01..b542581efee1 100644
--- a/vcl/inc/dndevdis.hxx
+++ b/vcl/inc/dndevdis.hxx
@@ -32,9 +32,9 @@ class DNDEventDispatcher: public ::cppu::WeakImplHelper3<
::com::sun::star::datatransfer::dnd::XDropTargetDragContext,
::com::sun::star::datatransfer::dnd::XDragGestureListener >
{
- vcl::Window * m_pTopWindow;
+ VclPtr<vcl::Window> m_pTopWindow;
- vcl::Window * m_pCurrentWindow;
+ VclPtr<vcl::Window> m_pCurrentWindow;
void designate_currentwindow(vcl::Window *pWindow);
DECL_LINK(WindowEventListener, VclSimpleEvent*);
diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx
index 1f023a869ba3..1e81f60f5a6a 100644
--- a/vcl/inc/ilstbox.hxx
+++ b/vcl/inc/ilstbox.hxx
@@ -87,7 +87,7 @@ struct ImplEntryType
class ImplEntryList
{
private:
- vcl::Window* mpWindow; ///< For getting the current locale when matching strings
+ VclPtr<vcl::Window> mpWindow; ///< For getting the current locale when matching strings
sal_Int32 mnLastSelected;
sal_Int32 mnSelectionAnchor;
sal_Int32 mnImages;
@@ -384,9 +384,9 @@ class ImplListBox : public Control
{
private:
ImplListBoxWindowPtr maLBWindow;
- ScrollBar* mpHScrollBar;
- ScrollBar* mpVScrollBar;
- ScrollBarBox* mpScrollBarBox;
+ VclPtr<ScrollBar> mpHScrollBar;
+ VclPtr<ScrollBar> mpVScrollBar;
+ VclPtr<ScrollBarBox> mpScrollBarBox;
/// bitfield
bool mbVScroll : 1; // VScroll an oder aus
@@ -511,7 +511,7 @@ public:
class ImplListBoxFloatingWindow : public FloatingWindow
{
private:
- ImplListBox* mpImplLB;
+ VclPtr<ImplListBox> mpImplLB;
Size maPrefSz;
sal_uInt16 mnDDLineCount;
sal_Int32 mnPopupModeStartSaveSelection;
@@ -522,7 +522,8 @@ protected:
public:
ImplListBoxFloatingWindow( vcl::Window* pParent );
-
+ virtual ~ImplListBoxFloatingWindow();
+ virtual void dispose() SAL_OVERRIDE;
void SetImplListBox( ImplListBox* pLB ) { mpImplLB = pLB; }
void SetPrefSize( const Size& rSz ) { maPrefSz = rSz; }
diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx
index 7af9e1e8ec00..b470b7c37742 100644
--- a/vcl/inc/printdlg.hxx
+++ b/vcl/inc/printdlg.hxx
@@ -63,6 +63,8 @@ namespace vcl
public:
PrintPreviewWindow( vcl::Window* pParent );
+ virtual ~PrintPreviewWindow();
+ virtual void dispose() SAL_OVERRIDE;
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
virtual void Command( const CommandEvent& ) SAL_OVERRIDE;
@@ -75,8 +77,6 @@ namespace vcl
sal_Int32 i_nDPIX, sal_Int32 i_nDPIY,
bool i_bGreyscale
);
- private:
- virtual void dispose() SAL_OVERRIDE;
};
class ShowNupOrderWindow : public vcl::Window
@@ -106,31 +106,31 @@ namespace vcl
class NUpTabPage
{
public:
- RadioButton* mpPagesBtn;
- RadioButton* mpBrochureBtn;
- FixedText* mpPagesBoxTitleTxt;
- ListBox* mpNupPagesBox;
+ VclPtr<RadioButton> mpPagesBtn;
+ VclPtr<RadioButton> mpBrochureBtn;
+ VclPtr<FixedText> mpPagesBoxTitleTxt;
+ VclPtr<ListBox> mpNupPagesBox;
// controls for "Custom" page mode
- FixedText* mpNupNumPagesTxt;
- NumericField* mpNupColEdt;
- FixedText* mpNupTimesTxt;
- NumericField* mpNupRowsEdt;
- FixedText* mpPageMarginTxt1;
- MetricField* mpPageMarginEdt;
- FixedText* mpPageMarginTxt2;
- FixedText* mpSheetMarginTxt1;
- MetricField* mpSheetMarginEdt;
- FixedText* mpSheetMarginTxt2;
- FixedText* mpNupOrientationTxt;
- ListBox* mpNupOrientationBox;
+ VclPtr<FixedText> mpNupNumPagesTxt;
+ VclPtr<NumericField> mpNupColEdt;
+ VclPtr<FixedText> mpNupTimesTxt;
+ VclPtr<NumericField> mpNupRowsEdt;
+ VclPtr<FixedText> mpPageMarginTxt1;
+ VclPtr<MetricField> mpPageMarginEdt;
+ VclPtr<FixedText> mpPageMarginTxt2;
+ VclPtr<FixedText> mpSheetMarginTxt1;
+ VclPtr<MetricField> mpSheetMarginEdt;
+ VclPtr<FixedText> mpSheetMarginTxt2;
+ VclPtr<FixedText> mpNupOrientationTxt;
+ VclPtr<ListBox> mpNupOrientationBox;
// page order ("left to right, then down")
- FixedText* mpNupOrderTxt;
- ListBox* mpNupOrderBox;
- ShowNupOrderWindow* mpNupOrderWin;
+ VclPtr<FixedText> mpNupOrderTxt;
+ VclPtr<ListBox> mpNupOrderBox;
+ VclPtr<ShowNupOrderWindow> mpNupOrderWin;
/// border around each page
- CheckBox* mpBorderCB;
+ VclPtr<CheckBox> mpBorderCB;
void setupLayout();
@@ -145,18 +145,18 @@ namespace vcl
class JobTabPage
{
public:
- ListBox* mpPrinters;
- FixedText* mpStatusTxt;
- FixedText* mpLocationTxt;
- FixedText* mpCommentTxt;
+ VclPtr<ListBox> mpPrinters;
+ VclPtr<FixedText> mpStatusTxt;
+ VclPtr<FixedText> mpLocationTxt;
+ VclPtr<FixedText> mpCommentTxt;
- PushButton* mpSetupButton;
+ VclPtr<PushButton> mpSetupButton;
- FixedLine* mpCopySpacer;
- NumericField* mpCopyCountField;
- CheckBox* mpCollateBox;
- FixedImage* mpCollateImage;
- CheckBox* mpReverseOrderBox;
+ VclPtr<FixedLine> mpCopySpacer;
+ VclPtr<NumericField> mpCopyCountField;
+ VclPtr<CheckBox> mpCollateBox;
+ VclPtr<FixedImage> mpCollateImage;
+ VclPtr<CheckBox> mpReverseOrderBox;
Image maCollateImg;
Image maNoCollateImg;
@@ -172,9 +172,9 @@ namespace vcl
class OutputOptPage
{
public:
- CheckBox* mpToFileBox;
- CheckBox* mpCollateSingleJobsBox;
- CheckBox* mpPapersizeFromSetup;
+ VclPtr<CheckBox> mpToFileBox;
+ VclPtr<CheckBox> mpCollateSingleJobsBox;
+ VclPtr<CheckBox> mpPapersizeFromSetup;
OutputOptPage( VclBuilder* );
@@ -185,31 +185,31 @@ namespace vcl
VclBuilder* mpCustomOptionsUIBuilder;
std::shared_ptr<PrinterController> maPController;
- TabControl* mpTabCtrl;
+ VclPtr<TabControl> mpTabCtrl;
NUpTabPage maNUpPage;
JobTabPage maJobPage;
OutputOptPage maOptionsPage;
- PrintPreviewWindow* mpPreviewWindow;
- NumericField* mpPageEdit;
+ VclPtr<PrintPreviewWindow> mpPreviewWindow;
+ VclPtr<NumericField> mpPageEdit;
- FixedText* mpNumPagesText;
- PushButton* mpBackwardBtn;
- PushButton* mpForwardBtn;
+ VclPtr<FixedText> mpNumPagesText;
+ VclPtr<PushButton> mpBackwardBtn;
+ VclPtr<PushButton> mpForwardBtn;
- OKButton* mpOKButton;
- CancelButton* mpCancelButton;
- HelpButton* mpHelpButton;
+ VclPtr<OKButton> mpOKButton;
+ VclPtr<CancelButton> mpCancelButton;
+ VclPtr<HelpButton> mpHelpButton;
- OUString maPageStr;
- OUString maNoPageStr;
+ OUString maPageStr;
+ OUString maNoPageStr;
sal_Int32 mnCurPage;
sal_Int32 mnCachedPages;
- std::map< vcl::Window*, OUString > maControlToPropertyMap;
- std::map< OUString, std::vector< vcl::Window* > >
+ std::map< VclPtr<vcl::Window>, OUString > maControlToPropertyMap;
+ std::map< OUString, std::vector< VclPtr<vcl::Window> > >
maPropertyToWindowMap;
- std::map< vcl::Window*, sal_Int32 > maControlToNumValMap;
- std::set< OUString > maReverseDependencySet;
+ std::map< VclPtr<vcl::Window>, sal_Int32 > maControlToNumValMap;
+ std::set< OUString > maReverseDependencySet;
Size maNupPortraitSize;
Size maNupLandscapeSize;
@@ -271,9 +271,9 @@ namespace vcl
class PrintProgressDialog : public ModelessDialog
{
OUString maStr;
- FixedText* mpText;
- ProgressBar* mpProgress;
- CancelButton* mpButton;
+ VclPtr<FixedText> mpText;
+ VclPtr<ProgressBar> mpProgress;
+ VclPtr<CancelButton> mpButton;
bool mbCanceled;
sal_Int32 mnCur;
@@ -283,7 +283,8 @@ namespace vcl
public:
PrintProgressDialog(vcl::Window* i_pParent, int i_nMax);
-
+ virtual ~PrintProgressDialog();
+ virtual void dispose() SAL_OVERRIDE;
bool isCanceled() const { return mbCanceled; }
void setProgress( int i_nCurrent, int i_nMax = -1 );
void tick();
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 6bbcb29f658f..bdb50aa603bb 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -33,6 +33,8 @@
#include <vcl/impdel.hxx>
#include <rtl/ustring.hxx>
#include <vcl/keycod.hxx>
+#include <vcl/window.hxx>
+#include <vcl/vclptr.hxx>
#include <vcl/window.hxx>
// complete vcl::Window for SalFrame::CallCallback under -fsanitize=function
@@ -100,11 +102,11 @@ class VCL_PLUGIN_PUBLIC SalFrame
, public SalGeometryProvider
{
// the VCL window corresponding to this frame
- vcl::Window* m_pWindow;
+ VclPtr<vcl::Window> m_pWindow;
SALFRAMEPROC m_pProc;
public:
- SalFrame() : m_pWindow( NULL ), m_pProc( NULL ) {}
+ SalFrame();
virtual ~SalFrame();
SalFrameGeometry maGeometry;
@@ -230,8 +232,7 @@ public:
// Callbacks (indepent part in vcl/source/window/winproc.cxx)
// for default message handling return 0
- void SetCallback( vcl::Window* pWindow, SALFRAMEPROC pProc )
- { m_pWindow = pWindow; m_pProc = pProc; }
+ void SetCallback( vcl::Window* pWindow, SALFRAMEPROC pProc );
// returns the instance set
vcl::Window* GetWindow() const { return m_pWindow; }
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 8d2cf2d0b1e2..4377d0c58b91 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -122,7 +122,7 @@ struct ImplSVAppData
Help* mpHelp; // Application help
PopupMenu* mpActivePopupMenu; // Actives Popup-Menu (in Execute)
ImplIdleMgr* mpIdleMgr; // Idle-Manager
- ImplWheelWindow* mpWheelWindow; // WheelWindow
+ VclPtr<ImplWheelWindow> mpWheelWindow; // WheelWindow
ImplHotKey* mpFirstHotKey; // HotKey-Verwaltung
ImplEventHook* mpFirstEventHook; // Event-Hooks
VclEventListeners2* mpPostYieldListeners; // post yield listeners
@@ -179,20 +179,20 @@ struct ImplSVGDIData
struct ImplSVWinData
{
- vcl::Window* mpFirstFrame; // First FrameWindow
- vcl::Window* mpDefDialogParent; // Default Dialog Parent
- WorkWindow* mpAppWin; // Application-Window
- vcl::Window* mpFocusWin; // window, that has the focus
- vcl::Window* mpActiveApplicationFrame; // the last active application frame, can be used as DefModalDialogParent if no focuswin set
- vcl::Window* mpCaptureWin; // window, that has the mouse capture
- vcl::Window* mpLastDeacWin; // Window, that need a deactivate (FloatingWindow-Handling)
- FloatingWindow* mpFirstFloat; // First FloatingWindow in PopupMode
- Dialog* mpLastExecuteDlg; // First Dialog that is in Execute
- vcl::Window* mpExtTextInputWin; // Window, which is in ExtTextInput
- vcl::Window* mpTrackWin; // window, that is in tracking mode
+ VclPtr<vcl::Window> mpFirstFrame; // First FrameWindow
+ VclPtr<vcl::Window> mpDefDialogParent; // Default Dialog Parent
+ VclPtr<WorkWindow> mpAppWin; // Application-Window
+ VclPtr<vcl::Window> mpFocusWin; // window, that has the focus
+ VclPtr<vcl::Window> mpActiveApplicationFrame; // the last active application frame, can be used as DefModalDialogParent if no focuswin set
+ VclPtr<vcl::Window> mpCaptureWin; // window, that has the mouse capture
+ VclPtr<vcl::Window> mpLastDeacWin; // Window, that need a deactivate (FloatingWindow-Handling)
+ VclPtr<FloatingWindow> mpFirstFloat; // First FloatingWindow in PopupMode
+ VclPtr<Dialog> mpLastExecuteDlg; // First Dialog that is in Execute
+ VclPtr<vcl::Window> mpExtTextInputWin; // Window, which is in ExtTextInput
+ VclPtr<vcl::Window> mpTrackWin; // window, that is in tracking mode
AutoTimer* mpTrackTimer; // tracking timer
ImageList* mpMsgBoxImgList; // ImageList for MessageBox
- vcl::Window* mpAutoScrollWin; // window, that is in AutoScrollMode mode
+ VclPtr<vcl::Window> mpAutoScrollWin; // window, that is in AutoScrollMode mode
sal_uInt16 mnTrackFlags; // tracking flags
sal_uInt16 mnAutoScrollFlags; // auto scroll flags
bool mbNoDeactivate; // true: do not execute Deactivate
@@ -239,7 +239,7 @@ struct ImplSVHelpData
bool mbKeyboardHelp : 1; // tiphelp was activated by keyboard
bool mbAutoHelpId : 1; // generate HelpIds
bool mbRequestingHelp : 1; // In Window::RequestHelp
- HelpTextWindow* mpHelpWin; // HelpWindow
+ VclPtr<HelpTextWindow> mpHelpWin; // HelpWindow
sal_uLong mnLastHelpHideTime; // ticks of last show
};
@@ -372,15 +372,10 @@ FieldUnitStringList* ImplGetCleanedFieldUnits();
struct ImplDelData
{
ImplDelData* mpNext;
- const vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
bool mbDel;
- ImplDelData( const vcl::Window* pWindow = NULL ) :
- mpNext( NULL ),
- mpWindow( NULL ),
- mbDel( false )
- { if( pWindow ) AttachToWindow( pWindow ); }
-
+ ImplDelData( vcl::Window* pWindow = NULL );
virtual ~ImplDelData();
bool IsDead() const
@@ -396,14 +391,14 @@ private:
struct ImplFocusDelData : public ImplDelData
{
- vcl::Window* mpFocusWin;
+ VclPtr<vcl::Window> mpFocusWin;
};
struct ImplSVEvent
{
void* mpData;
Link* mpLink;
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
ImplDelData maDelData;
bool mbCall;
};
diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h
index 935d1184e81c..61d247bd270b 100644
--- a/vcl/inc/toolbox.h
+++ b/vcl/inc/toolbox.h
@@ -37,7 +37,7 @@ namespace vcl { class Window; }
struct ImplToolItem
{
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
void* mpUserData;
Image maImage;
Image maImageOriginal;
diff --git a/vcl/inc/unx/i18n_status.hxx b/vcl/inc/unx/i18n_status.hxx
index ee0ff3419bb8..ff954ceb37c4 100644
--- a/vcl/inc/unx/i18n_status.hxx
+++ b/vcl/inc/unx/i18n_status.hxx
@@ -22,6 +22,7 @@
#include <rtl/ustring.hxx>
#include <salimestatus.hxx>
+#include <vcl/vclptr.hxx>
#include <vector>
@@ -57,7 +58,7 @@ public:
};
private:
SalFrame* m_pParent;
- StatusWindow* m_pStatusWindow;
+ VclPtr<StatusWindow> m_pStatusWindow;
OUString m_aCurrentIM;
::std::vector< ChoiceData > m_aChoices;
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index ab9c90aab86a..4bc12075b8a8 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -115,15 +115,15 @@ struct ImplWinData
sal_uInt16 mnIsTopWindow;
bool mbMouseOver; //< tracks mouse over for native widget paint effect
bool mbEnableNativeWidget; //< toggle native widget rendering
- ::std::list< vcl::Window* >
+ ::std::list< VclPtr<vcl::Window> >
maTopWindowChildren;
};
struct ImplOverlapData
{
VirtualDevice* mpSaveBackDev; //< saved background bitmap
- vcl::Region* mpSaveBackRgn; //< saved region, which must be invalidated
- vcl::Window* mpNextBackWin; //< next window with saved background
+ vcl::Region* mpSaveBackRgn; //< saved region, which must be invalidated
+ VclPtr<vcl::Window> mpNextBackWin; //< next window with saved background
sal_uIntPtr mnSaveBackSize; //< bitmap size of saved background
bool mbSaveBack; //< true: save background
sal_uInt8 mnTopLevel; //< Level for Overlap-Window
@@ -134,13 +134,13 @@ struct ImplFrameData
Idle maPaintIdle; //< paint idle handler
Idle maResizeIdle; //< resize timer
InputContext maOldInputContext; //< last set Input Context
- vcl::Window* mpNextFrame; //< next frame window
- vcl::Window* mpFirstOverlap; //< first overlap vcl::Window
- vcl::Window* mpFocusWin; //< focus window (is also set, when frame doesn't have the focous)
- vcl::Window* mpMouseMoveWin; //< last window, where MouseMove() called
- vcl::Window* mpMouseDownWin; //< last window, where MouseButtonDown() called
- vcl::Window* mpFirstBackWin; //< first overlap-window with saved background
- ::std::vector<vcl::Window *> maOwnerDrawList; //< List of system windows with owner draw decoration
+ VclPtr<vcl::Window> mpNextFrame; //< next frame window
+ VclPtr<vcl::Window> mpFirstOverlap; //< first overlap vcl::Window
+ VclPtr<vcl::Window> mpFocusWin; //< focus window (is also set, when frame doesn't have the focous)
+ VclPtr<vcl::Window> mpMouseMoveWin; //< last window, where MouseMove() called
+ VclPtr<vcl::Window> mpMouseDownWin; //< last window, where MouseButtonDown() called
+ VclPtr<vcl::Window> mpFirstBackWin; //< first overlap-window with saved background
+ ::std::vector<VclPtr<vcl::Window> > maOwnerDrawList; //< List of system windows with owner draw decoration
PhysicalFontCollection* mpFontCollection; //< Font-List for this frame
ImplFontCache* mpFontCache; //< Font-Cache for this frame
sal_Int32 mnDPIX; //< Original Screen Resolution
@@ -189,9 +189,9 @@ struct ImplAccessibleInfos
sal_uInt16 nAccessibleRole;
OUString* pAccessibleName;
OUString* pAccessibleDescription;
- vcl::Window* pLabeledByWindow;
- vcl::Window* pLabelForWindow;
- vcl::Window* pMemberOfWindow;
+ VclPtr<vcl::Window> pLabeledByWindow;
+ VclPtr<vcl::Window> pLabelForWindow;
+ VclPtr<vcl::Window> pMemberOfWindow;
ImplAccessibleInfos();
~ImplAccessibleInfos();
@@ -213,21 +213,21 @@ public:
ImplFrameData* mpFrameData;
SalFrame* mpFrame;
SalObject* mpSysObj;
- vcl::Window* mpFrameWindow;
- vcl::Window* mpOverlapWindow;
+ VclPtr<vcl::Window> mpFrameWindow;
+ VclPtr<vcl::Window> mpOverlapWindow;
VclPtr<vcl::Window> mpBorderWindow;
- vcl::Window* mpClientWindow;
- vcl::Window* mpParent;
- vcl::Window* mpRealParent;
- vcl::Window* mpFirstChild;
- vcl::Window* mpLastChild;
- vcl::Window* mpFirstOverlap;
- vcl::Window* mpLastOverlap;
- vcl::Window* mpPrev;
- vcl::Window* mpNext;
- vcl::Window* mpNextOverlap;
- vcl::Window* mpLastFocusWindow;
- vcl::Window* mpDlgCtrlDownWindow;
+ VclPtr<vcl::Window> mpClientWindow;
+ VclPtr<vcl::Window> mpParent;
+ VclPtr<vcl::Window> mpRealParent;
+ VclPtr<vcl::Window> mpFirstChild;
+ VclPtr<vcl::Window> mpLastChild;
+ VclPtr<vcl::Window> mpFirstOverlap;
+ VclPtr<vcl::Window> mpLastOverlap;
+ VclPtr<vcl::Window> mpPrev;
+ VclPtr<vcl::Window> mpNext;
+ VclPtr<vcl::Window> mpNextOverlap;
+ VclPtr<vcl::Window> mpLastFocusWindow;
+ VclPtr<vcl::Window> mpDlgCtrlDownWindow;
VclEventListeners maEventListeners;
VclEventListeners maChildEventListeners;
@@ -262,8 +262,8 @@ public:
InputContext maInputContext;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > mxWindowPeer;
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxAccessible;
- std::shared_ptr<VclSizeGroup> m_xSizeGroup;
- std::vector<FixedText*> m_aMnemonicLabels;
+ std::shared_ptr< VclSizeGroup > m_xSizeGroup;
+ std::vector< VclPtr<FixedText> > m_aMnemonicLabels;
ImplAccessibleInfos* mpAccessibleInfos;
VCLXWindow* mpVCLXWindow;
vcl::Region maWinRegion; //< region to 'shape' the VCL window (frame coordinates)
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index a0447312a778..e05b73480148 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -28,6 +28,9 @@
#include <salobj.hxx>
#include <salmenu.hxx>
+
+SalFrame::SalFrame() : m_pWindow( NULL ), m_pProc( NULL ) {}
+
// this file contains the virtual destructors of the sal interface
// compilers usually put their vtables where the destructor is
@@ -35,6 +38,12 @@ SalFrame::~SalFrame()
{
}
+void SalFrame::SetCallback( vcl::Window* pWindow, SALFRAMEPROC pProc )
+{
+ m_pWindow = pWindow;
+ m_pProc = pProc;
+}
+
// default to full-frame flushes
// on ports where partial-flushes are much cheaper this method should be overridden
void SalFrame::Flush( const Rectangle& )
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 4c3ba1cf994b..8344b71b5dca 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -156,21 +156,21 @@ struct ImplEventHook
struct ImplPostEventData
{
sal_uLong mnEvent;
- const vcl::Window* mpWin;
+ VclPtr<vcl::Window> mpWin;
ImplSVEvent * mnEventId;
KeyEvent maKeyEvent;
MouseEvent maMouseEvent;
ZoomEvent maZoomEvent;
ScrollEvent maScrollEvent;
- ImplPostEventData( sal_uLong nEvent, const vcl::Window* pWin, const KeyEvent& rKeyEvent ) :
+ ImplPostEventData( sal_uLong nEvent, vcl::Window* pWin, const KeyEvent& rKeyEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maKeyEvent( rKeyEvent ) {}
- ImplPostEventData( sal_uLong nEvent, const vcl::Window* pWin, const MouseEvent& rMouseEvent ) :
+ ImplPostEventData( sal_uLong nEvent, vcl::Window* pWin, const MouseEvent& rMouseEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maMouseEvent( rMouseEvent ) {}
#if !HAVE_FEATURE_DESKTOP
- ImplPostEventData( sal_uLong nEvent, const vcl::Window* pWin, const ZoomEvent& rZoomEvent ) :
+ ImplPostEventData( sal_uLong nEvent, vcl::Window* pWin, const ZoomEvent& rZoomEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maZoomEvent( rZoomEvent ) {}
- ImplPostEventData( sal_uLong nEvent, const vcl::Window* pWin, const ScrollEvent& rScrollEvent ) :
+ ImplPostEventData( sal_uLong nEvent, vcl::Window* pWin, const ScrollEvent& rScrollEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maScrollEvent( rScrollEvent ) {}
#endif
@@ -855,8 +855,8 @@ IMPL_STATIC_LINK_NOINSTANCE( Application, PostEventHandler, void*, pCallData )
break;
};
- if( pData->mpWin && pData->mpWin->mpWindowImpl->mpFrameWindow && pEventData )
- ImplWindowFrameProc( pData->mpWin->mpWindowImpl->mpFrameWindow, NULL, (sal_uInt16) nEvent, pEventData );
+ if( pData->mpWin && pData->mpWin.get()->mpWindowImpl->mpFrameWindow.get() && pEventData )
+ ImplWindowFrameProc( pData->mpWin.get()->mpWindowImpl->mpFrameWindow.get(), NULL, (sal_uInt16) nEvent, pEventData );
// remove this event from list of posted events, watch for destruction of internal data
::std::list< ImplPostEventPair >::iterator aIter( aPostedEventList.begin() );
@@ -1010,7 +1010,7 @@ long Application::GetTopWindowCount()
{
long nRet = 0;
ImplSVData* pSVData = ImplGetSVData();
- vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame : NULL;
+ vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame.get() : NULL;
while( pWin )
{
if( pWin->ImplGetWindow()->IsTopWindow() )
@@ -1024,7 +1024,7 @@ vcl::Window* Application::GetTopWindow( long nIndex )
{
long nIdx = 0;
ImplSVData* pSVData = ImplGetSVData();
- vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame : NULL;
+ vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame.get() : NULL;
while( pWin )
{
if( pWin->ImplGetWindow()->IsTopWindow() )
@@ -1268,7 +1268,7 @@ vcl::Window* Application::GetDefDialogParent()
// #103442# find some useful dialog parent if there
// was no default set
// NOTE: currently even the default is not used
- if( false && pSVData->maWinData.mpDefDialogParent != NULL )
+ if( false && pSVData->maWinData.mpDefDialogParent.get() != NULL )
return pSVData->maWinData.mpDefDialogParent;
else
{
@@ -1629,6 +1629,14 @@ void Application::setDeInitHook(Link const & hook) {
pSVData->maAppData.mbInAppMain = true;
}
+ImplDelData::ImplDelData( vcl::Window* pWindow ) :
+ mpNext( NULL ),
+ mpWindow( NULL ),
+ mbDel( false )
+{
+ if( pWindow ) AttachToWindow( pWindow );
+}
+
// helper method to allow inline constructor even for pWindow!=NULL case
void ImplDelData::AttachToWindow( const vcl::Window* pWindow )
{
@@ -1649,7 +1657,7 @@ ImplDelData::~ImplDelData()
if( !mbDel && mpWindow )
{
// the window still exists but we were not removed
- const_cast<vcl::Window*>(mpWindow)->ImplRemoveDel( this );
+ const_cast<vcl::Window*>(mpWindow.get())->ImplRemoveDel( this );
mpWindow = NULL;
}
}
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index b30848cc20a8..aafc326065ba 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -45,6 +45,8 @@
#include "salimestatus.hxx"
#include "salsys.hxx"
#include "svids.hrc"
+#include "helpwin.hxx"
+#include "../window/scrwnd.hxx"
#include "com/sun/star/accessibility/MSAAService.hpp"
diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index 11d03e3f8b03..325c9b659b18 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -18,6 +18,7 @@
*/
#include "vcl/vclevent.hxx"
+#include "vcl/window.hxx"
#include "svdata.hxx"
@@ -158,4 +159,12 @@ void VclEventListeners2::callListeners( VclSimpleEvent* i_pEvent )
m_aIterators.pop_back();
}
+
+VclWindowEvent::VclWindowEvent( vcl::Window* pWin, sal_uLong n, void* pDat ) : VclSimpleEvent(n)
+{
+ pWindow = pWin; pData = pDat;
+}
+
+VclWindowEvent::~VclWindowEvent() {}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 7861656edf90..fb1a4a88bcdf 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -96,11 +96,12 @@ Button::Button( WindowType nType ) :
Button::~Button()
{
dispose();
- delete mpButtonData;
}
void Button::dispose()
{
+ delete mpButtonData;
+ mpButtonData = NULL;
Control::dispose();
}
@@ -2147,20 +2148,20 @@ void RadioButton::group(RadioButton &rOther)
if (!m_xGroup)
{
- m_xGroup.reset(new std::vector<RadioButton*>);
+ m_xGroup.reset(new std::vector<VclPtr<RadioButton> >);
m_xGroup->push_back(this);
}
- std::vector<RadioButton*>::iterator aFind = std::find(m_xGroup->begin(), m_xGroup->end(), &rOther);
+ auto aFind = std::find(m_xGroup->begin(), m_xGroup->end(), VclPtr<RadioButton>(&rOther));
if (aFind == m_xGroup->end())
{
m_xGroup->push_back(&rOther);
if (rOther.m_xGroup)
{
- std::vector< RadioButton* > aOthers(rOther.GetRadioButtonGroup(false));
+ std::vector< VclPtr<RadioButton> > aOthers(rOther.GetRadioButtonGroup(false));
//make all members of the group share the same button group
- for (std::vector<RadioButton*>::iterator aI = aOthers.begin(), aEnd = aOthers.end(); aI != aEnd; ++aI)
+ for (auto aI = aOthers.begin(), aEnd = aOthers.end(); aI != aEnd; ++aI)
{
aFind = std::find(m_xGroup->begin(), m_xGroup->end(), *aI);
if (aFind == m_xGroup->end())
@@ -2169,8 +2170,7 @@ void RadioButton::group(RadioButton &rOther)
}
//make all members of the group share the same button group
- for (std::vector<RadioButton*>::iterator aI = m_xGroup->begin(), aEnd = m_xGroup->end();
- aI != aEnd; ++aI)
+ for (auto aI = m_xGroup->begin(), aEnd = m_xGroup->end(); aI != aEnd; ++aI)
{
RadioButton* pButton = *aI;
pButton->m_xGroup = m_xGroup;
@@ -2182,14 +2182,14 @@ void RadioButton::group(RadioButton &rOther)
ImplUncheckAllOther();
}
-std::vector< RadioButton* > RadioButton::GetRadioButtonGroup(bool bIncludeThis) const
+std::vector< VclPtr<RadioButton> > RadioButton::GetRadioButtonGroup(bool bIncludeThis) const
{
if (m_xGroup)
{
if (bIncludeThis)
return *m_xGroup;
- std::vector< RadioButton* > aGroup;
- for (std::vector<RadioButton*>::iterator aI = m_xGroup->begin(), aEnd = m_xGroup->end(); aI != aEnd; ++aI)
+ std::vector< VclPtr<RadioButton> > aGroup;
+ for (auto aI = m_xGroup->begin(), aEnd = m_xGroup->end(); aI != aEnd; ++aI)
{
RadioButton *pRadioButton = *aI;
if (pRadioButton == this)
@@ -2211,7 +2211,7 @@ std::vector< RadioButton* > RadioButton::GetRadioButtonGroup(bool bIncludeThis)
else
break;
}
- std::vector< RadioButton* > aGroup;
+ std::vector< VclPtr<RadioButton> > aGroup;
// insert radiobuttons up to next group
do
{
@@ -2230,9 +2230,9 @@ void RadioButton::ImplUncheckAllOther()
{
mpWindowImpl->mnStyle |= WB_TABSTOP;
- std::vector<RadioButton*> aGroup(GetRadioButtonGroup(false));
+ std::vector<VclPtr<RadioButton> > aGroup(GetRadioButtonGroup(false));
// iterate over radio button group and checked buttons
- for (std::vector<RadioButton*>::iterator aI = aGroup.begin(), aEnd = aGroup.end(); aI != aEnd; ++aI)
+ for (auto aI = aGroup.begin(), aEnd = aGroup.end(); aI != aEnd; ++aI)
{
RadioButton *pWindow = *aI;
if ( pWindow->IsChecked() )
@@ -2316,7 +2316,7 @@ void RadioButton::dispose()
{
if (m_xGroup)
{
- m_xGroup->erase(std::remove(m_xGroup->begin(), m_xGroup->end(), this),
+ m_xGroup->erase(std::remove(m_xGroup->begin(), m_xGroup->end(), VclPtr<RadioButton>(this)),
m_xGroup->end());
m_xGroup.reset();
}
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index c0e5d9bb8310..89a2fe1ac156 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -79,11 +79,9 @@ void ComboBox::dispose()
mpImplLB = NULL;
delete pImplLB;
- delete mpFloatWin;
- mpFloatWin = NULL;
- delete mpBtn;
- mpBtn = NULL;
-
+ mpFloatWin.clear();
+ mpBtn.clear();
+ mpImplLB.clear();
Edit::dispose();
}
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 4cec1d0004d6..264a54668843 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -127,6 +127,10 @@ void Control::SetText( const OUString& rStr )
Window::SetText( rStr );
}
+ControlLayoutData::ControlLayoutData() : m_pParent( NULL )
+{
+}
+
Rectangle ControlLayoutData::GetCharacterBounds( long nIndex ) const
{
return (nIndex >= 0 && nIndex < (long) m_aUnicodeBoundRects.size()) ? m_aUnicodeBoundRects[ nIndex ] : Rectangle();
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 4f111bffaedf..52b8bdac4ea9 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -466,6 +466,7 @@ FixedText::~FixedText()
void FixedText::dispose()
{
set_mnemonic_widget(NULL);
+ m_pMnemonicWindow.clear();
Control::dispose();
}
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index b6a63c66ea6e..fce7d3fc6e17 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2174,9 +2174,9 @@ ImplListBox::~ImplListBox()
void ImplListBox::dispose()
{
- delete mpHScrollBar;
- delete mpVScrollBar;
- delete mpScrollBarBox;
+ mpHScrollBar.clear();
+ mpVScrollBar.clear();
+ mpScrollBarBox.clear();
maLBWindow.clear();
Control::dispose();
}
@@ -2931,6 +2931,18 @@ ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( vcl::Window* pParent ) :
}
+ImplListBoxFloatingWindow::~ImplListBoxFloatingWindow()
+{
+ dispose();
+}
+
+void ImplListBoxFloatingWindow::dispose()
+{
+ mpImplLB.clear();
+ FloatingWindow::dispose();
+}
+
+
bool ImplListBoxFloatingWindow::PreNotify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS )
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 31fcb3aecac5..78e0146a7938 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -77,18 +77,10 @@ void ListBox::dispose()
{
CallEventListeners( VCLEVENT_OBJECT_DYING );
- // When destroying the FloatWin TH does a GrabFocus to the Parent:
- // that means this "ListBox => PreNotify() ..."
- ImplListBox *pImplLB = mpImplLB;
- mpImplLB = NULL;
- delete pImplLB;
-
- delete mpFloatWin;
- mpFloatWin = NULL;
- delete mpImplWin;
- mpImplWin = NULL;
- delete mpBtn;
- mpBtn = NULL;
+ mpFloatWin.clear();
+ mpImplWin.clear();
+ mpBtn.clear();
+ mpImplLB.clear();
Control::dispose();
}
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 4a89c0f33ca5..ecb2c6022496 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -42,7 +42,7 @@
struct ImplTabItem
{
sal_uInt16 mnId;
- TabPage* mpTabPage;
+ VclPtr<TabPage> mpTabPage;
OUString maText;
OUString maFormatText;
OUString maHelpText;
@@ -67,7 +67,7 @@ struct ImplTabCtrlData
std::vector< Rectangle > maTabRectangles;
Point maItemsOffset; // offset of the tabitems
std::vector< ImplTabItem > maItemList;
- ListBox* mpListBox;
+ VclPtr<ListBox> mpListBox;
};
#define TAB_OFFSET 3
@@ -204,12 +204,8 @@ void TabControl::dispose()
ImplFreeLayoutData();
// delete TabCtrl data
- if ( mpTabCtrlData )
- {
- delete mpTabCtrlData->mpListBox;
- delete mpTabCtrlData;
- mpTabCtrlData = NULL;
- }
+ delete mpTabCtrlData;
+ mpTabCtrlData = NULL;
Control::dispose();
}
@@ -580,9 +576,9 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId )
ImplTabItem* pOldItem = ImplGetItem( nOldId );
ImplTabItem* pItem = ImplGetItem( nId );
- TabPage* pOldPage = (pOldItem) ? pOldItem->mpTabPage : NULL;
- TabPage* pPage = (pItem) ? pItem->mpTabPage : NULL;
- vcl::Window* pCtrlParent = GetParent();
+ TabPage* pOldPage = (pOldItem) ? pOldItem->mpTabPage.get() : NULL;
+ TabPage* pPage = (pItem) ? pItem->mpTabPage.get() : NULL;
+ vcl::Window* pCtrlParent = GetParent();
if ( IsReallyVisible() && IsUpdateMode() )
{
@@ -1019,7 +1015,7 @@ IMPL_LINK( TabControl, ImplWindowEventListener, VclSimpleEvent*, pEvent )
void TabControl::MouseButtonDown( const MouseEvent& rMEvt )
{
- if( mpTabCtrlData->mpListBox == NULL )
+ if( mpTabCtrlData->mpListBox.get() == NULL )
{
if( rMEvt.IsLeft() )
{
@@ -1089,7 +1085,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
// in this case we're only interested in the top border of the tabpage because the tabitems are used
// standalone (eg impress)
bool bNoTabPage = false;
- TabPage* pCurPage = pCurItem ? pCurItem->mpTabPage : NULL;
+ TabPage* pCurPage = pCurItem ? pCurItem->mpTabPage.get() : NULL;
if( !pCurPage || !pCurPage->IsVisible() )
{
bNoTabPage = true;
@@ -1175,7 +1171,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
}
}
- if ( !mpTabCtrlData->maItemList.empty() && mpTabCtrlData->mpListBox == NULL )
+ if ( !mpTabCtrlData->maItemList.empty() && mpTabCtrlData->mpListBox == nullptr )
{
// Some native toolkits (GTK+) draw tabs right-to-left, with an
// overlap between adjacent tabs
@@ -1433,7 +1429,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
void TabControl::Command( const CommandEvent& rCEvt )
{
- if( (mpTabCtrlData->mpListBox == NULL) && (rCEvt.GetCommand() == COMMAND_CONTEXTMENU) && (GetPageCount() > 1) )
+ if( (mpTabCtrlData->mpListBox == nullptr) && (rCEvt.GetCommand() == COMMAND_CONTEXTMENU) && (GetPageCount() > 1) )
{
Point aMenuPos;
bool bMenu;
@@ -1885,7 +1881,7 @@ void TabControl::SetTabPage( sal_uInt16 nPageId, TabPage* pTabPage )
{
ImplTabItem* pItem = ImplGetItem( nPageId );
- if ( pItem && (pItem->mpTabPage != pTabPage) )
+ if ( pItem && (pItem->mpTabPage.get() != pTabPage) )
{
if ( pTabPage )
{
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index cafbbf52f9c4..cc1a37e3fd32 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -147,7 +147,7 @@ struct ImpTextView
{
TextEngine* mpTextEngine;
- vcl::Window* mpWindow;
+ VclPtr<vcl::Window> mpWindow;
TextSelection maSelection;
Point maStartDocPos;
// TextPaM maMBDownPaM;
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index c0406c6329a6..30213f56cf80 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -76,12 +76,12 @@ public:
class ImpVclMEdit : public SfxListener
{
private:
- VclMultiLineEdit* pVclMultiLineEdit;
+ VclPtr<VclMultiLineEdit> pVclMultiLineEdit;
- TextWindow* mpTextWindow;
- ScrollBar* mpHScrollBar;
- ScrollBar* mpVScrollBar;
- ScrollBarBox* mpScrollBox;
+ VclPtr<TextWindow> mpTextWindow;
+ VclPtr<ScrollBar> mpHScrollBar;
+ VclPtr<ScrollBar> mpVScrollBar;
+ VclPtr<ScrollBarBox> mpScrollBox;
Point maTextWindowOffset;
sal_Int32 mnTextWidth;
@@ -161,9 +161,9 @@ ImpVclMEdit::ImpVclMEdit( VclMultiLineEdit* pEdt, WinBits nWinStyle )
void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle )
{
- const bool bHaveVScroll = (NULL != mpVScrollBar);
- const bool bHaveHScroll = (NULL != mpHScrollBar);
- const bool bHaveScrollBox = (NULL != mpScrollBox);
+ const bool bHaveVScroll = (nullptr != mpVScrollBar);
+ const bool bHaveHScroll = (nullptr != mpHScrollBar);
+ const bool bHaveScrollBox = (nullptr != mpScrollBox);
bool bNeedVScroll = ( nWinStyle & WB_VSCROLL ) == WB_VSCROLL;
const bool bNeedHScroll = ( nWinStyle & WB_HSCROLL ) == WB_HSCROLL;
@@ -184,7 +184,6 @@ void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle )
bool bScrollbarsChanged = false;
if ( bHaveVScroll != bNeedVScroll )
{
- delete mpVScrollBar;
mpVScrollBar = bNeedVScroll ? new ScrollBar( pVclMultiLineEdit, WB_VSCROLL|WB_DRAG ) : NULL;
if ( bNeedVScroll )
@@ -198,7 +197,6 @@ void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle )
if ( bHaveHScroll != bNeedHScroll )
{
- delete mpHScrollBar;
mpHScrollBar = bNeedHScroll ? new ScrollBar( pVclMultiLineEdit, WB_HSCROLL|WB_DRAG ) : NULL;
if ( bNeedHScroll )
@@ -212,7 +210,6 @@ void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle )
if ( bHaveScrollBox != bNeedScrollBox )
{
- delete mpScrollBox;
mpScrollBox = bNeedScrollBox ? new ScrollBarBox( pVclMultiLineEdit, WB_SIZEABLE ) : NULL;
if ( bNeedScrollBox )
@@ -258,10 +255,6 @@ void ImpVclMEdit::InitFromStyle( WinBits nWinStyle )
ImpVclMEdit::~ImpVclMEdit()
{
EndListening( *mpTextWindow->GetTextEngine() );
- delete mpTextWindow;
- delete mpHScrollBar;
- delete mpVScrollBar;
- delete mpScrollBox;
}
void ImpVclMEdit::ImpSetScrollBarRanges()
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 52c097c293d0..60ade3ac9845 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -156,7 +156,7 @@ public:
vcl::PrinterController::MultiPageSetup maMultiPage;
- vcl::PrintProgressDialog* mpProgress;
+ VclPtr<vcl::PrintProgressDialog> mpProgress;
ImplPageCache maPageCache;
@@ -191,7 +191,6 @@ public:
mnDefaultPaperBin( -1 ),
mnFixedPaperBin( -1 )
{}
- ~ImplPrinterControllerData() { delete mpProgress; }
Size getRealPaperSize( const Size& i_rPageSize, bool bNoNUP ) const
{
@@ -1332,8 +1331,7 @@ void PrinterController::abortJob()
// applications (well, sw) depend on a page request with "IsLastPage" = true
// to free resources, else they (well, sw) will crash eventually
setLastPage( true );
- delete mpImplData->mpProgress;
- mpImplData->mpProgress = NULL;
+ mpImplData->mpProgress.clear();
GDIMetaFile aMtf;
getPageFile( 0, aMtf, false );
}
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index a3b7c0f8d061..99fea0983520 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -20,6 +20,7 @@
#include <tools/debug.hxx>
#include <tools/rc.h>
+#include <vcl/window.hxx>
#include <vcl/svapp.hxx>
#include <accel.h>
#include <vcl/accel.hxx>
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index ca8865618834..07abf759c92d 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -649,12 +649,11 @@ vcl::Window* Window::GetAccessibleRelationLabeledBy() const
if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabeledByWindow)
return mpWindowImpl->mpAccessibleInfos->pLabeledByWindow;
- std::vector<FixedText*> aMnemonicLabels(list_mnemonic_labels());
+ std::vector<VclPtr<FixedText> > aMnemonicLabels(list_mnemonic_labels());
if (!aMnemonicLabels.empty())
{
//if we have multiple labels, then prefer the first that is visible
- for (std::vector<FixedText*>::iterator
- aI = aMnemonicLabels.begin(), aEnd = aMnemonicLabels.end(); aI != aEnd; ++aI)
+ for (auto aI = aMnemonicLabels.begin(), aEnd = aMnemonicLabels.end(); aI != aEnd; ++aI)
{
vcl::Window *pCandidate = *aI;
if (pCandidate->IsVisible())
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 7f32e648d423..a023af642fa6 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1853,7 +1853,7 @@ void ImplBorderWindow::dispose()
{
delete mpBorderView;
mpBorderView = NULL;
-
+ mpMenuBarWindow.clear();
vcl::Window::dispose();
}
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index 4c0e73cd0a09..cc3c69e32a07 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -30,10 +30,10 @@ typedef boost::ptr_vector<ImplBtnDlgItem>::const_iterator btn_const_iterator;
struct ImplBtnDlgItem
{
sal_uInt16 mnId;
- bool mbOwnButton;
- bool mbDummyAlign;
- long mnSepSize;
- PushButton* mpPushButton;
+ bool mbOwnButton;
+ bool mbDummyAlign;
+ long mnSepSize;
+ VclPtr<PushButton> mpPushButton;
};
void ButtonDialog::ImplInitButtonDialogData()
@@ -64,13 +64,7 @@ ButtonDialog::~ButtonDialog()
void ButtonDialog::dispose()
{
- for ( btn_iterator it = maItemList.begin(); it != maItemList.end(); ++it)
- {
- if ( it->mpPushButton && it->mbOwnButton )
- delete it->mpPushButton;
- }
maItemList.clear();
-
Dialog::dispose();
}
@@ -335,10 +329,7 @@ void ButtonDialog::RemoveButton( sal_uInt16 nId )
if (it->mnId == nId)
{
it->mpPushButton->Hide();
-
- if (it->mbOwnButton )
- delete it->mpPushButton;
-
+ it->mpPushButton.clear();
maItemList.erase(it);
return;
}
@@ -352,9 +343,6 @@ void ButtonDialog::Clear()
for (btn_iterator it = maItemList.begin(); it != maItemList.end(); ++it)
{
it->mpPushButton->Hide();
-
- if (it->mbOwnButton )
- delete it->mpPushButton;
}
maItemList.clear();
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 278a3e5edbd6..275e075a8bd6 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -471,14 +471,14 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr
//Remove ScrollWindow parent widgets whose children in vcl implement scrolling
//internally.
- for (std::map<vcl::Window*, vcl::Window*>::iterator aI = m_pParserState->m_aRedundantParentWidgets.begin(),
+ for (auto aI = m_pParserState->m_aRedundantParentWidgets.begin(),
aEnd = m_pParserState->m_aRedundantParentWidgets.end(); aI != aEnd; ++aI)
{
delete_by_window(aI->first);
}
//fdo#67378 merge the label into the disclosure button
- for (std::vector<VclExpander*>::iterator aI = m_pParserState->m_aExpanderWidgets.begin(),
+ for (auto aI = m_pParserState->m_aExpanderWidgets.begin(),
aEnd = m_pParserState->m_aExpanderWidgets.end(); aI != aEnd; ++aI)
{
VclExpander *pOne = *aI;
@@ -1773,8 +1773,8 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
pWindow->SetHelpId(m_sHelpRoot + id);
SAL_INFO("vcl.layout", "for " << name.getStr() <<
", created " << pWindow << " child of " <<
- pParent << "(" << pWindow->mpWindowImpl->mpParent << "/" <<
- pWindow->mpWindowImpl->mpRealParent << "/" <<
+ pParent << "(" << pWindow->mpWindowImpl->mpParent.get() << "/" <<
+ pWindow->mpWindowImpl->mpRealParent.get() << "/" <<
pWindow->mpWindowImpl->mpBorderWindow.get() << ") with helpid " <<
pWindow->GetHelpId().getStr());
m_aChildren.push_back(WinAndId(id, pWindow, bVertical));
@@ -1853,14 +1853,14 @@ vcl::Window *VclBuilder::insertObject(vcl::Window *pParent, const OString &rClas
//if we're being inserting under a toplevel dialog whose init is
//deferred due to waiting to encounter it in this .ui, and it hasn't
//been seen yet, then make unattached widgets parent-less toplevels
- if (pParent == m_pParent && m_bToplevelHasDeferredInit)
+ if (pParent == m_pParent.get() && m_bToplevelHasDeferredInit)
pParent = NULL;
pCurrentChild = makeObject(pParent, rClass, rID, rProps);
}
if (pCurrentChild)
{
- if (pCurrentChild == m_pParent && m_bToplevelHasDeferredProperties)
+ if (pCurrentChild == m_pParent.get() && m_bToplevelHasDeferredProperties)
m_aDeferredProperties = rProps;
else
set_properties(pCurrentChild, rProps);
@@ -1872,7 +1872,7 @@ vcl::Window *VclBuilder::insertObject(vcl::Window *pParent, const OString &rClas
pCurrentChild->set_font_attribute(rKey, rValue);
}
- m_pParserState->m_aAtkInfo[pCurrentChild] = rAtk;
+ m_pParserState->m_aAtkInfo[VclPtr<vcl::Window>(pCurrentChild)] = rAtk;
}
rProps.clear();
@@ -1880,7 +1880,7 @@ vcl::Window *VclBuilder::insertObject(vcl::Window *pParent, const OString &rClas
rAtk.clear();
if (!pCurrentChild)
- pCurrentChild = m_aChildren.empty() ? pParent : m_aChildren.back().m_pWindow;
+ pCurrentChild = m_aChildren.empty() ? pParent : m_aChildren.back().m_pWindow.get();
return pCurrentChild;
}
@@ -2100,14 +2100,14 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
if (sInternalChild.startsWith("vbox") || sInternalChild.startsWith("messagedialog-vbox"))
{
if (Dialog *pBoxParent = dynamic_cast<Dialog*>(pParent))
- pBoxParent->set_content_area(VclPtr<VclBox>(static_cast<VclBox*>(pCurrentChild))); // FIXME-VCLPTR
+ pBoxParent->set_content_area(static_cast<VclBox*>(pCurrentChild)); // FIXME-VCLPTR
}
else if (sInternalChild.startsWith("action_area") || sInternalChild.startsWith("messagedialog-action_area"))
{
vcl::Window *pContentArea = pCurrentChild->GetParent();
if (Dialog *pBoxParent = dynamic_cast<Dialog*>(pContentArea ? pContentArea->GetParent() : NULL))
{
- pBoxParent->set_action_area(VclPtr<VclButtonBox>(static_cast<VclButtonBox*>(pCurrentChild))); // FIXME-VCLPTR
+ pBoxParent->set_action_area(static_cast<VclButtonBox*>(pCurrentChild)); // FIXME-VCLPTR
}
}
@@ -3022,7 +3022,7 @@ void VclBuilder::applyPackingProperty(vcl::Window *pCurrent,
if (pCurrent->GetType() == WINDOW_SCROLLWINDOW)
{
- std::map<vcl::Window*, vcl::Window*>::iterator aFind = m_pParserState->m_aRedundantParentWidgets.find(pCurrent);
+ auto aFind = m_pParserState->m_aRedundantParentWidgets.find(VclPtr<vcl::Window>(pCurrent));
if (aFind != m_pParserState->m_aRedundantParentWidgets.end())
{
pCurrent = aFind->second;
@@ -3286,7 +3286,6 @@ void VclBuilder::delete_by_name(const OString& sID)
{
if (aI->m_sID.equals(sID))
{
- delete aI->m_pWindow;
m_aChildren.erase(aI);
break;
}
@@ -3558,4 +3557,8 @@ void VclBuilder::mungeTextBuffer(VclMultiLineEdit &rTarget, const TextBuffer &rT
}
}
+VclBuilder::ParserState::ParserState()
+ : m_nLastToolbarId(0)
+{}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index 0c24e3051832..5fc94df0436a 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -929,7 +929,7 @@ void Window::ImplDeleteOverlapBackground()
else
{
vcl::Window* pTemp = mpWindowImpl->mpFrameData->mpFirstBackWin;
- while ( pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin != this )
+ while ( pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin.get() != this )
pTemp = pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin;
pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin = mpWindowImpl->mpOverlapData->mpNextBackWin;
}
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index d0c9a7327e5d..e61d82b1b5d6 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -38,7 +38,7 @@ struct ImplCursorData
unsigned char mnDirection; // indicates writing direction
sal_uInt16 mnStyle; // Cursor-Style
bool mbCurVisible; // Ist Cursor aktuell sichtbar
- vcl::Window* mpWindow; // Zugeordnetes Windows
+ VclPtr<vcl::Window> mpWindow; // Zugeordnetes Windows
};
static void ImplCursorInvert( ImplCursorData* pData )
@@ -319,7 +319,7 @@ void vcl::Cursor::Hide()
void vcl::Cursor::SetWindow( vcl::Window* pWindow )
{
- if ( mpWindow != pWindow )
+ if ( mpWindow.get() != pWindow )
{
mpWindow = pWindow;
ImplNew();
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index b34a451cc450..6c8641948e5d 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -551,6 +551,7 @@ void Dialog::dispose()
{
delete mpDialogImpl;
mpDialogImpl = NULL;
+ mpPrevExecuteDlg.clear();
mpActionArea.clear();
mpContentArea.clear();
SystemWindow::dispose();
@@ -1005,7 +1006,7 @@ void Dialog::SetModalInputMode( bool bModal )
pPrevModalDlg = pPrevModalDlg->mpPrevExecuteDlg;
if( pPrevModalDlg &&
- ( pPrevModalDlg == mpPrevExecuteDlg
+ ( pPrevModalDlg == mpPrevExecuteDlg.get()
|| !pPrevModalDlg->IsWindowOrChild( this, true ) ) )
{
mpPrevExecuteDlg->SetModalInputMode( false );
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 2b63b3f3920d..eb899fdb2831 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -530,9 +530,9 @@ namespace
);
}
- bool focusNextInGroup(std::vector<RadioButton*>::iterator aStart, std::vector<RadioButton*> &rGroup)
+ bool focusNextInGroup(const std::vector<VclPtr<RadioButton> >::iterator& aStart, std::vector<VclPtr<RadioButton> > &rGroup)
{
- std::vector<RadioButton*>::iterator aI(aStart);
+ std::vector<VclPtr<RadioButton> >::iterator aI(aStart);
if (aStart != rGroup.end())
++aI;
@@ -564,7 +564,7 @@ namespace
bool nextInGroup(RadioButton *pSourceWindow, bool bBackward)
{
- std::vector<RadioButton*> aGroup(pSourceWindow->GetRadioButtonGroup(true));
+ std::vector<VclPtr<RadioButton> > aGroup(pSourceWindow->GetRadioButtonGroup(true));
if (aGroup.size() == 1) //only one button in group
return false;
@@ -572,7 +572,7 @@ namespace
if (bBackward)
std::reverse(aGroup.begin(), aGroup.end());
- std::vector<RadioButton*>::iterator aStart(std::find(aGroup.begin(), aGroup.end(), pSourceWindow));
+ auto aStart(std::find(aGroup.begin(), aGroup.end(), VclPtr<RadioButton>(pSourceWindow)));
assert(aStart != aGroup.end());
@@ -716,9 +716,9 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
if ( bKeyInput && mpWindowImpl->mpDlgCtrlDownWindow )
{
- if ( mpWindowImpl->mpDlgCtrlDownWindow != pButtonWindow )
+ if ( mpWindowImpl->mpDlgCtrlDownWindow.get() != pButtonWindow )
{
- static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false );
+ static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow.get())->SetPressed( false );
mpWindowImpl->mpDlgCtrlDownWindow = NULL;
return true;
}
@@ -928,16 +928,16 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
{
if ( bKeyInput )
{
- if ( mpWindowImpl->mpDlgCtrlDownWindow && (mpWindowImpl->mpDlgCtrlDownWindow != pButtonWindow) )
+ if ( mpWindowImpl->mpDlgCtrlDownWindow && (mpWindowImpl->mpDlgCtrlDownWindow.get() != pButtonWindow) )
{
- static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false );
+ static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow.get())->SetPressed( false );
mpWindowImpl->mpDlgCtrlDownWindow = NULL;
}
static_cast<PushButton*>(pButtonWindow)->SetPressed( true );
mpWindowImpl->mpDlgCtrlDownWindow = pButtonWindow;
}
- else if ( mpWindowImpl->mpDlgCtrlDownWindow == pButtonWindow )
+ else if ( mpWindowImpl->mpDlgCtrlDownWindow.get() == pButtonWindow )
{
mpWindowImpl->mpDlgCtrlDownWindow = NULL;
static_cast<PushButton*>(pButtonWindow)->SetPressed( false );
@@ -1060,7 +1060,7 @@ void Window::ImplDlgCtrlFocusChanged( vcl::Window* pWindow, bool bGetFocus )
{
if ( mpWindowImpl->mpDlgCtrlDownWindow && !bGetFocus )
{
- static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false );
+ static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow.get())->SetPressed( false );
mpWindowImpl->mpDlgCtrlDownWindow = NULL;
}
diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx
index dabfef79569e..94d6ae75b1dd 100644
--- a/vcl/source/window/dndevdis.cxx
+++ b/vcl/source/window/dndevdis.cxx
@@ -99,7 +99,7 @@ void SAL_CALL DNDEventDispatcher::drop( const DropTargetDropEvent& dtde )
vcl::Window* pChildWindow = findTopLevelWindow(location);
// handle the case that drop is in an other vcl window than the last dragOver
- if( pChildWindow != m_pCurrentWindow )
+ if( pChildWindow != m_pCurrentWindow.get() )
{
// fire dragExit on listeners of previous window
fireDragExitEvent( m_pCurrentWindow );
@@ -177,7 +177,7 @@ void SAL_CALL DNDEventDispatcher::dragOver( const DropTargetDragEvent& dtde )
vcl::Window * pChildWindow = findTopLevelWindow(location);
- if( pChildWindow != m_pCurrentWindow )
+ if( pChildWindow != m_pCurrentWindow.get() )
{
// fire dragExit on listeners of previous window
fireDragExitEvent( m_pCurrentWindow );
@@ -215,7 +215,7 @@ void SAL_CALL DNDEventDispatcher::dropActionChanged( const DropTargetDragEvent&
vcl::Window* pChildWindow = findTopLevelWindow(location);
- if( pChildWindow != m_pCurrentWindow )
+ if( pChildWindow != m_pCurrentWindow.get() )
{
// fire dragExit on listeners of previous window
fireDragExitEvent( m_pCurrentWindow );
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 7b0f1c3ae2c5..90b436eddd33 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -827,7 +827,7 @@ ImplDockingWindowWrapper::ImplDockingWindowWrapper( const vcl::Window *pWindow )
, mbStartDockingEnabled(false)
, mbLocked(false)
{
- DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow );
+ DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow.get() );
if( pDockWin )
mnFloatBits = pDockWin->GetFloatStyle();
}
@@ -1112,7 +1112,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, sal_uLon
// prepare reparenting
vcl::Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT );
mpOldBorderWin = GetWindow()->GetWindow( WINDOW_BORDER );
- if( mpOldBorderWin == GetWindow() )
+ if( mpOldBorderWin.get() == GetWindow() )
mpOldBorderWin = NULL; // no border window found
// the new parent for popup mode
@@ -1167,7 +1167,7 @@ IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd)
GetWindow()->Show( false, SHOW_NOFOCUSCHANGE );
// set parameter for handler before destroying floating window
- ImplPopupFloatWin *pPopupFloatWin = static_cast<ImplPopupFloatWin*>(mpFloatWin);
+ ImplPopupFloatWin *pPopupFloatWin = static_cast<ImplPopupFloatWin*>(mpFloatWin.get());
EndPopupModeData aData( pPopupFloatWin->GetTearOffPosition(), mpFloatWin->IsPopupModeTearOff() );
// before deleting change parent back, so we can delete the floating window alone
@@ -1176,7 +1176,7 @@ IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd)
if ( mpOldBorderWin )
{
GetWindow()->SetParent( mpOldBorderWin );
- static_cast<ImplBorderWindow*>(mpOldBorderWin)->GetBorder(
+ static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder(
GetWindow()->mpWindowImpl->mnLeftBorder, GetWindow()->mpWindowImpl->mnTopBorder,
GetWindow()->mpWindowImpl->mnRightBorder, GetWindow()->mpWindowImpl->mnBottomBorder );
mpOldBorderWin->Resize();
@@ -1185,8 +1185,7 @@ IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd)
GetWindow()->SetParent( pRealParent );
GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
- delete mpFloatWin;
- mpFloatWin = NULL;
+ mpFloatWin.clear();
// call handler - which will destroy the window and thus the wrapper as well !
GetWindow()->CallEventListeners( VCLEVENT_WINDOW_ENDPOPUPMODE, &aData );
@@ -1291,7 +1290,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode )
if ( mpOldBorderWin )
{
GetWindow()->SetParent( mpOldBorderWin );
- static_cast<ImplBorderWindow*>(mpOldBorderWin)->GetBorder(
+ static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder(
GetWindow()->mpWindowImpl->mnLeftBorder, GetWindow()->mpWindowImpl->mnTopBorder,
GetWindow()->mpWindowImpl->mnRightBorder, GetWindow()->mpWindowImpl->mnBottomBorder );
mpOldBorderWin->Resize();
@@ -1300,7 +1299,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode )
GetWindow()->SetParent( pRealParent );
GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
- delete static_cast<ImplDockFloatWin2*>(mpFloatWin);
+ delete static_cast<ImplDockFloatWin2*>(mpFloatWin.get());
mpFloatWin = NULL;
GetWindow()->SetPosPixel( maDockPos );
@@ -1364,7 +1363,7 @@ void ImplDockingWindowWrapper::SetMaxOutputSizePixel( const Size& rSize )
bool ImplDockingWindowWrapper::IsFloatingMode() const
{
- return (mpFloatWin != NULL);
+ return (mpFloatWin != nullptr);
}
void ImplDockingWindowWrapper::SetDragArea( const Rectangle& rRect )
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index bc1740ef6771..743983c87952 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -42,8 +42,8 @@ public:
ImplData();
~ImplData();
- vcl::Window* mpParent;
- Size maMaxOutSize;
+ VclPtr<vcl::Window> mpParent;
+ Size maMaxOutSize;
};
DockingWindow::ImplData::ImplData()
@@ -59,7 +59,7 @@ DockingWindow::ImplData::~ImplData()
class ImplDockFloatWin : public FloatingWindow
{
private:
- DockingWindow* mpDockWin;
+ VclPtr<DockingWindow> mpDockWin;
sal_uLong mnLastTicks;
Idle maDockIdle;
Point maDockPos;
@@ -122,6 +122,7 @@ void ImplDockFloatWin::dispose()
disposeBuilder();
+ mpDockWin.clear();
FloatingWindow::dispose();
}
@@ -482,6 +483,9 @@ void DockingWindow::dispose()
}
delete mpImplData;
mpImplData = NULL;
+ mpFloatWin.clear();
+ mpOldBorderWin.clear();
+ mpDialogParent.clear();
Window::dispose();
}
@@ -867,13 +871,13 @@ void DockingWindow::SetFloatingMode( bool bFloatMode )
if ( mpOldBorderWin )
{
SetParent( mpOldBorderWin );
- static_cast<ImplBorderWindow*>(mpOldBorderWin)->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
+ static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
mpOldBorderWin->Resize();
}
mpWindowImpl->mpBorderWindow = mpOldBorderWin;
SetParent( pRealParent );
mpWindowImpl->mpRealParent = pRealParent;
- delete static_cast<ImplDockFloatWin*>(mpFloatWin);
+ mpFloatWin.clear();
mpFloatWin = NULL;
SetPosPixel( maDockPos );
@@ -1049,7 +1053,7 @@ bool DockingWindow::IsFloatingMode() const
if( pWrapper )
return pWrapper->IsFloatingMode();
else
- return (mpFloatWin != NULL);
+ return (mpFloatWin != nullptr);
}
void DockingWindow::SetMaxOutputSizePixel( const Size& rSize )
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 9b1e59df63e0..9a4f1c069b9d 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -283,7 +283,7 @@ ImplSVEvent * Window::PostUserEvent( const Link& rLink, void* pCaller )
void Window::RemoveUserEvent( ImplSVEvent * nUserEvent )
{
- DBG_ASSERT( nUserEvent->mpWindow == this,
+ DBG_ASSERT( nUserEvent->mpWindow.get() == this,
"Window::RemoveUserEvent(): Event doesn't send to this window or is already removed" );
DBG_ASSERT( nUserEvent->mbCall,
"Window::RemoveUserEvent(): Event is already removed" );
@@ -521,14 +521,14 @@ void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow,
{
if ( pSVData->maWinData.mpLastDeacWin )
{
- if ( pSVData->maWinData.mpLastDeacWin == pNewOverlapWindow )
+ if ( pSVData->maWinData.mpLastDeacWin.get() == pNewOverlapWindow )
bCallActivate = false;
else
{
vcl::Window* pLastRealWindow = pSVData->maWinData.mpLastDeacWin->ImplGetWindow();
pSVData->maWinData.mpLastDeacWin->mpWindowImpl->mbActive = false;
pSVData->maWinData.mpLastDeacWin->Deactivate();
- if ( pLastRealWindow != pSVData->maWinData.mpLastDeacWin )
+ if ( pLastRealWindow != pSVData->maWinData.mpLastDeacWin.get() )
{
pLastRealWindow->mpWindowImpl->mbActive = true;
pLastRealWindow->Activate();
@@ -574,5 +574,22 @@ void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow,
} /* namespace vcl */
+NotifyEvent::NotifyEvent()
+{
+ mpWindow = NULL;
+ mpData = NULL;
+ mnEventType = MouseNotifyEvent::NONE;
+ mnRetValue = 0;
+}
+
+NotifyEvent::NotifyEvent( MouseNotifyEvent nEventType, vcl::Window* pWindow,
+ const void* pEvent, long nRet )
+{
+ mpWindow = pWindow;
+ mpData = (void*)pEvent;
+ mnEventType = nEventType;
+ mnRetValue = nRet;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index ffafa4703622..7102b602633c 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -39,7 +39,7 @@ public:
ImplData();
~ImplData();
- ToolBox* mpBox;
+ VclPtr<ToolBox> mpBox;
Rectangle maItemEdgeClipRect; // used to clip the common edge between a toolbar item and the border of this window
};
@@ -208,6 +208,8 @@ void FloatingWindow::dispose()
delete mpImplData;
mpImplData = NULL;
+ mpNextFloat.clear();
+ mpFirstPopupModeWin.clear();
SystemWindow::dispose();
}
@@ -746,7 +748,7 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId )
mbInCleanUp = true; // prevent killing this window due to focus change while working with it
// stop the PopupMode also for all following PopupMode windows
- while ( pSVData->maWinData.mpFirstFloat && pSVData->maWinData.mpFirstFloat != this )
+ while ( pSVData->maWinData.mpFirstFloat && pSVData->maWinData.mpFirstFloat.get() != this )
pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL );
// delete window from the list
diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx
index 4268f498e74b..709f97696992 100644
--- a/vcl/source/window/introwin.cxx
+++ b/vcl/source/window/introwin.cxx
@@ -47,8 +47,10 @@ void IntroWindow::dispose()
{
// FIXME: really we should have a dispose & a ref-ptr there [!] ...
ImplSVData* pSVData = ImplGetSVData();
- if ( pSVData->mpIntroWindow == this )
- pSVData->mpIntroWindow = NULL;
+ if ( pSVData->mpIntroWindow.get() == this )
+ pSVData->mpIntroWindow = nullptr;
+
+ WorkWindow::dispose();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 5fee1f0f1bd8..1d691c0d9067 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1286,6 +1286,17 @@ void VclBin::setAllocation(const Size &rAllocation)
setLayoutAllocation(*pChild, Point(0, 0), rAllocation);
}
+VclFrame::~VclFrame()
+{
+ dispose();
+}
+
+void VclFrame::dispose()
+{
+ m_pLabel.clear();
+ VclBin::dispose();
+}
+
//To-Do, hook a DecorationView into VclFrame ?
Size VclFrame::calculateRequisition() const
@@ -1488,7 +1499,7 @@ Size VclExpander::calculateRequisition() const
WindowImpl* pWindowImpl = ImplGetWindowImpl();
const vcl::Window *pChild = get_child();
- const vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild : NULL;
+ const vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild.get() : NULL;
if (pChild && pChild->IsVisible() && m_pDisclosureButton->IsChecked())
aRet = getLayoutRequisition(*pChild);
@@ -1525,7 +1536,7 @@ void VclExpander::setAllocation(const Size &rAllocation)
//The label widget is the last (of two) children
vcl::Window *pChild = get_child();
- vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild : NULL;
+ vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild.get() ? pWindowImpl->mpLastChild.get() : NULL;
Size aButtonSize = getLayoutRequisition(*m_pDisclosureButton);
Size aLabelSize;
@@ -1835,7 +1846,7 @@ const vcl::Window *VclEventBox::get_child() const
{
const WindowImpl* pWindowImpl = ImplGetWindowImpl();
- assert(pWindowImpl->mpFirstChild == m_aEventBoxHelper.get());
+ assert(pWindowImpl->mpFirstChild.get() == m_aEventBoxHelper.get());
return pWindowImpl->mpFirstChild->GetWindow(WINDOW_NEXT);
}
@@ -2004,19 +2015,13 @@ void MessageDialog::dispose()
m_aOwnedButtons[i].disposeAndClear();
m_aOwnedButtons.clear();
- delete m_pSecondaryMessage;
- m_pSecondaryMessage = NULL;
-
- delete m_pPrimaryMessage;
- m_pSecondaryMessage = NULL;
-
- delete m_pImage;
- m_pImage = NULL;
-
+ m_pSecondaryMessage.clear();
+ m_pSecondaryMessage.clear();
+ m_pImage.clear();
m_pGrid.disposeAndClear();
m_pOwnedActionArea.disposeAndClear();
m_pOwnedContentArea.disposeAndClear();
-
+ m_pPrimaryMessage.clear();
Dialog::dispose();
}
@@ -2038,7 +2043,7 @@ IMPL_LINK(MessageDialog, ButtonHdl, Button *, pButton)
short MessageDialog::get_response(const vcl::Window *pWindow) const
{
- std::map<const vcl::Window*, short>::const_iterator aFind = m_aResponses.find(pWindow);
+ auto aFind = m_aResponses.find(pWindow);
if (aFind != m_aResponses.end())
return aFind->second;
if (!m_pUIBuilder)
@@ -2160,7 +2165,7 @@ short MessageDialog::Execute()
m_pSecondaryMessage->SetText(m_sSecondaryString);
m_pSecondaryMessage->Show(bHasSecondaryText);
- MessageDialog::SetMessagesWidths(this, m_pPrimaryMessage, bHasSecondaryText ? m_pSecondaryMessage : NULL);
+ MessageDialog::SetMessagesWidths(this, m_pPrimaryMessage, bHasSecondaryText ? m_pSecondaryMessage.get() : NULL);
VclButtonBox *pButtonBox = get_action_area();
assert(pButtonBox);
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index d32c86f3f07c..af18be1f4757 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -142,7 +142,7 @@ Menu::~Menu()
// and make sure the MenuFloatingWindow knows about our destruction
if ( pWindow )
{
- MenuFloatingWindow* pFloat = static_cast<MenuFloatingWindow*>(pWindow);
+ MenuFloatingWindow* pFloat = static_cast<MenuFloatingWindow*>(pWindow.get());
if( pFloat->pMenu == this )
pFloat->pMenu = NULL;
pWindow->SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >() );
@@ -1704,7 +1704,7 @@ Size Menu::ImplCalcSize( const vcl::Window* pWin )
// account for the size of the close button, which actually is a toolbox
// due to NWF this is variable
- long nCloseButtonHeight = static_cast<MenuBarWindow*>(pWindow)->MinCloseButtonSize().Height();
+ long nCloseButtonHeight = static_cast<MenuBarWindow*>(pWindow.get())->MinCloseButtonSize().Height();
if (aSz.Height() < nCloseButtonHeight)
aSz.Height() = nCloseButtonHeight;
}
@@ -2269,7 +2269,7 @@ void Menu::ImplFillLayoutData() const
}
else
{
- MenuFloatingWindow* pFloat = static_cast<MenuFloatingWindow*>(pWindow);
+ MenuFloatingWindow* pFloat = static_cast<MenuFloatingWindow*>(pWindow.get());
ImplPaint( pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), 0, false, true );
}
}
@@ -2381,9 +2381,9 @@ bool Menu::IsHighlighted( sal_uInt16 nItemPos ) const
if( pWindow )
{
if (IsMenuBar())
- bRet = ( nItemPos == static_cast< MenuBarWindow * > (pWindow)->GetHighlightedItem() );
+ bRet = ( nItemPos == static_cast< MenuBarWindow * > (pWindow.get())->GetHighlightedItem() );
else
- bRet = ( nItemPos == static_cast< MenuFloatingWindow * > (pWindow)->GetHighlightedItem() );
+ bRet = ( nItemPos == static_cast< MenuFloatingWindow * > (pWindow.get())->GetHighlightedItem() );
}
return bRet;
@@ -2395,13 +2395,13 @@ void Menu::HighlightItem( sal_uInt16 nItemPos )
{
if (IsMenuBar())
{
- MenuBarWindow* pMenuWin = static_cast< MenuBarWindow* >( pWindow );
+ MenuBarWindow* pMenuWin = static_cast< MenuBarWindow* >( pWindow.get() );
pMenuWin->SetAutoPopup( false );
pMenuWin->ChangeHighlightItem( nItemPos, false );
}
else
{
- static_cast< MenuFloatingWindow* >( pWindow )->ChangeHighlightItem( nItemPos, false );
+ static_cast< MenuFloatingWindow* >( pWindow.get() )->ChangeHighlightItem( nItemPos, false );
}
}
}
@@ -2411,7 +2411,7 @@ IMenuBarWindow* MenuBar::getMenuBarWindow()
{
// so far just a dynamic_cast, hopefully to be turned into something saner
// at some stage
- IMenuBarWindow *pWin = dynamic_cast<IMenuBarWindow*>(pWindow);
+ IMenuBarWindow *pWin = dynamic_cast<IMenuBarWindow*>(pWindow.get());
//either there is no window (fdo#87663) or it is an IMenuBarWindow
assert(!pWindow || pWin);
return pWin;
@@ -3009,9 +3009,9 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, sal_
{
sal_uInt16 aPos;
if (pSFrom->IsMenuBar())
- aPos = static_cast<MenuBarWindow *>(pSFrom->pWindow)->GetHighlightedItem();
+ aPos = static_cast<MenuBarWindow *>(pSFrom->pWindow.get())->GetHighlightedItem();
else
- aPos = static_cast<MenuFloatingWindow *>(pSFrom->pWindow)->GetHighlightedItem();
+ aPos = static_cast<MenuFloatingWindow *>(pSFrom->pWindow.get())->GetHighlightedItem();
pWin->SetPosInParent( aPos ); // store position to be sent in SUBMENUDEACTIVATE
pSFrom->ImplCallEventListeners( VCLEVENT_MENU_SUBMENUACTIVATE, aPos );
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 9ea6a12e764e..ac2170b8cc87 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -349,8 +349,8 @@ void MenuBarWindow::KillActivePopup()
{
if ( pActivePopup )
{
- if( pActivePopup->pWindow != NULL )
- if( static_cast<FloatingWindow *>(pActivePopup->pWindow)->IsInCleanUp() )
+ if( pActivePopup->pWindow )
+ if( static_cast<FloatingWindow *>(pActivePopup->pWindow.get())->IsInCleanUp() )
return; // kill it later
if ( pActivePopup->bInCallback )
@@ -457,7 +457,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, bool bSelectEntry, bool b
if( !bStayActive )
{
// #105406# avoid saving the focus when we already have the focus
- bool bNoSaveFocus = (this == ImplGetSVData()->maWinData.mpFocusWin );
+ bool bNoSaveFocus = (this == ImplGetSVData()->maWinData.mpFocusWin.get() );
if( nSaveFocusId )
{
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index e6fe541c9371..66297ea3f5c3 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -413,8 +413,8 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly )
{
if ( pActivePopup && ( !pThisOnly || ( pThisOnly == pActivePopup ) ) )
{
- if( pActivePopup->pWindow != NULL )
- if( static_cast<FloatingWindow *>(pActivePopup->pWindow)->IsInCleanUp() )
+ if( pActivePopup->pWindow )
+ if( static_cast<FloatingWindow *>(pActivePopup->pWindow.get())->IsInCleanUp() )
return; // kill it later
if ( pActivePopup->bInCallback )
pActivePopup->bCanceled = true;
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 3691a0a50625..f445b08d45b6 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -215,7 +215,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags )
// For a lack of design we need a little hack here to
// ensure that dialogs on close pass the focus back to
// the correct window
- if ( mpWindowImpl->mpLastFocusWindow && (mpWindowImpl->mpLastFocusWindow != this) &&
+ if ( mpWindowImpl->mpLastFocusWindow && (mpWindowImpl->mpLastFocusWindow.get() != this) &&
!(mpWindowImpl->mnDlgCtrlFlags & WINDOW_DLGCTRL_WANTFOCUS) &&
mpWindowImpl->mpLastFocusWindow->IsEnabled() &&
mpWindowImpl->mpLastFocusWindow->IsInputEnabled() &&
@@ -231,7 +231,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags )
// For a lack of design we need a little hack here to
// ensure that dialogs on close pass the focus back to
// the correct window
- if ( mpWindowImpl->mpLastFocusWindow && (mpWindowImpl->mpLastFocusWindow != this) &&
+ if ( mpWindowImpl->mpLastFocusWindow && (mpWindowImpl->mpLastFocusWindow.get() != this) &&
!(mpWindowImpl->mnDlgCtrlFlags & WINDOW_DLGCTRL_WANTFOCUS) &&
mpWindowImpl->mpLastFocusWindow->IsEnabled() &&
mpWindowImpl->mpLastFocusWindow->IsInputEnabled() &&
@@ -257,7 +257,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags )
vcl::Window *pFrame = pSVData->maWinData.mpFirstFrame;
while( pFrame )
{
- if( pFrame != mpWindowImpl->mpFrameWindow && pFrame->mpWindowImpl->mpFrameData->mnFocusId )
+ if( pFrame != mpWindowImpl->mpFrameWindow.get() && pFrame->mpWindowImpl->mpFrameData->mnFocusId )
{
bAsyncFocusWaiting = true;
break;
@@ -283,13 +283,13 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags )
pParent = pParent->mpWindowImpl->mpParent;
}
- if ( ( pSVData->maWinData.mpFocusWin != this &&
+ if ( ( pSVData->maWinData.mpFocusWin.get() != this &&
mpWindowImpl && !mpWindowImpl->mbInDispose ) ||
( bAsyncFocusWaiting && !bHasFocus && !bMustNotGrabFocus ) )
{
// EndExtTextInput if it is not the same window
if ( pSVData->maWinData.mpExtTextInputWin &&
- (pSVData->maWinData.mpExtTextInputWin != this) )
+ (pSVData->maWinData.mpExtTextInputWin.get() != this) )
pSVData->maWinData.mpExtTextInputWin->EndExtTextInput( EXTTEXTINPUT_END_COMPLETE );
// mark this windows as the last FocusWindow
@@ -360,7 +360,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags )
pOldFocusWindow->ImplCallDeactivateListeners( this );
}
- if ( pSVData->maWinData.mpFocusWin == this )
+ if ( pSVData->maWinData.mpFocusWin.get() == this )
{
if ( mpWindowImpl->mpSysObj )
{
@@ -369,7 +369,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags )
mpWindowImpl->mpSysObj->GrabFocus();
}
- if ( pSVData->maWinData.mpFocusWin == this )
+ if ( pSVData->maWinData.mpFocusWin.get() == this )
{
if ( mpWindowImpl->mpCursor )
mpWindowImpl->mpCursor->ImplShow();
@@ -452,13 +452,13 @@ void Window::CaptureMouse()
ImplSVData* pSVData = ImplGetSVData();
// possibly stop tracking
- if ( pSVData->maWinData.mpTrackWin != this )
+ if ( pSVData->maWinData.mpTrackWin.get() != this )
{
if ( pSVData->maWinData.mpTrackWin )
pSVData->maWinData.mpTrackWin->EndTracking( ENDTRACK_CANCEL );
}
- if ( pSVData->maWinData.mpCaptureWin != this )
+ if ( pSVData->maWinData.mpCaptureWin.get() != this )
{
pSVData->maWinData.mpCaptureWin = this;
mpWindowImpl->mpFrame->CaptureMouse( true );
@@ -470,10 +470,10 @@ void Window::ReleaseMouse()
ImplSVData* pSVData = ImplGetSVData();
- DBG_ASSERTWARNING( pSVData->maWinData.mpCaptureWin == this,
+ DBG_ASSERTWARNING( pSVData->maWinData.mpCaptureWin.get() == this,
"Window::ReleaseMouse(): window doesn't have the mouse capture" );
- if ( pSVData->maWinData.mpCaptureWin == this )
+ if ( pSVData->maWinData.mpCaptureWin.get() == this )
{
pSVData->maWinData.mpCaptureWin = NULL;
mpWindowImpl->mpFrame->CaptureMouse( false );
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index b4c49b4dca11..64bce64a7eb3 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -156,15 +156,9 @@ MessBox::~MessBox()
void MessBox::dispose()
{
- delete mpVCLMultiLineEdit;
- mpVCLMultiLineEdit = NULL;
-
- delete mpFixedImage;
- mpFixedImage = NULL;
-
- delete mpCheckBox;
- mpCheckBox = NULL;
-
+ mpVCLMultiLineEdit.clear();
+ mpFixedImage.clear();
+ mpCheckBox.clear();
ButtonDialog::dispose();
}
@@ -202,17 +196,12 @@ void MessBox::ImplPosControls()
WinBits nWinStyle = WB_LEFT | WB_NOLABEL;
sal_uInt16 nTextStyle = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT;
- delete mpVCLMultiLineEdit;
- if ( mpFixedImage )
- {
- delete mpFixedImage;
- mpFixedImage = NULL;
- }
+ mpVCLMultiLineEdit.clear();
+ mpFixedImage.clear();
if ( mpCheckBox )
{
mbCheck = mpCheckBox->IsChecked();
- delete mpCheckBox;
- mpCheckBox = NULL;
+ mpCheckBox.clear();
}
// Clean up message text with tabs
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 1384dfe3d8f2..a2bbfda232a7 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -43,7 +43,7 @@
class PaintHelper
{
private:
- vcl::Window* m_pWindow;
+ VclPtr<vcl::Window> m_pWindow;
vcl::Region* m_pChildRegion;
Rectangle m_aSelectionRect;
Rectangle m_aPaintRect;
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index ead659fcac08..bf4081aa2ae1 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -80,6 +80,18 @@ PrintDialog::PrintPreviewWindow::PrintPreviewWindow( vcl::Window* i_pParent )
maVertDim->SetText( OUString( "2.0in" ) );
}
+PrintDialog::PrintPreviewWindow::~PrintPreviewWindow()
+{
+ dispose();
+}
+
+void PrintDialog::PrintPreviewWindow::dispose()
+{
+ maHorzDim.clear();
+ maVertDim.clear();
+ Window::dispose();
+}
+
const sal_Int32 PrintDialog::PrintPreviewWindow::PREVIEW_BITMAP_WIDTH = 1600;
void PrintDialog::PrintPreviewWindow::DataChanged( const DataChangedEvent& i_rDCEvt )
@@ -250,13 +262,6 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi
Invalidate();
}
-void PrintDialog::PrintPreviewWindow::dispose()
-{
- maHorzDim.disposeAndClear();
- maVertDim.disposeAndClear();
- Window::dispose();
-}
-
void PrintDialog::PrintPreviewWindow::preparePreviewBitmap()
{
GDIMetaFile aMtf( maMtf );
@@ -717,6 +722,15 @@ PrintDialog::~PrintDialog()
void PrintDialog::dispose()
{
delete mpCustomOptionsUIBuilder;
+ mpTabCtrl.clear();
+ mpPreviewWindow.clear();
+ mpPageEdit.clear();
+ mpNumPagesText.clear();
+ mpBackwardBtn.clear();
+ mpForwardBtn.clear();
+ mpOKButton.clear();
+ mpCancelButton.clear();
+ mpHelpButton.clear();
ModalDialog::dispose();
}
@@ -1212,7 +1226,7 @@ void PrintDialog::checkControlDependencies()
void PrintDialog::checkOptionalControlDependencies()
{
- for( std::map< vcl::Window*, OUString >::iterator it = maControlToPropertyMap.begin();
+ for( auto it = maControlToPropertyMap.begin();
it != maControlToPropertyMap.end(); ++it )
{
bool bShouldbeEnabled = maPController->isUIOptionEnabled( it->second );
@@ -1234,9 +1248,9 @@ void PrintDialog::checkOptionalControlDependencies()
}
}
- if( bShouldbeEnabled && dynamic_cast<RadioButton*>(it->first) )
+ if( bShouldbeEnabled && dynamic_cast<RadioButton*>(it->first.get()) )
{
- std::map< vcl::Window*, sal_Int32 >::const_iterator r_it = maControlToNumValMap.find( it->first );
+ auto r_it = maControlToNumValMap.find( it->first );
if( r_it != maControlToNumValMap.end() )
{
bShouldbeEnabled = maPController->isUIChoiceEnabled( it->second, r_it->second );
@@ -1655,7 +1669,7 @@ IMPL_LINK_NOARG(PrintDialog, UIOptionsChanged)
PropertyValue* PrintDialog::getValueForWindow( vcl::Window* i_pWindow ) const
{
PropertyValue* pVal = NULL;
- std::map< vcl::Window*, OUString >::const_iterator it = maControlToPropertyMap.find( i_pWindow );
+ auto it = maControlToPropertyMap.find( i_pWindow );
if( it != maControlToPropertyMap.end() )
{
pVal = maPController->getValue( it->second );
@@ -1671,10 +1685,10 @@ PropertyValue* PrintDialog::getValueForWindow( vcl::Window* i_pWindow ) const
void PrintDialog::updateWindowFromProperty( const OUString& i_rProperty )
{
beans::PropertyValue* pValue = maPController->getValue( i_rProperty );
- std::map< OUString, std::vector< vcl::Window* > >::const_iterator it = maPropertyToWindowMap.find( i_rProperty );
+ auto it = maPropertyToWindowMap.find( i_rProperty );
if( pValue && it != maPropertyToWindowMap.end() )
{
- const std::vector< vcl::Window* >& rWindows( it->second );
+ const std::vector< VclPtr<vcl::Window> >& rWindows( it->second );
if( ! rWindows.empty() )
{
bool bVal = false;
@@ -1682,7 +1696,7 @@ void PrintDialog::updateWindowFromProperty( const OUString& i_rProperty )
if( pValue->Value >>= bVal )
{
// we should have a CheckBox for this one
- CheckBox* pBox = dynamic_cast< CheckBox* >( rWindows.front() );
+ CheckBox* pBox = dynamic_cast< CheckBox* >( rWindows.front().get() );
if( pBox )
{
pBox->Check( bVal );
@@ -1703,14 +1717,14 @@ void PrintDialog::updateWindowFromProperty( const OUString& i_rProperty )
else if( pValue->Value >>= nVal )
{
// this could be a ListBox or a RadioButtonGroup
- ListBox* pList = dynamic_cast< ListBox* >( rWindows.front() );
+ ListBox* pList = dynamic_cast< ListBox* >( rWindows.front().get() );
if( pList )
{
pList->SelectEntryPos( static_cast< sal_uInt16 >(nVal) );
}
else if( nVal >= 0 && nVal < sal_Int32(rWindows.size() ) )
{
- RadioButton* pBtn = dynamic_cast< RadioButton* >( rWindows[nVal] );
+ RadioButton* pBtn = dynamic_cast< RadioButton* >( rWindows[nVal].get() );
DBG_ASSERT( pBtn, "unexpected control for property" );
if( pBtn )
pBtn->Check();
@@ -1722,7 +1736,7 @@ void PrintDialog::updateWindowFromProperty( const OUString& i_rProperty )
void PrintDialog::makeEnabled( vcl::Window* i_pWindow )
{
- std::map< vcl::Window*, OUString >::const_iterator it = maControlToPropertyMap.find( i_pWindow );
+ auto it = maControlToPropertyMap.find( i_pWindow );
if( it != maControlToPropertyMap.end() )
{
OUString aDependency( maPController->makeEnabled( it->second ) );
@@ -1757,7 +1771,7 @@ IMPL_LINK( PrintDialog, UIOption_RadioHdl, RadioButton*, i_pBtn )
if( i_pBtn->IsChecked() )
{
PropertyValue* pVal = getValueForWindow( i_pBtn );
- std::map< vcl::Window*, sal_Int32 >::const_iterator it = maControlToNumValMap.find( i_pBtn );
+ auto it = maControlToNumValMap.find( i_pBtn );
if( pVal && it != maControlToNumValMap.end() )
{
makeEnabled( i_pBtn );
@@ -1900,6 +1914,19 @@ PrintProgressDialog::PrintProgressDialog(vcl::Window* i_pParent, int i_nMax)
}
+PrintProgressDialog::~PrintProgressDialog()
+{
+ dispose();
+}
+
+void PrintProgressDialog::dispose()
+{
+ mpText.clear();
+ mpProgress.clear();
+ mpButton.clear();
+ ModelessDialog::dispose();
+}
+
IMPL_LINK( PrintProgressDialog, ClickHdl, Button*, pButton )
{
if( pButton == mpButton )
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index f678900783f8..8201ea14627b 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -162,6 +162,7 @@ void Splitter::dispose()
TaskPaneList *pTList = pSysWin->GetTaskPaneList();
pTList->RemoveWindow(this);
}
+ mpRefWin.clear();
Window::dispose();
}
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 2b701e9dcd07..0e43c0cbe2ef 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -53,9 +53,9 @@ struct ImplSplitItem
long mnOldWidth;
long mnOldHeight;
ImplSplitSet* mpSet;
- vcl::Window* mpWindow;
- vcl::Window* mpOrgParent;
- sal_uInt16 mnId;
+ VclPtr<vcl::Window> mpWindow;
+ VclPtr<vcl::Window> mpOrgParent;
+ sal_uInt16 mnId;
SplitWindowItemBits mnBits;
bool mbFixed;
bool mbSubSize;
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index 5b58e2abb097..9e967ec6eb4b 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -46,8 +46,8 @@ using ::com::sun::star::awt::XTopWindow;
struct ImplCalcToTopData
{
- ImplCalcToTopData* mpNext;
- vcl::Window* mpWindow;
+ ImplCalcToTopData* mpNext;
+ VclPtr<vcl::Window> mpWindow;
vcl::Region* mpInvalidateRegion;
};
@@ -117,12 +117,12 @@ void Window::ImplRemoveWindow( bool bRemoveFrameData )
{
if ( ImplIsOverlapWindow() )
{
- if ( mpWindowImpl->mpFrameData->mpFirstOverlap == this )
+ if ( mpWindowImpl->mpFrameData->mpFirstOverlap.get() == this )
mpWindowImpl->mpFrameData->mpFirstOverlap = mpWindowImpl->mpNextOverlap;
else
{
vcl::Window* pTempWin = mpWindowImpl->mpFrameData->mpFirstOverlap;
- while ( pTempWin->mpWindowImpl->mpNextOverlap != this )
+ while ( pTempWin->mpWindowImpl->mpNextOverlap.get() != this )
pTempWin = pTempWin->mpWindowImpl->mpNextOverlap;
pTempWin->mpWindowImpl->mpNextOverlap = mpWindowImpl->mpNextOverlap;
}
@@ -194,7 +194,7 @@ void Window::reorderWithinParent(sal_uInt16 nNewPosition)
void Window::ImplToBottomChild()
{
- if ( !ImplIsOverlapWindow() && !mpWindowImpl->mbReallyVisible && (mpWindowImpl->mpParent->mpWindowImpl->mpLastChild != this) )
+ if ( !ImplIsOverlapWindow() && !mpWindowImpl->mbReallyVisible && (mpWindowImpl->mpParent->mpWindowImpl->mpLastChild.get() != this) )
{
// put the window to the end of the list
if ( mpWindowImpl->mpPrev )
@@ -265,7 +265,7 @@ void Window::ImplToTop( sal_uInt16 nFlags )
}
else
{
- if ( mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap != this )
+ if ( mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap.get() != this )
{
// remove window from the list
mpWindowImpl->mpPrev->mpWindowImpl->mpNext = mpWindowImpl->mpNext;
@@ -477,7 +477,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, sal_uInt16 nFlags )
DBG_ASSERT( pRefWindow->mpWindowImpl->mpParent == mpWindowImpl->mpParent, "Window::SetZOrder() - pRefWindow has other parent" );
if ( nFlags & WINDOW_ZORDER_BEFOR )
{
- if ( pRefWindow->mpWindowImpl->mpPrev == this )
+ if ( pRefWindow->mpWindowImpl->mpPrev.get() == this )
return;
if ( ImplIsOverlapWindow() )
@@ -515,7 +515,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, sal_uInt16 nFlags )
}
else if ( nFlags & WINDOW_ZORDER_BEHIND )
{
- if ( pRefWindow->mpWindowImpl->mpNext == this )
+ if ( pRefWindow->mpWindowImpl->mpNext.get() == this )
return;
if ( ImplIsOverlapWindow() )
@@ -879,9 +879,8 @@ void Window::SetParent( vcl::Window* pNewParent )
// remove ownerdraw decorated windows from list in the top-most frame window
if( (GetStyle() & WB_OWNERDRAWDECORATION) && mpWindowImpl->mbFrame )
{
- ::std::vector< vcl::Window* >& rList = ImplGetOwnerDrawList();
- ::std::vector< vcl::Window* >::iterator p;
- p = ::std::find( rList.begin(), rList.end(), this );
+ ::std::vector< VclPtr<vcl::Window> >& rList = ImplGetOwnerDrawList();
+ auto p = ::std::find( rList.begin(), rList.end(), VclPtr<vcl::Window>(this) );
if( p != rList.end() )
rList.erase( p );
}
@@ -895,7 +894,7 @@ void Window::SetParent( vcl::Window* pNewParent )
return;
}
- if ( mpWindowImpl->mpParent == pNewParent )
+ if ( mpWindowImpl->mpParent.get() == pNewParent )
return;
if ( mpWindowImpl->mbFrame )
@@ -912,7 +911,7 @@ void Window::SetParent( vcl::Window* pNewParent )
else
{
pNewOverlapWindow = pNewParent->ImplGetFirstOverlapWindow();
- if ( mpWindowImpl->mpOverlapWindow != pNewOverlapWindow )
+ if ( mpWindowImpl->mpOverlapWindow.get() != pNewOverlapWindow )
pOldOverlapWindow = mpWindowImpl->mpOverlapWindow;
else
pOldOverlapWindow = NULL;
@@ -1110,17 +1109,17 @@ vcl::Window* Window::GetWindow( sal_uInt16 nType ) const
return const_cast<vcl::Window*>(this);
case WINDOW_FIRSTTOPWINDOWCHILD:
- return ImplGetWinData()->maTopWindowChildren.empty() ? NULL : *ImplGetWinData()->maTopWindowChildren.begin();
+ return ImplGetWinData()->maTopWindowChildren.empty() ? NULL : (*ImplGetWinData()->maTopWindowChildren.begin()).get();
case WINDOW_LASTTOPWINDOWCHILD:
- return ImplGetWinData()->maTopWindowChildren.empty() ? NULL : *ImplGetWinData()->maTopWindowChildren.rbegin();
+ return ImplGetWinData()->maTopWindowChildren.empty() ? NULL : (*ImplGetWinData()->maTopWindowChildren.rbegin()).get();
case WINDOW_PREVTOPWINDOWSIBLING:
{
if ( !mpWindowImpl->mpRealParent )
return NULL;
- const ::std::list< vcl::Window* >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren );
- ::std::list< vcl::Window* >::const_iterator myPos =
+ const ::std::list< VclPtr<vcl::Window> >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren );
+ ::std::list< VclPtr<vcl::Window> >::const_iterator myPos =
::std::find( rTopWindows.begin(), rTopWindows.end(), this );
if ( myPos == rTopWindows.end() )
return NULL;
@@ -1133,8 +1132,8 @@ vcl::Window* Window::GetWindow( sal_uInt16 nType ) const
{
if ( !mpWindowImpl->mpRealParent )
return NULL;
- const ::std::list< vcl::Window* >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren );
- ::std::list< vcl::Window* >::const_iterator myPos =
+ const ::std::list< VclPtr<vcl::Window> >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren );
+ ::std::list< VclPtr<vcl::Window> >::const_iterator myPos =
::std::find( rTopWindows.begin(), rTopWindows.end(), this );
if ( ( myPos == rTopWindows.end() ) || ( ++myPos == rTopWindows.end() ) )
return NULL;
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 3bc802fc73e7..e13f1a2d5a67 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -120,6 +120,7 @@ void SystemWindow::dispose()
mpWindowImpl->mbSysWin = false;
disposeBuilder();
+ mpDialogParent.clear();
Window::dispose();
}
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index 9612ada17206..02220ba58860 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -226,7 +226,8 @@ TabDialog::~TabDialog()
void TabDialog::dispose()
{
- delete mpFixedLine;
+ mpFixedLine.clear();
+ mpViewWindow.clear();
Dialog::dispose();
}
diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index 2089172df14d..af4f617205ae 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -95,11 +95,8 @@ void TaskPaneList::AddWindow( vcl::Window *pWindow )
{
if( pWindow )
{
- ::std::vector< vcl::Window* >::iterator insertionPos = mTaskPanes.end();
- for ( ::std::vector< vcl::Window* >::iterator p = mTaskPanes.begin();
- p != mTaskPanes.end();
- ++p
- )
+ auto insertionPos = mTaskPanes.end();
+ for ( auto p = mTaskPanes.begin(); p != mTaskPanes.end(); ++p )
{
if ( *p == pWindow )
// avoid duplicates
@@ -131,8 +128,7 @@ void TaskPaneList::AddWindow( vcl::Window *pWindow )
void TaskPaneList::RemoveWindow( vcl::Window *pWindow )
{
- ::std::vector< vcl::Window* >::iterator p;
- p = ::std::find( mTaskPanes.begin(), mTaskPanes.end(), pWindow );
+ auto p = ::std::find( mTaskPanes.begin(), mTaskPanes.end(), VclPtr<vcl::Window>(pWindow) );
if( p != mTaskPanes.end() )
{
mTaskPanes.erase( p );
@@ -142,8 +138,7 @@ void TaskPaneList::RemoveWindow( vcl::Window *pWindow )
bool TaskPaneList::IsInList( vcl::Window *pWindow )
{
- ::std::vector< vcl::Window* >::iterator p;
- p = ::std::find( mTaskPanes.begin(), mTaskPanes.end(), pWindow );
+ auto p = ::std::find( mTaskPanes.begin(), mTaskPanes.end(), VclPtr<vcl::Window>(pWindow) );
if( p != mTaskPanes.end() )
return true;
else
@@ -172,7 +167,7 @@ bool TaskPaneList::HandleKeyEvent(const KeyEvent& rKeyEvent)
bSplitterOnly = aKeyCode.IsMod1() && aKeyCode.IsShift();
// is the focus in the list ?
- ::std::vector< vcl::Window* >::iterator p = mTaskPanes.begin();
+ auto p = mTaskPanes.begin();
while( p != mTaskPanes.end() )
{
vcl::Window *pWin = *p;
@@ -245,7 +240,7 @@ vcl::Window* TaskPaneList::FindNextSplitter( vcl::Window *pWindow, bool bForward
else
::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSortBackward() );
- ::std::vector< vcl::Window* >::iterator p = mTaskPanes.begin();
+ auto p = mTaskPanes.begin();
while( p != mTaskPanes.end() )
{
if( !pWindow || *p == pWindow )
@@ -282,7 +277,7 @@ vcl::Window* TaskPaneList::FindNextFloat( vcl::Window *pWindow, bool bForward )
else
::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSortBackward() );
- ::std::vector< vcl::Window* >::iterator p = mTaskPanes.begin();
+ auto p = mTaskPanes.begin();
while( p != mTaskPanes.end() )
{
if( !pWindow || *p == pWindow )
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index f95c020681f4..678bd438f997 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -90,7 +90,7 @@ class ImplTBDragMgr
{
private:
ImplTBList* mpBoxList;
- ToolBox* mpDragBox;
+ VclPtr<ToolBox> mpDragBox;
Point maMouseOff;
Rectangle maRect;
Rectangle maStartRect;
@@ -1609,6 +1609,7 @@ void ToolBox::dispose()
pSVData->maCtrlData.mpTBDragMgr = NULL;
}
}
+ mpFloatWin.clear();
DockingWindow::dispose();
}
@@ -2639,7 +2640,7 @@ IMPL_LINK_NOARG(ToolBox, ImplDropdownLongClickHdl)
// do not reset data if the dropdown handler opened a floating window
// see ImplFloatControl()
- if( mpFloatWin == NULL )
+ if( !mpFloatWin )
{
// no floater was opened
Deactivate();
@@ -2961,7 +2962,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint,
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
// no gradient background for items that have a popup open
- bool bHasOpenPopup = (mpFloatWin != NULL) && (mnDownItemId==pItem->mnId);
+ bool bHasOpenPopup = mpFloatWin && (mnDownItemId==pItem->mnId);
bool bHighContrastWhite = false;
// check the face color as highcontrast indicator
@@ -3873,7 +3874,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
// do not reset data if the dropdown handler opened a floating window
// see ImplFloatControl()
- if( mpFloatWin == NULL )
+ if( !mpFloatWin )
{
// no floater was opened
Deactivate();
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index d21b70c06113..c2ac77f66d70 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -33,6 +33,7 @@
#include <vcl/syschild.hxx>
#include <vcl/dockwin.hxx>
#include <vcl/wall.hxx>
+#include <vcl/fixed.hxx>
#include <vcl/gradient.hxx>
#include <vcl/button.hxx>
#include <vcl/taskpanelist.hxx>
@@ -176,9 +177,8 @@ void Window::dispose()
// remove ownerdraw decorated windows from list in the top-most frame window
if( (GetStyle() & WB_OWNERDRAWDECORATION) && mpWindowImpl->mbFrame )
{
- ::std::vector< vcl::Window* >& rList = ImplGetOwnerDrawList();
- ::std::vector< vcl::Window* >::iterator p;
- p = ::std::find( rList.begin(), rList.end(), this );
+ ::std::vector< VclPtr<vcl::Window> >& rList = ImplGetOwnerDrawList();
+ auto p = ::std::find( rList.begin(), rList.end(), VclPtr<vcl::Window>(this) );
if( p != rList.end() )
rList.erase( p );
}
@@ -241,9 +241,9 @@ void Window::dispose()
if ( pSVData->maHelpData.mpHelpWin && (pSVData->maHelpData.mpHelpWin->GetParent() == this) )
ImplDestroyHelpWindow( true );
- DBG_ASSERT( pSVData->maWinData.mpTrackWin != this,
+ DBG_ASSERT( pSVData->maWinData.mpTrackWin.get() != this,
"Window::~Window(): Window is in TrackingMode" );
- DBG_ASSERT( pSVData->maWinData.mpCaptureWin != this,
+ DBG_ASSERT( pSVData->maWinData.mpCaptureWin.get() != this,
"Window::~Window(): Window has the mouse captured" );
// due to old compatibility
@@ -390,9 +390,8 @@ void Window::dispose()
remove_from_all_size_groups();
// clear mnemonic labels
- std::vector<FixedText*> aMnemonicLabels(list_mnemonic_labels());
- for (std::vector<FixedText*>::iterator aI = aMnemonicLabels.begin();
- aI != aMnemonicLabels.end(); ++aI)
+ std::vector<VclPtr<FixedText> > aMnemonicLabels(list_mnemonic_labels());
+ for (auto aI = aMnemonicLabels.begin(); aI != aMnemonicLabels.end(); ++aI)
{
remove_mnemonic_label(*aI);
}
@@ -508,7 +507,7 @@ void Window::dispose()
while ( pDelData )
{
pDelData->mbDel = true;
- pDelData->mpWindow = NULL; // #112873# pDel is not associated with a Window anymore
+ pDelData->mpWindow.clear(); // #112873# pDel is not associated with a Window anymore
pDelData = pDelData->mpNext;
}
@@ -523,8 +522,8 @@ void Window::dispose()
{
ImplWinData* pParentWinData = mpWindowImpl->mpRealParent->ImplGetWinData();
- ::std::list< vcl::Window* >::iterator myPos = ::std::find( pParentWinData->maTopWindowChildren.begin(),
- pParentWinData->maTopWindowChildren.end(), this );
+ auto myPos = ::std::find( pParentWinData->maTopWindowChildren.begin(),
+ pParentWinData->maTopWindowChildren.end(), VclPtr<vcl::Window>(this) );
DBG_ASSERT( myPos != pParentWinData->maTopWindowChildren.end(), "Window::~Window: inconsistency in top window chain!" );
if ( myPos != pParentWinData->maTopWindowChildren.end() )
pParentWinData->maTopWindowChildren.erase( myPos );
@@ -563,10 +562,10 @@ void Window::dispose()
else
{
vcl::Window* pSysWin = pSVData->maWinData.mpFirstFrame;
- while ( pSysWin->mpWindowImpl->mpFrameData->mpNextFrame != this )
+ while ( pSysWin->mpWindowImpl->mpFrameData->mpNextFrame.get() != this )
pSysWin = pSysWin->mpWindowImpl->mpFrameData->mpNextFrame;
- assert (mpWindowImpl->mpFrameData->mpNextFrame != pSysWin);
+ assert (mpWindowImpl->mpFrameData->mpNextFrame.get() != pSysWin);
pSysWin->mpWindowImpl->mpFrameData->mpNextFrame = mpWindowImpl->mpFrameData->mpNextFrame;
}
mpWindowImpl->mpFrame->SetCallback( NULL, NULL );
@@ -1005,7 +1004,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
mpWindowImpl->mpOverlapWindow = this;
// set frame data
- assert (pSVData->maWinData.mpFirstFrame != this);
+ assert (pSVData->maWinData.mpFirstFrame.get() != this);
mpWindowImpl->mpFrameData->mpNextFrame = pSVData->maWinData.mpFirstFrame;
pSVData->maWinData.mpFirstFrame = this;
mpWindowImpl->mpFrameData->mpFirstOverlap = NULL;
@@ -2508,7 +2507,7 @@ Size Window::GetSizePixel() const
// #i43257# trigger pending resize handler to assure correct window sizes
if( mpWindowImpl->mpFrameData->maResizeIdle.IsActive() )
{
- ImplDelData aDogtag( this );
+ ImplDelData aDogtag( const_cast<Window*>(this) );
mpWindowImpl->mpFrameData->maResizeIdle.Stop();
mpWindowImpl->mpFrameData->maResizeIdle.GetIdleHdl().Call( NULL );
if( aDogtag.IsDead() )
@@ -2561,7 +2560,7 @@ void Window::Enable( bool bEnable, bool bChild )
// window was disabled when the frame focus changed
ImplSVData* pSVData = ImplGetSVData();
if( bEnable &&
- pSVData->maWinData.mpFocusWin == NULL &&
+ pSVData->maWinData.mpFocusWin == nullptr &&
mpWindowImpl->mpFrameData->mbHasFocus &&
mpWindowImpl->mpFrameData->mpFocusWin == this )
pSVData->maWinData.mpFocusWin = this;
@@ -2644,7 +2643,7 @@ void Window::EnableInput( bool bEnable, bool bChild )
// window was disabled when the frame focus changed
ImplSVData* pSVData = ImplGetSVData();
if( bEnable &&
- pSVData->maWinData.mpFocusWin == NULL &&
+ pSVData->maWinData.mpFocusWin == nullptr &&
mpWindowImpl->mpFrameData->mbHasFocus &&
mpWindowImpl->mpFrameData->mpFocusWin == this )
pSVData->maWinData.mpFocusWin = this;
@@ -2716,8 +2715,8 @@ void Window::EnableInput( bool bEnable, bool bChild, bool bSysWin,
// the same for ownerdraw floating windows
if( mpWindowImpl->mbFrame )
{
- ::std::vector< vcl::Window* >& rList = mpWindowImpl->mpFrameData->maOwnerDrawList;
- ::std::vector< vcl::Window* >::iterator p = rList.begin();
+ ::std::vector< VclPtr<vcl::Window> >& rList = mpWindowImpl->mpFrameData->maOwnerDrawList;
+ auto p = rList.begin();
while( p != rList.end() )
{
// Is Window in the path from this window
@@ -3083,7 +3082,7 @@ Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bo
if( pRelativeWindow )
{
// #106399# express coordinates relative to borderwindow
- vcl::Window *pRelWin = (!bClientOnly && pRelativeWindow->mpWindowImpl->mpBorderWindow) ? pRelativeWindow->mpWindowImpl->mpBorderWindow : pRelativeWindow;
+ vcl::Window *pRelWin = (!bClientOnly && pRelativeWindow->mpWindowImpl->mpBorderWindow) ? pRelativeWindow->mpWindowImpl->mpBorderWindow.get() : pRelativeWindow;
aPos = pRelWin->AbsoluteScreenToOutputPixel( aPos );
}
return Rectangle( aPos, aSize );
@@ -3636,7 +3635,7 @@ void Window::ImplIncModalCount()
{
pParent = pParent->GetParent();
}
- pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow : NULL;
+ pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow.get() : NULL;
}
}
void Window::ImplDecModalCount()
@@ -3650,7 +3649,7 @@ void Window::ImplDecModalCount()
{
pParent = pParent->GetParent();
}
- pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow : NULL;
+ pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow.get() : NULL;
}
}
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 1e60f08900cb..25b599b2a1d8 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -375,7 +375,7 @@ void Window::StartTracking( sal_uInt16 nFlags )
{
ImplSVData* pSVData = ImplGetSVData();
- if ( pSVData->maWinData.mpTrackWin != this )
+ if ( pSVData->maWinData.mpTrackWin.get() != this )
{
if ( pSVData->maWinData.mpTrackWin )
pSVData->maWinData.mpTrackWin->EndTracking( ENDTRACK_CANCEL );
@@ -402,7 +402,7 @@ void Window::EndTracking( sal_uInt16 nFlags )
{
ImplSVData* pSVData = ImplGetSVData();
- if ( pSVData->maWinData.mpTrackWin == this )
+ if ( pSVData->maWinData.mpTrackWin.get() == this )
{
// due to DbgChkThis in brackets, as the window could be destroyed
// in the handler
@@ -449,7 +449,7 @@ void Window::StartAutoScroll( sal_uInt16 nFlags )
{
ImplSVData* pSVData = ImplGetSVData();
- if ( pSVData->maWinData.mpAutoScrollWin != this )
+ if ( pSVData->maWinData.mpAutoScrollWin.get() != this )
{
if ( pSVData->maWinData.mpAutoScrollWin )
pSVData->maWinData.mpAutoScrollWin->EndAutoScroll();
@@ -464,7 +464,7 @@ void Window::EndAutoScroll()
{
ImplSVData* pSVData = ImplGetSVData();
- if ( pSVData->maWinData.mpAutoScrollWin == this )
+ if ( pSVData->maWinData.mpAutoScrollWin.get() == this )
{
pSVData->maWinData.mpAutoScrollWin = NULL;
pSVData->maWinData.mnAutoScrollFlags = 0;
@@ -938,7 +938,7 @@ void Window::EnableDocking( bool bEnable )
}
// retrieves the list of owner draw decorated windows for this window hiearchy
-::std::vector<vcl::Window *>& Window::ImplGetOwnerDrawList()
+::std::vector<VclPtr<vcl::Window> >& Window::ImplGetOwnerDrawList()
{
return ImplGetTopmostFrameWindow()->mpWindowImpl->mpFrameData->maOwnerDrawList;
}
@@ -1016,7 +1016,7 @@ const vcl::Window* Window::ImplGetFirstOverlapWindow() const
vcl::Window* Window::ImplGetFrameWindow() const
{
- return mpWindowImpl ? mpWindowImpl->mpFrameWindow : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpFrameWindow.get() : NULL;
}
bool Window::IsDockingWindow() const
@@ -1222,7 +1222,7 @@ bool Window::IsInPaint() const
vcl::Window* Window::GetParent() const
{
- return mpWindowImpl ? mpWindowImpl->mpRealParent : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpRealParent.get() : NULL;
}
bool Window::IsVisible() const
@@ -1457,9 +1457,8 @@ void Window::queue_resize(StateChangedType eReason)
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
if (pWindowImpl->m_xSizeGroup && pWindowImpl->m_xSizeGroup->get_mode() != VCL_SIZE_GROUP_NONE)
{
- std::set<vcl::Window*> &rWindows = pWindowImpl->m_xSizeGroup->get_widgets();
- for (std::set<vcl::Window*>::iterator aI = rWindows.begin(),
- aEnd = rWindows.end(); aI != aEnd; ++aI)
+ std::set<VclPtr<vcl::Window> > &rWindows = pWindowImpl->m_xSizeGroup->get_widgets();
+ for (auto aI = rWindows.begin(), aEnd = rWindows.end(); aI != aEnd; ++aI)
{
vcl::Window *pOther = *aI;
if (pOther == this)
@@ -1754,9 +1753,8 @@ Size Window::get_preferred_size() const
if (eMode != VCL_SIZE_GROUP_NONE)
{
const bool bIgnoreInHidden = pWindowImpl->m_xSizeGroup->get_ignore_hidden();
- const std::set<vcl::Window*> &rWindows = pWindowImpl->m_xSizeGroup->get_widgets();
- for (std::set<vcl::Window*>::const_iterator aI = rWindows.begin(),
- aEnd = rWindows.end(); aI != aEnd; ++aI)
+ const std::set<VclPtr<vcl::Window> > &rWindows = pWindowImpl->m_xSizeGroup->get_widgets();
+ for (auto aI = rWindows.begin(), aEnd = rWindows.end(); aI != aEnd; ++aI)
{
const vcl::Window *pOther = *aI;
if (pOther == this)
@@ -2040,8 +2038,8 @@ void Window::remove_from_all_size_groups()
void Window::add_mnemonic_label(FixedText *pLabel)
{
- std::vector<FixedText*>& v = mpWindowImpl->m_aMnemonicLabels;
- if (std::find(v.begin(), v.end(), pLabel) != v.end())
+ std::vector<VclPtr<FixedText> >& v = mpWindowImpl->m_aMnemonicLabels;
+ if (std::find(v.begin(), v.end(), VclPtr<FixedText>(pLabel)) != v.end())
return;
v.push_back(pLabel);
pLabel->set_mnemonic_widget(this);
@@ -2049,15 +2047,15 @@ void Window::add_mnemonic_label(FixedText *pLabel)
void Window::remove_mnemonic_label(FixedText *pLabel)
{
- std::vector<FixedText*>& v = mpWindowImpl->m_aMnemonicLabels;
- std::vector<FixedText*>::iterator aFind = std::find(v.begin(), v.end(), pLabel);
+ std::vector<VclPtr<FixedText> >& v = mpWindowImpl->m_aMnemonicLabels;
+ auto aFind = std::find(v.begin(), v.end(), VclPtr<FixedText>(pLabel));
if (aFind == v.end())
return;
v.erase(aFind);
pLabel->set_mnemonic_widget(NULL);
}
-std::vector<FixedText*> Window::list_mnemonic_labels() const
+std::vector<VclPtr<FixedText> > Window::list_mnemonic_labels() const
{
return mpWindowImpl->m_aMnemonicLabels;
}
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 890cb61a9452..4570b750c5b5 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -243,7 +243,7 @@ static bool ImplCallCommand( vcl::Window* pChild, sal_uInt16 nEvt, void* pData =
struct ContextMenuEvent
{
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
ImplDelData aDelData;
Point aChildPos;
};
@@ -377,13 +377,13 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
// no mouse messages to disabled windows
// #106845# if the window was disabed during capturing we have to pass the mouse events to release capturing
- if ( pSVData->maWinData.mpCaptureWin != pChild && (!pChild->IsEnabled() || !pChild->IsInputEnabled() || pChild->IsInModalNonRefMode() ) )
+ if ( pSVData->maWinData.mpCaptureWin.get() != pChild && (!pChild->IsEnabled() || !pChild->IsInputEnabled() || pChild->IsInModalNonRefMode() ) )
{
ImplHandleMouseFloatMode( pChild, aMousePos, nCode, nSVEvent, bMouseLeave );
if ( nSVEvent == MouseNotifyEvent::MOUSEMOVE )
{
ImplHandleMouseHelpRequest( pChild, aMousePos );
- if( pWinFrameData->mpMouseMoveWin != pChild )
+ if( pWinFrameData->mpMouseMoveWin.get() != pChild )
nMode |= MouseEventModifiers::ENTERWINDOW;
}
@@ -1726,7 +1726,7 @@ void ImplHandleResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight )
{
// #i42750# presentation wants to be informed about resize
// as early as possible
- WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pWindow->ImplGetWindowImpl()->mpClientWindow);
+ WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pWindow->ImplGetWindowImpl()->mpClientWindow.get());
if( ! pWorkWindow || pWorkWindow->IsPresentationMode() )
bStartTimer = false;
}
@@ -1972,7 +1972,7 @@ static void ImplHandleLoseFocus( vcl::Window* pWindow )
struct DelayedCloseEvent
{
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
ImplDelData aDelData;
};
@@ -1985,9 +1985,9 @@ static sal_IntPtr DelayedCloseEventLink( void* pCEvent, void* )
pEv->pWindow->ImplRemoveDel( &pEv->aDelData );
// dispatch to correct window type
if( pEv->pWindow->IsSystemWindow() )
- static_cast<SystemWindow*>(pEv->pWindow)->Close();
+ static_cast<SystemWindow*>(pEv->pWindow.get())->Close();
else if( pEv->pWindow->IsDockingWindow() )
- static_cast<DockingWindow*>(pEv->pWindow)->Close();
+ static_cast<DockingWindow*>(pEv->pWindow.get())->Close();
}
delete pEv;
diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx
index d60cc224d46a..3bac12e20d28 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -522,8 +522,6 @@ I18NStatus::I18NStatus() :
I18NStatus::~I18NStatus()
{
- if( m_pStatusWindow )
- delete m_pStatusWindow, m_pStatusWindow = NULL;
if( pInstance == this )
pInstance = NULL;
}
@@ -606,7 +604,7 @@ SalFrame* I18NStatus::getStatusFrame() const
void I18NStatus::toggleStatusWindow()
{
- if (m_pStatusWindow != 0)
+ if (m_pStatusWindow != nullptr)
m_pStatusWindow->toggle(getStatusWindowMode());
}
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index 92abca9a634c..a38c01a7b029 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -913,13 +913,14 @@ namespace
{
class RTSPWDialog : public ModalDialog
{
- FixedText* m_pText;
- Edit* m_pUserEdit;
- Edit* m_pPassEdit;
+ VclPtr<FixedText> m_pText;
+ VclPtr<Edit> m_pUserEdit;
+ VclPtr<Edit> m_pPassEdit;
public:
RTSPWDialog(const OString& rServer, const OString& rUserName, vcl::Window* pParent);
-
+ virtual ~RTSPWDialog();
+ virtual void dispose() SAL_OVERRIDE;
OString getUserName() const;
OString getPassword() const;
};
@@ -938,6 +939,19 @@ namespace
m_pUserEdit->SetText( OStringToOUString(rUserName, osl_getThreadTextEncoding()));
}
+ RTSPWDialog::~RTSPWDialog()
+ {
+ dispose();
+ }
+
+ void RTSPWDialog::dispose()
+ {
+ m_pText.clear();
+ m_pUserEdit.clear();
+ m_pPassEdit.clear();
+ ModalDialog::dispose();
+ }
+
OString RTSPWDialog::getUserName() const
{
return OUStringToOString( m_pUserEdit->GetText(), osl_getThreadTextEncoding() );
diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx
index 3710a16ce152..481818bfa034 100644
--- a/vcl/workben/icontest.cxx
+++ b/vcl/workben/icontest.cxx
@@ -71,10 +71,11 @@ protected:
public:
Graphic maGraphic;
Bitmap *mpBitmap;
- FixedBitmap *mpFixedBitmap;
+ VclPtr<FixedBitmap> mpFixedBitmap;
MyWorkWindow( vcl::Window* pParent, WinBits nWinStyle );
-
+ virtual ~MyWorkWindow() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE { mpFixedBitmap.clear(); WorkWindow::dispose(); }
void LoadGraphic( const OUString& sImageFile );
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
diff --git a/vcl/workben/mtfdemo.cxx b/vcl/workben/mtfdemo.cxx
index 4f65b0ff12ce..54c64ffadf4a 100644
--- a/vcl/workben/mtfdemo.cxx
+++ b/vcl/workben/mtfdemo.cxx
@@ -67,7 +67,7 @@ void DemoMtfWin::Paint( const Rectangle& rRect )
class DemoMtfApp : public Application
{
- DemoMtfWin *mpWin;
+ VclPtr<DemoMtfWin> mpWin;
OUString maFileName;
void showHelp()
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 14a57805beae..33c4eff1fec6 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1133,12 +1133,11 @@ public:
}
}
}
- std::vector<vcl::Window *> maInvalidates;
+ std::vector<VclPtr<vcl::Window> > maInvalidates;
void addInvalidate(vcl::Window *pWindow) { maInvalidates.push_back(pWindow); };
void removeInvalidate(vcl::Window *pWindow)
{
- std::vector<vcl::Window *>::iterator aIt;
- for (aIt = maInvalidates.begin(); aIt != maInvalidates.end(); ++aIt)
+ for (auto aIt = maInvalidates.begin(); aIt != maInvalidates.end(); ++aIt)
{
if (*aIt == pWindow)
{
@@ -1450,9 +1449,9 @@ public:
class DemoWidgets : public WorkWindow
{
- VclBox *mpBox;
- ToolBox *mpToolbox;
- PushButton *mpButton;
+ VclPtr<VclBox> mpBox;
+ VclPtr<ToolBox> mpToolbox;
+ VclPtr<PushButton> mpButton;
public:
DemoWidgets() :
@@ -1482,6 +1481,14 @@ public:
Show();
}
+ virtual ~DemoWidgets() { disposeOnce(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ mpBox.disposeAndClear();
+ mpToolbox.disposeAndClear();
+ mpPushButton.disposeAndClear();
+ WorkWindow::dispose();
+ }
virtual void Paint(const Rectangle&) SAL_OVERRIDE
{
Rectangle aWholeSize(Point(0, 0),GetOutputSizePixel());
diff --git a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx
index 811889c9e013..f54c0131eede 100644
--- a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx
@@ -48,9 +48,9 @@ private:
css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > maCerts;
SignatureInformations maCertsToIgnore;
- SvSimpleTable* m_pCertLB;
- PushButton* m_pViewBtn;
- OKButton* m_pOKBtn;
+ VclPtr<SvSimpleTable> m_pCertLB;
+ VclPtr<PushButton> m_pViewBtn;
+ VclPtr<OKButton> m_pOKBtn;
bool mbInitialized;
diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
index 6c64af6552f6..58571b722279 100644
--- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
@@ -46,7 +46,7 @@ private:
friend class CertificateViewerDetailsTP;
friend class CertificateViewerCertPathTP;
- TabControl* mpTabCtrl;
+ VclPtr<TabControl> mpTabCtrl;
sal_uInt16 mnGeneralId;
sal_uInt16 mnDetailsId;
sal_uInt16 mnPathId;
@@ -65,10 +65,12 @@ public:
class CertificateViewerTP : public TabPage
{
protected:
- CertificateViewer* mpDlg;
+ VclPtr<CertificateViewer> mpDlg;
public:
CertificateViewerTP( vcl::Window* _pParent, const OString& rID,
const OUString& rUIXMLDescription, CertificateViewer* _pDlg );
+ virtual ~CertificateViewerTP();
+ virtual void dispose() SAL_OVERRIDE;
void SetTabDlg( CertificateViewer* _pTabDlg )
{
mpDlg = _pTabDlg;
@@ -78,16 +80,18 @@ public:
class CertificateViewerGeneralTP : public CertificateViewerTP
{
private:
- FixedImage* m_pCertImg;
- FixedText* m_pHintNotTrustedFI;
- FixedText* m_pIssuedToFI;
- FixedText* m_pIssuedByFI;
- FixedText* m_pValidFromDateFI;
- FixedText* m_pValidToDateFI;
- FixedImage* m_pKeyImg;
- FixedText* m_pHintCorrespPrivKeyFI;
+ VclPtr<FixedImage> m_pCertImg;
+ VclPtr<FixedText> m_pHintNotTrustedFI;
+ VclPtr<FixedText> m_pIssuedToFI;
+ VclPtr<FixedText> m_pIssuedByFI;
+ VclPtr<FixedText> m_pValidFromDateFI;
+ VclPtr<FixedText> m_pValidToDateFI;
+ VclPtr<FixedImage> m_pKeyImg;
+ VclPtr<FixedText> m_pHintCorrespPrivKeyFI;
public:
CertificateViewerGeneralTP( vcl::Window* pParent, CertificateViewer* _pDlg );
+ virtual ~CertificateViewerGeneralTP();
+ virtual void dispose() SAL_OVERRIDE;
virtual void ActivatePage() SAL_OVERRIDE;
};
@@ -96,9 +100,9 @@ public:
class CertificateViewerDetailsTP : public CertificateViewerTP
{
private:
- SvSimpleTableContainer* m_pElementsLBContainer;
- SvSimpleTable* m_pElementsLB;
- MultiLineEdit* m_pValueDetails;
+ VclPtr<SvSimpleTableContainer> m_pElementsLBContainer;
+ VclPtr<SvSimpleTable> m_pElementsLB;
+ VclPtr<MultiLineEdit> m_pValueDetails;
vcl::Font m_aStdFont;
vcl::Font m_aFixedWidthFont;
@@ -118,11 +122,11 @@ public:
class CertificateViewerCertPathTP : public CertificateViewerTP
{
private:
- SvTreeListBox* mpCertPathLB;
- PushButton* mpViewCertPB;
- VclMultiLineEdit* mpCertStatusML;
+ VclPtr<SvTreeListBox> mpCertPathLB;
+ VclPtr<PushButton> mpViewCertPB;
+ VclPtr<VclMultiLineEdit> mpCertStatusML;
- CertificateViewer* mpParent;
+ VclPtr<CertificateViewer> mpParent;
bool mbFirstActivateDone;
Image maCertImage;
Image maCertNotValidatedImage;
@@ -139,6 +143,7 @@ private:
public:
CertificateViewerCertPathTP( vcl::Window* pParent, CertificateViewer* _pDlg );
virtual ~CertificateViewerCertPathTP();
+ 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 9ab5126154d5..a3cdb392bb45 100644
--- a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
@@ -63,24 +63,24 @@ private:
DocumentSignatureMode meSignatureMode;
css::uno::Sequence < css::uno::Sequence < css::beans::PropertyValue > > m_manifest;
- FixedText* m_pHintDocFT;
- FixedText* m_pHintBasicFT;
- FixedText* m_pHintPackageFT;
- SvSimpleTable* m_pSignaturesLB;
- FixedImage* m_pSigsValidImg;
- FixedText* m_pSigsValidFI;
- FixedImage* m_pSigsInvalidImg;
- FixedText* m_pSigsInvalidFI;
- FixedImage* m_pSigsNotvalidatedImg;
- FixedText* m_pSigsNotvalidatedFI;
- FixedImage* m_pSigsOldSignatureImg;
- FixedText* m_pSigsOldSignatureFI;
-
- PushButton* m_pViewBtn;
- PushButton* m_pAddBtn;
- PushButton* m_pRemoveBtn;
-
- CloseButton* m_pCloseBtn;
+ VclPtr<FixedText> m_pHintDocFT;
+ VclPtr<FixedText> m_pHintBasicFT;
+ VclPtr<FixedText> m_pHintPackageFT;
+ VclPtr<SvSimpleTable> m_pSignaturesLB;
+ VclPtr<FixedImage> m_pSigsValidImg;
+ VclPtr<FixedText> m_pSigsValidFI;
+ VclPtr<FixedImage> m_pSigsInvalidImg;
+ VclPtr<FixedText> m_pSigsInvalidFI;
+ VclPtr<FixedImage> m_pSigsNotvalidatedImg;
+ VclPtr<FixedText> m_pSigsNotvalidatedFI;
+ VclPtr<FixedImage> m_pSigsOldSignatureImg;
+ VclPtr<FixedText> m_pSigsOldSignatureFI;
+
+ VclPtr<PushButton> m_pViewBtn;
+ VclPtr<PushButton> m_pAddBtn;
+ VclPtr<PushButton> m_pRemoveBtn;
+
+ VclPtr<CloseButton> m_pCloseBtn;
OUString m_sODFVersion;
//Signals if the document contains already a document signature. This is only
diff --git a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
index a56ce78397c3..ce2dd212bb69 100644
--- a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
+++ b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
@@ -47,9 +47,9 @@ private:
friend class MacroSecurityLevelTP;
friend class MacroSecurityTrustedSourcesTP;
- TabControl* m_pTabCtrl;
- OKButton* m_pOkBtn;
- PushButton* m_pResetBtn;
+ VclPtr<TabControl> m_pTabCtrl;
+ VclPtr<OKButton> m_pOkBtn;
+ VclPtr<PushButton> m_pResetBtn;
css::uno::Reference< css::uno::XComponentContext > mxCtx;
css::uno::Reference< css::xml::crypto::XSecurityEnvironment > mxSecurityEnvironment;
@@ -58,8 +58,8 @@ private:
sal_uInt16 m_nSecLevelId;
sal_uInt16 m_nSecTrustId;
- MacroSecurityTP* mpLevelTP;
- MacroSecurityTP* mpTrustSrcTP;
+ VclPtr<MacroSecurityTP> mpLevelTP;
+ VclPtr<MacroSecurityTP> mpTrustSrcTP;
DECL_LINK( OkBtnHdl, void* );
public:
@@ -78,10 +78,12 @@ public:
class MacroSecurityTP : public TabPage
{
protected:
- MacroSecurity* mpDlg;
+ VclPtr<MacroSecurity> mpDlg;
public:
MacroSecurityTP(vcl::Window* _pParent, const OString& rID,
const OUString& rUIXMLDescription, MacroSecurity* _pDlg);
+ virtual ~MacroSecurityTP();
+ virtual void dispose() SAL_OVERRIDE;
void SetTabDlg(MacroSecurity* pTabDlg)
{
@@ -94,10 +96,10 @@ public:
class MacroSecurityLevelTP : public MacroSecurityTP
{
private:
- RadioButton* m_pVeryHighRB;
- RadioButton* m_pHighRB;
- RadioButton* m_pMediumRB;
- RadioButton* m_pLowRB;
+ VclPtr<RadioButton> m_pVeryHighRB;
+ VclPtr<RadioButton> m_pHighRB;
+ VclPtr<RadioButton> m_pMediumRB;
+ VclPtr<RadioButton> m_pLowRB;
sal_uInt16 mnCurLevel;
@@ -106,6 +108,8 @@ protected:
public:
MacroSecurityLevelTP( vcl::Window* pParent, MacroSecurity* _pDlg );
+ virtual ~MacroSecurityLevelTP();
+ virtual void dispose() SAL_OVERRIDE;
virtual void ClosePage( void ) SAL_OVERRIDE;
};
@@ -114,14 +118,14 @@ public:
class MacroSecurityTrustedSourcesTP : public MacroSecurityTP
{
private:
- FixedImage* m_pTrustCertROFI;
- SvSimpleTable* m_pTrustCertLB;
- PushButton* m_pViewCertPB;
- PushButton* m_pRemoveCertPB;
- FixedImage* m_pTrustFileROFI;
- ListBox* m_pTrustFileLocLB;
- PushButton* m_pAddLocPB;
- PushButton* m_pRemoveLocPB;
+ VclPtr<FixedImage> m_pTrustCertROFI;
+ VclPtr<SvSimpleTable> m_pTrustCertLB;
+ VclPtr<PushButton> m_pViewCertPB;
+ VclPtr<PushButton> m_pRemoveCertPB;
+ VclPtr<FixedImage> m_pTrustFileROFI;
+ VclPtr<ListBox> m_pTrustFileLocLB;
+ VclPtr<PushButton> m_pAddLocPB;
+ VclPtr<PushButton> m_pRemoveLocPB;
css::uno::Sequence< SvtSecurityOptions::Certificate > maTrustedAuthors;
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 576013a9e06b..f6c8cc9f9bbc 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -86,7 +86,9 @@ CertificateChooser::~CertificateChooser()
void CertificateChooser::dispose()
{
- delete m_pCertLB;
+ m_pCertLB.clear();
+ m_pViewBtn.clear();
+ m_pOKBtn.clear();
ModalDialog::dispose();
}
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 6de4d968b58b..544e859febe2 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -69,6 +69,7 @@ void CertificateViewer::dispose()
delete mpTabCtrl->GetTabPage(mnGeneralId);
delete mpTabCtrl->GetTabPage(mnDetailsId);
delete mpTabCtrl->GetTabPage(mnPathId);
+ mpTabCtrl.clear();
TabDialog::dispose();
}
@@ -79,6 +80,18 @@ CertificateViewerTP::CertificateViewerTP( vcl::Window* _pParent, const OString&
{
}
+CertificateViewerTP::~CertificateViewerTP()
+{
+ dispose();
+}
+
+void CertificateViewerTP::dispose()
+{
+ mpDlg.clear();
+ TabPage::dispose();
+}
+
+
CertificateViewerGeneralTP::CertificateViewerGeneralTP( vcl::Window* _pParent, CertificateViewer* _pDlg )
:CertificateViewerTP ( _pParent, "CertGeneral", "xmlsec/ui/certgeneral.ui", _pDlg )
{
@@ -136,6 +149,24 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( vcl::Window* _pParent, C
}
}
+CertificateViewerGeneralTP::~CertificateViewerGeneralTP()
+{
+ dispose();
+}
+
+void CertificateViewerGeneralTP::dispose()
+{
+ m_pCertImg.clear();
+ m_pHintNotTrustedFI.clear();
+ m_pIssuedToFI.clear();
+ m_pIssuedByFI.clear();
+ m_pValidFromDateFI.clear();
+ m_pValidToDateFI.clear();
+ m_pKeyImg.clear();
+ m_pHintCorrespPrivKeyFI.clear();
+ CertificateViewerTP::dispose();
+}
+
void CertificateViewerGeneralTP::ActivatePage()
{
@@ -268,7 +299,9 @@ CertificateViewerDetailsTP::~CertificateViewerDetailsTP()
void CertificateViewerDetailsTP::dispose()
{
Clear();
- delete m_pElementsLB;
+ m_pElementsLBContainer.clear();
+ m_pElementsLB.clear();
+ m_pValueDetails.clear();
CertificateViewerTP::dispose();
}
@@ -339,7 +372,17 @@ CertificateViewerCertPathTP::CertificateViewerCertPathTP( vcl::Window* _pParent,
CertificateViewerCertPathTP::~CertificateViewerCertPathTP()
{
+ dispose();
+}
+
+void CertificateViewerCertPathTP::dispose()
+{
Clear();
+ mpCertPathLB.clear();
+ mpViewCertPB.clear();
+ mpCertStatusML.clear();
+ mpParent.clear();
+ CertificateViewerTP::dispose();
}
void CertificateViewerCertPathTP::ActivatePage()
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index ab127deedc94..03e9cfc26842 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -240,7 +240,22 @@ DigitalSignaturesDialog::~DigitalSignaturesDialog()
void DigitalSignaturesDialog::dispose()
{
- delete m_pSignaturesLB;
+ m_pHintDocFT.clear();
+ m_pHintBasicFT.clear();
+ m_pHintPackageFT.clear();
+ m_pSignaturesLB.clear();
+ m_pSigsValidImg.clear();
+ m_pSigsValidFI.clear();
+ m_pSigsInvalidImg.clear();
+ m_pSigsInvalidFI.clear();
+ m_pSigsNotvalidatedImg.clear();
+ m_pSigsNotvalidatedFI.clear();
+ m_pSigsOldSignatureImg.clear();
+ m_pSigsOldSignatureFI.clear();
+ m_pViewBtn.clear();
+ m_pAddBtn.clear();
+ m_pRemoveBtn.clear();
+ m_pCloseBtn.clear();
ModalDialog::dispose();
}
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index e5bcabcddd40..9a7a0685215f 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -91,6 +91,11 @@ void MacroSecurity::dispose()
{
delete m_pTabCtrl->GetTabPage(m_nSecTrustId);
delete m_pTabCtrl->GetTabPage(m_nSecLevelId);
+ m_pTabCtrl.clear();
+ m_pOkBtn.clear();
+ m_pResetBtn.clear();
+ mpLevelTP.clear();
+ mpTrustSrcTP.clear();
TabDialog::dispose();
}
@@ -101,6 +106,17 @@ MacroSecurityTP::MacroSecurityTP(vcl::Window* _pParent, const OString& rID,
{
}
+MacroSecurityTP::~MacroSecurityTP()
+{
+ dispose();
+}
+
+void MacroSecurityTP::dispose()
+{
+ mpDlg.clear();
+ TabPage::dispose();
+}
+
MacroSecurityLevelTP::MacroSecurityLevelTP(vcl::Window* _pParent, MacroSecurity* _pDlg)
: MacroSecurityTP(_pParent, "SecurityLevelPage", "xmlsec/ui/securitylevelpage.ui", _pDlg)
{
@@ -154,6 +170,20 @@ MacroSecurityLevelTP::MacroSecurityLevelTP(vcl::Window* _pParent, MacroSecurity*
}
}
+MacroSecurityLevelTP::~MacroSecurityLevelTP()
+{
+ dispose();
+}
+
+void MacroSecurityLevelTP::dispose()
+{
+ m_pVeryHighRB.clear();
+ m_pHighRB.clear();
+ m_pMediumRB.clear();
+ m_pLowRB.clear();
+ MacroSecurityTP::dispose();
+}
+
IMPL_LINK_NOARG(MacroSecurityLevelTP, RadioButtonHdl)
{
sal_uInt16 nNewLevel = 0;
@@ -405,7 +435,14 @@ MacroSecurityTrustedSourcesTP::~MacroSecurityTrustedSourcesTP()
void MacroSecurityTrustedSourcesTP::dispose()
{
- delete m_pTrustCertLB;
+ m_pTrustCertLB.clear();
+ m_pTrustCertROFI.clear();
+ m_pViewCertPB.clear();
+ m_pRemoveCertPB.clear();
+ m_pTrustFileROFI.clear();
+ m_pTrustFileLocLB.clear();
+ m_pAddLocPB.clear();
+ m_pRemoveLocPB.clear();
MacroSecurityTP::dispose();
}