sw HTML export, XHTML mode: fix lost </li> when last list item is not numbered
This went wrong in
013a4f1f5c9ea5fb511568c53a7e76d1b365a65d (sw XHTML
export: fix handling of list labels, 2021-05-13), where we started to
assume that in case the last paragraph of a list is not numbered, then
the entire list is not numbered. This lead to loosing the </li> for an
<li> in case the list starts with a numbered paragraph, but ends with a
non-numbered one.
Fix the problem by (if necessary) looking back till the start of the
list to see if any paragraph is numbered: that ensures that the <li> and
</li> is always in sync.
This fixes the new problem and keeps the old problem fixed at the same
time.
Change-Id: I7d347b37a40dcc727c2080bf8279e33c3ad147e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130287
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
(cherry picked from commit
8c2607ae3ce143586e623532b8ae5288277ec3ac)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130310
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>