sw: ODT import/export of DOCX's paragraph marker formatting
The bugdoc had a numbering, where the paragraph marker was explicitly
formatted to a custom sans font, and this font is also used for the numbering
portion's font. This was imported from DOCX correctly, but once you save
to ODT and reload, the font used in the numbering portion changed from
sans to serif, which is incorrect.
The reason for this seems to be that earlier
5ba30f588d6e41a13d68b1461345fca7a7ca61ac (tdf#64222 sw: better DOCX
import/export of paragraph marker formatting, 2019-09-06) introduced
support for storing this paragraph marker formatting in
RES_PARATR_LIST_AUTOFMT, but this was lost on ODT export / import.
Fix the problem by 1) adding the autostyle to the autostyle pool, so the
font gets written when writing automatic char styles 2) extending
SwXTextPortion to have a mode where it exposes the
RES_PARATR_LIST_AUTOFMT of the current text node and 3) improving
lcl_CreatePortions() to expose a trailing empty text portion that works
with these properties.
This also required adjusting CppunitTest_sw_ooxmlexport2's
testFdo64238_b, which explicitly asserted that the format of the
paragraph marker is not exposed in the UNO API text portion enumeration.
An additional improvement would be to go with a more explicit markup in
the ODT output for RES_PARATR_LIST_AUTOFMT, but we would need to decide
what name to use there, since currently we call this paragraph marker
formatting RES_PARATR_LIST_AUTOFMT / ListAutoFormat, and somewhat
confusingly this is primarily about paragraph marker formatting, not
lists / numberings (that is just a consequence).
Change-Id: I19c7eed19c6fc85c251ef87a5181c0719a0a382c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144447
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
(cherry picked from commit
6249858a8972aef077e0249bd93cfe8f01bce4d6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144491
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>