Special Cases

From Apache OpenOffice Wiki
Jump to: navigation, search



Error Handling (Exceptions/Error-Codes)

Runtime errors caused by the wrong usage of interfaces or do not happen regularly, raise exceptions. Runtime errors that happen regularly without a programming mistake, such as the non-existence of a file for a file opening method, should be handled by using error codes as return values.

Collection Interfaces

Collection-Services usually support one or multiple X...Access-Interfaces and sometimes add access methods specialized to the content type. For example,

 XInterface XIndexAccess::getElementByIndex(unsigned short) 

becomes

 XField XFields::getFieldByIndex(unsigned short).

Postfix Document for Document-like Components

Components, whose instances are called a document, get the postfix Document to their name, for example, service com.sun.star.text.TextDocument.

Postfixes Start/End vs. Begin/End

The postfixes ...Start/...End are to be preferred over ...Begin/...End.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages