Home
last modified time | relevance | path

Searched refs:bidi (Results 1 – 25 of 79) sorted by relevance

1234

/external/pdfium/core/fxcrt/
Dfx_bidi_unittest.cpp17 CFX_BidiChar bidi; in TEST() local
20 info = bidi.GetSegmentInfo(); in TEST()
24 EXPECT_FALSE(bidi.EndChar()); in TEST()
28 CFX_BidiChar bidi; in TEST() local
31 EXPECT_TRUE(bidi.AppendChar(kLeftChar)); in TEST()
32 info = bidi.GetSegmentInfo(); in TEST()
36 EXPECT_FALSE(bidi.AppendChar(kLeftChar)); in TEST()
37 EXPECT_FALSE(bidi.AppendChar(kLeftChar)); in TEST()
39 info = bidi.GetSegmentInfo(); in TEST()
44 EXPECT_TRUE(bidi.EndChar()); in TEST()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/bidi/
DTestCompatibility.java11 package android.icu.dev.test.bidi;
30 void compareBidi(Bidi bidi, java.text.Bidi jbidi) in compareBidi() argument
32 byte paraLevel = bidi.getParaLevel(); in compareBidi()
33 if (bidi.baseIsLeftToRight() != jbidi.baseIsLeftToRight()) { in compareBidi()
36 u16ToPseudo(bidi.getTextAsString()) + in compareBidi()
37 "\n bidi: " + bidi.baseIsLeftToRight() + in compareBidi()
40 if (bidi.getBaseLevel() != jbidi.getBaseLevel()) { in compareBidi()
43 u16ToPseudo(bidi.getTextAsString()) + in compareBidi()
44 "\n bidi: " + bidi.getBaseLevel() + in compareBidi()
47 if (bidi.getLength() != jbidi.getLength()) { in compareBidi()
[all …]
DTestBidi.java11 package android.icu.dev.test.bidi;
33 Bidi bidi; in testBidi() local
37 bidi = new Bidi(MAXLEN, 0); in testBidi()
40 doTests(bidi, bidiLine, false); in testBidi()
41 doTests(bidi, bidiLine, true); in testBidi()
46 private void doTests(Bidi bidi, Bidi bidiLine, boolean countRunsFirst) { in doTests() argument
58 bidi.setPara(string, paraLevel, null); in doTests()
60 + bidi.getDirection() + " paraLevel " in doTests()
64 + bidi.getDirection() + " paraLevel " in doTests()
69 doTest(bidi, testNumber, test, 0, countRunsFirst); in doTests()
[all …]
DTestReorderingMode.java11 package android.icu.dev.test.bidi;
207 Bidi bidi = new Bidi(); in testReorderingMode() local
226 bidi.setReorderingMode(modeValue); in testReorderingMode()
227 modeBack = bidi.getReorderingMode(); in testReorderingMode()
235 bidi.setReorderingOptions(optionValue); in testReorderingMode()
236 optionBack = bidi.getReorderingOptions(); in testReorderingMode()
245 bidi.setPara(pseudoToU16(src), paraLevels[level], null); in testReorderingMode()
247 dest = bidi.writeReordered(Bidi.DO_MIRRORING); in testReorderingMode()
251 checkWhatYouCan(bidi, src, dest); in testReorderingMode()
278 if (!checkResultLength(bidi, src, dest, modeDesc, optDesc, in testReorderingMode()
[all …]
DTestInverse.java11 package android.icu.dev.test.bidi;
41 Bidi bidi; in testInverse() local
45 bidi = new Bidi(); in testInverse()
50 _testInverseBidi(bidi, testCases[i], Bidi.DIRECTION_LEFT_TO_RIGHT); in testInverse()
57 _testInverseBidi(bidi, testCases[i], Bidi.DIRECTION_RIGHT_TO_LEFT); in testInverse()
60 _testManyInverseBidi(bidi, Bidi.DIRECTION_LEFT_TO_RIGHT); in testInverse()
61 _testManyInverseBidi(bidi, Bidi.DIRECTION_RIGHT_TO_LEFT); in testInverse()
85 private void _testManyInverseBidi(Bidi bidi, int direction) { in _testManyInverseBidi() argument
104 _testInverseBidi(bidi, new String(text), direction); in _testManyInverseBidi()
110 private void _testInverseBidi(Bidi bidi, String src, int direction) { in _testInverseBidi() argument
[all …]
DTestFailureRecovery.java11 package android.icu.dev.test.bidi;
29 Bidi bidi = new Bidi(); in testFailureRecovery() local
40 bidi.setPara("abc", (byte)(-1), null); in testFailureRecovery()
53 bidi = new Bidi(); in testFailureRecovery()
55 bidi.setLine(0, 1); in testFailureRecovery()
62 bidi.getDirection(); in testFailureRecovery()
68 bidi.setPara("abc", Bidi.LTR, null); in testFailureRecovery()
70 bidi.getLevelAt(3); in testFailureRecovery()
77 bidi = new Bidi(-1, 0); in testFailureRecovery()
83 bidi = new Bidi(2, 1); in testFailureRecovery()
[all …]
DTestMultipleParagraphs.java11 package android.icu.dev.test.bidi;
88 Bidi bidi = new Bidi(); in testMultipleParagraphs() local
95 bidi.setPara(text, Bidi.LTR, null); in testMultipleParagraphs()
101 if (paraCount != (count = bidi.countParagraphs())) { in testMultipleParagraphs()
107 run = bidi.getParagraphByIndex(i); in testMultipleParagraphs()
123 bidi.setPara(src, Bidi.LTR, null); in testMultipleParagraphs()
127 if (paraCount != (count = bidi.countParagraphs())) { in testMultipleParagraphs()
132 run = bidi.getParagraphByIndex(i); in testMultipleParagraphs()
145 bidi.setPara(src, paraLevels[k], null); in testMultipleParagraphs()
150 paraIndex = bidi.getParagraphIndex(paraBounds[i]); in testMultipleParagraphs()
[all …]
DTestReorderRunsOnly.java11 package android.icu.dev.test.bidi;
118 Bidi bidi = new Bidi(); in testReorderRunsOnly() local
126 bidi.setReorderingMode(Bidi.REORDER_RUNS_ONLY); in testReorderRunsOnly()
130 bidi.setReorderingOptions(option == 0 ? Bidi.OPTION_REMOVE_CONTROLS in testReorderRunsOnly()
139 bidi.setPara(srcU16, level, null); in testReorderRunsOnly()
140 destU16 = bidi.writeReordered(Bidi.DO_MIRRORING); in testReorderRunsOnly()
142 checkWhatYouCan(bidi, src, dest); in testReorderRunsOnly()
169 bidi.setPara((String)null, Bidi.LTR, null); in testReorderRunsOnly()
170 paras = bidi.countParagraphs(); in testReorderRunsOnly()
172 bidi.setPara((char[])null, Bidi.LTR, null); in testReorderRunsOnly()
[all …]
DBidiFmwk.java11 package android.icu.dev.test.bidi;
331 void printCaseInfo(Bidi bidi, String src, String dst)
333 int length = bidi.getProcessedLength();
334 byte[] levels = bidi.getLevels();
337 int runCount = bidi.countRuns();
353 errcontln("Direction: " + bidi.getDirection());
354 errcontln("paraLevel: " + Byte.toString(bidi.getParaLevel()));
355 errcontln("reorderingMode: " + modeToString(bidi.getReorderingMode()));
356 errcontln("reorderingOptions: " + spOptionsToString(bidi.getReorderingOptions()));
360 run = bidi.getVisualRun(i);
[all …]
DTestReorder.java11 package android.icu.dev.test.bidi;
118 Bidi bidi = new Bidi(); in testReorder() local
130 bidi.setPara(srcU16, Bidi.LEVEL_DEFAULT_LTR, null); in testReorder()
136 dest = u16ToPseudo(bidi.writeReordered(Bidi.DO_MIRRORING)); in testReorder()
146 checkWhatYouCan(bidi, src, dest); in testReorder()
154 bidi.setPara(srcU16, Bidi.LEVEL_DEFAULT_LTR, null); in testReorder()
160 dest = u16ToPseudo(bidi.writeReordered(Bidi.DO_MIRRORING + in testReorder()
177 bidi.setInverse(true); in testReorder()
179 bidi.setPara(srcU16, Bidi.LEVEL_DEFAULT_LTR, null); in testReorder()
185 dest = u16ToPseudo(bidi.writeReordered(Bidi.OUTPUT_REVERSE | in testReorder()
[all …]
DTestClassOverride.java11 package android.icu.dev.test.bidi;
79 private void verifyClassifier(Bidi bidi) { in verifyClassifier() argument
80 BidiClassifier actualClassifier = bidi.getCustomClassifier(); in verifyClassifier()
103 bidi.getCustomizedClass('a')); in verifyClassifier()
119 Bidi bidi; in testClassOverride() local
123 bidi = new Bidi(); in testClassOverride()
124 verifyClassifier(bidi); in testClassOverride()
127 bidi.setCustomClassifier(classifier); in testClassOverride()
128 verifyClassifier(bidi); in testClassOverride()
131 verifyClassifier(bidi); in testClassOverride()
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/bidi/
DTestCompatibility.java10 package com.ibm.icu.dev.test.bidi;
29 void compareBidi(Bidi bidi, java.text.Bidi jbidi) in compareBidi() argument
31 byte paraLevel = bidi.getParaLevel(); in compareBidi()
32 if (bidi.baseIsLeftToRight() != jbidi.baseIsLeftToRight()) { in compareBidi()
35 u16ToPseudo(bidi.getTextAsString()) + in compareBidi()
36 "\n bidi: " + bidi.baseIsLeftToRight() + in compareBidi()
39 if (bidi.getBaseLevel() != jbidi.getBaseLevel()) { in compareBidi()
42 u16ToPseudo(bidi.getTextAsString()) + in compareBidi()
43 "\n bidi: " + bidi.getBaseLevel() + in compareBidi()
46 if (bidi.getLength() != jbidi.getLength()) { in compareBidi()
[all …]
DTestBidi.java10 package com.ibm.icu.dev.test.bidi;
32 Bidi bidi; in testBidi() local
36 bidi = new Bidi(MAXLEN, 0); in testBidi()
39 doTests(bidi, bidiLine, false); in testBidi()
40 doTests(bidi, bidiLine, true); in testBidi()
45 private void doTests(Bidi bidi, Bidi bidiLine, boolean countRunsFirst) { in doTests() argument
57 bidi.setPara(string, paraLevel, null); in doTests()
59 + bidi.getDirection() + " paraLevel " in doTests()
63 + bidi.getDirection() + " paraLevel " in doTests()
68 doTest(bidi, testNumber, test, 0, countRunsFirst); in doTests()
[all …]
DTestReorderingMode.java10 package com.ibm.icu.dev.test.bidi;
206 Bidi bidi = new Bidi(); in testReorderingMode() local
225 bidi.setReorderingMode(modeValue); in testReorderingMode()
226 modeBack = bidi.getReorderingMode(); in testReorderingMode()
234 bidi.setReorderingOptions(optionValue); in testReorderingMode()
235 optionBack = bidi.getReorderingOptions(); in testReorderingMode()
244 bidi.setPara(pseudoToU16(src), paraLevels[level], null); in testReorderingMode()
246 dest = bidi.writeReordered(Bidi.DO_MIRRORING); in testReorderingMode()
250 checkWhatYouCan(bidi, src, dest); in testReorderingMode()
277 if (!checkResultLength(bidi, src, dest, modeDesc, optDesc, in testReorderingMode()
[all …]
DTestInverse.java10 package com.ibm.icu.dev.test.bidi;
40 Bidi bidi; in testInverse() local
44 bidi = new Bidi(); in testInverse()
49 _testInverseBidi(bidi, testCases[i], Bidi.DIRECTION_LEFT_TO_RIGHT); in testInverse()
56 _testInverseBidi(bidi, testCases[i], Bidi.DIRECTION_RIGHT_TO_LEFT); in testInverse()
59 _testManyInverseBidi(bidi, Bidi.DIRECTION_LEFT_TO_RIGHT); in testInverse()
60 _testManyInverseBidi(bidi, Bidi.DIRECTION_RIGHT_TO_LEFT); in testInverse()
84 private void _testManyInverseBidi(Bidi bidi, int direction) { in _testManyInverseBidi() argument
103 _testInverseBidi(bidi, new String(text), direction); in _testManyInverseBidi()
109 private void _testInverseBidi(Bidi bidi, String src, int direction) { in _testInverseBidi() argument
[all …]
DTestFailureRecovery.java10 package com.ibm.icu.dev.test.bidi;
28 Bidi bidi = new Bidi(); in testFailureRecovery() local
39 bidi.setPara("abc", (byte)(-1), null); in testFailureRecovery()
52 bidi = new Bidi(); in testFailureRecovery()
54 bidi.setLine(0, 1); in testFailureRecovery()
61 bidi.getDirection(); in testFailureRecovery()
67 bidi.setPara("abc", Bidi.LTR, null); in testFailureRecovery()
69 bidi.getLevelAt(3); in testFailureRecovery()
76 bidi = new Bidi(-1, 0); in testFailureRecovery()
82 bidi = new Bidi(2, 1); in testFailureRecovery()
[all …]
DTestMultipleParagraphs.java10 package com.ibm.icu.dev.test.bidi;
87 Bidi bidi = new Bidi(); in testMultipleParagraphs() local
94 bidi.setPara(text, Bidi.LTR, null); in testMultipleParagraphs()
100 if (paraCount != (count = bidi.countParagraphs())) { in testMultipleParagraphs()
106 run = bidi.getParagraphByIndex(i); in testMultipleParagraphs()
122 bidi.setPara(src, Bidi.LTR, null); in testMultipleParagraphs()
126 if (paraCount != (count = bidi.countParagraphs())) { in testMultipleParagraphs()
131 run = bidi.getParagraphByIndex(i); in testMultipleParagraphs()
144 bidi.setPara(src, paraLevels[k], null); in testMultipleParagraphs()
149 paraIndex = bidi.getParagraphIndex(paraBounds[i]); in testMultipleParagraphs()
[all …]
DTestReorderRunsOnly.java10 package com.ibm.icu.dev.test.bidi;
117 Bidi bidi = new Bidi(); in testReorderRunsOnly() local
125 bidi.setReorderingMode(Bidi.REORDER_RUNS_ONLY); in testReorderRunsOnly()
129 bidi.setReorderingOptions(option == 0 ? Bidi.OPTION_REMOVE_CONTROLS in testReorderRunsOnly()
138 bidi.setPara(srcU16, level, null); in testReorderRunsOnly()
139 destU16 = bidi.writeReordered(Bidi.DO_MIRRORING); in testReorderRunsOnly()
141 checkWhatYouCan(bidi, src, dest); in testReorderRunsOnly()
168 bidi.setPara((String)null, Bidi.LTR, null); in testReorderRunsOnly()
169 paras = bidi.countParagraphs(); in testReorderRunsOnly()
171 bidi.setPara((char[])null, Bidi.LTR, null); in testReorderRunsOnly()
[all …]
DBidiFmwk.java10 package com.ibm.icu.dev.test.bidi;
330 void printCaseInfo(Bidi bidi, String src, String dst)
332 int length = bidi.getProcessedLength();
333 byte[] levels = bidi.getLevels();
336 int runCount = bidi.countRuns();
352 errcontln("Direction: " + bidi.getDirection());
353 errcontln("paraLevel: " + Byte.toString(bidi.getParaLevel()));
354 errcontln("reorderingMode: " + modeToString(bidi.getReorderingMode()));
355 errcontln("reorderingOptions: " + spOptionsToString(bidi.getReorderingOptions()));
359 run = bidi.getVisualRun(i);
[all …]
DTestReorder.java10 package com.ibm.icu.dev.test.bidi;
117 Bidi bidi = new Bidi(); in testReorder() local
129 bidi.setPara(srcU16, Bidi.LEVEL_DEFAULT_LTR, null); in testReorder()
135 dest = u16ToPseudo(bidi.writeReordered(Bidi.DO_MIRRORING)); in testReorder()
145 checkWhatYouCan(bidi, src, dest); in testReorder()
153 bidi.setPara(srcU16, Bidi.LEVEL_DEFAULT_LTR, null); in testReorder()
159 dest = u16ToPseudo(bidi.writeReordered(Bidi.DO_MIRRORING + in testReorder()
176 bidi.setInverse(true); in testReorder()
178 bidi.setPara(srcU16, Bidi.LEVEL_DEFAULT_LTR, null); in testReorder()
184 dest = u16ToPseudo(bidi.writeReordered(Bidi.OUTPUT_REVERSE | in testReorder()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DBidiLine.java85 static void setTrailingWSStart(Bidi bidi) in setTrailingWSStart() argument
87 byte[] dirProps = bidi.dirProps; in setTrailingWSStart()
88 byte[] levels = bidi.levels; in setTrailingWSStart()
89 int start = bidi.length; in setTrailingWSStart()
90 byte paraLevel = bidi.paraLevel; in setTrailingWSStart()
99 bidi.trailingWSStart = start; /* currently == bidi.length */ in setTrailingWSStart()
113 bidi.trailingWSStart=start; in setTrailingWSStart()
239 static byte getLevelAt(Bidi bidi, int charIndex) in getLevelAt() argument
242 if (bidi.direction != Bidi.MIXED || charIndex >= bidi.trailingWSStart) { in getLevelAt()
243 return bidi.GetParaLevelAt(charIndex); in getLevelAt()
[all …]
DBidiWriter.java238 static String writeReordered(Bidi bidi, int options) in writeReordered() argument
242 char[] text = bidi.text; in writeReordered()
243 runCount = bidi.countRuns(); in writeReordered()
249 if ((bidi.reorderingOptions & Bidi.OPTION_INSERT_MARKS) != 0) { in writeReordered()
257 if ((bidi.reorderingOptions & Bidi.OPTION_REMOVE_CONTROLS) != 0) { in writeReordered()
265 if ((bidi.reorderingMode != Bidi.REORDER_INVERSE_NUMBERS_AS_L) && in writeReordered()
266 (bidi.reorderingMode != Bidi.REORDER_INVERSE_LIKE_DIRECT) && in writeReordered()
267 (bidi.reorderingMode != Bidi.REORDER_INVERSE_FOR_NUMBERS_SPECIAL) && in writeReordered()
268 (bidi.reorderingMode != Bidi.REORDER_RUNS_ONLY)) { in writeReordered()
272 bidi.length * 2 : bidi.length); in writeReordered()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/text/
DBidiLine.java86 static void setTrailingWSStart(Bidi bidi) in setTrailingWSStart() argument
88 byte[] dirProps = bidi.dirProps; in setTrailingWSStart()
89 byte[] levels = bidi.levels; in setTrailingWSStart()
90 int start = bidi.length; in setTrailingWSStart()
91 byte paraLevel = bidi.paraLevel; in setTrailingWSStart()
100 bidi.trailingWSStart = start; /* currently == bidi.length */ in setTrailingWSStart()
114 bidi.trailingWSStart=start; in setTrailingWSStart()
240 static byte getLevelAt(Bidi bidi, int charIndex) in getLevelAt() argument
243 if (bidi.direction != Bidi.MIXED || charIndex >= bidi.trailingWSStart) { in getLevelAt()
244 return bidi.GetParaLevelAt(charIndex); in getLevelAt()
[all …]
DBidiWriter.java239 static String writeReordered(Bidi bidi, int options) in writeReordered() argument
243 char[] text = bidi.text; in writeReordered()
244 runCount = bidi.countRuns(); in writeReordered()
250 if ((bidi.reorderingOptions & Bidi.OPTION_INSERT_MARKS) != 0) { in writeReordered()
258 if ((bidi.reorderingOptions & Bidi.OPTION_REMOVE_CONTROLS) != 0) { in writeReordered()
266 if ((bidi.reorderingMode != Bidi.REORDER_INVERSE_NUMBERS_AS_L) && in writeReordered()
267 (bidi.reorderingMode != Bidi.REORDER_INVERSE_LIKE_DIRECT) && in writeReordered()
268 (bidi.reorderingMode != Bidi.REORDER_INVERSE_FOR_NUMBERS_SPECIAL) && in writeReordered()
269 (bidi.reorderingMode != Bidi.REORDER_RUNS_ONLY)) { in writeReordered()
273 bidi.length * 2 : bidi.length); in writeReordered()
[all …]
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/
DBidi.java424 private java.text.Bidi bidi; field in Bidi
427 this.bidi = delegate; in Bidi()
1433 return bidi.getLength(); in getLength()
1734 return (byte)bidi.getLevelAt(charIndex); in getLevelAt()
2283 return new Bidi(bidi.createLineBidi(lineStart, lineLimit)); in createLineBidi()
2299 return bidi.isMixed(); in isMixed()
2315 return bidi.isLeftToRight(); in isLeftToRight()
2331 return bidi.isRightToLeft(); in isRightToLeft()
2346 return bidi.baseIsLeftToRight(); in baseIsLeftToRight()
2361 return bidi.getBaseLevel(); in getBaseLevel()
[all …]

1234