summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-15 15:47:39 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-09 21:30:12 +0100
commitebd195b2ae254bfc9b52c9c673a57cd3bdf0cad8 (patch)
treedd113b2ff1e58e14d36a1aad5cd96beea0d3476a /cui/source/dialogs
parent0a61ce1c8e61cb45478ba6f28e8fdd71ce369f2c (diff)
vcl: VclPtr conversion in cui
Change-Id: I8597247296645fe72d5306e35b2ea3c0866d147a
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/SpellDialog.cxx9
-rw-r--r--cui/source/dialogs/colorpicker.cxx14
-rw-r--r--cui/source/dialogs/cuicharmap.cxx12
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx6
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx6
-rw-r--r--cui/source/dialogs/cuihyperdlg.cxx6
-rw-r--r--cui/source/dialogs/dlgname.cxx6
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx97
-rw-r--r--cui/source/dialogs/hldocntp.cxx6
-rw-r--r--cui/source/dialogs/hldoctp.cxx4
-rw-r--r--cui/source/dialogs/hlinettp.cxx4
-rw-r--r--cui/source/dialogs/hlmailtp.cxx4
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx6
-rw-r--r--cui/source/dialogs/hltpbase.cxx8
-rw-r--r--cui/source/dialogs/hyphen.cxx5
-rw-r--r--cui/source/dialogs/iconcdlg.cxx10
-rw-r--r--cui/source/dialogs/insdlg.cxx6
-rw-r--r--cui/source/dialogs/linkdlg.cxx4
-rw-r--r--cui/source/dialogs/multipat.cxx13
-rw-r--r--cui/source/dialogs/passwdomdlg.cxx6
-rw-r--r--cui/source/dialogs/pastedlg.cxx4
-rw-r--r--cui/source/dialogs/postdlg.cxx6
-rw-r--r--cui/source/dialogs/scriptdlg.cxx12
-rw-r--r--cui/source/dialogs/splitcelldlg.cxx4
-rw-r--r--cui/source/dialogs/srchxtra.cxx6
-rw-r--r--cui/source/dialogs/thesdlg.cxx18
-rw-r--r--cui/source/dialogs/zoom.cxx11
27 files changed, 191 insertions, 102 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 1aa1613b286f..9f091c195967 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -246,6 +246,11 @@ SpellDialog::SpellDialog(SpellDialogChildWindow* pChildWindow,
SpellDialog::~SpellDialog()
{
+ dispose();
+}
+
+void SpellDialog::dispose()
+{
// save possibly modified user-dictionaries
Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
@@ -254,6 +259,7 @@ SpellDialog::~SpellDialog()
}
delete pImpl;
+ SfxModelessDialog::dispose();
}
@@ -1199,9 +1205,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSentenceEditWindow(vcl
}
-SentenceEditWindow_Impl::~SentenceEditWindow_Impl()
-{
-}
/*-------------------------------------------------------------------------
The selection before inputting a key may have a range or not
and it may be inside or outside of field or error attributes.
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index d1015e844e97..4b8c9a3518a5 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -309,6 +309,7 @@ class ColorFieldControl : public Control
public:
ColorFieldControl( vcl::Window* pParent, const WinBits& nStyle );
virtual ~ColorFieldControl();
+ virtual void dispose() SAL_OVERRIDE;
virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
@@ -359,7 +360,13 @@ ColorFieldControl::ColorFieldControl( vcl::Window* pParent, const WinBits& nStyl
ColorFieldControl::~ColorFieldControl()
{
+ dispose();
+}
+
+void ColorFieldControl::dispose()
+{
delete mpBitmap;
+ Control::dispose();
}
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeColorFieldControl(vcl::Window *pParent, VclBuilder::stringmap &rMap)
@@ -702,6 +709,7 @@ class ColorSliderControl : public Control
public:
ColorSliderControl( vcl::Window* pParent, const WinBits& nStyle );
virtual ~ColorSliderControl();
+ virtual void dispose() SAL_OVERRIDE;
virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
@@ -744,7 +752,13 @@ ColorSliderControl::ColorSliderControl( vcl::Window* pParent, const WinBits& nSt
ColorSliderControl::~ColorSliderControl()
{
+ dispose();
+}
+
+void ColorSliderControl::dispose()
+{
delete mpBitmap;
+ Control::dispose();
}
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeColorSliderControl(vcl::Window *pParent, VclBuilder::stringmap &rMap)
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index f239f7f33df0..e992ab28d064 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -102,15 +102,6 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, bool bOne_, const SfxIte
-SvxCharacterMap::~SvxCharacterMap()
-{
-}
-
-
-
-
-
-
void SvxCharacterMap::SetChar( sal_UCS4 c )
{
m_pShowSet->SelectCharacter( c );
@@ -298,9 +289,6 @@ void SvxShowText::SetText( const OUString& rText )
-SvxShowText::~SvxShowText()
-{}
-
// class SvxCharacterMap =================================================
void SvxCharacterMap::init()
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 1dbd644dae90..d651f0e4c89b 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -160,6 +160,11 @@ FmSearchDialog::FmSearchDialog(vcl::Window* pParent, const OUString& sInitialTex
FmSearchDialog::~FmSearchDialog()
{
+ dispose();
+}
+
+void FmSearchDialog::dispose()
+{
if (m_aDelayedPaint.IsActive())
m_aDelayedPaint.Stop();
@@ -172,6 +177,7 @@ FmSearchDialog::~FmSearchDialog()
}
delete m_pSearchEngine;
+ ModalDialog::dispose();
}
void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sInitialText)
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index a6a9ef3a507e..d6487fb362ac 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -756,12 +756,18 @@ void TPGalleryThemeProperties::StartSearchFiles( const OUString& _rFolderURL, sh
TPGalleryThemeProperties::~TPGalleryThemeProperties()
{
+ dispose();
+}
+
+void TPGalleryThemeProperties::dispose()
+{
xMediaPlayer.clear();
xDialogListener.clear();
for ( size_t i = 0, n = aFilterEntryList.size(); i < n; ++i ) {
delete aFilterEntryList[ i ];
}
+ SfxTabPage::dispose();
}
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index 053196c25a5d..bb5463e7d655 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -157,11 +157,17 @@ SvxHpLinkDlg::SvxHpLinkDlg (vcl::Window* pParent, SfxBindings* pBindings)
SvxHpLinkDlg::~SvxHpLinkDlg ()
{
+ dispose();
+}
+
+void SvxHpLinkDlg::dispose()
+{
// delete config item, so the base class (IconChoiceDialog) can not load it on the next start
SvtViewOptions aViewOpt( E_TABDIALOG, OUString::number(SID_HYPERLINK_DIALOG) );
aViewOpt.Delete();
delete mpItemSet;
+ IconChoiceDialog::dispose();
}
/*************************************************************************
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index 83ee94c07fce..1f6c66310725 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -138,7 +138,13 @@ SvxMessDialog::SvxMessDialog( vcl::Window* pWindow, const OUString& rText, const
SvxMessDialog::~SvxMessDialog()
{
+ dispose();
+}
+
+void SvxMessDialog::dispose()
+{
delete pImage;
+ ModalDialog::dispose();
}
/*************************************************************************/
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index e80f41854b6a..ff425f90c775 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -338,7 +338,13 @@ namespace svx
SuggestionSet::~SuggestionSet()
{
+ dispose();
+ }
+
+ void SuggestionSet::dispose()
+ {
ClearSet();
+ ValueSet::dispose();
}
void SuggestionSet::UserDraw( const UserDrawEvent& rUDEvt )
@@ -366,29 +372,37 @@ namespace svx
SuggestionDisplay::SuggestionDisplay( vcl::Window* pParent, WinBits nBits )
: Control( pParent, nBits )
, m_bDisplayListBox( true )
- , m_aValueSet( this )
- , m_aListBox( this,GetStyle() | WB_BORDER )
+ , m_aValueSet( new SuggestionSet(this) )
+ , m_aListBox( new ListBox(this,GetStyle() | WB_BORDER) )
, m_bInSelectionUpdate( false )
{
- m_aValueSet.SetSelectHdl( LINK( this, SuggestionDisplay, SelectSuggestionHdl ) );
- m_aListBox.SetSelectHdl( LINK( this, SuggestionDisplay, SelectSuggestionHdl ) );
+ m_aValueSet->SetSelectHdl( LINK( this, SuggestionDisplay, SelectSuggestionHdl ) );
+ m_aListBox->SetSelectHdl( LINK( this, SuggestionDisplay, SelectSuggestionHdl ) );
- m_aValueSet.SetLineCount( LINE_CNT );
- m_aValueSet.SetStyle( m_aValueSet.GetStyle() | WB_ITEMBORDER | WB_FLATVALUESET | WB_VSCROLL );
- m_aValueSet.SetBorderStyle( WindowBorderStyle::MONO );
+ m_aValueSet->SetLineCount( LINE_CNT );
+ m_aValueSet->SetStyle( m_aValueSet->GetStyle() | WB_ITEMBORDER | WB_FLATVALUESET | WB_VSCROLL );
+ m_aValueSet->SetBorderStyle( WindowBorderStyle::MONO );
OUString aOneCharacter("AU");
long nItemWidth = 2*GetTextWidth( aOneCharacter );
- m_aValueSet.SetItemWidth( nItemWidth );
+ m_aValueSet->SetItemWidth( nItemWidth );
Size aSize( approximate_char_width() * 48, GetTextHeight() * 5 );
- m_aValueSet.SetSizePixel( aSize );
- m_aListBox.SetSizePixel( aSize );
+ m_aValueSet->SetSizePixel( aSize );
+ m_aListBox->SetSizePixel( aSize );
implUpdateDisplay();
}
SuggestionDisplay::~SuggestionDisplay()
{
+ dispose();
+ }
+
+ void SuggestionDisplay::dispose()
+ {
+ m_aValueSet.disposeAndClear();
+ m_aListBox.disposeAndClear();
+ Control::dispose();
}
void SuggestionDisplay::implUpdateDisplay()
@@ -396,8 +410,8 @@ namespace svx
bool bShowBox = IsVisible() && m_bDisplayListBox;
bool bShowSet = IsVisible() && !m_bDisplayListBox;
- m_aListBox.Show( bShowBox );
- m_aValueSet.Show( bShowSet );
+ m_aListBox->Show( bShowBox );
+ m_aValueSet->Show( bShowSet );
}
void SuggestionDisplay::StateChanged( StateChangedType nStateChange )
@@ -409,8 +423,8 @@ namespace svx
Control& SuggestionDisplay::implGetCurrentControl()
{
if( m_bDisplayListBox )
- return m_aListBox;
- return m_aValueSet;
+ return *m_aListBox.get();
+ return *m_aValueSet.get();
}
void SuggestionDisplay::KeyInput( const KeyEvent& rKEvt )
@@ -467,15 +481,15 @@ namespace svx
return 0L;
m_bInSelectionUpdate = true;
- if( pControl == &m_aListBox )
+ if( pControl == m_aListBox.get() )
{
- sal_uInt16 nPos = m_aListBox.GetSelectEntryPos();
- m_aValueSet.SelectItem( nPos+1 ); //itemid == pos+1 (id 0 has special meaning)
+ sal_uInt16 nPos = m_aListBox->GetSelectEntryPos();
+ m_aValueSet->SelectItem( nPos+1 ); //itemid == pos+1 (id 0 has special meaning)
}
else
{
- sal_uInt16 nPos = m_aValueSet.GetSelectItemId()-1; //itemid == pos+1 (id 0 has special meaning)
- m_aListBox.SelectEntryPos( nPos );
+ sal_uInt16 nPos = m_aValueSet->GetSelectItemId()-1; //itemid == pos+1 (id 0 has special meaning)
+ m_aListBox->SelectEntryPos( nPos );
}
m_bInSelectionUpdate = false;
m_aSelectLink.Call( this );
@@ -488,38 +502,38 @@ namespace svx
}
void SuggestionDisplay::Clear()
{
- m_aListBox.Clear();
- m_aValueSet.Clear();
+ m_aListBox->Clear();
+ m_aValueSet->Clear();
}
void SuggestionDisplay::InsertEntry( const OUString& rStr )
{
- sal_uInt16 nItemId = m_aListBox.InsertEntry( rStr ) + 1; //itemid == pos+1 (id 0 has special meaning)
- m_aValueSet.InsertItem( nItemId );
+ sal_uInt16 nItemId = m_aListBox->InsertEntry( rStr ) + 1; //itemid == pos+1 (id 0 has special meaning)
+ m_aValueSet->InsertItem( nItemId );
OUString* pItemData = new OUString( rStr );
- m_aValueSet.SetItemData( nItemId, pItemData );
+ m_aValueSet->SetItemData( nItemId, pItemData );
}
void SuggestionDisplay::SelectEntryPos( sal_uInt16 nPos )
{
- m_aListBox.SelectEntryPos( nPos );
- m_aValueSet.SelectItem( nPos+1 ); //itemid == pos+1 (id 0 has special meaning)
+ m_aListBox->SelectEntryPos( nPos );
+ m_aValueSet->SelectItem( nPos+1 ); //itemid == pos+1 (id 0 has special meaning)
}
sal_uInt16 SuggestionDisplay::GetEntryCount() const
{
- return m_aListBox.GetEntryCount();
+ return m_aListBox->GetEntryCount();
}
OUString SuggestionDisplay::GetEntry( sal_uInt16 nPos ) const
{
- return m_aListBox.GetEntry( nPos );
+ return m_aListBox->GetEntry( nPos );
}
OUString SuggestionDisplay::GetSelectEntry() const
{
- return m_aListBox.GetSelectEntry();
+ return m_aListBox->GetSelectEntry();
}
void SuggestionDisplay::SetHelpIds()
{
this->SetHelpId( HID_HANGULDLG_SUGGESTIONS );
- m_aValueSet.SetHelpId( HID_HANGULDLG_SUGGESTIONS_GRID );
- m_aListBox.SetHelpId( HID_HANGULDLG_SUGGESTIONS_LIST );
+ m_aValueSet->SetHelpId( HID_HANGULDLG_SUGGESTIONS_GRID );
+ m_aListBox->SetHelpId( HID_HANGULDLG_SUGGESTIONS_LIST );
}
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSuggestionDisplay( vcl::Window *pParent, VclBuilder::stringmap & )
@@ -592,11 +606,6 @@ namespace svx
}
- HangulHanjaConversionDialog::~HangulHanjaConversionDialog( )
- {
- }
-
-
void HangulHanjaConversionDialog::FillSuggestions( const ::com::sun::star::uno::Sequence< OUString >& _rSuggestions )
{
m_pSuggestions->Clear();
@@ -1125,6 +1134,11 @@ namespace svx
HangulHanjaOptionsDialog::~HangulHanjaOptionsDialog()
{
+ dispose();
+ }
+
+ void HangulHanjaOptionsDialog::dispose()
+ {
SvTreeListEntry* pEntry = m_pDictsLB->First();
while( pEntry )
{
@@ -1136,6 +1150,7 @@ namespace svx
if( m_pCheckButtonData )
delete m_pCheckButtonData;
+ ModalDialog::dispose();
}
void HangulHanjaOptionsDialog::AddDict( const OUString& _rName, bool _bChecked )
@@ -1357,10 +1372,6 @@ namespace svx
{
}
- SuggestionEdit::~SuggestionEdit()
- {
- }
-
bool SuggestionEdit::PreNotify( NotifyEvent& rNEvt )
{
bool nHandled = false;
@@ -1769,8 +1780,14 @@ namespace svx
HangulHanjaEditDictDialog::~HangulHanjaEditDictDialog()
{
+ dispose();
+ }
+
+ void HangulHanjaEditDictDialog::dispose()
+ {
if( m_pSuggestions )
delete m_pSuggestions;
+ ModalDialog::dispose();
}
void HangulHanjaEditDictDialog::UpdateScrollbar( void )
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 4711a1f574ce..b415ae3374ab 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -129,12 +129,18 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( vcl::Window *pParent, IconChoiceDia
SvxHyperlinkNewDocTp::~SvxHyperlinkNewDocTp ()
{
+ dispose();
+}
+
+void SvxHyperlinkNewDocTp::dispose()
+{
for ( sal_uInt16 n=0; n<m_pLbDocTypes->GetEntryCount(); n++ )
{
DocumentTypeData* pTypeData = static_cast<DocumentTypeData*>(
m_pLbDocTypes->GetEntryData ( n ));
delete pTypeData;
}
+ SvxHyperlinkTabPageBase::dispose();
}
/*************************************************************************
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx
index 11fe8e63db34..2e45746d7684 100644
--- a/cui/source/dialogs/hldoctp.cxx
+++ b/cui/source/dialogs/hldoctp.cxx
@@ -71,10 +71,6 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( vcl::Window *pParent, IconChoiceDialog* p
maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkDocTp, TimeoutHdl_Impl ) );
}
-SvxHyperlinkDocTp::~SvxHyperlinkDocTp ()
-{
-}
-
/*************************************************************************
|*
|* Fill all dialog-controls except controls in groupbox "more..."
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 3c7bfcc1c4a4..73ea0ddc6220 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -81,10 +81,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( vcl::Window *pParent,
maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkInternetTp, TimeoutHdl_Impl ) );
}
-SvxHyperlinkInternetTp::~SvxHyperlinkInternetTp ()
-{
-}
-
/*************************************************************************
|*
|* Fill the all dialog-controls except controls in groupbox "more..."
diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx
index 5c114ff317f0..d110b292a73d 100644
--- a/cui/source/dialogs/hlmailtp.cxx
+++ b/cui/source/dialogs/hlmailtp.cxx
@@ -66,10 +66,6 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog*
m_pBtAdrBook->Hide();
}
-SvxHyperlinkMailTp::~SvxHyperlinkMailTp ()
-{
-}
-
/*************************************************************************
|*
|* Fill the all dialog-controls except controls in groupbox "more..."
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index a2b83836abf2..02058c78c0ed 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -150,7 +150,13 @@ SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd( SvxHyperlinkTabPageBase *pParent )
SvxHlinkDlgMarkWnd::~SvxHlinkDlgMarkWnd()
{
+ dispose();
+}
+
+void SvxHlinkDlgMarkWnd::dispose()
+{
ClearTree();
+ ModalDialog::dispose();
}
/*************************************************************************
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 293b04069896..bec31329ed47 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -105,11 +105,17 @@ SvxHyperlinkTabPageBase::SvxHyperlinkTabPageBase ( vcl::Window *pParent,
mpMarkWnd = new SvxHlinkDlgMarkWnd ( this );
}
-SvxHyperlinkTabPageBase::~SvxHyperlinkTabPageBase ()
+SvxHyperlinkTabPageBase::~SvxHyperlinkTabPageBase()
+{
+ dispose();
+}
+
+void SvxHyperlinkTabPageBase::dispose()
{
maTimer.Stop();
delete mpMarkWnd;
+ IconChoicePage::dispose();
}
void SvxHyperlinkTabPageBase::ActivatePage()
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index c6c7bb19b71c..af6d29876456 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -513,11 +513,6 @@ SvxHyphenWordDialog::SvxHyphenWordDialog(
}
-SvxHyphenWordDialog::~SvxHyphenWordDialog()
-{
-}
-
-
void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang )
{
OUString aLangStr( SvtLanguageTable::GetLanguageString( nLang ) );
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 1c999e3cde65..111499ef5c5c 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -53,10 +53,6 @@ IconChoicePage::IconChoicePage( vcl::Window *pParent, const OString& rID,
-IconChoicePage::~IconChoicePage()
-{
-}
-
/**********************************************************************
|
| Activate / Deaktivate
@@ -209,6 +205,11 @@ IconChoiceDialog::IconChoiceDialog ( vcl::Window* pParent, const OUString& rID,
IconChoiceDialog ::~IconChoiceDialog ()
{
+ dispose();
+}
+
+void IconChoiceDialog::dispose()
+{
// save configuration at INI-Manager
// and remove pages
//SvtViewOptions aTabDlgOpt( E_TABDIALOG, rId );
@@ -247,6 +248,7 @@ IconChoiceDialog ::~IconChoiceDialog ()
delete pRanges;
delete pOutSet;
+ ModalDialog::dispose();
}
/**********************************************************************
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index fc9d8218c97d..db360449bd41 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -395,7 +395,13 @@ SvInsertPlugInDialog::SvInsertPlugInDialog(vcl::Window* pParent,
SvInsertPlugInDialog::~SvInsertPlugInDialog()
{
+ dispose();
+}
+
+void SvInsertPlugInDialog::dispose()
+{
delete m_pURL;
+ InsertObjectDialog_Impl::dispose();
}
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index e27b6fb85512..610ea4972c69 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -143,10 +143,6 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b
SetManager( pMgr );
}
-SvBaseLinksDlg::~SvBaseLinksDlg()
-{
-}
-
/*************************************************************************
|* SvBaseLinksDlg::Handler()
*************************************************************************/
diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index b4dd69fa6c65..6b4b4b7733c4 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -224,6 +224,11 @@ SvxPathSelectDialog::SvxPathSelectDialog(vcl::Window* pParent)
SvxMultiPathDialog::~SvxMultiPathDialog()
{
+ dispose();
+}
+
+void SvxMultiPathDialog::dispose()
+{
sal_uInt16 nPos = (sal_uInt16)m_pRadioLB->GetEntryCount();
while ( nPos-- )
{
@@ -232,13 +237,21 @@ SvxMultiPathDialog::~SvxMultiPathDialog()
}
delete m_pRadioLB;
+ ModalDialog::dispose();
}
SvxPathSelectDialog::~SvxPathSelectDialog()
{
+ dispose();
+}
+
+void SvxPathSelectDialog::dispose()
+{
sal_uInt16 nPos = m_pPathLB->GetEntryCount();
while ( nPos-- )
delete static_cast<OUString*>(m_pPathLB->GetEntryData(nPos));
+
+ ModalDialog::dispose();
}
OUString SvxMultiPathDialog::GetPath() const
diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx
index bca8cd9c211e..683d4e15633b 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -153,6 +153,12 @@ PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(
PasswordToOpenModifyDialog::~PasswordToOpenModifyDialog()
{
+ dispose();
+}
+
+void PasswordToOpenModifyDialog::dispose()
+{
+ SfxModalDialog::dispose();
}
diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx
index a7478f5c23df..90610557f6fb 100644
--- a/cui/source/dialogs/pastedlg.cxx
+++ b/cui/source/dialogs/pastedlg.cxx
@@ -79,10 +79,6 @@ IMPL_LINK_INLINE_START( SvPasteObjectDialog, DoubleClickHdl, ListBox *, pListBox
}
IMPL_LINK_INLINE_END( SvPasteObjectDialog, DoubleClickHdl, ListBox *, pListBox )
-SvPasteObjectDialog::~SvPasteObjectDialog()
-{
-}
-
/*************************************************************************
|* SvPasteObjectDialog::Insert()
*************************************************************************/
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index b740fd9e91bb..86d0e5812f32 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -124,8 +124,14 @@ SvxPostItDialog::SvxPostItDialog(vcl::Window* pParent, const SfxItemSet& rCoreSe
SvxPostItDialog::~SvxPostItDialog()
{
+ dispose();
+}
+
+void SvxPostItDialog::dispose()
+{
delete pOutSet;
pOutSet = 0;
+ SfxModalDialog::dispose();
}
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 2e4a87157ec5..adde1bb65f3b 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -101,7 +101,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSFTreeListBox(vcl::Win
SFTreeListBox::~SFTreeListBox()
{
+ dispose();
+}
+
+void SFTreeListBox::dispose()
+{
deleteAllTree();
+ SvTreeListBox::dispose();
}
void SFTreeListBox::delUserData( SvTreeListEntry* pEntry )
@@ -487,8 +493,14 @@ SvxScriptOrgDialog::SvxScriptOrgDialog( vcl::Window* pParent, const OUString& la
SvxScriptOrgDialog::~SvxScriptOrgDialog()
{
+ dispose();
+}
+
+void SvxScriptOrgDialog::dispose()
+{
// clear the SelectHdl so that it isn't called during the dtor
m_pScriptsBox->SetSelectHdl( Link() );
+ SfxModalDialog::dispose();
};
short SvxScriptOrgDialog::Execute()
diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx
index e3b6d18c58a3..edce7998effe 100644
--- a/cui/source/dialogs/splitcelldlg.cxx
+++ b/cui/source/dialogs/splitcelldlg.cxx
@@ -53,10 +53,6 @@ SvxSplitTableDlg::SvxSplitTableDlg( vcl::Window *pParent, bool bIsTableVertical,
}
}
-SvxSplitTableDlg::~SvxSplitTableDlg()
-{
-}
-
IMPL_LINK( SvxSplitTableDlg, ClickHdl, Button *, pButton )
{
const bool bIsVert = pButton == m_pVertBox ;
diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index 39fbcd2cc99a..da6a1e6d99a9 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -64,7 +64,13 @@ SvxSearchFormatDialog::SvxSearchFormatDialog(vcl::Window* pParent, const SfxItem
SvxSearchFormatDialog::~SvxSearchFormatDialog()
{
+ dispose();
+}
+
+void SvxSearchFormatDialog::dispose()
+{
delete m_pFontList;
+ SfxTabDialog::dispose();
}
void SvxSearchFormatDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage )
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index 5ad4a5dae338..c0afe2a2c430 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -76,10 +76,6 @@ void LookUpComboBox::init(SvxThesaurusDialog *pDialog)
m_pDialog = pDialog;
}
-LookUpComboBox::~LookUpComboBox()
-{
-}
-
void LookUpComboBox::Modify()
{
m_aModifyIdle.Start();
@@ -105,10 +101,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeReplaceEdit(vcl::Windo
return new ReplaceEdit(pParent);
}
-ReplaceEdit::~ReplaceEdit()
-{
-}
-
void ReplaceEdit::Modify()
{
if (m_pBtn)
@@ -178,7 +170,13 @@ void ThesaurusAlternativesCtrl::init(SvxThesaurusDialog *pDialog)
ThesaurusAlternativesCtrl::~ThesaurusAlternativesCtrl()
{
+ dispose();
+}
+
+void ThesaurusAlternativesCtrl::dispose()
+{
ClearExtraData();
+ SvxCheckListBox::dispose();
}
void ThesaurusAlternativesCtrl::ClearExtraData()
@@ -522,10 +520,6 @@ IMPL_LINK( SvxThesaurusDialog, ReplaceBtnHdl_Impl, Button *, EMPTYARG /*pBtn*/ )
return 0;
}
-SvxThesaurusDialog::~SvxThesaurusDialog()
-{
-}
-
void SvxThesaurusDialog::SetWindowTitle( LanguageType nLanguage )
{
// adjust language
diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx
index 32dea8c5ab77..190a0619b7d7 100644
--- a/cui/source/dialogs/zoom.cxx
+++ b/cui/source/dialogs/zoom.cxx
@@ -289,7 +289,16 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet )
}
SvxZoomDialog::~SvxZoomDialog()
-{}
+{
+ dispose();
+}
+
+void SvxZoomDialog::dispose()
+{
+ delete pOutSet;
+ pOutSet = 0;
+ SfxModalDialog::dispose();
+}
IMPL_LINK(SvxZoomDialog, UserHdl, RadioButton *, pButton)
{