From 7f36f4ce9f9f3d430009ba472d275d038abecb16 Mon Sep 17 00:00:00 2001 From: Martin Hosken Date: Tue, 22 Mar 2016 11:26:52 +0700 Subject: Fix wrong pattern definitions in khmer dictionary breaker Change-Id: I0132196744046391759a6e5110d054feee3deea3 Reviewed-on: https://gerrit.libreoffice.org/23420 Tested-by: Jenkins Reviewed-by: Martin Hosken --- external/icu/khmerbreakengine.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'external/icu') diff --git a/external/icu/khmerbreakengine.patch b/external/icu/khmerbreakengine.patch index bc0d287929b0..0687645e8790 100644 --- a/external/icu/khmerbreakengine.patch +++ b/external/icu/khmerbreakengine.patch @@ -15,8 +15,8 @@ index f1c874d..3ad1b3f 100644 + fViramaSet.applyPattern(UNICODE_STRING_SIMPLE("[[:ccc=VR:]]"), status); + + // note Skip Sets contain fIgnoreSet characters too. -+ fSkipStartSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=OP:][:lb=QU:]]\\u200C\\u200D\\u2060"), status); -+ fSkipEndSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CP:][:lb=QU:][:lb=EX:][:lb=CL:]]\\u200C\\u200D\\u2060"), status); ++ fSkipStartSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=OP:][:lb=QU:]\\u200C\\u200D\\u2060]"), status); ++ fSkipEndSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CP:][:lb=QU:][:lb=EX:][:lb=CL:]\\u200C\\u200D\\u2060]"), status); + fNBeforeSet.applyPattern(UNICODE_STRING_SIMPLE("[[:lb=CR:][:lb=LF:][:lb=NL:][:lb=SP:][:lb=ZW:][:lb=IS:][:lb=BA:][:lb=NS:]]"), status); } @@ -332,10 +332,10 @@ index f1c874d..3ad1b3f 100644 + startZwsp = scanBeforeStart(text, scanStart, breakStart); + } + utext_setNativeIndex(text, rangeStart); -+ scanFwdClusters(text, rangeStart, initAfter); ++ scanFwdClusters(text, rangeEnd, initAfter); + bool endZwsp = scanAfterEnd(text, utext_nativeLength(text), scanEnd, breakEnd); + utext_setNativeIndex(text, rangeEnd - 1); -+ scanBackClusters(text, rangeEnd, finalBefore); ++ scanBackClusters(text, rangeStart, finalBefore); + if (finalBefore < initAfter) { // the whole run is tented so no breaks + if (breakStart || fTypes < UBRK_LINE) + foundBreaks.push(rangeStart, status); @@ -539,7 +539,7 @@ index f1c874d..3ad1b3f 100644 + int32_t ln = lengths.elementAti(j); + utext_setNativeIndex(text, ln+ix); + int32_t c = utext_current32(text); -+ while (fPuncSet.contains(c) || fIgnoreSet.contains(c)) { ++ while ((fPuncSet.contains(c) || fIgnoreSet.contains(c)) && ln + i < numCodePts) { + ++ln; + utext_next32(text); + c = utext_current32(text); -- cgit