[Libreoffice-commits] core.git: cui/source

Michael Meeks michael.meeks at collabora.com
Tue May 19 13:06:35 PDT 2015


 cui/source/options/optcolor.cxx |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit e1b1f9537a299e5cdb4bd824513b41ee903b4bda
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue May 19 21:12:14 2015 +0100

    tdf#91185 - appearance settings lifecycle fix.
    
    Change-Id: I4efe8e68419a3d878acf3c4eb741239794b26d85

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 5b1c429..fd4bcab 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();
 }
 


More information about the Libreoffice-commits mailing list