summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_interform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_interform.cpp')
-rw-r--r--core/fpdfdoc/cpdf_interform.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp
index bacf6fd426..8a88791ee9 100644
--- a/core/fpdfdoc/cpdf_interform.cpp
+++ b/core/fpdfdoc/cpdf_interform.cpp
@@ -969,9 +969,7 @@ bool CPDF_InterForm::CheckRequiredFields(
iType == CPDF_FormField::CheckBox || iType == CPDF_FormField::ListBox) {
continue;
}
- uint32_t dwFlags = pField->GetFieldFlags();
- // TODO(thestig): Look up these magic numbers and add constants for them.
- if (dwFlags & FORMFLAG_NOEXPORT)
+ if (pField->IsNoExport())
continue;
bool bFind = true;
@@ -979,10 +977,8 @@ bool CPDF_InterForm::CheckRequiredFields(
bFind = pdfium::ContainsValue(*fields, pField);
if (bIncludeOrExclude == bFind) {
const CPDF_Dictionary* pFieldDict = pField->GetDict();
- if ((dwFlags & FORMFLAG_REQUIRED) != 0 &&
- pFieldDict->GetStringFor("V").IsEmpty()) {
+ if (pField->IsRequired() && pFieldDict->GetStringFor("V").IsEmpty())
return false;
- }
}
}
return true;