summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hosken <martin_hosken@sil.org>2016-03-22 11:26:52 +0700
committerAndras Timar <andras.timar@collabora.com>2017-04-23 22:01:02 +0200
commit042586d8986429751c4c60e7bdab6efcd1dba483 (patch)
treec92a82b4260c96ebf703b6b0bf6d18fc96d5fcf7
parent3da9c44f67a0f4e8ac31ca2b64871ff58ab9c9cb (diff)
Fix wrong pattern definitions in khmer dictionary breaker
Change-Id: I0132196744046391759a6e5110d054feee3deea3 Reviewed-on: https://gerrit.libreoffice.org/23420 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Martin Hosken <martin_hosken@sil.org> (cherry picked from commit 7f36f4ce9f9f3d430009ba472d275d038abecb16) (cherry picked from commit aa4b3ec51803ade29323273668a516e7f18bdf95)
-rw-r--r--external/icu/khmerbreakengine.patch10
1 files changed, 5 insertions, 5 deletions
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);