summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/pluginhandler.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-04-19 00:34:28 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-04-19 05:23:38 +0200
commit58e79c4394783033f61e1309214d9060e2f0adf2 (patch)
tree3e6cf8917a1557e885d272f5d299f2c7f863993a /compilerplugins/clang/pluginhandler.cxx
parentedef46e82e7e54a27004f9ee6e99108390736d12 (diff)
tdf#160700: Avoid both bookmark-start and bookmark-end at the same index
There is a special handling of CrossRefBookmark, which has no end position in the document model, but must span the whole paragraph, and end position is generated explicitly. Since commit 1d7ce421480d9170316533de03feb8d04eb5c767 (tdf#159438: when there's no frame, close previous bookmark first, 2024-01-30), end marks of an index are sorted before start marks of the same index, with the expectation that start / end marks represent non-empty span. Dun in case of empty paragraphs with a CrossRefBookmark, both start and end mark were emitted into the same index, and the new sorting resulted in the wrong order of the elements. Fix this by checking if the start index is less than node end, and don't handle CrossRefBookmark specially, if the check is negative. This writes a single text:bookmark, instead of a text:bookmark-start, followed by a text:bookmark-end. Change-Id: I533c4f7814edddc3cf24b1213490f251d60b2273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166266 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'compilerplugins/clang/pluginhandler.cxx')
0 files changed, 0 insertions, 0 deletions