#include "xfa/fgas/layout/cfgas_char.h"
#include <algorithm>
#include <array>
#include <iterator>
#include "core/fxcrt/check.h"
#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/stl_util.h"
namespace {
#if DCHECK_IS_ON()
constexpr int32_t kBidiMaxLevel = …;
#endif
#undef PACK_NIBBLES
#define PACK_NIBBLES …
enum FX_BIDIWEAKSTATE : uint8_t { … };
enum FX_BIDIWEAKACTION : uint16_t { … };
enum FX_BIDINEUTRALSTATE : uint8_t { … };
enum FX_BIDINEUTRALACTION : uint16_t { … };
#undef PACK_NIBBLES
constexpr auto kNTypes = …;
WeakStateRow;
constexpr std::array<const WeakStateRow, 20> kWeakStateTable = …;
WeakActionRow;
constexpr std::array<const WeakActionRow, 20> kWeakActionTable = …;
NeutralStateRow;
constexpr std::array<const NeutralStateRow, 6> kNeutralStateTable = …;
NeutralActionRow;
constexpr std::array<const NeutralActionRow, 6> kNeutralActionTable = …;
AddLevelRow;
constexpr std::array<const AddLevelRow, 2> kAddLevelTable = …;
FX_BIDICLASS Direction(int32_t val) { … }
FX_BIDICLASS GetDeferredType(int32_t val) { … }
FX_BIDICLASS GetResolvedType(int32_t val) { … }
FX_BIDICLASS GetDeferredNeutrals(int32_t iAction, int32_t iLevel) { … }
FX_BIDICLASS GetResolvedNeutrals(int32_t iAction) { … }
FX_BIDIWEAKSTATE GetWeakState(FX_BIDIWEAKSTATE eState, FX_BIDICLASS eClass) { … }
FX_BIDIWEAKACTION GetWeakAction(FX_BIDIWEAKSTATE eState, FX_BIDICLASS eClass) { … }
FX_BIDINEUTRALSTATE GetNeutralState(FX_BIDINEUTRALSTATE eState,
FX_BIDICLASS eClass) { … }
FX_BIDINEUTRALACTION GetNeutralAction(FX_BIDINEUTRALSTATE eState,
FX_BIDICLASS eClass) { … }
void ReverseString(std::vector<CFGAS_Char>* chars,
size_t iStart,
size_t iCount) { … }
void SetDeferredRunClass(std::vector<CFGAS_Char>* chars,
size_t iStart,
size_t iCount,
FX_BIDICLASS eValue) { … }
void SetDeferredRunLevel(std::vector<CFGAS_Char>* chars,
size_t iStart,
size_t iCount,
int32_t iValue) { … }
void Classify(std::vector<CFGAS_Char>* chars, size_t iCount) { … }
void ClassifyWithTransform(std::vector<CFGAS_Char>* chars, size_t iCount) { … }
void ResolveExplicit(std::vector<CFGAS_Char>* chars, size_t iCount) { … }
void ResolveWeak(std::vector<CFGAS_Char>* chars, size_t iCount) { … }
void ResolveNeutrals(std::vector<CFGAS_Char>* chars, size_t iCount) { … }
void ResolveImplicit(std::vector<CFGAS_Char>* chars, size_t iCount) { … }
void ResolveWhitespace(std::vector<CFGAS_Char>* chars, size_t iCount) { … }
size_t ReorderLevel(std::vector<CFGAS_Char>* chars,
size_t iCount,
int32_t iBaseLevel,
size_t iStart,
bool bReverse) { … }
void Reorder(std::vector<CFGAS_Char>* chars, size_t iCount) { … }
void Position(std::vector<CFGAS_Char>* chars, size_t iCount) { … }
}
void CFGAS_Char::BidiLine(std::vector<CFGAS_Char>* chars, size_t iCount) { … }
CFGAS_Char::CFGAS_Char(uint16_t wCharCode) : … { … }
CFGAS_Char::CFGAS_Char(uint16_t wCharCode,
int32_t iHorizontalScale,
int32_t iVerticalScale)
: … { … }
CFGAS_Char::CFGAS_Char(const CFGAS_Char& other) = default;
CFGAS_Char::~CFGAS_Char() = default;
FX_CHARTYPE CFGAS_Char::GetCharType() const { … }