forked from amazingfate/loongoffice
The bugdoc has a single paragraph, where the numbering portion is bold in Writer but not in Word. The reason for this appears to be that Writer considers text node hints for the formatting of the numbering portion where the hint covers the entire paragraph, but Word doesn't do this. This behavior was added in commits cb0e1b52d68aa6d5b505f91cb4ce577f7f3b2a8f (sw, numbering portion format: consider full-para char formats as well, 2022-10-20) and DOCX export was also adjusted in commit f546f7573158e52359bbeae6194a83a1ff8ac52c (DOCX export, numbering portion format: consider full-para char formats as well, 2022-10-28). Fix the problem by partially reverting the above two commits and instead only consider hints that both start and end at the paragraph end. The revert of the first commit fixes the new bugdoc (its numbering portion is no longer bold) and the old bugdoc keeps working if the sw UNO API's text portion enumeration is extended to expose such empty autoformats at paragraph end. Related testcases: - CppunitTest_sw_ooxmlexport13's testTdf123460 explicitly tested that we don't expose the paragraph marker's formatting on the UNO API. - CppunitTest_sw_core_text's testNumberPortionFormat now uses the new ODT markup for these explicit paragraph marker char props (empty text span at para end). - CppunitTest_sw_uiwriter2's testTdfChangeNumberingListAutoFormat failed when only the above first commit (layout) was reverted, so revert the matching DOCX export commit as well, which is also good for consistency. - CppunitTest_sw_ooxmlexport18's testNumberPortionFormatFromODT also used the old ODT markup, updated. Change-Id: Iee8acf72dabcd10b3f4d3d68b83ed248bf50c324 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144292 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins