summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-19 21:12:14 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-05-19 21:13:12 +0100
commite1b1f9537a299e5cdb4bd824513b41ee903b4bda (patch)
tree8c3d3e7c6053e8f501f32ca3b31bf54392b245a8 /cui
parentc922776fdde4801af51ea3840c62f2fa3b8bc552 (diff)
tdf#91185 - appearance settings lifecycle fix.
Change-Id: I4efe8e68419a3d878acf3c4eb741239794b26d85
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optcolor.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 5b1c4299db0f..fd4bcab3471c 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -199,6 +199,7 @@ private:
Chapter(FixedText *pText, bool bShow);
Chapter(vcl::Window *pGrid, unsigned nYPos, const OUString& sDisplayName);
~Chapter();
+ void dispose() { m_pText.disposeAndClear(); }
public:
void SetBackground(const Wallpaper& W) { m_pText->SetBackground(W); }
void Show(const Wallpaper& rBackWall);
@@ -231,7 +232,12 @@ private:
public:
bool Is (CheckBox* pBox) const { return m_pText == pBox; }
bool Is (ColorListBox* pBox) const { return m_pColorList == pBox; }
-
+ void dispose()
+ {
+ m_pText.disposeAndClear();
+ m_pColorList.disposeAndClear();
+ m_pPreview.disposeAndClear();
+ }
private:
bool m_bOwnsWidgets;
// checkbox (CheckBox) or simple text (FixedText)
@@ -510,10 +516,14 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(vcl::Window* pParent)
void ColorConfigWindow_Impl::dispose()
{
- disposeBuilder();
m_pGrid.clear();
m_pVScroll.clear();
m_pHeaderHB.clear();
+ for (auto i = vChapters.begin(); i != vChapters.end(); ++i)
+ (*i)->dispose();
+ for (auto i = vEntries.begin(); i != vEntries.end(); ++i)
+ (*i)->dispose();
+ disposeBuilder();
VclContainer::dispose();
}