summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMikhail Voitenko <mav@openoffice.org>2001-02-23 10:22:36 +0000
committerMikhail Voitenko <mav@openoffice.org>2001-02-23 10:22:36 +0000
commitb5a84087cb8ade12df013435312fad3ebc1e4576 (patch)
tree93be3c24f0346ffa8a8c8b873804301a8a72c128 /desktop
parent6f1bc940880fc865451d8c7045d87b47f66a026c (diff)
#84160# & #84161# first initialization for the local soffice
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx50
1 files changed, 36 insertions, 14 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 5e83d688e214..adf507c3c2e6 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: app.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: kso $ $Date: 2001-02-12 16:50:50 $
+ * last change: $Author: mav $ $Date: 2001-02-23 11:22:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -156,27 +156,49 @@ void Desktop::Main()
{
ResMgr::SetReadStringHook( ReplaceStringHookProc );
SetAppName( DEFINE_CONST_UNICODE("soffice") );
+
+ bool bTerminate = false;
+ int nParamCount = GetCommandLineParamCount();
+
+ for( int nActParam = 0; nActParam < nParamCount ; nActParam++ )
+ {
+ String sActParam = GetCommandLineParam( nActParam );
+ if( sActParam.EqualsIgnoreCaseAscii("-terminate_after_init") )
+ {
+ bTerminate = true;
+ break;
+ }
+ }
+
// Read the common configuration items for optimization purpose
- PreloadConfigTrees();
+// do not do it if terminate flag was specified, to avoid exception
+ if( !bTerminate )
+ PreloadConfigTrees();
+// The only step that should be done if terminate flag was specified
+// Typically called by the plugin only
Installer* pInstaller = new Installer;
pInstaller->InitializeInstallation( Application::GetAppFileName() );
delete pInstaller;
- SvtPathOptions* pPathOptions = new SvtPathOptions;
- RegisterServices();
- OfficeWrapper* pWrapper = new OfficeWrapper( ::comphelper::getProcessServiceFactory() );
-// Reference < XComponent > xWrapper( ::utl::getProcessServiceFactory()->createInstance( DEFINE_CONST_UNICODE("com.sun.star.office.OfficeWrapper" ) ), UNO_QUERY );
- SfxApplicationClass::Main();
-// xWrapper->dispose();
-
- if( pWrapper!=NULL)
+ if( !bTerminate )
{
- delete pWrapper;
- pWrapper=NULL;
+ SvtPathOptions* pPathOptions = new SvtPathOptions;
+ RegisterServices();
+ OfficeWrapper* pWrapper = new OfficeWrapper( ::comphelper::getProcessServiceFactory() );
+// Reference < XComponent > xWrapper( ::utl::getProcessServiceFactory()->createInstance( DEFINE_CONST_UNICODE("com.sun.star.office.OfficeWrapper" ) ), UNO_QUERY );
+ SfxApplicationClass::Main();
+// xWrapper->dispose();
+
+ if( pWrapper!=NULL)
+ {
+ delete pWrapper;
+ pWrapper=NULL;
+ }
+
+ delete pPathOptions;
}
- delete pPathOptions;
utl::ConfigManager::RemoveConfigManager();
}