Writer Guide
Understanding linked styles
When creating a new paragraph or a new character
style, you may use an existing style as a starting point
for its settings. In this sense, OOo links the styles
together.
When styles are linked, a change in the parent style
affects every style linked to it. You can easily visualize
the connections between styles by switching to the
Hierarchical view in the Styles and Formatting
window filter.
For example, every Heading style (such as Heading 1,
Heading 2) is linked with a style called Heading. This
relationship is illustrated in Figure 227.
Linking styles is a very powerful method to create “families” of styles and allows you
to change their properties simultaneously. For example, if you decide that all the
headings should be blue (such as in this guide), you only need to change the font
color of the parent style to achieve the desired result. Note however, that changes
made to a parameter of the parent style do not override changes previously made to
the same parameter in the child styles. For example, if you changed the Heading 2
font color to green, a change of the font color of the Heading style (the parent style)
to red will not affect the Heading 2 font color.
You can easily check which properties are specific to a style by looking at the
Contains section of the Organizer page. In case you want to reset the properties of a
child style to that of the parent style, click the Standard button located at the bottom
of each Paragraph and Character style dialog page.
Note
You cannot define a hierarchical style structure for Page, Frame and
List styles.
Creating a linked style
To create a linked style, you can either specify the parent style (the “linked with”
style) in the Organizer page of the Style dialog box, or you can start creating a new
style by right-clicking in the Styles and Formatting window on the style to be linked
with and selecting New from the drop-down menu.
Example: Changing a property of a
parent style
Suppose that you want to change the font of not
only Heading 1 or Heading 2, but all headings.
The easiest way to do that is to take advantage
of linking.
Open the Styles and Formatting window (press
F11) and select Heading.
Open the Paragraph Style dialog box for the
Heading style (right-click > Modify) and select
the Font tab. Select a font and click OK (Figure
229).
204 OpenOffice.org 3.3 Writer Guide
Figure 227: Hierarchical
view of linked styles.
Figure 228: Select Heading style.