14Styles
Many objects in an office document have formatting
properties. A formatting property influences the visual representation of an
object but it does not contribute to the content or structure of the document.
Examples of formatting properties are:
�
Font family
�
Font size
�
Font color
�
Page margins
In the OpenDocument format, formatting properties are only
stored within styles. This differs to the user interface of typical office
applications, where formatting properties may be assigned to an object
directly, or indirectly by applying a style to the object. Assigning formatting
properties to an object directly has the same effect as assigning an unnamed
style with the same properties to that object. Therefore, user interface styles
remain unchanged conceptually in the OpenDocument file format, while formatting
properties assigned directly to an object are assumed to be unnamed styles. In order to
use unnamed styles, they are assigned a name and therefore become automatic styles.
There are two main reasons for using styles to store
formatting properties:
1. The
format and layout of the document get separated from the document content.
2. If
two or more objects have the same formatting properties and styles assigned,
the formatting properties that are assigned to the objects directly can be
represented by a single automatic style for all objects. This saves disk space
and allows styles to integrate seamlessly into the overall document style.
Within this chapter, the various style types are explained.