#include "xfa/fgas/layout/cfgas_rtfbreak.h"
#include <algorithm>
#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_extension.h"
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxcrt/numerics/safe_math.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/cfgas_textpiece.h"
#include "xfa/fgas/layout/cfgas_textuserdata.h"
#include "xfa/fgas/layout/fgas_arabic.h"
#include "xfa/fgas/layout/fgas_linebreak.h"
CFGAS_RTFBreak::CFGAS_RTFBreak(Mask<LayoutStyle> dwLayoutStyles)
: … { … }
CFGAS_RTFBreak::~CFGAS_RTFBreak() = default;
void CFGAS_RTFBreak::SetLineStartPos(float fLinePos) { … }
void CFGAS_RTFBreak::AddPositionedTab(float fTabPos) { … }
void CFGAS_RTFBreak::SetUserData(
const RetainPtr<CFGAS_TextUserData>& pUserData) { … }
bool CFGAS_RTFBreak::GetPositionedTab(int32_t* iTabPos) const { … }
CFGAS_Char::BreakType CFGAS_RTFBreak::AppendChar(wchar_t wch) { … }
void CFGAS_RTFBreak::AppendChar_Combination(CFGAS_Char* pCurChar) { … }
void CFGAS_RTFBreak::AppendChar_Tab(CFGAS_Char* pCurChar) { … }
CFGAS_Char::BreakType CFGAS_RTFBreak::AppendChar_Control(CFGAS_Char* pCurChar) { … }
CFGAS_Char::BreakType CFGAS_RTFBreak::AppendChar_Arabic(CFGAS_Char* pCurChar) { … }
CFGAS_Char::BreakType CFGAS_RTFBreak::AppendChar_Others(CFGAS_Char* pCurChar) { … }
CFGAS_Char::BreakType CFGAS_RTFBreak::EndBreak(CFGAS_Char::BreakType dwStatus) { … }
bool CFGAS_RTFBreak::EndBreakSplitLine(CFGAS_BreakLine* pNextLine,
bool bAllChars,
CFGAS_Char::BreakType dwStatus) { … }
std::deque<CFGAS_Break::TPO> CFGAS_RTFBreak::EndBreakBidiLine(
CFGAS_Char::BreakType dwStatus) { … }
void CFGAS_RTFBreak::EndBreakAlignment(const std::deque<TPO>& tpos,
bool bAllChars,
CFGAS_Char::BreakType dwStatus) { … }
int32_t CFGAS_RTFBreak::GetBreakPos(std::vector<CFGAS_Char>& tca,
bool bAllChars,
bool bOnlyBrk,
int32_t* pEndPos) { … }
void CFGAS_RTFBreak::SplitTextLine(CFGAS_BreakLine* pCurLine,
CFGAS_BreakLine* pNextLine,
bool bAllChars) { … }
size_t CFGAS_RTFBreak::GetDisplayPos(const CFGAS_TextPiece* pPiece,
pdfium::span<TextCharPos> pCharPos) const { … }