summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/basedlgs.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog/basedlgs.cxx')
-rw-r--r--sfx2/source/dialog/basedlgs.cxx56
1 files changed, 35 insertions, 21 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 566227863f72..285e618b398f 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -45,6 +45,12 @@ using namespace ::com::sun::star::uno;
#define USERITEM_NAME OUString("UserItem")
+SingleTabDlgImpl::SingleTabDlgImpl()
+ : m_pSfxPage(NULL)
+ , m_pLine(NULL)
+ {
+ }
+
class SfxModelessDialog_Impl : public SfxListener
{
public:
@@ -163,15 +169,15 @@ SfxModalDialog::SfxModalDialog(vcl::Window *pParent, const OUString& rID, const
}
SfxModalDialog::~SfxModalDialog()
+{
+ disposeOnce();
+}
-/* [Description]
-
- Destructor; writes the Dialog position in the ini-file.
-*/
-
+void SfxModalDialog::dispose()
{
SetDialogData_Impl();
delete pOutputSet;
+ ModalDialog::dispose();
}
void SfxModalDialog::CreateOutputItemSet( SfxItemPool& rPool )
@@ -355,16 +361,16 @@ bool SfxModelessDialog::Notify( NotifyEvent& rEvt )
SfxModelessDialog::~SfxModelessDialog()
+{
+ disposeOnce();
+}
-/* [Description]
-
- Destructor
-*/
-
+void SfxModelessDialog::dispose()
{
if ( pImp->pMgr->GetFrame().is() && pImp->pMgr->GetFrame() == pBindings->GetActiveFrame() )
pBindings->SetActiveFrame( NULL );
delete pImp;
+ ModelessDialog::dispose();
}
@@ -505,20 +511,19 @@ bool SfxFloatingWindow::Close()
SfxFloatingWindow::~SfxFloatingWindow()
+{
+ disposeOnce();
+}
-/* [Description]
-
- Destructor
-*/
-
+void SfxFloatingWindow::dispose()
{
- if ( pImp->pMgr->GetFrame() == pBindings->GetActiveFrame() )
+ if ( pImp && pImp->pMgr->GetFrame() == pBindings->GetActiveFrame() )
pBindings->SetActiveFrame( NULL );
delete pImp;
+ pImp = NULL;
+ FloatingWindow::dispose();
}
-
-
void SfxFloatingWindow::Resize()
/* [Description]
@@ -702,9 +707,18 @@ SfxSingleTabDialog::SfxSingleTabDialog(vcl::Window* pParent, const SfxItemSet* p
SfxSingleTabDialog::~SfxSingleTabDialog()
{
- delete pImpl->m_pSfxPage;
- delete pImpl->m_pLine;
+ disposeOnce();
+}
+
+void SfxSingleTabDialog::dispose()
+{
+ pImpl->m_pSfxPage.disposeAndClear();
+ pImpl->m_pLine.disposeAndClear();
delete pImpl;
+ pOKBtn.clear();
+ pCancelBtn.clear();
+ pHelpBtn.clear();
+ SfxModalDialog::dispose();
}
void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage,
@@ -718,7 +732,7 @@ void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage,
{
SetUniqId(nSettingsId);
- delete pImpl->m_pSfxPage;
+ pImpl->m_pSfxPage.disposeAndClear();
pImpl->m_pSfxPage = pTabPage;
fnGetRanges = pRangesFunc;