Hello,
I am trying to get UNO information with UNO C++ using reflection,
using the following code snippet:
//===============================
try {
Reference<XTypeDescriptionEnumerationAccess>
rTypeDescEnumAccess(rTypeDescProv, UNO_QUERY);
if (!rTypeDescEnumAccess.is()) {
fprintf(stderr, "cannot instantiate rTypeDescEnumAccess\n" );
return 1;
}
fprintf(stderr,"have XTypeDescriptionEnumerationAccess\n");
TypeClass tc = TypeClass(typelib_TypeClass_INTERFACE);
Sequence< TypeClass > stc(1);
stc[0] = tc;
TypeDescriptionSearchDepth dsd =
TypeDescriptionSearchDepth(com::sun::star::reflection::TypeDescriptionSearchDepth_ONE);
OUString
module_name(OUString::createFromAscii("com.sun.star.reflection"));
Reference< XTypeDescriptionEnumeration> rtde =
rTypeDescEnumAccess->createTypeDescriptionEnumeration(module_name, stc, dsd);
fprintf(stderr,"++++++++++after createTypeDescriptionEnumeration\n");
}
catch (com::sun::star::reflection::NoSuchTypeNameException &e)
fprintf(stderr, "NoSuchTypeNameException\n");
exit(1);
}
catch (com::sun::star::reflection::InvalidTypeNameException &e)
{
fprintf(stderr, "InvalidTypeNameException\n");
exit(1);
}
//===========================
What am I doing wrong, because I always get the message:
NoSuchTypeNameException from the first catch block?
Thanks for any help or hint.
Arnulf
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]