Chromium Code Reviews| Index: fpdfsdk/javascript/Field.cpp |
| diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp |
| index 5c279d6b53a9839a077efca1d18e66f045f9b531..3209efc6e8976e29f24f05473e4511f436a6745e 100644 |
| --- a/fpdfsdk/javascript/Field.cpp |
| +++ b/fpdfsdk/javascript/Field.cpp |
| @@ -267,9 +267,10 @@ void Field::UpdateFormField(CPDFSDK_Document* pDocument, |
| if (bResetAP) { |
| int nFieldType = pFormField->GetFieldType(); |
| if (nFieldType == FIELDTYPE_COMBOBOX || nFieldType == FIELDTYPE_TEXTFIELD) { |
| - for (CPDFSDK_Widget* pWidget : widgets) { |
| + for (CPDFSDK_Annot* pAnnot : widgets) { |
| FX_BOOL bFormatted = FALSE; |
| - CPDFSDK_Widget::Observer observer(&pWidget); |
| + CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot); |
| + CPDFSDK_Widget::Observer observer(&pAnnot); |
| CFX_WideString sValue = pWidget->OnFormat(bFormatted); |
| if (pWidget) { |
|
Tom Sepez
2016/09/01 20:06:23
Need to check pannot here, its the thing that gets
dsinclair
2016/09/06 15:44:49
Done.
Not sure what you're referring to about the
|
| pWidget->ResetAppearance(bFormatted ? sValue.c_str() : nullptr, |