diff options
Diffstat (limited to 'cui/source/tabpages/dstribut.cxx')
-rw-r--r-- | cui/source/tabpages/dstribut.cxx | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/cui/source/tabpages/dstribut.cxx b/cui/source/tabpages/dstribut.cxx index 86d23299112b..ac14dbd34f17 100644 --- a/cui/source/tabpages/dstribut.cxx +++ b/cui/source/tabpages/dstribut.cxx @@ -37,10 +37,21 @@ SvxDistributeDialog::SvxDistributeDialog(vcl::Window* pParent, "cui/ui/distributiondialog.ui") , mpPage(NULL) { - mpPage = new SvxDistributePage(get_content_area(), rInAttrs, eHor, eVer); + mpPage = VclPtr<SvxDistributePage>::Create(get_content_area(), rInAttrs, eHor, eVer); SetTabPage(mpPage); } +SvxDistributeDialog::~SvxDistributeDialog() +{ + disposeOnce(); +} + +void SvxDistributeDialog::dispose() +{ + mpPage.clear(); + SfxSingleTabDialog::dispose(); +} + /************************************************************************* |* |* Tabpage @@ -68,16 +79,37 @@ SvxDistributePage::SvxDistributePage(vcl::Window* pWindow, get(m_pBtnVerBottom, "verbottom"); } +SvxDistributePage::~SvxDistributePage() +{ + disposeOnce(); +} + +void SvxDistributePage::dispose() +{ + m_pBtnHorNone.clear(); + m_pBtnHorLeft.clear(); + m_pBtnHorCenter.clear(); + m_pBtnHorDistance.clear(); + m_pBtnHorRight.clear(); + m_pBtnVerNone.clear(); + m_pBtnVerTop.clear(); + m_pBtnVerCenter.clear(); + m_pBtnVerDistance.clear(); + m_pBtnVerBottom.clear(); + SvxTabPage::dispose(); +} + + /************************************************************************* |* |* create the tabpage |* \************************************************************************/ -SfxTabPage* SvxDistributePage::Create(vcl::Window* pWindow, const SfxItemSet& rAttrs, +VclPtr<SfxTabPage> SvxDistributePage::Create(vcl::Window* pWindow, const SfxItemSet& rAttrs, SvxDistributeHorizontal eHor, SvxDistributeVertical eVer) { - return new SvxDistributePage(pWindow, rAttrs, eHor, eVer); + return VclPtr<SvxDistributePage>::Create(pWindow, rAttrs, eHor, eVer); } void SvxDistributePage::PointChanged(vcl::Window* /*pWindow*/, RECT_POINT /*eRP*/) |