summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2018-09-21 12:38:48 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-10-01 18:13:16 +0200
commit88188dd62d1d1e3caa1b8ee03fdf246aafdec71e (patch)
treeeebf613f27630659cde919f56039b5b3b53f71fb /sw/qa
parentfeb475c6594c5520ea50ba74e8c17e8a1815dc1f (diff)
tdf#105444 DOCX import: don't put extra paragraphs in comments
on Win32, waiting only for \r\n instead of \n in RemoveLastParagraph(). Change-Id: I8921a6a72e8397ed04edb9f339ba3f0bf5bbb98b Reviewed-on: https://gerrit.libreoffice.org/60865 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit bdade7e3fc33c1832c6f6a472443fca8238738d2) Reviewed-on: https://gerrit.libreoffice.org/60896
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf105444.docxbin0 -> 4928 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport12.cxx9
-rwxr-xr-xsw/qa/extras/uiwriter/uiwriter.cxx10
3 files changed, 10 insertions, 9 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf105444.docx b/sw/qa/extras/ooxmlexport/data/tdf105444.docx
new file mode 100644
index 000000000000..a6e0ea8732e3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf105444.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 4fda4e47a930..d7d41b1d1e36 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -762,6 +762,15 @@ DECLARE_OOXMLEXPORT_TEST(testWatermarkTrim, "tdf114308.docx")
CPPUNIT_ASSERT_MESSAGE(ss.str(), nDifference >= -4);
}
+DECLARE_OOXMLEXPORT_TEST(testTdf105444, "tdf105444.docx")
+{
+ xmlDocPtr pXmlComm = parseExport("word/comments.xml");
+ if (!pXmlComm)
+ return;
+ // there is no extra paragraph on Win32, only a single one.
+ assertXPath(pXmlComm, "/w:comments/w:comment/w:p", 1);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 619ba37ab9bb..6d1f2c51c684 100755
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -5399,15 +5399,7 @@ void SwUiWriterTest::testCreateDocxAnnotation()
uno::Reference<beans::XPropertySet> xField(xFields->nextElement(), uno::UNO_QUERY);
// this was empty instead of "some text"
- OUString aResultText = aSomeText
-#ifdef WNT
- // FIXME From some unclear reason, on windows we get an additional
- // paragraph in the comment - please adapt this test when that gets
- // fixed.
- + "\n"
-#endif
- ;
- CPPUNIT_ASSERT_EQUAL(aResultText, xField->getPropertyValue("Content").get<OUString>());
+ CPPUNIT_ASSERT_EQUAL(aSomeText, xField->getPropertyValue("Content").get<OUString>());
}
void SwUiWriterTest::testTdf107976()