related tdf#99602 writerfilter: deferredCharProps unhandled in Styles
commit8eb0d8daa526d1c53363954d4d8730cad55f1910
authorJustin Luth <justin.luth@collabora.com>
Thu, 3 Oct 2019 09:37:20 +0000 (3 12:37 +0300)
committerJustin Luth <justin_luth@sil.org>
Fri, 4 Oct 2019 10:49:29 +0000 (4 12:49 +0200)
tree878aa6ca93075e728a0e9ea5b52f63a0d7311efe
parent67a2317be8a46b3254475c689e8eca5e9acd45ab
related tdf#99602 writerfilter: deferredCharProps unhandled in Styles

...so don't add deferred properties during style import.
Otherwise, the first paragraph picks up those attributes and
applies them.

Regression from 2012 - only affects subscript/superscript.

Truly fixing this for Character Styles will be tricky,
because it depends on the final fontsize - regardless of
where it is set. So at the style level, the deferred
property needs to be percentized based on SOMETHING, and then
at appendText time the fontsize needs to be determined.
If escapement is inherited from a style, then the escapement needs
to be converted BACK into pointsize (based on style charsize),
and then the final percentage can be calculated and
directly applied. Yuck. I'm inclined to treat charstyle
escapement like pre-2012, which just assigned default
values and ignored the actual/given amount.

Change-Id: I8e3783533ec18740e1c7d0b36c58b6c7e8ce107f
Reviewed-on: https://gerrit.libreoffice.org/80178
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
sw/qa/extras/ooxmlexport/data/tdf99602_subscript_charStyleSize.docx [new file with mode: 0644]
sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
writerfilter/source/dmapper/DomainMapper.cxx