summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-09-04 16:12:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-05 15:46:55 +0200
commitb679a2a02180c017bd8b596fb2e4f283bad93b75 (patch)
treedecf939bbd22a2507e8cd9e6c2e41ded49352aa3 /pyuno
parent3bb22684c3e0e865f1635ba52ea84630ff766b8c (diff)
fdo#46808, Adapt reflection::CoreReflection UNO service to new style
The XComponent part of the interface made no sense for a singleton, so it was removed. Explicitly document the 'theCoreReflection' singleton and move it into it's own file. Deprecated the now old CoreReflection service. Change-Id: Ib8befa87c7da7eb53a2f587948fd54a64c082472
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/module/pyuno_runtime.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 3196be6e399f..a89b1822cbbc 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/beans/XMaterialHolder.hpp>
#include <com/sun/star/script/Converter.hpp>
+#include <com/sun/star/reflection/theCoreReflection.hpp>
using rtl::OUString;
using rtl::OUStringToOString;
@@ -45,11 +46,13 @@ using com::sun::star::uno::TypeDescription;
using com::sun::star::uno::Sequence;
using com::sun::star::uno::Type;
using com::sun::star::uno::UNO_QUERY;
+using com::sun::star::uno::UNO_QUERY_THROW;
using com::sun::star::uno::Exception;
using com::sun::star::uno::RuntimeException;
using com::sun::star::uno::XComponentContext;
using com::sun::star::lang::XSingleServiceFactory;
using com::sun::star::lang::XUnoTunnel;
+using com::sun::star::reflection::theCoreReflection;
using com::sun::star::reflection::XIdlReflection;
using com::sun::star::script::Converter;
using com::sun::star::script::XTypeConverter;
@@ -264,15 +267,7 @@ PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx )
OUString( "pyuno: couldn't instantiate typeconverter service" ),
Reference< XInterface > () );
- c->xCoreReflection = Reference< XIdlReflection > (
- ctx->getServiceManager()->createInstanceWithContext(
- OUString( "com.sun.star.reflection.CoreReflection" ),
- ctx ),
- UNO_QUERY );
- if( ! c->xCoreReflection.is() )
- throw RuntimeException(
- OUString( "pyuno: couldn't instantiate corereflection service" ),
- Reference< XInterface > () );
+ c->xCoreReflection = theCoreReflection::get(ctx);
c->xAdapterFactory = Reference< XInvocationAdapterFactory2 > (
ctx->getServiceManager()->createInstanceWithContext(