diff options
author | Noel Grandin <noel@peralex.com> | 2012-10-12 11:44:23 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-23 13:06:14 +0200 |
commit | b30ee83058793ea8fbb020e5ac8f118bd20853d5 (patch) | |
tree | c187507f36c6288e5f4ede78a0d5e33876f7b3f1 /pyuno | |
parent | 5e48667f6bdd2f5e05b3f41d080fda06bd3d7c16 (diff) |
fdo#46808, use service constructor for beans::Introspection
Change-Id: Ieb49277020d31779979d8eb508391d6f8b97bf94
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/module/pyuno_runtime.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index c61ae008ac3d..fdd30187e361 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -30,6 +30,7 @@ #include <typelib/typedescription.hxx> #include <com/sun/star/beans/XMaterialHolder.hpp> +#include <com/sun/star/beans/Introspection.hpp> #include <com/sun/star/script/Converter.hpp> #include <com/sun/star/reflection/theCoreReflection.hpp> @@ -59,6 +60,7 @@ using com::sun::star::script::XInvocationAdapterFactory2; using com::sun::star::script::XInvocation; using com::sun::star::beans::XMaterialHolder; using com::sun::star::beans::XIntrospection; +using com::sun::star::beans::Introspection; #include <vector> @@ -278,15 +280,7 @@ PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx ) OUString( "pyuno: couldn't instantiate invocation adapter factory service" ), Reference< XInterface > () ); - c->xIntrospection = Reference< XIntrospection > ( - ctx->getServiceManager()->createInstanceWithContext( - OUString( "com.sun.star.beans.Introspection" ), - ctx ), - UNO_QUERY ); - if( ! c->xIntrospection.is() ) - throw RuntimeException( - OUString( "pyuno: couldn't instantiate introspection service" ), - Reference< XInterface > () ); + c->xIntrospection = Introspection::create(ctx); Any a = ctx->getValueByName(OUString( "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ) ); a >>= c->xTdMgr; |