From ebd195b2ae254bfc9b52c9c673a57cd3bdf0cad8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 15 Jan 2015 15:47:39 +0200 Subject: vcl: VclPtr conversion in cui Change-Id: I8597247296645fe72d5306e35b2ea3c0866d147a --- cui/source/customize/acccfg.cxx | 6 ++ cui/source/customize/cfg.cxx | 33 ++++++++--- cui/source/customize/cfgutil.cxx | 12 ++++ cui/source/customize/eventdlg.cxx | 6 ++ cui/source/customize/eventdlg.hxx | 1 + cui/source/customize/macropg.cxx | 74 ++++++++++++++---------- cui/source/customize/macropg_impl.hxx | 1 - cui/source/customize/selector.cxx | 16 ++++-- cui/source/dialogs/SpellDialog.cxx | 9 ++- cui/source/dialogs/colorpicker.cxx | 14 +++++ cui/source/dialogs/cuicharmap.cxx | 12 ---- cui/source/dialogs/cuifmsearch.cxx | 6 ++ cui/source/dialogs/cuigaldlg.cxx | 6 ++ cui/source/dialogs/cuihyperdlg.cxx | 6 ++ cui/source/dialogs/dlgname.cxx | 6 ++ cui/source/dialogs/hangulhanjadlg.cxx | 97 +++++++++++++++++++------------- cui/source/dialogs/hldocntp.cxx | 6 ++ cui/source/dialogs/hldoctp.cxx | 4 -- cui/source/dialogs/hlinettp.cxx | 4 -- cui/source/dialogs/hlmailtp.cxx | 4 -- cui/source/dialogs/hlmarkwn.cxx | 6 ++ cui/source/dialogs/hltpbase.cxx | 8 ++- cui/source/dialogs/hyphen.cxx | 5 -- cui/source/dialogs/iconcdlg.cxx | 10 ++-- cui/source/dialogs/insdlg.cxx | 6 ++ cui/source/dialogs/linkdlg.cxx | 4 -- cui/source/dialogs/multipat.cxx | 13 +++++ cui/source/dialogs/passwdomdlg.cxx | 6 ++ cui/source/dialogs/pastedlg.cxx | 4 -- cui/source/dialogs/postdlg.cxx | 6 ++ cui/source/dialogs/scriptdlg.cxx | 12 ++++ cui/source/dialogs/splitcelldlg.cxx | 4 -- cui/source/dialogs/srchxtra.cxx | 6 ++ cui/source/dialogs/thesdlg.cxx | 18 ++---- cui/source/dialogs/zoom.cxx | 11 +++- cui/source/inc/SpellDialog.hxx | 2 +- cui/source/inc/acccfg.hxx | 1 + cui/source/inc/align.hxx | 1 + cui/source/inc/autocdlg.hxx | 10 ++-- cui/source/inc/backgrnd.hxx | 1 + cui/source/inc/border.hxx | 1 - cui/source/inc/cfg.hxx | 7 ++- cui/source/inc/cfgutil.hxx | 2 + cui/source/inc/chardlg.hxx | 6 +- cui/source/inc/connect.hxx | 2 - cui/source/inc/cuicharmap.hxx | 2 - cui/source/inc/cuifmsearch.hxx | 1 + cui/source/inc/cuigaldlg.hxx | 4 +- cui/source/inc/cuihyperdlg.hxx | 1 + cui/source/inc/cuioptgenrl.hxx | 1 - cui/source/inc/cuitabarea.hxx | 3 +- cui/source/inc/cuitabline.hxx | 3 +- cui/source/inc/dbregister.hxx | 2 +- cui/source/inc/dlgname.hxx | 1 + cui/source/inc/grfpage.hxx | 1 + cui/source/inc/hangulhanjadlg.hxx | 10 ++-- cui/source/inc/headertablistbox.hxx | 10 ++-- cui/source/inc/hldocntp.hxx | 1 + cui/source/inc/hldoctp.hxx | 1 - cui/source/inc/hlinettp.hxx | 1 - cui/source/inc/hlmailtp.hxx | 1 - cui/source/inc/hlmarkwn.hxx | 1 + cui/source/inc/hltpbase.hxx | 1 + cui/source/inc/hyphen.hxx | 1 - cui/source/inc/iconcdlg.hxx | 2 +- cui/source/inc/insdlg.hxx | 1 + cui/source/inc/linkdlg.hxx | 1 - cui/source/inc/macroass.hxx | 1 + cui/source/inc/macropg.hxx | 1 + cui/source/inc/measure.hxx | 1 - cui/source/inc/multipat.hxx | 2 + cui/source/inc/numfmt.hxx | 1 + cui/source/inc/numpages.hxx | 32 ++++++----- cui/source/inc/optasian.hxx | 1 + cui/source/inc/optdict.hxx | 1 - cui/source/inc/optlingu.hxx | 2 + cui/source/inc/optpath.hxx | 1 + cui/source/inc/page.hxx | 1 + cui/source/inc/paragrph.hxx | 8 --- cui/source/inc/passwdomdlg.hxx | 1 + cui/source/inc/pastedlg.hxx | 1 - cui/source/inc/postdlg.hxx | 1 + cui/source/inc/radiobtnbox.hxx | 1 - cui/source/inc/scriptdlg.hxx | 2 + cui/source/inc/selector.hxx | 4 +- cui/source/inc/splitcelldlg.hxx | 1 - cui/source/inc/srchxtra.hxx | 1 + cui/source/inc/swpossizetabpage.hxx | 1 - cui/source/inc/tabstpge.hxx | 2 - cui/source/inc/textanim.hxx | 2 - cui/source/inc/textattr.hxx | 1 - cui/source/inc/thesdlg.hxx | 5 +- cui/source/inc/transfrm.hxx | 1 - cui/source/inc/treeopt.hxx | 2 + cui/source/inc/zoom.hxx | 1 + cui/source/options/certpath.cxx | 6 ++ cui/source/options/certpath.hxx | 1 + cui/source/options/dbregister.cxx | 10 ++-- cui/source/options/fontsubs.cxx | 6 ++ cui/source/options/fontsubs.hxx | 1 + cui/source/options/optaccessibility.cxx | 6 ++ cui/source/options/optaccessibility.hxx | 1 + cui/source/options/optasian.cxx | 6 ++ cui/source/options/optbasic.cxx | 4 -- cui/source/options/optbasic.hxx | 1 - cui/source/options/optchart.cxx | 6 ++ cui/source/options/optchart.hxx | 1 + cui/source/options/optcolor.cxx | 17 ++++-- cui/source/options/optcolor.hxx | 1 + cui/source/options/optctl.cxx | 4 -- cui/source/options/optctl.hxx | 3 - cui/source/options/optdict.cxx | 5 -- cui/source/options/optfltr.cxx | 10 ++-- cui/source/options/optfltr.hxx | 2 +- cui/source/options/optgdlg.cxx | 16 ++++-- cui/source/options/optgdlg.hxx | 3 +- cui/source/options/optgenrl.cxx | 5 -- cui/source/options/opthtml.cxx | 4 -- cui/source/options/opthtml.hxx | 1 - cui/source/options/optinet2.cxx | 16 ++++-- cui/source/options/optinet2.hxx | 3 +- cui/source/options/optjava.cxx | 18 ++++-- cui/source/options/optjava.hxx | 3 +- cui/source/options/optjsearch.cxx | 5 -- cui/source/options/optjsearch.hxx | 2 - cui/source/options/optlingu.cxx | 12 ++++ cui/source/options/optmemory.cxx | 6 -- cui/source/options/optmemory.hxx | 1 - cui/source/options/optopencl.cxx | 11 +++- cui/source/options/optopencl.hxx | 2 +- cui/source/options/optpath.cxx | 6 ++ cui/source/options/optsave.cxx | 6 ++ cui/source/options/optsave.hxx | 1 + cui/source/options/optupdt.cxx | 5 -- cui/source/options/optupdt.hxx | 1 - cui/source/options/personalization.cxx | 4 -- cui/source/options/personalization.hxx | 1 - cui/source/options/radiobtnbox.cxx | 4 -- cui/source/options/securityoptions.cxx | 5 -- cui/source/options/securityoptions.hxx | 1 - cui/source/options/treeopt.cxx | 12 ++++ cui/source/options/webconninfo.cxx | 6 ++ cui/source/options/webconninfo.hxx | 1 + cui/source/tabpages/align.cxx | 6 ++ cui/source/tabpages/autocdlg.cxx | 33 ++++++++--- cui/source/tabpages/backgrnd.cxx | 13 +++++ cui/source/tabpages/border.cxx | 6 -- cui/source/tabpages/chardlg.cxx | 30 ++-------- cui/source/tabpages/connect.cxx | 20 ------- cui/source/tabpages/grfpage.cxx | 6 ++ cui/source/tabpages/macroass.cxx | 6 ++ cui/source/tabpages/measure.cxx | 10 ---- cui/source/tabpages/numfmt.cxx | 7 +++ cui/source/tabpages/numpages.cxx | 36 ++++++++++++ cui/source/tabpages/page.cxx | 6 ++ cui/source/tabpages/paragrph.cxx | 16 ------ cui/source/tabpages/swpossizetabpage.cxx | 4 -- cui/source/tabpages/tabarea.cxx | 4 -- cui/source/tabpages/tabline.cxx | 6 -- cui/source/tabpages/tabstpge.cxx | 7 --- cui/source/tabpages/textanim.cxx | 10 ---- cui/source/tabpages/textattr.cxx | 9 --- cui/source/tabpages/tpbitmap.cxx | 6 ++ cui/source/tabpages/tpcolor.cxx | 6 ++ cui/source/tabpages/tpline.cxx | 7 +++ cui/source/tabpages/tplneend.cxx | 6 -- cui/source/tabpages/transfrm.cxx | 6 -- 167 files changed, 662 insertions(+), 460 deletions(-) diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index f26e00ccd606..d6a2c53bf487 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -799,6 +799,11 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( vcl::Window* pParent, const } SfxAcceleratorConfigPage::~SfxAcceleratorConfigPage() +{ + dispose(); +} + +void SfxAcceleratorConfigPage::dispose() { // free memory - remove all dynamic user data SvTreeListEntry* pEntry = m_pEntriesBox->First(); @@ -823,6 +828,7 @@ SfxAcceleratorConfigPage::~SfxAcceleratorConfigPage() m_pKeyBox->Clear(); delete m_pFileDlg; + SfxTabPage::dispose(); } void SfxAcceleratorConfigPage::InitAccCfg() diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 5d6b74ae0b81..05c7796e28d2 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1395,11 +1395,6 @@ SvxMenuEntriesListBox::SvxMenuEntriesListBox(vcl::Window* pParent, SvxConfigPage SV_DRAGDROP_APP_DROP); } -SvxMenuEntriesListBox::~SvxMenuEntriesListBox() -{ - // do nothing -} - // drag and drop support DragDropMode SvxMenuEntriesListBox::NotifyStartDrag( TransferDataContainer& aTransferDataContainer, SvTreeListEntry* pEntry ) @@ -2225,6 +2220,11 @@ void SvxMenuConfigPage::Init() } SvxMenuConfigPage::~SvxMenuConfigPage() +{ + dispose(); +} + +void SvxMenuConfigPage::dispose() { for ( sal_uInt16 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i ) { @@ -2236,6 +2236,7 @@ SvxMenuConfigPage::~SvxMenuConfigPage() delete m_pSelectorDlg; delete m_pContentsListBox; + SvxConfigPage::dispose(); } IMPL_LINK( SvxMenuConfigPage, SelectMenuEntry, Control *, pBox ) @@ -2675,10 +2676,6 @@ IMPL_LINK(SvxMainMenuOrganizerDialog, ModifyHdl, Edit*, pEdit) return 0; } -SvxMainMenuOrganizerDialog::~SvxMainMenuOrganizerDialog() -{ -} - IMPL_LINK( SvxMainMenuOrganizerDialog, SelectHdl, Control*, pCtrl ) { (void)pCtrl; @@ -2915,6 +2912,11 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSe } SvxToolbarConfigPage::~SvxToolbarConfigPage() +{ + dispose(); +} + +void SvxToolbarConfigPage::dispose() { for ( sal_uInt16 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i ) { @@ -2931,6 +2933,7 @@ SvxToolbarConfigPage::~SvxToolbarConfigPage() delete m_pContentsListBox; + SvxConfigPage::dispose(); } void SvxToolbarConfigPage::DeleteSelectedTopLevel() @@ -4521,8 +4524,14 @@ SvxToolbarEntriesListBox::SvxToolbarEntriesListBox(vcl::Window* pParent, SvxTool } SvxToolbarEntriesListBox::~SvxToolbarEntriesListBox() +{ + dispose(); +} + +void SvxToolbarEntriesListBox::dispose() { delete m_pButtonData; + SvxMenuEntriesListBox::dispose(); } void SvxToolbarEntriesListBox::BuildCheckBoxButtonImages( SvLBoxButtonData* pData ) @@ -4905,6 +4914,11 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow, } SvxIconSelectorDialog::~SvxIconSelectorDialog() +{ + dispose(); +} + +void SvxIconSelectorDialog::dispose() { sal_uInt16 nCount = pTbSymbol->GetItemCount(); @@ -4920,6 +4934,7 @@ SvxIconSelectorDialog::~SvxIconSelectorDialog() xi->release(); } } + ModalDialog::dispose(); } uno::Reference< graphic::XGraphic> SvxIconSelectorDialog::GetSelectedIcon() diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 53c954415098..373f3b924421 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -275,8 +275,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSfxConfigFunctionListB } SfxConfigFunctionListBox::~SfxConfigFunctionListBox() +{ + dispose(); +} + +void SfxConfigFunctionListBox::dispose() { ClearAll(); + SvTreeListBox::dispose(); } void SfxConfigFunctionListBox::MouseMove( const MouseEvent& ) @@ -422,8 +428,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSfxConfigGroupListBox( } SfxConfigGroupListBox::~SfxConfigGroupListBox() +{ + dispose(); +} + +void SfxConfigGroupListBox::dispose() { ClearAll(); + SvTreeListBox::dispose(); } void SfxConfigGroupListBox::ClearAll() diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index e466d526a747..79453fc1848d 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -102,6 +102,11 @@ void SvxEventConfigPage::LateInit( const uno::Reference< frame::XFrame >& _rxFra } SvxEventConfigPage::~SvxEventConfigPage() +{ + dispose(); +} + +void SvxEventConfigPage::dispose() { // need to delete the user data SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); @@ -113,6 +118,7 @@ SvxEventConfigPage::~SvxEventConfigPage() pE->SetUserData((void*)0); pE = SvTreeListBox::NextSibling( pE ); } + _SvxMacroTabPage::dispose(); } void SvxEventConfigPage::ImplInitDocument() diff --git a/cui/source/customize/eventdlg.hxx b/cui/source/customize/eventdlg.hxx index 06d5433fa67b..56ea3c41ddab 100644 --- a/cui/source/customize/eventdlg.hxx +++ b/cui/source/customize/eventdlg.hxx @@ -48,6 +48,7 @@ public: struct EarlyInit { }; SvxEventConfigPage( vcl::Window *pParent, const SfxItemSet& rSet, EarlyInit ); virtual ~SvxEventConfigPage(); + virtual void dispose() SAL_OVERRIDE; void LateInit( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame ); diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 5f83f286784f..13ae5f461a00 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -83,32 +83,32 @@ static long nTabs[] = IMPL_LINK( MacroEventListBox, HeaderEndDrag_Impl, HeaderBar*, pBar ) { - DBG_ASSERT( pBar == &maHeaderBar, "*MacroEventListBox::HeaderEndDrag_Impl: something is wrong here..." ); + DBG_ASSERT( pBar == maHeaderBar.get(), "*MacroEventListBox::HeaderEndDrag_Impl: something is wrong here..." ); (void)pBar; - if( !maHeaderBar.GetCurItemId() ) + if( !maHeaderBar->GetCurItemId() ) return 0; - if( !maHeaderBar.IsItemMode() ) + if( !maHeaderBar->IsItemMode() ) { Size aSz; - sal_uInt16 _nTabs = maHeaderBar.GetItemCount(); - long nWidth = maHeaderBar.GetItemSize( ITEMID_EVENT ); - long nBarWidth = maHeaderBar.GetSizePixel().Width(); + sal_uInt16 _nTabs = maHeaderBar->GetItemCount(); + long nWidth = maHeaderBar->GetItemSize( ITEMID_EVENT ); + long nBarWidth = maHeaderBar->GetSizePixel().Width(); if( nWidth < TAB_WIDTH_MIN ) - maHeaderBar.SetItemSize( ITEMID_EVENT, TAB_WIDTH_MIN ); + maHeaderBar->SetItemSize( ITEMID_EVENT, TAB_WIDTH_MIN ); else if( ( nBarWidth - nWidth ) < TAB_WIDTH_MIN ) - maHeaderBar.SetItemSize( ITEMID_EVENT, nBarWidth - TAB_WIDTH_MIN ); + maHeaderBar->SetItemSize( ITEMID_EVENT, nBarWidth - TAB_WIDTH_MIN ); { long nTmpSz = 0; for( sal_uInt16 i = 1 ; i < _nTabs ; ++i ) { - long _nWidth = maHeaderBar.GetItemSize( i ); + long _nWidth = maHeaderBar->GetItemSize( i ); aSz.Width() = _nWidth + nTmpSz; nTmpSz += _nWidth; - maListBox.SetTab( i, PixelToLogic( aSz, MapMode( MAP_APPFONT ) ).Width(), MAP_APPFONT ); + maListBox->SetTab( i, PixelToLogic( aSz, MapMode( MAP_APPFONT ) ).Width(), MAP_APPFONT ); } } } @@ -121,8 +121,8 @@ bool MacroEventListBox::Notify( NotifyEvent& rNEvt ) if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS ) { - if ( rNEvt.GetWindow() != &maListBox ) - maListBox.GrabFocus(); + if ( rNEvt.GetWindow() != maListBox.get() ) + maListBox->GrabFocus(); } return nRet; @@ -130,13 +130,25 @@ bool MacroEventListBox::Notify( NotifyEvent& rNEvt ) MacroEventListBox::MacroEventListBox( vcl::Window* pParent, WinBits nStyle ) : Control( pParent, nStyle ) - , maHeaderBar( this, WB_BUTTONSTYLE | WB_BOTTOMBORDER ) - , maListBox( this, WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ) + , maHeaderBar( new HeaderBar( this, WB_BUTTONSTYLE | WB_BOTTOMBORDER ) ) + , maListBox( new SvHeaderTabListBox( this, WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ) ) { - maListBox.SetHelpId( HID_MACRO_HEADERTABLISTBOX ); + maListBox->SetHelpId( HID_MACRO_HEADERTABLISTBOX ); // enable the cell focus to show visible focus - maListBox.EnableCellFocus(); + maListBox->EnableCellFocus(); +} + +MacroEventListBox::~MacroEventListBox() +{ + dispose(); +} + +void MacroEventListBox::dispose() +{ + maHeaderBar.disposeAndClear(); + maListBox.disposeAndClear(); + Control::dispose(); } extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeMacroEventListBox(vcl::Window *pParent, VclBuilder::stringmap &rMap) @@ -161,15 +173,15 @@ void MacroEventListBox::Resize() // calc pos and size of header bar Point aPnt( 0, 0 ); - Size aSize( maHeaderBar.CalcWindowSizePixel() ); + Size aSize( maHeaderBar->CalcWindowSizePixel() ); Size aCtrlSize( GetOutputSizePixel() ); aSize.Width() = aCtrlSize.Width(); - maHeaderBar.SetPosSizePixel( aPnt, aSize ); + maHeaderBar->SetPosSizePixel( aPnt, aSize ); // calc pos and size of ListBox aPnt.Y() += aSize.Height(); aSize.Height() = aCtrlSize.Height() - aSize.Height(); - maListBox.SetPosSizePixel( aPnt, aSize ); + maListBox->SetPosSizePixel( aPnt, aSize ); } void MacroEventListBox::ConnectElements( void ) @@ -177,21 +189,21 @@ void MacroEventListBox::ConnectElements( void ) Resize(); // set handler - maHeaderBar.SetEndDragHdl( LINK( this, MacroEventListBox, HeaderEndDrag_Impl ) ); + maHeaderBar->SetEndDragHdl( LINK( this, MacroEventListBox, HeaderEndDrag_Impl ) ); - maListBox.InitHeaderBar( &maHeaderBar ); + maListBox->InitHeaderBar( maHeaderBar.get() ); } void MacroEventListBox::Show( bool bVisible, sal_uInt16 nFlags ) { - maListBox.Show( bVisible, nFlags ); - maHeaderBar.Show( bVisible, nFlags ); + maListBox->Show( bVisible, nFlags ); + maHeaderBar->Show( bVisible, nFlags ); } void MacroEventListBox::Enable( bool bEnable, bool bChild ) { - maListBox.Enable( bEnable, bChild ); - maHeaderBar.Enable( bEnable, bChild ); + maListBox->Enable( bEnable, bChild ); + maHeaderBar->Enable( bEnable, bChild ); } // assign button ("Add Command") is enabled only if it is not read only @@ -225,8 +237,14 @@ _SvxMacroTabPage::_SvxMacroTabPage(vcl::Window* pParent, const OString& rID, } _SvxMacroTabPage::~_SvxMacroTabPage() +{ + dispose(); +} + +void _SvxMacroTabPage::dispose() { DELETEZ( mpImpl ); + SfxTabPage::dispose(); } void _SvxMacroTabPage::InitResources() @@ -870,12 +888,6 @@ AssignComponentDialog::AssignComponentDialog( vcl::Window * pParent, const OUStr mpMethodEdit->SetText( aMethodName, Selection( 0, SELECTION_MAX ) ); } -AssignComponentDialog::~AssignComponentDialog() -{ -} - - - 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 7babc45611a5..6ec8709a971e 100644 --- a/cui/source/customize/macropg_impl.hxx +++ b/cui/source/customize/macropg_impl.hxx @@ -49,7 +49,6 @@ private: public: AssignComponentDialog( vcl::Window * pParent, const OUString& rURL ); - virtual ~AssignComponentDialog(); OUString getURL( void ) const { return maURL; } diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 761cd4f831d0..5d0ffe6a9209 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -98,8 +98,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxConfigFunctionListB } SvxConfigFunctionListBox::~SvxConfigFunctionListBox() +{ + dispose(); +} + +void SvxConfigFunctionListBox::dispose() { ClearAll(); + SvTreeListBox::dispose(); } SvTreeListEntry* SvxConfigFunctionListBox::GetLastSelectedEntry() @@ -226,8 +232,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxConfigGroupListBox( } SvxConfigGroupListBox::~SvxConfigGroupListBox() +{ + dispose(); +} + +void SvxConfigGroupListBox::dispose() { ClearAll(); + SvTreeListBox::dispose(); } void SvxConfigGroupListBox::ClearAll() @@ -906,10 +918,6 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog( UpdateUI(); } -SvxScriptSelectorDialog::~SvxScriptSelectorDialog() -{ -} - 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 1aa1613b286f..9f091c195967 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -245,6 +245,11 @@ SpellDialog::SpellDialog(SpellDialogChildWindow* pChildWindow, SpellDialog::~SpellDialog() +{ + dispose(); +} + +void SpellDialog::dispose() { // save possibly modified user-dictionaries Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); @@ -254,6 +259,7 @@ SpellDialog::~SpellDialog() } delete pImpl; + SfxModelessDialog::dispose(); } @@ -1199,9 +1205,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSentenceEditWindow(vcl } -SentenceEditWindow_Impl::~SentenceEditWindow_Impl() -{ -} /*------------------------------------------------------------------------- The selection before inputting a key may have a range or not and it may be inside or outside of field or error attributes. diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index d1015e844e97..4b8c9a3518a5 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -309,6 +309,7 @@ class ColorFieldControl : public Control public: ColorFieldControl( vcl::Window* pParent, const WinBits& nStyle ); virtual ~ColorFieldControl(); + virtual void dispose() SAL_OVERRIDE; virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -358,8 +359,14 @@ ColorFieldControl::ColorFieldControl( vcl::Window* pParent, const WinBits& nStyl } ColorFieldControl::~ColorFieldControl() +{ + dispose(); +} + +void ColorFieldControl::dispose() { delete mpBitmap; + Control::dispose(); } extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeColorFieldControl(vcl::Window *pParent, VclBuilder::stringmap &rMap) @@ -702,6 +709,7 @@ class ColorSliderControl : public Control public: ColorSliderControl( vcl::Window* pParent, const WinBits& nStyle ); virtual ~ColorSliderControl(); + virtual void dispose() SAL_OVERRIDE; virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -743,8 +751,14 @@ ColorSliderControl::ColorSliderControl( vcl::Window* pParent, const WinBits& nSt } ColorSliderControl::~ColorSliderControl() +{ + dispose(); +} + +void ColorSliderControl::dispose() { delete mpBitmap; + Control::dispose(); } extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeColorSliderControl(vcl::Window *pParent, VclBuilder::stringmap &rMap) diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index f239f7f33df0..e992ab28d064 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -102,15 +102,6 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, bool bOne_, const SfxIte -SvxCharacterMap::~SvxCharacterMap() -{ -} - - - - - - void SvxCharacterMap::SetChar( sal_UCS4 c ) { m_pShowSet->SelectCharacter( c ); @@ -298,9 +289,6 @@ void SvxShowText::SetText( const OUString& rText ) -SvxShowText::~SvxShowText() -{} - // class SvxCharacterMap ================================================= void SvxCharacterMap::init() diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 1dbd644dae90..d651f0e4c89b 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -159,6 +159,11 @@ FmSearchDialog::FmSearchDialog(vcl::Window* pParent, const OUString& sInitialTex } FmSearchDialog::~FmSearchDialog() +{ + dispose(); +} + +void FmSearchDialog::dispose() { if (m_aDelayedPaint.IsActive()) m_aDelayedPaint.Stop(); @@ -172,6 +177,7 @@ FmSearchDialog::~FmSearchDialog() } delete m_pSearchEngine; + ModalDialog::dispose(); } void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sInitialText) diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index a6a9ef3a507e..d6487fb362ac 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -755,6 +755,11 @@ void TPGalleryThemeProperties::StartSearchFiles( const OUString& _rFolderURL, sh TPGalleryThemeProperties::~TPGalleryThemeProperties() +{ + dispose(); +} + +void TPGalleryThemeProperties::dispose() { xMediaPlayer.clear(); xDialogListener.clear(); @@ -762,6 +767,7 @@ TPGalleryThemeProperties::~TPGalleryThemeProperties() for ( size_t i = 0, n = aFilterEntryList.size(); i < n; ++i ) { delete aFilterEntryList[ i ]; } + SfxTabPage::dispose(); } diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 053196c25a5d..bb5463e7d655 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -156,12 +156,18 @@ SvxHpLinkDlg::SvxHpLinkDlg (vcl::Window* pParent, SfxBindings* pBindings) } SvxHpLinkDlg::~SvxHpLinkDlg () +{ + dispose(); +} + +void SvxHpLinkDlg::dispose() { // delete config item, so the base class (IconChoiceDialog) can not load it on the next start SvtViewOptions aViewOpt( E_TABDIALOG, OUString::number(SID_HYPERLINK_DIALOG) ); aViewOpt.Delete(); delete mpItemSet; + IconChoiceDialog::dispose(); } /************************************************************************* diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index 83ee94c07fce..1f6c66310725 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -137,8 +137,14 @@ SvxMessDialog::SvxMessDialog( vcl::Window* pWindow, const OUString& rText, const } SvxMessDialog::~SvxMessDialog() +{ + dispose(); +} + +void SvxMessDialog::dispose() { delete pImage; + ModalDialog::dispose(); } /*************************************************************************/ diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index e80f41854b6a..ff425f90c775 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -337,8 +337,14 @@ namespace svx } SuggestionSet::~SuggestionSet() + { + dispose(); + } + + void SuggestionSet::dispose() { ClearSet(); + ValueSet::dispose(); } void SuggestionSet::UserDraw( const UserDrawEvent& rUDEvt ) @@ -366,29 +372,37 @@ namespace svx SuggestionDisplay::SuggestionDisplay( vcl::Window* pParent, WinBits nBits ) : Control( pParent, nBits ) , m_bDisplayListBox( true ) - , m_aValueSet( this ) - , m_aListBox( this,GetStyle() | WB_BORDER ) + , m_aValueSet( new SuggestionSet(this) ) + , m_aListBox( new ListBox(this,GetStyle() | WB_BORDER) ) , m_bInSelectionUpdate( false ) { - m_aValueSet.SetSelectHdl( LINK( this, SuggestionDisplay, SelectSuggestionHdl ) ); - m_aListBox.SetSelectHdl( LINK( this, SuggestionDisplay, SelectSuggestionHdl ) ); + m_aValueSet->SetSelectHdl( LINK( this, SuggestionDisplay, SelectSuggestionHdl ) ); + m_aListBox->SetSelectHdl( LINK( this, SuggestionDisplay, SelectSuggestionHdl ) ); - m_aValueSet.SetLineCount( LINE_CNT ); - m_aValueSet.SetStyle( m_aValueSet.GetStyle() | WB_ITEMBORDER | WB_FLATVALUESET | WB_VSCROLL ); - m_aValueSet.SetBorderStyle( WindowBorderStyle::MONO ); + m_aValueSet->SetLineCount( LINE_CNT ); + m_aValueSet->SetStyle( m_aValueSet->GetStyle() | WB_ITEMBORDER | WB_FLATVALUESET | WB_VSCROLL ); + m_aValueSet->SetBorderStyle( WindowBorderStyle::MONO ); OUString aOneCharacter("AU"); long nItemWidth = 2*GetTextWidth( aOneCharacter ); - m_aValueSet.SetItemWidth( nItemWidth ); + m_aValueSet->SetItemWidth( nItemWidth ); Size aSize( approximate_char_width() * 48, GetTextHeight() * 5 ); - m_aValueSet.SetSizePixel( aSize ); - m_aListBox.SetSizePixel( aSize ); + m_aValueSet->SetSizePixel( aSize ); + m_aListBox->SetSizePixel( aSize ); implUpdateDisplay(); } SuggestionDisplay::~SuggestionDisplay() { + dispose(); + } + + void SuggestionDisplay::dispose() + { + m_aValueSet.disposeAndClear(); + m_aListBox.disposeAndClear(); + Control::dispose(); } void SuggestionDisplay::implUpdateDisplay() @@ -396,8 +410,8 @@ namespace svx bool bShowBox = IsVisible() && m_bDisplayListBox; bool bShowSet = IsVisible() && !m_bDisplayListBox; - m_aListBox.Show( bShowBox ); - m_aValueSet.Show( bShowSet ); + m_aListBox->Show( bShowBox ); + m_aValueSet->Show( bShowSet ); } void SuggestionDisplay::StateChanged( StateChangedType nStateChange ) @@ -409,8 +423,8 @@ namespace svx Control& SuggestionDisplay::implGetCurrentControl() { if( m_bDisplayListBox ) - return m_aListBox; - return m_aValueSet; + return *m_aListBox.get(); + return *m_aValueSet.get(); } void SuggestionDisplay::KeyInput( const KeyEvent& rKEvt ) @@ -467,15 +481,15 @@ namespace svx return 0L; m_bInSelectionUpdate = true; - if( pControl == &m_aListBox ) + if( pControl == m_aListBox.get() ) { - sal_uInt16 nPos = m_aListBox.GetSelectEntryPos(); - m_aValueSet.SelectItem( nPos+1 ); //itemid == pos+1 (id 0 has special meaning) + sal_uInt16 nPos = m_aListBox->GetSelectEntryPos(); + m_aValueSet->SelectItem( nPos+1 ); //itemid == pos+1 (id 0 has special meaning) } else { - sal_uInt16 nPos = m_aValueSet.GetSelectItemId()-1; //itemid == pos+1 (id 0 has special meaning) - m_aListBox.SelectEntryPos( nPos ); + sal_uInt16 nPos = m_aValueSet->GetSelectItemId()-1; //itemid == pos+1 (id 0 has special meaning) + m_aListBox->SelectEntryPos( nPos ); } m_bInSelectionUpdate = false; m_aSelectLink.Call( this ); @@ -488,38 +502,38 @@ namespace svx } void SuggestionDisplay::Clear() { - m_aListBox.Clear(); - m_aValueSet.Clear(); + m_aListBox->Clear(); + m_aValueSet->Clear(); } void SuggestionDisplay::InsertEntry( const OUString& rStr ) { - sal_uInt16 nItemId = m_aListBox.InsertEntry( rStr ) + 1; //itemid == pos+1 (id 0 has special meaning) - m_aValueSet.InsertItem( nItemId ); + sal_uInt16 nItemId = m_aListBox->InsertEntry( rStr ) + 1; //itemid == pos+1 (id 0 has special meaning) + m_aValueSet->InsertItem( nItemId ); OUString* pItemData = new OUString( rStr ); - m_aValueSet.SetItemData( nItemId, pItemData ); + m_aValueSet->SetItemData( nItemId, pItemData ); } void SuggestionDisplay::SelectEntryPos( sal_uInt16 nPos ) { - m_aListBox.SelectEntryPos( nPos ); - m_aValueSet.SelectItem( nPos+1 ); //itemid == pos+1 (id 0 has special meaning) + m_aListBox->SelectEntryPos( nPos ); + m_aValueSet->SelectItem( nPos+1 ); //itemid == pos+1 (id 0 has special meaning) } sal_uInt16 SuggestionDisplay::GetEntryCount() const { - return m_aListBox.GetEntryCount(); + return m_aListBox->GetEntryCount(); } OUString SuggestionDisplay::GetEntry( sal_uInt16 nPos ) const { - return m_aListBox.GetEntry( nPos ); + return m_aListBox->GetEntry( nPos ); } OUString SuggestionDisplay::GetSelectEntry() const { - return m_aListBox.GetSelectEntry(); + return m_aListBox->GetSelectEntry(); } void SuggestionDisplay::SetHelpIds() { this->SetHelpId( HID_HANGULDLG_SUGGESTIONS ); - m_aValueSet.SetHelpId( HID_HANGULDLG_SUGGESTIONS_GRID ); - m_aListBox.SetHelpId( HID_HANGULDLG_SUGGESTIONS_LIST ); + m_aValueSet->SetHelpId( HID_HANGULDLG_SUGGESTIONS_GRID ); + m_aListBox->SetHelpId( HID_HANGULDLG_SUGGESTIONS_LIST ); } extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSuggestionDisplay( vcl::Window *pParent, VclBuilder::stringmap & ) @@ -592,11 +606,6 @@ namespace svx } - HangulHanjaConversionDialog::~HangulHanjaConversionDialog( ) - { - } - - void HangulHanjaConversionDialog::FillSuggestions( const ::com::sun::star::uno::Sequence< OUString >& _rSuggestions ) { m_pSuggestions->Clear(); @@ -1124,6 +1133,11 @@ namespace svx } HangulHanjaOptionsDialog::~HangulHanjaOptionsDialog() + { + dispose(); + } + + void HangulHanjaOptionsDialog::dispose() { SvTreeListEntry* pEntry = m_pDictsLB->First(); while( pEntry ) @@ -1136,6 +1150,7 @@ namespace svx if( m_pCheckButtonData ) delete m_pCheckButtonData; + ModalDialog::dispose(); } void HangulHanjaOptionsDialog::AddDict( const OUString& _rName, bool _bChecked ) @@ -1357,10 +1372,6 @@ namespace svx { } - SuggestionEdit::~SuggestionEdit() - { - } - bool SuggestionEdit::PreNotify( NotifyEvent& rNEvt ) { bool nHandled = false; @@ -1768,9 +1779,15 @@ namespace svx } HangulHanjaEditDictDialog::~HangulHanjaEditDictDialog() + { + dispose(); + } + + void HangulHanjaEditDictDialog::dispose() { if( m_pSuggestions ) delete m_pSuggestions; + ModalDialog::dispose(); } void HangulHanjaEditDictDialog::UpdateScrollbar( void ) diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 4711a1f574ce..b415ae3374ab 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -128,6 +128,11 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( vcl::Window *pParent, IconChoiceDia } SvxHyperlinkNewDocTp::~SvxHyperlinkNewDocTp () +{ + dispose(); +} + +void SvxHyperlinkNewDocTp::dispose() { for ( sal_uInt16 n=0; nGetEntryCount(); n++ ) { @@ -135,6 +140,7 @@ SvxHyperlinkNewDocTp::~SvxHyperlinkNewDocTp () m_pLbDocTypes->GetEntryData ( n )); delete pTypeData; } + SvxHyperlinkTabPageBase::dispose(); } /************************************************************************* diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index 11fe8e63db34..2e45746d7684 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -71,10 +71,6 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( vcl::Window *pParent, IconChoiceDialog* p maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkDocTp, TimeoutHdl_Impl ) ); } -SvxHyperlinkDocTp::~SvxHyperlinkDocTp () -{ -} - /************************************************************************* |* |* Fill all dialog-controls except controls in groupbox "more..." diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 3c7bfcc1c4a4..73ea0ddc6220 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -81,10 +81,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( vcl::Window *pParent, maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkInternetTp, TimeoutHdl_Impl ) ); } -SvxHyperlinkInternetTp::~SvxHyperlinkInternetTp () -{ -} - /************************************************************************* |* |* Fill the all dialog-controls except controls in groupbox "more..." diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index 5c114ff317f0..d110b292a73d 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -66,10 +66,6 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog* m_pBtAdrBook->Hide(); } -SvxHyperlinkMailTp::~SvxHyperlinkMailTp () -{ -} - /************************************************************************* |* |* 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 a2b83836abf2..02058c78c0ed 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -149,8 +149,14 @@ SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd( SvxHyperlinkTabPageBase *pParent ) } SvxHlinkDlgMarkWnd::~SvxHlinkDlgMarkWnd() +{ + dispose(); +} + +void SvxHlinkDlgMarkWnd::dispose() { ClearTree(); + ModalDialog::dispose(); } /************************************************************************* diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 293b04069896..bec31329ed47 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -105,11 +105,17 @@ SvxHyperlinkTabPageBase::SvxHyperlinkTabPageBase ( vcl::Window *pParent, mpMarkWnd = new SvxHlinkDlgMarkWnd ( this ); } -SvxHyperlinkTabPageBase::~SvxHyperlinkTabPageBase () +SvxHyperlinkTabPageBase::~SvxHyperlinkTabPageBase() +{ + dispose(); +} + +void SvxHyperlinkTabPageBase::dispose() { maTimer.Stop(); delete mpMarkWnd; + IconChoicePage::dispose(); } void SvxHyperlinkTabPageBase::ActivatePage() diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index c6c7bb19b71c..af6d29876456 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -513,11 +513,6 @@ SvxHyphenWordDialog::SvxHyphenWordDialog( } -SvxHyphenWordDialog::~SvxHyphenWordDialog() -{ -} - - void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang ) { OUString aLangStr( SvtLanguageTable::GetLanguageString( nLang ) ); diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 1c999e3cde65..111499ef5c5c 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -53,10 +53,6 @@ IconChoicePage::IconChoicePage( vcl::Window *pParent, const OString& rID, -IconChoicePage::~IconChoicePage() -{ -} - /********************************************************************** | | Activate / Deaktivate @@ -208,6 +204,11 @@ IconChoiceDialog::IconChoiceDialog ( vcl::Window* pParent, const OUString& rID, } IconChoiceDialog ::~IconChoiceDialog () +{ + dispose(); +} + +void IconChoiceDialog::dispose() { // save configuration at INI-Manager // and remove pages @@ -247,6 +248,7 @@ IconChoiceDialog ::~IconChoiceDialog () delete pRanges; delete pOutSet; + ModalDialog::dispose(); } /********************************************************************** diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index fc9d8218c97d..db360449bd41 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -394,8 +394,14 @@ SvInsertPlugInDialog::SvInsertPlugInDialog(vcl::Window* pParent, } SvInsertPlugInDialog::~SvInsertPlugInDialog() +{ + dispose(); +} + +void SvInsertPlugInDialog::dispose() { delete m_pURL; + InsertObjectDialog_Impl::dispose(); } diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index e27b6fb85512..610ea4972c69 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -143,10 +143,6 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b SetManager( pMgr ); } -SvBaseLinksDlg::~SvBaseLinksDlg() -{ -} - /************************************************************************* |* SvBaseLinksDlg::Handler() *************************************************************************/ diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index b4dd69fa6c65..6b4b4b7733c4 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -223,6 +223,11 @@ SvxPathSelectDialog::SvxPathSelectDialog(vcl::Window* pParent) } SvxMultiPathDialog::~SvxMultiPathDialog() +{ + dispose(); +} + +void SvxMultiPathDialog::dispose() { sal_uInt16 nPos = (sal_uInt16)m_pRadioLB->GetEntryCount(); while ( nPos-- ) @@ -232,13 +237,21 @@ SvxMultiPathDialog::~SvxMultiPathDialog() } delete m_pRadioLB; + ModalDialog::dispose(); } SvxPathSelectDialog::~SvxPathSelectDialog() +{ + dispose(); +} + +void SvxPathSelectDialog::dispose() { sal_uInt16 nPos = m_pPathLB->GetEntryCount(); while ( nPos-- ) delete static_cast(m_pPathLB->GetEntryData(nPos)); + + ModalDialog::dispose(); } OUString SvxMultiPathDialog::GetPath() const diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index bca8cd9c211e..683d4e15633b 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -153,6 +153,12 @@ PasswordToOpenModifyDialog::PasswordToOpenModifyDialog( PasswordToOpenModifyDialog::~PasswordToOpenModifyDialog() { + dispose(); +} + +void PasswordToOpenModifyDialog::dispose() +{ + SfxModalDialog::dispose(); } diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index a7478f5c23df..90610557f6fb 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -79,10 +79,6 @@ IMPL_LINK_INLINE_START( SvPasteObjectDialog, DoubleClickHdl, ListBox *, pListBox } IMPL_LINK_INLINE_END( SvPasteObjectDialog, DoubleClickHdl, ListBox *, pListBox ) -SvPasteObjectDialog::~SvPasteObjectDialog() -{ -} - /************************************************************************* |* SvPasteObjectDialog::Insert() *************************************************************************/ diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index b740fd9e91bb..86d0e5812f32 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -123,9 +123,15 @@ SvxPostItDialog::SvxPostItDialog(vcl::Window* pParent, const SfxItemSet& rCoreSe SvxPostItDialog::~SvxPostItDialog() +{ + dispose(); +} + +void SvxPostItDialog::dispose() { delete pOutSet; pOutSet = 0; + SfxModalDialog::dispose(); } diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 2e4a87157ec5..adde1bb65f3b 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -100,8 +100,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSFTreeListBox(vcl::Win } SFTreeListBox::~SFTreeListBox() +{ + dispose(); +} + +void SFTreeListBox::dispose() { deleteAllTree(); + SvTreeListBox::dispose(); } void SFTreeListBox::delUserData( SvTreeListEntry* pEntry ) @@ -486,9 +492,15 @@ SvxScriptOrgDialog::SvxScriptOrgDialog( vcl::Window* pParent, const OUString& la } SvxScriptOrgDialog::~SvxScriptOrgDialog() +{ + dispose(); +} + +void SvxScriptOrgDialog::dispose() { // clear the SelectHdl so that it isn't called during the dtor m_pScriptsBox->SetSelectHdl( Link() ); + SfxModalDialog::dispose(); }; short SvxScriptOrgDialog::Execute() diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx index e3b6d18c58a3..edce7998effe 100644 --- a/cui/source/dialogs/splitcelldlg.cxx +++ b/cui/source/dialogs/splitcelldlg.cxx @@ -53,10 +53,6 @@ SvxSplitTableDlg::SvxSplitTableDlg( vcl::Window *pParent, bool bIsTableVertical, } } -SvxSplitTableDlg::~SvxSplitTableDlg() -{ -} - 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 39fbcd2cc99a..da6a1e6d99a9 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -63,8 +63,14 @@ SvxSearchFormatDialog::SvxSearchFormatDialog(vcl::Window* pParent, const SfxItem } SvxSearchFormatDialog::~SvxSearchFormatDialog() +{ + dispose(); +} + +void SvxSearchFormatDialog::dispose() { delete m_pFontList; + SfxTabDialog::dispose(); } void SvxSearchFormatDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 5ad4a5dae338..c0afe2a2c430 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -76,10 +76,6 @@ void LookUpComboBox::init(SvxThesaurusDialog *pDialog) m_pDialog = pDialog; } -LookUpComboBox::~LookUpComboBox() -{ -} - void LookUpComboBox::Modify() { m_aModifyIdle.Start(); @@ -105,10 +101,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeReplaceEdit(vcl::Windo return new ReplaceEdit(pParent); } -ReplaceEdit::~ReplaceEdit() -{ -} - void ReplaceEdit::Modify() { if (m_pBtn) @@ -177,8 +169,14 @@ void ThesaurusAlternativesCtrl::init(SvxThesaurusDialog *pDialog) } ThesaurusAlternativesCtrl::~ThesaurusAlternativesCtrl() +{ + dispose(); +} + +void ThesaurusAlternativesCtrl::dispose() { ClearExtraData(); + SvxCheckListBox::dispose(); } void ThesaurusAlternativesCtrl::ClearExtraData() @@ -522,10 +520,6 @@ IMPL_LINK( SvxThesaurusDialog, ReplaceBtnHdl_Impl, Button *, EMPTYARG /*pBtn*/ ) return 0; } -SvxThesaurusDialog::~SvxThesaurusDialog() -{ -} - void SvxThesaurusDialog::SetWindowTitle( LanguageType nLanguage ) { // adjust language diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index 32dea8c5ab77..190a0619b7d7 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -289,7 +289,16 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet ) } SvxZoomDialog::~SvxZoomDialog() -{} +{ + dispose(); +} + +void SvxZoomDialog::dispose() +{ + delete pOutSet; + pOutSet = 0; + SfxModalDialog::dispose(); +} IMPL_LINK(SvxZoomDialog, UserHdl, RadioButton *, pButton) { diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index 7b8646fee38b..e24334bd14b6 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -76,7 +76,6 @@ protected: public: SentenceEditWindow_Impl(vcl::Window* pParent, WinBits nBits); - virtual ~SentenceEditWindow_Impl(); void SetModifyHdl(const Link& rLink) SAL_OVERRIDE { m_aModifyLink = rLink;} @@ -220,6 +219,7 @@ public: vcl::Window * pParent, SfxBindings* pBindings); virtual ~SpellDialog(); + virtual void dispose() SAL_OVERRIDE; void SetLanguage( sal_uInt16 nLang ); virtual bool Close() SAL_OVERRIDE; diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx index 88d096f8425f..dc156cc914c6 100644 --- a/cui/source/inc/acccfg.hxx +++ b/cui/source/inc/acccfg.hxx @@ -172,6 +172,7 @@ private: public: SfxAcceleratorConfigPage( vcl::Window *pParent, const SfxItemSet& rItemSet ); virtual ~SfxAcceleratorConfigPage(); + virtual void dispose() SAL_OVERRIDE; virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE; diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx index f3e0cfda0e2f..3f56d128e87b 100644 --- a/cui/source/inc/align.hxx +++ b/cui/source/inc/align.hxx @@ -58,6 +58,7 @@ class AlignmentTabPage : public SfxTabPage public: virtual ~AlignmentTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); static const sal_uInt16* GetRanges() { return s_pRanges; } diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx index f27f2a4dd7fb..17e2bb64b66f 100644 --- a/cui/source/inc/autocdlg.hxx +++ b/cui/source/inc/autocdlg.hxx @@ -163,8 +163,9 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage OfaSwAutoFmtOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~OfaSwAutoFmtOptionsPage(); + virtual void dispose() SAL_OVERRIDE; - public: +public: static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; @@ -257,6 +258,7 @@ private: public: OfaAutocorrReplacePage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~OfaAutocorrReplacePage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); @@ -315,6 +317,7 @@ private: public: OfaAutocorrExceptPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~OfaAutocorrExceptPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); @@ -381,6 +384,7 @@ private: OfaQuoteTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); public: virtual ~OfaQuoteTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); @@ -430,8 +434,6 @@ private: OfaAutoCompleteTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); public: - virtual ~OfaAutoCompleteTabPage(); - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); @@ -497,8 +499,6 @@ private: public: - virtual ~OfaSmartTagOptionsTabPage(); - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx index 6c3298ef3633..9a0b126e3d8c 100644 --- a/cui/source/inc/backgrnd.hxx +++ b/cui/source/inc/backgrnd.hxx @@ -71,6 +71,7 @@ protected: private: SvxBackgroundTabPage( vcl::Window* pParent, const SfxItemSet& rCoreSet ); virtual ~SvxBackgroundTabPage(); + virtual void dispose() SAL_OVERRIDE; VclContainer* m_pAsGrid; FixedText* m_pSelectTxt; diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx index 244faa20fe6b..b05df65dd9f9 100644 --- a/cui/source/inc/border.hxx +++ b/cui/source/inc/border.hxx @@ -61,7 +61,6 @@ protected: private: SvxBorderTabPage( vcl::Window* pParent, const SfxItemSet& rCoreAttrs ); - virtual ~SvxBorderTabPage(); // Controls ValueSet* m_pWndPresets; diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 58505ff614e2..fd9ef1a858f1 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -322,7 +322,6 @@ protected: public: SvxMenuEntriesListBox(vcl::Window*, SvxConfigPage*); - virtual ~SvxMenuEntriesListBox(); virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) SAL_OVERRIDE; @@ -483,6 +482,7 @@ private: public: SvxMenuConfigPage( vcl::Window *pParent, const SfxItemSet& rItemSet ); virtual ~SvxMenuConfigPage(); + virtual void dispose() SAL_OVERRIDE; SaveInData* CreateSaveInData( const ::com::sun::star::uno::Reference < @@ -516,8 +516,6 @@ public: vcl::Window*, SvxEntries*, SvxConfigEntry*, bool bCreateMenu = false ); - virtual ~SvxMainMenuOrganizerDialog (); - SvxEntries* GetEntries() { return mpEntries;} void SetEntries( SvxEntries* ); SvxConfigEntry* GetSelectedEntry(); @@ -544,6 +542,7 @@ public: SvxToolbarEntriesListBox(vcl::Window* pParent, SvxToolbarConfigPage* pPg); virtual ~SvxToolbarEntriesListBox(); + virtual void dispose() SAL_OVERRIDE; void SetChangedListener( const Link& aChangedListener ) { m_aChangedListener = aChangedListener; } @@ -584,6 +583,7 @@ private: public: SvxToolbarConfigPage( vcl::Window *pParent, const SfxItemSet& rItemSet ); virtual ~SvxToolbarConfigPage(); + virtual void dispose() SAL_OVERRIDE; SvTreeListEntry* AddFunction( SvTreeListEntry* pTarget = NULL, bool bFront = false, @@ -741,6 +741,7 @@ public: ); virtual ~SvxIconSelectorDialog(); + virtual void dispose() SAL_OVERRIDE; ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > GetSelectedIcon(); diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx index 3e445ce0e853..e4e557d5912d 100644 --- a/cui/source/inc/cfgutil.hxx +++ b/cui/source/inc/cfgutil.hxx @@ -113,6 +113,7 @@ class SfxConfigFunctionListBox : public SvTreeListBox public: SfxConfigFunctionListBox(vcl::Window*, WinBits nStyle); virtual ~SfxConfigFunctionListBox(); + virtual void dispose() SAL_OVERRIDE; void ClearAll(); using Window::GetHelpText; @@ -162,6 +163,7 @@ protected: public: SfxConfigGroupListBox(vcl::Window* pParent, WinBits nStyle); virtual ~SfxConfigGroupListBox(); + virtual void dispose() SAL_OVERRIDE; void ClearAll(); void Init(const css::uno::Reference< css::uno::XComponentContext >& xContext, diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index 43d7d61e0b10..da60c36ab965 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -53,8 +53,6 @@ protected: SvxCharBasePage(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet& rItemset); - virtual ~SvxCharBasePage(); - void SetPrevFontWidthScale( const SfxItemSet& rSet ); void SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ); @@ -152,6 +150,7 @@ public: public: virtual ~SvxCharNamePage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges() { return pNameRanges; } @@ -213,7 +212,6 @@ private: OUString m_aTransparentColorName; SvxCharEffectsPage( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~SvxCharEffectsPage(); void Initialize(); void UpdatePreview_Impl(); @@ -289,7 +287,6 @@ private: sal_uInt8 m_nSubProp; SvxCharPositionPage( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~SvxCharPositionPage(); void Initialize(); void UpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ); @@ -340,7 +337,6 @@ private: sal_uInt16 m_nEndBracketPosition; SvxCharTwoLinesPage(vcl::Window* pParent, const SfxItemSet& rSet); - virtual ~SvxCharTwoLinesPage(); void UpdatePreview_Impl(); void Initialize(); diff --git a/cui/source/inc/connect.hxx b/cui/source/inc/connect.hxx index a85dabdb8a5f..b079eef1c591 100644 --- a/cui/source/inc/connect.hxx +++ b/cui/source/inc/connect.hxx @@ -62,7 +62,6 @@ private: public: SvxConnectionPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs ); - virtual ~SvxConnectionPage(); static SfxTabPage* Create( vcl::Window*, const SfxItemSet* ); static const sal_uInt16* GetRanges() { return pRanges; } @@ -82,7 +81,6 @@ class SvxConnectionDialog : public SfxSingleTabDialog public: SvxConnectionDialog( vcl::Window* pParent, const SfxItemSet& rAttr, const SdrView* pView ); - virtual ~SvxConnectionDialog(); }; #endif // INCLUDED_CUI_SOURCE_INC_CONNECT_HXX diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx index a2e30e516502..dfe0d989b3af 100644 --- a/cui/source/inc/cuicharmap.hxx +++ b/cui/source/inc/cuicharmap.hxx @@ -41,7 +41,6 @@ class SvxShowText : public Control public: SvxShowText( vcl::Window* pParent, bool bCenter = false ); - virtual ~SvxShowText(); void SetFont( const vcl::Font& rFont ); void SetText( const OUString& rText ) SAL_OVERRIDE; @@ -94,7 +93,6 @@ private: public: SvxCharacterMap( vcl::Window* pParent, bool bOne=true, const SfxItemSet* pSet=0 ); - virtual ~SvxCharacterMap(); void DisableFontSelection(); diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx index d163b3d44b6f..96dacaf1d5b4 100644 --- a/cui/source/inc/cuifmsearch.hxx +++ b/cui/source/inc/cuifmsearch.hxx @@ -111,6 +111,7 @@ public: const Link& lnkContextSupplier); virtual ~FmSearchDialog(); + virtual void dispose() SAL_OVERRIDE; /** The found-handler gets in the 'found'-case a pointer on a FmFoundRecordInformation-structure (which is only valid in the handler; so if one needs to memorize the data, don't copy the pointer but diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index a57904afd53a..2c82170ea3a7 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -93,7 +93,6 @@ private: public: SearchProgress( vcl::Window* pParent, const INetURLObject& rStartURL ); - virtual ~SearchProgress() {}; DECL_LINK( CleanUpHdl, void* ); @@ -161,7 +160,6 @@ private: public: ActualizeProgress( vcl::Window* pWindow, GalleryTheme* pThm ); - virtual ~ActualizeProgress() {}; virtual short Execute() SAL_OVERRIDE; }; @@ -221,7 +219,6 @@ private: public: TPGalleryThemeGeneral( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~TPGalleryThemeGeneral() {} void SetXChgData( ExchangeData* pData ); const ExchangeData* GetXChgData() const { return pData; } @@ -287,6 +284,7 @@ class TPGalleryThemeProperties : public SfxTabPage public: TPGalleryThemeProperties( vcl::Window* pWindow, const SfxItemSet& rSet ); virtual ~TPGalleryThemeProperties(); + virtual void dispose() SAL_OVERRIDE; void SetXChgData( ExchangeData* pData ); const ExchangeData* GetXChgData() const { return pData; } diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx index 8ef2930ae952..93de02f161cc 100644 --- a/cui/source/inc/cuihyperdlg.hxx +++ b/cui/source/inc/cuihyperdlg.hxx @@ -80,6 +80,7 @@ protected: public: SvxHpLinkDlg (vcl::Window* pParent, SfxBindings* pBindings ); virtual ~SvxHpLinkDlg (); + virtual void dispose() SAL_OVERRIDE; virtual void PageCreated( sal_uInt16 nId, IconChoicePage& rPage ) SAL_OVERRIDE; diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx index 500bf7cb20ba..2febcb8d0976 100644 --- a/cui/source/inc/cuioptgenrl.hxx +++ b/cui/source/inc/cuioptgenrl.hxx @@ -64,7 +64,6 @@ protected: public: SvxGeneralTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~SvxGeneralTabPage (); static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 5d8c23db8332..c3ebd3048dc3 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -76,7 +76,6 @@ protected: public: SvxAreaTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, bool bShadow ); - virtual ~SvxAreaTabDialog(); void SetNewColorList( XColorListRef pColTab ) { mpNewColorList = pColTab; } @@ -597,6 +596,7 @@ private: public: SvxBitmapTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); virtual ~SvxBitmapTabPage(); + virtual void dispose() SAL_OVERRIDE; void Construct(); @@ -731,6 +731,7 @@ private: public: SvxColorTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); virtual ~SvxColorTabPage(); + virtual void dispose() SAL_OVERRIDE; void Construct(); diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index 5db33305c9c8..ca9f7b718d1a 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -64,7 +64,6 @@ public: SvxLineTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pObj = NULL, bool bHasObj = true ); - virtual ~SvxLineTabDialog(); void SetNewDashList( XDashListRef pInLst) { pNewDashList = pInLst; } @@ -205,6 +204,7 @@ public: SvxLineTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); virtual ~SvxLineTabPage(); + virtual void dispose() SAL_OVERRIDE; void Construct(); @@ -372,7 +372,6 @@ private: public: SvxLineEndDefTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); - virtual ~SvxLineEndDefTabPage(); void Construct(); diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx index f35f2adb57c8..a665aabbf636 100644 --- a/cui/source/inc/dbregister.hxx +++ b/cui/source/inc/dbregister.hxx @@ -91,6 +91,7 @@ namespace svx public: DbRegistrationOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~DbRegistrationOptionsPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges(); @@ -129,7 +130,6 @@ namespace svx { public: DatabaseRegistrationDialog( vcl::Window* pParent, const SfxItemSet& rAttr ); - virtual ~DatabaseRegistrationDialog(); virtual short Execute() SAL_OVERRIDE; }; diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx index e6d9ea26c9fd..46c971499c67 100644 --- a/cui/source/inc/dlgname.hxx +++ b/cui/source/inc/dlgname.hxx @@ -140,6 +140,7 @@ private: public: SvxMessDialog( vcl::Window* pWindow, const OUString& rText, const OUString& rDesc, Image* pImg = NULL ); virtual ~SvxMessDialog(); + virtual void dispose() SAL_OVERRIDE; void SetButtonText( sal_uInt16 nBtnId, const OUString& rNewTxt ); }; diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx index 8d7392ac26ac..39cd21b26538 100644 --- a/cui/source/inc/grfpage.hxx +++ b/cui/source/inc/grfpage.hxx @@ -95,6 +95,7 @@ class SvxGrfCropPage : public SfxTabPage SvxGrfCropPage( vcl::Window *pParent, const SfxItemSet &rSet ); virtual ~SvxGrfCropPage(); + virtual void dispose() SAL_OVERRIDE; DECL_LINK( ZoomHdl, MetricField * ); DECL_LINK( SizeHdl, MetricField * ); diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx index 4cea2af82cd2..2cfd24d24b60 100644 --- a/cui/source/inc/hangulhanjadlg.hxx +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -43,6 +43,7 @@ namespace svx public: SuggestionSet( vcl::Window* pParent ); virtual ~SuggestionSet(); + virtual void dispose() SAL_OVERRIDE; virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE; void ClearSet(); @@ -53,6 +54,7 @@ namespace svx public: SuggestionDisplay( vcl::Window* pParent, WinBits nBits ); virtual ~SuggestionDisplay(); + virtual void dispose() SAL_OVERRIDE; void DisplayListBox( bool bDisplayListBox ); @@ -87,8 +89,8 @@ namespace svx private: bool m_bDisplayListBox;//otherwise ValueSet - SuggestionSet m_aValueSet; - ListBox m_aListBox; + VclPtr m_aValueSet; + VclPtr m_aListBox; Link m_aSelectLink; bool m_bInSelectionUpdate; @@ -136,7 +138,6 @@ namespace svx HangulHanjaConversionDialog( vcl::Window* _pParent, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ); - virtual ~HangulHanjaConversionDialog( ); public: void SetOptionsChangedHdl( const Link& _rHdl ); @@ -222,6 +223,7 @@ namespace svx public: HangulHanjaOptionsDialog( vcl::Window* _pParent ); virtual ~HangulHanjaOptionsDialog(); + virtual void dispose() SAL_OVERRIDE; void AddDict( const OUString& _rName, bool _bChecked ); }; @@ -257,7 +259,6 @@ namespace svx void DoJump( bool _bUp ); public: SuggestionEdit( vcl::Window* pParent, WinBits nBits ); - virtual ~SuggestionEdit(); virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; void init( ScrollBar* pScrollBar, SuggestionEdit* pPrev, SuggestionEdit* pNext); }; @@ -312,6 +313,7 @@ namespace svx public: HangulHanjaEditDictDialog( vcl::Window* _pParent, HHDictList& _rDictList, sal_uInt32 _nSelDict ); virtual ~HangulHanjaEditDictDialog(); + virtual void dispose() SAL_OVERRIDE; void UpdateScrollbar( void ); }; diff --git a/cui/source/inc/headertablistbox.hxx b/cui/source/inc/headertablistbox.hxx index f536a1d77b57..5a4bfedca9e8 100644 --- a/cui/source/inc/headertablistbox.hxx +++ b/cui/source/inc/headertablistbox.hxx @@ -27,25 +27,27 @@ class MacroEventListBox : public Control { private: - HeaderBar maHeaderBar; - SvHeaderTabListBox maListBox; + VclPtr maHeaderBar; + VclPtr maListBox; protected: DECL_LINK( HeaderEndDrag_Impl, HeaderBar* ); virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; public: MacroEventListBox( vcl::Window* pParent, WinBits nStyle ); + virtual ~MacroEventListBox(); + virtual void dispose() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual Size GetOptimalSize() const SAL_OVERRIDE; SvHeaderTabListBox& GetListBox() { - return maListBox; + return *maListBox.get(); } HeaderBar& GetHeaderBar() { - return maHeaderBar; + return *maHeaderBar.get(); } void ConnectElements( void );/**< should be called after all manipulations on elements are done diff --git a/cui/source/inc/hldocntp.hxx b/cui/source/inc/hldocntp.hxx index 98731d7e6172..186ce6a6fe9a 100644 --- a/cui/source/inc/hldocntp.hxx +++ b/cui/source/inc/hldocntp.hxx @@ -52,6 +52,7 @@ protected: public: SvxHyperlinkNewDocTp ( vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet); virtual ~SvxHyperlinkNewDocTp (); + virtual void dispose() SAL_OVERRIDE; static IconChoicePage* Create( vcl::Window* pWindow, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet ); diff --git a/cui/source/inc/hldoctp.hxx b/cui/source/inc/hldoctp.hxx index 1b7e3525840d..108df078dfa6 100644 --- a/cui/source/inc/hldoctp.hxx +++ b/cui/source/inc/hldoctp.hxx @@ -67,7 +67,6 @@ protected: public: SvxHyperlinkDocTp ( vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet); - virtual ~SvxHyperlinkDocTp (); 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 e11b74456b32..bc76625641e4 100644 --- a/cui/source/inc/hlinettp.hxx +++ b/cui/source/inc/hlinettp.hxx @@ -78,7 +78,6 @@ protected: public: SvxHyperlinkInternetTp ( vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet); - virtual ~SvxHyperlinkInternetTp (); 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 6f847976e16b..1687e848156c 100644 --- a/cui/source/inc/hlmailtp.hxx +++ b/cui/source/inc/hlmailtp.hxx @@ -51,7 +51,6 @@ protected: public: SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet); - virtual ~SvxHyperlinkMailTp (); 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 2108beb587b4..e9d8c32dac9c 100644 --- a/cui/source/inc/hlmarkwn.hxx +++ b/cui/source/inc/hlmarkwn.hxx @@ -90,6 +90,7 @@ protected: public: SvxHlinkDlgMarkWnd (SvxHyperlinkTabPageBase *pParent); virtual ~SvxHlinkDlgMarkWnd(); + virtual void dispose() SAL_OVERRIDE; bool MoveTo ( Point aNewPos ); void RefreshTree(const OUString& aStrURL); diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx index f1df0e407056..275d28b7afed 100644 --- a/cui/source/inc/hltpbase.hxx +++ b/cui/source/inc/hltpbase.hxx @@ -118,6 +118,7 @@ public: const SfxItemSet& rItemSet ); virtual ~SvxHyperlinkTabPageBase (); + virtual void dispose() SAL_OVERRIDE; void SetDocumentFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame ) diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx index 4d0b7ba7c489..16821011e500 100644 --- a/cui/source/inc/hyphen.hxx +++ b/cui/source/inc/hyphen.hxx @@ -85,7 +85,6 @@ public: vcl::Window* pParent, css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen, SvxSpellWrapper* pWrapper ); - virtual ~SvxHyphenWordDialog(); void SetWindowTitle( LanguageType nLang ); void SelLeft(); diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx index 8831eb65f3d0..21a8d5b1025a 100644 --- a/cui/source/inc/iconcdlg.hxx +++ b/cui/source/inc/iconcdlg.hxx @@ -89,7 +89,6 @@ protected : sal_uInt16 GetWhich( sal_uInt16 nSlot ) const { return pSet->GetPool()->GetWhich( nSlot ); } public : - virtual ~IconChoicePage(); const SfxItemSet& GetItemSet() const { return *pSet; } @@ -182,6 +181,7 @@ public : IconChoiceDialog ( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription, const SfxItemSet * pItemSet = 0 ); virtual ~IconChoiceDialog (); + virtual void dispose() SAL_OVERRIDE; // interface SvxIconChoiceCtrlEntry* AddTabPage( diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx index 5807c240b826..009174bbffcc 100644 --- a/cui/source/inc/insdlg.hxx +++ b/cui/source/inc/insdlg.hxx @@ -109,6 +109,7 @@ public: SvInsertPlugInDialog(vcl::Window* pParent, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage); virtual ~SvInsertPlugInDialog(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; }; diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx index 89491007d919..62afb0c54b80 100644 --- a/cui/source/inc/linkdlg.hxx +++ b/cui/source/inc/linkdlg.hxx @@ -95,7 +95,6 @@ class SvBaseLinksDlg : public ModalDialog public: SvBaseLinksDlg( vcl::Window * pParent, sfx2::LinkManager*, bool bHtml = false ); - virtual ~SvBaseLinksDlg(); void SetActLink( sfx2::SvBaseLink * pLink ); }; diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx index c0e4fd66492b..f05f6d5d75b3 100644 --- a/cui/source/inc/macroass.hxx +++ b/cui/source/inc/macroass.hxx @@ -57,6 +57,7 @@ protected: public: virtual ~_SfxMacroTabPage(); + virtual void dispose() SAL_OVERRIDE; void AddEvent( const OUString & rEventName, sal_uInt16 nEventId ); diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx index c1cded175f5e..befe9e3607f9 100644 --- a/cui/source/inc/macropg.hxx +++ b/cui/source/inc/macropg.hxx @@ -82,6 +82,7 @@ protected: public: virtual ~_SvxMacroTabPage(); + virtual void dispose() SAL_OVERRIDE; void InitResources(); void InitAndSetHandler( ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > xAppEvents, ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > xDocEvents, ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifiable > xModifiable ); diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx index aadc276d3641..7e7bc034cbbe 100644 --- a/cui/source/inc/measure.hxx +++ b/cui/source/inc/measure.hxx @@ -66,7 +66,6 @@ private: public: SvxMeasurePage( vcl::Window* pWindow, const SfxItemSet& rInAttrs ); - virtual ~SvxMeasurePage(); 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 0508ff40aba1..685bbc32d96d 100644 --- a/cui/source/inc/multipat.hxx +++ b/cui/source/inc/multipat.hxx @@ -51,6 +51,7 @@ private: public: SvxMultiPathDialog(vcl::Window* pParent); virtual ~SvxMultiPathDialog(); + virtual void dispose() SAL_OVERRIDE; OUString GetPath() const; void SetPath( const OUString& rPath ); @@ -70,6 +71,7 @@ private: public: SvxPathSelectDialog(vcl::Window* pParent); virtual ~SvxPathSelectDialog(); + virtual void dispose() SAL_OVERRIDE; OUString GetPath() const; void SetPath( const OUString& rPath ); diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx index e86667080114..7a633e325872 100644 --- a/cui/source/inc/numfmt.hxx +++ b/cui/source/inc/numfmt.hxx @@ -70,6 +70,7 @@ class SvxNumberFormatTabPage : public SfxTabPage public: virtual ~SvxNumberFormatTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index 83987766ba73..9f9cca7bd9df 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -101,14 +101,15 @@ class SvxSingleNumPickTabPage : public SfxTabPage OUString sNumCharFmtName; sal_uInt16 nNumItemId; - protected: +protected: DECL_LINK(NumSelectHdl_Impl, void *); DECL_LINK(DoubleClickHdl_Impl, void *); - public: +public: SvxSingleNumPickTabPage(vcl::Window* pParent, const SfxItemSet& rSet); - virtual ~SvxSingleNumPickTabPage(); + virtual ~SvxSingleNumPickTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); @@ -138,13 +139,14 @@ class SvxBulletPickTabPage : public SfxTabPage sal_uInt16 nNumItemId; OUString sBulletCharFmtName; - protected: +protected: DECL_LINK(NumSelectHdl_Impl, void *); DECL_LINK(DoubleClickHdl_Impl, void *); - public: +public: SvxBulletPickTabPage(vcl::Window* pParent, const SfxItemSet& rSet); - virtual ~SvxBulletPickTabPage(); + virtual ~SvxBulletPickTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); @@ -180,14 +182,15 @@ class SvxNumPickTabPage : public SfxTabPage bool bPreset : 1; - protected: +protected: DECL_LINK(NumSelectHdl_Impl, void *); DECL_LINK(DoubleClickHdl_Impl, void *); - public: - SvxNumPickTabPage(vcl::Window* pParent, +public: + SvxNumPickTabPage(vcl::Window* pParent, const SfxItemSet& rSet); - virtual ~SvxNumPickTabPage(); + virtual ~SvxNumPickTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); @@ -224,15 +227,16 @@ class SvxBitmapPickTabPage : public SfxTabPage bool bModified : 1; bool bPreset : 1; - protected: +protected: DECL_LINK(NumSelectHdl_Impl, void *); DECL_LINK(DoubleClickHdl_Impl, void *); DECL_LINK(LinkBmpHdl_Impl, void *); - public: +public: SvxBitmapPickTabPage(vcl::Window* pParent, const SfxItemSet& rSet); virtual ~SvxBitmapPickTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); @@ -341,10 +345,11 @@ class SvxNumOptionsTabPage : public SfxTabPage DECL_STATIC_LINK( SvxNumOptionsTabPage, GraphicArrivedHdl_Impl, SvxBrushItem* ); - public: +public: SvxNumOptionsTabPage(vcl::Window* pParent, const SfxItemSet& rSet); virtual ~SvxNumOptionsTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); @@ -448,6 +453,7 @@ public: SvxNumPositionTabPage(vcl::Window* pParent, const SfxItemSet& rSet); virtual ~SvxNumPositionTabPage(); + virtual void dispose() SAL_OVERRIDE; virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE; virtual int DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE; diff --git a/cui/source/inc/optasian.hxx b/cui/source/inc/optasian.hxx index d2d182420783..5dc19787d471 100644 --- a/cui/source/inc/optasian.hxx +++ b/cui/source/inc/optasian.hxx @@ -56,6 +56,7 @@ class SvxAsianLayoutPage : public SfxTabPage public: virtual ~SvxAsianLayoutPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); static const sal_uInt16* GetRanges(); diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx index e26a4b37f253..9ed48ed6f1f8 100644 --- a/cui/source/inc/optdict.hxx +++ b/cui/source/inc/optdict.hxx @@ -152,7 +152,6 @@ public: const OUString& rName, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1> &xSpl ); - virtual ~SvxEditDictionaryDialog(); sal_uInt16 GetSelectedDict() {return pAllDictsLB->GetSelectEntryPos();} }; diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx index 8529393a14a0..cb49363bafe6 100644 --- a/cui/source/inc/optlingu.hxx +++ b/cui/source/inc/optlingu.hxx @@ -86,6 +86,7 @@ class SvxEditModulesDlg : public ModalDialog public: SvxEditModulesDlg(vcl::Window* pParent, SvxLinguData_Impl& rData); virtual ~SvxEditModulesDlg(); + virtual void dispose() SAL_OVERRIDE; }; // class SvxLinguTabPage ------------------------------------------------- @@ -147,6 +148,7 @@ private: public: virtual ~SvxLinguTabPage(); + 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/inc/optpath.hxx b/cui/source/inc/optpath.hxx index 8db65294ce6d..89cf4857371a 100644 --- a/cui/source/inc/optpath.hxx +++ b/cui/source/inc/optpath.hxx @@ -71,6 +71,7 @@ private: public: SvxPathTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxPathTabPage(); + 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/page.hxx b/cui/source/inc/page.hxx index fac3304b3794..fae515c87d41 100644 --- a/cui/source/inc/page.hxx +++ b/cui/source/inc/page.hxx @@ -197,6 +197,7 @@ public: virtual void FillUserData() SAL_OVERRIDE; virtual ~SvxPageDescPage(); + virtual void dispose() SAL_OVERRIDE; void SetMode( SvxModeType eMType ) { eMode = eMType; } void SetPaperFormatRanges( Paper eStart, Paper eEnd ) diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index 461f56a0a49c..26a9bc78d9cf 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -115,8 +115,6 @@ public: void EnableAbsLineDist(long nMinTwip); void EnableNegativeMode(); virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; - - virtual ~SvxStdParagraphTabPage(); }; // class SvxParaAlignTabPage ------------------------------------------------ @@ -156,7 +154,6 @@ class SvxParaAlignTabPage : public SfxTabPage void UpdateExample_Impl( bool bAll = false ); SvxParaAlignTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~SvxParaAlignTabPage(); protected: virtual int DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE; @@ -192,8 +189,6 @@ class SvxExtParagraphTabPage: public SfxTabPage static const sal_uInt16 pExtRanges[]; public: - virtual ~SvxExtParagraphTabPage(); - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges() { return pExtRanges; } @@ -271,9 +266,6 @@ class SvxAsianTabPage : public SfxTabPage DECL_LINK( ClickHdl_Impl, CheckBox* ); public: - virtual ~SvxAsianTabPage(); - - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges(); diff --git a/cui/source/inc/passwdomdlg.hxx b/cui/source/inc/passwdomdlg.hxx index 9dd7aca1e11b..59fd9e479a78 100644 --- a/cui/source/inc/passwdomdlg.hxx +++ b/cui/source/inc/passwdomdlg.hxx @@ -40,6 +40,7 @@ public: sal_uInt16 nMaxPasswdLen /* 0 -> no max len enforced */, bool bIsPasswordToModify ); virtual ~PasswordToOpenModifyDialog(); + virtual void dispose() SAL_OVERRIDE; // AbstractPasswordToOpenModifyDialog OUString GetPasswordToOpen() const; diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx index 52332ac398ed..a4ac2415f9f5 100644 --- a/cui/source/inc/pastedlg.hxx +++ b/cui/source/inc/pastedlg.hxx @@ -55,7 +55,6 @@ class SvPasteObjectDialog : public ModalDialog public: SvPasteObjectDialog( vcl::Window* pParent ); - virtual ~SvPasteObjectDialog(); 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 624649689e6a..fa3124359e7c 100644 --- a/cui/source/inc/postdlg.hxx +++ b/cui/source/inc/postdlg.hxx @@ -46,6 +46,7 @@ public: SvxPostItDialog(vcl::Window* pParent, const SfxItemSet& rCoreSet, bool bPrevNext = false); virtual ~SvxPostItDialog(); + virtual void dispose() SAL_OVERRIDE; static const sal_uInt16* GetRanges(); const SfxItemSet* GetOutputItemSet() const { return pOutSet; } diff --git a/cui/source/inc/radiobtnbox.hxx b/cui/source/inc/radiobtnbox.hxx index 1688bcd43905..7c31f340be54 100644 --- a/cui/source/inc/radiobtnbox.hxx +++ b/cui/source/inc/radiobtnbox.hxx @@ -39,7 +39,6 @@ protected: public: SvxRadioButtonListBox(SvSimpleTableContainer& rParent, WinBits nBits); - virtual ~SvxRadioButtonListBox(); void HandleEntryChecked( SvTreeListEntry* _pEntry ); diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx index 8778123ed582..0936ff2faabe 100644 --- a/cui/source/inc/scriptdlg.hxx +++ b/cui/source/inc/scriptdlg.hxx @@ -77,6 +77,7 @@ public: ::com::sun::star::uno::Reference< com::sun::star::frame::XModel>& model ); SFTreeListBox(vcl::Window* pParent); virtual ~SFTreeListBox(); + virtual void dispose() SAL_OVERRIDE; SvTreeListEntry * insertEntry(OUString const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent, @@ -175,6 +176,7 @@ public: // to specify the language or provider SvxScriptOrgDialog( vcl::Window* pParent, const OUString& language ); virtual ~SvxScriptOrgDialog(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx index b22b85e30f30..de029f891868 100644 --- a/cui/source/inc/selector.hxx +++ b/cui/source/inc/selector.hxx @@ -102,6 +102,7 @@ friend class SvxConfigGroupListBox; public: SvxConfigFunctionListBox(vcl::Window* pParent, WinBits nStyle); virtual ~SvxConfigFunctionListBox(); + virtual void dispose() SAL_OVERRIDE; void ClearAll(); OUString GetHelpText( SvTreeListEntry *pEntry ); using Window::GetHelpText; @@ -162,6 +163,7 @@ protected: public: SvxConfigGroupListBox(vcl::Window* pParent, WinBits nStyle); virtual ~SvxConfigGroupListBox(); + virtual void dispose() SAL_OVERRIDE; void Init(bool bShowSlots, const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >& xFrame); @@ -204,8 +206,6 @@ public: < ::com::sun::star::frame::XFrame >& xFrame = 0 ); - virtual ~SvxScriptSelectorDialog ( ); - void SetAddHdl( const Link& rLink ) { m_aAddHdl = rLink; } const Link& GetAddHdl() const { return m_aAddHdl; } diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx index 212559f32968..bc5fc701e449 100644 --- a/cui/source/inc/splitcelldlg.hxx +++ b/cui/source/inc/splitcelldlg.hxx @@ -40,7 +40,6 @@ protected: public: SvxSplitTableDlg(vcl::Window *pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal ); - virtual ~SvxSplitTableDlg(); DECL_LINK( ClickHdl, Button * ); diff --git a/cui/source/inc/srchxtra.hxx b/cui/source/inc/srchxtra.hxx index 0965484c9c45..705c4d2a96fc 100644 --- a/cui/source/inc/srchxtra.hxx +++ b/cui/source/inc/srchxtra.hxx @@ -31,6 +31,7 @@ class SvxSearchFormatDialog : public SfxTabDialog public: SvxSearchFormatDialog( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxSearchFormatDialog(); + virtual void dispose() SAL_OVERRIDE; protected: virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SAL_OVERRIDE; diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx index 94f34aa489ac..3c3d3e622f41 100644 --- a/cui/source/inc/swpossizetabpage.hxx +++ b/cui/source/inc/swpossizetabpage.hxx @@ -123,7 +123,6 @@ class SvxSwPosSizeTabPage : public SfxTabPage public: SvxSwPosSizeTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); - virtual ~SvxSwPosSizeTabPage(); 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 0bc84e35525c..2fd0d3aa8f18 100644 --- a/cui/source/inc/tabstpge.hxx +++ b/cui/source/inc/tabstpge.hxx @@ -49,8 +49,6 @@ class SvxTabulatorTabPage : public SfxTabPage static const sal_uInt16 pRanges[]; public: - virtual ~SvxTabulatorTabPage(); - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges() { return pRanges; } diff --git a/cui/source/inc/textanim.hxx b/cui/source/inc/textanim.hxx index 2f1031d3d572..31a705d488b3 100644 --- a/cui/source/inc/textanim.hxx +++ b/cui/source/inc/textanim.hxx @@ -75,7 +75,6 @@ private: public: SvxTextAnimationPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs ); - virtual ~SvxTextAnimationPage(); static SfxTabPage* Create( vcl::Window*, const SfxItemSet* ); static const sal_uInt16* GetRanges() { return pRanges; } @@ -104,7 +103,6 @@ public: SvxTextTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const SdrView* pView ); - virtual ~SvxTextTabDialog() {}; }; diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx index 234d14094f9c..439eb82ba2d3 100644 --- a/cui/source/inc/textattr.hxx +++ b/cui/source/inc/textattr.hxx @@ -76,7 +76,6 @@ private: public: SvxTextAttrPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs ); - virtual ~SvxTextAttrPage(); 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 a2dcc8580118..9b035f14d03f 100644 --- a/cui/source/inc/thesdlg.hxx +++ b/cui/source/inc/thesdlg.hxx @@ -42,7 +42,6 @@ class LookUpComboBox : public ComboBox public: LookUpComboBox(vcl::Window *pParent); - virtual ~LookUpComboBox(); DECL_LINK( ModifyTimer_Hdl, Timer * ); @@ -85,7 +84,7 @@ public: void init(SvxThesaurusDialog *pDialog); virtual ~ThesaurusAlternativesCtrl(); - + virtual void dispose() SAL_OVERRIDE; SvTreeListEntry * AddEntry( sal_Int32 nVal, const OUString &rText, bool bIsHeader ); @@ -106,7 +105,6 @@ class ReplaceEdit : public Edit public: ReplaceEdit(vcl::Window *pParent); - virtual ~ReplaceEdit(); void init(Button *pBtn) { m_pBtn = pBtn; } @@ -159,7 +157,6 @@ public: SvxThesaurusDialog( vcl::Window* pParent, css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus, const OUString &rWord, LanguageType nLanguage ); - virtual ~SvxThesaurusDialog(); void SetWindowTitle( LanguageType nLanguage ); OUString GetWord(); diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx index 5272a41bbb5a..6d477a573e30 100644 --- a/cui/source/inc/transfrm.hxx +++ b/cui/source/inc/transfrm.hxx @@ -62,7 +62,6 @@ public: SvxTransformTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const SdrView* pView, sal_uInt16 nAnchorTypes = 0); - virtual ~SvxTransformTabDialog(); //link for the Writer to validate positions void SetValidateFramePosLink( const Link& rLink ); diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index b6d70f487531..e00602962106 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -200,6 +200,7 @@ public: bool bActivateLastSelection = true ); OfaTreeOptionsDialog( vcl::Window* pParent, const OUString& rExtensionId ); virtual ~OfaTreeOptionsDialog(); + virtual void dispose() SAL_OVERRIDE; OptionsPageInfo* AddTabPage( sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup ); sal_uInt16 AddGroup( const OUString& rGroupName, SfxShell* pCreateShell, @@ -277,6 +278,7 @@ public: com::sun::star::awt::XContainerWindowProvider >& rProvider ); virtual ~ExtensionsTabPage(); + virtual void dispose() SAL_OVERRIDE; virtual void ActivatePage() SAL_OVERRIDE; virtual void DeactivatePage() SAL_OVERRIDE; diff --git a/cui/source/inc/zoom.hxx b/cui/source/inc/zoom.hxx index 3cccaceb49e8..3664ecc57ca2 100644 --- a/cui/source/inc/zoom.hxx +++ b/cui/source/inc/zoom.hxx @@ -57,6 +57,7 @@ private: public: SvxZoomDialog(vcl::Window* pParent, const SfxItemSet& rCoreSet); virtual ~SvxZoomDialog(); + virtual void dispose() SAL_OVERRIDE; const SfxItemSet* GetOutputItemSet() const; diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx index d6345be31a3d..0cfb700e66aa 100644 --- a/cui/source/options/certpath.cxx +++ b/cui/source/options/certpath.cxx @@ -143,6 +143,11 @@ OUString CertPathDialog::getDirectory() const } CertPathDialog::~CertPathDialog() +{ + dispose(); +} + +void CertPathDialog::dispose() { SvTreeListEntry* pEntry = m_pCertPathList->First(); while (pEntry) @@ -152,6 +157,7 @@ CertPathDialog::~CertPathDialog() pEntry = m_pCertPathList->Next( pEntry ); } delete m_pCertPathList; + ModalDialog::dispose(); } IMPL_LINK( CertPathDialog, CheckHdl_Impl, SvSimpleTable *, pList ) diff --git a/cui/source/options/certpath.hxx b/cui/source/options/certpath.hxx index bdc083c987d8..1add8ea14c1f 100644 --- a/cui/source/options/certpath.hxx +++ b/cui/source/options/certpath.hxx @@ -35,6 +35,7 @@ private: public: CertPathDialog(vcl::Window* pParent); virtual ~CertPathDialog(); + virtual void dispose() SAL_OVERRIDE; OUString getDirectory() const; }; diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 9b50fdc1cf31..2a48aac686f0 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -83,10 +83,6 @@ DatabaseRegistrationDialog::DatabaseRegistrationDialog( vcl::Window* pParent, co SetText(page->get("frame1")->get_label()); } -DatabaseRegistrationDialog::~DatabaseRegistrationDialog() -{ -} - short DatabaseRegistrationDialog::Execute() { short result = SfxSingleTabDialog::Execute(); @@ -166,10 +162,16 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( vcl::Window* pParent, cons DbRegistrationOptionsPage::~DbRegistrationOptionsPage() +{ + dispose(); +} + +void DbRegistrationOptionsPage::dispose() { for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i ) delete static_cast< DatabaseRegistration* >( pPathBox->GetEntry(i)->GetUserData() ); delete pPathBox; + SfxTabPage::dispose(); } diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index f4f6f1821cc7..c135ab289618 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -137,10 +137,16 @@ SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(OUString& rFont1, OUString& rF } SvxFontSubstTabPage::~SvxFontSubstTabPage() +{ + dispose(); +} + +void SvxFontSubstTabPage::dispose() { delete pCheckButtonData; delete pConfig; delete m_pCheckLB; + SfxTabPage::dispose(); } SfxTabPage* SvxFontSubstTabPage::Create( vcl::Window* pParent, diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx index d73e2b0f9926..b051cdd3c752 100644 --- a/cui/source/options/fontsubs.hxx +++ b/cui/source/options/fontsubs.hxx @@ -93,6 +93,7 @@ class SvxFontSubstTabPage : public SfxTabPage SvxFontSubstTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxFontSubstTabPage(); + virtual void dispose() SAL_OVERRIDE; public: static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx index cccc1b428087..8deb9e7cccc0 100644 --- a/cui/source/options/optaccessibility.cxx +++ b/cui/source/options/optaccessibility.cxx @@ -57,8 +57,14 @@ SvxAccessibilityOptionsTabPage::SvxAccessibilityOptionsTabPage(vcl::Window* pPar } SvxAccessibilityOptionsTabPage::~SvxAccessibilityOptionsTabPage() +{ + dispose(); +} + +void SvxAccessibilityOptionsTabPage::dispose() { delete m_pImpl; + SfxTabPage::dispose(); } SfxTabPage* SvxAccessibilityOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) diff --git a/cui/source/options/optaccessibility.hxx b/cui/source/options/optaccessibility.hxx index c63c37dac682..ccf2ac00712b 100644 --- a/cui/source/options/optaccessibility.hxx +++ b/cui/source/options/optaccessibility.hxx @@ -44,6 +44,7 @@ class SvxAccessibilityOptionsTabPage : public SfxTabPage public: virtual ~SvxAccessibilityOptionsTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx index d944b5f891e3..f8658bdd8673 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -150,8 +150,14 @@ SvxAsianLayoutPage::SvxAsianLayoutPage( vcl::Window* pParent, const SfxItemSet& } SvxAsianLayoutPage::~SvxAsianLayoutPage() +{ + dispose(); +} + +void SvxAsianLayoutPage::dispose() { delete pImpl; + SfxTabPage::dispose(); } SfxTabPage* SvxAsianLayoutPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) diff --git a/cui/source/options/optbasic.cxx b/cui/source/options/optbasic.cxx index 2c5498e97934..74028ff45621 100644 --- a/cui/source/options/optbasic.cxx +++ b/cui/source/options/optbasic.cxx @@ -45,10 +45,6 @@ SvxBasicIDEOptionsPage::SvxBasicIDEOptionsPage( vcl::Window* pParent, const SfxI } -SvxBasicIDEOptionsPage::~SvxBasicIDEOptionsPage() -{ -} - 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 5b1959d9f5a6..45f93120bcf4 100644 --- a/cui/source/options/optbasic.hxx +++ b/cui/source/options/optbasic.hxx @@ -38,7 +38,6 @@ private: public: SvxBasicIDEOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~SvxBasicIDEOptionsPage(); 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 55d002d70e51..d1aa2104e743 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -82,6 +82,11 @@ SvxDefaultColorOptPage::SvxDefaultColorOptPage(vcl::Window* pParent, const SfxIt } SvxDefaultColorOptPage::~SvxDefaultColorOptPage() +{ + dispose(); +} + +void SvxDefaultColorOptPage::dispose() { // save changes pChartOptions->SetDefaultColors( pColorConfig->GetColorList() ); @@ -89,6 +94,7 @@ SvxDefaultColorOptPage::~SvxDefaultColorOptPage() delete pColorConfig; delete pChartOptions; + SfxTabPage::dispose(); } void SvxDefaultColorOptPage::Construct() diff --git a/cui/source/options/optchart.hxx b/cui/source/options/optchart.hxx index 0f210e1ccd15..99d5377ccd00 100644 --- a/cui/source/options/optchart.hxx +++ b/cui/source/options/optchart.hxx @@ -55,6 +55,7 @@ private: public: SvxDefaultColorOptPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); virtual ~SvxDefaultColorOptPage(); + virtual void dispose() SAL_OVERRIDE; void Construct(); diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index d7166442270b..2cb909fea88a 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -174,7 +174,6 @@ class ColorConfigWindow_Impl { public: ColorConfigWindow_Impl(vcl::Window* pParent); - virtual ~ColorConfigWindow_Impl(); public: void SetLinks (Link const&, Link const&, Link const&); @@ -639,9 +638,6 @@ void ColorConfigWindow_Impl::SetAppearance () } } -ColorConfigWindow_Impl::~ColorConfigWindow_Impl () -{ } - void ColorConfigWindow_Impl::AdjustHeaderBar() { // horizontal positions @@ -842,6 +838,7 @@ class ColorConfigCtrl_Impl : public VclVBox public: ColorConfigCtrl_Impl(vcl::Window* pParent); virtual ~ColorConfigCtrl_Impl(); + virtual void dispose() SAL_OVERRIDE; void InitHeaderBar(const OUString &rOn, const OUString &rUIElems, const OUString &rColorSetting, const OUString &rPreview); @@ -909,11 +906,17 @@ void ColorConfigCtrl_Impl::InitHeaderBar(const OUString &rOn, const OUString &rU } ColorConfigCtrl_Impl::~ColorConfigCtrl_Impl() +{ + dispose(); +} + +void ColorConfigCtrl_Impl::dispose() { delete m_pVScroll; delete m_pScrollWindow; delete m_pBody; delete m_pHeaderHB; + VclVBox::dispose(); } extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeColorConfigCtrl(vcl::Window *pParent, VclBuilder::stringmap &) @@ -1055,6 +1058,11 @@ SvxColorOptionsTabPage::SvxColorOptionsTabPage( } SvxColorOptionsTabPage::~SvxColorOptionsTabPage() +{ + dispose(); +} + +void SvxColorOptionsTabPage::dispose() { //when the dialog is cancelled but the color scheme ListBox has been changed these //changes need to be undone @@ -1073,6 +1081,7 @@ SvxColorOptionsTabPage::~SvxColorOptionsTabPage() pExtColorConfig->ClearModified(); pExtColorConfig->EnableBroadcast(); delete pExtColorConfig; + SfxTabPage::dispose(); } SfxTabPage* SvxColorOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) diff --git a/cui/source/options/optcolor.hxx b/cui/source/options/optcolor.hxx index 509d9f13ab7a..cc886b5e2d79 100644 --- a/cui/source/options/optcolor.hxx +++ b/cui/source/options/optcolor.hxx @@ -49,6 +49,7 @@ class SvxColorOptionsTabPage : public SfxTabPage public: SvxColorOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxColorOptionsTabPage( ); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); diff --git a/cui/source/options/optctl.cxx b/cui/source/options/optctl.cxx index 45430195bc94..caaa0471294d 100644 --- a/cui/source/options/optctl.cxx +++ b/cui/source/options/optctl.cxx @@ -57,10 +57,6 @@ SvxCTLOptionsPage::SvxCTLOptionsPage( vcl::Window* pParent, const SfxItemSet& rS m_pNumeralsLB->SetDropDownLineCount( m_pNumeralsLB->GetEntryCount() ); } -SvxCTLOptionsPage::~SvxCTLOptionsPage() -{ -} - 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 3ab62ad2c09d..034e04b6d70f 100644 --- a/cui/source/options/optctl.hxx +++ b/cui/source/options/optctl.hxx @@ -44,9 +44,6 @@ private: SvxCTLOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet ); public: - - virtual ~SvxCTLOptionsPage(); - 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 d7d0c7297b2c..daf0bbb259c2 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -333,11 +333,6 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog( -SvxEditDictionaryDialog::~SvxEditDictionaryDialog() -{ -} - - /* void SvxEditDictionaryDialog::Paint( const Rectangle& rRect ) { diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 46051ce08c8e..59262aa314c1 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -54,10 +54,6 @@ OfaMSFilterTabPage::OfaMSFilterTabPage(vcl::Window* pParent, const SfxItemSet& r aEBasicCodeCB->SetClickHdl( LINK( this, OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl ) ); } -OfaMSFilterTabPage::~OfaMSFilterTabPage() -{ -} - IMPL_LINK_NOARG(OfaMSFilterTabPage, LoadWordBasicCheckHdl_Impl) { aWBasicWbctblCB->Enable( aWBasicCodeCB->IsChecked() ); @@ -162,9 +158,15 @@ OfaMSFilterTabPage2::OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet } OfaMSFilterTabPage2::~OfaMSFilterTabPage2() +{ + dispose(); +} + +void OfaMSFilterTabPage2::dispose() { delete pCheckButtonData; delete m_pCheckLB; + SfxTabPage::dispose(); } SfxTabPage* OfaMSFilterTabPage2::Create( vcl::Window* pParent, diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx index 38d280b52a46..763794fd36b9 100644 --- a/cui/source/options/optfltr.hxx +++ b/cui/source/options/optfltr.hxx @@ -37,7 +37,6 @@ class OfaMSFilterTabPage : public SfxTabPage CheckBox* aPBasicStgCB; OfaMSFilterTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~OfaMSFilterTabPage(); DECL_LINK(LoadWordBasicCheckHdl_Impl, void *); DECL_LINK(LoadExcelBasicCheckHdl_Impl, void *); @@ -88,6 +87,7 @@ class OfaMSFilterTabPage2 : public SfxTabPage OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~OfaMSFilterTabPage2(); + virtual void dispose() SAL_OVERRIDE; void InsertEntry( const OUString& _rTxt, sal_IntPtr _nType ); void InsertEntry( const OUString& _rTxt, sal_IntPtr _nType, diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 75869bc6c3c1..012d7905a4d4 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -307,10 +307,6 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, const SfxItemSet& rSet) m_pToolTipsCB->SetClickHdl( aLink ); } -OfaMiscTabPage::~OfaMiscTabPage() -{ -} - SfxTabPage* OfaMiscTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { return new OfaMiscTabPage( pParent, *rAttrSet ); @@ -685,10 +681,16 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet) } OfaViewTabPage::~OfaViewTabPage() +{ + dispose(); +} + +void OfaViewTabPage::dispose() { delete mpDrawinglayerOpt; delete pCanvasSettings; delete pAppearanceCfg; + SfxTabPage::dispose(); } #if defined( UNX ) @@ -1204,8 +1206,14 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const SfxItemSet& } OfaLanguagesTabPage::~OfaLanguagesTabPage() +{ + dispose(); +} + +void OfaLanguagesTabPage::dispose() { delete pLangConfig; + SfxTabPage::dispose(); } SfxTabPage* OfaLanguagesTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index 565281129baf..4f01834727ed 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -74,7 +74,6 @@ protected: public: OfaMiscTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~OfaMiscTabPage(); static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); @@ -132,6 +131,7 @@ private: public: OfaViewTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~OfaViewTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); @@ -176,6 +176,7 @@ class OfaLanguagesTabPage : public SfxTabPage public: OfaLanguagesTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~OfaLanguagesTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index d1504f90622e..28fde5a5fd7e 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -221,11 +221,6 @@ SvxGeneralTabPage::SvxGeneralTabPage(vcl::Window* pParent, const SfxItemSet& rCo -SvxGeneralTabPage::~SvxGeneralTabPage () -{ } - - - // Initializes the titles and the edit boxes, // according to vRowInfo[] and vFieldInfo[] above. void SvxGeneralTabPage::InitControls () diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx index b95873784cd0..eeae4d7d14ce 100644 --- a/cui/source/options/opthtml.cxx +++ b/cui/source/options/opthtml.cxx @@ -84,10 +84,6 @@ SfxTabPage( pParent, "OptHtmlPage" , "cui/ui/opthtmlpage.ui", &rSet ) aCharSetLB->FillWithMimeAndSelectBest(); } -OfaHtmlTabPage::~OfaHtmlTabPage() -{ -} - SfxTabPage* OfaHtmlTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { diff --git a/cui/source/options/opthtml.hxx b/cui/source/options/opthtml.hxx index c79e2393e831..2697fb50a830 100644 --- a/cui/source/options/opthtml.hxx +++ b/cui/source/options/opthtml.hxx @@ -53,7 +53,6 @@ class OfaHtmlTabPage : public SfxTabPage DECL_LINK(CheckBoxHdl_Impl, CheckBox*); OfaHtmlTabPage(vcl::Window* pParent, const SfxItemSet& rSet); - virtual ~OfaHtmlTabPage(); public: static SfxTabPage* Create( vcl::Window* pParent, diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 4c610886a7be..5d01c40e2d36 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -215,10 +215,6 @@ SvxProxyTabPage::SvxProxyTabPage(vcl::Window* pParent, const SfxItemSet& rSet) aArgumentList ); } -SvxProxyTabPage::~SvxProxyTabPage() -{ -} - SfxTabPage* SvxProxyTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet ) { return new SvxProxyTabPage(pParent, *rAttrSet); @@ -625,11 +621,17 @@ SvxSecurityTabPage::SvxSecurityTabPage(vcl::Window* pParent, const SfxItemSet& r } SvxSecurityTabPage::~SvxSecurityTabPage() +{ + dispose(); +} + +void SvxSecurityTabPage::dispose() { delete mpCertPathDlg; delete mpSecOptions; delete mpSecOptDlg; + SfxTabPage::dispose(); } IMPL_LINK_NOARG(SvxSecurityTabPage, SecurityOptionsHdl) @@ -971,8 +973,14 @@ SvxEMailTabPage::SvxEMailTabPage(vcl::Window* pParent, const SfxItemSet& rSet) /* -------------------------------------------------------------------------*/ SvxEMailTabPage::~SvxEMailTabPage() +{ + dispose(); +} + +void SvxEMailTabPage::dispose() { delete pImpl; + SfxTabPage::dispose(); } /* -------------------------------------------------------------------------*/ diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx index 37c97c1c7b0c..6eddd54219b3 100644 --- a/cui/source/options/optinet2.hxx +++ b/cui/source/options/optinet2.hxx @@ -99,7 +99,6 @@ private: DECL_LINK( LoseFocusHdl_Impl, Edit * ); SvxProxyTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~SvxProxyTabPage(); public: static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); @@ -168,6 +167,7 @@ private: SvxSecurityTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxSecurityTabPage(); + virtual void dispose() SAL_OVERRIDE; protected: virtual void ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE; @@ -199,6 +199,7 @@ class SvxEMailTabPage : public SfxTabPage public: SvxEMailTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxEMailTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 03fe25b2b1bf..e95c86cc90be 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -201,6 +201,11 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( vcl::Window* pParent, const SfxItemSet& SvxJavaOptionsPage::~SvxJavaOptionsPage() +{ + dispose(); +} + +void SvxJavaOptionsPage::dispose() { delete m_pJavaList; delete m_pParamDlg; @@ -216,6 +221,7 @@ SvxJavaOptionsPage::~SvxJavaOptionsPage() jfw_unlock(); #endif + SfxTabPage::dispose(); } @@ -807,12 +813,6 @@ SvxJavaParameterDlg::SvxJavaParameterDlg( vcl::Window* pParent ) : -SvxJavaParameterDlg::~SvxJavaParameterDlg() -{ -} - - - IMPL_LINK_NOARG(SvxJavaParameterDlg, ModifyHdl_Impl) { OUString sParam = comphelper::string::strip(m_pParameterEdit->GetText(), ' '); @@ -938,10 +938,16 @@ SvxJavaClassPathDlg::SvxJavaClassPathDlg(vcl::Window* pParent) SvxJavaClassPathDlg::~SvxJavaClassPathDlg() +{ + dispose(); +} + +void SvxJavaClassPathDlg::dispose() { sal_Int32 i, nCount = m_pPathList->GetEntryCount(); for ( i = 0; i < nCount; ++i ) delete static_cast< OUString* >( m_pPathList->GetEntryData(i) ); + ModalDialog::dispose(); } diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx index 4b45f37265ea..4c422011a02f 100644 --- a/cui/source/options/optjava.hxx +++ b/cui/source/options/optjava.hxx @@ -107,6 +107,7 @@ private: public: SvxJavaOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxJavaOptionsPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); @@ -140,7 +141,6 @@ private: public: SvxJavaParameterDlg( vcl::Window* pParent ); - virtual ~SvxJavaParameterDlg(); virtual short Execute() SAL_OVERRIDE; @@ -173,6 +173,7 @@ private: public: SvxJavaClassPathDlg( vcl::Window* pParent ); virtual ~SvxJavaClassPathDlg(); + virtual void dispose() SAL_OVERRIDE; inline const OUString& GetOldPath() const { return m_sOldPath; } inline void SetFocus() { m_pPathList->GrabFocus(); } diff --git a/cui/source/options/optjsearch.cxx b/cui/source/options/optjsearch.cxx index 96bc0146811f..707717f34218 100644 --- a/cui/source/options/optjsearch.cxx +++ b/cui/source/options/optjsearch.cxx @@ -56,11 +56,6 @@ SvxJSearchOptionsPage::SvxJSearchOptionsPage( vcl::Window* pParent, const SfxIte } -SvxJSearchOptionsPage::~SvxJSearchOptionsPage() -{ -} - - SfxTabPage* SvxJSearchOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { return new SvxJSearchOptionsPage( pParent, *rSet ); diff --git a/cui/source/options/optjsearch.hxx b/cui/source/options/optjsearch.hxx index bb5ac7a4606e..35639dfbff58 100644 --- a/cui/source/options/optjsearch.hxx +++ b/cui/source/options/optjsearch.hxx @@ -62,8 +62,6 @@ protected: SvxJSearchOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet ); public: - virtual ~SvxJSearchOptionsPage(); - 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 1b72de3e8c23..f91b782fa96f 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1121,9 +1121,15 @@ SvxLinguTabPage::SvxLinguTabPage( vcl::Window* pParent, const SfxItemSet& rSet ) } SvxLinguTabPage::~SvxLinguTabPage() +{ + dispose(); +} + +void SvxLinguTabPage::dispose() { if (pLinguData) delete pLinguData; + SfxTabPage::dispose(); } SfxTabPage* SvxLinguTabPage::Create( vcl::Window* pParent, @@ -1891,8 +1897,14 @@ SvxEditModulesDlg::SvxEditModulesDlg(vcl::Window* pParent, SvxLinguData_Impl& rD SvxEditModulesDlg::~SvxEditModulesDlg() +{ + dispose(); +} + +void SvxEditModulesDlg::dispose() { delete pDefaultLinguData; + ModalDialog::dispose(); } diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx index ea3cdd8af441..3f509a431084 100644 --- a/cui/source/options/optmemory.cxx +++ b/cui/source/options/optmemory.cxx @@ -141,12 +141,6 @@ OfaMemoryOptionsPage::OfaMemoryOptionsPage(vcl::Window* pParent, const SfxItemSe m_pNfGraphicCache->SetModifyHdl( LINK( this, OfaMemoryOptionsPage, GraphicCacheConfigHdl ) ); } - - -OfaMemoryOptionsPage::~OfaMemoryOptionsPage() -{ -} - 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 b3aaff18715d..c3d189f37bdc 100644 --- a/cui/source/options/optmemory.hxx +++ b/cui/source/options/optmemory.hxx @@ -57,7 +57,6 @@ protected: public: OfaMemoryOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~OfaMemoryOptionsPage(); static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx index 1c7df8c7c879..2323fc465b4e 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -104,12 +104,17 @@ SvxOpenCLTabPage::SvxOpenCLTabPage(vcl::Window* pParent, const SfxItemSet& rSet) SvxOpenCLTabPage::~SvxOpenCLTabPage() { - for ( sal_uInt16 i = 0; i < mpBlackList->GetEntryCount(); ++i ) + disposeOnce(); +} + +void SvxOpenCLTabPage::dispose() +{ + for ( sal_uInt16 i = 0; i < mpBlackList->GetEntryCount(); ++i ) delete static_cast(mpBlackList->GetEntry(i)->GetUserData()); for ( sal_uInt16 i = 0; i < mpWhiteList->GetEntryCount(); ++i ) delete static_cast(mpWhiteList->GetEntry(i)->GetUserData()); - delete mpBlackList; - delete mpWhiteList; + mpBlackList.disposeAndClear() + mpWhiteList.disposeAndClear() } SfxTabPage* SvxOpenCLTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx index dc28ba32a2c1..378dd5ab6c7b 100644 --- a/cui/source/options/optopencl.hxx +++ b/cui/source/options/optopencl.hxx @@ -70,7 +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 d4a16d775699..8cefe813a072 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -246,11 +246,17 @@ SvxPathTabPage::SvxPathTabPage(vcl::Window* pParent, const SfxItemSet& rSet) SvxPathTabPage::~SvxPathTabPage() +{ + dispose(); +} + +void SvxPathTabPage::dispose() { for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i ) delete static_cast(pPathBox->GetEntry(i)->GetUserData()); delete pPathBox; delete pImpl; + SfxTabPage::dispose(); } diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 1bc7861c0905..12fac31eb495 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -198,8 +198,14 @@ SfxSaveTabPage::SfxSaveTabPage( vcl::Window* pParent, const SfxItemSet& rCoreSet SfxSaveTabPage::~SfxSaveTabPage() +{ + dispose(); +} + +void SvxSaveTabPage::dispose() { delete pImpl; + SfxTabPage::dispose(); } diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx index b5fe40ad204e..87bd682dddcf 100644 --- a/cui/source/options/optsave.hxx +++ b/cui/source/options/optsave.hxx @@ -73,6 +73,7 @@ private: public: SvxSaveTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxSaveTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index e44e76006484..0c7894c63164 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -84,11 +84,6 @@ SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(vcl::Window* pParent, const SfxIt -SvxOnlineUpdateTabPage::~SvxOnlineUpdateTabPage() -{ -} - - void SvxOnlineUpdateTabPage::UpdateLastCheckedText() { OUString aDateStr; diff --git a/cui/source/options/optupdt.hxx b/cui/source/options/optupdt.hxx index 54bb2a3791f8..ce5362bd94aa 100644 --- a/cui/source/options/optupdt.hxx +++ b/cui/source/options/optupdt.hxx @@ -52,7 +52,6 @@ private: public: SvxOnlineUpdateTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); - virtual ~SvxOnlineUpdateTabPage(); static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index ddea9fed3c17..d4591fe163ea 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -291,10 +291,6 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( vcl::Window *pParent, cons LoadExtensionThemes(); } -SvxPersonalizationTabPage::~SvxPersonalizationTabPage() -{ -} - 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 95da0717c932..4c147ab926cf 100644 --- a/cui/source/options/personalization.hxx +++ b/cui/source/options/personalization.hxx @@ -41,7 +41,6 @@ private: public: ::rtl::Reference< SearchAndParseThread > m_rApplyThread; SvxPersonalizationTabPage( vcl::Window *pParent, const SfxItemSet &rSet ); - virtual ~SvxPersonalizationTabPage(); static SfxTabPage* Create( vcl::Window *pParent, const SfxItemSet *rSet ); diff --git a/cui/source/options/radiobtnbox.cxx b/cui/source/options/radiobtnbox.cxx index 7830cbe024f2..500617bedf28 100644 --- a/cui/source/options/radiobtnbox.cxx +++ b/cui/source/options/radiobtnbox.cxx @@ -33,10 +33,6 @@ SvxRadioButtonListBox::SvxRadioButtonListBox(SvSimpleTableContainer& rParent, Wi EnableCheckButton( new SvLBoxButtonData( this, true ) ); } -SvxRadioButtonListBox::~SvxRadioButtonListBox() -{ -} - void SvxRadioButtonListBox::SetTabs() { SvSimpleTable::SetTabs(); diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx index b046f218bbb6..64d81bc589a4 100644 --- a/cui/source/options/securityoptions.cxx +++ b/cui/source/options/securityoptions.cxx @@ -72,11 +72,6 @@ SecurityOptionsDialog::SecurityOptionsDialog(vcl::Window* pParent, SvtSecurityOp *get("lockblockuntrusted")); } -SecurityOptionsDialog::~SecurityOptionsDialog() -{ -} - - } // namespace svx diff --git a/cui/source/options/securityoptions.hxx b/cui/source/options/securityoptions.hxx index 614e3f72dfa3..4581ed7ff072 100644 --- a/cui/source/options/securityoptions.hxx +++ b/cui/source/options/securityoptions.hxx @@ -49,7 +49,6 @@ namespace svx public: SecurityOptionsDialog( vcl::Window* pParent, SvtSecurityOptions* pOptions ); - virtual ~SecurityOptionsDialog(); 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 42154b213a2f..75311ef88885 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -551,6 +551,11 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog( vcl::Window* pParent, const OUString } OfaTreeOptionsDialog::~OfaTreeOptionsDialog() +{ + dispose(); +} + +void OfaTreeOptionsDialog::dispose() { pCurrentPageEntry = NULL; SvTreeListEntry* pEntry = pTreeLB->First(); @@ -605,6 +610,7 @@ OfaTreeOptionsDialog::~OfaTreeOptionsDialog() } delete pColorPageItemSet; deleteGroupNames(); + SfxModalDialog::dispose(); } OptionsPageInfo* OfaTreeOptionsDialog::AddTabPage( @@ -2155,6 +2161,11 @@ ExtensionsTabPage::ExtensionsTabPage( } ExtensionsTabPage::~ExtensionsTabPage() +{ + dispose(); +} + +void ExtensionsTabPage::dispose() { Hide(); DeactivatePage(); @@ -2174,6 +2185,7 @@ ExtensionsTabPage::~ExtensionsTabPage() } m_xPage.clear(); } + TabPage::dispose(); } diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index 42fe55bf150e..9acfdafe5616 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -141,8 +141,14 @@ WebConnectionInfoDialog::WebConnectionInfoDialog(vcl::Window* pParent) } WebConnectionInfoDialog::~WebConnectionInfoDialog() +{ + dispose(); +} + +void WebConnectionInfoDialog::dispose() { delete m_pPasswordsLB; + ModalDialog::dispose(); } diff --git a/cui/source/options/webconninfo.hxx b/cui/source/options/webconninfo.hxx index 366bcfc31283..2cd37eb03f5e 100644 --- a/cui/source/options/webconninfo.hxx +++ b/cui/source/options/webconninfo.hxx @@ -64,6 +64,7 @@ namespace svx public: WebConnectionInfoDialog( vcl::Window* pParent ); virtual ~WebConnectionInfoDialog(); + virtual void dispose() SAL_OVERRIDE; }; diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 22b50889df06..1c5587ce3a33 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -249,8 +249,14 @@ AlignmentTabPage::AlignmentTabPage( vcl::Window* pParent, const SfxItemSet& rCor } AlignmentTabPage::~AlignmentTabPage() +{ + dispose(); +} + +void AlignmentTabPage::dispose() { delete m_pOrientHlp; + SfxTabPage::dispose(); } SfxTabPage* AlignmentTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index a24210275486..f808ef4b45fe 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -468,12 +468,18 @@ SvTreeListEntry* OfaSwAutoFmtOptionsPage::CreateEntry(OUString& rTxt, sal_uInt16 } OfaSwAutoFmtOptionsPage::~OfaSwAutoFmtOptionsPage() +{ + dispose(); +} + +void OfaSwAutoFmtOptionsPage::dispose() { delete static_cast(m_pCheckLB->GetUserData( REPLACE_BULLETS )); delete static_cast(m_pCheckLB->GetUserData( APPLY_NUMBERING )); delete static_cast(m_pCheckLB->GetUserData( MERGE_SINGLE_LINE_PARA )); delete pCheckButtonData; delete m_pCheckLB; + SfxTabPage::dispose(); } SfxTabPage* OfaSwAutoFmtOptionsPage::Create( vcl::Window* pParent, @@ -896,12 +902,18 @@ void OfaAutocorrReplacePage::Resize() } OfaAutocorrReplacePage::~OfaAutocorrReplacePage() +{ + dispose(); +} + +void OfaAutocorrReplacePage::dispose() { aDoubleStringTable.clear(); aChangesTable.clear(); delete pCompareClass; delete pCharClass; + SfxTabPage::dispose(); } SfxTabPage* OfaAutocorrReplacePage::Create( vcl::Window* pParent, const SfxItemSet* rSet) @@ -1399,9 +1411,15 @@ OfaAutocorrExceptPage::OfaAutocorrExceptPage(vcl::Window* pParent, const SfxItem } OfaAutocorrExceptPage::~OfaAutocorrExceptPage() +{ + dispose(); +} + +void OfaAutocorrExceptPage::dispose() { aStringsTable.clear(); delete pCompareClass; + SfxTabPage::dispose(); } SfxTabPage* OfaAutocorrExceptPage::Create( vcl::Window* pParent, @@ -1816,9 +1834,15 @@ OfaQuoteTabPage::OfaQuoteTabPage(vcl::Window* pParent, const SfxItemSet& rSet) } OfaQuoteTabPage::~OfaQuoteTabPage() +{ + dispose(); +} + +void OfaQuoteTabPage::dispose() { delete pCheckButtonData; delete m_pSwCheckLB; + SfxTabPage::dispose(); } SfxTabPage* OfaQuoteTabPage::Create( vcl::Window* pParent, @@ -2141,10 +2165,6 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage(vcl::Window* pParent, m_pCBCollect->SetToggleHdl(LINK(this, OfaAutoCompleteTabPage, CheckHdl)); } -OfaAutoCompleteTabPage::~OfaAutoCompleteTabPage() -{ -} - SfxTabPage* OfaAutoCompleteTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet) { @@ -2379,11 +2399,6 @@ OfaSmartTagOptionsTabPage::OfaSmartTagOptionsTabPage( vcl::Window* pParent, m_pSmartTagTypesLB->SetSelectHdl(LINK(this, OfaSmartTagOptionsTabPage, SelectHdl)); } -OfaSmartTagOptionsTabPage::~OfaSmartTagOptionsTabPage() -{ - -} - 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 7465f02d8bae..294530446418 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -183,6 +183,7 @@ public: BackgroundPreviewImpl(vcl::Window* pParent); void setBmp(bool bBmp); virtual ~BackgroundPreviewImpl(); + virtual void dispose() SAL_OVERRIDE; void NotifyChange( const Color& rColor ); void NotifyChange( const Bitmap* pBitmap ); @@ -229,8 +230,14 @@ void BackgroundPreviewImpl::setBmp(bool bBmp) BackgroundPreviewImpl::~BackgroundPreviewImpl() +{ + dispose(); +} + +void BackgroundPreviewImpl::dispose() { delete pBitmap; + vcl::Window::dispose(); } @@ -421,6 +428,11 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe SvxBackgroundTabPage::~SvxBackgroundTabPage() +{ + dispose(); +} + +void SvxBackgroundTabPage::dispose() { delete pPageImpl->pLoadIdle; delete pPageImpl; @@ -440,6 +452,7 @@ SvxBackgroundTabPage::~SvxBackgroundTabPage() delete pParaBck_Impl->pCharBrush; delete pParaBck_Impl; } + SvxTabPage::dispose(); } diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 8a3a29a6180c..9159dc6e977a 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -336,12 +336,6 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, const SfxItemSet& rCore -SvxBorderTabPage::~SvxBorderTabPage() -{ -} - - - SfxTabPage* SvxBorderTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 67c13dd69447..d3fc39713347 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -185,12 +185,6 @@ SvxCharBasePage::SvxCharBasePage(vcl::Window* pParent, const OString& rID, const -SvxCharBasePage::~SvxCharBasePage() -{ -} - - - void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) { m_pPreviewWin->SetFromItemSet( rSet, m_bPreviewBackgroundToCharacter ); @@ -374,8 +368,14 @@ SvxCharNamePage::SvxCharNamePage( vcl::Window* pParent, const SfxItemSet& rInSet SvxCharNamePage::~SvxCharNamePage() +{ + dispose(); +} + +void SvxCharNamePage::dispose() { delete m_pImpl; + SvxCharBasePage::dispose(); } @@ -1440,12 +1440,6 @@ void SvxCharEffectsPage::Initialize() } } -SvxCharEffectsPage::~SvxCharEffectsPage() -{ -} - - - void SvxCharEffectsPage::UpdatePreview_Impl() { SvxFont& rFont = GetPreviewFont(); @@ -2627,12 +2621,6 @@ void SvxCharPositionPage::Initialize() m_pScaleWidthMF->SetModifyHdl( LINK( this, SvxCharPositionPage, ScaleWidthModifyHdl_Impl ) ); } -SvxCharPositionPage::~SvxCharPositionPage() -{ -} - - - void SvxCharPositionPage::UpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ) { SetPrevFontEscapement( nProp, nEscProp, nEsc ); @@ -3321,12 +3309,6 @@ SvxCharTwoLinesPage::SvxCharTwoLinesPage(vcl::Window* pParent, const SfxItemSet& Initialize(); } -SvxCharTwoLinesPage::~SvxCharTwoLinesPage() -{ -} - - - void SvxCharTwoLinesPage::Initialize() { m_pTwoLinesBtn->Check( false ); diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx index 6b49e2aa0e83..a17148abd912 100644 --- a/cui/source/tabpages/connect.cxx +++ b/cui/source/tabpages/connect.cxx @@ -63,16 +63,6 @@ SvxConnectionDialog::SvxConnectionDialog( vcl::Window* pParent, const SfxItemSet SetText(CUI_RESSTR( RID_SVXSTR_CONNECTOR )); } -/************************************************************************* -|* -|* Dtor -|* -\************************************************************************/ - -SvxConnectionDialog::~SvxConnectionDialog() -{ -} - /************************************************************************* |* |* page for changing connectors @@ -141,16 +131,6 @@ SvxConnectionPage::SvxConnectionPage( vcl::Window* pWindow, const SfxItemSet& rI m_pLbType->SetSelectHdl( aLink ); } -/************************************************************************* -|* -|* Dtor -|* -\************************************************************************/ - -SvxConnectionPage::~SvxConnectionPage() -{ -} - /************************************************************************* |* |* reads passed Item-Set diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index eeac4d70eedf..fe48e241c93b 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -126,8 +126,14 @@ SvxGrfCropPage::SvxGrfCropPage ( vcl::Window *pParent, const SfxItemSet &rSet ) } SvxGrfCropPage::~SvxGrfCropPage() +{ + dispose(); +} + +void SvxGrfCropPage::dispose() { aTimer.Stop(); + SfxTabPage::dispose(); } SfxTabPage* SvxGrfCropPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 64d38b7e4ddf..43330b99c046 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -142,8 +142,14 @@ _SfxMacroTabPage::_SfxMacroTabPage(vcl::Window* pParent, const SfxItemSet& rAttr } _SfxMacroTabPage::~_SfxMacroTabPage() +{ + dispose(); +} + +void _SfxMacroTabPage::dispose() { DELETEZ( mpImpl ); + SfxTabPage::dispose(); } void _SfxMacroTabPage::AddEvent( const OUString & rEventName, sal_uInt16 nEventId ) diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index ea086be40fb3..f6b906d9a352 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -148,16 +148,6 @@ SvxMeasurePage::SvxMeasurePage( vcl::Window* pWindow, const SfxItemSet& rInAttrs m_pLbUnit->SetSelectHdl( aLink ); } -/************************************************************************* -|* -|* Dtor -|* -\************************************************************************/ - -SvxMeasurePage::~SvxMeasurePage() -{ -} - /************************************************************************* |* |* read the delivered Item-Set diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 04c8e6e18b38..f80c0d8c3881 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -281,9 +281,16 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage(vcl::Window* pParent, } SvxNumberFormatTabPage::~SvxNumberFormatTabPage() +{ + dispose(); +} + + +void SvxNumberFormatTabPage::dispose() { delete pNumFmtShell; delete pNumItem; + SfxTabPage::dispose(); } void SvxNumberFormatTabPage::Init_Impl() diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 921e7db53333..7ffcd79d9592 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -218,9 +218,15 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(vcl::Window* pParent, } SvxSingleNumPickTabPage::~SvxSingleNumPickTabPage() +{ + dispose(); +} + +void SvxSingleNumPickTabPage::dispose() { delete pActNum; delete pSaveNum; + SfxTabPage::dispose(); } SfxTabPage* SvxSingleNumPickTabPage::Create( vcl::Window* pParent, @@ -379,9 +385,15 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(vcl::Window* pParent, } SvxBulletPickTabPage::~SvxBulletPickTabPage() +{ + dispose(); +} + +void SvxBulletPickTabPage::dispose() { delete pActNum; delete pSaveNum; + SfxTabPage::dispose(); } SfxTabPage* SvxBulletPickTabPage::Create( vcl::Window* pParent, @@ -576,9 +588,15 @@ SvxNumPickTabPage::SvxNumPickTabPage(vcl::Window* pParent, } SvxNumPickTabPage::~SvxNumPickTabPage() +{ + dispose(); +} + +void SvxNumPickTabPage::dispose() { delete pActNum; delete pSaveNum; + SfxTabPage::dispose(); } SfxTabPage* SvxNumPickTabPage::Create( vcl::Window* pParent, @@ -817,9 +835,15 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(vcl::Window* pParent, } SvxBitmapPickTabPage::~SvxBitmapPickTabPage() +{ + dispose(); +} + +void SvxBitmapPickTabPage::dispose() { delete pActNum; delete pSaveNum; + SfxTabPage::dispose(); } SfxTabPage* SvxBitmapPickTabPage::Create( vcl::Window* pParent, @@ -1124,10 +1148,16 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(vcl::Window* pParent, } SvxNumOptionsTabPage::~SvxNumOptionsTabPage() +{ + dispose(); +} + +void SvxNumOptionsTabPage::dispose() { delete m_pBitmapMB->GetPopupMenu()->GetPopupMenu(m_nGalleryId); delete pActNum; delete pSaveNum; + SfxTabPage::dispose(); } void SvxNumOptionsTabPage::SetMetric(FieldUnit eMetric) @@ -2682,9 +2712,15 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(vcl::Window* pParent, } SvxNumPositionTabPage::~SvxNumPositionTabPage() +{ + dispose(); +} + +void SvxNumPositionTabPage::dispose() { delete pActNum; delete pSaveNum; + SfxTabPage::dispose(); } /*-------------------------------------------------------*/ diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index c69f73205163..13f87f7494b1 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -365,11 +365,17 @@ SvxPageDescPage::SvxPageDescPage( vcl::Window* pParent, const SfxItemSet& rAttr SvxPageDescPage::~SvxPageDescPage() +{ + dispose(); +} + +void SvxPageDescPage::dispose() { if(mbDelPrinter) { delete mpDefPrinter; } + SfxTabPage::dispose(); } diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 7d1e2792d614..d80ed2f1b1a6 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -654,10 +654,6 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage( vcl::Window* pParent, const Sfx setPreviewsToSamePlace(pParent, this); } -SvxStdParagraphTabPage::~SvxStdParagraphTabPage() -{ -} - void SvxStdParagraphTabPage::EnableNegativeMode() { m_pLeftIndent->SetMin(-9999); @@ -1016,10 +1012,6 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( vcl::Window* pParent, const SfxItemSet setPreviewsToSamePlace(pParent, this); } -SvxParaAlignTabPage::~SvxParaAlignTabPage() -{ -} - int SvxParaAlignTabPage::DeactivatePage( SfxItemSet* _pSet ) { if ( _pSet ) @@ -1899,10 +1891,6 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( vcl::Window* pParent, const SfxI } } -SvxExtParagraphTabPage::~SvxExtParagraphTabPage() -{ -} - IMPL_LINK_NOARG(SvxExtParagraphTabPage, PageBreakHdl_Impl) { switch ( m_pPageBreakBox->GetState() ) @@ -2105,10 +2093,6 @@ SvxAsianTabPage::SvxAsianTabPage( vcl::Window* pParent, const SfxItemSet& rSet ) } -SvxAsianTabPage::~SvxAsianTabPage() -{ -} - 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 b1fb6102f323..305b877aad1b 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -689,10 +689,6 @@ void SvxSwPosSizeTabPage::setOptimalRelWidth() m_pHoriLB->Clear(); } -SvxSwPosSizeTabPage::~SvxSwPosSizeTabPage() -{ -} - SfxTabPage* SvxSwPosSizeTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet) { return new SvxSwPosSizeTabPage(pParent, *rSet); diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx index d856f6b91fc0..56e54c8bc07c 100644 --- a/cui/source/tabpages/tabarea.cxx +++ b/cui/source/tabpages/tabarea.cxx @@ -96,10 +96,6 @@ SvxAreaTabDialog::SvxAreaTabDialog rBtnCancel.SetClickHdl( LINK( this, SvxAreaTabDialog, CancelHdlImpl ) ); } -SvxAreaTabDialog::~SvxAreaTabDialog() -{ -} - void SvxAreaTabDialog::SavePalettes() { SfxObjectShell* pShell = SfxObjectShell::Current(); diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx index be818ba57f02..f9ee914225b9 100644 --- a/cui/source/tabpages/tabline.cxx +++ b/cui/source/tabpages/tabline.cxx @@ -104,12 +104,6 @@ SvxLineTabDialog::SvxLineTabDialog -SvxLineTabDialog::~SvxLineTabDialog() -{ -} - - - void SvxLineTabDialog::SavePalettes() { SfxObjectShell* pShell = SfxObjectShell::Current(); diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index 7772da14c25d..6167f0db6d32 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -186,13 +186,6 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( vcl::Window* pParent, const SfxItemSet } - -SvxTabulatorTabPage::~SvxTabulatorTabPage() -{ -} - - - bool SvxTabulatorTabPage::FillItemSet( SfxItemSet* rSet ) { bool bModified = false; diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index 72626e953100..23f9d9980a37 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -122,16 +122,6 @@ SvxTextAnimationPage::SvxTextAnimationPage( vcl::Window* pWindow, const SfxItemS m_pBtnDown->SetClickHdl( aLink ); } -/************************************************************************* -|* -|* Dtor -|* -\************************************************************************/ - -SvxTextAnimationPage::~SvxTextAnimationPage() -{ -} - /************************************************************************* |* |* reads the passed item set diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index eae53cb16219..7805f4cfc3cf 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -96,15 +96,6 @@ SvxTextAttrPage::SvxTextAttrPage(vcl::Window* pWindow, const SfxItemSet& rInAttr m_pTsbFullWidth->SetClickHdl(LINK( this, SvxTextAttrPage, ClickFullWidthHdl_Impl ) ); } -/************************************************************************* -|* -|* Dtor -|* -\************************************************************************/ -SvxTextAttrPage::~SvxTextAttrPage() -{ -} - /************************************************************************* |* |* reads the passed item set diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 54eecc0230a1..cdde799b2529 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -121,8 +121,14 @@ SvxBitmapTabPage::SvxBitmapTabPage( vcl::Window* pParent, const SfxItemSet& rIn } SvxBitmapTabPage::~SvxBitmapTabPage() +{ + dispose(); +} + +void SvxBitmapTabPage::dispose() { delete m_pBitmapCtl; + SvxTabPage::dispose(); } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 8bc12c7aaf80..336a2422798b 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -396,8 +396,14 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttr } SvxColorTabPage::~SvxColorTabPage() +{ + dispose(); +} + +void SvxColorTabPage::dispose() { delete pShadow; + SfxTabPage::dispose(); } diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index ce3668f7a89f..eb0cf976aea6 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -229,6 +229,11 @@ void SvxLineTabPage::ShowSymbolControls(bool bOn) } SvxLineTabPage::~SvxLineTabPage() +{ + dispose(); +} + +void SvxLineTabPage::dispose() { // Symbols on a line (e.g. StarCharts), dtor new! @@ -243,7 +248,9 @@ SvxLineTabPage::~SvxLineTabPage() delete pInfo->pBrushItem; delete pInfo; } + SvxTabPage::dispose(); } + void SvxLineTabPage::Construct() { // Color chart diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 0c2ed94c4482..3bbe56877361 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -114,12 +114,6 @@ void SvxLineEndDefTabPage::Resize() -SvxLineEndDefTabPage::~SvxLineEndDefTabPage() -{ -} - - - void SvxLineEndDefTabPage::Construct() { m_pLbLineEnds->Fill( pLineEndList ); diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 5de0107e010a..ce21ccf236eb 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -116,12 +116,6 @@ SvxTransformTabDialog::SvxTransformTabDialog( vcl::Window* pParent, const SfxIte -SvxTransformTabDialog::~SvxTransformTabDialog() -{ -} - - - void SvxTransformTabDialog::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) { if (nId==nPosSize) -- cgit