diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-17 13:51:33 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-17 19:58:30 +0100 |
commit | 85b01322b6384ae13818c22659b99bfcc94e06fe (patch) | |
tree | d69cf3ae28f24e7b4075771dd61ca879fe72d0aa /cui/source/options | |
parent | sfx2: convert new to ::Create. (diff) | |
download | core-85b01322b6384ae13818c22659b99bfcc94e06fe.tar.gz core-85b01322b6384ae13818c22659b99bfcc94e06fe.zip |
Fix SfxTabPage creation to use VclPtr.
Change-Id: Ia0e8b666daec7b5eaba119c758b9ca1ec8276128
Diffstat (limited to 'cui/source/options')
43 files changed, 107 insertions, 122 deletions
diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index a8ae9c686c9d..562c762aaecf 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -343,12 +343,11 @@ namespace offapp SfxTabPage::dispose(); } - SfxTabPage* ConnectionPoolOptionsPage::Create(vcl::Window* _pParent, const SfxItemSet* _rAttrSet) + VclPtr<SfxTabPage> ConnectionPoolOptionsPage::Create(vcl::Window* _pParent, const SfxItemSet* _rAttrSet) { - return new ConnectionPoolOptionsPage(_pParent, *_rAttrSet); + return VclPtr<ConnectionPoolOptionsPage>::Create(_pParent, *_rAttrSet); } - void ConnectionPoolOptionsPage::implInitControls(const SfxItemSet& _rSet, bool /*_bFromReset*/) { // the enabled flag diff --git a/cui/source/options/connpooloptions.hxx b/cui/source/options/connpooloptions.hxx index 8650d121ce16..d8e4c2556df8 100644 --- a/cui/source/options/connpooloptions.hxx +++ b/cui/source/options/connpooloptions.hxx @@ -47,13 +47,11 @@ namespace offapp VclPtr<FixedText> m_pTimeoutLabel; VclPtr<NumericField> m_pTimeout; - protected: - ConnectionPoolOptionsPage(vcl::Window* _pParent, const SfxItemSet& _rAttrSet); - public: + ConnectionPoolOptionsPage(vcl::Window* _pParent, const SfxItemSet& _rAttrSet); virtual ~ConnectionPoolOptionsPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create(vcl::Window* _pParent, const SfxItemSet* _rAttrSet); + static VclPtr<SfxTabPage> Create(vcl::Window* _pParent, const SfxItemSet* _rAttrSet); protected: virtual bool Notify( NotifyEvent& _rNEvt ) SAL_OVERRIDE; diff --git a/cui/source/options/cuisrchdlg.cxx b/cui/source/options/cuisrchdlg.cxx index 805c8da68f70..bff4d1a74c8e 100644 --- a/cui/source/options/cuisrchdlg.cxx +++ b/cui/source/options/cuisrchdlg.cxx @@ -54,8 +54,9 @@ SvxJSearchOptionsDialog::SvxJSearchOptionsDialog(vcl::Window *pParent, { // pPage will be implicitly destroyed by the // SfxSingleTabDialog destructor - pPage = static_cast<SvxJSearchOptionsPage *>( - SvxJSearchOptionsPage::Create(get_content_area(), &rOptionsSet )); + pPage.reset( static_cast<SvxJSearchOptionsPage *>( + SvxJSearchOptionsPage::Create( + get_content_area(), &rOptionsSet ).get() ) ); SetTabPage( pPage ); //! implicitly calls pPage->Reset(...)! pPage->EnableSaveOptions(false); } diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index aa90f37c9ae6..679e313a7eb3 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -78,7 +78,7 @@ DatabaseRegistrationDialog::DatabaseRegistrationDialog( vcl::Window* pParent, co : RegistrationItemSetHolder(rInAttrs) , SfxSingleTabDialog(pParent, getRegistrationItems()) { - SfxTabPage* page = DbRegistrationOptionsPage::Create(get_content_area(), &getRegistrationItems()); + VclPtr<SfxTabPage> page = DbRegistrationOptionsPage::Create(get_content_area(), &getRegistrationItems()); SetTabPage(page); SetText(page->get<VclFrame>("frame1")->get_label()); } @@ -180,10 +180,10 @@ void DbRegistrationOptionsPage::dispose() -SfxTabPage* DbRegistrationOptionsPage::Create( vcl::Window* pParent, +VclPtr<SfxTabPage> DbRegistrationOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return ( new DbRegistrationOptionsPage( pParent, *rAttrSet ) ); + return VclPtr<DbRegistrationOptionsPage>::Create( pParent, *rAttrSet ); } diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index ae6a02c5fe54..5fc134c5afa3 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -160,10 +160,10 @@ void SvxFontSubstTabPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SvxFontSubstTabPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet) +VclPtr<SfxTabPage> SvxFontSubstTabPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet) { - return new SvxFontSubstTabPage(pParent, *rAttrSet); + return VclPtr<SvxFontSubstTabPage>::Create(pParent, *rAttrSet); } bool SvxFontSubstTabPage::FillItemSet( SfxItemSet* ) diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx index 3a5b967a3908..27847da31464 100644 --- a/cui/source/options/fontsubs.hxx +++ b/cui/source/options/fontsubs.hxx @@ -91,12 +91,12 @@ class SvxFontSubstTabPage : public SfxTabPage void CheckEnable(); - SvxFontSubstTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxFontSubstTabPage(); virtual void dispose() SAL_OVERRIDE; public: - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); + SvxFontSubstTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); + static VclPtr<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/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx index d6b78b86555c..d781ed26dd54 100644 --- a/cui/source/options/optaccessibility.cxx +++ b/cui/source/options/optaccessibility.cxx @@ -77,9 +77,9 @@ void SvxAccessibilityOptionsTabPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SvxAccessibilityOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxAccessibilityOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return new SvxAccessibilityOptionsTabPage(pParent, *rAttrSet); + return VclPtr<SvxAccessibilityOptionsTabPage>::Create(pParent, *rAttrSet); } bool SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet* ) diff --git a/cui/source/options/optaccessibility.hxx b/cui/source/options/optaccessibility.hxx index 0a33851b6f56..16e4c3a97bd3 100644 --- a/cui/source/options/optaccessibility.hxx +++ b/cui/source/options/optaccessibility.hxx @@ -40,13 +40,12 @@ class SvxAccessibilityOptionsTabPage : public SfxTabPage SvxAccessibilityOptionsTabPage_Impl* m_pImpl; - SvxAccessibilityOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); public: - + SvxAccessibilityOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxAccessibilityOptionsTabPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + static VclPtr<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/optasian.cxx b/cui/source/options/optasian.cxx index fb2dc014918a..c16711f621a4 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -174,9 +174,9 @@ void SvxAsianLayoutPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SvxAsianLayoutPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxAsianLayoutPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return new SvxAsianLayoutPage(pParent, *rAttrSet); + return VclPtr<SvxAsianLayoutPage>::Create(pParent, *rAttrSet); } bool SvxAsianLayoutPage::FillItemSet( SfxItemSet* ) diff --git a/cui/source/options/optbasic.cxx b/cui/source/options/optbasic.cxx index fdc362a0c14c..913b8a230f0f 100644 --- a/cui/source/options/optbasic.cxx +++ b/cui/source/options/optbasic.cxx @@ -148,9 +148,9 @@ void SvxBasicIDEOptionsPage::Reset( const SfxItemSet* /*rSet*/ ) pUseExtendedTypesChk->SaveValue(); } -SfxTabPage* SvxBasicIDEOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxBasicIDEOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return ( new SvxBasicIDEOptionsPage( pParent, *rAttrSet ) ); + return VclPtr<SvxBasicIDEOptionsPage>::Create( pParent, *rAttrSet ); } void SvxBasicIDEOptionsPage::FillUserData() diff --git a/cui/source/options/optbasic.hxx b/cui/source/options/optbasic.hxx index 9aaced3eb2a9..dc617b1fea3a 100644 --- a/cui/source/options/optbasic.hxx +++ b/cui/source/options/optbasic.hxx @@ -41,7 +41,7 @@ public: virtual ~SvxBasicIDEOptionsPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet ); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; virtual void FillUserData() SAL_OVERRIDE; diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index 68fe0181527f..f9e3c0e22d40 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -119,9 +119,9 @@ void SvxDefaultColorOptPage::Construct() } -SfxTabPage* SvxDefaultColorOptPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrs ) +VclPtr<SfxTabPage> SvxDefaultColorOptPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrs ) { - return new SvxDefaultColorOptPage( pParent, *rAttrs ); + return VclPtr<SvxDefaultColorOptPage>::Create( pParent, *rAttrs ); } bool SvxDefaultColorOptPage::FillItemSet( SfxItemSet* rOutAttrs ) diff --git a/cui/source/options/optchart.hxx b/cui/source/options/optchart.hxx index ff6970627113..506b9c87f1a0 100644 --- a/cui/source/options/optchart.hxx +++ b/cui/source/options/optchart.hxx @@ -59,7 +59,7 @@ public: void Construct(); - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rInAttrs ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rInAttrs ); virtual bool FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rInAttrs ) SAL_OVERRIDE; }; diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 59ba76fd614a..4c5834d463d7 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -1102,9 +1102,9 @@ void SvxColorOptionsTabPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SvxColorOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxColorOptionsTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return ( new SvxColorOptionsTabPage( pParent, *rAttrSet ) ); + return VclPtr<SvxColorOptionsTabPage>::Create( pParent, *rAttrSet ); } bool SvxColorOptionsTabPage::FillItemSet( SfxItemSet* ) diff --git a/cui/source/options/optcolor.hxx b/cui/source/options/optcolor.hxx index f5c31bdb1ac1..7ce24b8770d5 100644 --- a/cui/source/options/optcolor.hxx +++ b/cui/source/options/optcolor.hxx @@ -51,7 +51,7 @@ public: virtual ~SvxColorOptionsTabPage( ); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + static VclPtr<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/optctl.cxx b/cui/source/options/optctl.cxx index ab25dfd141e9..652bba938bf9 100644 --- a/cui/source/options/optctl.cxx +++ b/cui/source/options/optctl.cxx @@ -73,9 +73,9 @@ void SvxCTLOptionsPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SvxCTLOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxCTLOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return new SvxCTLOptionsPage( pParent, *rAttrSet ); + return VclPtr<SvxCTLOptionsPage>::Create( pParent, *rAttrSet ); } bool SvxCTLOptionsPage::FillItemSet( SfxItemSet* ) diff --git a/cui/source/options/optctl.hxx b/cui/source/options/optctl.hxx index 4c086eb90726..ac2544d47c27 100644 --- a/cui/source/options/optctl.hxx +++ b/cui/source/options/optctl.hxx @@ -41,12 +41,11 @@ private: DECL_LINK( SequenceCheckingCB_Hdl, void* ); - SvxCTLOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet ); - public: + SvxCTLOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxCTLOptionsPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + static VclPtr<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/optfltr.cxx b/cui/source/options/optfltr.cxx index 13d81a999d76..4b56daa9145f 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -85,10 +85,10 @@ IMPL_LINK_NOARG(OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl) return 0; } -SfxTabPage* OfaMSFilterTabPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> OfaMSFilterTabPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { - return new OfaMSFilterTabPage( pParent, *rAttrSet ); + return VclPtr<OfaMSFilterTabPage>::Create( pParent, *rAttrSet ); } bool OfaMSFilterTabPage::FillItemSet( SfxItemSet* ) @@ -193,10 +193,10 @@ void OfaMSFilterTabPage2::dispose() SfxTabPage::dispose(); } -SfxTabPage* OfaMSFilterTabPage2::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> OfaMSFilterTabPage2::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { - return new OfaMSFilterTabPage2( pParent, *rAttrSet ); + return VclPtr<OfaMSFilterTabPage2>::Create( pParent, *rAttrSet ); } bool OfaMSFilterTabPage2::FillItemSet( SfxItemSet* ) diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx index 8a38d43de0ce..221c705f3ae1 100644 --- a/cui/source/options/optfltr.hxx +++ b/cui/source/options/optfltr.hxx @@ -36,15 +36,15 @@ class OfaMSFilterTabPage : public SfxTabPage VclPtr<CheckBox> aPBasicCodeCB; VclPtr<CheckBox> aPBasicStgCB; - OfaMSFilterTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); DECL_LINK(LoadWordBasicCheckHdl_Impl, void *); DECL_LINK(LoadExcelBasicCheckHdl_Impl, void *); public: + OfaMSFilterTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~OfaMSFilterTabPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; @@ -87,7 +87,6 @@ class OfaMSFilterTabPage2 : public SfxTabPage VclPtr<RadioButton> aHighlightingRB; VclPtr<RadioButton> aShadingRB; - OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~OfaMSFilterTabPage2(); virtual void dispose() SAL_OVERRIDE; @@ -97,8 +96,8 @@ class OfaMSFilterTabPage2 : public SfxTabPage SvTreeListEntry* GetEntry4Type( sal_IntPtr _nType ) const; public: - - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet& rSet ); + static VclPtr<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/optgdlg.cxx b/cui/source/options/optgdlg.cxx index e33ee969dee3..421fa06c33af 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -328,9 +328,9 @@ void OfaMiscTabPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* OfaMiscTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> OfaMiscTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return new OfaMiscTabPage( pParent, *rAttrSet ); + return VclPtr<OfaMiscTabPage>::Create( pParent, *rAttrSet ); } bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet ) @@ -757,9 +757,9 @@ IMPL_LINK( OfaViewTabPage, OnSelectionToggled, void*, NOTINTERESTEDIN ) return 0; } -SfxTabPage* OfaViewTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> OfaViewTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return new OfaViewTabPage(pParent, *rAttrSet); + return VclPtr<OfaViewTabPage>::Create(pParent, *rAttrSet); } bool OfaViewTabPage::FillItemSet( SfxItemSet* ) @@ -1274,9 +1274,9 @@ void OfaLanguagesTabPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* OfaLanguagesTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> OfaLanguagesTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return new OfaLanguagesTabPage(pParent, *rAttrSet); + return VclPtr<OfaLanguagesTabPage>::Create(pParent, *rAttrSet); } static void lcl_UpdateAndDelete(SfxVoidItem* pInvalidItems[], SfxBoolItem* pBoolItems[], sal_uInt16 nCount) diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index 19ec2a06ef56..dd9fe86db86f 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -77,7 +77,7 @@ public: virtual ~OfaMiscTabPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; @@ -135,7 +135,7 @@ public: virtual ~OfaViewTabPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; @@ -180,7 +180,7 @@ public: virtual ~OfaLanguagesTabPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + static VclPtr<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/optgenrl.cxx b/cui/source/options/optgenrl.cxx index 5986df31380e..aca396d94ba9 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -301,9 +301,9 @@ void SvxGeneralTabPage::SetLinks () -SfxTabPage* SvxGeneralTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxGeneralTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return ( new SvxGeneralTabPage( pParent, *rAttrSet ) ); + return VclPtr<SvxGeneralTabPage>::Create( pParent, *rAttrSet ); } diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx index 8860af692b7d..8298bd6c6e6b 100644 --- a/cui/source/options/opthtml.cxx +++ b/cui/source/options/opthtml.cxx @@ -110,10 +110,10 @@ void OfaHtmlTabPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* OfaHtmlTabPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> OfaHtmlTabPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { - return new OfaHtmlTabPage(pParent, *rAttrSet); + return VclPtr<OfaHtmlTabPage>::Create(pParent, *rAttrSet); } bool OfaHtmlTabPage::FillItemSet( SfxItemSet* ) diff --git a/cui/source/options/opthtml.hxx b/cui/source/options/opthtml.hxx index 0e17f48330e6..6977795feb65 100644 --- a/cui/source/options/opthtml.hxx +++ b/cui/source/options/opthtml.hxx @@ -52,13 +52,13 @@ class OfaHtmlTabPage : public SfxTabPage 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 ); + OfaHtmlTabPage(vcl::Window* pParent, const SfxItemSet& rSet); + static VclPtr<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/optinet2.cxx b/cui/source/options/optinet2.cxx index 53b1ee22c127..766a4748f44c 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -241,9 +241,9 @@ void SvxProxyTabPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SvxProxyTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxProxyTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return new SvxProxyTabPage(pParent, *rAttrSet); + return VclPtr<SvxProxyTabPage>::Create(pParent, *rAttrSet); } void SvxProxyTabPage::ReadConfigData_Impl() @@ -914,9 +914,9 @@ void SvxSecurityTabPage::InitControls() } } -SfxTabPage* SvxSecurityTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxSecurityTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return new SvxSecurityTabPage(pParent, *rAttrSet); + return VclPtr<SfxTabPage>(new SvxSecurityTabPage(pParent, *rAttrSet), SAL_NO_ACQUIRE); } void SvxSecurityTabPage::ActivatePage( const SfxItemSet& ) @@ -1030,9 +1030,9 @@ void SvxEMailTabPage::dispose() /* -------------------------------------------------------------------------*/ -SfxTabPage* SvxEMailTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxEMailTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return new SvxEMailTabPage(pParent, *rAttrSet); + return VclPtr<SvxEMailTabPage>::Create(pParent, *rAttrSet); } /* -------------------------------------------------------------------------*/ diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx index 6aa6d4c8afc4..ee9b46a9c69d 100644 --- a/cui/source/options/optinet2.hxx +++ b/cui/source/options/optinet2.hxx @@ -98,12 +98,11 @@ private: DECL_LINK( ProxyHdl_Impl, ListBox * ); DECL_LINK( LoseFocusHdl_Impl, Edit * ); - SvxProxyTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); - public: + SvxProxyTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxProxyTabPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; }; @@ -176,7 +175,7 @@ protected: virtual int DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE; public: - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; }; @@ -203,7 +202,7 @@ public: virtual ~SvxEMailTabPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + static VclPtr<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/optjava.cxx b/cui/source/options/optjava.cxx index 3e050b12873d..98eb903ba218 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -651,9 +651,9 @@ void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder ) -SfxTabPage* SvxJavaOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxJavaOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return ( new SvxJavaOptionsPage( pParent, *rAttrSet ) ); + return VclPtr<SvxJavaOptionsPage>::Create( pParent, *rAttrSet ); } diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx index 68ed24427d85..ffe299b7c628 100644 --- a/cui/source/options/optjava.hxx +++ b/cui/source/options/optjava.hxx @@ -109,7 +109,7 @@ public: virtual ~SvxJavaOptionsPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet ); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; diff --git a/cui/source/options/optjsearch.cxx b/cui/source/options/optjsearch.cxx index 4b1696fbeb54..2bd5401acac5 100644 --- a/cui/source/options/optjsearch.cxx +++ b/cui/source/options/optjsearch.cxx @@ -84,9 +84,9 @@ void SvxJSearchOptionsPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SvxJSearchOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) +VclPtr<SfxTabPage> SvxJSearchOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { - return new SvxJSearchOptionsPage( pParent, *rSet ); + return VclPtr<SvxJSearchOptionsPage>::Create( pParent, *rSet ); } diff --git a/cui/source/options/optjsearch.hxx b/cui/source/options/optjsearch.hxx index 70d03acb2b2f..26fed46c9c3a 100644 --- a/cui/source/options/optjsearch.hxx +++ b/cui/source/options/optjsearch.hxx @@ -58,13 +58,11 @@ private: sal_Int32 GetTransliterationFlags_Impl(); -protected: - SvxJSearchOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet ); - public: + SvxJSearchOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SvxJSearchOptionsPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet ); virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 48a326be2a5e..54d4fe51598f 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1152,10 +1152,11 @@ void SvxLinguTabPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SvxLinguTabPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxLinguTabPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { - return ( new SvxLinguTabPage( pParent, *rAttrSet ) ); + return VclPtr<SfxTabPage>( new SvxLinguTabPage( pParent, *rAttrSet ), + SAL_NO_ACQUIRE ); } diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx index 0dc00ee33168..cfc0cbe1a9ca 100644 --- a/cui/source/options/optmemory.cxx +++ b/cui/source/options/optmemory.cxx @@ -158,9 +158,9 @@ void OfaMemoryOptionsPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* OfaMemoryOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> OfaMemoryOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return new OfaMemoryOptionsPage( pParent, *rAttrSet ); + return VclPtr<OfaMemoryOptionsPage>::Create( pParent, *rAttrSet ); } bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet* rSet ) diff --git a/cui/source/options/optmemory.hxx b/cui/source/options/optmemory.hxx index 91559d99da1e..74f2859cfb80 100644 --- a/cui/source/options/optmemory.hxx +++ b/cui/source/options/optmemory.hxx @@ -60,7 +60,7 @@ public: virtual ~OfaMemoryOptionsPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + static VclPtr<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/optopencl.cxx b/cui/source/options/optopencl.cxx index c98ce9a4a76b..e83dcde59a61 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -136,9 +136,9 @@ void SvxOpenCLTabPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SvxOpenCLTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxOpenCLTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return new SvxOpenCLTabPage(pParent, *rAttrSet); + return VclPtr<SvxOpenCLTabPage>::Create(pParent, *rAttrSet); } bool SvxOpenCLTabPage::FillItemSet( SfxItemSet* ) diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx index 067b038e22d7..09eb097609fd 100644 --- a/cui/source/options/optopencl.hxx +++ b/cui/source/options/optopencl.hxx @@ -73,7 +73,7 @@ public: virtual ~SvxOpenCLTabPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet ); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 8b1e967136d4..dd87bbc7eca0 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -266,14 +266,12 @@ void SvxPathTabPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SvxPathTabPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxPathTabPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { - return ( new SvxPathTabPage( pParent, *rAttrSet ) ); + return VclPtr<SvxPathTabPage>::Create( pParent, *rAttrSet ); } - - bool SvxPathTabPage::FillItemSet( SfxItemSet* ) { for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i ) diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index a8a9280b7dd3..a57f3e0dca35 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -226,13 +226,12 @@ void SvxSaveTabPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SfxSaveTabPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SfxSaveTabPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { - return ( new SfxSaveTabPage( pParent, *rAttrSet ) ); + return VclPtr<SfxSaveTabPage>::Create( pParent, *rAttrSet ); } - void SfxSaveTabPage::DetectHiddenControls() { SvtOptionsDialogOptions aOptionsDlgOpt; diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx index 0cb7526de828..f64dc0a82495 100644 --- a/cui/source/options/optsave.hxx +++ b/cui/source/options/optsave.hxx @@ -75,7 +75,7 @@ public: virtual ~SvxSaveTabPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + static VclPtr<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/optupdt.cxx b/cui/source/options/optupdt.cxx index 536e444c85e5..5f66f5bbbd43 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -160,17 +160,12 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText() m_pLastChecked->SetText( aText ); } - - -SfxTabPage* +VclPtr<SfxTabPage> SvxOnlineUpdateTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return new SvxOnlineUpdateTabPage( pParent, *rAttrSet ); + return VclPtr<SvxOnlineUpdateTabPage>::Create( pParent, *rAttrSet ); } - - - bool SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet* ) { bool bModified = false; diff --git a/cui/source/options/optupdt.hxx b/cui/source/options/optupdt.hxx index 4324cafe34fe..ec749adc16c8 100644 --- a/cui/source/options/optupdt.hxx +++ b/cui/source/options/optupdt.hxx @@ -55,7 +55,7 @@ public: virtual ~SvxOnlineUpdateTabPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet ); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index eeabbcdeb84e..f19cfb4589d9 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -330,9 +330,9 @@ void SvxPersonalizationTabPage::dispose() } -SfxTabPage* SvxPersonalizationTabPage::Create( vcl::Window *pParent, const SfxItemSet *rSet ) +VclPtr<SfxTabPage> SvxPersonalizationTabPage::Create( vcl::Window *pParent, const SfxItemSet *rSet ) { - return new SvxPersonalizationTabPage( pParent, *rSet ); + return VclPtr<SvxPersonalizationTabPage>::Create( pParent, *rSet ); } bool SvxPersonalizationTabPage::FillItemSet( SfxItemSet * ) diff --git a/cui/source/options/personalization.hxx b/cui/source/options/personalization.hxx index e491d8b1853e..0ec920db2704 100644 --- a/cui/source/options/personalization.hxx +++ b/cui/source/options/personalization.hxx @@ -44,7 +44,7 @@ public: virtual ~SvxPersonalizationTabPage(); virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window *pParent, const SfxItemSet *rSet ); + static VclPtr<SfxTabPage> Create( vcl::Window *pParent, const SfxItemSet *rSet ); /// Apply the settings ([OK] button). virtual bool FillItemSet( SfxItemSet *rSet ) SAL_OVERRIDE; diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index ab31348d2479..02e2f17c82da 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -291,7 +291,7 @@ void MailMergeCfg_Impl::Notify( const com::sun::star::uno::Sequence< OUString >& } //typedef SfxTabPage* (*FNCreateTabPage)( vcl::Window *pParent, const SfxItemSet &rAttrSet ); -SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) +VclPtr<SfxTabPage> CreateGeneralTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) { CreateTabPage fnCreate = 0; switch(nId) @@ -332,7 +332,7 @@ SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, vcl::Window* pParent, const Sf #endif } - SfxTabPage* pRet = fnCreate ? (*fnCreate)( pParent, &rSet ) : NULL; + VclPtr<SfxTabPage> pRet = fnCreate ? (*fnCreate)( pParent, &rSet ) : nullptr; return pRet; } @@ -1050,17 +1050,17 @@ void OfaTreeOptionsDialog::SelectHdl_Impl() if(pPageInfo->m_nPageId == RID_SVXPAGE_COLOR) { - pPageInfo->m_pPage = ::CreateGeneralTabPage( - pPageInfo->m_nPageId, pTabBox, *pColorPageItemSet ); + pPageInfo->m_pPage.reset( ::CreateGeneralTabPage( + pPageInfo->m_nPageId, pTabBox, *pColorPageItemSet ) ); mpColorPage = static_cast<SvxColorTabPage*>(pPageInfo->m_pPage.get()); mpColorPage->SetupForViewFrame( SfxViewFrame::Current() ); } else { - pPageInfo->m_pPage = ::CreateGeneralTabPage(pPageInfo->m_nPageId, pTabBox, *pGroupInfo->m_pInItemSet ); + pPageInfo->m_pPage.reset( ::CreateGeneralTabPage(pPageInfo->m_nPageId, pTabBox, *pGroupInfo->m_pInItemSet ) ); if(!pPageInfo->m_pPage && pGroupInfo->m_pModule) - pPageInfo->m_pPage = pGroupInfo->m_pModule->CreateTabPage(pPageInfo->m_nPageId, pTabBox, *pGroupInfo->m_pInItemSet); + pPageInfo->m_pPage.reset( pGroupInfo->m_pModule->CreateTabPage(pPageInfo->m_nPageId, pTabBox, *pGroupInfo->m_pInItemSet) ); } |