[Libreoffice-commits] core.git: Branch 'feature/vclref' - avmedia/source sd/source svtools/source

Michael Meeks michael.meeks at collabora.com
Wed Mar 18 06:47:16 PDT 2015


 avmedia/source/viewer/mediawindow_impl.cxx |    2 ++
 sd/source/ui/view/ViewShellBase.cxx        |    4 ++--
 sd/source/ui/view/drviewsa.cxx             |    2 ++
 sd/source/ui/view/viewshel.cxx             |   10 ++++++++--
 svtools/source/control/tabbar.cxx          |    5 ++++-
 5 files changed, 18 insertions(+), 5 deletions(-)

New commits:
commit a9bb904672c2868e5daf417ac31165a21d86ce86
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Mar 18 13:51:37 2015 +0000

    mend misc. lifecycle breakage.
    
    Change-Id: I6e960db9659f5122a45c4cf173e680bb782acf76

diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index 786a594..771f1fd 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -507,12 +507,14 @@ void MediaWindowImpl::onURLChanged()
 {
     if( m_sMimeType == AVMEDIA_MIMETYPE_COMMON )
     {
+        mpChildWindow.disposeAndClear();
         mpChildWindow.reset(new MediaChildWindow(this) );
     }
 #if HAVE_FEATURE_GLTF
     else if ( m_sMimeType == AVMEDIA_MIMETYPE_JSON )
     {
         SystemWindowData aWinData = OpenGLContext::generateWinData(this, false);
+        mpChildWindow.disposeAndClear();
         mpChildWindow.reset(new MediaChildWindow(this,&aWinData));
         mbEventTransparent = false;
     }
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index fa1ebb0..550b5f3 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -240,7 +240,7 @@ ViewShellBase::ViewShellBase (
       mpDocument (NULL)
 {
     mpImpl.reset(new Implementation(*this));
-    mpImpl->mpViewWindow.reset(new FocusForwardingWindow(_pFrame->GetWindow(),*this));
+    mpImpl->mpViewWindow = new FocusForwardingWindow(_pFrame->GetWindow(),*this);
     mpImpl->mpViewWindow->SetBackground(Wallpaper());
 
     _pFrame->GetWindow().SetBackground(Application::GetSettings().GetStyleSettings().GetLightColor());
@@ -1028,7 +1028,7 @@ ViewShellBase::Implementation::~Implementation (void)
 {
     mpController = NULL;
     mpViewTabBar = NULL;
-    mpViewWindow.reset();
+    mpViewWindow.disposeAndClear();
     mpToolBarManager.reset();
 }
 
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 27cc8b4..2a3d990 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -190,6 +190,8 @@ DrawViewShell::~DrawViewShell()
 
     mpFrameView->Disconnect();
     delete [] mpSlotArray;
+
+    maTabControl.disposeAndClear();
 }
 
 /**
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 03448f6..c3c1eb2 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -150,7 +150,7 @@ ViewShell::~ViewShell()
 
     delete mpZoomList;
 
-    mpLayerTabBar.reset();
+    mpLayerTabBar.disposeAndClear();
 
     if (mpImpl->mpSubShellFactory.get() != NULL)
         GetViewShellBase().GetViewShellManager()->RemoveSubShellFactory(
@@ -160,8 +160,14 @@ ViewShell::~ViewShell()
     {
         OSL_TRACE("destroying mpContentWindow at %x with parent %x", mpContentWindow.get(),
             mpContentWindow->GetParent());
-        mpContentWindow.reset();
+        mpContentWindow.disposeAndClear();
     }
+
+    mpScrollBarBox.disposeAndClear();
+    mpVerticalRuler.disposeAndClear();
+    mpHorizontalRuler.disposeAndClear();
+    mpVerticalScrollBar.disposeAndClear();
+    mpHorizontalScrollBar.disposeAndClear();
 }
 
 /**
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index b69764e..a57ef05 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -364,9 +364,12 @@ struct TabBar_Impl
     ::svt::AccessibleFactoryAccess  maAccessibleFactory;
 
     TabBar_Impl()
-        :mpSizer( NULL )
     {
     }
+    ~TabBar_Impl()
+    {
+        mpSizer.disposeAndClear();
+    }
 };
 
 


More information about the Libreoffice-commits mailing list