summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sbunoobj.cxx15
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