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

Unified Diff: core/src/fpdfdoc/doc_basic.cpp

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. 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
« no previous file with comments | « core/src/fpdfdoc/doc_ap.cpp ('k') | core/src/fpdfdoc/doc_form.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_basic.cpp
diff --git a/core/src/fpdfdoc/doc_basic.cpp b/core/src/fpdfdoc/doc_basic.cpp
index 9d31d156245e844b51f82a1cc99636a875081de3..c1053b345d1ef6ccb936766374589a0e8cfa4aa6 100644
--- a/core/src/fpdfdoc/doc_basic.cpp
+++ b/core/src/fpdfdoc/doc_basic.cpp
@@ -314,10 +314,10 @@ static CFX_WideString FILESPEC_DecodeFileName(const CFX_WideStringC& filepath)
return filepath;
#endif
}
-FX_BOOL CPDF_FileSpec::GetFileName(CFX_WideString &csFileName) const
+bool CPDF_FileSpec::GetFileName(CFX_WideString &csFileName) const
{
if (m_pObj == NULL) {
- return FALSE;
+ return false;
}
if (m_pObj->GetType() == PDFOBJ_DICTIONARY) {
CPDF_Dictionary* pDict = (CPDF_Dictionary*)m_pObj;
@@ -326,7 +326,7 @@ FX_BOOL CPDF_FileSpec::GetFileName(CFX_WideString &csFileName) const
csFileName = CFX_WideString::FromLocal(pDict->GetString(FX_BSTRC("F")));
}
if (pDict->GetString(FX_BSTRC("FS")) == FX_BSTRC("URL")) {
- return TRUE;
+ return true;
}
if (csFileName.IsEmpty()) {
if (pDict->KeyExist(FX_BSTRC("DOS"))) {
@@ -336,14 +336,14 @@ FX_BOOL CPDF_FileSpec::GetFileName(CFX_WideString &csFileName) const
} else if (pDict->KeyExist(FX_BSTRC("Unix"))) {
csFileName = CFX_WideString::FromLocal(pDict->GetString(FX_BSTRC("Unix")));
} else {
- return FALSE;
+ return false;
}
}
} else {
csFileName = CFX_WideString::FromLocal(m_pObj->GetString());
}
csFileName = FILESPEC_DecodeFileName(csFileName);
- return TRUE;
+ return true;
}
CPDF_FileSpec::CPDF_FileSpec()
{
@@ -352,13 +352,13 @@ CPDF_FileSpec::CPDF_FileSpec()
((CPDF_Dictionary*)m_pObj)->SetAtName(FX_BSTRC("Type"), FX_BSTRC("Filespec"));
}
}
-FX_BOOL CPDF_FileSpec::IsURL() const
+bool CPDF_FileSpec::IsURL() const
{
if (m_pObj == NULL) {
- return FALSE;
+ return false;
}
if (m_pObj->GetType() != PDFOBJ_DICTIONARY) {
- return FALSE;
+ return false;
}
return ((CPDF_Dictionary*)m_pObj)->GetString(FX_BSTRC("FS")) == FX_BSTRC("URL");
}
@@ -417,7 +417,7 @@ CPDF_Stream* CPDF_FileSpec::GetFileStream() const
}
return NULL;
}
-static void FPDFDOC_FILESPEC_SetFileName(CPDF_Object *pObj, const CFX_WideStringC& wsFileName, FX_BOOL bURL)
+static void FPDFDOC_FILESPEC_SetFileName(CPDF_Object *pObj, const CFX_WideStringC& wsFileName, bool bURL)
{
ASSERT(pObj != NULL);
CFX_WideString wsStr;
@@ -435,7 +435,7 @@ static void FPDFDOC_FILESPEC_SetFileName(CPDF_Object *pObj, const CFX_WideString
pDict->SetAtString(FX_BSTRC("UF"), PDF_EncodeText(wsStr));
}
}
-void CPDF_FileSpec::SetFileName(const CFX_WideStringC& wsFileName, FX_BOOL bURL)
+void CPDF_FileSpec::SetFileName(const CFX_WideStringC& wsFileName, bool bURL)
{
ASSERT(m_pObj != NULL);
if (m_pObj->GetType() == PDFOBJ_DICTIONARY && bURL) {
« no previous file with comments | « core/src/fpdfdoc/doc_ap.cpp ('k') | core/src/fpdfdoc/doc_form.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698