diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:44:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:44:47 +0000 |
commit | 91fe6b97952aa6f7cef58327fd085a17db38ad95 (patch) | |
tree | 7a4412295bfb80e15a4936fe67d4bd7b96458ce8 /sw/qa/extras/uiwriter/uiwriter4.cxx | |
parent | Releasing progress-linux version 4:24.2.1-4~progress7.99u1. (diff) | |
download | libreoffice-91fe6b97952aa6f7cef58327fd085a17db38ad95.tar.xz libreoffice-91fe6b97952aa6f7cef58327fd085a17db38ad95.zip |
Merging upstream version 4:24.2.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/qa/extras/uiwriter/uiwriter4.cxx')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter4.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx b/sw/qa/extras/uiwriter/uiwriter4.cxx index c1f0be1757..98fcbcae22 100644 --- a/sw/qa/extras/uiwriter/uiwriter4.cxx +++ b/sw/qa/extras/uiwriter/uiwriter4.cxx @@ -682,8 +682,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testBookmarkCollapsed) // 6. Hit Del, thus deleting "abc" (The bookmark "test" is still there). // 7. Save the document: // <text:p text:style-name="Standard"> -// <text:bookmark-start text:name="test"/> -// <text:bookmark-end text:name="test"/> +// <text:bookmark text:name="test"/> // def // </text:p> // @@ -737,14 +736,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRemoveBookmarkText) // load only content.xml from the resaved document xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); - constexpr OString aPath("/office:document-content/office:body/office:text/text:p"_ostr); - - CPPUNIT_ASSERT_ASSERTION_FAIL(getXPathPosition(pXmlDoc, aPath, "bookmark")); // not found - const int pos2 = getXPathPosition(pXmlDoc, aPath, "bookmark-start"); - const int pos3 = getXPathPosition(pXmlDoc, aPath, "bookmark-end"); - - CPPUNIT_ASSERT_EQUAL(0, pos2); // found, and it is first - CPPUNIT_ASSERT_EQUAL(1, pos3); // found, and it is second + // Bookmark without text becomes collapsed + assertXPath(pXmlDoc, "//office:body/office:text/text:p/text:bookmark"_ostr, 1); + assertXPath(pXmlDoc, "//office:body/office:text/text:p/text:bookmark-start"_ostr, 0); + assertXPath(pXmlDoc, "//office:body/office:text/text:p/text:bookmark-end"_ostr, 0); } // 1. Open a new writer document |