From 3b26a0c093723cbea10982967035a9ad308d609a Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Mon, 5 Mar 2007 14:24:06 +0000 Subject: INTEGRATION: CWS vcl74 (1.66.10); FILE MERGED 2007/02/14 18:14:23 pl 1.66.10.2: #i73965# handle possible own IME status window 2007/02/09 13:51:18 pl 1.66.10.1: #i73965# clearer assertion, take into account def window, title for def window --- vcl/source/app/svmain.cxx | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'vcl/source/app/svmain.cxx') diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 92add128fe9c..8566cadc7fbc 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -4,9 +4,9 @@ * * $RCSfile: svmain.cxx,v $ * - * $Revision: 1.66 $ + * $Revision: 1.67 $ * - * last change: $Author: obo $ $Date: 2007-01-25 11:23:06 $ + * last change: $Author: obo $ $Date: 2007-03-05 15:24:06 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -154,6 +154,11 @@ #endif #include +#if OSL_DEBUG_LEVEL > 0 +#include +#include +#endif + using namespace ::rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -412,11 +417,37 @@ BOOL InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XM void DeInitVCL() { - DBG_ASSERT( Application::GetTopWindowCount()==0, "DeInitVCL: some windows are still alive!" ); - ImplSVData* pSVData = ImplGetSVData(); pSVData->mbDeInit = TRUE; + // give ime status a chance to destroy its own windows + delete pSVData->mpImeStatus; + pSVData->mpImeStatus = NULL; + + #if OSL_DEBUG_LEVEL > 0 + rtl::OStringBuffer aBuf( 256 ); + aBuf.append( "DeInitVCL: some top Windows are still alive\n" ); + long nTopWindowCount = Application::GetTopWindowCount(); + long nBadTopWindows = nTopWindowCount; + for( long i = 0; i < nTopWindowCount; i++ ) + { + Window* pWin = Application::GetTopWindow( i ); + // default window will be destroyed further down + // but may still be useful during deinit up to that point + if( pWin == pSVData->mpDefaultWin ) + nBadTopWindows--; + else + { + aBuf.append( "text = \"" ); + aBuf.append( rtl::OUStringToOString( pWin->GetText(), osl_getThreadTextEncoding() ) ); + aBuf.append( "\" type = \"" ); + aBuf.append( typeid(*pWin).name() ); + aBuf.append( "\"\n" ); + } + } + DBG_ASSERT( nBadTopWindows==0, aBuf.getStr() ); + #endif + ImplImageTree::cleanup(); delete pExceptionHandler; @@ -563,8 +594,6 @@ void DeInitVCL() // destroy all Sal interfaces before destorying the instance // and thereby unloading the plugin - delete pSVData->mpImeStatus; - pSVData->mpImeStatus = NULL; delete pSVData->mpSalSystem; pSVData->mpSalSystem = NULL; delete pSVData->mpSalTimer; -- cgit