Index: vcl/inc/svapp.hxx =================================================================== RCS file: /cvs/gsl/vcl/inc/svapp.hxx,v retrieving revision 1.27 diff -u -p -u -r1.27 svapp.hxx --- vcl/inc/svapp.hxx 10 Jun 2003 14:29:14 -0000 1.27 +++ vcl/inc/svapp.hxx 2 Sep 2003 14:25:16 -0000 @@ -347,7 +347,7 @@ public: virtual void FocusChanged(); virtual void DataChanged( const DataChangedEvent& rDCEvt ); - virtual void Init(); + virtual BOOL Init(); virtual void DeInit(); static void InitAppRes( const ResId& rResId ); Index: vcl/source/app/svapp.cxx =================================================================== RCS file: /cvs/gsl/vcl/source/app/svapp.cxx,v retrieving revision 1.44 diff -u -p -u -r1.44 svapp.cxx --- vcl/source/app/svapp.cxx 15 Apr 2003 16:05:08 -0000 1.44 +++ vcl/source/app/svapp.cxx 2 Sep 2003 14:25:17 -0000 @@ -423,8 +423,9 @@ void Application::DataChanged( const Dat } // ----------------------------------------------------------------------- -void Application::Init() +BOOL Application::Init() { + return TRUE; } // ----------------------------------------------------------------------- Index: vcl/source/app/svmain.cxx =================================================================== RCS file: /cvs/gsl/vcl/source/app/svmain.cxx,v retrieving revision 1.41 diff -u -p -u -r1.41 svmain.cxx --- vcl/source/app/svmain.cxx 11 Apr 2003 17:28:07 -0000 1.41 +++ vcl/source/app/svmain.cxx 2 Sep 2003 14:26:58 -0000 @@ -365,7 +365,8 @@ BOOL InitVCL( const ::com::sun::star::un if( pSVData->mpApp ) // call init to initialize application class // soffice/sfx implementation creates the global service manager - pSVData->mpApp->Init(); + if(! pSVData->mpApp->Init() ) + return FALSE; #ifdef REMOTE_APPSERVER { Index: desktop/inc/app.hxx =================================================================== RCS file: /cvs/framework/desktop/inc/app.hxx,v retrieving revision 1.19 diff -u -p -u -r1.19 app.hxx --- desktop/inc/app.hxx 10 Jun 2003 14:37:19 -0000 1.19 +++ desktop/inc/app.hxx 2 Sep 2003 14:28:34 -0000 @@ -128,7 +128,7 @@ class Desktop : public Application Desktop(); ~Desktop(); virtual void Main( ); - virtual void Init(); + virtual BOOL Init(); virtual void DeInit(); virtual BOOL QueryExit(); virtual USHORT Exception(USHORT nError); Index: desktop/source/app/app.cxx =================================================================== RCS file: /cvs/framework/desktop/source/app/app.cxx,v retrieving revision 1.119 diff -u -p -u -r1.119 app.cxx --- desktop/source/app/app.cxx 16 Jul 2003 17:41:22 -0000 1.119 +++ desktop/source/app/app.cxx 2 Sep 2003 14:28:36 -0000 @@ -555,7 +555,7 @@ Desktop::~Desktop() { } -void Desktop::Init() +BOOL Desktop::Init() { RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::Init" ); @@ -575,7 +575,7 @@ void Desktop::Init() // check whether we need to print cmdline help if ( pCmdLineArgs->IsHelp() ) { displayCmdlineHelp(); - _exit(0); + return FALSE; } #endif // start ipc thread only for non-remote offices @@ -589,7 +589,7 @@ void Desktop::Init() else if ( aStatus == OfficeIPCThread::IPC_STATUS_2ND_OFFICE ) { // 2nd office startup should terminate after sending cmdlineargs through pipe - _exit( 0 ); + return FALSE; } else if ( pCmdLineArgs->IsHelp() ) { @@ -599,6 +599,7 @@ void Desktop::Init() pSignalHandler = new SalMainPipeExchangeSignalHandler; } + return TRUE; } void Desktop::DeInit() Index: vcl/unx/source/app/saldisp.cxx =================================================================== RCS file: /cvs/gsl/vcl/unx/source/app/saldisp.cxx,v retrieving revision 1.43.26.2 diff -u -p -u -r1.43.26.2 saldisp.cxx --- vcl/unx/source/app/saldisp.cxx 29 Jul 2003 12:45:39 -0000 1.43.26.2 +++ vcl/unx/source/app/saldisp.cxx 2 Sep 2003 14:30:04 -0000 @@ -792,6 +792,15 @@ SalDisplay::~SalDisplay( ) SalBitmap::ImplDestroyCache(); DestroyFontCache(); +#ifdef HAVE_LIBSN + if( m_pSnLauncheeContext ) + { + sn_launchee_context_complete( m_pSnLauncheeContext ); + sn_launchee_context_unref( m_pSnLauncheeContext ); + } + sn_display_unref( m_pSnDisplay ); +#endif /* HAVE_LIBSN */ + if( IsDisplay() ) { osl_destroyMutex( hEventGuard_ ); @@ -837,12 +846,6 @@ SalDisplay::~SalDisplay( ) XCloseDisplay( pDisp_ ); } -#ifdef HAVE_LIBSN - if( m_pSnLauncheeContext ) - sn_launchee_context_unref( m_pSnLauncheeContext ); - sn_display_unref( m_pSnDisplay ); -#endif /* HAVE_LIBSN */ - pDisp_ = (Display*)ILLEGAL_POINTER; pSalData->Remove( this ); Index: vcl/unx/source/app/salinst.cxx =================================================================== RCS file: /cvs/gsl/vcl/unx/source/app/salinst.cxx,v retrieving revision 1.16 diff -u -p -u -r1.16 salinst.cxx --- vcl/unx/source/app/salinst.cxx 22 Jul 2003 10:12:20 -0000 1.16 +++ vcl/unx/source/app/salinst.cxx 2 Sep 2003 14:55:27 -0000 @@ -180,6 +180,15 @@ void InitSalMain() void DeInitSalMain() { +#if 0 +// Probably not needed - but must test this ... + // Hack: seemingly shutdown doesn't clean these up + SalData *pData; + if( ( pData = GetSalData() ) ) { + delete pData; + SetSalData( NULL ); + } +#endif } void SetFilterCallback( void* pCallback, void* pInst )