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 /sw/source/ui/fldui | |
parent | d8ebd9044177e1269c8c81c4c0e3ff53d875247a (diff) |
Fix SfxTabPage creation to use VclPtr.
Change-Id: Ia0e8b666daec7b5eaba119c758b9ca1ec8276128
Diffstat (limited to 'sw/source/ui/fldui')
-rw-r--r-- | sw/source/ui/fldui/flddb.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddb.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddinf.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddinf.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddok.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddok.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldedt.cxx | 19 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldfunc.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldfunc.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldref.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldvar.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldvar.hxx | 2 |
13 files changed, 26 insertions, 29 deletions
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index 4e1607937134..edde37524594 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -264,8 +264,8 @@ bool SwFldDBPage::FillItemSet(SfxItemSet* ) return false; } -SfxTabPage* SwFldDBPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SwFldDBPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { return VclPtr<SwFldDBPage>::Create( pParent, *rAttrSet ); } diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx index a54efb90095d..bb18eb27fe82 100644 --- a/sw/source/ui/fldui/flddb.hxx +++ b/sw/source/ui/fldui/flddb.hxx @@ -73,7 +73,7 @@ public: virtual ~SwFldDBPage(); 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/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index d77fdf605cf8..8814ceb3c3f9 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -462,8 +462,8 @@ bool SwFldDokInfPage::FillItemSet(SfxItemSet* ) return false; } -SfxTabPage* SwFldDokInfPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SwFldDokInfPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { return VclPtr<SwFldDokInfPage>::Create( pParent, *rAttrSet ); } diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx index 5b7f44451a4d..fc9452075b4a 100644 --- a/sw/source/ui/fldui/flddinf.hxx +++ b/sw/source/ui/fldui/flddinf.hxx @@ -64,7 +64,7 @@ public: virtual ~SwFldDokInfPage(); 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/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index cd0be8b3a5b6..f8dc98f74e6a 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -653,8 +653,8 @@ bool SwFldDokPage::FillItemSet(SfxItemSet* ) return false; } -SfxTabPage* SwFldDokPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SwFldDokPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { return VclPtr<SwFldDokPage>::Create( pParent, *rAttrSet ); } diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx index ab98dc558cd3..3beb6a7c0a1b 100644 --- a/sw/source/ui/fldui/flddok.hxx +++ b/sw/source/ui/fldui/flddok.hxx @@ -66,7 +66,7 @@ public: virtual ~SwFldDokPage(); 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/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 2bcc08d16209..1b7906b02368 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -124,7 +124,7 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) // initialise controls void SwFldEditDlg::Init() { - SwFldPage* pTabPage = static_cast<SwFldPage*>(GetTabPage()); + VclPtr<SwFldPage> pTabPage = static_cast<SwFldPage*>(GetTabPage()); if( pTabPage ) { @@ -159,10 +159,10 @@ void SwFldEditDlg::Init() !pSh->HasReadonlySel() ); } -SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup) +VclPtr<SfxTabPage> SwFldEditDlg::CreatePage(sal_uInt16 nGroup) { // create TabPage - SfxTabPage* pTabPage = 0; + VclPtr<SfxTabPage> pTabPage; switch (nGroup) { @@ -193,7 +193,7 @@ SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup) } case GRP_DB: pTabPage = SwFldDBPage::Create(get_content_area(), 0); - static_cast<SwFldDBPage*>(pTabPage)->SetWrtShell(*pSh); + static_cast<SwFldDBPage*>(pTabPage.get())->SetWrtShell(*pSh); break; case GRP_VAR: pTabPage = SwFldVarPage::Create(get_content_area(), 0); @@ -205,7 +205,7 @@ SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup) if (pTabPage) { - static_cast<SwFldPage*>(pTabPage)->SetWrtShell(pSh); + static_cast<SwFldPage*>(pTabPage.get())->SetWrtShell(pSh); SetTabPage(pTabPage); } @@ -244,12 +244,9 @@ IMPL_LINK_NOARG(SwFldEditDlg, OKHdl) { if (GetOKButton()->IsEnabled()) { - SfxTabPage* pTabPage = GetTabPage(); + VclPtr<SfxTabPage> pTabPage = GetTabPage(); if (pTabPage) - { pTabPage->FillItemSet(0); - - } EndDialog( RET_OK ); } @@ -270,7 +267,7 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton ) pSh->EnterStdMode(); SwFieldType *pOldTyp = 0; - SwFldPage* pTabPage = static_cast<SwFldPage*>(GetTabPage()); + VclPtr<SwFldPage> pTabPage = static_cast<SwFldPage*>(GetTabPage()); //#112462# FillItemSet may delete the current field //that's why it has to be called before accessing the current field @@ -290,7 +287,7 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton ) sal_uInt16 nGroup = rMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType()); if (nGroup != pTabPage->GetGroup()) - pTabPage = static_cast<SwFldPage*>(CreatePage(nGroup)); + pTabPage = static_cast<SwFldPage*>(CreatePage(nGroup).get()); pTabPage->EditNewField(); diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index b2cfeb365c16..f079e8787d90 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -628,8 +628,8 @@ OUString SwFldFuncPage::TurnMacroString(const OUString &rMacro) return rMacro; } -SfxTabPage* SwFldFuncPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SwFldFuncPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { return VclPtr<SwFldFuncPage>::Create( pParent, *rAttrSet ); } diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx index 6ec851baa848..fefc9db21ac4 100644 --- a/sw/source/ui/fldui/fldfunc.hxx +++ b/sw/source/ui/fldui/fldfunc.hxx @@ -88,7 +88,7 @@ public: virtual ~SwFldFuncPage(); 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/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index e421f1f43932..f704afcf1bd3 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -950,8 +950,8 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) return false; } -SfxTabPage* SwFldRefPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SwFldRefPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { return VclPtr<SwFldRefPage>::Create( pParent, *rAttrSet ); } diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx index 959c1e00382f..24c540f181f7 100644 --- a/sw/source/ui/fldui/fldref.hxx +++ b/sw/source/ui/fldui/fldref.hxx @@ -79,7 +79,7 @@ public: virtual ~SwFldRefPage(); 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/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 257181ad6713..27c60f81e1f9 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -1247,8 +1247,8 @@ bool SwFldVarPage::FillItemSet(SfxItemSet* ) return false; } -SfxTabPage* SwFldVarPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SwFldVarPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { return VclPtr<SwFldVarPage>::Create( pParent, *rAttrSet ); } diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx index bac7fc733d46..a37aa5809fda 100644 --- a/sw/source/ui/fldui/fldvar.hxx +++ b/sw/source/ui/fldui/fldvar.hxx @@ -95,7 +95,7 @@ public: virtual ~SwFldVarPage(); 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; |