summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-07 14:35:42 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-05-07 16:07:56 +0100
commitfc8c282e99450ae240ca3d16bb74e1d4ab541497 (patch)
treeb815589118517dbae9423b3e4d6d73c1064f09f7
parent28a2f0d6d803569952e7b3efb0269001af8e9c7e (diff)
tdf#91127 - get SfxTabPage creation function ref-counting right.
Change-Id: I7c730cf311900fe14a09081dd986f17d9b89e77f
-rw-r--r--sfx2/source/appl/childwin.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx10
2 files changed, 11 insertions, 1 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index e1f2ecd40809..a735b7297d29 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -198,8 +198,10 @@ void SfxChildWindow::Destroy()
SfxChildWindow::~SfxChildWindow()
{
delete pContext;
+ pContext = NULL;
pWindow.disposeAndClear();
delete pImp;
+ pImp = NULL;
}
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 8684d5530ef9..3cf586996528 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -178,6 +178,7 @@ SfxTabPage::~SfxTabPage()
void SfxTabPage::dispose()
{
delete pImpl;
+ pImpl = NULL;
TabPage::dispose();
}
@@ -401,13 +402,19 @@ void SfxTabDialog::dispose()
pDataObject->pTabPage.disposeAndClear();
}
delete pDataObject;
+ pDataObject = NULL;
}
delete pImpl;
+ pImpl = NULL;
delete pSet;
+ pSet = NULL;
delete pOutSet;
+ pOutSet = NULL;
delete pExampleSet;
+ pExampleSet = NULL;
delete [] pRanges;
+ pRanges = NULL;
if (m_bOwnsBaseFmtBtn)
m_pBaseFmtBtn.disposeAndClear();
@@ -429,6 +436,7 @@ void SfxTabDialog::dispose()
m_pResetBtn.clear();
m_pBaseFmtBtn.clear();
m_pActionArea.clear();
+
TabDialog::dispose();
}
@@ -1109,7 +1117,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
SfxGetpApp();
// 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 );
//UUUU fallback to 1st page when requested one does not exist