summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-04-26 17:24:38 +0200
committerLászló Németh <nemeth@numbertext.org>2019-05-24 09:12:06 +0200
commit4f279b95efbc113d3c1907a232a4e647e2b4054f (patch)
treedbc48d7c1f20c3f7ddeac1c5d00ab49882509d5b /sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
parent88158bb37d1e41fd192dc66db544daebc980df31 (diff)
tdf#123460 DOCX track changes: moveFrom completely
also with the paragraph mark, not leaving an empty paragraph at the original place of the moved text. Note: as desktop version of MSO does, but its online version leaves empty paragraphs interestingly. Change-Id: I03dda8997df3efbc82e936bd31a3813323e6b5ab Reviewed-on: https://gerrit.libreoffice.org/71382 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit d32d9a2b3c5e3963f4a18f6c7bbf50fab2e9b2be) Reviewed-on: https://gerrit.libreoffice.org/72718 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport13.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index e610254b3b83..ca211e0e7eb9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -91,6 +91,26 @@ DECLARE_OOXMLEXPORT_TEST(testTextInput, "textinput.odt")
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:t", "SomeText");
}
+DECLARE_OOXMLIMPORT_TEST(testTdf123460, "tdf123460.docx")
+{
+ // check paragraph mark deletion at terminating moveFrom
+ CPPUNIT_ASSERT_EQUAL(true,getParagraph( 2 )->getString().startsWith("Nunc"));
+ CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 2 ), 1 )->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 1), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty<OUString>(getRun(getParagraph(2), 1), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(true, getRun( getParagraph( 2 ), 2 )->getString().endsWith("tellus."));
+ CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 2 ), 3 )->getString());
+ bool bCaught = false;
+ try
+ {
+ getRun( getParagraph( 2 ), 4 );
+ }
+ catch (container::NoSuchElementException&)
+ {
+ bCaught = true;
+ }
+ CPPUNIT_ASSERT_EQUAL(true, bCaught);
+}
CPPUNIT_PLUGIN_IMPLEMENT();