20#include <com/sun/star/i18n/ScriptDirection.hpp>
21#include <com/sun/star/i18n/UnicodeScript.hpp>
29 ScriptDirection::LEFT_TO_RIGHT,
30 ScriptDirection::RIGHT_TO_LEFT,
31 ScriptDirection::LEFT_TO_RIGHT,
32 ScriptDirection::LEFT_TO_RIGHT,
33 ScriptDirection::LEFT_TO_RIGHT,
34 ScriptDirection::RIGHT_TO_LEFT,
35 ScriptDirection::NEUTRAL,
36 ScriptDirection::NEUTRAL,
37 ScriptDirection::NEUTRAL,
38 ScriptDirection::NEUTRAL,
39 ScriptDirection::NEUTRAL,
40 ScriptDirection::LEFT_TO_RIGHT,
41 ScriptDirection::LEFT_TO_RIGHT,
42 ScriptDirection::RIGHT_TO_LEFT,
43 ScriptDirection::RIGHT_TO_LEFT,
44 ScriptDirection::RIGHT_TO_LEFT,
45 ScriptDirection::NEUTRAL,
46 ScriptDirection::NEUTRAL,
47 ScriptDirection::NEUTRAL,
53 return (dir == ScriptDirection::NEUTRAL) ? defaultScriptDirection : dir;
59 sal_Int32 cPos =
nPos;
61 if (cPos <
static_cast<sal_Int32
>(
Text.size())) {
62 for (; cPos >= 0; cPos--) {
67 return cPos ==
nPos ? -1 : cPos + 1;
72 sal_Int32 cPos =
nPos;
73 sal_Int32 len =
Text.size();
76 for (; cPos < len; cPos++) {
81 return cPos ==
nPos ? -1 : cPos;
static sal_Int32 beginOfScriptDirection(std::u16string_view Text, sal_Int32 nPos, sal_Int16 scriptDirection)
static sal_Int16 getScriptDirection(std::u16string_view Text, sal_Int32 nPos, sal_Int16 defaultScriptDirection)
static sal_Int32 endOfScriptDirection(std::u16string_view Text, sal_Int32 nPos, sal_Int16 scriptDirection)
static sal_uInt8 getUnicodeDirection(const sal_Unicode ch)
const sal_Int16 scriptDirection[]