Difference between revisions of "Zh/Documentation/DevGuide/ProUNO/Bridge/Mapping of Type"
From Apache OpenOffice Wiki
< Zh | Documentation
m |
m |
||
Line 8: | Line 8: | ||
|NextPage=Zh/Documentation/DevGuide/ProUNO/Bridge/Conversion Mappings | |NextPage=Zh/Documentation/DevGuide/ProUNO/Bridge/Conversion Mappings | ||
}} | }} | ||
− | + | {{Documentation/DevGuideLanguages|Documentation/DevGuide/ProUNO/Bridge/{{SUBPAGENAME}}}} | |
{{DISPLAYTITLE:类型的映射}} | {{DISPLAYTITLE:类型的映射}} | ||
Latest revision as of 03:08, 14 May 2009
由于 Automation 类型中不存在与 UMO 类型对应的类型,因此其将被映射成对象。该对象将实现 IDispatch
和桥可识别的专用标记接口。因此,在调用中,只要将对象传送到 UNO 对象,桥就可以确定其是否表示类型。要获取类型,可以调用服务管理器对象的 Bridge_CreateType
并提供类型名称。例如:
'Visual Basic Dim objType Set objType = objServiceManager.Bridge_CreateType(“com.sun.star.uno.XInterface”)
如果提供的参数表示的类型无效,则调用会生成一个错误。
如果 UNO 方法作为返回值或 out 参数返回类型,则会自动将该类型转换成对象。
//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). |