office-gobmx/xmloff/qa/unit/data/nested-spans.odt
Miklos Vajna 2d0f43befd tdf#156321 ODT import: fix lost char format on outer span elements
Regression from commit 209dce614c (sw: fix
ODT import of paragraph marker formatting, 2022-12-20), the bugdoc has a
first paragraph with nested spans (the outer sets the boldness) and the
text does not appear as bold in Writer anymore.

What appears to be the problem is that our model is just a list of spans
for a paragraph, so nesting is converted to a list of spans, but now the
outer span char format is lost.

Fix the problem by making the condition of the 'no upgrade from char
format to para format' more strict: do this in case we have empty spans.
That fixes this new use-case and leaves the original one fixed.

Note that in the long run it may make sense to always disable the
upgrade from char format to para format, but that has to be done in a
way that does not break the import of nested spans.

Change-Id: Ie6fafb3e9649e50790c7ecae8e136e6600f3341e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155648
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-08-14 09:17:55 +02:00

6.2 KiB