diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-02-26 17:28:27 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-02-26 18:06:40 +0100 |
commit | 5de52551a963b932cc23c2ea75f709fa1924520b (patch) | |
tree | 380b547231a507a83a58cd7f271c46bd38b3c57f /sw/qa/extras/rtfexport/rtfexport.cxx | |
parent | 3a934d928e455eca38f124072c20a624a64aa225 (diff) |
fdo#61507 export of RTF_TITLE may need RTF_UPR and RTF_UD
Change-Id: I3b8fe209a96e5119541e09cb5dbda8a2c6926b40
Diffstat (limited to 'sw/qa/extras/rtfexport/rtfexport.cxx')
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index be9b27b96500..529467092a8c 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -69,6 +69,7 @@ public: void testTextFrames(); void testFdo53604(); void testFdo52286(); + void testFdo61507(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -113,6 +114,7 @@ void Test::run() {"textframes.odt", &Test::testTextFrames}, {"fdo53604.odt", &Test::testFdo53604}, {"fdo52286.odt", &Test::testFdo52286}, + {"fdo61507.rtf", &Test::testFdo61507}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -463,6 +465,23 @@ void Test::testFdo52286() CPPUNIT_ASSERT_EQUAL(sal_Int32(58), getProperty<sal_Int32>(getRun(getParagraph(2), 2), "CharEscapementHeight")); } +void Test::testFdo61507() +{ + /* + * Unicode-only characters in \title confused Wordpad. Once the exporter + * was fixed to guard the problematic characters with \upr and \ud, the + * importer didn't cope with these new keywords. + */ + + uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<document::XDocumentProperties> xDocumentProperties(xDocumentPropertiesSupplier->getDocumentProperties()); + OUString aExpected = OUString("ÉÁŐŰ∭", 11, RTL_TEXTENCODING_UTF8); + CPPUNIT_ASSERT_EQUAL(aExpected, xDocumentProperties->getTitle()); + + // Only "Hello.", no additional characters. + CPPUNIT_ASSERT_EQUAL(6, getLength()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |