diff options
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 16 | ||||
-rw-r--r-- | cui/source/dialogs/colorpicker.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/cuifmsearch.cxx | 9 | ||||
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/dialogs/cuihyperdlg.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/dlgname.cxx | 1 | ||||
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.cxx | 16 | ||||
-rw-r--r-- | cui/source/dialogs/hldocntp.cxx | 8 | ||||
-rw-r--r-- | cui/source/dialogs/hltpbase.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/iconcdlg.cxx | 18 | ||||
-rw-r--r-- | cui/source/dialogs/insdlg.cxx | 3 | ||||
-rw-r--r-- | cui/source/dialogs/multipat.cxx | 13 | ||||
-rw-r--r-- | cui/source/dialogs/srchxtra.cxx | 1 |
13 files changed, 56 insertions, 39 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 2d130a525741..5c81f1c02206 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -251,19 +251,19 @@ SpellDialog::~SpellDialog() void SpellDialog::dispose() { - // save possibly modified user-dictionaries - Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); - if (xDicList.is()) + if (pImpl) { - SaveDictionaries( xDicList ); - } + // save possibly modified user-dictionaries + Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); + if (xDicList.is()) + SaveDictionaries( xDicList ); - delete pImpl; + delete pImpl; + pImpl = NULL; + } SfxModelessDialog::dispose(); } - - void SpellDialog::Init_Impl() { // initialize handler diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 76619dab9fcd..7edff10bf399 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -366,6 +366,7 @@ ColorFieldControl::~ColorFieldControl() void ColorFieldControl::dispose() { delete mpBitmap; + mpBitmap = NULL; Control::dispose(); } @@ -758,6 +759,7 @@ ColorSliderControl::~ColorSliderControl() void ColorSliderControl::dispose() { delete mpBitmap; + mpBitmap = NULL; Control::dispose(); } diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index d651f0e4c89b..c8bbf0abab69 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -170,13 +170,12 @@ void FmSearchDialog::dispose() SaveParams(); - if (m_pConfig) - { - delete m_pConfig; - m_pConfig = NULL; - } + delete m_pConfig; + m_pConfig = NULL; delete m_pSearchEngine; + m_pSearchEngine = NULL; + ModalDialog::dispose(); } diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 27337db42052..ac330ae95173 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -767,11 +767,11 @@ void TPGalleryThemeProperties::dispose() for ( size_t i = 0, n = aFilterEntryList.size(); i < n; ++i ) { delete aFilterEntryList[ i ]; } + aFilterEntryList.clear(); + SfxTabPage::dispose(); } - - SfxTabPage* TPGalleryThemeProperties::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { return new TPGalleryThemeProperties( pParent, *rSet ); diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index bb5463e7d655..99f8dadd6d60 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -167,6 +167,8 @@ void SvxHpLinkDlg::dispose() aViewOpt.Delete(); delete mpItemSet; + mpItemSet = NULL; + IconChoiceDialog::dispose(); } diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index 1f6c66310725..4a49494243d1 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -144,6 +144,7 @@ SvxMessDialog::~SvxMessDialog() void SvxMessDialog::dispose() { delete pImage; + pImage = NULL; ModalDialog::dispose(); } diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 46136a9e66ec..6d8e10123d7f 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -1139,17 +1139,17 @@ namespace svx void HangulHanjaOptionsDialog::dispose() { - SvTreeListEntry* pEntry = m_pDictsLB->First(); + SvTreeListEntry* pEntry = m_pDictsLB->First(); while( pEntry ) { - OUString const * pDel = static_cast<OUString const *>(pEntry->GetUserData()); - if( pDel ) - delete pDel; + delete static_cast<OUString const *>(pEntry->GetUserData()); + pEntry->SetUserData(NULL); pEntry = m_pDictsLB->Next( pEntry ); } - if( m_pCheckButtonData ) - delete m_pCheckButtonData; + delete m_pCheckButtonData; + m_pCheckButtonData = NULL; + ModalDialog::dispose(); } @@ -1785,8 +1785,8 @@ namespace svx void HangulHanjaEditDictDialog::dispose() { - if( m_pSuggestions ) - delete m_pSuggestions; + delete m_pSuggestions; + m_pSuggestions = NULL; ModalDialog::dispose(); } diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index f1c790045a1b..ad1e7fafc64b 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -134,11 +134,11 @@ SvxHyperlinkNewDocTp::~SvxHyperlinkNewDocTp () void SvxHyperlinkNewDocTp::dispose() { - for ( sal_uInt16 n=0; n<m_pLbDocTypes->GetEntryCount(); n++ ) + if (m_pLbDocTypes) { - DocumentTypeData* pTypeData = static_cast<DocumentTypeData*>( - m_pLbDocTypes->GetEntryData ( n )); - delete pTypeData; + for ( sal_uInt16 n=0; n<m_pLbDocTypes->GetEntryCount(); n++ ) + delete static_cast<DocumentTypeData*>(m_pLbDocTypes->GetEntryData ( n )); + m_pLbDocTypes = NULL; } SvxHyperlinkTabPageBase::dispose(); } diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 62fd0465fa5a..804442321f1d 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -115,6 +115,8 @@ void SvxHyperlinkTabPageBase::dispose() maTimer.Stop(); delete mpMarkWnd; + mpMarkWnd = NULL; + IconChoicePage::dispose(); } diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 111499ef5c5c..0a1c70e7d70b 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -236,18 +236,24 @@ void IconChoiceDialog::dispose() } delete pData; } + maPageList.clear(); - // remove Userdata from Icons - for ( sal_uLong i=0; i < m_pIconCtrl->GetEntryCount(); i++) + if (m_pIconCtrl) { - SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry ( i ); - sal_uInt16* pUserData = static_cast<sal_uInt16*>(pEntry->GetUserData()); - delete pUserData; + // remove Userdata from Icons + for ( sal_uLong i=0; i < m_pIconCtrl->GetEntryCount(); i++) + { + SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry ( i ); + delete static_cast<sal_uInt16*>(pEntry->GetUserData()); + } + m_pIconCtrl = NULL; } - delete pRanges; + pRanges = NULL; delete pOutSet; + pOutSet = NULL; + ModalDialog::dispose(); } diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index db360449bd41..4131c40c5c8a 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -401,11 +401,10 @@ SvInsertPlugInDialog::~SvInsertPlugInDialog() void SvInsertPlugInDialog::dispose() { delete m_pURL; + m_pURL = NULL; InsertObjectDialog_Impl::dispose(); } - - static void Plugin_ImplFillCommandSequence( const OUString& aCommands, uno::Sequence< beans::PropertyValue >& aCommandSequence ) { sal_Int32 nEaten; diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 6b4b4b7733c4..ebb8fcdca031 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -237,6 +237,8 @@ void SvxMultiPathDialog::dispose() } delete m_pRadioLB; + m_pRadioLB = NULL; + ModalDialog::dispose(); } @@ -247,10 +249,13 @@ SvxPathSelectDialog::~SvxPathSelectDialog() void SvxPathSelectDialog::dispose() { - sal_uInt16 nPos = m_pPathLB->GetEntryCount(); - while ( nPos-- ) - delete static_cast<OUString*>(m_pPathLB->GetEntryData(nPos)); - + if (m_pPathLB) + { + sal_uInt16 nPos = m_pPathLB->GetEntryCount(); + while ( nPos-- ) + delete static_cast<OUString*>(m_pPathLB->GetEntryData(nPos)); + m_pPathLB = NULL; + } ModalDialog::dispose(); } diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index da6a1e6d99a9..bb797e3d4dd8 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -70,6 +70,7 @@ SvxSearchFormatDialog::~SvxSearchFormatDialog() void SvxSearchFormatDialog::dispose() { delete m_pFontList; + m_pFontList = NULL; SfxTabDialog::dispose(); } |