Properties of a Type

From Apache OpenOffice Wiki
Jump to: navigation, search



Every type inside OpenOffice.org is specified by the properties shown in the table below. These values are accessible at the previously mentioned service com.sun.star.document.TypeDetection using the interface com.sun.star.container.XNameAccess. Write access is not available here. All types are addressed by their internal names. The property names are identical to the configuration property names.

Documentation caution.png The documentation of the TypeDetection service currently is outdated. In case of conflicting information about the properties this page is right. An update will follow soon.


Properties of a Document Type, available at TypeDetection
Name string. The internal name of the type. This is only an API property, not a configuration property. In the configuration this is the name of the configuration node containing all the other properties. To avoid name clashes with other node names it should follow the rules outlined for extension identifiers.
UIName string. User friendly name of the type. It may be localized using the localization support of the configuration. All Unicode characters are permitted here. Currently this UI name is not used in OOo itself but it is available for e.g. extensions.
MediaType string. Describes the MIME type of the Type.
ClipboardFormat string. The property name is misleading and has historical reasons. This property contains a format name that is used somewhere in the content itself to enable filters loading it to verify that the content has the right type. It may be the "doctype" in an XML file, the storage format identifier in an OLE storage or the MIMEType of and ODF document. This name can be used by a generic ExtendedTypeDetection service that is used for more than one format.
URLPattern sequence<string>. Enables the support of own URL schemata, that always shall be handled by the same filter(s). For example, in OpenOffice.org "private:factory/swriter" for opening an empty text document. The wildcards '*' or '?' are supported here.
Extensions sequence<string>. All extensions that this type is expected to have usually. As always in the configuration the default separator character is SPACE.
Preferred boolean. Several file types may use the same extension; this property tells OOo that a particular type should get preference over others. Of course that only works if not every type uses that property. If no flag is set, the type found first in the Types set wins.
DetectService string. OOo uses the properties described above of all types (like extension or MediaType) to guess the type of a particular file. Once a possible type is found it is possible to call some code that examines the file more closely to verify the simple detecion ("flat" and "deep" detection). The DetectService property is the service or implementation name of the UNO service that can do this task.
PreferredFilter After a successful type detection OOo will look for a filter that can load this type. It is possible that more than one filter is present. This property tells which filter should be the preferred one. This selection can be overridden by explicit preselection of a different filter (by API or by user interaction in the file dialog).
DocumentIconID int. Deprecated. Please don't use.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages