From e412e16d56caf426bac04c7e5966e2a9efa7c408 Mon Sep 17 00:00:00 2001 From: "Matthew J. Francis" Date: Mon, 13 Jul 2015 09:28:52 +0800 Subject: Merge ImplIntrospectionAccess and ImplIntrospectionAdapter This eliminates a lifecycle error which caused an instance of ImplIntrospectionAdapter to be created on every failing call to ImplIntrospectionAccess::queryAdapter(), rather than only once, due to an incorrectly conceived weak reference relationship between the two. Change-Id: If0c7c906acadfd7f81a0ce9e7f7a949154494720 Reviewed-on: https://gerrit.libreoffice.org/16972 Reviewed-by: Matthew Francis Tested-by: Matthew Francis --- stoc/source/inspect/introspection.cxx | 238 +++++++++++++++------------------- stoc/source/invocation/invocation.cxx | 50 +++---- 2 files changed, 128 insertions(+), 160 deletions(-) diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index a74a729373af..cd621b801b63 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -83,7 +83,10 @@ using namespace osl; namespace { -typedef WeakImplHelper3< XIntrospectionAccess, XMaterialHolder, XExactName > IntrospectionAccessHelper; +typedef WeakImplHelper< XIntrospectionAccess, XMaterialHolder, XExactName, + XPropertySet, XFastPropertySet, XPropertySetInfo, + XNameContainer, XIndexContainer, XEnumerationAccess, + XIdlArray > IntrospectionAccessHelper; @@ -162,7 +165,6 @@ class IntrospectionAccessStatic_Impl: public salhelper::SimpleReferenceObject { friend class Implementation; friend class ImplIntrospectionAccess; - friend class ImplIntrospectionAdapter; // Holding CoreReflection Reference< XIdlReflection > mxCoreReflection; @@ -700,9 +702,6 @@ class ImplIntrospectionAccess : public IntrospectionAccessHelper // Static introspection data rtl::Reference< IntrospectionAccessStatic_Impl > mpStaticImpl; - // Adapter-Implementation - WeakReference< XInterface > maAdapter; - // Last Sequence that came with getProperties (optimization) Sequence maLastPropertySeq; sal_Int32 mnLastPropertyConcept; @@ -711,6 +710,26 @@ class ImplIntrospectionAccess : public IntrospectionAccessHelper Sequence > maLastMethodSeq; sal_Int32 mnLastMethodConcept; + // Guards the caching of queried interfaces + osl::Mutex m_aMutex; + + // Original interfaces of the objects + Reference mxObjElementAccess; + Reference mxObjNameContainer; + Reference mxObjNameAccess; + Reference mxObjIndexAccess; + Reference mxObjIndexContainer; + Reference mxObjEnumerationAccess; + Reference mxObjIdlArray; + + Reference getXElementAccess(); + Reference getXNameContainer(); + Reference getXNameAccess(); + Reference getXIndexContainer(); + Reference getXIndexAccess(); + Reference getXEnumerationAccess(); + Reference getXIdlArray(); + public: ImplIntrospectionAccess( const Any& obj, rtl::Reference< IntrospectionAccessStatic_Impl > const & pStaticImpl_ ); virtual ~ImplIntrospectionAccess(); @@ -743,75 +762,6 @@ public: // Methods from XExactName virtual OUString SAL_CALL getExactName( const OUString& rApproximateName ) throw( RuntimeException, std::exception ) SAL_OVERRIDE; -}; - -ImplIntrospectionAccess::ImplIntrospectionAccess - ( const Any& obj, rtl::Reference< IntrospectionAccessStatic_Impl > const & pStaticImpl_ ) - : maInspectedObject( obj ), mpStaticImpl( pStaticImpl_ ), maAdapter() -{ - // Remember object as interface if possible - TypeClass eType = maInspectedObject.getValueType().getTypeClass(); - if( eType == TypeClass_INTERFACE ) - mxIface = *static_cast const *>(maInspectedObject.getValue()); - - mnLastPropertyConcept = -1; - mnLastMethodConcept = -1; -} - -ImplIntrospectionAccess::~ImplIntrospectionAccess() -{ -} - - - -//*** ImplIntrospectionAdapter *** - - -// New Impl class as part of the introspection conversion to instance-bound -// Introspection with property access via XPropertySet. The old class -// ImplIntrospectionAccess lives on as IntrospectionAccessStatic_Impl -class ImplIntrospectionAdapter : - public XPropertySet, public XFastPropertySet, public XPropertySetInfo, - public XNameContainer, public XIndexContainer, - public XEnumerationAccess, public XIdlArray, - public OWeakObject -{ - // Parent object - ::rtl::Reference< ImplIntrospectionAccess > mpAccess; - - // Object under examination - const Any& mrInspectedObject; - - // Static introspection data - rtl::Reference< IntrospectionAccessStatic_Impl > mpStaticImpl; - - // Object as interface - Reference mxIface; - - // Guards the caching of queried interfaces - osl::Mutex m_aMutex; - - // Original interfaces of the object - Reference mxObjElementAccess; - Reference mxObjNameContainer; - Reference mxObjNameAccess; - Reference mxObjIndexAccess; - Reference mxObjIndexContainer; - Reference mxObjEnumerationAccess; - Reference mxObjIdlArray; - - Reference getXElementAccess(); - Reference getXNameContainer(); - Reference getXNameAccess(); - Reference getXIndexContainer(); - Reference getXIndexAccess(); - Reference getXEnumerationAccess(); - Reference getXIdlArray(); - -public: - ImplIntrospectionAdapter( ImplIntrospectionAccess* pAccess_, - const Any& obj, - rtl::Reference< IntrospectionAccessStatic_Impl > const & pStaticImpl_ ); // Methods from XInterface virtual Any SAL_CALL queryInterface( const Type& rType ) throw( RuntimeException, std::exception ) SAL_OVERRIDE; @@ -888,7 +838,25 @@ public: throw( IllegalArgumentException, ArrayIndexOutOfBoundsException, RuntimeException, std::exception ) SAL_OVERRIDE; }; -Reference ImplIntrospectionAdapter::getXElementAccess() +ImplIntrospectionAccess::ImplIntrospectionAccess + ( const Any& obj, rtl::Reference< IntrospectionAccessStatic_Impl > const & pStaticImpl_ ) + : maInspectedObject( obj ), mpStaticImpl( pStaticImpl_ ) //, maAdapter() +{ + // Save object as an interface if possible + TypeClass eType = maInspectedObject.getValueType().getTypeClass(); + if( eType == TypeClass_INTERFACE ) + mxIface = *static_cast const *>(maInspectedObject.getValue()); + + mnLastPropertyConcept = -1; + mnLastMethodConcept = -1; +} + +ImplIntrospectionAccess::~ImplIntrospectionAccess() +{ +} + + +Reference ImplIntrospectionAccess::getXElementAccess() { ResettableGuard< Mutex > aGuard( m_aMutex ); @@ -903,7 +871,7 @@ Reference ImplIntrospectionAdapter::getXElementAccess() return mxObjElementAccess; } -Reference ImplIntrospectionAdapter::getXNameContainer() +Reference ImplIntrospectionAccess::getXNameContainer() { ResettableGuard< Mutex > aGuard( m_aMutex ); @@ -918,7 +886,7 @@ Reference ImplIntrospectionAdapter::getXNameContainer() return mxObjNameContainer; } -Reference ImplIntrospectionAdapter::getXNameAccess() +Reference ImplIntrospectionAccess::getXNameAccess() { ResettableGuard< Mutex > aGuard( m_aMutex ); @@ -933,7 +901,7 @@ Reference ImplIntrospectionAdapter::getXNameAccess() return mxObjNameAccess; } -Reference ImplIntrospectionAdapter::getXIndexContainer() +Reference ImplIntrospectionAccess::getXIndexContainer() { ResettableGuard< Mutex > aGuard( m_aMutex ); @@ -948,7 +916,7 @@ Reference ImplIntrospectionAdapter::getXIndexContainer() return mxObjIndexContainer; } -Reference ImplIntrospectionAdapter::getXIndexAccess() +Reference ImplIntrospectionAccess::getXIndexAccess() { ResettableGuard< Mutex > aGuard( m_aMutex ); @@ -963,7 +931,7 @@ Reference ImplIntrospectionAdapter::getXIndexAccess() return mxObjIndexAccess; } -Reference ImplIntrospectionAdapter::getXEnumerationAccess() +Reference ImplIntrospectionAccess::getXEnumerationAccess() { ResettableGuard< Mutex > aGuard( m_aMutex ); @@ -978,7 +946,7 @@ Reference ImplIntrospectionAdapter::getXEnumerationAccess() return mxObjEnumerationAccess; } -Reference ImplIntrospectionAdapter::getXIdlArray() +Reference ImplIntrospectionAccess::getXIdlArray() { ResettableGuard< Mutex > aGuard( m_aMutex ); @@ -994,23 +962,15 @@ Reference ImplIntrospectionAdapter::getXIdlArray() } -ImplIntrospectionAdapter::ImplIntrospectionAdapter( ImplIntrospectionAccess* pAccess_, - const Any& obj, - rtl::Reference< IntrospectionAccessStatic_Impl > const & pStaticImpl_ ) - : mpAccess( pAccess_), mrInspectedObject( obj ), mpStaticImpl( pStaticImpl_ ) -{ - // Get object as an interface - TypeClass eType = mrInspectedObject.getValueType().getTypeClass(); - if( eType == TypeClass_INTERFACE ) - mxIface = *static_cast const *>(mrInspectedObject.getValue()); -} - // Methods from XInterface -Any SAL_CALL ImplIntrospectionAdapter::queryInterface( const Type& rType ) +Any SAL_CALL ImplIntrospectionAccess::queryInterface( const Type& rType ) throw( RuntimeException, std::exception ) { Any aRet( ::cppu::queryInterface( rType, + static_cast< XIntrospectionAccess * >( this ), + static_cast< XMaterialHolder * >( this ), + static_cast< XExactName * >( this ), static_cast< XPropertySet * >( this ), static_cast< XFastPropertySet * >( this ), static_cast< XPropertySetInfo * >( this ) ) ); @@ -1041,25 +1001,25 @@ Any SAL_CALL ImplIntrospectionAdapter::queryInterface( const Type& rType ) // Methods from XPropertySet -Reference ImplIntrospectionAdapter::getPropertySetInfo() +Reference ImplIntrospectionAccess::getPropertySetInfo() throw( RuntimeException, std::exception ) { return static_cast(this); } -void ImplIntrospectionAdapter::setPropertyValue(const OUString& aPropertyName, const Any& aValue) +void ImplIntrospectionAccess::setPropertyValue(const OUString& aPropertyName, const Any& aValue) throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception ) { - mpStaticImpl->setPropertyValue( mrInspectedObject, aPropertyName, aValue ); + mpStaticImpl->setPropertyValue( maInspectedObject, aPropertyName, aValue ); } -Any ImplIntrospectionAdapter::getPropertyValue(const OUString& aPropertyName) +Any ImplIntrospectionAccess::getPropertyValue(const OUString& aPropertyName) throw( UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { - return mpStaticImpl->getPropertyValue( mrInspectedObject, aPropertyName ); + return mpStaticImpl->getPropertyValue( maInspectedObject, aPropertyName ); } -void ImplIntrospectionAdapter::addPropertyChangeListener(const OUString& aPropertyName, const Reference& aListener) +void ImplIntrospectionAccess::addPropertyChangeListener(const OUString& aPropertyName, const Reference& aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { if( mxIface.is() ) @@ -1072,7 +1032,7 @@ void ImplIntrospectionAdapter::addPropertyChangeListener(const OUString& aProper } } -void ImplIntrospectionAdapter::removePropertyChangeListener(const OUString& aPropertyName, const Reference& aListener) +void ImplIntrospectionAccess::removePropertyChangeListener(const OUString& aPropertyName, const Reference& aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { if( mxIface.is() ) @@ -1085,7 +1045,7 @@ void ImplIntrospectionAdapter::removePropertyChangeListener(const OUString& aPro } } -void ImplIntrospectionAdapter::addVetoableChangeListener(const OUString& aPropertyName, const Reference& aListener) +void ImplIntrospectionAccess::addVetoableChangeListener(const OUString& aPropertyName, const Reference& aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { if( mxIface.is() ) @@ -1098,7 +1058,7 @@ void ImplIntrospectionAdapter::addVetoableChangeListener(const OUString& aProper } } -void ImplIntrospectionAdapter::removeVetoableChangeListener(const OUString& aPropertyName, const Reference& aListener) +void ImplIntrospectionAccess::removeVetoableChangeListener(const OUString& aPropertyName, const Reference& aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { if( mxIface.is() ) @@ -1112,79 +1072,79 @@ void ImplIntrospectionAdapter::removeVetoableChangeListener(const OUString& aPro // Methods from XFastPropertySet -void ImplIntrospectionAdapter::setFastPropertyValue(sal_Int32, const Any&) +void ImplIntrospectionAccess::setFastPropertyValue(sal_Int32, const Any&) throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception ) { } -Any ImplIntrospectionAdapter::getFastPropertyValue(sal_Int32) +Any ImplIntrospectionAccess::getFastPropertyValue(sal_Int32) throw( UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { return Any(); } // Methods from XPropertySetInfo -Sequence< Property > ImplIntrospectionAdapter::getProperties() throw( RuntimeException, std::exception ) +Sequence< Property > ImplIntrospectionAccess::getProperties() throw( RuntimeException, std::exception ) { return mpStaticImpl->getProperties(); } -Property ImplIntrospectionAdapter::getPropertyByName(const OUString& Name) +Property ImplIntrospectionAccess::getPropertyByName(const OUString& Name) throw( RuntimeException, std::exception ) { - return mpAccess->getProperty( Name, PropertyConcept::ALL ); + return getProperty( Name, PropertyConcept::ALL ); } -sal_Bool ImplIntrospectionAdapter::hasPropertyByName(const OUString& Name) +sal_Bool ImplIntrospectionAccess::hasPropertyByName(const OUString& Name) throw( RuntimeException, std::exception ) { - return mpAccess->hasProperty( Name, PropertyConcept::ALL ); + return hasProperty( Name, PropertyConcept::ALL ); } // Methods from XElementAccess -Type ImplIntrospectionAdapter::getElementType() throw( RuntimeException, std::exception ) +Type ImplIntrospectionAccess::getElementType() throw( RuntimeException, std::exception ) { return getXElementAccess()->getElementType(); } -sal_Bool ImplIntrospectionAdapter::hasElements() throw( RuntimeException, std::exception ) +sal_Bool ImplIntrospectionAccess::hasElements() throw( RuntimeException, std::exception ) { return getXElementAccess()->hasElements(); } // Methods from XNameAccess -Any ImplIntrospectionAdapter::getByName(const OUString& Name) +Any ImplIntrospectionAccess::getByName(const OUString& Name) throw( NoSuchElementException, WrappedTargetException, RuntimeException, std::exception ) { return getXNameAccess()->getByName( Name ); } -Sequence< OUString > ImplIntrospectionAdapter::getElementNames() +Sequence< OUString > ImplIntrospectionAccess::getElementNames() throw( RuntimeException, std::exception ) { return getXNameAccess()->getElementNames(); } -sal_Bool ImplIntrospectionAdapter::hasByName(const OUString& Name) +sal_Bool ImplIntrospectionAccess::hasByName(const OUString& Name) throw( RuntimeException, std::exception ) { return getXNameAccess()->hasByName( Name ); } // Methods from XNameContainer -void ImplIntrospectionAdapter::insertByName(const OUString& Name, const Any& Element) +void ImplIntrospectionAccess::insertByName(const OUString& Name, const Any& Element) throw( IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException, std::exception ) { getXNameContainer()->insertByName( Name, Element ); } -void ImplIntrospectionAdapter::replaceByName(const OUString& Name, const Any& Element) +void ImplIntrospectionAccess::replaceByName(const OUString& Name, const Any& Element) throw( IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException, std::exception ) { getXNameContainer()->replaceByName( Name, Element ); } -void ImplIntrospectionAdapter::removeByName(const OUString& Name) +void ImplIntrospectionAccess::removeByName(const OUString& Name) throw( NoSuchElementException, WrappedTargetException, RuntimeException, std::exception ) { getXNameContainer()->removeByName( Name ); @@ -1192,31 +1152,31 @@ void ImplIntrospectionAdapter::removeByName(const OUString& Name) // Methods from XIndexAccess // Already in XNameAccess: virtual Reference getElementType() const -sal_Int32 ImplIntrospectionAdapter::getCount() throw( RuntimeException, std::exception ) +sal_Int32 ImplIntrospectionAccess::getCount() throw( RuntimeException, std::exception ) { return getXIndexAccess()->getCount(); } -Any ImplIntrospectionAdapter::getByIndex(sal_Int32 Index) +Any ImplIntrospectionAccess::getByIndex(sal_Int32 Index) throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { return getXIndexAccess()->getByIndex( Index ); } // Methods from XIndexContainer -void ImplIntrospectionAdapter::insertByIndex(sal_Int32 Index, const Any& Element) +void ImplIntrospectionAccess::insertByIndex(sal_Int32 Index, const Any& Element) throw( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { getXIndexContainer()->insertByIndex( Index, Element ); } -void ImplIntrospectionAdapter::replaceByIndex(sal_Int32 Index, const Any& Element) +void ImplIntrospectionAccess::replaceByIndex(sal_Int32 Index, const Any& Element) throw( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { getXIndexContainer()->replaceByIndex( Index, Element ); } -void ImplIntrospectionAdapter::removeByIndex(sal_Int32 Index) +void ImplIntrospectionAccess::removeByIndex(sal_Int32 Index) throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { getXIndexContainer()->removeByIndex( Index ); @@ -1224,31 +1184,31 @@ void ImplIntrospectionAdapter::removeByIndex(sal_Int32 Index) // Methods from XEnumerationAccess // Already in XNameAccess: virtual Reference getElementType() const; -Reference ImplIntrospectionAdapter::createEnumeration() throw( RuntimeException, std::exception ) +Reference ImplIntrospectionAccess::createEnumeration() throw( RuntimeException, std::exception ) { return getXEnumerationAccess()->createEnumeration(); } // Methods from XIdlArray -void ImplIntrospectionAdapter::realloc(Any& array, sal_Int32 length) +void ImplIntrospectionAccess::realloc(Any& array, sal_Int32 length) throw( IllegalArgumentException, RuntimeException, std::exception ) { getXIdlArray()->realloc( array, length ); } -sal_Int32 ImplIntrospectionAdapter::getLen(const Any& array) +sal_Int32 ImplIntrospectionAccess::getLen(const Any& array) throw( IllegalArgumentException, RuntimeException, std::exception ) { return getXIdlArray()->getLen( array ); } -Any ImplIntrospectionAdapter::get(const Any& array, sal_Int32 index) +Any ImplIntrospectionAccess::get(const Any& array, sal_Int32 index) throw( IllegalArgumentException, ArrayIndexOutOfBoundsException, RuntimeException, std::exception ) { return getXIdlArray()->get( array, index ); } -void ImplIntrospectionAdapter::set(Any& array, sal_Int32 index, const Any& value) +void ImplIntrospectionAccess::set(Any& array, sal_Int32 index, const Any& value) throw( IllegalArgumentException, ArrayIndexOutOfBoundsException, RuntimeException, std::exception ) { getXIdlArray()->set( array, index, value ); @@ -1466,17 +1426,21 @@ Sequence< Type > ImplIntrospectionAccess::getSupportedListeners() Reference SAL_CALL ImplIntrospectionAccess::queryAdapter( const Type& rType ) throw( IllegalTypeException, RuntimeException, std::exception ) { - // Is there already an adapter? - Reference< XInterface > xAdapter( maAdapter ); - - if( !xAdapter.is() ) + Reference xRet; + if( rType == cppu::UnoType::get() + || rType == cppu::UnoType::get() + || rType == cppu::UnoType::get() + || rType == cppu::UnoType::get() + || rType == cppu::UnoType::get() + || rType == cppu::UnoType::get() + || rType == cppu::UnoType::get() + || rType == cppu::UnoType::get() + || rType == cppu::UnoType::get() + || rType == cppu::UnoType::get() + || rType == cppu::UnoType::get() ) { - xAdapter = *( new ImplIntrospectionAdapter( this, maInspectedObject, mpStaticImpl ) ); - maAdapter = xAdapter; + queryInterface( rType ) >>= xRet; } - - Reference xRet; - xAdapter->queryInterface( rType ) >>= xRet; return xRet; } diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index e3eea84fd50f..7671471682b2 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -227,7 +227,7 @@ private: Reference _xElementAccess; - Reference _xENDirect, _xENIntrospection, _xENNameAccess; + Reference _xENDirect, _xENIntrospection; }; @@ -275,7 +275,7 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType ) // Ivocation does not support XExactName, if direct object supports // XInvocation, but not XExactName. if ((_xDirect.is() && _xENDirect.is()) || - (!_xDirect.is() && (_xENIntrospection.is() || _xENNameAccess.is()))) + (!_xDirect.is() && _xENIntrospection.is())) { return makeAny( Reference< XExactName >( (static_cast< XExactName* >(this)) ) ); } @@ -389,38 +389,44 @@ void Invocation_Impl::setMaterial( const Any& rMaterial ) _xIntrospectionAccess = xIntrospection->inspect( _aMaterial ); if( _xIntrospectionAccess.is() ) { - _xElementAccess = Reference::query( _xIntrospectionAccess->queryAdapter( cppu::UnoType::get()) ); - _xEnumerationAccess = Reference::query( - _xIntrospectionAccess->queryAdapter( - cppu::UnoType::get()) ); + if( _xElementAccess.is() ) + { + _xEnumerationAccess = Reference::query( + _xIntrospectionAccess->queryAdapter( + cppu::UnoType::get()) ); - _xIndexAccess = Reference::query( - _xIntrospectionAccess->queryAdapter( - cppu::UnoType::get()) ); + _xIndexAccess = Reference::query( + _xIntrospectionAccess->queryAdapter( + cppu::UnoType::get()) ); - _xIndexContainer = Reference::query( - _xIntrospectionAccess->queryAdapter( - cppu::UnoType::get()) ); + if( _xIndexAccess.is() ) + { + _xIndexContainer = Reference::query( + _xIntrospectionAccess->queryAdapter( + cppu::UnoType::get()) ); + } - _xNameAccess = Reference::query( - _xIntrospectionAccess->queryAdapter( - cppu::UnoType::get()) ); + _xNameAccess = Reference::query( + _xIntrospectionAccess->queryAdapter( + cppu::UnoType::get()) ); - _xNameContainer = Reference::query( - _xIntrospectionAccess->queryAdapter( - cppu::UnoType::get()) ); + if( _xNameAccess.is() ) + { + _xNameContainer = Reference::query( + _xIntrospectionAccess->queryAdapter( + cppu::UnoType::get()) ); + } + } _xPropertySet = Reference::query( _xIntrospectionAccess->queryAdapter( cppu::UnoType::get()) ); _xENIntrospection = Reference::query( _xIntrospectionAccess ); - if (_xNameAccess.is()) - _xENNameAccess = Reference::query( _xNameAccess ); } } /* only once !!! @@ -450,8 +456,6 @@ OUString Invocation_Impl::getExactName( const OUString& rApproximateName ) OUString aRet; if (_xENIntrospection.is()) aRet = _xENIntrospection->getExactName( rApproximateName ); - if (aRet.isEmpty() && _xENNameAccess.is()) - aRet = _xENNameAccess->getExactName( rApproximateName ); return aRet; } @@ -990,7 +994,7 @@ Sequence< Type > SAL_CALL Invocation_Impl::getTypes() throw( RuntimeException, s // Invocation does not support XExactName if direct object supports // XInvocation, but not XExactName. if ((_xDirect.is() && _xENDirect.is()) || - (!_xDirect.is() && (_xENIntrospection.is() || _xENNameAccess.is()))) + (!_xDirect.is() && _xENIntrospection.is())) { pTypes[ n++ ] = cppu::UnoType::get(); } -- cgit