diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-08-18 16:34:09 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-08-18 18:53:56 +0200 |
commit | f6a04457b8aa227deb9402e6406ea843fabfcbb0 (patch) | |
tree | a5463144f0d7fcbb4f07ae349ff268f39067a1fd | |
parent | eaac26c886a793dfb6c619a32a9fdeef98af3f79 (diff) |
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 <xiscofauli@libreoffice.org>
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf137742.docx | bin | 0 -> 6925 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137742.docx b/sw/qa/extras/ooxmlexport/data/tdf137742.docx Binary files differnew file mode 100644 index 000000000000..26b3e9186042 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf137742.docx 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). |