diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-07-07 11:33:34 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-07-07 12:54:05 +0200 |
commit | 6a3960044c609b682170f7a34612761e62746c98 (patch) | |
tree | 63ace6152ee8b775a6fe79e2786471be8479e2ab /sw | |
parent | 919b6958dbb1c17c060ba9a58fe245b825b271c2 (diff) |
tdf#108995: take xml:space attribute into account
See paragraph 2.10 of XML 1.0 specification and 17.3.3.31 of ECMA-376-1:2016
Change-Id: I7f19d3b9cf2ccce88a5fa03022beeb99facc04fe
Reviewed-on: https://gerrit.libreoffice.org/39682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 7c1a51516aaf2767e43b393259a1ad21570df5fb)
Reviewed-on: https://gerrit.libreoffice.org/39688
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/xml_space.docx | bin | 0 -> 1309 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/xml_space.docx b/sw/qa/extras/ooxmlimport/data/xml_space.docx Binary files differnew file mode 100644 index 000000000000..305c135fdd75 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/xml_space.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 767f908ab6fb..a46a09d32bf3 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1466,6 +1466,16 @@ DECLARE_OOXMLIMPORT_TEST(testTdf108714, "tdf108714.docx") CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE, breakType); } +DECLARE_OOXMLIMPORT_TEST(testTdf108995, "xml_space.docx") +{ + CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); + // We need to take xml:space attribute into account + uno::Reference< text::XTextRange > paragraph = getParagraph(1); + CPPUNIT_ASSERT_EQUAL(OUString("\tA\t\tline with\txml:space=\"preserve\" \n" + "A line without xml:space"), + paragraph->getString()); +} + // tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT CPPUNIT_PLUGIN_IMPLEMENT(); |