tdf#155407: fix the second replacement in FnChgToEnEmDash
commit677918c5c71ff90040ca91199ef02c02377c0292
authorMike Kaganski <mike.kaganski@collabora.com>
Fri, 19 May 2023 11:01:02 +0000 (19 14:01 +0300)
committerAndras Timar <andras.timar@collabora.com>
Sun, 28 May 2023 18:58:15 +0000 (28 20:58 +0200)
treeb36bf4d2f3032be21eb8b1f6ebb5ee6b47de79c7
parent3116a14f6849238cfe342de7d8b307986ff5bb04
tdf#155407: fix the second replacement in FnChgToEnEmDash

It was broken from the beginning. The second replacement could
look into a wrong string when checking if the characters around
the "--" are eligible; it could use obsolete indices in the
document, ignoring the previous replacement that changed the
lendth of the text.

This also replaces a use of char* to hold Unicode codepoints to
pass to lcl_IsInAsciiArr, with an array of sal_Unicode (because
all the checked values fit into it).

Change-Id: I949630abc564fc0875be0b92228846497bb1a022
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152002
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152084
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
editeng/source/misc/svxacorr.cxx
sw/qa/extras/uiwriter/uiwriter6.cxx