How do you limit line numbering to the body content?
That happened automatically in my LO 4.0.3.3. I could not insert line numbers into the header until I modified the header paragraph style.
@spraine, the link in the answer below by @man_jk eventually points here: Adding Line Numbers - LibreOffice Help
You are probably having a problem with paragraph styles.
- Select paragraph.
- From styles select “Text Body” (you probably now have some heading style).