Difference between revisions of "Zh/Documentation/DevGuide/FirstSteps/Struct"
From Apache OpenOffice Wiki
< Zh | Documentation
(New page: {{Documentation/DevGuide/FirstStepsTOC/Zh |FirstSteps2b=block |ShowPrevNext=block |PrevPage=Zh/Documentation/DevGuide/FirstSteps/Common Types |NextPage=Zh/Documentation/DevGuide/FirstSteps...) |
m |
||
| (One intermediate revision by the same user not shown) | |||
| Line 5: | Line 5: | ||
|NextPage=Zh/Documentation/DevGuide/FirstSteps/Any | |NextPage=Zh/Documentation/DevGuide/FirstSteps/Any | ||
}} | }} | ||
| − | + | {{Documentation/DevGuideLanguages|Documentation/DevGuide/FirstSteps/{{SUBPAGENAME}}}} | |
{{DISPLAYTITLE:结构}} | {{DISPLAYTITLE:结构}} | ||
| Line 37: | Line 37: | ||
| − | + | ||
| − | [[Category:文档 | + | [[Category:文档/开发者指南/准备工作]] |
| − | |||
| − | |||
Latest revision as of 01:49, 14 May 2009
OpenOffice.org 中的结构用于创建其他 UNO 类型的组合。这些结构与仅包括公共成员变量的 C 结构或 Java 类相对应。
虽然结构不封装数据,但更易于作为整体传输,而不用来回封送 get() 和 set() 调用。这对于远程
通信尤为有利。
可以通过 .(点)运算符获得对结构成员的访问权限,如下所示
aProperty.Name = "ReadOnly";
在 Java、C++ 和 OpenOffice.org Basic 中,关键字 new 用于实例化结构。在 OLE 自动化中,使用 com.sun.star.reflection.CoreReflection 来获取 UNO 结构。请勿使用服务管理器创建结构。
//In Java:
com.sun.star.beans.PropertyValue aProperty =
new com.sun.star.beans.PropertyValue();
'In StarBasic
Dim aProperty as new com.sun.star.beans.PropertyValue
| Content on this page is licensed under the Public Documentation License (PDL). |