summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-07-29 01:01:58 +0300
committerMichael Stahl <michael.stahl@allotropia.de>2023-07-31 12:32:17 +0200
commit5526c523bc9fda890e15eacd45f280b0827f8ea0 (patch)
tree655b4eeefcc38eed01f794e84e3481c04b616705 /editeng/source
parent74963f654768d6f25ac1ea907736731d9a886853 (diff)
Fix surrogate pairs handling when tweaking script info
Followup to: commit 3af30bafbedb8eb481024efb35cb7876c63d26dc Author: Khaled Hosny <khaled@libreoffice.org> Date: Thu Jul 27 19:03:28 2023 +0300 sw: Handle surrogate pairs when tweaking script info and: commit d6efe8c302b81886706e18640148c51cf7883bbf Author: Khaled Hosny <khaled@libreoffice.org> Date: Thu Jul 27 20:39:22 2023 +0300 tdf#112594: Group NNBSP with the Mongolian characters after it Change-Id: Ie273c457e4f3ed31a3372bc8eb0eb0055c1b97b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155053 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'editeng/source')
-rw-r--r--editeng/source/editeng/impedit2.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index d67c49b072b8..8d4960069cc8 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1742,8 +1742,7 @@ void ImpEditEngine::InitScriptTypes( sal_Int32 nPara )
(nPrevChar == 0x202F /* NNBSP, tdf#112594 */ &&
u_getIntPropertyValue(nChar, UCHAR_SCRIPT) == USCRIPT_MONGOLIAN))
{
- --nPos;
- rTypes.back().nEndPos--;
+ rTypes.back().nEndPos = nPos = nPrevPos;
break;
}
}