[Libreoffice-commits] core.git: Branch 'feature/vclref' - framework/source vcl/source

Michael Meeks michael.meeks at collabora.com
Tue Mar 17 09:39:52 PDT 2015


 framework/source/uielement/generictoolbarcontroller.cxx |    2 +-
 vcl/source/window/toolbox.cxx                           |    5 +++--
 vcl/source/window/window.cxx                            |    2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 19eae5a6ad8febc0535e363bd8134a679e7255eb
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue Mar 17 16:43:50 2015 +0000

    un-tangle more lifecycle issues, and improve taskpanelist debugging.
    
    Change-Id: Ic542fac901edb87418abc1d460ed4e7d9bad67c5

diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 74003f8..f67dc01 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -125,7 +125,7 @@ throw ( RuntimeException, std::exception )
 
     svt::ToolboxController::dispose();
 
-    m_pToolbar.disposeAndClear();
+    m_pToolbar.clear();
     m_nID = 0;
 }
 
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 1b7bfc9..9772d96e 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4835,7 +4835,7 @@ Size ToolBox::CalcMinimumWindowSizePixel() const
     else
     {
         // create dummy toolbox for measurements
-        ToolBox *pToolBox = new ToolBox( GetParent(), GetStyle() );
+        VclPtr< ToolBox > pToolBox = new ToolBox( GetParent(), GetStyle() );
 
         // copy until first useful item
         std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
@@ -4863,7 +4863,8 @@ Size ToolBox::CalcMinimumWindowSizePixel() const
 
         ImplGetDockingManager()->RemoveWindow( pToolBox );
         pToolBox->Clear();
-        delete pToolBox;
+
+        pToolBox.disposeAndClear();
 
         return aSize;
     }
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 3b6f3e7..a179d0e 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -347,7 +347,7 @@ void Window::dispose()
         if ( pMySysWin && pMySysWin->ImplIsInTaskPaneList( this ) )
         {
             OStringBuffer aTempStr("Window (");
-            aTempStr.append(OUStringToOString(GetText(), RTL_TEXTENCODING_UTF8));
+            aTempStr.append(lcl_createWindowInfo(*this));
             aTempStr.append(") still in TaskPanelList!");
             OSL_FAIL( aTempStr.getStr() );
             Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8));   // abort in debug builds, this must be fixed!


More information about the Libreoffice-commits mailing list