diff options
-rw-r--r-- | sc/source/ui/miscdlgs/datafdlg.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh2.cxx | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx index 64dd5de5e165..f1d8f636a18f 100644 --- a/sc/source/ui/miscdlgs/datafdlg.cxx +++ b/sc/source/ui/miscdlgs/datafdlg.cxx @@ -216,8 +216,14 @@ void ScDataFormDlg::dispose() m_pBtnNext.clear(); m_pBtnClose.clear(); m_pSlider.clear(); - m_pGrid.clear(); m_pFixedText.clear(); + for ( auto aFTIter = maFixedTexts.begin(); aFTIter != maFixedTexts.end(); ++aFTIter ) + aFTIter->disposeAndClear(); + for ( auto aEditIter = maEdits.begin(); aEditIter != maEdits.end(); ++aEditIter ) + aEditIter->disposeAndClear(); + maFixedTexts.clear(); + maEdits.clear(); + m_pGrid.clear(); ModalDialog::dispose(); } diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 354ae1f02c11..643e88075904 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -342,8 +342,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - AbstractScDataFormDlg* pDlg = pFact->CreateScDataFormDlg( - pTabViewShell->GetDialogParent(), pTabViewShell); + std::unique_ptr<AbstractScDataFormDlg> pDlg(pFact->CreateScDataFormDlg( + pTabViewShell->GetDialogParent(), pTabViewShell)); OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->Execute(); |