summaryrefslogtreecommitdiff
path: root/xfa/fde/xml/cfx_saxreader.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/xml/cfx_saxreader.cpp
parent12f3e4a58f05850b93af35619cb04f0231d86acc (diff)
downloadpdfium-d19e912dd469e4bdad9f3020e1f6eb98f10f3470.tar.xz
Remove FX_BOOL from xfa.
Review-Url: https://codereview.chromium.org/2467203003
Diffstat (limited to 'xfa/fde/xml/cfx_saxreader.cpp')
-rw-r--r--xfa/fde/xml/cfx_saxreader.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/xfa/fde/xml/cfx_saxreader.cpp b/xfa/fde/xml/cfx_saxreader.cpp
index 8f18451ea0..b4d48d2937 100644
--- a/xfa/fde/xml/cfx_saxreader.cpp
+++ b/xfa/fde/xml/cfx_saxreader.cpp
@@ -70,45 +70,45 @@ CFX_SAXFile::CFX_SAXFile()
m_pBuf(nullptr),
m_dwBufSize(0),
m_dwBufIndex(0) {}
-FX_BOOL CFX_SAXFile::StartFile(IFX_SeekableReadStream* pFile,
- uint32_t dwStart,
- uint32_t dwLen) {
+bool CFX_SAXFile::StartFile(IFX_SeekableReadStream* pFile,
+ uint32_t dwStart,
+ uint32_t dwLen) {
ASSERT(!m_pFile && pFile);
uint32_t dwSize = pFile->GetSize();
if (dwStart >= dwSize) {
- return FALSE;
+ return false;
}
if (dwLen == static_cast<uint32_t>(-1) || dwStart + dwLen > dwSize) {
dwLen = dwSize - dwStart;
}
if (dwLen == 0) {
- return FALSE;
+ return false;
}
m_dwBufSize = std::min(dwLen, kSaxFileBufSize);
m_pBuf = FX_Alloc(uint8_t, m_dwBufSize);
if (!pFile->ReadBlock(m_pBuf, dwStart, m_dwBufSize)) {
- return FALSE;
+ return false;
}
m_dwStart = dwStart;
m_dwEnd = dwStart + dwLen;
m_dwCur = dwStart;
m_pFile = pFile;
m_dwBufIndex = 0;
- return TRUE;
+ return true;
}
-FX_BOOL CFX_SAXFile::ReadNextBlock() {
+bool CFX_SAXFile::ReadNextBlock() {
ASSERT(m_pFile);
uint32_t dwSize = m_dwEnd - m_dwCur;
if (dwSize == 0) {
- return FALSE;
+ return false;
}
m_dwBufSize = std::min(dwSize, kSaxFileBufSize);
if (!m_pFile->ReadBlock(m_pBuf, m_dwCur, m_dwBufSize)) {
- return FALSE;
+ return false;
}
m_dwBufIndex = 0;
- return TRUE;
+ return true;
}
void CFX_SAXFile::Reset() {
@@ -210,7 +210,7 @@ void CFX_SAXReader::ReallocNameBuffer() {
m_pszName = (uint8_t*)FX_Realloc(uint8_t, m_pszName, m_iNameSize);
}
-FX_BOOL CFX_SAXReader::SkipSpace(uint8_t ch) {
+bool CFX_SAXReader::SkipSpace(uint8_t ch) {
return (m_dwParseMode & CFX_SaxParseMode_NotSkipSpace) == 0 && ch < 0x21;
}
@@ -226,7 +226,7 @@ int32_t CFX_SAXReader::StartParse(IFX_SeekableReadStream* pFile,
m_iState = 0;
m_eMode = CFX_SaxMode::Text;
m_ePrevMode = CFX_SaxMode::Text;
- m_bCharData = FALSE;
+ m_bCharData = false;
m_dwDataOffset = 0;
m_dwParseMode = dwParseMode;
m_Stack.emplace(new CFX_SAXItem(++m_dwItemID));
@@ -637,11 +637,11 @@ void CFX_SAXReader::SkipNode() {
m_dwDataOffset += 7;
FXSYS_memmove(m_pszData, m_pszData + 7,
m_iDataLength * sizeof(uint8_t));
- m_bCharData = TRUE;
+ m_bCharData = true;
if (m_pHandler) {
NotifyData();
}
- m_bCharData = FALSE;
+ m_bCharData = false;
} else {
Pop();
}
@@ -728,7 +728,7 @@ void CFX_SAXReader::SkipCurrentNode() {
if (!pItem)
return;
- pItem->m_bSkip = TRUE;
+ pItem->m_bSkip = true;
}
void CFX_SAXReader::SetHandler(CXFA_SAXReaderHandler* pHandler) {