diff options
Diffstat (limited to 'svx/source/dialog/srchdlg.cxx')
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 4e945af0d366..7f022235614a 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -345,6 +345,11 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWi SvxSearchDialog::~SvxSearchDialog() { + disposeOnce(); +} + +void SvxSearchDialog::dispose() +{ Hide(); rBindings.EnterRegistrations(); @@ -359,6 +364,49 @@ SvxSearchDialog::~SvxSearchDialog() delete pImpl; delete pSearchList; delete pReplaceList; + mpDocWin.clear(); + m_pSearchFrame.clear(); + m_pSearchLB.clear(); + m_pSearchTmplLB.clear(); + m_pSearchAttrText.clear(); + m_pSearchLabel.clear(); + m_pReplaceFrame.clear(); + m_pReplaceLB.clear(); + m_pReplaceTmplLB.clear(); + m_pReplaceAttrText.clear(); + m_pSearchBtn.clear(); + m_pSearchAllBtn.clear(); + m_pReplaceBtn.clear(); + m_pReplaceAllBtn.clear(); + m_pComponentFrame.clear(); + m_pSearchComponent1PB.clear(); + m_pSearchComponent2PB.clear(); + m_pMatchCaseCB.clear(); + m_pWordBtn.clear(); + m_pCloseBtn.clear(); + m_pIgnoreDiacritics.clear(); + m_pIgnoreKashida.clear(); + m_pSelectionBtn.clear(); + m_pBackwardsBtn.clear(); + m_pRegExpBtn.clear(); + m_pSimilarityBox.clear(); + m_pSimilarityBtn.clear(); + m_pLayoutBtn.clear(); + m_pNotesBtn.clear(); + m_pJapMatchFullHalfWidthCB.clear(); + m_pJapOptionsCB.clear(); + m_pJapOptionsBtn.clear(); + m_pAttributeBtn.clear(); + m_pFormatBtn.clear(); + m_pNoFormatBtn.clear(); + m_pCalcGrid.clear(); + m_pCalcSearchInFT.clear(); + m_pCalcSearchInLB.clear(); + m_pCalcSearchDirFT.clear(); + m_pRowsBtn.clear(); + m_pColumnsBtn.clear(); + m_pAllSheetsCB.clear(); + SfxModelessDialog::dispose(); } void SvxSearchDialog::Construct_Impl() @@ -2222,7 +2270,7 @@ SvxSearchDialogWrapper::SvxSearchDialogWrapper( vcl::Window* _pParent, sal_uInt1 : SfxChildWindow( _pParent, nId ) , dialog (new SvxSearchDialog (_pParent, this, *pBindings)) { - pWindow = dialog; + pWindow = dialog.get(); dialog->Initialize( pInfo ); pBindings->Update( SID_SEARCH_ITEM ); @@ -2260,7 +2308,7 @@ static vcl::Window* lcl_GetSearchLabelWindow() return 0; css::uno::Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), css::uno::UNO_QUERY_THROW); - ToolBox* pToolBox = static_cast<ToolBox*>( VCLUnoHelper::GetWindow(xWindow) ); + VclPtr< ToolBox > pToolBox = static_cast<ToolBox*>( VCLUnoHelper::GetWindow(xWindow).get() ); for (size_t i = 0; pToolBox && i < pToolBox->GetItemCount(); ++i) if (pToolBox->GetItemCommand(i) == ".uno:SearchLabel") return pToolBox->GetItemWindow(i); |