summaryrefslogtreecommitdiff
path: root/padmin/source/pamain.cxx
diff options
context:
space:
mode:
authorJörg Budischewski <jbu@openoffice.org>2002-10-01 09:41:46 +0000
committerJörg Budischewski <jbu@openoffice.org>2002-10-01 09:41:46 +0000
commit4f5976c38322a993c5c7f9afd000178dd9f3322c (patch)
treee53b5e54f7965c5ad6af12b47a039dd96a467e66 /padmin/source/pamain.cxx
parent8bed41d97b182e69effb3eb2b8b74377a96edcfc (diff)
#103263# switched to default bootstrapping
Diffstat (limited to 'padmin/source/pamain.cxx')
-rw-r--r--padmin/source/pamain.cxx40
1 files changed, 10 insertions, 30 deletions
diff --git a/padmin/source/pamain.cxx b/padmin/source/pamain.cxx
index 8a9456e400a1..610081459a31 100644
--- a/padmin/source/pamain.cxx
+++ b/padmin/source/pamain.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pamain.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: pl $ $Date: 2001-09-04 16:24:50 $
+ * last change: $Author: jbu $ $Date: 2002-10-01 10:41:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,8 +78,8 @@
#include <helper.hxx>
#endif
-#ifndef _CPPUHELPER_SERVICEFACTORY_HXX_
-#include <cppuhelper/servicefactory.hxx>
+#ifndef _CPPUHELPER_BOOTSTRAP_HXX_
+#include <cppuhelper/bootstrap.hxx>
#endif
#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
@@ -94,6 +94,10 @@
#include <ucbhelper/configurationkeys.hxx>
#endif
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+
using namespace padmin;
using namespace rtl;
using namespace cppu;
@@ -133,30 +137,8 @@ void MyApp::Main()
//-------------------------------------------------
// create the global service-manager
//-------------------------------------------------
-
- OUString aReadRdbName( Application::GetAppFileName() );
- int nLastSlash = aReadRdbName.lastIndexOf( '/' );
- if( nLastSlash >= 0 )
- aReadRdbName = aReadRdbName.copy( 0, nLastSlash+1 );
- else
- aReadRdbName = OUString();
- aReadRdbName += OUString::createFromAscii( "applicat.rdb" );
-
- OUString aWriteRdbName( OUString::createFromAscii( "/tmp/padmin" ) );
- aWriteRdbName += OUString::valueOf( (sal_Int32)getpid() );
- aWriteRdbName += OUString::createFromAscii( ".rdb" );
-
-#ifdef DEBUG
- printf( "using write registry %s\n", OUStringToOString( aWriteRdbName, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
- printf( "using read registry %s\n", OUStringToOString( aReadRdbName, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
-#endif
- Reference< XMultiServiceFactory > xFactory( createRegistryServiceFactory( aWriteRdbName, aReadRdbName ) );
- if( xFactory.is() )
- setProcessServiceFactory( xFactory );
-#ifdef DEBUG
- else
- fprintf( stderr, "could not create service factory\n" );
-#endif
+ Reference< XComponentContext > xCtx = defaultBootstrap_InitialComponentContext();
+ Reference< XMultiServiceFactory > xFactory( xCtx->getServiceManager(), UNO_QUERY );
/*
* Create UCB.
@@ -181,6 +163,4 @@ void MyApp::Main()
*/
::ucb::ContentBroker::deinitialize();
- OString aTmp( OUStringToOString( aWriteRdbName, RTL_TEXTENCODING_ISO_8859_1 ) );
- unlink( aTmp.getStr() );
}