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 /extensions/source | |
parent | 5e48667f6bdd2f5e05b3f41d080fda06bd3d7c16 (diff) |
fdo#46808, use service constructor for beans::Introspection
Change-Id: Ieb49277020d31779979d8eb508391d6f8b97bf94
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/propctrlr/eventhandler.cxx | 5 | ||||
-rw-r--r-- | extensions/source/propctrlr/genericpropertyhandler.cxx | 6 |
2 files changed, 5 insertions, 6 deletions
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 <com/sun/star/awt/XTabControllerModel.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/beans/UnknownPropertyException.hpp> -#include <com/sun/star/beans/XIntrospection.hpp> +#include <com/sun/star/beans/Introspection.hpp> #include <com/sun/star/beans/XIntrospectionAccess.hpp> #include <com/sun/star/container/NoSuchElementException.hpp> #include <com/sun/star/container/XChild.hpp> @@ -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 <com/sun/star/container/XHierarchicalNameAccess.hpp> #include <com/sun/star/reflection/XEnumTypeDescription.hpp> -#include <com/sun/star/beans/XIntrospection.hpp> +#include <com/sun/star/beans/Introspection.hpp> #include <com/sun/star/inspection/PropertyControlType.hpp> #include <com/sun/star/inspection/XHyperlinkControl.hpp> #include <com/sun/star/awt/XActionListener.hpp> @@ -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() ) |