Mapping of Type

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 15:08, 23 December 2020 by DiGro (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Since there is no counterpart to the UNO type among the Automation types, it is mapped to an object. The object implements IDispatch and a private tagging interface that is known to the bridge. Therefore, whenever an object is passed in a call to a UNO object the bridge can determine whether it represents a type. To obtain a type one calls Bridge_CreateType on the service manager object and provides the name of the type. For example:

  'Visual Basic
  Dim objType
  Set objType = objServiceManager.Bridge_CreateType(“”)

In case the provided argument does not represent a valid type, the call produces an error.

If a UNO method returns a type, either as return value or out - parameter, then it is automatically converted to an object.

  type foo([out] type t)
  'Visual Basic
  Dim objParam As Object
  Dim objReturn As Object
  Set objReturn =
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages