From 38b0c24fa5cbb4246e03d77ac022dfdc9fdede03 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 30 Mar 2017 09:27:45 +0200 Subject: Related: tdf#105454 DOCX import: fix unwanted enabled-by-default kerning Similar to DOC, DOCX doesn't enable kerning by default. Change-Id: I070ff5f0d43c27107593d629a1ad681d29d2038c Reviewed-on: https://gerrit.libreoffice.org/35890 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sw/qa/extras/ooxmlimport/data/kern.docx | Bin 0 -> 12832 bytes sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 sw/qa/extras/ooxmlimport/data/kern.docx (limited to 'sw/qa/extras') diff --git a/sw/qa/extras/ooxmlimport/data/kern.docx b/sw/qa/extras/ooxmlimport/data/kern.docx new file mode 100644 index 000000000000..b66130d38d03 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/kern.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index c4b5fe5dd706..7fb3871f32ed 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -648,6 +648,13 @@ DECLARE_OOXMLIMPORT_TEST(testN820504, "n820504.docx") CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, getProperty(getShape(1), "AnchorType")); } +DECLARE_OOXMLIMPORT_TEST(testKern, "kern.docx") +{ + CPPUNIT_ASSERT(getProperty(getRun(getParagraph(1), 1), "CharAutoKerning")); + // This failed: kerning was also enabled for the second paragraph. + CPPUNIT_ASSERT(!getProperty(getRun(getParagraph(2), 1), "CharAutoKerning")); +} + DECLARE_OOXMLIMPORT_TEST(testFdo43641, "fdo43641.docx") { uno::Reference xGroupShape(getShape(1), uno::UNO_QUERY); -- cgit