From The Document Foundation Wiki
How do I suppress a line break inserted before a table of contents (at the beginning of a document or a section)?
- edit the table of contents to remove its protection:
- right click on the table of contents and select Edit index;
- under the Index tab, uncheck Protected against manual changes; and
- click OK.
- place the cursor at the beginning of the table of contents;
- press the ← Backspace key to delete the line break; and
- edit the table of contents to protect it again.
The table of contents is updated while it is being validated.