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.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp
index 281d4d33fc..1596b17d82 100644
--- a/core/fpdfdoc/cpdf_interform.cpp
+++ b/core/fpdfdoc/cpdf_interform.cpp
@@ -1206,12 +1206,13 @@ void CPDF_InterForm::FDF_ImportField(CPDF_Dictionary* pFieldDict,
return;
WideString csWValue = GetFieldValue(*pFieldDict, m_bsEncoding);
- int iType = pField->GetFieldType();
+ FormFieldType fieldType = pField->GetFieldType();
if (bNotify && m_pFormNotify) {
- if (iType == FIELDTYPE_LISTBOX) {
+ if (fieldType == FormFieldType::kListBox) {
if (m_pFormNotify->BeforeSelectionChange(pField, csWValue) < 0)
return;
- } else if (iType == FIELDTYPE_COMBOBOX || iType == FIELDTYPE_TEXTFIELD) {
+ } else if (fieldType == FormFieldType::kComboBox ||
+ fieldType == FormFieldType::kTextField) {
if (m_pFormNotify->BeforeValueChange(pField, csWValue) < 0)
return;
}
@@ -1224,12 +1225,15 @@ void CPDF_InterForm::FDF_ImportField(CPDF_Dictionary* pFieldDict,
}
if (bNotify && m_pFormNotify) {
- if (iType == FIELDTYPE_CHECKBOX || iType == FIELDTYPE_RADIOBUTTON)
+ if (fieldType == FormFieldType::kCheckBox ||
+ fieldType == FormFieldType::kRadioButton) {
m_pFormNotify->AfterCheckedStatusChange(pField);
- else if (iType == FIELDTYPE_LISTBOX)
+ } else if (fieldType == FormFieldType::kListBox) {
m_pFormNotify->AfterSelectionChange(pField);
- else if (iType == FIELDTYPE_COMBOBOX || iType == FIELDTYPE_TEXTFIELD)
+ } else if (fieldType == FormFieldType::kComboBox ||
+ fieldType == FormFieldType::kTextField) {
m_pFormNotify->AfterValueChange(pField);
+ }
}
}