diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2002-06-14 12:26:30 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2002-06-14 12:26:30 +0000 |
commit | 8f0762f89160b4082da93c9e1b0ff99df15dd976 (patch) | |
tree | 7d8eb3ae7cef3fc3b41504e70fb0d1c92e60e631 /stoc/source/invocation | |
parent | cec9e449acbec8a6ccc8acd7206a9b4ec441c063 (diff) |
#100075# modifying loaders, using macro expander singleton; service manager review
Diffstat (limited to 'stoc/source/invocation')
-rw-r--r-- | stoc/source/invocation/inv.xml | 1 | ||||
-rw-r--r-- | stoc/source/invocation/invocation.cxx | 26 |
2 files changed, 20 insertions, 7 deletions
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 <type> com.sun.star.lang.XMultiComponentFactory </type> <type> com.sun.star.lang.XSingleComponentFactory </type> <type> com.sun.star.registry.XRegistryKey </type> + <type> com.sun.star.uno.DeploymentException </type> <type> com.sun.star.uno.XAggregation </type> <type> com.sun.star.uno.XWeak </type> <type> com.sun.star.uno.XComponentContext </type> 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 <cppuhelper/typeprovider.hxx> #include <cppuhelper/implbase2.hxx> +#include <com/sun/star/uno/DeploymentException.hpp> #include <com/sun/star/script/FailReason.hpp> #include <com/sun/star/script/XTypeConverter.hpp> #include <com/sun/star/script/XInvocation.hpp> @@ -1162,11 +1163,22 @@ InvocationService::InvocationService( const Reference<XComponentContext> & xCtx OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Introspection")), xCtx), UNO_QUERY); - xCoreReflection = Reference<XIdlReflection>( - 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<XIdlReflection>( +// mxSMgr->createInstanceWithContext( +// OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")), +// xCtx), +// UNO_QUERY); } InvocationService::~InvocationService() |