diff options
Diffstat (limited to 'svx/source/dialog/rubydialog.cxx')
-rw-r--r-- | svx/source/dialog/rubydialog.cxx | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index e85409be5e4a..29d0ae7c9e39 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -64,7 +64,7 @@ SvxRubyChildWindow::SvxRubyChildWindow( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo) : SfxChildWindow(_pParent, nId) { - SvxRubyDialog* pDlg = new SvxRubyDialog(pBindings, this, _pParent); + VclPtr<SvxRubyDialog> pDlg = VclPtr<SvxRubyDialog>::Create(pBindings, this, _pParent); pWindow = pDlg; if ( pInfo->nFlags & SfxChildWindowFlags::ZOOMIN ) @@ -263,9 +263,37 @@ SvxRubyDialog::SvxRubyDialog(SfxBindings *pBind, SfxChildWindow *pCW, SvxRubyDialog::~SvxRubyDialog() { + disposeOnce(); +} + +void SvxRubyDialog::dispose() +{ ClearCharStyleList(); EventObject aEvent; xImpl->disposing(aEvent); + m_pLeftFT.clear(); + m_pRightFT.clear(); + m_pLeft1ED.clear(); + m_pRight1ED.clear(); + m_pLeft2ED.clear(); + m_pRight2ED.clear(); + m_pLeft3ED.clear(); + m_pRight3ED.clear(); + m_pLeft4ED.clear(); + m_pRight4ED.clear(); + for (int i=0; i<7; i++) + aEditArr[i].clear(); + m_pScrolledWindow.clear(); + m_pScrollSB.clear(); + m_pAdjustLB.clear(); + m_pPositionLB.clear(); + m_pCharStyleFT.clear(); + m_pCharStyleLB.clear(); + m_pStylistPB.clear(); + m_pPreviewWin.clear(); + m_pApplyPB.clear(); + m_pClosePB.clear(); + SfxModelessDialog::dispose(); } void SvxRubyDialog::ClearCharStyleList() @@ -760,6 +788,17 @@ RubyPreview::RubyPreview(vcl::Window *pParent) SetBorderStyle( WindowBorderStyle::MONO ); } +RubyPreview::~RubyPreview() +{ + disposeOnce(); +} + +void RubyPreview::dispose() +{ + m_pParentDlg.clear(); + vcl::Window::dispose(); +} + extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeRubyPreview(vcl::Window *pParent, VclBuilder::stringmap &) { return new RubyPreview(pParent); |