A year ago on this blog, I looked at a method for forcing line breaks in your table of contents.

An alternative method for this is to make your Table of Contents editable. The steps are outlined below, however I caution you with this method – if you Update your Table of Contents, then you will lose your edits (see last screenshot below).

After you have added a table of contents in your document, you may find that you have long headings that require line breaks in better places than those imposed by OOo Writer.

Edit the Index

Right-mouse-click (or Ctrl-click) and select Edit Index/Table.

You will see the window below.

Right mouse click on the table of contents and select 'Edit Index/Table'

On the Index/Table tab, you will see the tick box labelled ‘Protected against manual changes’.

Untick this.

Edit the Index/Table Text

Now you can edit the text in the table

Add breaks (Shift+Enter) or change text as desired.

IMPORTANT NOTE

It is important to note that if you update the Index/Table, the changes you have just performed will disappear.

If you Update Index/Table, the changes will be removed.

The table of contents will revert to the original.

The Table of Contents will restore any changes if you update the TOC

I recently saw a question regarding line breaks in the table of contents – OpenOffice does not allow you to edit a table of contents except through styles. Sometimes the way that long headings are formatted might not be what you desire.

One thing to note about the TOC is that the line breaks that you insert in the heading itself will be reflected in the TOC.

Example:
Putting in a manual line break (Shift + Enter) in this heading:

manual_line_break

will result in a line break appearing in the Table of Contents:

manual_line_break_toc