summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorKay Ramme <kr@openoffice.org>2001-07-25 13:11:11 +0000
committerKay Ramme <kr@openoffice.org>2001-07-25 13:11:11 +0000
commit6439e35a79fead0c00e5a76d6ff2af93fdd456c9 (patch)
tree75d4b61859a900f18541e6433c7ad3d27b746732 /desktop/source
parent53d3141b965f7c3eb8dfefe3830bef72112f3a4d (diff)
default bootstrap the office (#88338#)
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/app/appinit.cxx97
1 files changed, 52 insertions, 45 deletions
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 296a0e4e02bd..d128b46f6d8d 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: appinit.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: cd $ $Date: 2001-07-24 06:37:23 $
+ * last change: $Author: kr $ $Date: 2001-07-25 14:11:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -107,6 +107,8 @@
#include <ucbhelper/configurationkeys.hxx>
#endif
+#include <cppuhelper/bootstrap.hxx>
+
#include <rtl/logfile.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/localfilehelper.hxx>
@@ -182,49 +184,54 @@ Reference< XMultiServiceFactory > createApplicationServiceManager()
{
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd) ::createApplicationServiceManager" );
- try
- {
- ::rtl::OUString localRegistry = ::comphelper::getPathToUserRegistry();
- ::rtl::OUString systemRegistry = ::comphelper::getPathToSystemRegistry();
-
- Reference< XSimpleRegistry > xLocalRegistry( ::cppu::createSimpleRegistry() );
- Reference< XSimpleRegistry > xSystemRegistry( ::cppu::createSimpleRegistry() );
- if ( xLocalRegistry.is() && (localRegistry.getLength() > 0) )
- {
- try
- {
- xLocalRegistry->open( localRegistry, sal_False, sal_True);
- }
- catch ( InvalidRegistryException& )
- {
- }
-
- if ( !xLocalRegistry->isValid() )
- xLocalRegistry->open(localRegistry, sal_True, sal_True);
- }
-
- if ( xSystemRegistry.is() && (systemRegistry.getLength() > 0) )
- xSystemRegistry->open( systemRegistry, sal_True, sal_False);
-
- if ( (xLocalRegistry.is() && xLocalRegistry->isValid()) &&
- (xSystemRegistry.is() && xSystemRegistry->isValid()) )
- {
- Reference < XSimpleRegistry > xReg( ::cppu::createNestedRegistry() );
- Sequence< Any > seqAnys(2);
- seqAnys[0] <<= xLocalRegistry ;
- seqAnys[1] <<= xSystemRegistry ;
- Reference< XInitialization > xInit( xReg, UNO_QUERY );
- xInit->initialize( seqAnys );
-
- Reference< XComponentContext > xContext( ::cppu::bootstrap_InitialComponentContext( xReg ) );
- return Reference< XMultiServiceFactory >( xContext->getServiceManager(), UNO_QUERY );
- }
- }
- catch( ::com::sun::star::uno::Exception& )
- {
- }
-
- return ::cppu::createServiceFactory();
+ Reference<XComponentContext> xComponentContext = ::cppu::defaultBootstrap_InitialComponentContext();
+ Reference<XMultiServiceFactory> xMS(xComponentContext->getServiceManager(), UNO_QUERY);
+
+ return xMS;
+
+// try
+// {
+// ::rtl::OUString localRegistry = ::comphelper::getPathToUserRegistry();
+// ::rtl::OUString systemRegistry = ::comphelper::getPathToSystemRegistry();
+
+// Reference< XSimpleRegistry > xLocalRegistry( ::cppu::createSimpleRegistry() );
+// Reference< XSimpleRegistry > xSystemRegistry( ::cppu::createSimpleRegistry() );
+// if ( xLocalRegistry.is() && (localRegistry.getLength() > 0) )
+// {
+// try
+// {
+// xLocalRegistry->open( localRegistry, sal_False, sal_True);
+// }
+// catch ( InvalidRegistryException& )
+// {
+// }
+
+// if ( !xLocalRegistry->isValid() )
+// xLocalRegistry->open(localRegistry, sal_True, sal_True);
+// }
+
+// if ( xSystemRegistry.is() && (systemRegistry.getLength() > 0) )
+// xSystemRegistry->open( systemRegistry, sal_True, sal_False);
+
+// if ( (xLocalRegistry.is() && xLocalRegistry->isValid()) &&
+// (xSystemRegistry.is() && xSystemRegistry->isValid()) )
+// {
+// Reference < XSimpleRegistry > xReg( ::cppu::createNestedRegistry() );
+// Sequence< Any > seqAnys(2);
+// seqAnys[0] <<= xLocalRegistry ;
+// seqAnys[1] <<= xSystemRegistry ;
+// Reference< XInitialization > xInit( xReg, UNO_QUERY );
+// xInit->initialize( seqAnys );
+
+// Reference< XComponentContext > xContext( ::cppu::bootstrap_InitialComponentContext( xReg ) );
+// return Reference< XMultiServiceFactory >( xContext->getServiceManager(), UNO_QUERY );
+// }
+// }
+// catch( ::com::sun::star::uno::Exception& )
+// {
+// }
+
+// return ::cppu::createServiceFactory();
}
void destroyApplicationServiceManager( Reference< XMultiServiceFactory >& xSMgr )