summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-17 16:43:50 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 11:42:10 +0100
commita6ee7434d15c69941d1d415e33a92ae8e3e49fd1 (patch)
tree181ad1db1774a3fb5a213365da69e7c2d7b71eb6 /vcl
parent2b1772c5b8bd4aedbc7ec7a9a916ac8c8f975f34 (diff)
un-tangle more lifecycle issues, and improve taskpanelist debugging.
Change-Id: Ic542fac901edb87418abc1d460ed4e7d9bad67c5
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/toolbox.cxx5
-rw-r--r--vcl/source/window/window.cxx2
2 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 3c3256a9590e..58ec9241039a 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4833,7 +4833,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();
@@ -4861,7 +4861,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 31f537c285d3..aff72de91150 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -349,7 +349,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!