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/frmdlg | |
parent | d8ebd9044177e1269c8c81c4c0e3ff53d875247a (diff) |
Fix SfxTabPage creation to use VclPtr.
Change-Id: Ia0e8b666daec7b5eaba119c758b9ca1ec8276128
Diffstat (limited to 'sw/source/ui/frmdlg')
-rw-r--r-- | sw/source/ui/frmdlg/column.cxx | 7 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/wrap.cxx | 6 |
3 files changed, 15 insertions, 14 deletions
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index f0ae9c4cf910..12bcb52a52ed 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -161,7 +161,7 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh) assert(pColPgSet); // create TabPage - pTabPage = static_cast<SwColumnPage*>( SwColumnPage::Create(get_content_area(), pColPgSet) ); + pTabPage = static_cast<SwColumnPage*>( SwColumnPage::Create(get_content_area(), pColPgSet).get() ); pTabPage->get<vcl::Window>("applytoft")->Show(); pTabPage->get(m_pApplyToLB, "applytolb"); m_pApplyToLB->Show(); @@ -657,10 +657,11 @@ void SwColumnPage::Reset(const SfxItemSet *rSet) } // create TabPage -SfxTabPage* SwColumnPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) +VclPtr<SfxTabPage> SwColumnPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) { - return VclPtr<SwColumnPage>::Create(pParent, *rSet); + return VclPtr<SfxTabPage>(new SwColumnPage(pParent, *rSet), SAL_NO_ACQUIRE); } + // stuff attributes into the Set when OK bool SwColumnPage::FillItemSet(SfxItemSet *rSet) { diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index bc4afce72f72..7a36a36a7e22 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -858,9 +858,9 @@ void SwFrmPage::setOptimalRelWidth() m_pHoriRelationLB->Clear(); } -SfxTabPage* SwFrmPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) +VclPtr<SfxTabPage> SwFrmPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) { - return VclPtr<SwFrmPage>::Create( pParent, *rSet ); + return VclPtr<SfxTabPage>(new SwFrmPage( pParent, *rSet ), SAL_NO_ACQUIRE); } void SwFrmPage::EnableGraficMode( void ) @@ -2421,9 +2421,9 @@ void SwGrfExtPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SwGrfExtPage::Create( vcl::Window *pParent, const SfxItemSet *rSet ) +VclPtr<SfxTabPage> SwGrfExtPage::Create( vcl::Window *pParent, const SfxItemSet *rSet ) { - return VclPtr<SwGrfExtPage>::Create( pParent, *rSet ); + return VclPtr<SfxTabPage>(new SwGrfExtPage( pParent, *rSet ), SAL_NO_ACQUIRE); } void SwGrfExtPage::Reset(const SfxItemSet *rSet) @@ -2847,9 +2847,9 @@ bool SwFrmURLPage::FillItemSet(SfxItemSet *rSet) return bModified; } -SfxTabPage* SwFrmURLPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) +VclPtr<SfxTabPage> SwFrmURLPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) { - return VclPtr<SwFrmURLPage>::Create( pParent, *rSet ); + return VclPtr<SfxTabPage>(new SwFrmURLPage( pParent, *rSet ), SAL_NO_ACQUIRE); } IMPL_LINK_NOARG(SwFrmURLPage, InsertFileHdl) @@ -2939,9 +2939,9 @@ void SwFrmAddPage::dispose() } -SfxTabPage* SwFrmAddPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) +VclPtr<SfxTabPage> SwFrmAddPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) { - return VclPtr<SwFrmAddPage>::Create(pParent, *rSet); + return VclPtr<SfxTabPage>(new SwFrmAddPage(pParent, *rSet), SAL_NO_ACQUIRE); } void SwFrmAddPage::Reset(const SfxItemSet *rSet ) diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index 6eab290c166e..666cd82234a0 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -57,7 +57,7 @@ SwWrapDlg::SwWrapDlg(vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bo { // create TabPage - SwWrapTabPage* pNewPage = static_cast<SwWrapTabPage*>( SwWrapTabPage::Create(get_content_area(), &rSet) ); + VclPtr<SwWrapTabPage> pNewPage = static_cast<SwWrapTabPage*>( SwWrapTabPage::Create(get_content_area(), &rSet).get() ); pNewPage->SetFormatUsed(false, bDrawMode); pNewPage->SetShell(pWrtShell); SetTabPage(pNewPage); @@ -155,9 +155,9 @@ void SwWrapTabPage::dispose() SfxTabPage::dispose(); } -SfxTabPage* SwWrapTabPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) +VclPtr<SfxTabPage> SwWrapTabPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) { - return VclPtr<SwWrapTabPage>::Create(pParent, *rSet); + return VclPtr<SfxTabPage>(new SwWrapTabPage(pParent, *rSet), SAL_NO_ACQUIRE); } void SwWrapTabPage::Reset(const SfxItemSet *rSet) |