Difference between revisions of "Documentation/DevGuide/ProUNO/Bridge/Mapping of Type"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
m (FINAL VERSION FOR L10N)
Line 8: Line 8:
 
|NextPage=Documentation/DevGuide/ProUNO/Bridge/Conversion Mappings
 
|NextPage=Documentation/DevGuide/ProUNO/Bridge/Conversion Mappings
 
}}
 
}}
[[zh:Zh/Documentation/DevGuide/ProUNO/Bridge/Mapping of Type]]
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/ProUNO/Bridge/{{SUBPAGENAME}}}}
 
{{DISPLAYTITLE:Mapping of Type}}
 
{{DISPLAYTITLE:Mapping of Type}}
 
Since there is no counterpart to the UNO type among the Automation types, it is mapped to an object. The object implements <code>IDispatch</code> 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 <code>Bridge_CreateType</code> on the service manager object and provides the name of the type. For example:
 
Since there is no counterpart to the UNO type among the Automation types, it is mapped to an object. The object implements <code>IDispatch</code> 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 <code>Bridge_CreateType</code> on the service manager object and provides the name of the type. For example:

Revision as of 08:21, 13 May 2009



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