summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Field.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/Field.cpp')
-rw-r--r--fpdfsdk/javascript/Field.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index 64c7735dcf..1f49482375 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -270,12 +270,12 @@ void Field::UpdateFormField(CPDFSDK_Document* pDocument,
if (nFieldType == FIELDTYPE_COMBOBOX || nFieldType == FIELDTYPE_TEXTFIELD) {
for (CPDFSDK_Annot* pAnnot : widgets) {
FX_BOOL bFormatted = FALSE;
- CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot);
- CPDFSDK_Widget::Observer observer(&pAnnot);
- CFX_WideString sValue = pWidget->OnFormat(bFormatted);
+ CPDFSDK_Annot::Observer observer(&pAnnot);
+ CFX_WideString sValue =
+ static_cast<CPDFSDK_Widget*>(pAnnot)->OnFormat(bFormatted);
if (pAnnot) {
- pWidget->ResetAppearance(bFormatted ? sValue.c_str() : nullptr,
- FALSE);
+ static_cast<CPDFSDK_Widget*>(pAnnot)->ResetAppearance(
+ bFormatted ? sValue.c_str() : nullptr, FALSE);
}
}
} else {