| Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
|
| diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
|
| index 6d425de6f854bc7485465bf8fd867af1e4131565..d65b16980107feda9d3143877b31008c9ec37ad1 100644
|
| --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
|
| +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
|
| @@ -194,7 +194,7 @@ CFX_ByteStringC CPDF_SimpleParser::GetWord()
|
| }
|
| return CFX_ByteStringC(pStart, dwSize);
|
| }
|
| -FX_BOOL CPDF_SimpleParser::SearchToken(const CFX_ByteStringC& token)
|
| +bool CPDF_SimpleParser::SearchToken(const CFX_ByteStringC& token)
|
| {
|
| int token_len = token.GetLength();
|
| while (m_dwCurPos < m_dwSize - token_len) {
|
| @@ -204,30 +204,30 @@ FX_BOOL CPDF_SimpleParser::SearchToken(const CFX_ByteStringC& token)
|
| m_dwCurPos ++;
|
| }
|
| if (m_dwCurPos == m_dwSize - token_len) {
|
| - return FALSE;
|
| + return false;
|
| }
|
| m_dwCurPos += token_len;
|
| - return TRUE;
|
| + return true;
|
| }
|
| -FX_BOOL CPDF_SimpleParser::SkipWord(const CFX_ByteStringC& token)
|
| +bool CPDF_SimpleParser::SkipWord(const CFX_ByteStringC& token)
|
| {
|
| while (1) {
|
| CFX_ByteStringC word = GetWord();
|
| if (word.IsEmpty()) {
|
| - return FALSE;
|
| + return false;
|
| }
|
| if (word == token) {
|
| - return TRUE;
|
| + return true;
|
| }
|
| }
|
| - return FALSE;
|
| + return false;
|
| }
|
| -FX_BOOL CPDF_SimpleParser::FindTagPair(const CFX_ByteStringC& start_token, const CFX_ByteStringC& end_token,
|
| +bool CPDF_SimpleParser::FindTagPair(const CFX_ByteStringC& start_token, const CFX_ByteStringC& end_token,
|
| FX_DWORD& start_pos, FX_DWORD& end_pos)
|
| {
|
| if (!start_token.IsEmpty()) {
|
| if (!SkipWord(start_token)) {
|
| - return FALSE;
|
| + return false;
|
| }
|
| start_pos = m_dwCurPos;
|
| }
|
| @@ -235,15 +235,15 @@ FX_BOOL CPDF_SimpleParser::FindTagPair(const CFX_ByteStringC& start_token, const
|
| end_pos = m_dwCurPos;
|
| CFX_ByteStringC word = GetWord();
|
| if (word.IsEmpty()) {
|
| - return FALSE;
|
| + return false;
|
| }
|
| if (word == end_token) {
|
| - return TRUE;
|
| + return true;
|
| }
|
| }
|
| - return FALSE;
|
| + return false;
|
| }
|
| -FX_BOOL CPDF_SimpleParser::FindTagParam(const CFX_ByteStringC& token, int nParams)
|
| +bool CPDF_SimpleParser::FindTagParam(const CFX_ByteStringC& token, int nParams)
|
| {
|
| nParams ++;
|
| FX_DWORD* pBuf = FX_Alloc(FX_DWORD, nParams);
|
| @@ -261,7 +261,7 @@ FX_BOOL CPDF_SimpleParser::FindTagParam(const CFX_ByteStringC& token, int nParam
|
| CFX_ByteStringC word = GetWord();
|
| if (word.IsEmpty()) {
|
| FX_Free(pBuf);
|
| - return FALSE;
|
| + return false;
|
| }
|
| if (word == token) {
|
| if (buf_count < nParams) {
|
| @@ -269,10 +269,10 @@ FX_BOOL CPDF_SimpleParser::FindTagParam(const CFX_ByteStringC& token, int nParam
|
| }
|
| m_dwCurPos = pBuf[buf_index];
|
| FX_Free(pBuf);
|
| - return TRUE;
|
| + return true;
|
| }
|
| }
|
| - return FALSE;
|
| + return false;
|
| }
|
| static int _hex2dec(char ch)
|
| {
|
| @@ -367,7 +367,7 @@ CFX_ByteTextBuf& operator << (CFX_ByteTextBuf& buf, const CPDF_Object* pObj)
|
| break;
|
| case PDFOBJ_STRING: {
|
| CFX_ByteString str = pObj->GetString();
|
| - FX_BOOL bHex = ((CPDF_String*)pObj)->IsHex();
|
| + bool bHex = ((CPDF_String*)pObj)->IsHex();
|
| buf << PDF_EncodeString(str, bHex);
|
| break;
|
| }
|
| @@ -416,13 +416,13 @@ CFX_ByteTextBuf& operator << (CFX_ByteTextBuf& buf, const CPDF_Object* pObj)
|
| CPDF_Stream* p = (CPDF_Stream*)pObj;
|
| buf << p->GetDict() << FX_BSTRC("stream\r\n");
|
| CPDF_StreamAcc acc;
|
| - acc.LoadAllData(p, TRUE);
|
| + acc.LoadAllData(p, true);
|
| buf.AppendBlock(acc.GetData(), acc.GetSize());
|
| buf << FX_BSTRC("\r\nendstream");
|
| break;
|
| }
|
| default:
|
| - ASSERT(FALSE);
|
| + ASSERT(false);
|
| break;
|
| }
|
| return buf;
|
|
|