diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-06-10 10:30:48 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-06-10 10:30:48 +0000 |
commit | c569b2c52d878574bd272609596d0117b9621484 (patch) | |
tree | 621c9de9aadd79a03c3b050d705bac9a6c0641e6 /basic | |
parent | f793c645c6eb19441aeb67d9aa11c4d0c040acc5 (diff) |
INTEGRATION: CWS gh4 (1.49.4); FILE MERGED
2003/06/03 15:56:52 gh 1.49.4.2: #105306#renice code a bit more
2003/06/03 15:42:02 gh 1.49.4.1: #105306#now reopening the registry works on all mountpoints
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/app/app.cxx | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx index 562d6f49e051..d814c5241987 100644 --- a/basic/source/app/app.cxx +++ b/basic/source/app/app.cxx @@ -2,9 +2,9 @@ * * $RCSfile: app.cxx,v $ * - * $Revision: 1.49 $ + * $Revision: 1.50 $ * - * last change: $Author: rt $ $Date: 2003-04-23 16:55:18 $ + * last change: $Author: vg $ $Date: 2003-06-10 11:30:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -349,26 +349,44 @@ Reference< XContentProviderManager > InitializeUCB( void ) { { Reference< XMultiServiceFactory > interimSmgr = - createRegistryServiceFactory( services, types, sal_False ); + createRegistryServiceFactory( types, sal_True ); Reference< XImplementationRegistration > xIR( interimSmgr->createInstance( OUString::createFromAscii( "com.sun.star.registry.ImplementationRegistration" ) ), UNO_QUERY ); - OUString loader( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.loader.SharedLibrary" )); - for( sal_Int32 i = 0; components[i] ; i ++ ) + Reference< XSimpleRegistry > xReg( + interimSmgr->createInstance( + OUString::createFromAscii( + "com.sun.star.registry.SimpleRegistry" ) ), UNO_QUERY ); + if ( xReg.is() ) { - printf("Registering %s ... ", components[i]); - xIR->registerImplementation( - loader, OUString::createFromAscii(components[i]),Reference< XSimpleRegistry >()); - printf("done\n"); + xReg->open(services, sal_False, sal_True); + if ( xReg->isValid() ) + { + OUString loader( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.loader.SharedLibrary" )); + for( sal_Int32 i = 0; components[i] ; i ++ ) + { + printf("Registering %s ... ", components[i]); + xIR->registerImplementation( + loader, OUString::createFromAscii(components[i]),xReg); + printf("done\n"); + } + xReg->close(); + } else + { + printf("Cannot open Registry. Terminating Program\n"); + exit (1); + } } + Reference< XComponent > xComp( interimSmgr, UNO_QUERY ); if( xComp.is() ) xComp->dispose(); } // now try it again readonly + printf("Opening Registry readonly\n"); xSMgr = createRegistryServiceFactory( types, services, sal_True ); } catch( com::sun::star::uno::Exception & exc ) |