summaryrefslogtreecommitdiff
path: root/config_host
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-05-06 15:21:45 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-05-09 08:32:53 +0200
commitf7bad12cbcea665e2e0f49491a82cd433bb48b51 (patch)
treee67899e555baeb74f428e4602f4b67075ddcb2f9 /config_host
parentacacd1f33917d6da8f8801b26396e3831ae4057a (diff)
sw: don't copy useless char escapement to next node on split
Unless autocorrect notices such a just-typed content, pressing enter at the end of a paragraph which ends with superscript or subscript text will carry over that formatting to the next paragraph, which is hardly wanted by any user. Technically this is not copying: paragraph split works by creating a next text node, moving all content & formatting to this next node, then move part of the content back to the previous node, which is all content in case of an enter at the end of a paragraph. Copying character formatting over to the next text node makes sense: e.g. paragraph alignment or boldness is probably something a user wants to continue using in the next text node. But superscript is typically created by autocorrect in English text for "1st" and similar input, this is usually unwanted in the next paragraph. Fix the problem by special-casing the RES_CHRATR_ESCAPEMENT case and remove the matching SvxEscapementItem from the hints of the just created next paragraph in case it's there. A possible future improvement would be to support this when there are other active (direct formatting) hints, in which case going via SwDoc::ResetAttrs() is probably a better choice, but the effects of that for undo and redlining is not clear. (cherry picked from commit 71019ec15bd3fe15385443b68614fd2402e0040f) Change-Id: I57feb99d9a31f16c277eba44f464ab49936b65aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133948 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'config_host')
0 files changed, 0 insertions, 0 deletions