diff options
author | Urmas <davian818@gmail.com> | 2013-05-27 09:49:55 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2013-05-30 23:01:29 +0200 |
commit | 4f5f14320b61bea61c73699a42030e8aa5960c80 (patch) | |
tree | 1192babcc7ffc2da516c29cdb12f6673ab9879bd /sw | |
parent | 762a8d89d5686085e545a1e1ada4254a8550992f (diff) |
fdo#64671 Some special RTF characters were not skipped correctly
Some special characters, like { and }, were not skipped when they
occured as a replacement character for \uN keyword.
(cherry picked from commits bfb93ffc6d72d22a833acf9d8c9d166153dad7c0 and
ec8e012e980c88c8f24a7de44e44d0319bae2801)
Conflicts:
sw/qa/extras/rtfimport/rtfimport.cxx
Change-Id: I19b66a290cd9880924774fa89bb29df280e44a3c
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/fdo64671.rtf | 3 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo64671.rtf b/sw/qa/extras/rtfimport/data/fdo64671.rtf new file mode 100644 index 000000000000..385dca4294f1 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/fdo64671.rtf @@ -0,0 +1,3 @@ +{\rtf1 +\u381\'7d +\par} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index e31fa9888f59..3a41731c5643 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -148,6 +148,7 @@ public: void testFdo61193(); void testFdo63023(); void testN818997(); + void testFdo64671(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -266,6 +267,7 @@ void Test::run() {"hello.rtf", &Test::testFdo61193}, {"fdo63023.rtf", &Test::testFdo63023}, {"n818997.rtf", &Test::testN818997}, + {"fdo64671.rtf", &Test::testFdo64671}, }; for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) { @@ -1222,6 +1224,12 @@ void Test::testN818997() CPPUNIT_ASSERT_EQUAL(2, getPages()); } +void Test::testFdo64671() +{ + // Additional '}' was inserted before the special character. + getRun(getParagraph(1), 1, OUString("\xC5\xBD", 2, RTL_TEXTENCODING_UTF8)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |