目录

# HasUnoInterfaces 函数

测试 Basic Uno 对象是否支持某个 Uno 接口。

如果支持「所有」状态的 Uno 接口，则返回 True，否则返回 False。

### 语法:

HasUnoInterfaces( oTest, Uno-Interface-Name 1 [, Uno-Interface-Name 2, ...])

### Return type:

Bool

### 参数:

Name | Type | Description
--- | --- | ---
oTest | Object | the Basic Uno object that you want to test.
Uno-Interface-Name 1, Uno-Interface-Name 2, ... | 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

相关主题

UNO Objects, Functions and Services

请支持我们!