sw HTML export, XHTML mode: fix lost <li> with a list header + item
There is a general mismatch between XHTML and Writer lists: XHTML can
only contain list items (for ordered or unordered lists), while Writer
can contain list headers and list items. List headers have no bullet or
number at the start, list items are the normal text nodes.
Commit
8c2607ae3ce143586e623532b8ae5288277ec3ac (sw HTML export, XHTML
mode: fix lost </li> when last list item is not numbered, 2022-02-21)
fixed the list item end side of this problem: if all text nodes in a
list are headers, then don't write ul/ol at all, otherwise end list
headers with </li> as well to make sure the output XML is valid.
However, this created a mis-match, the starting <li> for list headers in
a list which have non-header text nodes at as was not adapted.
Fix the problem by extending OutHTML_SwFormat() so list headers in a
list with non-header text nodes always have a <li> and </li>, and this
condition is the same on the start/end side.
Calculating if at least one text node is non-header in a list may not be
cheap, so reuse the already calculated info from
OutHTML_NumberBulletListStart() in OutHTML_SwFormat().
Change-Id: I3817a489f16166fc5b4c33ee64e2283c41a4402c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135999
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins