Code: Select all
Sub TestEnumerations_001
Dim oTDM
Dim oTDME
Dim oTD
Dim typeArray
Set oTDM = GetDefaultContext().getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager")
typeArray = Array(com.sun.star.uno.TypeClass.ENUM, _
com.sun.star.uno.TypeClass.SEQUENCE, _
com.sun.star.uno.TypeClass.CONSTANT, _
com.sun.star.uno.TypeClass.CONSTANTS)
Dim sFullName$
Dim sBaseName$
sFullName = "com.sun.star.presentation.AnimationEffect"
sBaseName = "com.sun.star.presentation"
oTDME = oTDM.createTypeDescriptionEnumeration(sBaseName, typeArray, com.sun.star.reflection.TypeDescriptionSearchDepth.ONE)
While oTDME.hasMoreElements()
oTD = oTDME.nextTypeDescription()
If oTD.Name = sFullName Then
MsgBox Join( oTD.getEnumNames(), CHR$(10))
End If
wend
End SubCode: Select all
If oTDM.hasByHierarchicalName(sFullName) Then
oTDM.getByHierarchicalName(sFullName)
End If