From 91e47d74d32fccf878c11ec500e49cba58a54f6b Mon Sep 17 00:00:00 2001 From: Doug Felt Date: Thu, 11 Mar 2004 19:56:02 +0000 Subject: [PATCH] ICU-3215 bidi should respect explicitly set base line direction X-SVN-Rev: 14688 --- icu4c/source/common/ubidi.c | 2 ++ icu4c/source/test/cintltst/cbididat.c | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/icu4c/source/common/ubidi.c b/icu4c/source/common/ubidi.c index 2a098c3b9be..562a90e843c 100644 --- a/icu4c/source/common/ubidi.c +++ b/icu4c/source/common/ubidi.c @@ -305,6 +305,8 @@ getDirProps(UBiDi *pBiDi, const UChar *text) { break; } } + } else { + flags|=DIRPROP_FLAG_LR(pBiDi->paraLevel); } /* get the rest of the directional properties and the flags bits */ diff --git a/icu4c/source/test/cintltst/cbididat.c b/icu4c/source/test/cintltst/cbididat.c index d8e4627d312..0ef3c0c4ac2 100644 --- a/icu4c/source/test/cintltst/cbididat.c +++ b/icu4c/source/test/cintltst/cbididat.c @@ -343,6 +343,21 @@ testVisualMap21[]={ 6, 5, 4, 3, 2, 1, 0, 7 }; +static const uint8_t +testTextXX[]={ + L +}; + +static const UBiDiLevel +testLevelsXX[]={ + 2 +}; + +static const uint8_t +testVisualMapXX[]={ + 0 +}; + BiDiTestData tests[]={ {testText1, ARRAY_LENGTH(testText1), UBIDI_DEFAULT_LTR, -1, -1, @@ -410,7 +425,9 @@ tests[]={ testLevels21, testVisualMap20}, {testText17, ARRAY_LENGTH(testText17), UBIDI_LTR, 0, 8, UBIDI_MIXED, 0, - testLevels22, testVisualMap21} + testLevels22, testVisualMap21}, + {testTextXX, ARRAY_LENGTH(testTextXX), UBIDI_RTL, -1, -1, + UBIDI_MIXED, 1, testLevelsXX, testVisualMapXX} }; int