sw/qa/extras/ooxmlexport/data/tdf137742.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 13 +++++++++++++ 2 files changed, 13 insertions(+)
New commits: commit f6a04457b8aa227deb9402e6406ea843fabfcbb0 Author: Xisco Fauli <[email protected]> AuthorDate: Wed Aug 18 16:34:09 2021 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Wed Aug 18 18:53:56 2021 +0200 tdf#137742: sw_ooxmlexport16: Add unittest Change-Id: Iefc6f78a3045ab844df5c9055379336a40ac7ae2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120671 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/qa/extras/ooxmlexport/data/tdf137742.docx b/sw/qa/extras/ooxmlexport/data/tdf137742.docx new file mode 100644 index 000000000000..26b3e9186042 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf137742.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx index 51b713dc0d68..81a8912a9b6c 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx @@ -254,6 +254,19 @@ DECLARE_OOXMLEXPORT_TEST(testTdf44278, "tdf44278.docx") CPPUNIT_ASSERT_EQUAL(1, getPages()); } +DECLARE_OOXMLEXPORT_TEST(testTdf137742, "tdf137742.docx") +{ + lang::Locale locale( + getProperty<lang::Locale>(getParagraph(1), "CharLocale")); + // the \lang inside the group was applied to CJK not Western + CPPUNIT_ASSERT_EQUAL(OUString("en"), locale.Language); + + // Without the fix in place, this test would have failed with + // - Expected: US + // - Actual : + CPPUNIT_ASSERT_EQUAL(OUString("US"), locale.Country); +} + DECLARE_OOXMLEXPORT_TEST(testTdf141231_arabicHebrewNumbering, "tdf141231_arabicHebrewNumbering.docx") { // The page's numbering type: instead of Hebrew, this was default style::NumberingType::ARABIC (4).
