diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-11-04 22:45:48 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-11-05 00:13:21 +0100 |
commit | 88d3f9e4cf64e4ef037063b26ddf347fd42d8d84 (patch) | |
tree | dd68e5659c87d49a0c1511e71c49ec03adfe4b37 /sw | |
parent | 8e19b7a0b3dc57fce7e2caf05af2c0451123c5be (diff) |
fdo#85812: RTF import: fix run type in new groups
Apparently the run type resets to LTR in a new group.
(regression from fc49c052dbdbb5ab3b0a02a13143705f769b9662)
Change-Id: I61c0fcbe4e44b488a14cc78823063a1a1ad4f4b1
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/fdo85812.rtf | 8 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo85812.rtf b/sw/qa/extras/rtfimport/data/fdo85812.rtf new file mode 100644 index 000000000000..2f3e10c96a34 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/fdo85812.rtf @@ -0,0 +1,8 @@ +{\rtf1\ansi\deflang1049\deflangfe2052 +{\*\generator Microsoft Word 11.0.5604;} + +\pard\plain +\lang1049\langfe2052\loch\hich\dbch\langnp1049\langfenp2052 +{\lang1033\langfe2052\dbch\langnp1033 \hich\dbch\loch This } +{\lang1036\langfe2052\langnp1036 \par } +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 6639948ce305..a4dd898c0236 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -474,6 +474,16 @@ DECLARE_RTFIMPORT_TEST(testFdo48037, "fdo48037.rtf") CPPUNIT_ASSERT_EQUAL(nExpected, nActual); } +DECLARE_RTFIMPORT_TEST(testFdo85812, "fdo85812.rtf") +{ + lang::Locale locale(getProperty<lang::Locale>( + getRun(getParagraph(1), 1, "This "), "CharLocale")); + // the \lang inside the group was applied to CJK not Western + CPPUNIT_ASSERT_EQUAL(OUString("en"), locale.Language); + CPPUNIT_ASSERT_EQUAL(OUString("US"), locale.Country); + +} + DECLARE_RTFIMPORT_TEST(testFdo47764, "fdo47764.rtf") { // \cbpat with zero argument should mean the auto (-1) color, not a default color (black) |