summaryrefslogtreecommitdiff
path: root/xfa/fgas/layout
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fgas/layout')
-rw-r--r--xfa/fgas/layout/fgas_rtfbreak.cpp152
-rw-r--r--xfa/fgas/layout/fgas_rtfbreak.h36
-rw-r--r--xfa/fgas/layout/fgas_textbreak.cpp201
-rw-r--r--xfa/fgas/layout/fgas_textbreak.h52
-rw-r--r--xfa/fgas/layout/fgas_unicode.h12
5 files changed, 225 insertions, 228 deletions
diff --git a/xfa/fgas/layout/fgas_rtfbreak.cpp b/xfa/fgas/layout/fgas_rtfbreak.cpp
index dfe066f7f4..642fe73bc7 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.cpp
+++ b/xfa/fgas/layout/fgas_rtfbreak.cpp
@@ -28,7 +28,7 @@ CFX_RTFBreak::CFX_RTFBreak(uint32_t dwPolicies)
m_iFontSize(240),
m_iTabWidth(720000),
m_PositionedTabs(),
- m_bOrphanLine(FALSE),
+ m_bOrphanLine(false),
m_wDefChar(0xFEFF),
m_iDefChar(0),
m_wLineBreakChar(L'\n'),
@@ -38,9 +38,9 @@ CFX_RTFBreak::CFX_RTFBreak(uint32_t dwPolicies)
m_iCharRotation(0),
m_iRotation(0),
m_iCharSpace(0),
- m_bWordSpace(FALSE),
+ m_bWordSpace(false),
m_iWordSpace(0),
- m_bRTL(FALSE),
+ m_bRTL(false),
m_iAlignment(FX_RTFLINEALIGNMENT_Left),
m_pUserData(nullptr),
m_eCharType(FX_CHARTYPE_Unknown),
@@ -105,7 +105,7 @@ void CFX_RTFBreak::SetFont(CFGAS_GEFont* pFont) {
if (m_pFont) {
m_iFontHeight = m_iFontSize;
if (m_wDefChar != 0xFEFF) {
- m_pFont->GetCharWidth(m_wDefChar, m_iDefChar, FALSE);
+ m_pFont->GetCharWidth(m_wDefChar, m_iDefChar, false);
m_iDefChar *= m_iFontSize;
}
}
@@ -121,7 +121,7 @@ void CFX_RTFBreak::SetFontSize(FX_FLOAT fFontSize) {
if (m_pFont) {
m_iFontHeight = m_iFontSize;
if (m_wDefChar != 0xFEFF) {
- m_pFont->GetCharWidth(m_wDefChar, m_iDefChar, FALSE);
+ m_pFont->GetCharWidth(m_wDefChar, m_iDefChar, false);
m_iDefChar *= m_iFontSize;
}
}
@@ -149,7 +149,7 @@ void CFX_RTFBreak::AddPositionedTab(FX_FLOAT fTabPos) {
if (m_dwPolicies & FX_RTFBREAKPOLICY_OrphanPositionedTab) {
m_bOrphanLine = GetLastPositionedTab() >= iLineEnd;
} else {
- m_bOrphanLine = FALSE;
+ m_bOrphanLine = false;
}
}
void CFX_RTFBreak::SetPositionedTabs(const CFX_FloatArray& tabs) {
@@ -168,18 +168,18 @@ void CFX_RTFBreak::SetPositionedTabs(const CFX_FloatArray& tabs) {
if (m_dwPolicies & FX_RTFBREAKPOLICY_OrphanPositionedTab) {
m_bOrphanLine = GetLastPositionedTab() >= iLineEnd;
} else {
- m_bOrphanLine = FALSE;
+ m_bOrphanLine = false;
}
}
void CFX_RTFBreak::ClearPositionedTabs() {
m_PositionedTabs.RemoveAll();
- m_bOrphanLine = FALSE;
+ m_bOrphanLine = false;
}
void CFX_RTFBreak::SetDefaultChar(FX_WCHAR wch) {
m_wDefChar = wch;
m_iDefChar = 0;
if (m_wDefChar != 0xFEFF && m_pFont) {
- m_pFont->GetCharWidth(m_wDefChar, m_iDefChar, FALSE);
+ m_pFont->GetCharWidth(m_wDefChar, m_iDefChar, false);
if (m_iDefChar < 0) {
m_iDefChar = 0;
} else {
@@ -233,11 +233,11 @@ void CFX_RTFBreak::SetCharRotation(int32_t iCharRotation) {
void CFX_RTFBreak::SetCharSpace(FX_FLOAT fCharSpace) {
m_iCharSpace = FXSYS_round(fCharSpace * 20000.0f);
}
-void CFX_RTFBreak::SetWordSpace(FX_BOOL bDefault, FX_FLOAT fWordSpace) {
+void CFX_RTFBreak::SetWordSpace(bool bDefault, FX_FLOAT fWordSpace) {
m_bWordSpace = !bDefault;
m_iWordSpace = FXSYS_round(fWordSpace * 20000.0f);
}
-void CFX_RTFBreak::SetReadingOrder(FX_BOOL bRTL) {
+void CFX_RTFBreak::SetReadingOrder(bool bRTL) {
m_bRTL = bRTL;
}
void CFX_RTFBreak::SetAlignment(int32_t iAlignment) {
@@ -292,7 +292,7 @@ CFX_RTFChar* CFX_RTFBreak::GetLastChar(int32_t index) const {
}
return nullptr;
}
-CFX_RTFLine* CFX_RTFBreak::GetRTFLine(FX_BOOL bReady) const {
+CFX_RTFLine* CFX_RTFBreak::GetRTFLine(bool bReady) const {
if (bReady) {
if (m_iReady == 1) {
return (CFX_RTFLine*)&m_RTFLine1;
@@ -305,7 +305,7 @@ CFX_RTFLine* CFX_RTFBreak::GetRTFLine(FX_BOOL bReady) const {
ASSERT(m_pCurLine);
return m_pCurLine;
}
-CFX_RTFPieceArray* CFX_RTFBreak::GetRTFPieces(FX_BOOL bReady) const {
+CFX_RTFPieceArray* CFX_RTFBreak::GetRTFPieces(bool bReady) const {
CFX_RTFLine* pRTFLine = GetRTFLine(bReady);
return pRTFLine ? &pRTFLine->m_LinePieces : nullptr;
}
@@ -320,15 +320,15 @@ int32_t CFX_RTFBreak::GetLastPositionedTab() const {
}
return m_PositionedTabs[iCount - 1];
}
-FX_BOOL CFX_RTFBreak::GetPositionedTab(int32_t& iTabPos) const {
+bool CFX_RTFBreak::GetPositionedTab(int32_t& iTabPos) const {
int32_t iCount = m_PositionedTabs.GetSize();
for (int32_t i = 0; i < iCount; i++) {
if (m_PositionedTabs[i] > iTabPos) {
iTabPos = m_PositionedTabs[i];
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
typedef uint32_t (CFX_RTFBreak::*FX_RTFBreak_LPFAppendChar)(
CFX_RTFChar* pCurChar,
@@ -420,7 +420,7 @@ uint32_t CFX_RTFBreak::AppendChar_CharCode(FX_WCHAR wch) {
if (m_bVertical != FX_IsOdd(m_iRotation)) {
iCharWidth = 1000;
} else {
- if (!m_pFont->GetCharWidth(wch, iCharWidth, TRUE)) {
+ if (!m_pFont->GetCharWidth(wch, iCharWidth, true)) {
iCharWidth = m_iDefChar;
}
}
@@ -465,7 +465,7 @@ uint32_t CFX_RTFBreak::AppendChar_Combination(CFX_RTFChar* pCurChar,
uint32_t CFX_RTFBreak::AppendChar_Tab(CFX_RTFChar* pCurChar,
int32_t iRotation) {
if (m_dwLayoutStyles & FX_RTFLAYOUTSTYLE_ExpandTab) {
- FX_BOOL bBreak = FALSE;
+ bool bBreak = false;
if ((m_dwPolicies & FX_RTFBREAKPOLICY_TabBreak) != 0) {
bBreak = (m_pCurLine->GetLineEnd() > m_iBoundaryEnd + m_iTolerance);
}
@@ -518,7 +518,7 @@ uint32_t CFX_RTFBreak::AppendChar_Arabic(CFX_RTFChar* pCurChar,
int32_t& iLineWidth = m_pCurLine->m_iWidth;
int32_t iCharWidth = 0;
FX_WCHAR wForm;
- FX_BOOL bAlef = FALSE;
+ bool bAlef = false;
if (m_eCharType >= FX_CHARTYPE_ArabicAlef &&
m_eCharType <= FX_CHARTYPE_ArabicDistortion) {
pLastChar = GetLastChar(1);
@@ -625,7 +625,7 @@ uint32_t CFX_RTFBreak::EndBreak(uint32_t dwStatus) {
return dwStatus;
}
- CFX_RTFLine* pLastLine = GetRTFLine(TRUE);
+ CFX_RTFLine* pLastLine = GetRTFLine(true);
if (pLastLine) {
pCurPieces = &pLastLine->m_LinePieces;
iCount = pCurPieces->GetSize();
@@ -651,7 +651,7 @@ uint32_t CFX_RTFBreak::EndBreak(uint32_t dwStatus) {
m_iReady = (m_pCurLine == &m_RTFLine1) ? 1 : 2;
CFX_RTFLine* pNextLine =
(m_pCurLine == &m_RTFLine1) ? &m_RTFLine2 : &m_RTFLine1;
- FX_BOOL bAllChars = (m_iAlignment > FX_RTFLINEALIGNMENT_Right);
+ bool bAllChars = (m_iAlignment > FX_RTFLINEALIGNMENT_Right);
CFX_TPOArray tpos(100);
if (!EndBreak_SplitLine(pNextLine, bAllChars, dwStatus)) {
if (!m_bCharCode)
@@ -668,10 +668,10 @@ uint32_t CFX_RTFBreak::EndBreak(uint32_t dwStatus) {
return dwStatus;
}
-FX_BOOL CFX_RTFBreak::EndBreak_SplitLine(CFX_RTFLine* pNextLine,
- FX_BOOL bAllChars,
- uint32_t dwStatus) {
- FX_BOOL bDone = FALSE;
+bool CFX_RTFBreak::EndBreak_SplitLine(CFX_RTFLine* pNextLine,
+ bool bAllChars,
+ uint32_t dwStatus) {
+ bool bDone = false;
if (!m_bSingleLine && !m_bOrphanLine &&
m_pCurLine->GetLineEnd() > m_iBoundaryEnd + m_iTolerance) {
CFX_RTFChar& tc = m_pCurLine->GetChar(m_pCurLine->CountChars() - 1);
@@ -679,7 +679,7 @@ FX_BOOL CFX_RTFBreak::EndBreak_SplitLine(CFX_RTFLine* pNextLine,
case FX_CHARTYPE_Tab:
if ((m_dwPolicies & FX_RTFBREAKPOLICY_TabBreak) != 0) {
SplitTextLine(m_pCurLine, pNextLine, !m_bPagination && bAllChars);
- bDone = TRUE;
+ bDone = true;
}
break;
case FX_CHARTYPE_Control:
@@ -687,12 +687,12 @@ FX_BOOL CFX_RTFBreak::EndBreak_SplitLine(CFX_RTFLine* pNextLine,
case FX_CHARTYPE_Space:
if ((m_dwPolicies & FX_RTFBREAKPOLICY_SpaceBreak) != 0) {
SplitTextLine(m_pCurLine, pNextLine, !m_bPagination && bAllChars);
- bDone = TRUE;
+ bDone = true;
}
break;
default:
SplitTextLine(m_pCurLine, pNextLine, !m_bPagination && bAllChars);
- bDone = TRUE;
+ bDone = true;
break;
}
}
@@ -702,7 +702,7 @@ FX_BOOL CFX_RTFBreak::EndBreak_SplitLine(CFX_RTFLine* pNextLine,
CFX_RTFPieceArray* pCurPieces = &m_pCurLine->m_LinePieces;
CFX_RTFPiece tp;
tp.m_pChars = &m_pCurLine->m_LineChars;
- FX_BOOL bNew = TRUE;
+ bool bNew = true;
uint32_t dwIdentity = (uint32_t)-1;
int32_t iLast = m_pCurLine->CountChars() - 1, j = 0;
for (int32_t i = 0; i <= iLast;) {
@@ -721,7 +721,7 @@ FX_BOOL CFX_RTFBreak::EndBreak_SplitLine(CFX_RTFLine* pNextLine,
tp.m_dwIdentity = dwIdentity;
tp.m_pUserData = pTC->m_pUserData;
j = i;
- bNew = FALSE;
+ bNew = false;
}
if (i == iLast || pTC->m_dwStatus != FX_RTFBREAK_None ||
pTC->m_dwIdentity != dwIdentity) {
@@ -733,19 +733,19 @@ FX_BOOL CFX_RTFBreak::EndBreak_SplitLine(CFX_RTFLine* pNextLine,
i++;
}
pCurPieces->Add(tp);
- bNew = TRUE;
+ bNew = true;
} else {
tp.m_iWidth += pTC->m_iCharWidth;
i++;
}
}
- return TRUE;
+ return true;
}
if (bAllChars && !bDone) {
int32_t iEndPos = m_pCurLine->GetLineEnd();
- GetBreakPos(m_pCurLine->m_LineChars, iEndPos, bAllChars, TRUE);
+ GetBreakPos(m_pCurLine->m_LineChars, iEndPos, bAllChars, true);
}
- return FALSE;
+ return false;
}
void CFX_RTFBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus) {
FX_TPO tpo;
@@ -754,8 +754,8 @@ void CFX_RTFBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus) {
int32_t i, j;
CFX_RTFCharArray& chars = m_pCurLine->m_LineChars;
int32_t iCount = m_pCurLine->CountChars();
- FX_BOOL bDone = (!m_bPagination && !m_bCharCode &&
- (m_pCurLine->m_iArabicChars > 0 || m_bRTL));
+ bool bDone = (!m_bPagination && !m_bCharCode &&
+ (m_pCurLine->m_iArabicChars > 0 || m_bRTL));
if (bDone) {
int32_t iBidiNum = 0;
for (i = 0; i < iCount; i++) {
@@ -844,12 +844,12 @@ void CFX_RTFBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus) {
}
}
void CFX_RTFBreak::EndBreak_Alignment(CFX_TPOArray& tpos,
- FX_BOOL bAllChars,
+ bool bAllChars,
uint32_t dwStatus) {
CFX_RTFPieceArray* pCurPieces = &m_pCurLine->m_LinePieces;
int32_t iNetWidth = m_pCurLine->m_iWidth, iGapChars = 0, iCharWidth;
int32_t iCount = pCurPieces->GetSize();
- FX_BOOL bFind = FALSE;
+ bool bFind = false;
uint32_t dwCharType;
int32_t i, j;
FX_TPO tpo;
@@ -859,7 +859,7 @@ void CFX_RTFBreak::EndBreak_Alignment(CFX_TPOArray& tpos,
if (!bFind) {
iNetWidth = ttp.GetEndPos();
}
- FX_BOOL bArabic = FX_IsOdd(ttp.m_iBidiLevel);
+ bool bArabic = FX_IsOdd(ttp.m_iBidiLevel);
j = bArabic ? 0 : ttp.m_iChars - 1;
while (j > -1 && j < ttp.m_iChars) {
const CFX_RTFChar& tc = ttp.GetChar(j);
@@ -877,7 +877,7 @@ void CFX_RTFBreak::EndBreak_Alignment(CFX_TPOArray& tpos,
}
}
} else {
- bFind = TRUE;
+ bFind = true;
if (!bAllChars) {
break;
}
@@ -936,8 +936,8 @@ void CFX_RTFBreak::EndBreak_Alignment(CFX_TPOArray& tpos,
int32_t CFX_RTFBreak::GetBreakPos(CFX_RTFCharArray& tca,
int32_t& iEndPos,
- FX_BOOL bAllChars,
- FX_BOOL bOnlyBrk) {
+ bool bAllChars,
+ bool bOnlyBrk) {
int32_t iLength = tca.GetSize() - 1;
if (iLength < 1)
return iLength;
@@ -966,10 +966,10 @@ int32_t CFX_RTFBreak::GetBreakPos(CFX_RTFCharArray& tca,
}
return iLength;
}
- FX_BOOL bSpaceBreak = (m_dwPolicies & FX_RTFBREAKPOLICY_SpaceBreak) != 0;
- FX_BOOL bTabBreak = (m_dwPolicies & FX_RTFBREAKPOLICY_TabBreak) != 0;
- FX_BOOL bNumberBreak = (m_dwPolicies & FX_RTFBREAKPOLICY_NumberBreak) != 0;
- FX_BOOL bInfixBreak = (m_dwPolicies & FX_RTFBREAKPOLICY_InfixBreak) != 0;
+ bool bSpaceBreak = (m_dwPolicies & FX_RTFBREAKPOLICY_SpaceBreak) != 0;
+ bool bTabBreak = (m_dwPolicies & FX_RTFBREAKPOLICY_TabBreak) != 0;
+ bool bNumberBreak = (m_dwPolicies & FX_RTFBREAKPOLICY_NumberBreak) != 0;
+ bool bInfixBreak = (m_dwPolicies & FX_RTFBREAKPOLICY_InfixBreak) != 0;
FX_LINEBREAKTYPE eType;
uint32_t nCodeProp, nCur, nNext;
CFX_RTFChar* pCur = pCharArray + iLength--;
@@ -986,7 +986,7 @@ int32_t CFX_RTFBreak::GetBreakPos(CFX_RTFCharArray& tca,
pCur = pCharArray + iLength;
nCodeProp = pCur->m_dwCharProps;
nCur = nCodeProp & 0x003F;
- FX_BOOL bNeedBreak = FALSE;
+ bool bNeedBreak = false;
if (nCur == FX_CBP_SP) {
bNeedBreak = !bSpaceBreak;
if (nNext == FX_CBP_SP) {
@@ -1016,7 +1016,7 @@ int32_t CFX_RTFBreak::GetBreakPos(CFX_RTFCharArray& tca,
}
if (!bOnlyBrk) {
iCharWidth = pCur->m_iCharWidth;
- FX_BOOL bBreak = FALSE;
+ bool bBreak = false;
if (nCur == FX_CBP_TB && bTabBreak) {
bBreak = iCharWidth > 0 && iEndPos - iCharWidth <= m_iBoundaryEnd;
} else {
@@ -1065,7 +1065,7 @@ int32_t CFX_RTFBreak::GetBreakPos(CFX_RTFCharArray& tca,
void CFX_RTFBreak::SplitTextLine(CFX_RTFLine* pCurLine,
CFX_RTFLine* pNextLine,
- FX_BOOL bAllChars) {
+ bool bAllChars) {
ASSERT(pCurLine && pNextLine);
int32_t iCount = pCurLine->CountChars();
if (iCount < 2) {
@@ -1073,13 +1073,13 @@ void CFX_RTFBreak::SplitTextLine(CFX_RTFLine* pCurLine,
}
int32_t iEndPos = pCurLine->GetLineEnd();
CFX_RTFCharArray& curChars = pCurLine->m_LineChars;
- int32_t iCharPos = GetBreakPos(curChars, iEndPos, bAllChars, FALSE);
+ int32_t iCharPos = GetBreakPos(curChars, iEndPos, bAllChars, false);
if (iCharPos < 0) {
iCharPos = 0;
}
iCharPos++;
if (iCharPos >= iCount) {
- pNextLine->RemoveAll(TRUE);
+ pNextLine->RemoveAll(true);
CFX_Char* pTC = curChars.GetDataPtr(iCharPos - 1);
pTC->m_nBreakType = FX_LBT_UNKNOWN;
return;
@@ -1113,12 +1113,12 @@ void CFX_RTFBreak::SplitTextLine(CFX_RTFLine* pCurLine,
}
int32_t CFX_RTFBreak::CountBreakPieces() const {
- CFX_RTFPieceArray* pRTFPieces = GetRTFPieces(TRUE);
+ CFX_RTFPieceArray* pRTFPieces = GetRTFPieces(true);
return pRTFPieces ? pRTFPieces->GetSize() : 0;
}
const CFX_RTFPiece* CFX_RTFBreak::GetBreakPiece(int32_t index) const {
- CFX_RTFPieceArray* pRTFPieces = GetRTFPieces(TRUE);
+ CFX_RTFPieceArray* pRTFPieces = GetRTFPieces(true);
if (!pRTFPieces)
return nullptr;
@@ -1130,7 +1130,7 @@ const CFX_RTFPiece* CFX_RTFBreak::GetBreakPiece(int32_t index) const {
void CFX_RTFBreak::GetLineRect(CFX_RectF& rect) const {
rect.top = 0;
- CFX_RTFLine* pRTFLine = GetRTFLine(TRUE);
+ CFX_RTFLine* pRTFLine = GetRTFLine(true);
if (!pRTFLine) {
rect.left = ((FX_FLOAT)m_iBoundaryStart) / 20000.0f;
rect.width = rect.height = 0;
@@ -1160,20 +1160,20 @@ void CFX_RTFBreak::GetLineRect(CFX_RectF& rect) const {
rect.height = ((FX_FLOAT)iLineHeight) / 20.0f;
}
void CFX_RTFBreak::ClearBreakPieces() {
- CFX_RTFLine* pRTFLine = GetRTFLine(TRUE);
+ CFX_RTFLine* pRTFLine = GetRTFLine(true);
if (pRTFLine) {
- pRTFLine->RemoveAll(TRUE);
+ pRTFLine->RemoveAll(true);
}
m_iReady = 0;
}
void CFX_RTFBreak::Reset() {
m_eCharType = FX_CHARTYPE_Unknown;
- m_RTFLine1.RemoveAll(TRUE);
- m_RTFLine2.RemoveAll(TRUE);
+ m_RTFLine1.RemoveAll(true);
+ m_RTFLine2.RemoveAll(true);
}
int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
FXTEXT_CHARPOS* pCharPos,
- FX_BOOL bCharCode,
+ bool bCharCode,
CFX_WideString* pWSForms,
FX_AdjustCharDisplayPos pAdjustPos) const {
if (!pText || pText->iLength < 1) {
@@ -1186,7 +1186,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
CFGAS_GEFont* pFont = pText->pFont;
uint32_t dwStyles = pText->dwLayoutStyles;
CFX_RectF rtText(*pText->pRect);
- FX_BOOL bRTLPiece = FX_IsOdd(pText->iBidiLevel);
+ bool bRTLPiece = FX_IsOdd(pText->iBidiLevel);
FX_FLOAT fFontSize = pText->fFontSize;
int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
int32_t iAscent = pFont->GetAscent();
@@ -1195,10 +1195,10 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
FX_FLOAT fFontHeight = fFontSize;
FX_FLOAT fAscent = fFontHeight * (FX_FLOAT)iAscent / (FX_FLOAT)iMaxHeight;
FX_FLOAT fDescent = fFontHeight * (FX_FLOAT)iDescent / (FX_FLOAT)iMaxHeight;
- FX_BOOL bVerticalDoc = (dwStyles & FX_RTFLAYOUTSTYLE_VerticalLayout) != 0;
- FX_BOOL bVerticalChar = (dwStyles & FX_RTFLAYOUTSTYLE_VerticalChars) != 0;
- FX_BOOL bArabicNumber = (dwStyles & FX_RTFLAYOUTSTYLE_ArabicNumber) != 0;
- FX_BOOL bMBCSCode = (dwStyles & FX_RTFLAYOUTSTYLE_MBCSCode) != 0;
+ bool bVerticalDoc = (dwStyles & FX_RTFLAYOUTSTYLE_VerticalLayout) != 0;
+ bool bVerticalChar = (dwStyles & FX_RTFLAYOUTSTYLE_VerticalChars) != 0;
+ bool bArabicNumber = (dwStyles & FX_RTFLAYOUTSTYLE_ArabicNumber) != 0;
+ bool bMBCSCode = (dwStyles & FX_RTFLAYOUTSTYLE_MBCSCode) != 0;
int32_t iRotation = GetLineRotation(dwStyles) + pText->iCharRotation;
int32_t iCharRotation;
FX_WCHAR wch, wPrev = 0xFEFF, wNext, wForm;
@@ -1206,7 +1206,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
FX_FLOAT fX, fY, fCharWidth, fCharHeight;
int32_t iHorScale = pText->iHorizontalScale;
int32_t iVerScale = pText->iVerticalScale;
- FX_BOOL bEmptyChar;
+ bool bEmptyChar;
uint32_t dwProps, dwCharType;
fX = rtText.left;
fY = rtText.top;
@@ -1245,7 +1245,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
bEmptyChar = (dwCharType >= FX_CHARTYPE_Tab &&
dwCharType <= FX_CHARTYPE_Control);
} else {
- bEmptyChar = FALSE;
+ bEmptyChar = false;
}
if (!bEmptyChar) {
iCount++;
@@ -1312,7 +1312,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
}
if (!bEmptyChar) {
CFX_PointF ptOffset;
- FX_BOOL bAdjusted = FALSE;
+ bool bAdjusted = false;
if (pAdjustPos) {
bAdjusted = pAdjustPos(wForm, bMBCSCode, pFont, fFontSize,
bVerticalChar, ptOffset);
@@ -1336,7 +1336,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
}
}
if (!bEmptyChar) {
- pCharPos->m_bGlyphAdjust = TRUE;
+ pCharPos->m_bGlyphAdjust = true;
if (bVerticalDoc) {
if (iCharRotation == 0) {
pCharPos->m_AdjustMatrix[0] = -1;
@@ -1417,7 +1417,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
}
int32_t CFX_RTFBreak::GetCharRects(const FX_RTFTEXTOBJ* pText,
CFX_RectFArray& rtArray,
- FX_BOOL bCharBBox) const {
+ bool bCharBBox) const {
if (!pText || pText->iLength < 1) {
return 0;
}
@@ -1426,13 +1426,13 @@ int32_t CFX_RTFBreak::GetCharRects(const FX_RTFTEXTOBJ* pText,
int32_t* pWidths = pText->pWidths;
int32_t iLength = pText->iLength;
CFX_RectF rect(*pText->pRect);
- FX_BOOL bRTLPiece = FX_IsOdd(pText->iBidiLevel);
+ bool bRTLPiece = FX_IsOdd(pText->iBidiLevel);
FX_FLOAT fFontSize = pText->fFontSize;
int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
FX_FLOAT fScale = fFontSize / 1000.0f;
CFGAS_GEFont* pFont = pText->pFont;
if (!pFont) {
- bCharBBox = FALSE;
+ bCharBBox = false;
}
CFX_Rect bbox;
bbox.Set(0, 0, 0, 0);
@@ -1444,9 +1444,9 @@ int32_t CFX_RTFBreak::GetCharRects(const FX_RTFTEXTOBJ* pText,
rtArray.RemoveAll();
rtArray.SetSize(iLength);
uint32_t dwStyles = pText->dwLayoutStyles;
- FX_BOOL bVertical = (dwStyles & FX_RTFLAYOUTSTYLE_VerticalLayout) != 0;
- FX_BOOL bSingleLine = (dwStyles & FX_RTFLAYOUTSTYLE_SingleLine) != 0;
- FX_BOOL bCombText = (dwStyles & FX_TXTLAYOUTSTYLE_CombText) != 0;
+ bool bVertical = (dwStyles & FX_RTFLAYOUTSTYLE_VerticalLayout) != 0;
+ bool bSingleLine = (dwStyles & FX_RTFLAYOUTSTYLE_SingleLine) != 0;
+ bool bCombText = (dwStyles & FX_TXTLAYOUTSTYLE_CombText) != 0;
FX_WCHAR wch, wLineBreakChar = pText->wLineBreakChar;
int32_t iCharSize;
FX_FLOAT fCharSize, fStart;
@@ -1459,10 +1459,10 @@ int32_t CFX_RTFBreak::GetCharRects(const FX_RTFTEXTOBJ* pText,
wch = *pStr++;
iCharSize = *pWidths++;
fCharSize = (FX_FLOAT)iCharSize / 20000.0f;
- FX_BOOL bRet = (!bSingleLine && FX_IsCtrlCode(wch));
+ bool bRet = (!bSingleLine && FX_IsCtrlCode(wch));
if (!(wch == L'\v' || wch == L'\f' || wch == 0x2028 || wch == 0x2029 ||
(wLineBreakChar != 0xFEFF && wch == wLineBreakChar))) {
- bRet = FALSE;
+ bRet = false;
}
if (bRet) {
iCharSize = iFontSize * 500;
diff --git a/xfa/fgas/layout/fgas_rtfbreak.h b/xfa/fgas/layout/fgas_rtfbreak.h
index 3b8551b72c..d75bbc1d31 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.h
+++ b/xfa/fgas/layout/fgas_rtfbreak.h
@@ -188,7 +188,7 @@ class CFX_RTFLine {
return m_LinePieces.GetPtrAt(index);
}
int32_t GetLineEnd() const { return m_iStart + m_iWidth; }
- void RemoveAll(FX_BOOL bLeaveMemory = FALSE) {
+ void RemoveAll(bool bLeaveMemory = false) {
CFX_RTFChar* pChar;
int32_t iCount = m_LineChars.GetSize();
for (int32_t i = 0; i < iCount; i++) {
@@ -233,8 +233,8 @@ class CFX_RTFBreak {
void SetVerticalScale(int32_t iScale);
void SetCharRotation(int32_t iCharRotation);
void SetCharSpace(FX_FLOAT fCharSpace);
- void SetWordSpace(FX_BOOL bDefault, FX_FLOAT fWordSpace);
- void SetReadingOrder(FX_BOOL bRTL = FALSE);
+ void SetWordSpace(bool bDefault, FX_FLOAT fWordSpace);
+ void SetReadingOrder(bool bRTL = false);
void SetAlignment(int32_t iAlignment = FX_RTFLINEALIGNMENT_Left);
void SetUserData(IFX_Retainable* pUserData);
uint32_t AppendChar(FX_WCHAR wch);
@@ -246,12 +246,12 @@ class CFX_RTFBreak {
void Reset();
int32_t GetDisplayPos(const FX_RTFTEXTOBJ* pText,
FXTEXT_CHARPOS* pCharPos,
- FX_BOOL bCharCode = FALSE,
+ bool bCharCode = false,
CFX_WideString* pWSForms = nullptr,
FX_AdjustCharDisplayPos pAdjustPos = nullptr) const;
int32_t GetCharRects(const FX_RTFTEXTOBJ* pText,
CFX_RectFArray& rtArray,
- FX_BOOL bCharBBox = FALSE) const;
+ bool bCharBBox = false) const;
uint32_t AppendChar_CharCode(FX_WCHAR wch);
uint32_t AppendChar_Combination(CFX_RTFChar* pCurChar, int32_t iRotation);
uint32_t AppendChar_Tab(CFX_RTFChar* pCurChar, int32_t iRotation);
@@ -263,25 +263,25 @@ class CFX_RTFBreak {
int32_t GetLineRotation(uint32_t dwStyles) const;
void SetBreakStatus();
CFX_RTFChar* GetLastChar(int32_t index) const;
- CFX_RTFLine* GetRTFLine(FX_BOOL bReady) const;
- CFX_RTFPieceArray* GetRTFPieces(FX_BOOL bReady) const;
+ CFX_RTFLine* GetRTFLine(bool bReady) const;
+ CFX_RTFPieceArray* GetRTFPieces(bool bReady) const;
FX_CHARTYPE GetUnifiedCharType(FX_CHARTYPE chartype) const;
int32_t GetLastPositionedTab() const;
- FX_BOOL GetPositionedTab(int32_t& iTabPos) const;
+ bool GetPositionedTab(int32_t& iTabPos) const;
int32_t GetBreakPos(CFX_RTFCharArray& tca,
int32_t& iEndPos,
- FX_BOOL bAllChars = FALSE,
- FX_BOOL bOnlyBrk = FALSE);
+ bool bAllChars = false,
+ bool bOnlyBrk = false);
void SplitTextLine(CFX_RTFLine* pCurLine,
CFX_RTFLine* pNextLine,
- FX_BOOL bAllChars = FALSE);
- FX_BOOL EndBreak_SplitLine(CFX_RTFLine* pNextLine,
- FX_BOOL bAllChars,
- uint32_t dwStatus);
+ bool bAllChars = false);
+ bool EndBreak_SplitLine(CFX_RTFLine* pNextLine,
+ bool bAllChars,
+ uint32_t dwStatus);
void EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus);
void EndBreak_Alignment(CFX_TPOArray& tpos,
- FX_BOOL bAllChars,
+ bool bAllChars,
uint32_t dwStatus);
uint32_t m_dwPolicies;
@@ -297,7 +297,7 @@ class CFX_RTFBreak {
int32_t m_iFontSize;
int32_t m_iTabWidth;
CFX_Int32Array m_PositionedTabs;
- FX_BOOL m_bOrphanLine;
+ bool m_bOrphanLine;
FX_WCHAR m_wDefChar;
int32_t m_iDefChar;
FX_WCHAR m_wLineBreakChar;
@@ -307,9 +307,9 @@ class CFX_RTFBreak {
int32_t m_iCharRotation;
int32_t m_iRotation;
int32_t m_iCharSpace;
- FX_BOOL m_bWordSpace;
+ bool m_bWordSpace;
int32_t m_iWordSpace;
- FX_BOOL m_bRTL;
+ bool m_bRTL;
int32_t m_iAlignment;
IFX_Retainable* m_pUserData;
FX_CHARTYPE m_eCharType;
diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp
index d9a0e22e8b..4551809463 100644
--- a/xfa/fgas/layout/fgas_textbreak.cpp
+++ b/xfa/fgas/layout/fgas_textbreak.cpp
@@ -37,17 +37,17 @@ CFX_TxtBreak::CFX_TxtBreak(uint32_t dwPolicies)
: m_dwPolicies(dwPolicies),
m_iLineWidth(2000000),
m_dwLayoutStyles(0),
- m_bVertical(FALSE),
- m_bArabicContext(FALSE),
- m_bArabicShapes(FALSE),
- m_bRTL(FALSE),
- m_bSingleLine(FALSE),
- m_bCombText(FALSE),
+ m_bVertical(false),
+ m_bArabicContext(false),
+ m_bArabicShapes(false),
+ m_bRTL(false),
+ m_bSingleLine(false),
+ m_bCombText(false),
m_iArabicContext(1),
m_iCurArabicContext(1),
m_pFont(nullptr),
m_iFontSize(240),
- m_bEquidistant(TRUE),
+ m_bEquidistant(true),
m_iTabWidth(720000),
m_wDefChar(0xFEFF),
m_wParagBreakChar(L'\n'),
@@ -60,8 +60,8 @@ CFX_TxtBreak::CFX_TxtBreak(uint32_t dwPolicies)
m_iCombWidth(360000),
m_pUserData(nullptr),
m_eCharType(FX_CHARTYPE_Unknown),
- m_bArabicNumber(FALSE),
- m_bArabicComma(FALSE),
+ m_bArabicNumber(false),
+ m_bArabicComma(false),
m_pCurLine(nullptr),
m_iReady(0),
m_iTolerance(0),
@@ -122,7 +122,7 @@ void CFX_TxtBreak::SetFont(CFGAS_GEFont* pFont) {
m_pFont = pFont;
m_iDefChar = 0;
if (m_wDefChar != 0xFEFF && m_pFont) {
- m_pFont->GetCharWidth(m_wDefChar, m_iDefChar, FALSE);
+ m_pFont->GetCharWidth(m_wDefChar, m_iDefChar, false);
m_iDefChar *= m_iFontSize;
}
}
@@ -136,12 +136,12 @@ void CFX_TxtBreak::SetFontSize(FX_FLOAT fFontSize) {
m_iFontSize = iFontSize;
m_iDefChar = 0;
if (m_wDefChar != 0xFEFF && m_pFont) {
- m_pFont->GetCharWidth(m_wDefChar, m_iDefChar, FALSE);
+ m_pFont->GetCharWidth(m_wDefChar, m_iDefChar, false);
m_iDefChar *= m_iFontSize;
}
}
-void CFX_TxtBreak::SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant) {
+void CFX_TxtBreak::SetTabWidth(FX_FLOAT fTabWidth, bool bEquidistant) {
m_iTabWidth = FXSYS_round(fTabWidth * 20000.0f);
if (m_iTabWidth < FX_TXTBREAK_MinimumTabWidth) {
m_iTabWidth = FX_TXTBREAK_MinimumTabWidth;
@@ -153,7 +153,7 @@ void CFX_TxtBreak::SetDefaultChar(FX_WCHAR wch) {
m_wDefChar = wch;
m_iDefChar = 0;
if (m_wDefChar != 0xFEFF && m_pFont) {
- m_pFont->GetCharWidth(m_wDefChar, m_iDefChar, FALSE);
+ m_pFont->GetCharWidth(m_wDefChar, m_iDefChar, false);
if (m_iDefChar < 0) {
m_iDefChar = 0;
} else {
@@ -279,7 +279,7 @@ int32_t CFX_TxtBreak::GetLineRotation(uint32_t dwStyles) const {
return gs_FX_TxtLineRotations[(dwStyles & 0x0E) >> 1];
}
-CFX_TxtChar* CFX_TxtBreak::GetLastChar(int32_t index, FX_BOOL bOmitChar) const {
+CFX_TxtChar* CFX_TxtBreak::GetLastChar(int32_t index, bool bOmitChar) const {
CFX_TxtCharArray& ca = *m_pCurLine->m_pLineChars.get();
int32_t iCount = ca.GetSize();
if (index < 0 || index >= iCount) {
@@ -299,7 +299,7 @@ CFX_TxtChar* CFX_TxtBreak::GetLastChar(int32_t index, FX_BOOL bOmitChar) const {
return nullptr;
}
-CFX_TxtLine* CFX_TxtBreak::GetTxtLine(FX_BOOL bReady) const {
+CFX_TxtLine* CFX_TxtBreak::GetTxtLine(bool bReady) const {
if (!bReady)
return m_pCurLine;
if (m_iReady == 1)
@@ -309,7 +309,7 @@ CFX_TxtLine* CFX_TxtBreak::GetTxtLine(FX_BOOL bReady) const {
return nullptr;
}
-CFX_TxtPieceArray* CFX_TxtBreak::GetTxtPieces(FX_BOOL bReady) const {
+CFX_TxtPieceArray* CFX_TxtBreak::GetTxtPieces(bool bReady) const {
CFX_TxtLine* pTxtLine = GetTxtLine(bReady);
if (!pTxtLine) {
return nullptr;
@@ -331,7 +331,7 @@ void CFX_TxtBreak::ResetArabicContext() {
m_bArabicNumber = m_iArabicContext >= 1 && m_bArabicShapes;
} else {
if (m_bPagination) {
- m_bCurRTL = FALSE;
+ m_bCurRTL = false;
m_iCurAlignment = 0;
} else {
m_bCurRTL = m_bRTL;
@@ -368,7 +368,7 @@ void CFX_TxtBreak::AppendChar_PageLoad(CFX_TxtChar* pCurChar,
}
ResetArabicContext();
if (!m_bPagination) {
- CFX_TxtChar* pLastChar = GetLastChar(1, FALSE);
+ CFX_TxtChar* pLastChar = GetLastChar(1, false);
if (pLastChar && pLastChar->m_dwStatus < 1) {
pLastChar->m_dwStatus = FX_TXTBREAK_PieceBreak;
}
@@ -392,20 +392,20 @@ uint32_t CFX_TxtBreak::AppendChar_Combination(CFX_TxtChar* pCurChar,
} else {
wForm = wch;
if (!m_bPagination) {
- CFX_TxtChar* pLastChar = GetLastChar(0, FALSE);
+ CFX_TxtChar* pLastChar = GetLastChar(0, false);
if (pLastChar &&
(pLastChar->m_dwCharStyles & FX_TXTCHARSTYLE_ArabicShadda) == 0) {
- FX_BOOL bShadda = FALSE;
+ bool bShadda = false;
if (wch == 0x0651) {
FX_WCHAR wLast = pLastChar->m_wCharCode;
if (wLast >= 0x064C && wLast <= 0x0650) {
wForm = FX_GetArabicFromShaddaTable(wLast);
- bShadda = TRUE;
+ bShadda = true;
}
} else if (wch >= 0x064C && wch <= 0x0650) {
if (pLastChar->m_wCharCode == 0x0651) {
wForm = FX_GetArabicFromShaddaTable(wch);
- bShadda = TRUE;
+ bShadda = true;
}
}
if (bShadda) {
@@ -415,7 +415,7 @@ uint32_t CFX_TxtBreak::AppendChar_Combination(CFX_TxtChar* pCurChar,
}
}
}
- if (!m_pFont->GetCharWidth(wForm, iCharWidth, FALSE)) {
+ if (!m_pFont->GetCharWidth(wForm, iCharWidth, false)) {
iCharWidth = 0;
}
}
@@ -492,7 +492,7 @@ uint32_t CFX_TxtBreak::AppendChar_Arabic(CFX_TxtChar* pCurChar,
FX_WCHAR wForm;
int32_t iCharWidth = 0;
CFX_Char* pLastChar = nullptr;
- FX_BOOL bAlef = FALSE;
+ bool bAlef = false;
if (!m_bCombText && m_eCharType >= FX_CHARTYPE_ArabicAlef &&
m_eCharType <= FX_CHARTYPE_ArabicDistortion) {
pLastChar = GetLastChar(1);
@@ -512,7 +512,7 @@ uint32_t CFX_TxtBreak::AppendChar_Arabic(CFX_TxtChar* pCurChar,
if (m_bVertical != FX_IsOdd(iLastRotation)) {
iCharWidth = 1000;
} else {
- m_pFont->GetCharWidth(wForm, iCharWidth, FALSE);
+ m_pFont->GetCharWidth(wForm, iCharWidth, false);
}
if (wForm == 0xFEFF) {
iCharWidth = m_iDefChar;
@@ -533,7 +533,7 @@ uint32_t CFX_TxtBreak::AppendChar_Arabic(CFX_TxtChar* pCurChar,
if (m_bVertical != FX_IsOdd(iRotation)) {
iCharWidth = 1000;
} else {
- m_pFont->GetCharWidth(wForm, iCharWidth, FALSE);
+ m_pFont->GetCharWidth(wForm, iCharWidth, false);
}
if (wForm == 0xFEFF) {
iCharWidth = m_iDefChar;
@@ -577,7 +577,7 @@ uint32_t CFX_TxtBreak::AppendChar_Others(CFX_TxtChar* pCurChar,
} else {
if (m_bVertical != FX_IsOdd(iRotation)) {
iCharWidth = 1000;
- } else if (!m_pFont->GetCharWidth(wForm, iCharWidth, FALSE)) {
+ } else if (!m_pFont->GetCharWidth(wForm, iCharWidth, false)) {
iCharWidth = m_iDefChar;
}
iCharWidth *= m_iFontSize;
@@ -586,8 +586,8 @@ uint32_t CFX_TxtBreak::AppendChar_Others(CFX_TxtChar* pCurChar,
iCharWidth += m_iCharSpace;
pCurChar->m_iCharWidth = iCharWidth;
iLineWidth += iCharWidth;
- FX_BOOL bBreak = (chartype != FX_CHARTYPE_Space ||
- (m_dwPolicies & FX_TXTBREAKPOLICY_SpaceBreak) != 0);
+ bool bBreak = (chartype != FX_CHARTYPE_Space ||
+ (m_dwPolicies & FX_TXTBREAKPOLICY_SpaceBreak) != 0);
if (!m_bSingleLine && bBreak && iLineWidth > m_iLineWidth + m_iTolerance) {
return EndBreak(FX_TXTBREAK_LineBreak);
}
@@ -644,10 +644,10 @@ void CFX_TxtBreak::EndBreak_UpdateArabicShapes() {
}
int32_t& iLineWidth = m_pCurLine->m_iWidth;
CFX_Char* pCur = m_pCurLine->GetCharPtr(0);
- FX_BOOL bPrevNum = (pCur->m_dwCharStyles & FX_TXTCHARSTYLE_ArabicIndic) != 0;
+ bool bPrevNum = (pCur->m_dwCharStyles & FX_TXTCHARSTYLE_ArabicIndic) != 0;
pCur = m_pCurLine->GetCharPtr(1);
FX_WCHAR wch, wForm;
- FX_BOOL bNextNum;
+ bool bNextNum;
int32_t i = 1;
int32_t iCharWidth;
int32_t iRotation;
@@ -659,7 +659,7 @@ void CFX_TxtBreak::EndBreak_UpdateArabicShapes() {
bNextNum = (pNext->m_dwCharStyles & FX_TXTCHARSTYLE_ArabicIndic) != 0;
} else {
pNext = nullptr;
- bNextNum = FALSE;
+ bNextNum = false;
}
wch = pCur->m_wCharCode;
if (wch == L'.') {
@@ -675,7 +675,7 @@ void CFX_TxtBreak::EndBreak_UpdateArabicShapes() {
} else {
if (m_bVertical != FX_IsOdd(iRotation)) {
iCharWidth = 1000;
- } else if (!m_pFont->GetCharWidth(wForm, iCharWidth, FALSE)) {
+ } else if (!m_pFont->GetCharWidth(wForm, iCharWidth, false)) {
iCharWidth = m_iDefChar;
}
iCharWidth *= m_iFontSize;
@@ -690,11 +690,11 @@ void CFX_TxtBreak::EndBreak_UpdateArabicShapes() {
} while (i < iCount);
}
-FX_BOOL CFX_TxtBreak::EndBreak_SplitLine(CFX_TxtLine* pNextLine,
- FX_BOOL bAllChars,
- uint32_t dwStatus) {
+bool CFX_TxtBreak::EndBreak_SplitLine(CFX_TxtLine* pNextLine,
+ bool bAllChars,
+ uint32_t dwStatus) {
int32_t iCount = m_pCurLine->CountChars();
- FX_BOOL bDone = FALSE;
+ bool bDone = false;
CFX_Char* pTC;
if (!m_bSingleLine && m_pCurLine->m_iWidth > m_iLineWidth + m_iTolerance) {
pTC = m_pCurLine->GetCharPtr(iCount - 1);
@@ -705,12 +705,12 @@ FX_BOOL CFX_TxtBreak::EndBreak_SplitLine(CFX_TxtLine* pNextLine,
case FX_CHARTYPE_Space:
if ((m_dwPolicies & FX_TXTBREAKPOLICY_SpaceBreak) != 0) {
SplitTextLine(m_pCurLine, pNextLine, !m_bPagination && bAllChars);
- bDone = TRUE;
+ bDone = true;
}
break;
default:
SplitTextLine(m_pCurLine, pNextLine, !m_bPagination && bAllChars);
- bDone = TRUE;
+ bDone = true;
break;
}
}
@@ -732,13 +732,13 @@ FX_BOOL CFX_TxtBreak::EndBreak_SplitLine(CFX_TxtLine* pNextLine,
pCurPieces->Add(tp);
m_pCurLine = pNextLine;
m_eCharType = FX_CHARTYPE_Unknown;
- return TRUE;
+ return true;
}
if (bAllChars && !bDone) {
int32_t iEndPos = m_pCurLine->m_iWidth;
- GetBreakPos(*m_pCurLine->m_pLineChars.get(), iEndPos, bAllChars, TRUE);
+ GetBreakPos(*m_pCurLine->m_pLineChars.get(), iEndPos, bAllChars, true);
}
- return FALSE;
+ return false;
}
void CFX_TxtBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus) {
@@ -748,7 +748,7 @@ void CFX_TxtBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus) {
int32_t i, j;
CFX_TxtCharArray& chars = *m_pCurLine->m_pLineChars.get();
int32_t iCount = m_pCurLine->CountChars();
- FX_BOOL bDone = (m_pCurLine->m_iArabicChars > 0 || m_bCurRTL);
+ bool bDone = (m_pCurLine->m_iArabicChars > 0 || m_bCurRTL);
if (!m_bPagination && bDone) {
int32_t iBidiNum = 0;
for (i = 0; i < iCount; i++) {
@@ -851,12 +851,12 @@ void CFX_TxtBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus) {
}
void CFX_TxtBreak::EndBreak_Alignment(CFX_TPOArray& tpos,
- FX_BOOL bAllChars,
+ bool bAllChars,
uint32_t dwStatus) {
int32_t iNetWidth = m_pCurLine->m_iWidth, iGapChars = 0, iCharWidth;
CFX_TxtPieceArray* pCurPieces = m_pCurLine->m_pLinePieces.get();
int32_t i, j, iCount = pCurPieces->GetSize();
- FX_BOOL bFind = FALSE;
+ bool bFind = false;
FX_TPO tpo;
CFX_TxtChar* pTC;
FX_CHARTYPE chartype;
@@ -866,7 +866,7 @@ void CFX_TxtBreak::EndBreak_Alignment(CFX_TPOArray& tpos,
if (!bFind) {
iNetWidth = ttp.GetEndPos();
}
- FX_BOOL bArabic = FX_IsOdd(ttp.m_iBidiLevel);
+ bool bArabic = FX_IsOdd(ttp.m_iBidiLevel);
j = bArabic ? 0 : ttp.m_iChars - 1;
while (j > -1 && j < ttp.m_iChars) {
pTC = ttp.GetCharPtr(j);
@@ -883,7 +883,7 @@ void CFX_TxtBreak::EndBreak_Alignment(CFX_TPOArray& tpos,
}
}
} else {
- bFind = TRUE;
+ bFind = true;
if (!bAllChars) {
break;
}
@@ -954,7 +954,7 @@ uint32_t CFX_TxtBreak::EndBreak(uint32_t dwStatus) {
}
return dwStatus;
} else {
- CFX_TxtLine* pLastLine = GetTxtLine(TRUE);
+ CFX_TxtLine* pLastLine = GetTxtLine(true);
if (pLastLine) {
pCurPieces = pLastLine->m_pLinePieces.get();
iCount = pCurPieces->GetSize();
@@ -984,7 +984,7 @@ uint32_t CFX_TxtBreak::EndBreak(uint32_t dwStatus) {
m_iReady = (m_pCurLine == m_pTxtLine1.get()) ? 1 : 2;
CFX_TxtLine* pNextLine =
(m_pCurLine == m_pTxtLine1.get()) ? m_pTxtLine2.get() : m_pTxtLine1.get();
- FX_BOOL bAllChars = (m_iCurAlignment > FX_TXTLINEALIGNMENT_Right);
+ bool bAllChars = (m_iCurAlignment > FX_TXTLINEALIGNMENT_Right);
CFX_TPOArray tpos(100);
CFX_Char* pTC;
if (m_bArabicShapes) {
@@ -999,7 +999,7 @@ uint32_t CFX_TxtBreak::EndBreak(uint32_t dwStatus) {
}
EndBreak_Ret:
m_pCurLine = pNextLine;
- pTC = GetLastChar(0, FALSE);
+ pTC = GetLastChar(0, false);
m_eCharType = pTC ? pTC->GetCharType() : FX_CHARTYPE_Unknown;
if (dwStatus == FX_TXTBREAK_ParagraphBreak) {
m_iArabicContext = m_iCurArabicContext = 1;
@@ -1010,8 +1010,8 @@ EndBreak_Ret:
int32_t CFX_TxtBreak::GetBreakPos(CFX_TxtCharArray& ca,
int32_t& iEndPos,
- FX_BOOL bAllChars,
- FX_BOOL bOnlyBrk) {
+ bool bAllChars,
+ bool bOnlyBrk) {
int32_t iLength = ca.GetSize() - 1;
if (iLength < 1) {
return iLength;
@@ -1025,8 +1025,8 @@ int32_t CFX_TxtBreak::GetBreakPos(CFX_TxtCharArray& ca,
iBreak = iLength;
iBreakPos = iEndPos;
}
- FX_BOOL bSpaceBreak = (m_dwPolicies & FX_TXTBREAKPOLICY_SpaceBreak) != 0;
- FX_BOOL bNumberBreak = (m_dwPolicies & FX_TXTBREAKPOLICY_NumberBreak) != 0;
+ bool bSpaceBreak = (m_dwPolicies & FX_TXTBREAKPOLICY_SpaceBreak) != 0;
+ bool bNumberBreak = (m_dwPolicies & FX_TXTBREAKPOLICY_NumberBreak) != 0;
FX_LINEBREAKTYPE eType;
uint32_t nCodeProp, nCur, nNext;
CFX_Char* pCur = ca.GetDataPtr(iLength--);
@@ -1107,7 +1107,7 @@ int32_t CFX_TxtBreak::GetBreakPos(CFX_TxtCharArray& ca,
void CFX_TxtBreak::SplitTextLine(CFX_TxtLine* pCurLine,
CFX_TxtLine* pNextLine,
- FX_BOOL bAllChars) {
+ bool bAllChars) {
ASSERT(pCurLine && pNextLine);
int32_t iCount = pCurLine->CountChars();
if (iCount < 2) {
@@ -1115,13 +1115,13 @@ void CFX_TxtBreak::SplitTextLine(CFX_TxtLine* pCurLine,
}
int32_t iEndPos = pCurLine->m_iWidth;
CFX_TxtCharArray& curChars = *pCurLine->m_pLineChars.get();
- int32_t iCharPos = GetBreakPos(curChars, iEndPos, bAllChars, FALSE);
+ int32_t iCharPos = GetBreakPos(curChars, iEndPos, bAllChars, false);
if (iCharPos < 0) {
iCharPos = 0;
}
iCharPos++;
if (iCharPos >= iCount) {
- pNextLine->RemoveAll(TRUE);
+ pNextLine->RemoveAll(true);
CFX_Char* pTC = curChars.GetDataPtr(iCharPos - 1);
pTC->m_nBreakType = FX_LBT_UNKNOWN;
return;
@@ -1158,17 +1158,17 @@ void CFX_TxtBreak::SplitTextLine(CFX_TxtLine* pCurLine,
}
int32_t CFX_TxtBreak::CountBreakChars() const {
- CFX_TxtLine* pTxtLine = GetTxtLine(TRUE);
+ CFX_TxtLine* pTxtLine = GetTxtLine(true);
return pTxtLine ? pTxtLine->CountChars() : 0;
}
int32_t CFX_TxtBreak::CountBreakPieces() const {
- CFX_TxtPieceArray* pTxtPieces = GetTxtPieces(TRUE);
+ CFX_TxtPieceArray* pTxtPieces = GetTxtPieces(true);
return pTxtPieces ? pTxtPieces->GetSize() : 0;
}
const CFX_TxtPiece* CFX_TxtBreak::GetBreakPiece(int32_t index) const {
- CFX_TxtPieceArray* pTxtPieces = GetTxtPieces(TRUE);
+ CFX_TxtPieceArray* pTxtPieces = GetTxtPieces(true);
if (!pTxtPieces) {
return nullptr;
}
@@ -1179,9 +1179,9 @@ const CFX_TxtPiece* CFX_TxtBreak::GetBreakPiece(int32_t index) const {
}
void CFX_TxtBreak::ClearBreakPieces() {
- CFX_TxtLine* pTxtLine = GetTxtLine(TRUE);
+ CFX_TxtLine* pTxtLine = GetTxtLine(true);
if (pTxtLine) {
- pTxtLine->RemoveAll(TRUE);
+ pTxtLine->RemoveAll(true);
}
m_iReady = 0;
}
@@ -1190,8 +1190,8 @@ void CFX_TxtBreak::Reset() {
m_eCharType = FX_CHARTYPE_Unknown;
m_iArabicContext = m_iCurArabicContext = 1;
ResetArabicContext();
- m_pTxtLine1->RemoveAll(TRUE);
- m_pTxtLine2->RemoveAll(TRUE);
+ m_pTxtLine1->RemoveAll(true);
+ m_pTxtLine2->RemoveAll(true);
}
struct FX_FORMCHAR {
@@ -1202,7 +1202,7 @@ struct FX_FORMCHAR {
int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
FXTEXT_CHARPOS* pCharPos,
- FX_BOOL bCharCode,
+ bool bCharCode,
CFX_WideString* pWSForms,
FX_AdjustCharDisplayPos pAdjustPos) const {
if (!pTxtRun || pTxtRun->iLength < 1) {
@@ -1216,11 +1216,10 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
CFGAS_GEFont* pFont = pTxtRun->pFont;
uint32_t dwStyles = pTxtRun->dwStyles;
CFX_RectF rtText(*pTxtRun->pRect);
- FX_BOOL bRTLPiece =
- (pTxtRun->dwCharStyles & FX_TXTCHARSTYLE_OddBidiLevel) != 0;
- FX_BOOL bArabicNumber =
+ bool bRTLPiece = (pTxtRun->dwCharStyles & FX_TXTCHARSTYLE_OddBidiLevel) != 0;
+ bool bArabicNumber =
(pTxtRun->dwCharStyles & FX_TXTCHARSTYLE_ArabicNumber) != 0;
- FX_BOOL bArabicComma =
+ bool bArabicComma =
(pTxtRun->dwCharStyles & FX_TXTCHARSTYLE_ArabicComma) != 0;
FX_FLOAT fFontSize = pTxtRun->fFontSize;
int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
@@ -1230,13 +1229,13 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
FX_FLOAT fFontHeight = fFontSize;
FX_FLOAT fAscent = fFontHeight * (FX_FLOAT)iAscent / (FX_FLOAT)iMaxHeight;
FX_FLOAT fDescent = fFontHeight * (FX_FLOAT)iDescent / (FX_FLOAT)iMaxHeight;
- FX_BOOL bVerticalDoc = (dwStyles & FX_TXTLAYOUTSTYLE_VerticalLayout) != 0;
- FX_BOOL bVerticalChar = (dwStyles & FX_TXTLAYOUTSTYLE_VerticalChars) != 0;
+ bool bVerticalDoc = (dwStyles & FX_TXTLAYOUTSTYLE_VerticalLayout) != 0;
+ bool bVerticalChar = (dwStyles & FX_TXTLAYOUTSTYLE_VerticalChars) != 0;
int32_t iRotation = GetLineRotation(dwStyles) + pTxtRun->iCharRotation;
FX_FLOAT fX, fY, fCharWidth, fCharHeight;
int32_t iHorScale = pTxtRun->iHorizontalScale;
int32_t iVerScale = pTxtRun->iVerticalScale;
- FX_BOOL bSkipSpace = pTxtRun->bSkipSpace;
+ bool bSkipSpace = pTxtRun->bSkipSpace;
FX_FORMCHAR formChars[3];
FX_FLOAT fYBase;
fX = rtText.left;
@@ -1257,8 +1256,8 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
FX_WCHAR wNext = 0xFEFF;
FX_WCHAR wForm = 0xFEFF;
FX_WCHAR wLast = 0xFEFF;
- FX_BOOL bShadda = FALSE;
- FX_BOOL bLam = FALSE;
+ bool bShadda = false;
+ bool bLam = false;
for (int32_t i = 0; i <= iLength; i++) {
int32_t iWidth;
FX_WCHAR wch;
@@ -1315,7 +1314,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
if (wch >= 0x064C && wch <= 0x0651) {
if (bShadda) {
wForm = 0xFEFF;
- bShadda = FALSE;
+ bShadda = false;
} else {
wNext = 0xFEFF;
if (pAccess) {
@@ -1331,17 +1330,17 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
if (wch == 0x0651) {
if (wNext >= 0x064C && wNext <= 0x0650) {
wForm = FX_GetArabicFromShaddaTable(wNext);
- bShadda = TRUE;
+ bShadda = true;
}
} else {
if (wNext == 0x0651) {
wForm = FX_GetArabicFromShaddaTable(wch);
- bShadda = TRUE;
+ bShadda = true;
}
}
}
} else {
- bShadda = FALSE;
+ bShadda = false;
}
} else if (chartype == FX_CHARTYPE_Numeric) {
wForm = wch;
@@ -1377,10 +1376,10 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
wForm = wch;
}
if (chartype != FX_CHARTYPE_Combination) {
- bShadda = FALSE;
+ bShadda = false;
}
if (chartype < FX_CHARTYPE_ArabicAlef) {
- bLam = FALSE;
+ bLam = false;
}
dwProps = FX_GetUnicodeProperties(wForm);
int32_t iCharRotation = iRotation;
@@ -1388,10 +1387,10 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
iCharRotation++;
}
iCharRotation %= 4;
- FX_BOOL bEmptyChar =
+ bool bEmptyChar =
(chartype >= FX_CHARTYPE_Tab && chartype <= FX_CHARTYPE_Control);
if (wForm == 0xFEFF) {
- bEmptyChar = TRUE;
+ bEmptyChar = true;
}
int32_t iForms = bLam ? 3 : 1;
iCount += (bEmptyChar && bSkipSpace) ? 0 : iForms;
@@ -1413,11 +1412,11 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
if (bLam) {
formChars[1].wForm = 0x0651;
iCharWidth = 0;
- pFont->GetCharWidth(0x0651, iCharWidth, FALSE);
+ pFont->GetCharWidth(0x0651, iCharWidth, false);
formChars[1].iWidth = iCharWidth;
formChars[2].wForm = 0x0670;
iCharWidth = 0;
- pFont->GetCharWidth(0x0670, iCharWidth, FALSE);
+ pFont->GetCharWidth(0x0670, iCharWidth, false);
formChars[2].iWidth = iCharWidth;
}
for (int32_t j = 0; j < iForms; j++) {
@@ -1430,7 +1429,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
}
if (!bEmptyChar || (bEmptyChar && !bSkipSpace)) {
pCharPos->m_GlyphIndex =
- bCharCode ? wch : pFont->GetGlyphIndex(wForm, FALSE);
+ bCharCode ? wch : pFont->GetGlyphIndex(wForm, false);
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
pCharPos->m_ExtGID = pCharPos->m_GlyphIndex;
#endif
@@ -1460,7 +1459,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
pCharPos->m_OriginY = fY;
if ((dwStyles & FX_TXTLAYOUTSTYLE_CombText) != 0) {
int32_t iFormWidth = iCharWidth;
- pFont->GetCharWidth(wForm, iFormWidth, FALSE);
+ pFont->GetCharWidth(wForm, iFormWidth, false);
FX_FLOAT fOffset = fFontSize * (iCharWidth - iFormWidth) / 2000.0f;
if (bVerticalDoc) {
pCharPos->m_OriginY += fOffset;
@@ -1471,7 +1470,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
if (chartype == FX_CHARTYPE_Combination) {
CFX_Rect rtBBox;
rtBBox.Reset();
- if (pFont->GetCharBBox(wForm, rtBBox, FALSE)) {
+ if (pFont->GetCharBBox(wForm, rtBBox, false)) {
pCharPos->m_OriginY =
fYBase + fFontSize -
fFontSize * (FX_FLOAT)rtBBox.height / (FX_FLOAT)iMaxHeight;
@@ -1482,14 +1481,14 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
FX_CHARTYPE_Combination) {
CFX_Rect rtBox;
rtBox.Reset();
- if (pFont->GetCharBBox(wLast, rtBox, FALSE)) {
+ if (pFont->GetCharBBox(wLast, rtBox, false)) {
pCharPos->m_OriginY -= fFontSize * rtBox.height / iMaxHeight;
}
}
}
}
CFX_PointF ptOffset;
- FX_BOOL bAdjusted = FALSE;
+ bool bAdjusted = false;
if (pAdjustPos) {
bAdjusted = pAdjustPos(wForm, bCharCode, pFont, fFontSize,
bVerticalChar, ptOffset);
@@ -1497,7 +1496,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
if (!bAdjusted && bVerticalChar && (dwProps & 0x00010000) != 0) {
CFX_Rect rtBBox;
rtBBox.Reset();
- if (pFont->GetCharBBox(wForm, rtBBox, FALSE)) {
+ if (pFont->GetCharBBox(wForm, rtBBox, false)) {
ptOffset.x = fFontSize * (850 - rtBBox.right()) / iMaxHeight;
ptOffset.y = fFontSize * (iAscent - rtBBox.top - 150) / iMaxHeight;
}
@@ -1513,7 +1512,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
}
}
if (!bEmptyChar || (bEmptyChar && !bSkipSpace)) {
- pCharPos->m_bGlyphAdjust = TRUE;
+ pCharPos->m_bGlyphAdjust = true;
if (bVerticalDoc) {
if (iCharRotation == 0) {
pCharPos->m_AdjustMatrix[0] = -1;
@@ -1592,7 +1591,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
int32_t CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
CFX_RectFArray& rtArray,
- FX_BOOL bCharBBox) const {
+ bool bCharBBox) const {
if (!pTxtRun || pTxtRun->iLength < 1) {
return 0;
}
@@ -1602,14 +1601,13 @@ int32_t CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
int32_t* pWidths = pTxtRun->pWidths;
int32_t iLength = pTxtRun->iLength;
CFX_RectF rect(*pTxtRun->pRect);
- FX_BOOL bRTLPiece =
- (pTxtRun->dwCharStyles & FX_TXTCHARSTYLE_OddBidiLevel) != 0;
+ bool bRTLPiece = (pTxtRun->dwCharStyles & FX_TXTCHARSTYLE_OddBidiLevel) != 0;
FX_FLOAT fFontSize = pTxtRun->fFontSize;
int32_t iFontSize = FXSYS_round(fFontSize * 20.0f);
FX_FLOAT fScale = fFontSize / 1000.0f;
CFGAS_GEFont* pFont = pTxtRun->pFont;
if (!pFont) {
- bCharBBox = FALSE;
+ bCharBBox = false;
}
CFX_Rect bbox;
bbox.Set(0, 0, 0, 0);
@@ -1620,10 +1618,9 @@ int32_t CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
FX_FLOAT fHeight = FXSYS_fabs(bbox.height * fScale);
rtArray.RemoveAll();
rtArray.SetSize(iLength);
- FX_BOOL bVertical =
- (pTxtRun->dwStyles & FX_TXTLAYOUTSTYLE_VerticalLayout) != 0;
- FX_BOOL bSingleLine = (pTxtRun->dwStyles & FX_TXTLAYOUTSTYLE_SingleLine) != 0;
- FX_BOOL bCombText = (pTxtRun->dwStyles & FX_TXTLAYOUTSTYLE_CombText) != 0;
+ bool bVertical = (pTxtRun->dwStyles & FX_TXTLAYOUTSTYLE_VerticalLayout) != 0;
+ bool bSingleLine = (pTxtRun->dwStyles & FX_TXTLAYOUTSTYLE_SingleLine) != 0;
+ bool bCombText = (pTxtRun->dwStyles & FX_TXTLAYOUTSTYLE_CombText) != 0;
FX_WCHAR wch, wLineBreakChar = pTxtRun->wLineBreakChar;
int32_t iCharSize;
FX_FLOAT fCharSize, fStart;
@@ -1641,10 +1638,10 @@ int32_t CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
iCharSize = *pWidths++;
}
fCharSize = (FX_FLOAT)iCharSize / 20000.0f;
- FX_BOOL bRet = (!bSingleLine && FX_IsCtrlCode(wch));
+ bool bRet = (!bSingleLine && FX_IsCtrlCode(wch));
if (!(wch == L'\v' || wch == L'\f' || wch == 0x2028 || wch == 0x2029 ||
(wLineBreakChar != 0xFEFF && wch == wLineBreakChar))) {
- bRet = FALSE;
+ bRet = false;
}
if (bRet) {
iCharSize = iFontSize * 500;
@@ -1716,7 +1713,7 @@ FX_TXTRUN::FX_TXTRUN()
dwCharStyles(0),
pRect(nullptr),
wLineBreakChar(L'\n'),
- bSkipSpace(TRUE) {}
+ bSkipSpace(true) {}
FX_TXTRUN::~FX_TXTRUN() {}
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h
index d8464ab0cb..4e9238f7bf 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -102,7 +102,7 @@ struct FX_TXTRUN {
uint32_t dwCharStyles;
const CFX_RectF* pRect;
FX_WCHAR wLineBreakChar;
- FX_BOOL bSkipSpace;
+ bool bSkipSpace;
};
class CFX_TxtPiece : public CFX_Target {
@@ -183,7 +183,7 @@ class CFX_TxtLine {
}
wsStr.ReleaseBuffer(iCount);
}
- void RemoveAll(FX_BOOL bLeaveMemory = FALSE) {
+ void RemoveAll(bool bLeaveMemory = false) {
m_pLineChars->RemoveAll();
m_pLinePieces->RemoveAll(bLeaveMemory);
m_iWidth = 0;
@@ -208,7 +208,7 @@ class CFX_TxtBreak {
void SetLayoutStyles(uint32_t dwLayoutStyles);
void SetFont(CFGAS_GEFont* pFont);
void SetFontSize(FX_FLOAT fFontSize);
- void SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant);
+ void SetTabWidth(FX_FLOAT fTabWidth, bool bEquidistant);
void SetDefaultChar(FX_WCHAR wch);
void SetParagraphBreakChar(FX_WCHAR wch);
void SetLineBreakTolerance(FX_FLOAT fTolerance);
@@ -230,12 +230,12 @@ class CFX_TxtBreak {
void Reset();
int32_t GetDisplayPos(const FX_TXTRUN* pTxtRun,
FXTEXT_CHARPOS* pCharPos,
- FX_BOOL bCharCode = FALSE,
+ bool bCharCode = false,
CFX_WideString* pWSForms = nullptr,
FX_AdjustCharDisplayPos pAdjustPos = nullptr) const;
int32_t GetCharRects(const FX_TXTRUN* pTxtRun,
CFX_RectFArray& rtArray,
- FX_BOOL bCharBBox = FALSE) const;
+ bool bCharBBox = false) const;
void AppendChar_PageLoad(CFX_TxtChar* pCurChar, uint32_t dwProps);
uint32_t AppendChar_Combination(CFX_TxtChar* pCurChar, int32_t iRotation);
uint32_t AppendChar_Tab(CFX_TxtChar* pCurChar, int32_t iRotation);
@@ -246,43 +246,43 @@ class CFX_TxtBreak {
private:
void SetBreakStatus();
int32_t GetLineRotation(uint32_t dwStyles) const;
- CFX_TxtChar* GetLastChar(int32_t index, FX_BOOL bOmitChar = TRUE) const;
- CFX_TxtLine* GetTxtLine(FX_BOOL bReady) const;
- CFX_TxtPieceArray* GetTxtPieces(FX_BOOL bReady) const;
+ CFX_TxtChar* GetLastChar(int32_t index, bool bOmitChar = true) const;
+ CFX_TxtLine* GetTxtLine(bool bReady) const;
+ CFX_TxtPieceArray* GetTxtPieces(bool bReady) const;
FX_CHARTYPE GetUnifiedCharType(FX_CHARTYPE dwType) const;
void ResetArabicContext();
void ResetContextCharStyles();
void EndBreak_UpdateArabicShapes();
- FX_BOOL EndBreak_SplitLine(CFX_TxtLine* pNextLine,
- FX_BOOL bAllChars,
- uint32_t dwStatus);
+ bool EndBreak_SplitLine(CFX_TxtLine* pNextLine,
+ bool bAllChars,
+ uint32_t dwStatus);
void EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus);
void EndBreak_Alignment(CFX_TPOArray& tpos,
- FX_BOOL bAllChars,
+ bool bAllChars,
uint32_t dwStatus);
int32_t GetBreakPos(CFX_TxtCharArray& ca,
int32_t& iEndPos,
- FX_BOOL bAllChars = FALSE,
- FX_BOOL bOnlyBrk = FALSE);
+ bool bAllChars = false,
+ bool bOnlyBrk = false);
void SplitTextLine(CFX_TxtLine* pCurLine,
CFX_TxtLine* pNextLine,
- FX_BOOL bAllChars = FALSE);
+ bool bAllChars = false);
uint32_t m_dwPolicies;
- FX_BOOL m_bPagination;
+ bool m_bPagination;
int32_t m_iLineWidth;
uint32_t m_dwLayoutStyles;
- FX_BOOL m_bVertical;
- FX_BOOL m_bArabicContext;
- FX_BOOL m_bArabicShapes;
- FX_BOOL m_bRTL;
- FX_BOOL m_bSingleLine;
- FX_BOOL m_bCombText;
+ bool m_bVertical;
+ bool m_bArabicContext;
+ bool m_bArabicShapes;
+ bool m_bRTL;
+ bool m_bSingleLine;
+ bool m_bCombText;
int32_t m_iArabicContext;
int32_t m_iCurArabicContext;
CFGAS_GEFont* m_pFont;
int32_t m_iFontSize;
- FX_BOOL m_bEquidistant;
+ bool m_bEquidistant;
int32_t m_iTabWidth;
FX_WCHAR m_wDefChar;
FX_WCHAR m_wParagBreakChar;
@@ -295,10 +295,10 @@ class CFX_TxtBreak {
int32_t m_iCombWidth;
void* m_pUserData;
FX_CHARTYPE m_eCharType;
- FX_BOOL m_bCurRTL;
+ bool m_bCurRTL;
int32_t m_iCurAlignment;
- FX_BOOL m_bArabicNumber;
- FX_BOOL m_bArabicComma;
+ bool m_bArabicNumber;
+ bool m_bArabicComma;
std::unique_ptr<CFX_TxtLine> m_pTxtLine1;
std::unique_ptr<CFX_TxtLine> m_pTxtLine2;
CFX_TxtLine* m_pCurLine;
diff --git a/xfa/fgas/layout/fgas_unicode.h b/xfa/fgas/layout/fgas_unicode.h
index 650943a72f..12614a1299 100644
--- a/xfa/fgas/layout/fgas_unicode.h
+++ b/xfa/fgas/layout/fgas_unicode.h
@@ -18,11 +18,11 @@ typedef CFX_MassArrayTemplate<FX_TPO> CFX_TPOArray;
void FX_TEXTLAYOUT_PieceSort(CFX_TPOArray& tpos, int32_t iStart, int32_t iEnd);
-typedef FX_BOOL (*FX_AdjustCharDisplayPos)(FX_WCHAR wch,
- FX_BOOL bMBCSCode,
- CFGAS_GEFont* pFont,
- FX_FLOAT fFontSize,
- FX_BOOL bVertical,
- CFX_PointF& ptOffset);
+typedef bool (*FX_AdjustCharDisplayPos)(FX_WCHAR wch,
+ bool bMBCSCode,
+ CFGAS_GEFont* pFont,
+ FX_FLOAT fFontSize,
+ bool bVertical,
+ CFX_PointF& ptOffset);
#endif // XFA_FGAS_LAYOUT_FGAS_UNICODE_H_