summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_widgethandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/cpdfsdk_widgethandler.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_widgethandler.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/fpdfsdk/cpdfsdk_widgethandler.cpp b/fpdfsdk/cpdfsdk_widgethandler.cpp
index 3eb8e5d364..dcce7b6017 100644
--- a/fpdfsdk/cpdfsdk_widgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_widgethandler.cpp
@@ -43,7 +43,7 @@ bool CPDFSDK_WidgetHandler::CanAnswer(CPDFSDK_Annot* pAnnot) {
if ((nFieldFlags & FIELDFLAG_READONLY) == FIELDFLAG_READONLY)
return false;
- if (pWidget->GetFieldType() == FIELDTYPE_PUSHBUTTON)
+ if (pWidget->GetFieldType() == FormFieldType::kPushButton)
return true;
CPDF_Page* pPage = pWidget->GetPDFPage();
@@ -227,15 +227,16 @@ void CPDFSDK_WidgetHandler::OnLoad(CPDFSDK_Annot* pAnnot) {
if (!pWidget->IsAppearanceValid())
pWidget->ResetAppearance(nullptr, false);
- int nFieldType = pWidget->GetFieldType();
- if (nFieldType == FIELDTYPE_TEXTFIELD || nFieldType == FIELDTYPE_COMBOBOX) {
+ FormFieldType fieldType = pWidget->GetFieldType();
+ if (fieldType == FormFieldType::kTextField ||
+ fieldType == FormFieldType::kComboBox) {
bool bFormatted = false;
CPDFSDK_Annot::ObservedPtr pObserved(pWidget);
WideString sValue = pWidget->OnFormat(bFormatted);
if (!pObserved)
return;
- if (bFormatted && nFieldType == FIELDTYPE_COMBOBOX)
+ if (bFormatted && fieldType == FormFieldType::kComboBox)
pWidget->ResetAppearance(&sValue, false);
}