summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout/layout.cxx
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2021-09-09 11:41:33 +0300
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-09-13 00:36:44 +0200
commitdaa1469e3e7bfe840efb6f3fad1bac63a2577e3f (patch)
treebefb2ca5abd092ef63c7fc0ce7a528125b9ccac5 /sw/qa/extras/layout/layout.cxx
parent29413fca12ae2357bd684a71d354826bdd1b74bb (diff)
tdf#123642: keep last bookmark at the document end
In some cases DomainMapper_Impl::RemoveLastParagraph() can also remove last bookmark from real last paragraph. This does never happens when we use xParagraph->dispose(), but pretty always during older way with xCursor->setString(OUString()). Unfortunately without deep refactoring of redlines, bookmarks, etc. I see no other way to avoid this removal except given hack which is trying to store last bookmark and if it did disappear restore it. Some existing unittests were adjusted: corresponding original DOCX files did contain final bookmarks not taken into account by the code. In some cases test code is modified, in some just removed final bookmark in DOCX: such multi-format tests as in ooxmlfieldexport.cxx will be more identical to RTF & DOC variants. Change-Id: Ie9948b58cda705a0b85fa8e5e08b72fbb7d682b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121409 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sw/qa/extras/layout/layout.cxx')
-rw-r--r--sw/qa/extras/layout/layout.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index bb5a860cab07..46176b2cc420 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -1316,7 +1316,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116486)
{
SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf116486.docx");
CPPUNIT_ASSERT(pDoc);
- OUString aTop = parseDump("/root/page/body/txt/Special", "nHeight");
+ OUString aTop = parseDump("/root/page/body/txt/Special[1]", "nHeight");
CPPUNIT_ASSERT_EQUAL(OUString("4006"), aTop);
}