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 /basic | |
parent | 5e48667f6bdd2f5e05b3f41d080fda06bd3d7c16 (diff) |
fdo#46808, use service constructor for beans::Introspection
Change-Id: Ieb49277020d31779979d8eb508391d6f8b97bf94
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index cd43e1b4c6bd..6b635aa0d58c 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -47,6 +47,7 @@ #include <com/sun/star/beans/PropertyConcept.hpp> #include <com/sun/star/beans/MethodConcept.hpp> #include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/beans/Introspection.hpp> #include <com/sun/star/script/BasicErrorException.hpp> #include <com/sun/star/script/XAllListener.hpp> #include <com/sun/star/script/XInvocationAdapterFactory.hpp> @@ -2421,18 +2422,8 @@ void SbUnoObject::doIntrospection( void ) if( !xIntrospection.is() ) { // get the introspection service - Reference< XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory() ); - if ( xFactory.is() ) - { - Reference< XInterface > xI = xFactory->createInstance( rtl::OUString("com.sun.star.beans.Introspection") ); - if (xI.is()) - xIntrospection = Reference< XIntrospection >::query( xI ); - } - } - if( !xIntrospection.is() ) - { - StarBASIC::FatalError( ERRCODE_BASIC_EXCEPTION ); - return; + Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); + xIntrospection = Introspection::create( xContext ); } // pass the introspection |