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); diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index b35d762c69b7..1a25933a8dc6 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -298,6 +298,10 @@ StyleSheetTable_Impl::StyleSheetTable_Impl(DomainMapper& rDMapper, m_pDefaultCharProps->Insert( PROP_CHAR_HEIGHT, aVal ); m_pDefaultCharProps->Insert( PROP_CHAR_HEIGHT_ASIAN, aVal ); m_pDefaultCharProps->Insert( PROP_CHAR_HEIGHT_COMPLEX, aVal ); + + // See SwDoc::RemoveAllFormatLanguageDependencies(), internal filters + // disable kerning by default, do the same here. + m_pDefaultCharProps->Insert(PROP_CHAR_AUTO_KERNING, uno::Any(false)); }