From Apache OpenOffice Wiki
Jump to: navigation, search

Structs in the Apache OpenOffice API are used to create compounds of other UNO types. They correspond to C structs or Java classes consisting of public member variables only. While structs do not encapsulate data, they are easier to transport as a whole, instead of marshaling get() and set() calls back and forth. In particular, this has advantages for remote communication.

You gain access to struct members through the . (dot) operator as in

  aProperty.Name = "ReadOnly";

In Java, C++ and Apache OpenOffice Basic, the keyword new instantiates structs. In OLE automation, use to get a UNO struct. Do not use the service manager to create structs.

  //In Java: aProperty 
             = new;

  'In Basic
  Dim aProperty as new
Personal tools
In other languages