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

Unified Diff: core/fpdfdoc/cpvt_generateap.cpp

Issue 2196903002: Use bool instead of FX_BOOL as return values in CPVT_GenerateAP. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 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/fpdfdoc/cpvt_generateap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/cpvt_generateap.cpp
diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp
index 7eb6188c94baeba8c2e58c2f5f88abf9b953b1ff..10eceb307beabca3402b6d9b765faa09c8b324b6 100644
--- a/core/fpdfdoc/cpvt_generateap.cpp
+++ b/core/fpdfdoc/cpvt_generateap.cpp
@@ -20,9 +20,9 @@
namespace {
-FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
- CPDF_Dictionary* pAnnotDict,
- const int32_t& nWidgetType) {
+bool GenerateWidgetAP(CPDF_Document* pDoc,
+ CPDF_Dictionary* pAnnotDict,
+ const int32_t& nWidgetType) {
CPDF_Dictionary* pFormDict = nullptr;
if (CPDF_Dictionary* pRootDict = pDoc->GetRoot())
pFormDict = pRootDict->GetDictBy("AcroForm");
@@ -445,10 +445,10 @@ FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
} // namespace
-FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict) {
- if (!pAnnotDict || pAnnotDict->GetStringBy("Subtype") != "Widget") {
- return FALSE;
- }
+bool FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict) {
+ if (!pAnnotDict || pAnnotDict->GetStringBy("Subtype") != "Widget")
+ return false;
+
CFX_ByteString field_type = FPDF_GetFieldAttr(pAnnotDict, "FT")->GetString();
uint32_t flags = FPDF_GetFieldAttr(pAnnotDict, "Ff")
? FPDF_GetFieldAttr(pAnnotDict, "Ff")->GetInteger()
@@ -472,25 +472,25 @@ FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict) {
}
}
}
- return FALSE;
+ return false;
}
// Static.
-FX_BOOL CPVT_GenerateAP::GenerateTextFieldAP(CPDF_Document* pDoc,
- CPDF_Dictionary* pAnnotDict) {
- return GenerateWidgetAP(pDoc, pAnnotDict, 0);
+bool CPVT_GenerateAP::GenerateComboBoxAP(CPDF_Document* pDoc,
+ CPDF_Dictionary* pAnnotDict) {
+ return GenerateWidgetAP(pDoc, pAnnotDict, 1);
}
// Static.
-FX_BOOL CPVT_GenerateAP::GenerateComboBoxAP(CPDF_Document* pDoc,
- CPDF_Dictionary* pAnnotDict) {
- return GenerateWidgetAP(pDoc, pAnnotDict, 1);
+bool CPVT_GenerateAP::GenerateListBoxAP(CPDF_Document* pDoc,
+ CPDF_Dictionary* pAnnotDict) {
+ return GenerateWidgetAP(pDoc, pAnnotDict, 2);
}
// Static.
-FX_BOOL CPVT_GenerateAP::GenerateListBoxAP(CPDF_Document* pDoc,
- CPDF_Dictionary* pAnnotDict) {
- return GenerateWidgetAP(pDoc, pAnnotDict, 2);
+bool CPVT_GenerateAP::GenerateTextFieldAP(CPDF_Document* pDoc,
+ CPDF_Dictionary* pAnnotDict) {
+ return GenerateWidgetAP(pDoc, pAnnotDict, 0);
}
// Static.
« no previous file with comments | « core/fpdfdoc/cpvt_generateap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698