summaryrefslogtreecommitdiff
path: root/stoc/source/invocation
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-07 12:03:03 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-07 12:03:03 +0100
commitbd20500cf3d88d0bd81d7e57df01b0130e7166f6 (patch)
tree63e6f08b5c17bcab3e3a2c57c6f4063033f3f52c /stoc/source/invocation
parent41324964f5a2200fd5763a51204b20ff0fa1034b (diff)
Simplify access to theCoreReflection singleton
Change-Id: I9901991a320b87895230a92095c9c7d3109380a6
Diffstat (limited to 'stoc/source/invocation')
-rw-r--r--stoc/source/invocation/invocation.cxx18
1 files changed, 2 insertions, 16 deletions
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 98ef7233425c..ecc8626c8646 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -26,12 +26,12 @@
#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>
#include <com/sun/star/script/XInvocation2.hpp>
#include <com/sun/star/reflection/XIdlReflection.hpp>
+#include <com/sun/star/reflection/theCoreReflection.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
@@ -1093,6 +1093,7 @@ private:
InvocationService::InvocationService( const Reference<XComponentContext> & xCtx )
: mxCtx( xCtx )
, mxSMgr( xCtx->getServiceManager() )
+ , xCoreReflection( css::reflection::theCoreReflection::get(mxCtx) )
{
xTypeConverter = Reference<XTypeConverter>(
mxSMgr->createInstanceWithContext(
@@ -1100,21 +1101,6 @@ InvocationService::InvocationService( const Reference<XComponentContext> & xCtx
xCtx ),
UNO_QUERY );
xIntrospection = Introspection::create(xCtx);
- mxCtx->getValueByName(
- OUString("/singletons/com.sun.star.reflection.theCoreReflection") )
- >>= xCoreReflection;
- OSL_ENSURE( xCoreReflection.is(), "### CoreReflection singleton not accessible!?" );
- if (! xCoreReflection.is())
- {
- throw DeploymentException(
- OUString("/singletons/com.sun.star.reflection.theCoreReflection singleton not accessible"),
- Reference< XInterface >() );
- }
-// xCoreReflection = Reference<XIdlReflection>(
-// mxSMgr->createInstanceWithContext(
-// OUString("com.sun.star.reflection.CoreReflection"),
-// xCtx),
-// UNO_QUERY);
}
InvocationService::~InvocationService() {}