Create a new document with some headings with 'Heading 1', 'Heading 2' and 'Heading 3' styles;
Insert a TOC (Insert > Indexes and Tables > Indexes and Tables);
In the new TOC, all entries will be underlined as a link because there are [LS] and [LE] marks with 'None' character style in the entry level structures of the TOC.
Have links in TOC is good! However, the underline will appear in Page Preview and in the printed document.
I suggest that character style of [LS] and [LE] marks is changed from 'None' to 'Index Link' for all TOC levels. Using 'Index Link' style, TOC keeps the link function and preserves the text formatting.
Confirmed for LibO 3.5.0 Beta2 (on WinXP 32b · UI en-US).
That is already fixed in LO-3-5 branch, e.g.:
LOdev 3.5.0beta2+ · Build ID: fab993b-7ef74e0-6f9c6e1
[ http://dev-builds.libreoffice.org/daily/Win-x86@6-fast/libreoffice-3-5/ ]
LS (Hyperlink Start) has Character Style 'Index Link' by default.
Writer: Hyperlinks on ToX have 'Index Link' style by default
Should be integrated into 3.5.0 Beta3.
Index table: character style 'Index link' instead of 'Internet link'
Sample: Screenshot 'toc_index_link_lo-3-5_2011-12-28.png'
Created attachment 54952 [details]
Screenshot: LS (Hyperlink Start) has Character Style 'Index Link' by default.
*** Bug 37308 has been marked as a duplicate of this bug. ***
Fixed by these commits in master and 3.5 branches:
*** Bug 42320 has been marked as a duplicate of this bug. ***