First of all, it is not necessary to define “new paragraph styles” for headings. You can just customise built-in Heading n. Built-in styles are not “sacred” in any way; they are not protected against change. So, it is easier to modify them because you don’t need then to integrate them in other mechanisms like automatic numbering or TOC collection.
Using spaces to layout text is a bad idea because base space width depends on font, Writer can expand space width on its own and position after the spaces depends on text preceding it (e.g. start of the heading after 1 is not the same as after 15). Defining tab stop is a more reliable way to control your layout.
Issue #1: headings
Removal of last dot in numbering is done in Tools
>Heading Numbering
(Chapter Numbering
before 7.6), Numbering
tab. Note there is no final dot in default configuration.
Starting position of heading is configured in Customize
tab. Aligned at is for number position. Set both Tab stop at and Indent at to the same position for the heading text. Chose Numbering followed by Tab stop
to cause heading to start automatically at the defined position.
Issue #2: table of contents
TOC formatting is controlled by Contents n paragraph style. But layout is configured by Insert
>TOC & Index
>TOC, Index or Bibliography
, Entries
tab.
You can add a dot after the chapter number by typing a dot and a space in the blank entry box between N# (E# before 7.6) and E.
Since some 7.x release, heading text captured for TOC undergoes some stripping where initial spaces are removed. Consequently aligning heading in TOC requires a tab stop. Consequently, you’ll add a T descriptor in the entry, so that it looks like:
LSN#.TET#LE
I have not represented here the empty entry boxes. Note that the box between N# and T now only contains a dot because spacing will be done by the tab.
Leave the tab position at 0 (relative to paragraph style indent).
It is now time to customise the Contents n corresponding to the level. In Indents & Spacing
, set Before text to the distance you want your heading aligned. In First Line, enter a negative distance telling how far from the heading your numbering will start.
You may find the above instructions complex if you’re not familiar with styling gymnastics. But this is the price to the tremendous versality offered by Writer. Nearly any conceivable layout/formatting is possible for headings and TOC, except inline heading (or rather it requires a really contorted workaround) and inline TOC (without line break between entries).