diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-03-23 12:47:41 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-03-23 14:30:45 +0100 |
commit | f84e0e6b1b0ec5f52ee963a62ac420cd872a771e (patch) | |
tree | e8a34d753ee3e027ac057132ad762fe0a9d7bbc3 /sw | |
parent | a7c11707cf43b13d75a039cae918fae7f268cbf0 (diff) |
fdo#47326 fix RTF import of mixed super/nonsuper text
In most cases \super has its own group, but it's valid to have mixed
super and non-super text in a single group, as long as \super and
\nosupersub keywords are used: handle this.
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtftok/data/fdo47326.rtf | 5 | ||||
-rw-r--r-- | sw/qa/extras/rtftok/rtftok.cxx | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/rtftok/data/fdo47326.rtf b/sw/qa/extras/rtftok/data/fdo47326.rtf new file mode 100644 index 000000000000..264e719127b7 --- /dev/null +++ b/sw/qa/extras/rtftok/data/fdo47326.rtf @@ -0,0 +1,5 @@ +{\rtf1 +Windows\super\'ae\nosupersub XP: +\pard + Cartes:\par +} diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx index 74836343717d..f4a0c4de85ce 100644 --- a/sw/qa/extras/rtftok/rtftok.cxx +++ b/sw/qa/extras/rtftok/rtftok.cxx @@ -68,6 +68,7 @@ public: void testFdo45563(); void testFdo43965(); void testN751020(); + void testFdo47326(); CPPUNIT_TEST_SUITE(RtfModelTest); #if !defined(MACOSX) && !defined(WNT) @@ -82,6 +83,7 @@ public: CPPUNIT_TEST(testFdo45563); CPPUNIT_TEST(testFdo43965); CPPUNIT_TEST(testN751020); + CPPUNIT_TEST(testFdo47326); #endif CPPUNIT_TEST_SUITE_END(); @@ -389,6 +391,13 @@ void RtfModelTest::testN751020() CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(200)), nValue); } +void RtfModelTest::testFdo47326() +{ + load(OUString(RTL_CONSTASCII_USTRINGPARAM("fdo47326.rtf"))); + // This was 15 only, as \super buffered text, then the contents of it got lost. + CPPUNIT_ASSERT_EQUAL(19, getLength()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(RtfModelTest); CPPUNIT_PLUGIN_IMPLEMENT(); |