From 8f0762f89160b4082da93c9e1b0ff99df15dd976 Mon Sep 17 00:00:00 2001 From: Daniel Boelzle Date: Fri, 14 Jun 2002 12:26:30 +0000 Subject: #100075# modifying loaders, using macro expander singleton; service manager review --- stoc/source/invocation/inv.xml | 1 + stoc/source/invocation/invocation.cxx | 26 +++++++++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'stoc/source/invocation') diff --git a/stoc/source/invocation/inv.xml b/stoc/source/invocation/inv.xml index 01b5045b4335..1267d1063d36 100644 --- a/stoc/source/invocation/inv.xml +++ b/stoc/source/invocation/inv.xml @@ -53,6 +53,7 @@ XNameContainer and XEnumerationContainer com.sun.star.lang.XMultiComponentFactory com.sun.star.lang.XSingleComponentFactory com.sun.star.registry.XRegistryKey + com.sun.star.uno.DeploymentException com.sun.star.uno.XAggregation com.sun.star.uno.XWeak com.sun.star.uno.XComponentContext diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index 463c7731ce22..0e5903c1f082 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -2,9 +2,9 @@ * * $RCSfile: invocation.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: hr $ $Date: 2001-09-11 13:48:48 $ + * last change: $Author: dbo $ $Date: 2002-06-14 13:26:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -78,6 +78,7 @@ #include #include +#include #include #include #include @@ -1162,11 +1163,22 @@ InvocationService::InvocationService( const Reference & xCtx OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Introspection")), xCtx), UNO_QUERY); - xCoreReflection = Reference( - mxSMgr->createInstanceWithContext( - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")), - xCtx), - UNO_QUERY); + mxCtx->getValueByName( + OUString( + RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection")) ) + >>= xCoreReflection; + OSL_ENSURE( xCoreReflection.is(), "### CoreReflection singleton not accessable!?" ); + if (! xCoreReflection.is()) + { + throw DeploymentException( + OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theCoreReflection singleton not accessable") ), + Reference< XInterface >() ); + } +// xCoreReflection = Reference( +// mxSMgr->createInstanceWithContext( +// OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")), +// xCtx), +// UNO_QUERY); } InvocationService::~InvocationService() -- cgit v1.2.3