diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2002-11-11 15:43:12 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2002-11-11 15:43:12 +0000 |
commit | 4a6f54ade3538890a397ed77418c78556d9ea54c (patch) | |
tree | b0ee57a0c5cdca4889e23721db84f79d64112d34 | |
parent | 116b4c50f5d60deec1e19dd47e360fcac32af990 (diff) |
#104787# no registration here
-rw-r--r-- | stoc/test/testcorefl.cxx | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx index f9d724bc6705..fb724f51f90c 100644 --- a/stoc/test/testcorefl.cxx +++ b/stoc/test/testcorefl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: testcorefl.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: hr $ $Date: 2002-08-19 14:08:26 $ + * last change: $Author: dbo $ $Date: 2002-11-11 16:43:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -413,37 +413,32 @@ int main( int argc, char * argv[] ) int __cdecl main( int argc, char * argv[] ) #endif { - Reference< XMultiServiceFactory > xMgr( createRegistryServiceFactory( - OUString( RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb") ) ) ); - Reference< XComponentContext > xContext; - Reference< beans::XPropertySet > xProps( xMgr, UNO_QUERY ); - OSL_ASSERT( xProps.is() ); - xProps->getPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xContext; - OSL_ASSERT( xContext.is() ); - xMgr.clear(); - sal_Bool bSucc = sal_False; try { - Reference< XImplementationRegistration > xImplReg( - xContext->getServiceManager()->createInstanceWithContext( - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration") ), xContext ), UNO_QUERY ); - OSL_ENSURE( xImplReg.is(), "### no impl reg!" ); - OUString aLibName( OUString::createFromAscii(REG_PREFIX) ); aLibName += OUString::createFromAscii("corefl"); #ifndef OS2 aLibName += OUString::createFromAscii(DLL_POSTFIX); #endif - xImplReg->registerImplementation( - OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), aLibName, Reference< XSimpleRegistry >() ); + + Reference< XMultiServiceFactory > xMgr( + createRegistryServiceFactory( + OUString( RTL_CONSTASCII_USTRINGPARAM("stoctest.rdb") ) ) ); + Reference< XComponentContext > xContext; + Reference< beans::XPropertySet > xProps( xMgr, UNO_QUERY ); + OSL_ASSERT( xProps.is() ); + xProps->getPropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xContext; + OSL_ASSERT( xContext.is() ); Reference< XIdlReflection > xRefl; xContext->getValueByName( OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection")) ) >>= xRefl; OSL_ENSURE( xRefl.is(), "### CoreReflection singleton not accessable!?" ); bSucc = test_corefl( xRefl ); + + Reference< XComponent >( xContext, UNO_QUERY )->dispose(); } catch (Exception & rExc) { @@ -454,8 +449,6 @@ int __cdecl main( int argc, char * argv[] ) OSL_TRACE( "\n" ); } - Reference< XComponent >( xContext, UNO_QUERY )->dispose(); - printf( "testcorefl %s !\n", (bSucc ? "succeeded" : "failed") ); return (bSucc ? 0 : -1); } |