summaryrefslogtreecommitdiff
path: root/cui/source/options
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/options')
-rw-r--r--cui/source/options/certpath.cxx1
-rw-r--r--cui/source/options/dbregister.cxx1
-rw-r--r--cui/source/options/fontsubs.cxx3
-rw-r--r--cui/source/options/optaccessibility.cxx1
-rw-r--r--cui/source/options/optasian.cxx1
-rw-r--r--cui/source/options/optchart.cxx13
-rw-r--r--cui/source/options/optcolor.cxx32
-rw-r--r--cui/source/options/optfltr.cxx2
-rw-r--r--cui/source/options/optgdlg.cxx4
-rw-r--r--cui/source/options/optinet2.cxx5
-rw-r--r--cui/source/options/optjava.cxx16
-rw-r--r--cui/source/options/optlingu.cxx6
-rw-r--r--cui/source/options/optpath.cxx13
-rw-r--r--cui/source/options/optsave.cxx3
-rw-r--r--cui/source/options/treeopt.cxx6
-rw-r--r--cui/source/options/webconninfo.cxx2
16 files changed, 73 insertions, 36 deletions
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index 0cfb700e66aa..8e4776361897 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -157,6 +157,7 @@ void CertPathDialog::dispose()
pEntry = m_pCertPathList->Next( pEntry );
}
delete m_pCertPathList;
+ m_pCertPathList = NULL;
ModalDialog::dispose();
}
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index eb2364e981e4..de08fa07c5e0 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -171,6 +171,7 @@ void DbRegistrationOptionsPage::dispose()
for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i )
delete static_cast< DatabaseRegistration* >( pPathBox->GetEntry(i)->GetUserData() );
delete pPathBox;
+ pPathBox = NULL;
SfxTabPage::dispose();
}
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index c135ab289618..098855ae032e 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -144,8 +144,11 @@ SvxFontSubstTabPage::~SvxFontSubstTabPage()
void SvxFontSubstTabPage::dispose()
{
delete pCheckButtonData;
+ pCheckButtonData = NULL;
delete pConfig;
+ pConfig = NULL;
delete m_pCheckLB;
+ m_pCheckLB = NULL;
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx
index 8deb9e7cccc0..f09b19c5eafa 100644
--- a/cui/source/options/optaccessibility.cxx
+++ b/cui/source/options/optaccessibility.cxx
@@ -64,6 +64,7 @@ SvxAccessibilityOptionsTabPage::~SvxAccessibilityOptionsTabPage()
void SvxAccessibilityOptionsTabPage::dispose()
{
delete m_pImpl;
+ m_pImpl = NULL;
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index f8658bdd8673..0f9bab237d61 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -157,6 +157,7 @@ SvxAsianLayoutPage::~SvxAsianLayoutPage()
void SvxAsianLayoutPage::dispose()
{
delete pImpl;
+ pImpl = NULL;
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 8f8fd9770bac..8005483464f1 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -89,11 +89,16 @@ SvxDefaultColorOptPage::~SvxDefaultColorOptPage()
void SvxDefaultColorOptPage::dispose()
{
// save changes
- pChartOptions->SetDefaultColors( pColorConfig->GetColorList() );
- pChartOptions->Commit();
+ if (pChartOptions)
+ {
+ pChartOptions->SetDefaultColors( pColorConfig->GetColorList() );
+ pChartOptions->Commit();
- delete pColorConfig;
- delete pChartOptions;
+ delete pColorConfig;
+ pColorConfig = NULL;
+ delete pChartOptions;
+ pChartOptions = NULL;
+ }
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index c96cb625fb4f..b18abccdec0f 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -1077,23 +1077,29 @@ SvxColorOptionsTabPage::~SvxColorOptionsTabPage()
void SvxColorOptionsTabPage::dispose()
{
- //when the dialog is cancelled but the color scheme ListBox has been changed these
- //changes need to be undone
- if(!bFillItemSetCalled && m_pColorSchemeLB->IsValueChangedFromSaved())
+ if (pColorConfig)
{
- OUString sOldScheme = m_pColorSchemeLB->GetEntry(m_pColorSchemeLB->GetSavedValue());
- if(!sOldScheme.isEmpty())
+ //when the dialog is cancelled but the color scheme ListBox has been changed these
+ //changes need to be undone
+ if(!bFillItemSetCalled && m_pColorSchemeLB->IsValueChangedFromSaved())
{
- pColorConfig->SetCurrentSchemeName(sOldScheme);
- pExtColorConfig->SetCurrentSchemeName(sOldScheme);
+ OUString sOldScheme = m_pColorSchemeLB->GetEntry(m_pColorSchemeLB->GetSavedValue());
+ if(!sOldScheme.isEmpty())
+ {
+ pColorConfig->SetCurrentSchemeName(sOldScheme);
+ pExtColorConfig->SetCurrentSchemeName(sOldScheme);
+ }
}
+ pColorConfig->ClearModified();
+ pColorConfig->EnableBroadcast();
+ delete pColorConfig;
+ pColorConfig = NULL;
+
+ pExtColorConfig->ClearModified();
+ pExtColorConfig->EnableBroadcast();
+ delete pExtColorConfig;
+ pExtColorConfig = NULL;
}
- pColorConfig->ClearModified();
- pColorConfig->EnableBroadcast();
- delete pColorConfig;
- pExtColorConfig->ClearModified();
- pExtColorConfig->EnableBroadcast();
- delete pExtColorConfig;
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 59262aa314c1..6a6d7116d70b 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -165,7 +165,9 @@ OfaMSFilterTabPage2::~OfaMSFilterTabPage2()
void OfaMSFilterTabPage2::dispose()
{
delete pCheckButtonData;
+ pCheckButtonData = NULL;
delete m_pCheckLB;
+ m_pCheckLB = NULL;
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 09c74e5a7417..3ab3ae842707 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -688,8 +688,11 @@ OfaViewTabPage::~OfaViewTabPage()
void OfaViewTabPage::dispose()
{
delete mpDrawinglayerOpt;
+ mpDrawinglayerOpt = NULL;
delete pCanvasSettings;
+ pCanvasSettings = NULL;
delete pAppearanceCfg;
+ pAppearanceCfg = NULL;
SfxTabPage::dispose();
}
@@ -1213,6 +1216,7 @@ OfaLanguagesTabPage::~OfaLanguagesTabPage()
void OfaLanguagesTabPage::dispose()
{
delete pLangConfig;
+ pLangConfig = NULL;
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 04333b7b8ef6..a9063ece06d4 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -628,9 +628,11 @@ SvxSecurityTabPage::~SvxSecurityTabPage()
void SvxSecurityTabPage::dispose()
{
delete mpCertPathDlg;
-
+ mpCertPathDlg = NULL;
delete mpSecOptions;
+ mpSecOptions = NULL;
delete mpSecOptDlg;
+ mpSecOptDlg = NULL;
SfxTabPage::dispose();
}
@@ -980,6 +982,7 @@ SvxEMailTabPage::~SvxEMailTabPage()
void SvxEMailTabPage::dispose()
{
delete pImpl;
+ pImpl = NULL;
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 8843f10df485..5be1b1fa39fe 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -208,8 +208,11 @@ SvxJavaOptionsPage::~SvxJavaOptionsPage()
void SvxJavaOptionsPage::dispose()
{
delete m_pJavaList;
+ m_pJavaList = NULL;
delete m_pParamDlg;
+ m_pParamDlg = NULL;
delete m_pPathDlg;
+ m_pPathDlg = NULL;
ClearJavaInfo();
#if HAVE_FEATURE_JAVA
std::vector< JavaInfo* >::iterator pIter;
@@ -218,6 +221,7 @@ void SvxJavaOptionsPage::dispose()
JavaInfo* pInfo = *pIter;
jfw_freeJavaInfo( pInfo );
}
+ m_aAddedInfos.clear();
jfw_unlock();
#endif
@@ -944,14 +948,16 @@ SvxJavaClassPathDlg::~SvxJavaClassPathDlg()
void SvxJavaClassPathDlg::dispose()
{
- sal_Int32 i, nCount = m_pPathList->GetEntryCount();
- for ( i = 0; i < nCount; ++i )
- delete static_cast< OUString* >( m_pPathList->GetEntryData(i) );
+ if (m_pPathList)
+ {
+ sal_Int32 i, nCount = m_pPathList->GetEntryCount();
+ for ( i = 0; i < nCount; ++i )
+ delete static_cast< OUString* >( m_pPathList->GetEntryData(i) );
+ m_pPathList = NULL;
+ }
ModalDialog::dispose();
}
-
-
IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl)
{
sfx2::FileDialogHelper aDlg( TemplateDescription::FILEOPEN_SIMPLE, 0 );
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 393f6f7625ec..8e7929e0334f 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1127,8 +1127,8 @@ SvxLinguTabPage::~SvxLinguTabPage()
void SvxLinguTabPage::dispose()
{
- if (pLinguData)
- delete pLinguData;
+ delete pLinguData;
+ pLinguData = NULL;
SfxTabPage::dispose();
}
@@ -1904,10 +1904,10 @@ SvxEditModulesDlg::~SvxEditModulesDlg()
void SvxEditModulesDlg::dispose()
{
delete pDefaultLinguData;
+ pDefaultLinguData = NULL;
ModalDialog::dispose();
}
-
SvTreeListEntry* SvxEditModulesDlg::CreateEntry( OUString& rTxt, sal_uInt16 nCol )
{
SvTreeListEntry* pEntry = new SvTreeListEntry;
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 8cefe813a072..94de402f231c 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -252,15 +252,18 @@ SvxPathTabPage::~SvxPathTabPage()
void SvxPathTabPage::dispose()
{
- for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i )
- delete static_cast<PathUserData_Impl*>(pPathBox->GetEntry(i)->GetUserData());
- delete pPathBox;
+ if ( pPathBox )
+ {
+ for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i )
+ delete static_cast<PathUserData_Impl*>(pPathBox->GetEntry(i)->GetUserData());
+ delete pPathBox;
+ pPathBox = NULL;
+ }
delete pImpl;
+ pImpl = NULL;
SfxTabPage::dispose();
}
-
-
SfxTabPage* SvxPathTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet )
{
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 12fac31eb495..00d3aff38e77 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -205,11 +205,10 @@ SfxSaveTabPage::~SfxSaveTabPage()
void SvxSaveTabPage::dispose()
{
delete pImpl;
+ pImpl = NULL;
SfxTabPage::dispose();
}
-
-
SfxTabPage* SfxSaveTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet )
{
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 75311ef88885..095b6fc3b6c8 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -558,7 +558,7 @@ OfaTreeOptionsDialog::~OfaTreeOptionsDialog()
void OfaTreeOptionsDialog::dispose()
{
pCurrentPageEntry = NULL;
- SvTreeListEntry* pEntry = pTreeLB->First();
+ SvTreeListEntry* pEntry = pTreeLB ? pTreeLB->First() : NULL;
// first children
while(pEntry)
{
@@ -596,7 +596,7 @@ void OfaTreeOptionsDialog::dispose()
}
// and parents
- pEntry = pTreeLB->First();
+ pEntry = pTreeLB ? pTreeLB->First() : NULL;
while(pEntry)
{
if(!pTreeLB->GetParent(pEntry))
@@ -609,7 +609,9 @@ void OfaTreeOptionsDialog::dispose()
pEntry = pTreeLB->Next(pEntry);
}
delete pColorPageItemSet;
+ pColorPageItemSet = NULL;
deleteGroupNames();
+ pTreeLB = NULL;
SfxModalDialog::dispose();
}
diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx
index 9acfdafe5616..6628b18d4fb5 100644
--- a/cui/source/options/webconninfo.cxx
+++ b/cui/source/options/webconninfo.cxx
@@ -148,10 +148,10 @@ WebConnectionInfoDialog::~WebConnectionInfoDialog()
void WebConnectionInfoDialog::dispose()
{
delete m_pPasswordsLB;
+ m_pPasswordsLB = NULL;
ModalDialog::dispose();
}
-
IMPL_LINK( WebConnectionInfoDialog, HeaderBarClickedHdl, SvSimpleTable*, pTable )
{
m_pPasswordsLB->Resort( NULL == pTable );