Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp

Issue 1255693002: Revert "FX_BOOL considered harmful, part 2." (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
index ffce46bdd20ad515d3f48f28533de8a17e331f5f..1958fab280c5556b0a0a9b199222c9eda0c22c8b 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
@@ -9,7 +9,7 @@ CFDF_Document::CFDF_Document() : CPDF_IndirectObjects(NULL)
{
m_pRootDict = NULL;
m_pFile = NULL;
- m_bOwnFile = false;
+ m_bOwnFile = FALSE;
}
CFDF_Document::~CFDF_Document()
{
@@ -26,7 +26,7 @@ CFDF_Document* CFDF_Document::CreateNewDoc()
pDoc->m_pRootDict->SetAt(FX_BSTRC("FDF"), pFDFDict);
return pDoc;
}
-CFDF_Document* CFDF_Document::ParseFile(IFX_FileRead *pFile, bool bOwnFile)
+CFDF_Document* CFDF_Document::ParseFile(IFX_FileRead *pFile, FX_BOOL bOwnFile)
{
if (!pFile) {
return NULL;
@@ -41,16 +41,16 @@ CFDF_Document* CFDF_Document::ParseFile(IFX_FileRead *pFile, bool bOwnFile)
}
CFDF_Document* CFDF_Document::ParseMemory(const uint8_t* pData, FX_DWORD size)
{
- return CFDF_Document::ParseFile(FX_CreateMemoryStream((uint8_t*)pData, size), true);
+ return CFDF_Document::ParseFile(FX_CreateMemoryStream((uint8_t*)pData, size), TRUE);
}
-void CFDF_Document::ParseStream(IFX_FileRead *pFile, bool bOwnFile)
+void CFDF_Document::ParseStream(IFX_FileRead *pFile, FX_BOOL bOwnFile)
{
m_pFile = pFile;
m_bOwnFile = bOwnFile;
CPDF_SyntaxParser parser;
parser.InitParser(m_pFile, 0);
while (1) {
- bool bNumber;
+ FX_BOOL bNumber;
CFX_ByteString word = parser.GetNextWord(bNumber);
if (bNumber) {
FX_DWORD objnum = FXSYS_atoi(word);
@@ -85,10 +85,10 @@ void CFDF_Document::ParseStream(IFX_FileRead *pFile, bool bOwnFile)
}
}
}
-bool CFDF_Document::WriteBuf(CFX_ByteTextBuf& buf) const
+FX_BOOL CFDF_Document::WriteBuf(CFX_ByteTextBuf& buf) const
{
if (m_pRootDict == NULL) {
- return false;
+ return FALSE;
}
buf << FX_BSTRC("%FDF-1.2\r\n");
FX_POSITION pos = m_IndirectObjs.GetStartPosition();
@@ -99,7 +99,7 @@ bool CFDF_Document::WriteBuf(CFX_ByteTextBuf& buf) const
buf << (FX_DWORD)objnum << FX_BSTRC(" 0 obj\r\n") << pObj << FX_BSTRC("\r\nendobj\r\n\r\n");
}
buf << FX_BSTRC("trailer\r\n<</Root ") << m_pRootDict->GetObjNum() << FX_BSTRC(" 0 R>>\r\n%%EOF\r\n");
- return true;
+ return TRUE;
}
CFX_WideString CFDF_Document::GetWin32Path() const
{
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698