tdf#155238: Reimplement how ListAutoFormat is stored to ODF
commit1a88efa8e02a6d765dab13c7110443bb9e6acecf
authorMike Kaganski <mike.kaganski@collabora.com>
Wed, 10 May 2023 17:39:12 +0000 (10 20:39 +0300)
committerMike Kaganski <mike.kaganski@collabora.com>
Thu, 11 May 2023 16:06:02 +0000 (11 18:06 +0200)
treefcefc280189d41ff6b6277017232085bfe334743
parentabd630e81bc150d05e4129cc22752ecf461777c7
tdf#155238: Reimplement how ListAutoFormat is stored to ODF

This reimplements commits 6249858a8972aef077e0249bd93cfe8f01bce4d6
(sw: ODT import/export of DOCX's paragraph marker formatting,
2022-12-19) and 209dce614c43f63f63f5b42a746665c0ec1cbfe3 (sw: fix
ODT import of paragraph marker formatting, 2022-12-20).

Instead of using an empty trailing span for the ListAutoFormat data,
introduce a new loext:marker-style-name attribute for text:p element,
referencing a text autostyle.

The problems with the previous implementation were that (1) it was
impossible (or very difficult) to disambiguate several empty trailing
spans, in case it was needed; and (2) this was incompatible change,
with other ODF implementations treating the trailing span normally.

I couldn't manage to incorporate the attribute to paragraph autostyle,
because of problems referencing different autostyles one from another,
so put it directly to the paragraph attributes.

Change-Id: I33473147f1f774c24cbbc57bf0c4f3a1d83ce5bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151645
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
19 files changed:
include/xmloff/txtimp.hxx
include/xmloff/xmltoken.hxx
schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
sw/qa/extras/odfexport/data/ParagraphMarkerMarkup.fodt [new file with mode: 0644]
sw/qa/extras/odfexport/odfexport2.cxx
sw/qa/extras/odfimport/data/emptyParagraphLoosesFontHeight.fodt [new file with mode: 0644]
sw/qa/extras/odfimport/odfimport.cxx
sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
sw/source/core/unocore/unoobj.cxx
sw/source/core/unocore/unoparagraph.cxx
sw/source/core/unocore/unoportenum.cxx
xmloff/inc/xmlprop.hxx
xmloff/source/core/xmltoken.cxx
xmloff/source/text/txtimp.cxx
xmloff/source/text/txtparae.cxx
xmloff/source/text/txtparai.cxx
xmloff/source/text/txtparai.hxx
xmloff/source/text/txtprmap.cxx
xmloff/source/token/tokens.txt