diff options
Diffstat (limited to 'cui/source/tabpages/numfmt.cxx')
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 52 |
1 files changed, 37 insertions, 15 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index bc6f14273893..852607ca84c5 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -282,8 +282,41 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage(vcl::Window* pParent, SvxNumberFormatTabPage::~SvxNumberFormatTabPage() { + disposeOnce(); +} + + +void SvxNumberFormatTabPage::dispose() +{ delete pNumFmtShell; + pNumFmtShell = NULL; delete pNumItem; + pNumItem = NULL; + m_pFtCategory.clear(); + m_pLbCategory.clear(); + m_pFtFormat.clear(); + m_pLbCurrency.clear(); + m_pLbFormat.clear(); + m_pFtLanguage.clear(); + m_pLbLanguage.clear(); + m_pCbSourceFormat.clear(); + m_pWndPreview.clear(); + m_pFtOptions.clear(); + m_pFtDecimals.clear(); + m_pEdDecimals.clear(); + m_pBtnNegRed.clear(); + m_pFtLeadZeroes.clear(); + m_pEdLeadZeroes.clear(); + m_pBtnThousand.clear(); + m_pFormatCodeFrame.clear(); + m_pEdFormat.clear(); + m_pIbAdd.clear(); + m_pIbInfo.clear(); + m_pIbRemove.clear(); + m_pFtComment.clear(); + m_pEdComment.clear(); + pLastActivWindow.clear(); + SfxTabPage::dispose(); } void SvxNumberFormatTabPage::Init_Impl() @@ -347,21 +380,10 @@ void SvxNumberFormatTabPage::Init_Impl() } } -/************************************************************************* -#* Method: Create -#*------------------------------------------------------------------------ -#* -#* Class: SvxNumberFormatTabPage -#* Function: Creates a new number format page. -#* Input: Window, SfxItemSet -#* Output: new TabPage -#* -#************************************************************************/ - -SfxTabPage* SvxNumberFormatTabPage::Create( vcl::Window* pParent, - const SfxItemSet* rAttrSet ) +VclPtr<SfxTabPage> SvxNumberFormatTabPage::Create( vcl::Window* pParent, + const SfxItemSet* rAttrSet ) { - return ( new SvxNumberFormatTabPage( pParent, *rAttrSet ) ); + return VclPtr<SfxTabPage>( new SvxNumberFormatTabPage( pParent, *rAttrSet ), SAL_NO_ACQUIRE ); } @@ -1644,7 +1666,7 @@ bool SvxNumberFormatTabPage::PreNotify( NotifyEvent& rNEvt ) { if(rNEvt.GetType()==MouseNotifyEvent::LOSEFOCUS) { - if ( rNEvt.GetWindow() == dynamic_cast< vcl::Window* >( m_pEdComment ) && !m_pEdComment->IsVisible() ) + if ( rNEvt.GetWindow() == dynamic_cast< vcl::Window* >( m_pEdComment.get() ) && !m_pEdComment->IsVisible() ) { pLastActivWindow = NULL; } |