summaryrefslogtreecommitdiff
path: root/xfa/fde/cfx_wordbreak.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-02 15:43:18 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 15:43:19 -0700
commitd19e912dd469e4bdad9f3020e1f6eb98f10f3470 (patch)
tree239cb568a80445f14a1ab9b63dcaaddcce67e1cc /xfa/fde/cfx_wordbreak.cpp
parent12f3e4a58f05850b93af35619cb04f0231d86acc (diff)
downloadpdfium-d19e912dd469e4bdad9f3020e1f6eb98f10f3470.tar.xz
Remove FX_BOOL from xfa.
Review-Url: https://codereview.chromium.org/2467203003
Diffstat (limited to 'xfa/fde/cfx_wordbreak.cpp')
-rw-r--r--xfa/fde/cfx_wordbreak.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/xfa/fde/cfx_wordbreak.cpp b/xfa/fde/cfx_wordbreak.cpp
index a9aa75b622..04fc32f550 100644
--- a/xfa/fde/cfx_wordbreak.cpp
+++ b/xfa/fde/cfx_wordbreak.cpp
@@ -2789,35 +2789,35 @@ void CFX_WordBreak::Attach(const CFX_WideString& wsText) {
m_pCurIter.reset(new CFX_CharIter(wsText));
}
-FX_BOOL CFX_WordBreak::Next(FX_BOOL bPrev) {
+bool CFX_WordBreak::Next(bool bPrev) {
std::unique_ptr<IFX_CharIter> pIter(
(bPrev ? m_pPreIter : m_pCurIter)->Clone());
if (pIter->IsEOF(!bPrev))
- return FALSE;
+ return false;
pIter->Next(bPrev);
- if (!FindNextBreakPos(pIter.get(), bPrev, TRUE))
- return FALSE;
+ if (!FindNextBreakPos(pIter.get(), bPrev, true))
+ return false;
if (bPrev) {
m_pCurIter = std::move(m_pPreIter);
- m_pCurIter->Next(TRUE);
+ m_pCurIter->Next(true);
m_pPreIter = std::move(pIter);
} else {
m_pPreIter = std::move(m_pCurIter);
m_pPreIter->Next();
m_pCurIter = std::move(pIter);
}
- return TRUE;
+ return true;
}
void CFX_WordBreak::SetAt(int32_t nIndex) {
m_pPreIter.reset();
m_pCurIter->SetAt(nIndex);
- FindNextBreakPos(m_pCurIter.get(), TRUE, FALSE);
+ FindNextBreakPos(m_pCurIter.get(), true, false);
m_pPreIter = std::move(m_pCurIter);
m_pCurIter.reset(m_pPreIter->Clone());
- FindNextBreakPos(m_pCurIter.get(), FALSE, FALSE);
+ FindNextBreakPos(m_pCurIter.get(), false, false);
}
int32_t CFX_WordBreak::GetWordPos() const {
@@ -2844,18 +2844,18 @@ void CFX_WordBreak::GetWord(CFX_WideString& wsWord) const {
wsWord.ReleaseBuffer(nWordLength);
}
-FX_BOOL CFX_WordBreak::IsEOF(FX_BOOL bTail) const {
+bool CFX_WordBreak::IsEOF(bool bTail) const {
return m_pCurIter->IsEOF(bTail);
}
-FX_BOOL CFX_WordBreak::FindNextBreakPos(IFX_CharIter* pIter,
- FX_BOOL bPrev,
- FX_BOOL bFromNext) {
+bool CFX_WordBreak::FindNextBreakPos(IFX_CharIter* pIter,
+ bool bPrev,
+ bool bFromNext) {
FX_WordBreakProp ePreType = FX_WordBreakProp_None;
FX_WordBreakProp eCurType = FX_WordBreakProp_None;
FX_WordBreakProp eNextType = FX_WordBreakProp_None;
if (pIter->IsEOF(!bPrev)) {
- return TRUE;
+ return true;
}
if (!(bFromNext || pIter->IsEOF(bPrev))) {
pIter->Next(!bPrev);
@@ -2863,7 +2863,7 @@ FX_BOOL CFX_WordBreak::FindNextBreakPos(IFX_CharIter* pIter,
pIter->Next(bPrev);
}
eCurType = GetWordBreakProperty(pIter->GetChar());
- FX_BOOL bFirst = TRUE;
+ bool bFirst = true;
do {
pIter->Next(bPrev);
eNextType = GetWordBreakProperty(pIter->GetChar());
@@ -2872,7 +2872,7 @@ FX_BOOL CFX_WordBreak::FindNextBreakPos(IFX_CharIter* pIter,
if (wBreak) {
if (pIter->IsEOF(!bPrev)) {
pIter->Next(!bPrev);
- return TRUE;
+ return true;
}
if (bFirst) {
int32_t nFlags = 0;
@@ -2896,12 +2896,12 @@ FX_BOOL CFX_WordBreak::FindNextBreakPos(IFX_CharIter* pIter,
if (!((nFlags == 1 && ePreType == FX_WordBreakProp_ALetter) ||
(nFlags == 2 && ePreType == FX_WordBreakProp_Numberic))) {
pIter->Next(!bPrev);
- return TRUE;
+ return true;
}
pIter->Next(bPrev);
- wBreak = FALSE;
+ wBreak = false;
}
- bFirst = FALSE;
+ bFirst = false;
}
if (wBreak) {
int32_t nFlags = 0;
@@ -2922,7 +2922,7 @@ FX_BOOL CFX_WordBreak::FindNextBreakPos(IFX_CharIter* pIter,
}
if (nFlags <= 0) {
pIter->Next(!bPrev);
- return TRUE;
+ return true;
}
ASSERT(nFlags <= 2);
pIter->Next(bPrev);
@@ -2931,13 +2931,13 @@ FX_BOOL CFX_WordBreak::FindNextBreakPos(IFX_CharIter* pIter,
(nFlags == 2 && eNextType == FX_WordBreakProp_Numberic))) {
pIter->Next(!bPrev);
pIter->Next(!bPrev);
- return TRUE;
+ return true;
}
}
}
ePreType = eCurType;
eCurType = eNextType;
- bFirst = FALSE;
+ bFirst = false;
} while (!pIter->IsEOF(!bPrev));
- return TRUE;
+ return true;
}