HasUnoInterfaces Function

Thử nếu một đối tượng Uni Basic hỗ trợ một số giao diện Uno nào đó không.

Trả về Đúng nếu hỗ trợ tất cả các giao diện Uno đã ghi rõ, không thì Sai.

Syntax:

HasUnoInterfaces( oTest, Tên_giao_diện_Uno1 [, Tên_giao_diện_Uno2, ...])

Return type:

Bool

Parameters:

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)


Example:


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

Please support us!