默认映射
From Apache OpenOffice Wiki
下表示意了 UNO 和 Automation 类型之间的映射关系。其是一个双向映射(对于 UNO 序列只有部分是双向映射,稍后将进行说明),因此,可以进行双向读取。在以下情况下,适用 Automation 类型到 UNO 类型的映射:
- 当从 Automation 环境调用 UNO 对象的方法并传递 in 或 in/out 参数的值时。
- 当从 UNO 环境调用 Automation 对象的方法并且该方法返回值时。
- 当从 UNO 环境调用 Automation 对象的方法并且该方法返回 in/out 或 out 参数的值时。
在以下情况下,适用 UNO 类型到 Automation 类型的映射:
- 当从 UNO 环境调用 Automation 对象的方法并传递 in 或 in/out 参数的值时。
- 当从 Automation 环境调用 UNO 对象的方法并且该方法返回 值时。
- 当从 Automation 环境调用 UNO 对象的方法并且该方法返回 in/out 或 out 参数的值时。
Automation IDL 类型 | UNO IDL 类型 |
---|---|
boolean | boolean |
unsigned char | byte |
double | double |
float | float |
short | short |
unsigned short | |
long | long |
unsigned long | |
BSTR | string |
short | char |
long | enum |
IDispatch | com.sun.star.script.XInvocation, UNO 接口 |
结构 | |
sequence<类型> | |
类型 | |
IUnknown | com.sun.star.uno.XInterface |
SAFEARRAY(VARIANT) | sequence< 类型 > |
SAFEARRAY(type) | |
DATE | com.sun.star.bridge.oleautomation.Date |
CY | com.sun.star.bridge.oleautomation.Currency |
Decimal | com.sun.star.bridge.oleautomation.Decimal |
SCODE | com.sun.star.bridge.oleautomation.SCode |
VARIANT | 以上所有类型或 any |
all of the above types | any |
以下各小节将详细讨论各种映射。
Content on this page is licensed under the Public Documentation License (PDL). |