diff options
author | Justin Luth <justin.luth@collabora.com> | 2021-03-23 12:18:43 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-03-25 10:04:01 +0100 |
commit | 9436ab24a7d08540a7c192df86956d53673c9a08 (patch) | |
tree | 3a0dabec8b9721861e391e4e7f7474afa94b42b2 /sw | |
parent | b527e8722004e6f09605e3526f6effd4af588311 (diff) |
tdf#125936 writerfilter: treat escapement in numbering like styles
deferCharacterProperties wasn't occurring in the numbering import
(and so it was affecting the first run of the body text).
But just like character styles, it would be better to just
consider this auto-superscript instead of to defer it
and calculate based on the fontsize - since that really
isn't known until layout time, and so only works with
direct formating.
Change-Id: I9ce5a31c173089603316f4c3389e5f2e5dbe165a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112987
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf125936_numberingSuperscript.docx | bin | 0 -> 25589 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 6 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125936_numberingSuperscript.docx b/sw/qa/extras/ooxmlexport/data/tdf125936_numberingSuperscript.docx Binary files differnew file mode 100644 index 000000000000..eb856fb3b02e --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf125936_numberingSuperscript.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx index a397bb073ecf..2a1784d32ac1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx @@ -50,6 +50,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf140668, "tdf140668.docx") CPPUNIT_ASSERT_EQUAL(1, getPages()); } +DECLARE_OOXMLEXPORT_TEST(testTdf125936_numberingSuperscript, "tdf125936_numberingSuperscript.docx") +{ + // Without the fix, the first character run was superscripted. + CPPUNIT_ASSERT_EQUAL( sal_Int16(0), getProperty<sal_Int16>(getRun(getParagraph(1), 1, "A-570-108"), "CharEscapement") ); +} + DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf134619_numberingProps, "tdf134619_numberingProps.doc") { // Get the third paragraph's numbering style's 1st level's bullet size |