Kaydet (Commit) 7b02cfef authored tarafından Oliver Specht's avatar Oliver Specht

tdf#96223: introspection queries for XPropertySet again

this patch removes the search by name for css::beans::XPropertySet because
that fails if that is indirectly inherited e.g. with css::util::XSearchDescriptor

Change-Id: I7f40b1d109d9bddc0987bea8eb3eda5b7f1aaaa9
Reviewed-on: https://gerrit.libreoffice.org/20792Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarOliver Specht <oliver.specht@cib.de>
üst b76abe2d
......@@ -1766,29 +1766,15 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
if( xTypeProvider.is() )
{
SupportedTypesSeq = xTypeProvider->getTypes();
sal_Int32 nTypeCount = SupportedTypesSeq.getLength();
if( nTypeCount )
{
const Type* pTypes = SupportedTypesSeq.getConstArray();
for( sal_Int32 i = 0 ; i < nTypeCount ; i++ )
{
if( pTypes[i].getTypeName() == "com.sun.star.beans.XPropertySet" )
{
xPropSet.set( x, UNO_QUERY );
break;
}
}
}
} else {
SAL_WARN(
"stoc",
"object of type \"" << aToInspectObj.getValueTypeName()
<< "\" lacks XTypeProvider");
SupportedTypesSeq = Sequence<Type>(&aToInspectObj.getValueType(), 1);
xPropSet.set( x, UNO_QUERY );
}
// Now try to get the PropertySetInfo
xPropSet.set( x, UNO_QUERY );
if( xPropSet.is() )
xPropSetInfo = xPropSet->getPropertySetInfo();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment