summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-01-22 19:10:29 +0600
committerMike Kaganski <mike.kaganski@collabora.com>2024-01-23 05:33:42 +0100
commit13a11632014ccc27199667c6a1e313f8ff616d6d (patch)
tree4dbb5f9e94816f5706c8ebd1f08b4306b076b0f0 /sw/source/uibase/shells
parent6d71c21890c908225945f0fc3566255ed150f660 (diff)
tdf#159259: make sure to set FieldStartRange in sdt helper
... also for field case. Unfortunately, it is not really clear, if the anagement of this could be moved to DomainMapper_Impl. There are several insertion contexts; they may use different insertion points; there maybe could be cases when an inserted content should not go into the current sdt (?). Thus, I didn't put the code into DomainMapper_Impl::appendTextContent(), where the field character is inserted. Instead, I added code to check and set the start range in the same place as for the normal text: we know for sure, that if it were a normal text, we would append it to GetCurrentTextRange()->getEnd() - so do the same for fields. My concern that still stays is that the use of hasUnusedText looks hackish and fragile. Inserted fields don't set it - so the code that depends on empty sdt will not notice it. OTOH, it can't set it: this would break inserting field result for an already inserted command. Possibly all handling of sdt should be refactored at some point. Change-Id: I7a783aab2400d9a9c1f9f2e5607c872cb58d346b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162398 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/uibase/shells')
0 files changed, 0 insertions, 0 deletions