LibreOffice 25.8 Help
測試 Basic Uno 物件是否支援某些 Uno 介面。
如果支援所有聲明的 Uno 介面,則傳回 True (真),否則傳回 False (假)。
HasUnoInterfaces( oTest, Uno-Interface-Name 1 [, Uno-Interface-Name 2, ...])
Bool
| Name | Type | Description | 
|---|---|---|
| oTest | Object | the Basic Uno object that you want to test. | 
| Uno-Interface-Name 1,  | String | Uno interface name(s) | 
Sub HasInterface
    Dim bHas as Boolean
    Dim oSheet as Object
    oSheet = ThisComponent.Sheets(0) 
    bHas = HasUnoInterfaces( oSheet, "com.sun.star.beans.XIntrospection" )
    Print bHas ' = True
End Sub