diff options
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/fdo55187.docx | bin | 0 -> 12759 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 9 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/fdo55187.docx b/sw/qa/extras/ooxmlimport/data/fdo55187.docx Binary files differnew file mode 100644 index 000000000000..59cd0a806250 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/fdo55187.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 621650205101..6b1c425b0890 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -91,6 +91,7 @@ public: void testInk(); void testN779834(); void testN779627(); + void testFdo55187(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -128,6 +129,7 @@ public: CPPUNIT_TEST(testInk); CPPUNIT_TEST(testN779834); CPPUNIT_TEST(testN779627); + CPPUNIT_TEST(testFdo55187); #endif CPPUNIT_TEST_SUITE_END(); @@ -885,6 +887,13 @@ void Test::testN779627() CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nLeftMargin); } +void Test::testFdo55187() +{ + // 0x010d was imported as a newline. + load("fdo55187.docx"); + getParagraph(1, OUString("lupĨka", 7, RTL_TEXTENCODING_UTF8)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 0736d692e734..38a99611a7f0 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3523,8 +3523,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) { m_pImpl->getTableManager().utext(data_, len); - // RTF always uses text() instead of utext() for run break - if(len == 1 && ((*data_) == 0x0d || (*data_) == 0x07) && !IsRTFImport()) + if(len == 1 && (sText[0] == 0x0d || sText[0] == 0x07)) { bool bSingleParagraph = m_pImpl->GetIsFirstParagraphInSection() && m_pImpl->GetIsLastParagraphInSection(); // If the paragraph contains only the section properties and it has |