Mapping of Type

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 12:52, 22 October 2009 by BMarcelly (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(“com.sun.star.uno.XInterface”)

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.

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