Kaydet (Commit) fc8c282e authored tarafından Michael Meeks's avatar Michael Meeks

tdf#91127 - get SfxTabPage creation function ref-counting right.

Change-Id: I7c730cf311900fe14a09081dd986f17d9b89e77f
üst 28a2f0d6
...@@ -198,8 +198,10 @@ void SfxChildWindow::Destroy() ...@@ -198,8 +198,10 @@ void SfxChildWindow::Destroy()
SfxChildWindow::~SfxChildWindow() SfxChildWindow::~SfxChildWindow()
{ {
delete pContext; delete pContext;
pContext = NULL;
pWindow.disposeAndClear(); pWindow.disposeAndClear();
delete pImp; delete pImp;
pImp = NULL;
} }
......
...@@ -178,6 +178,7 @@ SfxTabPage::~SfxTabPage() ...@@ -178,6 +178,7 @@ SfxTabPage::~SfxTabPage()
void SfxTabPage::dispose() void SfxTabPage::dispose()
{ {
delete pImpl; delete pImpl;
pImpl = NULL;
TabPage::dispose(); TabPage::dispose();
} }
...@@ -401,13 +402,19 @@ void SfxTabDialog::dispose() ...@@ -401,13 +402,19 @@ void SfxTabDialog::dispose()
pDataObject->pTabPage.disposeAndClear(); pDataObject->pTabPage.disposeAndClear();
} }
delete pDataObject; delete pDataObject;
pDataObject = NULL;
} }
delete pImpl; delete pImpl;
pImpl = NULL;
delete pSet; delete pSet;
pSet = NULL;
delete pOutSet; delete pOutSet;
pOutSet = NULL;
delete pExampleSet; delete pExampleSet;
pExampleSet = NULL;
delete [] pRanges; delete [] pRanges;
pRanges = NULL;
if (m_bOwnsBaseFmtBtn) if (m_bOwnsBaseFmtBtn)
m_pBaseFmtBtn.disposeAndClear(); m_pBaseFmtBtn.disposeAndClear();
...@@ -429,6 +436,7 @@ void SfxTabDialog::dispose() ...@@ -429,6 +436,7 @@ void SfxTabDialog::dispose()
m_pResetBtn.clear(); m_pResetBtn.clear();
m_pBaseFmtBtn.clear(); m_pBaseFmtBtn.clear();
m_pActionArea.clear(); m_pActionArea.clear();
TabDialog::dispose(); TabDialog::dispose();
} }
...@@ -1109,7 +1117,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl ) ...@@ -1109,7 +1117,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
SfxGetpApp(); SfxGetpApp();
// Tab Page schon da? // Tab Page schon da?
SfxTabPage* pTabPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId )); VclPtr<SfxTabPage> pTabPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
Data_Impl* pDataObject = Find( pImpl->aData, nId ); Data_Impl* pDataObject = Find( pImpl->aData, nId );
//UUUU fallback to 1st page when requested one does not exist //UUUU fallback to 1st page when requested one does not exist
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment