summaryrefslogtreecommitdiff
path: root/cui/source/options
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/options')
-rw-r--r--cui/source/options/certpath.cxx6
-rw-r--r--cui/source/options/certpath.hxx8
-rw-r--r--cui/source/options/connpooloptions.cxx17
-rw-r--r--cui/source/options/connpooloptions.hxx18
-rw-r--r--cui/source/options/cuisrchdlg.cxx11
-rw-r--r--cui/source/options/dbregister.cxx7
-rw-r--r--cui/source/options/doclinkdialog.cxx14
-rw-r--r--cui/source/options/doclinkdialog.hxx10
-rw-r--r--cui/source/options/fontsubs.cxx12
-rw-r--r--cui/source/options/fontsubs.hxx24
-rw-r--r--cui/source/options/optaboutconfig.cxx26
-rw-r--r--cui/source/options/optaboutconfig.hxx16
-rw-r--r--cui/source/options/optaccessibility.cxx9
-rw-r--r--cui/source/options/optaccessibility.hxx18
-rw-r--r--cui/source/options/optasian.cxx13
-rw-r--r--cui/source/options/optbasic.cxx16
-rw-r--r--cui/source/options/optbasic.hxx14
-rw-r--r--cui/source/options/optchart.cxx5
-rw-r--r--cui/source/options/optchart.hxx10
-rw-r--r--cui/source/options/optcolor.cxx61
-rw-r--r--cui/source/options/optcolor.hxx8
-rw-r--r--cui/source/options/optctl.cxx16
-rw-r--r--cui/source/options/optctl.hxx14
-rw-r--r--cui/source/options/optdict.cxx31
-rw-r--r--cui/source/options/optfltr.cxx23
-rw-r--r--cui/source/options/optfltr.hxx22
-rw-r--r--cui/source/options/optgdlg.cxx54
-rw-r--r--cui/source/options/optgdlg.hxx92
-rw-r--r--cui/source/options/optgenrl.cxx14
-rw-r--r--cui/source/options/opthtml.cxx26
-rw-r--r--cui/source/options/opthtml.hxx34
-rw-r--r--cui/source/options/optinet2.cxx49
-rw-r--r--cui/source/options/optinet2.hxx72
-rw-r--r--cui/source/options/optjava.cxx35
-rw-r--r--cui/source/options/optjava.hxx44
-rw-r--r--cui/source/options/optjsearch.cxx28
-rw-r--r--cui/source/options/optjsearch.hxx42
-rw-r--r--cui/source/options/optlingu.cxx35
-rw-r--r--cui/source/options/optmemory.cxx17
-rw-r--r--cui/source/options/optmemory.hxx16
-rw-r--r--cui/source/options/optopencl.cxx49
-rw-r--r--cui/source/options/optopencl.hxx41
-rw-r--r--cui/source/options/optpath.cxx6
-rw-r--r--cui/source/options/optsave.cxx17
-rw-r--r--cui/source/options/optsave.hxx38
-rw-r--r--cui/source/options/optupdt.cxx19
-rw-r--r--cui/source/options/optupdt.hxx22
-rw-r--r--cui/source/options/personalization.cxx39
-rw-r--r--cui/source/options/personalization.hxx36
-rw-r--r--cui/source/options/securityoptions.cxx18
-rw-r--r--cui/source/options/securityoptions.hxx18
-rw-r--r--cui/source/options/treeopt.cxx21
-rw-r--r--cui/source/options/webconninfo.cxx6
-rw-r--r--cui/source/options/webconninfo.hxx8
54 files changed, 955 insertions, 370 deletions
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index 8e4776361897..55b85df456fa 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -156,8 +156,10 @@ void CertPathDialog::dispose()
delete pCertPath;
pEntry = m_pCertPathList->Next( pEntry );
}
- delete m_pCertPathList;
- m_pCertPathList = NULL;
+ m_pCertPathListContainer.clear();
+ m_pCertPathList.clear();
+ m_pAddBtn.clear();
+ m_pOKBtn.clear();
ModalDialog::dispose();
}
diff --git a/cui/source/options/certpath.hxx b/cui/source/options/certpath.hxx
index 1add8ea14c1f..29a3e1aa45fb 100644
--- a/cui/source/options/certpath.hxx
+++ b/cui/source/options/certpath.hxx
@@ -19,10 +19,10 @@
class CertPathDialog : public ModalDialog
{
private:
- SvSimpleTableContainer* m_pCertPathListContainer;
- svx::SvxRadioButtonListBox* m_pCertPathList;
- PushButton* m_pAddBtn;
- OKButton* m_pOKBtn;
+ VclPtr<SvSimpleTableContainer> m_pCertPathListContainer;
+ VclPtr<svx::SvxRadioButtonListBox> m_pCertPathList;
+ VclPtr<PushButton> m_pAddBtn;
+ VclPtr<OKButton> m_pOKBtn;
OUString m_sAddDialogText;
OUString m_sManual;
diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx
index 3d432698e0fc..ecb996322bee 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -325,6 +325,23 @@ namespace offapp
m_pDriverList->SetRowChangeHandler( LINK(this, ConnectionPoolOptionsPage, OnDriverRowChanged) );
}
+ ConnectionPoolOptionsPage::~ConnectionPoolOptionsPage()
+ {
+ dispose();
+ }
+
+ void ConnectionPoolOptionsPage::dispose()
+ {
+ m_pEnablePooling.clear();
+ m_pDriversLabel.clear();
+ m_pDriverList.clear();
+ m_pDriverLabel.clear();
+ m_pDriver.clear();
+ m_pDriverPoolingEnabled.clear();
+ m_pTimeoutLabel.clear();
+ m_pTimeout.clear();
+ SfxTabPage::dispose();
+ }
SfxTabPage* ConnectionPoolOptionsPage::Create(vcl::Window* _pParent, const SfxItemSet* _rAttrSet)
{
diff --git a/cui/source/options/connpooloptions.hxx b/cui/source/options/connpooloptions.hxx
index 868c42702a16..8650d121ce16 100644
--- a/cui/source/options/connpooloptions.hxx
+++ b/cui/source/options/connpooloptions.hxx
@@ -38,19 +38,21 @@ namespace offapp
using TabPage::ActivatePage;
protected:
- CheckBox* m_pEnablePooling;
- FixedText* m_pDriversLabel;
- DriverListControl* m_pDriverList;
- FixedText* m_pDriverLabel;
- FixedText* m_pDriver;
- CheckBox* m_pDriverPoolingEnabled;
- FixedText* m_pTimeoutLabel;
- NumericField* m_pTimeout;
+ VclPtr<CheckBox> m_pEnablePooling;
+ VclPtr<FixedText> m_pDriversLabel;
+ VclPtr<DriverListControl> m_pDriverList;
+ VclPtr<FixedText> m_pDriverLabel;
+ VclPtr<FixedText> m_pDriver;
+ VclPtr<CheckBox> m_pDriverPoolingEnabled;
+ VclPtr<FixedText> m_pTimeoutLabel;
+ VclPtr<NumericField> m_pTimeout;
protected:
ConnectionPoolOptionsPage(vcl::Window* _pParent, const SfxItemSet& _rAttrSet);
public:
+ virtual ~ConnectionPoolOptionsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* _pParent, const SfxItemSet* _rAttrSet);
protected:
diff --git a/cui/source/options/cuisrchdlg.cxx b/cui/source/options/cuisrchdlg.cxx
index a7041604683b..a911a1eaceee 100644
--- a/cui/source/options/cuisrchdlg.cxx
+++ b/cui/source/options/cuisrchdlg.cxx
@@ -60,6 +60,17 @@ SvxJSearchOptionsDialog::SvxJSearchOptionsDialog(vcl::Window *pParent,
pPage->EnableSaveOptions(false);
}
+SvxJSearchOptionsDialog::~SvxJSearchOptionsDialog()
+{
+ dispose();
+}
+
+void SvxJSearchOptionsDialog::dispose()
+{
+ pPage.clear();
+ SfxSingleTabDialog::dispose();
+}
+
void SvxJSearchOptionsDialog::Activate()
{
pPage->SetTransliterationFlags( nInitialTlFlags );
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index de08fa07c5e0..f149629776b8 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -170,8 +170,11 @@ void DbRegistrationOptionsPage::dispose()
{
for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i )
delete static_cast< DatabaseRegistration* >( pPathBox->GetEntry(i)->GetUserData() );
- delete pPathBox;
- pPathBox = NULL;
+ pPathBox.clear();
+ m_pPathCtrl.clear();
+ m_pNew.clear();
+ m_pEdit.clear();
+ m_pDelete.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx
index 01482292caf4..74e87425b1e5 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -70,6 +70,20 @@ namespace svx
m_pURL->SetDropDownLineCount( 5 );
}
+ ODocumentLinkDialog::~ODocumentLinkDialog()
+ {
+ dispose();
+ }
+
+ void ODocumentLinkDialog::dispose()
+ {
+ m_pURL.clear();
+ m_pBrowseFile.clear();
+ m_pName.clear();
+ m_pOK.clear();
+ ModalDialog::dispose();
+ }
+
void ODocumentLinkDialog::setLink( const OUString& _rName, const OUString& _rURL )
{
diff --git a/cui/source/options/doclinkdialog.hxx b/cui/source/options/doclinkdialog.hxx
index 0584734b761d..55493e9e9974 100644
--- a/cui/source/options/doclinkdialog.hxx
+++ b/cui/source/options/doclinkdialog.hxx
@@ -40,10 +40,10 @@ namespace svx
class ODocumentLinkDialog : public ModalDialog
{
protected:
- ::svt::OFileURLControl* m_pURL;
- PushButton* m_pBrowseFile;
- Edit* m_pName;
- OKButton* m_pOK;
+ VclPtr<::svt::OFileURLControl> m_pURL;
+ VclPtr<PushButton> m_pBrowseFile;
+ VclPtr<Edit> m_pName;
+ VclPtr<OKButton> m_pOK;
bool m_bCreatingNew;
@@ -51,6 +51,8 @@ namespace svx
public:
ODocumentLinkDialog( vcl::Window* _pParent, bool _bCreateNew );
+ virtual ~ODocumentLinkDialog();
+ virtual void dispose() SAL_OVERRIDE;
// name validation has to be done by an external instance
// the validator link gets a pointer to a String, and should return 0 if the string is not
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 098855ae032e..6dfd19f52a2a 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -147,8 +147,16 @@ void SvxFontSubstTabPage::dispose()
pCheckButtonData = NULL;
delete pConfig;
pConfig = NULL;
- delete m_pCheckLB;
- m_pCheckLB = NULL;
+ m_pCheckLB.clear();
+ m_pUseTableCB.clear();
+ m_pReplacements.clear();
+ m_pFont1CB.clear();
+ m_pFont2CB.clear();
+ m_pApply.clear();
+ m_pDelete.clear();
+ m_pFontNameLB.clear();
+ m_pNonPropFontsOnlyCB.clear();
+ m_pFontHeightLB.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx
index b051cdd3c752..3a5b967a3908 100644
--- a/cui/source/options/fontsubs.hxx
+++ b/cui/source/options/fontsubs.hxx
@@ -63,18 +63,18 @@ class SvxFontSubstCheckListBox : public SvSimpleTable
class SvtFontSubstConfig;
class SvxFontSubstTabPage : public SfxTabPage
{
- CheckBox* m_pUseTableCB;
- VclContainer* m_pReplacements;
- FontNameBox* m_pFont1CB;
- FontNameBox* m_pFont2CB;
- PushButton* m_pApply;
- PushButton* m_pDelete;
-
- SvxFontSubstCheckListBox* m_pCheckLB;
-
- ListBox* m_pFontNameLB;
- CheckBox* m_pNonPropFontsOnlyCB;
- ListBox* m_pFontHeightLB;
+ VclPtr<CheckBox> m_pUseTableCB;
+ VclPtr<VclContainer> m_pReplacements;
+ VclPtr<FontNameBox> m_pFont1CB;
+ VclPtr<FontNameBox> m_pFont2CB;
+ VclPtr<PushButton> m_pApply;
+ VclPtr<PushButton> m_pDelete;
+
+ VclPtr<SvxFontSubstCheckListBox> m_pCheckLB;
+
+ VclPtr<ListBox> m_pFontNameLB;
+ VclPtr<CheckBox> m_pNonPropFontsOnlyCB;
+ VclPtr<ListBox> m_pFontHeightLB;
OUString m_sAutomatic;
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index c5ef749ec20f..02d818438286 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -164,6 +164,21 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage( vcl::Window* pParent/*, const SfxI
m_pPrefBox->SetAlternatingRowColors( true );
}
+CuiAboutConfigTabPage::~CuiAboutConfigTabPage()
+{
+ dispose();
+}
+
+void CuiAboutConfigTabPage::dispose()
+{
+ m_pPrefCtrl.clear();
+ m_pResetBtn.clear();
+ m_pEditBtn.clear();
+ m_pSearchBtn.clear();
+ m_pSearchEdit.clear();
+ ModelessDialog::dispose();
+}
+
void CuiAboutConfigTabPage::InsertEntry(const OUString& rProp, const OUString& rStatus, const OUString& rType, const OUString& rValue)
{
SvTreeListEntry* pEntry = new SvTreeListEntry;
@@ -477,6 +492,17 @@ CuiAboutConfigValueDialog::CuiAboutConfigValueDialog( vcl::Window* pWindow,
}
+CuiAboutConfigValueDialog::~CuiAboutConfigValueDialog()
+{
+ dispose();
+}
+
+void CuiAboutConfigValueDialog::dispose()
+{
+ m_pEDValue.clear();
+ ModalDialog::dispose();
+}
+
IMPL_LINK_NOARG( CuiAboutConfigTabPage, ResetBtnHdl_Impl )
{
Reset();
diff --git a/cui/source/options/optaboutconfig.hxx b/cui/source/options/optaboutconfig.hxx
index dc19e4ae6539..85a10deb5ff1 100644
--- a/cui/source/options/optaboutconfig.hxx
+++ b/cui/source/options/optaboutconfig.hxx
@@ -43,11 +43,11 @@ public:
class CuiAboutConfigTabPage : public ModelessDialog
{
private:
- SvSimpleTableContainer* m_pPrefCtrl;
- PushButton* m_pResetBtn;
- PushButton* m_pEditBtn;
- PushButton* m_pSearchBtn;
- Edit* m_pSearchEdit;
+ VclPtr<SvSimpleTableContainer> m_pPrefCtrl;
+ VclPtr<PushButton> m_pResetBtn;
+ VclPtr<PushButton> m_pEditBtn;
+ VclPtr<PushButton> m_pSearchBtn;
+ VclPtr<Edit> m_pSearchEdit;
std::vector< boost::shared_ptr< Prop_Impl > > m_vectorOfModified;
boost::scoped_ptr< SvSimpleTable > m_pPrefBox;
@@ -65,6 +65,8 @@ private:
public:
CuiAboutConfigTabPage(vcl::Window* pParent);
+ virtual ~CuiAboutConfigTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void InsertEntry(const OUString& rProp, const OUString& rStatus, const OUString& rType, const OUString& rValue);
void Reset();
void FillItems(const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>& xNameAccess);
@@ -75,10 +77,12 @@ public:
class CuiAboutConfigValueDialog : public ModalDialog
{
private:
- CuiCustomMultilineEdit* m_pEDValue;
+ VclPtr<CuiCustomMultilineEdit> m_pEDValue;
public:
CuiAboutConfigValueDialog( vcl::Window* pWindow, const OUString& rValue , int limit = 0);
+ virtual ~CuiAboutConfigValueDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString getValue()
{
diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx
index f09b19c5eafa..61354e138c6b 100644
--- a/cui/source/options/optaccessibility.cxx
+++ b/cui/source/options/optaccessibility.cxx
@@ -65,6 +65,15 @@ void SvxAccessibilityOptionsTabPage::dispose()
{
delete m_pImpl;
m_pImpl = NULL;
+ m_pAccessibilityTool.clear();
+ m_pTextSelectionInReadonly.clear();
+ m_pAnimatedGraphics.clear();
+ m_pAnimatedTexts.clear();
+ m_pTipHelpCB.clear();
+ m_pTipHelpNF.clear();
+ m_pAutoDetectHC.clear();
+ m_pAutomaticFontColor.clear();
+ m_pPagePreviews.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optaccessibility.hxx b/cui/source/options/optaccessibility.hxx
index ccf2ac00712b..0a33851b6f56 100644
--- a/cui/source/options/optaccessibility.hxx
+++ b/cui/source/options/optaccessibility.hxx
@@ -25,15 +25,15 @@
struct SvxAccessibilityOptionsTabPage_Impl;
class SvxAccessibilityOptionsTabPage : public SfxTabPage
{
- CheckBox* m_pAccessibilityTool;
- CheckBox* m_pTextSelectionInReadonly;
- CheckBox* m_pAnimatedGraphics;
- CheckBox* m_pAnimatedTexts;
- CheckBox* m_pTipHelpCB;
- NumericField* m_pTipHelpNF;
- CheckBox* m_pAutoDetectHC;
- CheckBox* m_pAutomaticFontColor;
- CheckBox* m_pPagePreviews;
+ VclPtr<CheckBox> m_pAccessibilityTool;
+ VclPtr<CheckBox> m_pTextSelectionInReadonly;
+ VclPtr<CheckBox> m_pAnimatedGraphics;
+ VclPtr<CheckBox> m_pAnimatedTexts;
+ VclPtr<CheckBox> m_pTipHelpCB;
+ VclPtr<NumericField> m_pTipHelpNF;
+ VclPtr<CheckBox> m_pAutoDetectHC;
+ VclPtr<CheckBox> m_pAutomaticFontColor;
+ VclPtr<CheckBox> m_pPagePreviews;
DECL_LINK(TipHelpHdl, CheckBox*);
void EnableTipHelp(bool bCheck);
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 0f9bab237d61..49b501572ce9 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -158,6 +158,19 @@ void SvxAsianLayoutPage::dispose()
{
delete pImpl;
pImpl = NULL;
+ m_pCharKerningRB.clear();
+ m_pCharPunctKerningRB.clear();
+ m_pNoCompressionRB.clear();
+ m_pPunctCompressionRB.clear();
+ m_pPunctKanaCompressionRB.clear();
+ m_pLanguageFT.clear();
+ m_pLanguageLB.clear();
+ m_pStandardCB.clear();
+ m_pStartFT.clear();
+ m_pStartED.clear();
+ m_pEndFT.clear();
+ m_pEndED.clear();
+ m_pHintFT.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optbasic.cxx b/cui/source/options/optbasic.cxx
index 74028ff45621..1be35826d5d5 100644
--- a/cui/source/options/optbasic.cxx
+++ b/cui/source/options/optbasic.cxx
@@ -45,6 +45,22 @@ SvxBasicIDEOptionsPage::SvxBasicIDEOptionsPage( vcl::Window* pParent, const SfxI
}
+SvxBasicIDEOptionsPage::~SvxBasicIDEOptionsPage()
+{
+ dispose();
+}
+
+void SvxBasicIDEOptionsPage::dispose()
+{
+ pCodeCompleteChk.clear();
+ pAutocloseProcChk.clear();
+ pAutocloseParenChk.clear();
+ pAutocloseQuotesChk.clear();
+ pAutoCorrectChk.clear();
+ pUseExtendedTypesChk.clear();
+ SfxTabPage::dispose();
+}
+
void SvxBasicIDEOptionsPage::LoadConfig()
{
bool bProcClose = officecfg::Office::BasicIDE::Autocomplete::AutocloseProc::get();
diff --git a/cui/source/options/optbasic.hxx b/cui/source/options/optbasic.hxx
index 45f93120bcf4..9aaced3eb2a9 100644
--- a/cui/source/options/optbasic.hxx
+++ b/cui/source/options/optbasic.hxx
@@ -27,17 +27,19 @@
class SvxBasicIDEOptionsPage: public SfxTabPage
{
private:
- CheckBox* pCodeCompleteChk;
- CheckBox* pAutocloseProcChk;
- CheckBox* pAutocloseParenChk;
- CheckBox* pAutocloseQuotesChk;
- CheckBox* pAutoCorrectChk;
- CheckBox* pUseExtendedTypesChk;
+ VclPtr<CheckBox> pCodeCompleteChk;
+ VclPtr<CheckBox> pAutocloseProcChk;
+ VclPtr<CheckBox> pAutocloseParenChk;
+ VclPtr<CheckBox> pAutocloseQuotesChk;
+ VclPtr<CheckBox> pAutoCorrectChk;
+ VclPtr<CheckBox> pUseExtendedTypesChk;
void LoadConfig();
public:
SvxBasicIDEOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~SvxBasicIDEOptionsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 8005483464f1..7cb85b4fe9f1 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -99,6 +99,11 @@ void SvxDefaultColorOptPage::dispose()
delete pChartOptions;
pChartOptions = NULL;
}
+ m_pLbChartColors.clear();
+ m_pValSetColorBox.clear();
+ m_pPBDefault.clear();
+ m_pPBAdd.clear();
+ m_pPBRemove.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optchart.hxx b/cui/source/options/optchart.hxx
index 99d5377ccd00..ff6970627113 100644
--- a/cui/source/options/optchart.hxx
+++ b/cui/source/options/optchart.hxx
@@ -33,11 +33,11 @@ class SvxDefaultColorOptPage : public SfxTabPage
{
private:
- ColorLB* m_pLbChartColors;
- ValueSet* m_pValSetColorBox;
- PushButton* m_pPBDefault;
- PushButton* m_pPBAdd;
- PushButton* m_pPBRemove;
+ VclPtr<ColorLB> m_pLbChartColors;
+ VclPtr<ValueSet> m_pValSetColorBox;
+ VclPtr<PushButton> m_pPBDefault;
+ VclPtr<PushButton> m_pPBAdd;
+ VclPtr<PushButton> m_pPBRemove;
SvxChartOptions* pChartOptions;
SvxChartColorTableItem* pColorConfig;
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index b18abccdec0f..6bdf8a1340e7 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -174,7 +174,7 @@ class ColorConfigWindow_Impl
{
public:
ColorConfigWindow_Impl(vcl::Window* pParent);
- ~ColorConfigWindow_Impl() { dispose(); }
+ virtual ~ColorConfigWindow_Impl() { dispose(); }
virtual void dispose() SAL_OVERRIDE;
public:
@@ -193,8 +193,7 @@ private:
class Chapter
{
// text
- bool m_bOwnsWidget;
- FixedText *m_pText;
+ VclPtr<FixedText> m_pText;
public:
Chapter(FixedText *pText, bool bShow);
Chapter(vcl::Window *pGrid, unsigned nYPos, const OUString& sDisplayName);
@@ -235,11 +234,11 @@ private:
private:
bool m_bOwnsWidgets;
// checkbox (CheckBox) or simple text (FixedText)
- Control* m_pText;
+ VclPtr<Control> m_pText;
// color list box
- ColorListBox* m_pColorList;
+ VclPtr<ColorListBox> m_pColorList;
// color preview box
- vcl::Window* m_pPreview;
+ VclPtr<vcl::Window> m_pPreview;
// default color
Color m_aDefaultColor;
private:
@@ -256,9 +255,9 @@ private:
private:
- VclGrid *m_pGrid;
- ScrollBar *m_pVScroll;
- HeaderBar *m_pHeaderHB;
+ VclPtr<VclGrid> m_pGrid;
+ VclPtr<ScrollBar> m_pVScroll;
+ VclPtr<HeaderBar> m_pHeaderHB;
// initialization
void CreateEntries();
@@ -283,8 +282,7 @@ private:
// eGroup: which group is this?
// rResMgr: resource manager
ColorConfigWindow_Impl::Chapter::Chapter(FixedText* pText, bool bShow)
- : m_bOwnsWidget(false)
- , m_pText(pText)
+ : m_pText(pText)
{
if (!bShow)
Hide();
@@ -293,7 +291,6 @@ ColorConfigWindow_Impl::Chapter::Chapter(FixedText* pText, bool bShow)
// ctor for extended groups
ColorConfigWindow_Impl::Chapter::Chapter(vcl::Window *pGrid,
unsigned nYPos, const OUString& rDisplayName)
- : m_bOwnsWidget(true)
{
m_pText = new FixedText(pGrid, WB_LEFT|WB_VCENTER|WB_3DLOOK);
m_pText->set_font_attribute("weight", "bold");
@@ -305,8 +302,6 @@ ColorConfigWindow_Impl::Chapter::Chapter(vcl::Window *pGrid,
ColorConfigWindow_Impl::Chapter::~Chapter()
{
- if (m_bOwnsWidget)
- delete m_pText;
}
void ColorConfigWindow_Impl::Chapter::Show(Wallpaper const& rBackWall)
@@ -373,9 +368,9 @@ ColorConfigWindow_Impl::Entry::~Entry()
{
if (m_bOwnsWidgets)
{
- delete m_pText;
- delete m_pColorList;
- delete m_pPreview;
+ m_pText.clear();
+ m_pColorList.clear();
+ m_pPreview.clear();
}
}
@@ -417,7 +412,7 @@ void ColorConfigWindow_Impl::Entry::SetLinks(
{
m_pColorList->SetSelectHdl(aColorLink);
m_pColorList->SetGetFocusHdl(aGetFocusLink);
- if (CheckBox* pCheckBox = dynamic_cast<CheckBox*>(m_pText))
+ if (CheckBox* pCheckBox = dynamic_cast<CheckBox*>(m_pText.get()))
{
pCheckBox->SetClickHdl(aCheckLink);
pCheckBox->SetGetFocusHdl(aGetFocusLink);
@@ -440,7 +435,7 @@ void ColorConfigWindow_Impl::Entry::Update (
m_pColorList->SelectEntry(aColor);
}
m_pPreview->SetBackground(Wallpaper(aColor));
- if (CheckBox* pCheckBox = dynamic_cast<CheckBox*>(m_pText))
+ if (CheckBox* pCheckBox = dynamic_cast<CheckBox*>(m_pText.get()))
pCheckBox->Check(rValue.bIsVisible);
}
@@ -513,6 +508,9 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(vcl::Window* pParent)
void ColorConfigWindow_Impl::dispose()
{
disposeBuilder();
+ m_pGrid.clear();
+ m_pVScroll.clear();
+ m_pHeaderHB.clear();
VclContainer::dispose();
}
@@ -827,10 +825,10 @@ void ColorConfigWindow_Impl::Command( const CommandEvent& rCEvt )
class ColorConfigCtrl_Impl : public VclVBox
{
- HeaderBar* m_pHeaderHB;
- VclHBox* m_pBody;
- ColorConfigWindow_Impl* m_pScrollWindow;
- ScrollBar* m_pVScroll;
+ VclPtr<HeaderBar> m_pHeaderHB;
+ VclPtr<VclHBox> m_pBody;
+ VclPtr<ColorConfigWindow_Impl> m_pScrollWindow;
+ VclPtr<ScrollBar> m_pVScroll;
EditableColorConfig* pColorConfig;
EditableExtendedColorConfig* pExtColorConfig;
@@ -920,15 +918,10 @@ ColorConfigCtrl_Impl::~ColorConfigCtrl_Impl()
void ColorConfigCtrl_Impl::dispose()
{
- delete m_pVScroll;
- m_pVScroll = NULL;
- delete m_pScrollWindow;
- m_pScrollWindow = NULL;
- delete m_pBody;
- m_pBody = NULL;
- delete m_pHeaderHB;
- m_pHeaderHB = NULL;
-
+ m_pVScroll.clear();
+ m_pScrollWindow.clear();
+ m_pBody.clear();
+ m_pHeaderHB.clear();
VclVBox::dispose();
}
@@ -1100,6 +1093,10 @@ void SvxColorOptionsTabPage::dispose()
delete pExtColorConfig;
pExtColorConfig = NULL;
}
+ m_pColorSchemeLB.clear();
+ m_pSaveSchemePB.clear();
+ m_pDeleteSchemePB.clear();
+ m_pColorConfigCT.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optcolor.hxx b/cui/source/options/optcolor.hxx
index cc886b5e2d79..f5c31bdb1ac1 100644
--- a/cui/source/options/optcolor.hxx
+++ b/cui/source/options/optcolor.hxx
@@ -31,10 +31,10 @@ class SvxColorOptionsTabPage : public SfxTabPage
{
using SfxTabPage::DeactivatePage;
- ListBox* m_pColorSchemeLB;
- PushButton* m_pSaveSchemePB;
- PushButton* m_pDeleteSchemePB;
- ColorConfigCtrl_Impl* m_pColorConfigCT;
+ VclPtr<ListBox> m_pColorSchemeLB;
+ VclPtr<PushButton> m_pSaveSchemePB;
+ VclPtr<PushButton> m_pDeleteSchemePB;
+ VclPtr<ColorConfigCtrl_Impl> m_pColorConfigCT;
bool bFillItemSetCalled;
diff --git a/cui/source/options/optctl.cxx b/cui/source/options/optctl.cxx
index caaa0471294d..40203d831f41 100644
--- a/cui/source/options/optctl.cxx
+++ b/cui/source/options/optctl.cxx
@@ -57,6 +57,22 @@ SvxCTLOptionsPage::SvxCTLOptionsPage( vcl::Window* pParent, const SfxItemSet& rS
m_pNumeralsLB->SetDropDownLineCount( m_pNumeralsLB->GetEntryCount() );
}
+SvxCTLOptionsPage::~SvxCTLOptionsPage()
+{
+ dispose();
+}
+
+void SvxCTLOptionsPage::dispose()
+{
+ m_pSequenceCheckingCB.clear();
+ m_pRestrictedCB.clear();
+ m_pTypeReplaceCB.clear();
+ m_pMovementLogicalRB.clear();
+ m_pMovementVisualRB.clear();
+ m_pNumeralsLB.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* SvxCTLOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
return new SvxCTLOptionsPage( pParent, *rAttrSet );
diff --git a/cui/source/options/optctl.hxx b/cui/source/options/optctl.hxx
index 034e04b6d70f..4c086eb90726 100644
--- a/cui/source/options/optctl.hxx
+++ b/cui/source/options/optctl.hxx
@@ -30,20 +30,22 @@ class SvxCTLOptionsPage : public SfxTabPage
{
private:
- CheckBox* m_pSequenceCheckingCB;
- CheckBox* m_pRestrictedCB;
- CheckBox* m_pTypeReplaceCB;
+ VclPtr<CheckBox> m_pSequenceCheckingCB;
+ VclPtr<CheckBox> m_pRestrictedCB;
+ VclPtr<CheckBox> m_pTypeReplaceCB;
- RadioButton* m_pMovementLogicalRB;
- RadioButton* m_pMovementVisualRB;
+ VclPtr<RadioButton> m_pMovementLogicalRB;
+ VclPtr<RadioButton> m_pMovementVisualRB;
- ListBox* m_pNumeralsLB;
+ VclPtr<ListBox> m_pNumeralsLB;
DECL_LINK( SequenceCheckingCB_Hdl, void* );
SvxCTLOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
public:
+ virtual ~SvxCTLOptionsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index fefbbd25ef39..d48e9a5fa348 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -117,6 +117,19 @@ SvxNewDictionaryDialog::SvxNewDictionaryDialog( vcl::Window* pParent,
pLanguageLB->SelectEntryPos(0);
}
+SvxNewDictionaryDialog::~SvxNewDictionaryDialog()
+{
+ dispose();
+}
+
+void SvxNewDictionaryDialog::dispose()
+{
+ pNameEdit.clear();
+ pLanguageLB.clear();
+ pExceptBtn.clear();
+ pOKBtn.clear();
+ ModalDialog::dispose();
+}
IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
@@ -331,6 +344,24 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog(
}
}
+SvxEditDictionaryDialog::~SvxEditDictionaryDialog()
+{
+ dispose();
+}
+
+void SvxEditDictionaryDialog::dispose()
+{
+ pAllDictsLB.clear();
+ pLangFT.clear();
+ pLangLB.clear();
+ pWordED.clear();
+ pReplaceFT.clear();
+ pReplaceED.clear();
+ pWordsLB.clear();
+ pNewReplacePB.clear();
+ pDeletePB.clear();
+ ModalDialog::dispose();
+}
/*
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 6a6d7116d70b..65953a886a0a 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -54,6 +54,25 @@ OfaMSFilterTabPage::OfaMSFilterTabPage(vcl::Window* pParent, const SfxItemSet& r
aEBasicCodeCB->SetClickHdl( LINK( this, OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl ) );
}
+OfaMSFilterTabPage::~OfaMSFilterTabPage()
+{
+ dispose();
+}
+
+void OfaMSFilterTabPage::dispose()
+{
+ aWBasicCodeCB.clear();
+ aWBasicWbctblCB.clear();
+ aWBasicStgCB.clear();
+ aEBasicCodeCB.clear();
+ aEBasicExectblCB.clear();
+ aEBasicStgCB.clear();
+ aPBasicCodeCB.clear();
+ aPBasicStgCB.clear();
+ SfxTabPage::dispose();
+}
+
+
IMPL_LINK_NOARG(OfaMSFilterTabPage, LoadWordBasicCheckHdl_Impl)
{
aWBasicWbctblCB->Enable( aWBasicCodeCB->IsChecked() );
@@ -166,8 +185,8 @@ void OfaMSFilterTabPage2::dispose()
{
delete pCheckButtonData;
pCheckButtonData = NULL;
- delete m_pCheckLB;
- m_pCheckLB = NULL;
+ m_pCheckLB.clear();
+ m_pCheckLBContainer.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx
index 763794fd36b9..20b01c1916f8 100644
--- a/cui/source/options/optfltr.hxx
+++ b/cui/source/options/optfltr.hxx
@@ -27,20 +27,22 @@
class OfaMSFilterTabPage : public SfxTabPage
{
- CheckBox* aWBasicCodeCB;
- CheckBox* aWBasicWbctblCB;
- CheckBox* aWBasicStgCB;
- CheckBox* aEBasicCodeCB;
- CheckBox* aEBasicExectblCB;
- CheckBox* aEBasicStgCB;
- CheckBox* aPBasicCodeCB;
- CheckBox* aPBasicStgCB;
+ VclPtr<CheckBox> aWBasicCodeCB;
+ VclPtr<CheckBox> aWBasicWbctblCB;
+ VclPtr<CheckBox> aWBasicStgCB;
+ VclPtr<CheckBox> aEBasicCodeCB;
+ VclPtr<CheckBox> aEBasicExectblCB;
+ VclPtr<CheckBox> aEBasicStgCB;
+ VclPtr<CheckBox> aPBasicCodeCB;
+ VclPtr<CheckBox> aPBasicStgCB;
OfaMSFilterTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
DECL_LINK(LoadWordBasicCheckHdl_Impl, void *);
DECL_LINK(LoadExcelBasicCheckHdl_Impl, void *);
public:
+ virtual ~OfaMSFilterTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet );
@@ -72,8 +74,8 @@ class OfaMSFilterTabPage2 : public SfxTabPage
}
};
- SvSimpleTableContainer* m_pCheckLBContainer;
- MSFltrSimpleTable* m_pCheckLB;
+ VclPtr<SvSimpleTableContainer> m_pCheckLBContainer;
+ VclPtr<MSFltrSimpleTable> m_pCheckLB;
OUString sHeader1, sHeader2;
OUString sChgToFromMath,
sChgToFromWriter,
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 3ab3ae842707..dabfc6b8fdb1 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -307,6 +307,27 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
m_pToolTipsCB->SetClickHdl( aLink );
}
+OfaMiscTabPage::~OfaMiscTabPage()
+{
+ dispose();
+}
+
+void OfaMiscTabPage::dispose()
+{
+ m_pToolTipsCB.clear();
+ m_pExtHelpCB.clear();
+ m_pFileDlgROImage.clear();
+ m_pFileDlgCB.clear();
+ m_pPrintDlgCB.clear();
+ m_pDocStatusCB.clear();
+ m_pSaveAlwaysCB.clear();
+ m_pYearFrame.clear();
+ m_pYearValueField.clear();
+ m_pToYearFT.clear();
+ m_pCollectUsageInfo.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* OfaMiscTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
return new OfaMiscTabPage( pParent, *rAttrSet );
@@ -693,6 +714,23 @@ void OfaViewTabPage::dispose()
pCanvasSettings = NULL;
delete pAppearanceCfg;
pAppearanceCfg = NULL;
+ m_pWindowSizeMF.clear();
+ m_pIconSizeLB.clear();
+ m_pIconStyleLB.clear();
+ m_pFontAntiAliasing.clear();
+ m_pAAPointLimitLabel.clear();
+ m_pAAPointLimit.clear();
+ m_pMenuIconsLB.clear();
+ m_pFontShowCB.clear();
+ m_pFontHistoryCB.clear();
+ m_pUseHardwareAccell.clear();
+ m_pUseAntiAliase.clear();
+ m_pUseOpenGL.clear();
+ m_pForceOpenGL.clear();
+ m_pMousePosLB.clear();
+ m_pMouseMiddleLB.clear();
+ m_pSelectionCB.clear();
+ m_pSelectionMF.clear();
SfxTabPage::dispose();
}
@@ -1217,6 +1255,22 @@ void OfaLanguagesTabPage::dispose()
{
delete pLangConfig;
pLangConfig = NULL;
+ m_pUserInterfaceLB.clear();
+ m_pLocaleSettingFT.clear();
+ m_pLocaleSettingLB.clear();
+ m_pDecimalSeparatorCB.clear();
+ m_pCurrencyFT.clear();
+ m_pCurrencyLB.clear();
+ m_pDatePatternsFT.clear();
+ m_pDatePatternsED.clear();
+ m_pWesternLanguageLB.clear();
+ m_pWesternLanguageFT.clear();
+ m_pAsianLanguageLB.clear();
+ m_pComplexLanguageLB.clear();
+ m_pCurrentDocCB.clear();
+ m_pAsianSupportCB.clear();
+ m_pCTLSupportCB.clear();
+ m_pIgnoreLanguageChangeCB.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 4f01834727ed..19ec2a06ef56 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -44,24 +44,24 @@ class OfaMiscTabPage : public SfxTabPage
{
using TabPage::DeactivatePage;
private:
- CheckBox* m_pToolTipsCB;
- CheckBox* m_pExtHelpCB;
+ VclPtr<CheckBox> m_pToolTipsCB;
+ VclPtr<CheckBox> m_pExtHelpCB;
- FixedImage* m_pFileDlgROImage;
- CheckBox* m_pFileDlgCB;
+ VclPtr<FixedImage> m_pFileDlgROImage;
+ VclPtr<CheckBox> m_pFileDlgCB;
- CheckBox* m_pPrintDlgCB;
+ VclPtr<CheckBox> m_pPrintDlgCB;
- CheckBox* m_pDocStatusCB;
- CheckBox* m_pSaveAlwaysCB;
+ VclPtr<CheckBox> m_pDocStatusCB;
+ VclPtr<CheckBox> m_pSaveAlwaysCB;
- VclContainer* m_pYearFrame;
- NumericField* m_pYearValueField;
- FixedText* m_pToYearFT;
+ VclPtr<VclContainer> m_pYearFrame;
+ VclPtr<NumericField> m_pYearValueField;
+ VclPtr<FixedText> m_pToYearFT;
OUString m_aStrDateInfo;
- CheckBox* m_pCollectUsageInfo;
+ VclPtr<CheckBox> m_pCollectUsageInfo;
DECL_LINK( TwoFigureHdl, NumericField* );
DECL_LINK( TwoFigureConfigHdl, NumericField* );
@@ -74,6 +74,8 @@ protected:
public:
OfaMiscTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~OfaMiscTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
@@ -87,30 +89,30 @@ class SvtTabAppearanceCfg;
class OfaViewTabPage : public SfxTabPage
{
private:
- MetricField* m_pWindowSizeMF;
- ListBox* m_pIconSizeLB;
- ListBox* m_pIconStyleLB;
+ VclPtr<MetricField> m_pWindowSizeMF;
+ VclPtr<ListBox> m_pIconSizeLB;
+ VclPtr<ListBox> m_pIconStyleLB;
- CheckBox* m_pFontAntiAliasing;
- FixedText* m_pAAPointLimitLabel;
- MetricField* m_pAAPointLimit;
+ VclPtr<CheckBox> m_pFontAntiAliasing;
+ VclPtr<FixedText> m_pAAPointLimitLabel;
+ VclPtr<MetricField> m_pAAPointLimit;
- ListBox* m_pMenuIconsLB;
+ VclPtr<ListBox> m_pMenuIconsLB;
- CheckBox* m_pFontShowCB;
- CheckBox* m_pFontHistoryCB;
+ VclPtr<CheckBox> m_pFontShowCB;
+ VclPtr<CheckBox> m_pFontHistoryCB;
- CheckBox* m_pUseHardwareAccell;
- CheckBox* m_pUseAntiAliase;
- CheckBox* m_pUseOpenGL;
- CheckBox* m_pForceOpenGL;
+ VclPtr<CheckBox> m_pUseHardwareAccell;
+ VclPtr<CheckBox> m_pUseAntiAliase;
+ VclPtr<CheckBox> m_pUseOpenGL;
+ VclPtr<CheckBox> m_pForceOpenGL;
- ListBox* m_pMousePosLB;
- ListBox* m_pMouseMiddleLB;
+ VclPtr<ListBox> m_pMousePosLB;
+ VclPtr<ListBox> m_pMouseMiddleLB;
// #i97672#
- CheckBox* m_pSelectionCB;
- MetricField* m_pSelectionMF;
+ VclPtr<CheckBox> m_pSelectionCB;
+ VclPtr<MetricField> m_pSelectionMF;
sal_uInt16 nSizeLB_InitialSelection;
sal_uInt16 nStyleLB_InitialSelection;
@@ -142,23 +144,23 @@ public:
struct LanguageConfig_Impl;
class OfaLanguagesTabPage : public SfxTabPage
{
- ListBox* m_pUserInterfaceLB;
- FixedText* m_pLocaleSettingFT;
- SvxLanguageBox* m_pLocaleSettingLB;
- CheckBox* m_pDecimalSeparatorCB;
- FixedText* m_pCurrencyFT;
- ListBox* m_pCurrencyLB;
- FixedText* m_pDatePatternsFT;
- Edit* m_pDatePatternsED;
-
- SvxLanguageBox* m_pWesternLanguageLB;
- FixedText* m_pWesternLanguageFT;
- SvxLanguageBox* m_pAsianLanguageLB;
- SvxLanguageBox* m_pComplexLanguageLB;
- CheckBox* m_pCurrentDocCB;
- CheckBox* m_pAsianSupportCB;
- CheckBox* m_pCTLSupportCB;
- CheckBox* m_pIgnoreLanguageChangeCB;
+ VclPtr<ListBox> m_pUserInterfaceLB;
+ VclPtr<FixedText> m_pLocaleSettingFT;
+ VclPtr<SvxLanguageBox> m_pLocaleSettingLB;
+ VclPtr<CheckBox> m_pDecimalSeparatorCB;
+ VclPtr<FixedText> m_pCurrencyFT;
+ VclPtr<ListBox> m_pCurrencyLB;
+ VclPtr<FixedText> m_pDatePatternsFT;
+ VclPtr<Edit> m_pDatePatternsED;
+
+ VclPtr<SvxLanguageBox> m_pWesternLanguageLB;
+ VclPtr<FixedText> m_pWesternLanguageFT;
+ VclPtr<SvxLanguageBox> m_pAsianLanguageLB;
+ VclPtr<SvxLanguageBox> m_pComplexLanguageLB;
+ VclPtr<CheckBox> m_pCurrentDocCB;
+ VclPtr<CheckBox> m_pAsianSupportCB;
+ VclPtr<CheckBox> m_pCTLSupportCB;
+ VclPtr<CheckBox> m_pIgnoreLanguageChangeCB;
bool m_bOldAsian;
bool m_bOldCtl;
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 28fde5a5fd7e..9d6afd387479 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -166,7 +166,7 @@ struct SvxGeneralTabPage::Row
// which row is it?
RowType eRow;
// row label
- FixedText* pLabel;
+ VclPtr<FixedText> pLabel;
// first and last field in the row (last is exclusive)
unsigned nFirstField, nLastField;
@@ -191,7 +191,7 @@ struct SvxGeneralTabPage::Field
// which field is this? (in vFieldInfo[] above)
unsigned iField;
// edit box
- Edit *pEdit;
+ VclPtr<Edit> pEdit;
public:
Field (Edit *pEdit_, unsigned iField_)
@@ -219,6 +219,16 @@ SvxGeneralTabPage::SvxGeneralTabPage(vcl::Window* pParent, const SfxItemSet& rCo
SetLinks();
}
+SvxGeneralTabPage::~SvxGeneralTabPage()
+{
+ dispose();
+}
+
+void SvxGeneralTabPage::dispose()
+{
+ m_pUseDataCB.clear();
+ SfxTabPage::dispose();
+}
// Initializes the titles and the edit boxes,
diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index eeae4d7d14ce..34d7fff2d462 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -84,6 +84,32 @@ SfxTabPage( pParent, "OptHtmlPage" , "cui/ui/opthtmlpage.ui", &rSet )
aCharSetLB->FillWithMimeAndSelectBest();
}
+OfaHtmlTabPage::~OfaHtmlTabPage()
+{
+ dispose();
+}
+
+void OfaHtmlTabPage::dispose()
+{
+ aSize1NF.clear();
+ aSize2NF.clear();
+ aSize3NF.clear();
+ aSize4NF.clear();
+ aSize5NF.clear();
+ aSize6NF.clear();
+ aSize7NF.clear();
+ aNumbersEnglishUSCB.clear();
+ aUnknownTagCB.clear();
+ aIgnoreFontNamesCB.clear();
+ aExportLB.clear();
+ aStarBasicCB.clear();
+ aStarBasicWarningCB.clear();
+ aPrintExtensionCB.clear();
+ aSaveGrfLocalCB.clear();
+ aCharSetLB.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* OfaHtmlTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet )
{
diff --git a/cui/source/options/opthtml.hxx b/cui/source/options/opthtml.hxx
index 2697fb50a830..0e17f48330e6 100644
--- a/cui/source/options/opthtml.hxx
+++ b/cui/source/options/opthtml.hxx
@@ -30,30 +30,32 @@
class OfaHtmlTabPage : public SfxTabPage
{
- NumericField* aSize1NF;
- NumericField* aSize2NF;
- NumericField* aSize3NF;
- NumericField* aSize4NF;
- NumericField* aSize5NF;
- NumericField* aSize6NF;
- NumericField* aSize7NF;
+ VclPtr<NumericField> aSize1NF;
+ VclPtr<NumericField> aSize2NF;
+ VclPtr<NumericField> aSize3NF;
+ VclPtr<NumericField> aSize4NF;
+ VclPtr<NumericField> aSize5NF;
+ VclPtr<NumericField> aSize6NF;
+ VclPtr<NumericField> aSize7NF;
- CheckBox* aNumbersEnglishUSCB;
- CheckBox* aUnknownTagCB;
- CheckBox* aIgnoreFontNamesCB;
+ VclPtr<CheckBox> aNumbersEnglishUSCB;
+ VclPtr<CheckBox> aUnknownTagCB;
+ VclPtr<CheckBox> aIgnoreFontNamesCB;
- ListBox* aExportLB;
- CheckBox* aStarBasicCB;
- CheckBox* aStarBasicWarningCB;
- CheckBox* aPrintExtensionCB;
- CheckBox* aSaveGrfLocalCB;
- SvxTextEncodingBox* aCharSetLB;
+ VclPtr<ListBox> aExportLB;
+ VclPtr<CheckBox> aStarBasicCB;
+ VclPtr<CheckBox> aStarBasicWarningCB;
+ VclPtr<CheckBox> aPrintExtensionCB;
+ VclPtr<CheckBox> aSaveGrfLocalCB;
+ VclPtr<SvxTextEncodingBox> aCharSetLB;
DECL_LINK(ExportHdl_Impl, ListBox*);
DECL_LINK(CheckBoxHdl_Impl, CheckBox*);
OfaHtmlTabPage(vcl::Window* pParent, const SfxItemSet& rSet);
public:
+ virtual ~OfaHtmlTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet );
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index a9063ece06d4..5dc7a284e51f 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -215,6 +215,32 @@ SvxProxyTabPage::SvxProxyTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
aArgumentList );
}
+SvxProxyTabPage::~SvxProxyTabPage()
+{
+ dispose();
+}
+
+void SvxProxyTabPage::dispose()
+{
+ m_pProxyModeLB.clear();
+ m_pHttpProxyFT.clear();
+ m_pHttpProxyED.clear();
+ m_pHttpPortFT.clear();
+ m_pHttpPortED.clear();
+ m_pHttpsProxyFT.clear();
+ m_pHttpsProxyED.clear();
+ m_pHttpsPortFT.clear();
+ m_pHttpsPortED.clear();
+ m_pFtpProxyFT.clear();
+ m_pFtpProxyED.clear();
+ m_pFtpPortFT.clear();
+ m_pFtpPortED.clear();
+ m_pNoProxyForFT.clear();
+ m_pNoProxyForED.clear();
+ m_pNoProxyDescFT.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* SvxProxyTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
return new SvxProxyTabPage(pParent, *rAttrSet);
@@ -627,12 +653,20 @@ SvxSecurityTabPage::~SvxSecurityTabPage()
void SvxSecurityTabPage::dispose()
{
- delete mpCertPathDlg;
- mpCertPathDlg = NULL;
delete mpSecOptions;
mpSecOptions = NULL;
- delete mpSecOptDlg;
- mpSecOptDlg = NULL;
+ mpCertPathDlg.clear();
+ mpSecOptDlg.clear();
+ m_pSecurityOptionsPB.clear();
+ m_pSavePasswordsCB.clear();
+ m_pShowConnectionsPB.clear();
+ m_pMasterPasswordCB.clear();
+ m_pMasterPasswordFT.clear();
+ m_pMasterPasswordPB.clear();
+ m_pMacroSecFrame.clear();
+ m_pMacroSecPB.clear();
+ m_pCertFrame.clear();
+ m_pCertPathPB.clear();
SfxTabPage::dispose();
}
@@ -983,6 +1017,13 @@ void SvxEMailTabPage::dispose()
{
delete pImpl;
pImpl = NULL;
+ m_pMailContainer.clear();
+ m_pMailerURLFI.clear();
+ m_pMailerURLED.clear();
+ m_pMailerURLPB.clear();
+ m_pSuppressHiddenContainer.clear();
+ m_pSuppressHiddenFI.clear();
+ m_pSuppressHidden.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index 6eddd54219b3..e1cccd41a09f 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -58,26 +58,26 @@ class SvxProxyTabPage : public SfxTabPage
{
private:
- ListBox* m_pProxyModeLB;
+ VclPtr<ListBox> m_pProxyModeLB;
- FixedText* m_pHttpProxyFT;
- SvxNoSpaceEdit* m_pHttpProxyED;
- FixedText* m_pHttpPortFT;
- SvxNoSpaceEdit* m_pHttpPortED;
+ VclPtr<FixedText> m_pHttpProxyFT;
+ VclPtr<SvxNoSpaceEdit> m_pHttpProxyED;
+ VclPtr<FixedText> m_pHttpPortFT;
+ VclPtr<SvxNoSpaceEdit> m_pHttpPortED;
- FixedText* m_pHttpsProxyFT;
- SvxNoSpaceEdit* m_pHttpsProxyED;
- FixedText* m_pHttpsPortFT;
- SvxNoSpaceEdit* m_pHttpsPortED;
+ VclPtr<FixedText> m_pHttpsProxyFT;
+ VclPtr<SvxNoSpaceEdit> m_pHttpsProxyED;
+ VclPtr<FixedText> m_pHttpsPortFT;
+ VclPtr<SvxNoSpaceEdit> m_pHttpsPortED;
- FixedText* m_pFtpProxyFT;
- SvxNoSpaceEdit* m_pFtpProxyED;
- FixedText* m_pFtpPortFT;
- SvxNoSpaceEdit* m_pFtpPortED;
+ VclPtr<FixedText> m_pFtpProxyFT;
+ VclPtr<SvxNoSpaceEdit> m_pFtpProxyED;
+ VclPtr<FixedText> m_pFtpPortFT;
+ VclPtr<SvxNoSpaceEdit> m_pFtpPortED;
- FixedText* m_pNoProxyForFT;
- Edit* m_pNoProxyForED;
- FixedText* m_pNoProxyDescFT;
+ VclPtr<FixedText> m_pNoProxyForFT;
+ VclPtr<Edit> m_pNoProxyForED;
+ VclPtr<FixedText> m_pNoProxyDescFT;
const OUString aProxyModePN;
const OUString aHttpProxyPN;
@@ -101,6 +101,8 @@ private:
SvxProxyTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
public:
+ virtual ~SvxProxyTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -129,28 +131,28 @@ class SvxSecurityTabPage : public SfxTabPage
using TabPage::DeactivatePage;
private:
- PushButton* m_pSecurityOptionsPB;
+ VclPtr<PushButton> m_pSecurityOptionsPB;
- CheckBox* m_pSavePasswordsCB;
- PushButton* m_pShowConnectionsPB;
+ VclPtr<CheckBox> m_pSavePasswordsCB;
+ VclPtr<PushButton> m_pShowConnectionsPB;
- CheckBox* m_pMasterPasswordCB;
- FixedText* m_pMasterPasswordFT;
- PushButton* m_pMasterPasswordPB;
+ VclPtr<CheckBox> m_pMasterPasswordCB;
+ VclPtr<FixedText> m_pMasterPasswordFT;
+ VclPtr<PushButton> m_pMasterPasswordPB;
- VclContainer* m_pMacroSecFrame;
- PushButton* m_pMacroSecPB;
+ VclPtr<VclContainer> m_pMacroSecFrame;
+ VclPtr<PushButton> m_pMacroSecPB;
- VclContainer* m_pCertFrame;
- PushButton* m_pCertPathPB;
+ VclPtr<VclContainer> m_pCertFrame;
+ VclPtr<PushButton> m_pCertPathPB;
VclContainer* m_pTSAURLsFrame;
PushButton* m_pTSAURLsPB;
SvtSecurityOptions* mpSecOptions;
- svx::SecurityOptionsDialog* mpSecOptDlg;
+ VclPtr<svx::SecurityOptionsDialog> mpSecOptDlg;
- CertPathDialog* mpCertPathDlg;
+ VclPtr<CertPathDialog> mpCertPathDlg;
OUString m_sPasswordStoringDeactivateStr;
@@ -182,13 +184,13 @@ public:
struct SvxEMailTabPage_Impl;
class SvxEMailTabPage : public SfxTabPage
{
- VclContainer* m_pMailContainer;
- FixedImage* m_pMailerURLFI;
- Edit* m_pMailerURLED;
- PushButton* m_pMailerURLPB;
- VclContainer* m_pSuppressHiddenContainer;
- FixedImage* m_pSuppressHiddenFI;
- CheckBox* m_pSuppressHidden;
+ VclPtr<VclContainer> m_pMailContainer;
+ VclPtr<FixedImage> m_pMailerURLFI;
+ VclPtr<Edit> m_pMailerURLED;
+ VclPtr<PushButton> m_pMailerURLPB;
+ VclPtr<VclContainer> m_pSuppressHiddenContainer;
+ VclPtr<FixedImage> m_pSuppressHiddenFI;
+ VclPtr<CheckBox> m_pSuppressHidden;
OUString m_sDefaultFilterName;
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 5be1b1fa39fe..98853d58b743 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -207,12 +207,7 @@ SvxJavaOptionsPage::~SvxJavaOptionsPage()
void SvxJavaOptionsPage::dispose()
{
- delete m_pJavaList;
- m_pJavaList = NULL;
- delete m_pParamDlg;
- m_pParamDlg = NULL;
- delete m_pPathDlg;
- m_pPathDlg = NULL;
+ m_pJavaList.clear();
ClearJavaInfo();
#if HAVE_FEATURE_JAVA
std::vector< JavaInfo* >::iterator pIter;
@@ -225,6 +220,17 @@ void SvxJavaOptionsPage::dispose()
jfw_unlock();
#endif
+ m_pJavaEnableCB.clear();
+ m_pJavaBox.clear();
+ m_pJavaPathText.clear();
+ m_pAddBtn.clear();
+ m_pParameterBtn.clear();
+ m_pClassPathBtn.clear();
+ m_pExpertConfigBtn.clear();
+ m_pExperimentalCB.clear();
+ m_pMacroCB.clear();
+ m_pParamDlg.clear();
+ m_pPathDlg.clear();
SfxTabPage::dispose();
}
@@ -815,6 +821,19 @@ SvxJavaParameterDlg::SvxJavaParameterDlg( vcl::Window* pParent ) :
EnableRemoveButton();
}
+SvxJavaParameterDlg::~SvxJavaParameterDlg()
+{
+ dispose();
+}
+
+void SvxJavaParameterDlg::dispose()
+{
+ m_pParameterEdit.clear();
+ m_pAssignBtn.clear();
+ m_pAssignedList.clear();
+ m_pRemoveBtn.clear();
+ ModalDialog::dispose();
+}
IMPL_LINK_NOARG(SvxJavaParameterDlg, ModifyHdl_Impl)
@@ -955,6 +974,10 @@ void SvxJavaClassPathDlg::dispose()
delete static_cast< OUString* >( m_pPathList->GetEntryData(i) );
m_pPathList = NULL;
}
+ m_pPathList.clear();
+ m_pAddArchiveBtn.clear();
+ m_pAddPathBtn.clear();
+ m_pRemoveBtn.clear();
ModalDialog::dispose();
}
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 4c422011a02f..68ed24427d85 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -51,17 +51,17 @@ class SvxJavaListBox;
class SvxJavaOptionsPage : public SfxTabPage
{
private:
- CheckBox* m_pJavaEnableCB;
- VclContainer* m_pJavaBox;
- SvxJavaListBox* m_pJavaList;
- FixedText* m_pJavaPathText;
- PushButton* m_pAddBtn;
- PushButton* m_pParameterBtn;
- PushButton* m_pClassPathBtn;
- PushButton* m_pExpertConfigBtn;
-
- SvxJavaParameterDlg* m_pParamDlg;
- SvxJavaClassPathDlg* m_pPathDlg;
+ VclPtr<CheckBox> m_pJavaEnableCB;
+ VclPtr<VclContainer> m_pJavaBox;
+ VclPtr<SvxJavaListBox> m_pJavaList;
+ VclPtr<FixedText> m_pJavaPathText;
+ VclPtr<PushButton> m_pAddBtn;
+ VclPtr<PushButton> m_pParameterBtn;
+ VclPtr<PushButton> m_pClassPathBtn;
+ VclPtr<PushButton> m_pExpertConfigBtn;
+
+ VclPtr<SvxJavaParameterDlg> m_pParamDlg;
+ VclPtr<SvxJavaClassPathDlg> m_pPathDlg;
#if HAVE_FEATURE_JAVA
JavaInfo** m_parJavaInfo;
@@ -75,8 +75,8 @@ private:
OUString m_sAddDialogText;
Idle m_aResetIdle;
- CheckBox* m_pExperimentalCB;
- CheckBox* m_pMacroCB;
+ VclPtr<CheckBox> m_pExperimentalCB;
+ VclPtr<CheckBox> m_pMacroCB;
::std::vector< JavaInfo* >
m_aAddedInfos;
@@ -121,11 +121,11 @@ public:
class SvxJavaParameterDlg : public ModalDialog
{
private:
- Edit* m_pParameterEdit;
- PushButton* m_pAssignBtn;
+ VclPtr<Edit> m_pParameterEdit;
+ VclPtr<PushButton> m_pAssignBtn;
- ListBox* m_pAssignedList;
- PushButton* m_pRemoveBtn;
+ VclPtr<ListBox> m_pAssignedList;
+ VclPtr<PushButton> m_pRemoveBtn;
DECL_LINK(ModifyHdl_Impl, void *);
DECL_LINK(AssignHdl_Impl, void *);
@@ -141,6 +141,8 @@ private:
public:
SvxJavaParameterDlg( vcl::Window* pParent );
+ virtual ~SvxJavaParameterDlg();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
@@ -153,10 +155,10 @@ public:
class SvxJavaClassPathDlg : public ModalDialog
{
private:
- ListBox* m_pPathList;
- PushButton* m_pAddArchiveBtn;
- PushButton* m_pAddPathBtn;
- PushButton* m_pRemoveBtn;
+ VclPtr<ListBox> m_pPathList;
+ VclPtr<PushButton> m_pAddArchiveBtn;
+ VclPtr<PushButton> m_pAddPathBtn;
+ VclPtr<PushButton> m_pRemoveBtn;
OUString m_sOldPath;
diff --git a/cui/source/options/optjsearch.cxx b/cui/source/options/optjsearch.cxx
index 707717f34218..263405d1322e 100644
--- a/cui/source/options/optjsearch.cxx
+++ b/cui/source/options/optjsearch.cxx
@@ -55,6 +55,34 @@ SvxJSearchOptionsPage::SvxJSearchOptionsPage( vcl::Window* pParent, const SfxIte
nTransliterationFlags = 0x00000000;
}
+SvxJSearchOptionsPage::~SvxJSearchOptionsPage()
+{
+ dispose();
+}
+
+void SvxJSearchOptionsPage::dispose()
+{
+ m_pMatchCase.clear();
+ m_pMatchFullHalfWidth.clear();
+ m_pMatchHiraganaKatakana.clear();
+ m_pMatchContractions.clear();
+ m_pMatchMinusDashChoon.clear();
+ m_pMatchRepeatCharMarks.clear();
+ m_pMatchVariantFormKanji.clear();
+ m_pMatchOldKanaForms.clear();
+ m_pMatchDiziDuzu.clear();
+ m_pMatchBavaHafa.clear();
+ m_pMatchTsithichiDhizi.clear();
+ m_pMatchHyuiyuByuvyu.clear();
+ m_pMatchSesheZeje.clear();
+ m_pMatchIaiya.clear();
+ m_pMatchKiku.clear();
+ m_pMatchProlongedSoundMark.clear();
+ m_pIgnorePunctuation.clear();
+ m_pIgnoreWhitespace.clear();
+ m_pIgnoreMiddleDot.clear();
+ SfxTabPage::dispose();
+}
SfxTabPage* SvxJSearchOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
diff --git a/cui/source/options/optjsearch.hxx b/cui/source/options/optjsearch.hxx
index 35639dfbff58..70d03acb2b2f 100644
--- a/cui/source/options/optjsearch.hxx
+++ b/cui/source/options/optjsearch.hxx
@@ -32,26 +32,26 @@ class SfxItemSet;
class SvxJSearchOptionsPage : public SfxTabPage
{
private:
- CheckBox* m_pMatchCase;
- CheckBox* m_pMatchFullHalfWidth;
- CheckBox* m_pMatchHiraganaKatakana;
- CheckBox* m_pMatchContractions;
- CheckBox* m_pMatchMinusDashChoon;
- CheckBox* m_pMatchRepeatCharMarks;
- CheckBox* m_pMatchVariantFormKanji;
- CheckBox* m_pMatchOldKanaForms;
- CheckBox* m_pMatchDiziDuzu;
- CheckBox* m_pMatchBavaHafa;
- CheckBox* m_pMatchTsithichiDhizi;
- CheckBox* m_pMatchHyuiyuByuvyu;
- CheckBox* m_pMatchSesheZeje;
- CheckBox* m_pMatchIaiya;
- CheckBox* m_pMatchKiku;
- CheckBox* m_pMatchProlongedSoundMark;
-
- CheckBox* m_pIgnorePunctuation;
- CheckBox* m_pIgnoreWhitespace;
- CheckBox* m_pIgnoreMiddleDot;
+ VclPtr<CheckBox> m_pMatchCase;
+ VclPtr<CheckBox> m_pMatchFullHalfWidth;
+ VclPtr<CheckBox> m_pMatchHiraganaKatakana;
+ VclPtr<CheckBox> m_pMatchContractions;
+ VclPtr<CheckBox> m_pMatchMinusDashChoon;
+ VclPtr<CheckBox> m_pMatchRepeatCharMarks;
+ VclPtr<CheckBox> m_pMatchVariantFormKanji;
+ VclPtr<CheckBox> m_pMatchOldKanaForms;
+ VclPtr<CheckBox> m_pMatchDiziDuzu;
+ VclPtr<CheckBox> m_pMatchBavaHafa;
+ VclPtr<CheckBox> m_pMatchTsithichiDhizi;
+ VclPtr<CheckBox> m_pMatchHyuiyuByuvyu;
+ VclPtr<CheckBox> m_pMatchSesheZeje;
+ VclPtr<CheckBox> m_pMatchIaiya;
+ VclPtr<CheckBox> m_pMatchKiku;
+ VclPtr<CheckBox> m_pMatchProlongedSoundMark;
+
+ VclPtr<CheckBox> m_pIgnorePunctuation;
+ VclPtr<CheckBox> m_pIgnoreWhitespace;
+ VclPtr<CheckBox> m_pIgnoreMiddleDot;
sal_Int32 nTransliterationFlags;
bool bSaveOptions;
@@ -62,6 +62,8 @@ protected:
SvxJSearchOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
public:
+ virtual ~SvxJSearchOptionsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 8e7929e0334f..9c357e682d8d 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -329,10 +329,10 @@ static inline OUString lcl_GetPropertyName( EID_OPTIONS eEntryId )
class OptionsBreakSet : public ModalDialog
{
- VclFrame* m_pBeforeFrame;
- VclFrame* m_pAfterFrame;
- VclFrame* m_pMinimalFrame;
- NumericField* m_pBreakNF;
+ VclPtr<VclFrame> m_pBeforeFrame;
+ VclPtr<VclFrame> m_pAfterFrame;
+ VclPtr<VclFrame> m_pMinimalFrame;
+ VclPtr<NumericField> m_pBreakNF;
public:
OptionsBreakSet(vcl::Window* pParent, sal_uInt16 nRID)
@@ -364,6 +364,15 @@ public:
get(m_pBreakNF, "wordlength");
}
}
+ virtual ~OptionsBreakSet() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ m_pBeforeFrame.clear();
+ m_pAfterFrame.clear();
+ m_pMinimalFrame.clear();
+ m_pBreakNF.clear();
+ ModalDialog::dispose();
+ }
NumericField& GetNumericFld()
{
@@ -1129,6 +1138,17 @@ void SvxLinguTabPage::dispose()
{
delete pLinguData;
pLinguData = NULL;
+ m_pLinguModulesFT.clear();
+ m_pLinguModulesCLB.clear();
+ m_pLinguModulesEditPB.clear();
+ m_pLinguDicsFT.clear();
+ m_pLinguDicsCLB.clear();
+ m_pLinguDicsNewPB.clear();
+ m_pLinguDicsEditPB.clear();
+ m_pLinguDicsDelPB.clear();
+ m_pLinguOptionsCLB.clear();
+ m_pLinguOptionsEditPB.clear();
+ m_pMoreDictsLink.clear();
SfxTabPage::dispose();
}
@@ -1905,6 +1925,13 @@ void SvxEditModulesDlg::dispose()
{
delete pDefaultLinguData;
pDefaultLinguData = NULL;
+ m_pLanguageLB.clear();
+ m_pModulesCLB.clear();
+ m_pPrioUpPB.clear();
+ m_pPrioDownPB.clear();
+ m_pBackPB.clear();
+ m_pMoreDictsLink.clear();
+ m_pClosePB.clear();
ModalDialog::dispose();
}
diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx
index 3f509a431084..79a86d9d6f69 100644
--- a/cui/source/options/optmemory.cxx
+++ b/cui/source/options/optmemory.cxx
@@ -141,6 +141,23 @@ OfaMemoryOptionsPage::OfaMemoryOptionsPage(vcl::Window* pParent, const SfxItemSe
m_pNfGraphicCache->SetModifyHdl( LINK( this, OfaMemoryOptionsPage, GraphicCacheConfigHdl ) );
}
+OfaMemoryOptionsPage::~OfaMemoryOptionsPage()
+{
+ dispose();
+}
+
+void OfaMemoryOptionsPage::dispose()
+{
+ m_pUndoEdit.clear();
+ m_pNfGraphicCache.clear();
+ m_pNfGraphicObjectCache.clear();
+ m_pTfGraphicObjectTime.clear();
+ m_pNfOLECache.clear();
+ m_pQuickStarterFrame.clear();
+ m_pQuickLaunchCB.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* OfaMemoryOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
return new OfaMemoryOptionsPage( pParent, *rAttrSet );
diff --git a/cui/source/options/optmemory.hxx b/cui/source/options/optmemory.hxx
index c3d189f37bdc..91559d99da1e 100644
--- a/cui/source/options/optmemory.hxx
+++ b/cui/source/options/optmemory.hxx
@@ -32,16 +32,16 @@ class OfaMemoryOptionsPage : public SfxTabPage
{
using SfxTabPage::DeactivatePage;
private:
- NumericField* m_pUndoEdit;
+ VclPtr<NumericField> m_pUndoEdit;
- NumericField* m_pNfGraphicCache;
- NumericField* m_pNfGraphicObjectCache;
- TimeField* m_pTfGraphicObjectTime;
+ VclPtr<NumericField> m_pNfGraphicCache;
+ VclPtr<NumericField> m_pNfGraphicObjectCache;
+ VclPtr<TimeField> m_pTfGraphicObjectTime;
- NumericField* m_pNfOLECache;
+ VclPtr<NumericField> m_pNfOLECache;
- VclContainer* m_pQuickStarterFrame;
- CheckBox* m_pQuickLaunchCB;
+ VclPtr<VclContainer> m_pQuickStarterFrame;
+ VclPtr<CheckBox> m_pQuickLaunchCB;
DECL_LINK(GraphicCacheConfigHdl, void *);
@@ -57,6 +57,8 @@ protected:
public:
OfaMemoryOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~OfaMemoryOptionsPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index b6faede94b5e..bd8c7846002b 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -117,6 +117,34 @@ void SvxOpenCLTabPage::dispose()
mpWhiteList.disposeAndClear()
}
+SvxOpenCLTabPage::~SvxOpenCLTabPage()
+{
+ dispose();
+}
+
+void SvxOpenCLTabPage::dispose()
+{
+ mpUseOpenCL.clear();
+ mpBlackListFrame.clear();
+ mpBlackList.clear();
+ mpBlackListTable.clear();
+ mpBlackListEdit.clear();
+ mpBlackListAdd.clear();
+ mpBlackListDelete.clear();
+ mpOS.clear();
+ mpOSVersion.clear();
+ mpDevice.clear();
+ mpVendor.clear();
+ mpDrvVersion.clear();
+ mpWhiteListFrame.clear();
+ mpWhiteList.clear();
+ mpWhiteListTable.clear();
+ mpWhiteListEdit.clear();
+ mpWhiteListAdd.clear();
+ mpWhiteListDelete.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* SvxOpenCLTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
return new SvxOpenCLTabPage(pParent, *rAttrSet);
@@ -194,16 +222,27 @@ class ListEntryDialog : public ModalDialog
public:
OpenCLConfig::ImplMatcher maEntry;
- ListBox* mpOS;
- Edit* mpOSVersion;
- Edit* mpPlatformVendor;
- Edit* mpDevice;
- Edit* mpDriverVersion;
+ VclPtr<ListBox> mpOS;
+ VclPtr<Edit> mpOSVersion;
+ VclPtr<Edit> mpPlatformVendor;
+ VclPtr<Edit> mpDevice;
+ VclPtr<Edit> mpDriverVersion;
DECL_LINK(OSSelectHdl, ListBox*);
DECL_LINK(EditModifiedHdl, Edit*);
ListEntryDialog(vcl::Window* pParent, const OpenCLConfig::ImplMatcher& rEntry, const OString& rTag);
+ virtual ~ListEntryDialog() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE
+ {
+ mpOS.clear();
+ mpOSVersion.clear();
+ mpPlatformVendor.clear();
+ mpDevice.clear();
+ mpDriverVersion.clear();
+ ModalDialog::dispose();
+ }
+
};
ListEntryDialog::ListEntryDialog(vcl::Window* pParent, const OpenCLConfig::ImplMatcher& rEntry, const OString& rTag)
diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx
index 378dd5ab6c7b..067b038e22d7 100644
--- a/cui/source/options/optopencl.hxx
+++ b/cui/source/options/optopencl.hxx
@@ -31,26 +31,26 @@ class SvxOpenCLTabPage : public SfxTabPage
private:
OpenCLConfig maConfig;
- CheckBox* mpUseOpenCL;
-
- VclFrame* mpBlackListFrame;
- SvSimpleTable* mpBlackList;
- SvSimpleTableContainer* mpBlackListTable;
- PushButton* mpBlackListEdit;
- PushButton* mpBlackListAdd;
- PushButton* mpBlackListDelete;
- FixedText* mpOS;
- FixedText* mpOSVersion;
- FixedText* mpDevice;
- FixedText* mpVendor;
- FixedText* mpDrvVersion;
-
- VclFrame* mpWhiteListFrame;
- SvSimpleTable* mpWhiteList;
- SvSimpleTableContainer* mpWhiteListTable;
- PushButton* mpWhiteListEdit;
- PushButton* mpWhiteListAdd;
- PushButton* mpWhiteListDelete;
+ VclPtr<CheckBox> mpUseOpenCL;
+
+ VclPtr<VclFrame> mpBlackListFrame;
+ VclPtr<SvSimpleTable> mpBlackList;
+ VclPtr<SvSimpleTableContainer> mpBlackListTable;
+ VclPtr<PushButton> mpBlackListEdit;
+ VclPtr<PushButton> mpBlackListAdd;
+ VclPtr<PushButton> mpBlackListDelete;
+ VclPtr<FixedText> mpOS;
+ VclPtr<FixedText> mpOSVersion;
+ VclPtr<FixedText> mpDevice;
+ VclPtr<FixedText> mpVendor;
+ VclPtr<FixedText> mpDrvVersion;
+
+ VclPtr<VclFrame> mpWhiteListFrame;
+ VclPtr<SvSimpleTable> mpWhiteList;
+ VclPtr<SvSimpleTableContainer> mpWhiteListTable;
+ VclPtr<PushButton> mpWhiteListEdit;
+ VclPtr<PushButton> mpWhiteListAdd;
+ VclPtr<PushButton> mpWhiteListDelete;
DECL_LINK(BlackListEditHdl, void*);
DECL_LINK(BlackListAddHdl, void*);
@@ -70,6 +70,7 @@ private:
public:
SvxOpenCLTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~SvxOpenCLTabPage();
virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 94de402f231c..7d2d48c9baca 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -256,11 +256,13 @@ void SvxPathTabPage::dispose()
{
for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i )
delete static_cast<PathUserData_Impl*>(pPathBox->GetEntry(i)->GetUserData());
- delete pPathBox;
- pPathBox = NULL;
+ pPathBox.clear();
}
delete pImpl;
pImpl = NULL;
+ m_pPathCtrl.clear();
+ m_pStandardBtn.clear();
+ m_pPathBtn.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 00d3aff38e77..8da1a6cbf11f 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -206,6 +206,23 @@ void SvxSaveTabPage::dispose()
{
delete pImpl;
pImpl = NULL;
+ aLoadUserSettingsCB.clear();
+ aLoadDocPrinterCB.clear();
+ aDocInfoCB.clear();
+ aBackupCB.clear();
+ aAutoSaveCB.clear();
+ aAutoSaveEdit.clear();
+ aMinuteFT.clear();
+ aUserAutoSaveCB.clear();
+ aRelativeFsysCB.clear();
+ aRelativeInetCB.clear();
+ aODFVersionLB.clear();
+ aWarnAlienFormatCB.clear();
+ aDocTypeLB.clear();
+ aSaveAsFT.clear();
+ aSaveAsLB.clear();
+ aODFWarningFI.clear();
+ aODFWarningFT.clear();
SfxTabPage::dispose();
}
diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx
index 87bd682dddcf..0cb7526de828 100644
--- a/cui/source/options/optsave.hxx
+++ b/cui/source/options/optsave.hxx
@@ -42,25 +42,25 @@ struct SvxSaveTabPage_Impl;
class SvxSaveTabPage : public SfxTabPage
{
private:
- CheckBox* aLoadUserSettingsCB;
- CheckBox* aLoadDocPrinterCB;
-
- CheckBox* aDocInfoCB;
- CheckBox* aBackupCB;
- CheckBox* aAutoSaveCB;
- NumericField* aAutoSaveEdit;
- FixedText* aMinuteFT;
- CheckBox* aUserAutoSaveCB;
- CheckBox* aRelativeFsysCB;
- CheckBox* aRelativeInetCB;
-
- ListBox* aODFVersionLB;
- CheckBox* aWarnAlienFormatCB;
- ListBox* aDocTypeLB;
- FixedText* aSaveAsFT;
- ListBox* aSaveAsLB;
- FixedImage* aODFWarningFI;
- FixedText* aODFWarningFT;
+ VclPtr<CheckBox> aLoadUserSettingsCB;
+ VclPtr<CheckBox> aLoadDocPrinterCB;
+
+ VclPtr<CheckBox> aDocInfoCB;
+ VclPtr<CheckBox> aBackupCB;
+ VclPtr<CheckBox> aAutoSaveCB;
+ VclPtr<NumericField> aAutoSaveEdit;
+ VclPtr<FixedText> aMinuteFT;
+ VclPtr<CheckBox> aUserAutoSaveCB;
+ VclPtr<CheckBox> aRelativeFsysCB;
+ VclPtr<CheckBox> aRelativeInetCB;
+
+ VclPtr<ListBox> aODFVersionLB;
+ VclPtr<CheckBox> aWarnAlienFormatCB;
+ VclPtr<ListBox> aDocTypeLB;
+ VclPtr<FixedText> aSaveAsFT;
+ VclPtr<ListBox> aSaveAsLB;
+ VclPtr<FixedImage> aODFWarningFI;
+ VclPtr<FixedText> aODFWarningFT;
SvxSaveTabPage_Impl* pImpl;
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 0c7894c63164..30eb7188e71f 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -82,6 +82,25 @@ SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(vcl::Window* pParent, const SfxIt
UpdateLastCheckedText();
}
+SvxOnlineUpdateTabPage::~SvxOnlineUpdateTabPage()
+{
+ dispose();
+}
+
+void SvxOnlineUpdateTabPage::dispose()
+{
+ m_pAutoCheckCheckBox.clear();
+ m_pEveryDayButton.clear();
+ m_pEveryWeekButton.clear();
+ m_pEveryMonthButton.clear();
+ m_pCheckNowButton.clear();
+ m_pAutoDownloadCheckBox.clear();
+ m_pDestPathLabel.clear();
+ m_pDestPath.clear();
+ m_pChangePathButton.clear();
+ m_pLastChecked.clear();
+ SfxTabPage::dispose();
+}
void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
diff --git a/cui/source/options/optupdt.hxx b/cui/source/options/optupdt.hxx
index ce5362bd94aa..4324cafe34fe 100644
--- a/cui/source/options/optupdt.hxx
+++ b/cui/source/options/optupdt.hxx
@@ -29,16 +29,16 @@
class SvxOnlineUpdateTabPage : public SfxTabPage
{
private:
- CheckBox* m_pAutoCheckCheckBox;
- RadioButton* m_pEveryDayButton;
- RadioButton* m_pEveryWeekButton;
- RadioButton* m_pEveryMonthButton;
- PushButton* m_pCheckNowButton;
- CheckBox* m_pAutoDownloadCheckBox;
- FixedText* m_pDestPathLabel;
- FixedText* m_pDestPath;
- PushButton* m_pChangePathButton;
- FixedText* m_pLastChecked;
+ VclPtr<CheckBox> m_pAutoCheckCheckBox;
+ VclPtr<RadioButton> m_pEveryDayButton;
+ VclPtr<RadioButton> m_pEveryWeekButton;
+ VclPtr<RadioButton> m_pEveryMonthButton;
+ VclPtr<PushButton> m_pCheckNowButton;
+ VclPtr<CheckBox> m_pAutoDownloadCheckBox;
+ VclPtr<FixedText> m_pDestPathLabel;
+ VclPtr<FixedText> m_pDestPath;
+ VclPtr<PushButton> m_pChangePathButton;
+ VclPtr<FixedText> m_pLastChecked;
OUString m_aNeverChecked;
OUString m_aLastCheckedTemplate;
@@ -52,6 +52,8 @@ private:
public:
SvxOnlineUpdateTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ virtual ~SvxOnlineUpdateTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet );
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 1bae7f526f79..e6d73e4dd044 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -92,6 +92,25 @@ SelectPersonaDialog::SelectPersonaDialog( vcl::Window *pParent )
}
}
+SelectPersonaDialog::~SelectPersonaDialog()
+{
+ dispose();
+}
+
+void SelectPersonaDialog::dispose()
+{
+ m_pEdit.clear();
+ m_pSearchButton.clear();
+ m_pProgressLabel.clear();
+ for (VclPtr<PushButton> vp : m_vResultList)
+ vp.clear();
+ for (VclPtr<PushButton> vp : m_vSearchSuggestions)
+ vp.clear();
+ m_pOkButton.clear();
+ m_pCancelButton.clear();
+ ModalDialog::dispose();
+}
+
OUString SelectPersonaDialog::GetSelectedPersona() const
{
if( !m_aSelectedPersona.isEmpty( ) )
@@ -291,6 +310,26 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( vcl::Window *pParent, cons
LoadExtensionThemes();
}
+SvxPersonalizationTabPage::~SvxPersonalizationTabPage()
+{
+ dispose();
+}
+
+void SvxPersonalizationTabPage::dispose()
+{
+ m_pNoPersona.clear();
+ m_pDefaultPersona.clear();
+ m_pOwnPersona.clear();
+ m_pSelectPersona.clear();
+ for (int i=0; i<3; ++i)
+ m_vDefaultPersonaImages[i].clear();
+ m_pExtensionPersonaPreview.clear();
+ m_pPersonaList.clear();
+ m_pExtensionLabel.clear();
+ SfxTabPage::dispose();
+}
+
+
SfxTabPage* SvxPersonalizationTabPage::Create( vcl::Window *pParent, const SfxItemSet *rSet )
{
return new SvxPersonalizationTabPage( pParent, *rSet );
diff --git a/cui/source/options/personalization.hxx b/cui/source/options/personalization.hxx
index 4c147ab926cf..e491d8b1853e 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -25,15 +25,15 @@ class SvxPersonalizationTabPage : public SfxTabPage
using SfxTabPage::DeactivatePage;
private:
- RadioButton *m_pNoPersona; ///< Just the default look, without any bitmap
- RadioButton *m_pDefaultPersona; ///< Use the built-in bitmap
- RadioButton *m_pOwnPersona; ///< Use the user-defined bitmap
- PushButton *m_pSelectPersona; ///< Let the user select in the 'own' case
- PushButton *m_vDefaultPersonaImages[3]; ///< Buttons to show the default persona images
- PushButton *m_pExtensionPersonaPreview; ///< Buttons to show the last 3 personas installed via extensions
- ListBox* m_pPersonaList; ///< The ListBox to show the list of installed personas
+ VclPtr<RadioButton> m_pNoPersona; ///< Just the default look, without any bitmap
+ VclPtr<RadioButton> m_pDefaultPersona; ///< Use the built-in bitmap
+ VclPtr<RadioButton> m_pOwnPersona; ///< Use the user-defined bitmap
+ VclPtr<PushButton> m_pSelectPersona; ///< Let the user select in the 'own' case
+ VclPtr<PushButton> m_vDefaultPersonaImages[3]; ///< Buttons to show the default persona images
+ VclPtr<PushButton> m_pExtensionPersonaPreview; ///< Buttons to show the last 3 personas installed via extensions
+ VclPtr<ListBox> m_pPersonaList; ///< The ListBox to show the list of installed personas
OUString m_aPersonaSettings; ///< Header and footer images + color to be set in the settings.
- FixedText *m_pExtensionLabel; ///< The "select persona installed via extensions" label
+ VclPtr<FixedText> m_pExtensionLabel; ///< The "select persona installed via extensions" label
std::vector<OUString> m_vDefaultPersonaSettings;
std::vector<OUString> m_vExtensionPersonaSettings;
@@ -41,6 +41,8 @@ private:
public:
::rtl::Reference< SearchAndParseThread > m_rApplyThread;
SvxPersonalizationTabPage( vcl::Window *pParent, const SfxItemSet &rSet );
+ virtual ~SvxPersonalizationTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window *pParent, const SfxItemSet *rSet );
@@ -77,13 +79,13 @@ https://addons.mozilla.org/firefox/themes ...
class SelectPersonaDialog : public ModalDialog
{
private:
- Edit *m_pEdit; ///< The input line for the search term
- PushButton *m_pSearchButton; ///< The search button
- FixedText *m_pProgressLabel; ///< The label for showing progress of search
- PushButton *m_vResultList[9]; ///< List of buttons to show search results
- PushButton *m_vSearchSuggestions[5]; ///< List of buttons for the search suggestions
- PushButton *m_pOkButton; ///< The OK button
- PushButton *m_pCancelButton; ///< The Cancel button
+ VclPtr<Edit> m_pEdit; ///< The input line for the search term
+ VclPtr<PushButton> m_pSearchButton; ///< The search button
+ VclPtr<FixedText> m_pProgressLabel; ///< The label for showing progress of search
+ VclPtr<PushButton> m_vResultList[9]; ///< List of buttons to show search results
+ VclPtr<PushButton> m_vSearchSuggestions[5]; ///< List of buttons for the search suggestions
+ VclPtr<PushButton> m_pOkButton; ///< The OK button
+ VclPtr<PushButton> m_pCancelButton; ///< The Cancel button
std::vector<OUString> m_vPersonaSettings;
OUString m_aSelectedPersona;
@@ -91,6 +93,8 @@ private:
public:
SelectPersonaDialog( vcl::Window *pParent );
+ virtual ~SelectPersonaDialog();
+ virtual void dispose() SAL_OVERRIDE;
::rtl::Reference< SearchAndParseThread > m_rSearchThread;
OUString GetSelectedPersona() const;
@@ -113,7 +117,7 @@ class SearchAndParseThread: public salhelper::Thread
{
private:
- SelectPersonaDialog *m_pPersonaDialog;
+ VclPtr<SelectPersonaDialog> m_pPersonaDialog;
OUString m_aURL;
bool m_bExecute;
diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx
index 64d81bc589a4..5071769e2c40 100644
--- a/cui/source/options/securityoptions.cxx
+++ b/cui/source/options/securityoptions.cxx
@@ -72,6 +72,24 @@ SecurityOptionsDialog::SecurityOptionsDialog(vcl::Window* pParent, SvtSecurityOp
*get<FixedImage>("lockblockuntrusted"));
}
+SecurityOptionsDialog::~SecurityOptionsDialog()
+{
+ dispose();
+}
+
+void SecurityOptionsDialog::dispose()
+{
+ m_pSaveOrSendDocsCB.clear();
+ m_pSignDocsCB.clear();
+ m_pPrintDocsCB.clear();
+ m_pCreatePdfCB.clear();
+ m_pRemovePersInfoCB.clear();
+ m_pRecommPasswdCB.clear();
+ m_pCtrlHyperlinkCB.clear();
+ m_pBlockUntrustedRefererLinksCB.clear();
+ ModalDialog::dispose();
+}
+
} // namespace svx
diff --git a/cui/source/options/securityoptions.hxx b/cui/source/options/securityoptions.hxx
index 4581ed7ff072..216e372e945f 100644
--- a/cui/source/options/securityoptions.hxx
+++ b/cui/source/options/securityoptions.hxx
@@ -37,18 +37,20 @@ namespace svx
class SecurityOptionsDialog : public ModalDialog
{
private:
- CheckBox* m_pSaveOrSendDocsCB;
- CheckBox* m_pSignDocsCB;
- CheckBox* m_pPrintDocsCB;
- CheckBox* m_pCreatePdfCB;
+ VclPtr<CheckBox> m_pSaveOrSendDocsCB;
+ VclPtr<CheckBox> m_pSignDocsCB;
+ VclPtr<CheckBox> m_pPrintDocsCB;
+ VclPtr<CheckBox> m_pCreatePdfCB;
- CheckBox* m_pRemovePersInfoCB;
- CheckBox* m_pRecommPasswdCB;
- CheckBox* m_pCtrlHyperlinkCB;
- CheckBox* m_pBlockUntrustedRefererLinksCB;
+ VclPtr<CheckBox> m_pRemovePersInfoCB;
+ VclPtr<CheckBox> m_pRecommPasswdCB;
+ VclPtr<CheckBox> m_pCtrlHyperlinkCB;
+ VclPtr<CheckBox> m_pBlockUntrustedRefererLinksCB;
public:
SecurityOptionsDialog( vcl::Window* pParent, SvtSecurityOptions* pOptions );
+ virtual ~SecurityOptionsDialog();
+ virtual void dispose() SAL_OVERRIDE;
bool IsSaveOrSendDocsChecked() const { return m_pSaveOrSendDocsCB->IsChecked(); }
bool IsSignDocsChecked() const { return m_pSignDocsCB->IsChecked(); }
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 095b6fc3b6c8..f37c797d3f66 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -465,11 +465,11 @@ static bool lcl_isOptionHidden( sal_uInt16 _nPageId, const SvtOptionsDialogOptio
struct OptionsPageInfo
{
- SfxTabPage* m_pPage;
+ VclPtr<SfxTabPage> m_pPage;
sal_uInt16 m_nPageId;
OUString m_sPageURL;
OUString m_sEventHdl;
- ExtensionsTabPage* m_pExtPage;
+ VclPtr<ExtensionsTabPage> m_pExtPage;
OptionsPageInfo( sal_uInt16 nId ) : m_pPage( NULL ), m_nPageId( nId ), m_pExtPage( NULL ) {}
};
@@ -483,7 +483,7 @@ struct OptionsGroupInfo
sal_uInt16 m_nDialogId; // Id of the former dialog
bool m_bLoadError; // load fails?
OUString m_sPageURL;
- ExtensionsTabPage* m_pExtPage;
+ VclPtr<ExtensionsTabPage> m_pExtPage;
OptionsGroupInfo( SfxShell* pSh, SfxModule* pMod, sal_uInt16 nId ) :
m_pInItemSet( NULL ), m_pOutItemSet( NULL ), m_pShell( pSh ),
@@ -575,7 +575,6 @@ void OfaTreeOptionsDialog::dispose()
SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number( pPageInfo->m_nPageId) );
SetViewOptUserItem( aTabPageOpt, aPageData );
}
- delete pPageInfo->m_pPage;
}
if (pPageInfo->m_nPageId == RID_SFXPAGE_LINGU)
@@ -588,8 +587,6 @@ void OfaTreeOptionsDialog::dispose()
}
}
- delete pPageInfo->m_pExtPage;
-
delete pPageInfo;
}
pEntry = pTreeLB->Next(pEntry);
@@ -602,8 +599,8 @@ void OfaTreeOptionsDialog::dispose()
if(!pTreeLB->GetParent(pEntry))
{
OptionsGroupInfo* pGroupInfo = static_cast<OptionsGroupInfo*>(pEntry->GetUserData());
- if ( pGroupInfo && pGroupInfo->m_pExtPage )
- delete pGroupInfo->m_pExtPage;
+ if ( pGroupInfo )
+ pGroupInfo->m_pExtPage.clear();
delete pGroupInfo;
}
pEntry = pTreeLB->Next(pEntry);
@@ -611,7 +608,11 @@ void OfaTreeOptionsDialog::dispose()
delete pColorPageItemSet;
pColorPageItemSet = NULL;
deleteGroupNames();
- pTreeLB = NULL;
+ pOkPB.clear();
+ pBackPB.clear();
+ pTreeLB.clear();
+ pTabBox.clear();
+ mpColorPage.clear();
SfxModalDialog::dispose();
}
@@ -1048,7 +1049,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
{
pPageInfo->m_pPage = ::CreateGeneralTabPage(
pPageInfo->m_nPageId, pTabBox, *pColorPageItemSet );
- mpColorPage = static_cast<SvxColorTabPage*>(pPageInfo->m_pPage);
+ mpColorPage = static_cast<SvxColorTabPage*>(pPageInfo->m_pPage.get());
mpColorPage->SetupForViewFrame( SfxViewFrame::Current() );
}
else
diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx
index 6628b18d4fb5..16fcd75a6de6 100644
--- a/cui/source/options/webconninfo.cxx
+++ b/cui/source/options/webconninfo.cxx
@@ -147,8 +147,10 @@ WebConnectionInfoDialog::~WebConnectionInfoDialog()
void WebConnectionInfoDialog::dispose()
{
- delete m_pPasswordsLB;
- m_pPasswordsLB = NULL;
+ m_pPasswordsLB.clear();
+ m_pRemoveBtn.clear();
+ m_pRemoveAllBtn.clear();
+ m_pChangeBtn.clear();
ModalDialog::dispose();
}
diff --git a/cui/source/options/webconninfo.hxx b/cui/source/options/webconninfo.hxx
index 2cd37eb03f5e..a9d1b566d592 100644
--- a/cui/source/options/webconninfo.hxx
+++ b/cui/source/options/webconninfo.hxx
@@ -47,10 +47,10 @@ namespace svx
class WebConnectionInfoDialog : public ModalDialog
{
private:
- PasswordTable* m_pPasswordsLB;
- PushButton* m_pRemoveBtn;
- PushButton* m_pRemoveAllBtn;
- PushButton* m_pChangeBtn;
+ VclPtr<PasswordTable> m_pPasswordsLB;
+ VclPtr<PushButton> m_pRemoveBtn;
+ VclPtr<PushButton> m_pRemoveAllBtn;
+ VclPtr<PushButton> m_pChangeBtn;
sal_Int32 m_nPos;
DECL_LINK( HeaderBarClickedHdl, SvSimpleTable* );