LibreOffice 24.8 帮助
如果给定的对象具有 Uno 结构,则返回 True。
IsUnoStruct( Uno type )
Boolean
Uno type : A UnoObject
Sub Main
Dim bIsStruct
' Instantiate a service
Dim oSimpleFileAccess
oSimpleFileAccess = CreateUnoService( "com.sun.star.ucb.SimpleFileAccess" )
bIsStruct = IsUnoStruct( oSimpleFileAccess )
MsgBox bIsStruct ' 显示 False,因为 oSimpleFileAccess *不是*结构体
' Instantiate a Property struct
Dim aProperty As New com.sun.star.beans.Property
bIsStruct = IsUnoStruct( aProperty )
MsgBox bIsStruct ' Displays True because aProperty is a struct
bIsStruct = IsUnoStruct( 42 )
MsgBox bIsStruct ' Displays False because 42 is NO struct
End Sub