#include "xfa/fgas/layout/cfgas_txtbreak.h"
#include <algorithm>
#include <array>
#include "build/build_config.h"
#include "core/fxcrt/check.h"
#include "core/fxcrt/compiler_specific.h"
#include "core/fxcrt/containers/adapters.h"
#include "core/fxcrt/fx_codepage.h"
#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxcrt/numerics/safe_conversions.h"
#include "core/fxcrt/stl_util.h"
#include "core/fxge/text_char_pos.h"
#include "xfa/fgas/font/cfgas_gefont.h"
#include "xfa/fgas/layout/cfgas_char.h"
#include "xfa/fgas/layout/fgas_arabic.h"
#include "xfa/fgas/layout/fgas_linebreak.h"
namespace {
struct FX_FORMCHAR { … };
bool IsCtrlCode(wchar_t wch) { … }
}
CFGAS_TxtBreak::CFGAS_TxtBreak() : … { … }
CFGAS_TxtBreak::~CFGAS_TxtBreak() = default;
void CFGAS_TxtBreak::SetLineWidth(float fLineWidth) { … }
void CFGAS_TxtBreak::SetAlignment(int32_t iAlignment) { … }
void CFGAS_TxtBreak::SetCombWidth(float fCombWidth) { … }
void CFGAS_TxtBreak::AppendChar_Combination(CFGAS_Char* pCurChar) { … }
void CFGAS_TxtBreak::AppendChar_Tab(CFGAS_Char* pCurChar) { … }
CFGAS_Char::BreakType CFGAS_TxtBreak::AppendChar_Control(CFGAS_Char* pCurChar) { … }
CFGAS_Char::BreakType CFGAS_TxtBreak::AppendChar_Arabic(CFGAS_Char* pCurChar) { … }
CFGAS_Char::BreakType CFGAS_TxtBreak::AppendChar_Others(CFGAS_Char* pCurChar) { … }
CFGAS_Char::BreakType CFGAS_TxtBreak::AppendChar(wchar_t wch) { … }
void CFGAS_TxtBreak::EndBreakSplitLine(CFGAS_BreakLine* pNextLine,
bool bAllChars) { … }
std::deque<CFGAS_Break::TPO> CFGAS_TxtBreak::EndBreakBidiLine(
CFGAS_Char::BreakType dwStatus) { … }
void CFGAS_TxtBreak::EndBreakAlignment(const std::deque<TPO>& tpos,
bool bAllChars,
CFGAS_Char::BreakType dwStatus) { … }
CFGAS_Char::BreakType CFGAS_TxtBreak::EndBreak(CFGAS_Char::BreakType dwStatus) { … }
int32_t CFGAS_TxtBreak::GetBreakPos(std::vector<CFGAS_Char>* pChars,
bool bAllChars,
bool bOnlyBrk,
int32_t* pEndPos) { … }
void CFGAS_TxtBreak::SplitTextLine(CFGAS_BreakLine* pCurLine,
CFGAS_BreakLine* pNextLine,
bool bAllChars) { … }
size_t CFGAS_TxtBreak::GetDisplayPos(const Run& run,
pdfium::span<TextCharPos> pCharPos) const { … }
std::vector<CFX_RectF> CFGAS_TxtBreak::GetCharRects(const Run& run) const { … }
CFGAS_TxtBreak::Engine::~Engine() = default;
CFGAS_TxtBreak::Run::Run() = default;
CFGAS_TxtBreak::Run::~Run() = default;
CFGAS_TxtBreak::Run::Run(const CFGAS_TxtBreak::Run& other) = default;