diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-01-30 17:15:07 +0600 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-01-30 18:50:00 +0100 |
commit | 1d7ce421480d9170316533de03feb8d04eb5c767 (patch) | |
tree | eabf33997ffd339bbdd08d302ea063d7cd26a1d0 /include | |
parent | 0cba60a3eaa5b6474614e892e63ff5b3fbbbf0d8 (diff) |
tdf#159438: when there's no frame, close previous bookmark first
Commit 260d6cc6471444b4ef20ed6673831b0b12f96333 (INTEGRATION: CWS mtg2
(1.30.120); FILE MERGED, 2005-12-21) for #i58438# made sure to process
previously opened bookmarks that close at this node, before opening
the bookmarks that start here.
Commit 76a4305d1e90b6617054dd33036e64f005dbcf04 (sw: fix inconsistent
bookmark behavior around at-char/as-char anchored frames, 2017-12-21)
re-introduced the problem accidentally: it only intended to handle
case when there is an anchored frame here.
This change re-instates the correct order (close bookmarks first; then
process collapsed ones; then open new bookmarks) in case there's no
anchored frames here.
To avoid a problem when a non-collapsed bookmark starts and ends at
the same point (e.g., its text was deleted), it gets converted to
collapsed in lcl_FillBookmark. Thus, testRemoveBookmarkText was fixed
in sw/qa/extras/uiwriter/uiwriter4.cxx. There is no reason to keep
the separate -begin/-end elements, especially since on the following
open/save round-trip, it will become collapsed anyway.
Change-Id: Ib555a76f6f776001e12908a1299c24eebf591f6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162743
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/test/xmltesttools.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/test/xmltesttools.hxx b/include/test/xmltesttools.hxx index d18b5d51e813..bf91c5b20151 100644 --- a/include/test/xmltesttools.hxx +++ b/include/test/xmltesttools.hxx @@ -104,6 +104,9 @@ protected: * Assert that rXPath exists, has exactly 1 result set nodes and does *not* have an attribute named rAttribute. */ void assertXPathNoAttribute(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath, const OString& rAttribute); + // Assert that the node name of the single node returned by an XPath is as specified, + // e.g. to check order of elements, where getXPathPosition is unapplicable + void assertXPathNodeName(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath, const OString& rExpectedName); static void registerODFNamespaces(xmlXPathContextPtr& pXmlXpathCtx); static void registerOOXMLNamespaces(xmlXPathContextPtr& pXmlXpathCtx); |