Support for auto-generated TOC with APA v6 headers 3,4,5

Hello,

I’m trying to figure out how to set up rules to generate a Table of Contents based on a template I’ve made for APA v6 formatting. Things are mostly fine, but there is one problem:

APA style calls for headers 3, 4, and 5 to start with body text directly after the header itself. (See https://owl.english.purdue.edu/owl/resource/560/16/ for clarifying rules.) However, if I do this, the body text next to the header inherits the style, and the automatically generated TOC includes the body text after the header in the TOC. The style applies to the whole paragraph, not just the span (I’m using HTML terminology here, I guess) in question.

Any idea how to solve this problem? Thanks!

-Alex
LibreOffice 3.5.7.2 on Linux Mint 14 MATE x64. Writer, US English.

Excellent questions. However, I wonder which office suit supports this style. Cannot imagine how this can be done; expect for using a macro or making adjustments by applying direct formatting to headings of level >= 3.