From b30ee83058793ea8fbb020e5ac8f118bd20853d5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 12 Oct 2012 11:44:23 +0200 Subject: fdo#46808, use service constructor for beans::Introspection Change-Id: Ieb49277020d31779979d8eb508391d6f8b97bf94 --- extensions/source/propctrlr/eventhandler.cxx | 5 +++-- extensions/source/propctrlr/genericpropertyhandler.cxx | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'extensions') diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index f7a6862598fd..1116c7ad7f5f 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include @@ -95,6 +95,7 @@ namespace pcr using ::com::sun::star::uno::Any; using ::com::sun::star::uno::TypeClass_STRING; using ::com::sun::star::uno::Type; + using ::com::sun::star::beans::Introspection; using ::com::sun::star::beans::XPropertyChangeListener; using ::com::sun::star::beans::Property; using ::com::sun::star::beans::PropertyState; @@ -1060,7 +1061,7 @@ namespace pcr // we use a set to avoid duplicates TypeBag aListeners; - Reference< XIntrospection > xIntrospection( m_aContext.createComponent( "com.sun.star.beans.Introspection" ), UNO_QUERY_THROW ); + Reference< XIntrospection > xIntrospection = Introspection::create( m_aContext.getUNOContext() ); // --- model listeners lcl_addListenerTypesFor_throw( diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index 3a06449f0151..071b437d7171 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include @@ -384,9 +384,7 @@ namespace pcr m_xPropertyState.clear(); // create an introspection adapter for the component - Reference< XIntrospection > xIntrospection; - if ( !m_aContext.createComponent( "com.sun.star.beans.Introspection", xIntrospection ) ) - throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Could not create an instance of the service com.sun.star.beans.Introspection." ) ), *this ); + Reference< XIntrospection > xIntrospection = Introspection::create( m_aContext.getUNOContext() ); Reference< XIntrospectionAccess > xIntrospectionAccess( xIntrospection->inspect( makeAny( _rxIntrospectee ) ) ); if ( !xIntrospectionAccess.is() ) -- cgit