summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/tpaction.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/dlg/tpaction.cxx')
-rw-r--r--sd/source/ui/dlg/tpaction.cxx31
1 files changed, 25 insertions, 6 deletions
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 253e7142aa34..e038120c6a00 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -83,12 +83,12 @@ SdActionDlg::SdActionDlg (
, rOutAttrs(*pAttr)
{
// FreeResource();
- SfxTabPage* pNewPage = SdTPAction::Create(get_content_area(), rOutAttrs);
+ VclPtr<SfxTabPage> pNewPage = SdTPAction::Create(get_content_area(), rOutAttrs);
assert(pNewPage); //Unable to create page
// formerly in PageCreated
- static_cast<SdTPAction*>( pNewPage )->SetView( pView );
- static_cast<SdTPAction*>( pNewPage )->Construct();
+ static_cast<SdTPAction*>( pNewPage.get() )->SetView( pView );
+ static_cast<SdTPAction*>( pNewPage.get() )->Construct();
SetTabPage( pNewPage );
}
@@ -142,6 +142,25 @@ SdTPAction::SdTPAction(vcl::Window* pWindow, const SfxItemSet& rInAttrs)
SdTPAction::~SdTPAction()
{
+ disposeOnce();
+}
+
+void SdTPAction::dispose()
+{
+ m_pLbAction.clear();
+ m_pFtTree.clear();
+ m_pLbTree.clear();
+ m_pLbTreeDocument.clear();
+ m_pLbOLEAction.clear();
+ m_pFrame.clear();
+ m_pEdtSound.clear();
+ m_pEdtBookmark.clear();
+ m_pEdtDocument.clear();
+ m_pEdtProgram.clear();
+ m_pEdtMacro.clear();
+ m_pBtnSearch.clear();
+ m_pBtnSeek.clear();
+ SfxTabPage::dispose();
}
void SdTPAction::SetView( const ::sd::View* pSdView )
@@ -359,10 +378,10 @@ SfxTabPage::sfxpg SdTPAction::DeactivatePage( SfxItemSet* pPageSet )
return LEAVE_PAGE;
}
-SfxTabPage* SdTPAction::Create( vcl::Window* pWindow,
- const SfxItemSet& rAttrs )
+VclPtr<SfxTabPage> SdTPAction::Create( vcl::Window* pWindow,
+ const SfxItemSet& rAttrs )
{
- return new SdTPAction( pWindow, rAttrs );
+ return VclPtr<SdTPAction>::Create( pWindow, rAttrs );
}
void SdTPAction::UpdateTree()