summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-06-27 07:50:12 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2017-06-27 11:29:37 +0200
commit6124490c1e486d648d75cd1c3f7f4e793fb1d1c0 (patch)
tree2d551072cc70033fa227c494fc4de302d68e06cb /sw
parent3e8746506f063380387f3db5c3f849446ab58deb (diff)
tdf#108806: convert CRLF into space in OOXML text
Change-Id: I8e2e108a705ecdb55c096a589d83d51c48b0b83c Reviewed-on: https://gerrit.libreoffice.org/39286 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf108806.docxbin0 -> 1315 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf108806.docx b/sw/qa/extras/ooxmlimport/data/tdf108806.docx
new file mode 100644
index 000000000000..007b10ae6f96
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf108806.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 673a2b5861cc..a5f7cf21cd96 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1291,6 +1291,16 @@ DECLARE_OOXMLIMPORT_TEST(testTdf108408, "tdf108408.docx")
CPPUNIT_ASSERT_EQUAL(double(20), getProperty<double>(xRun, "CharHeight"));
}
+DECLARE_OOXMLIMPORT_TEST(testTdf108806, "tdf108806.docx")
+{
+ // tdf#108806:The CRLF in the text contents of XML must be converted to single spaces.
+ CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
+ uno::Reference< text::XTextRange > paragraph = getParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("First part of a line (before CRLF). Second part of the same line (after CRLF)."),
+ paragraph->getString());
+}
+
DECLARE_OOXMLIMPORT_TEST(testVmlAdjustments, "vml-adjustments.docx")
{
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);