Chromium Code Reviews| Index: fpdfsdk/javascript/Field.cpp |
| diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp |
| index 3f5e5e1b0f57ae9aabb2675b4a0705d8e1bee752..ba689907a51edff42f41c484e1d60c41bd91181a 100644 |
| --- a/fpdfsdk/javascript/Field.cpp |
| +++ b/fpdfsdk/javascript/Field.cpp |
| @@ -269,12 +269,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); |
| + CFX_Observable<CPDFSDK_Annot>::Observer observer(&pAnnot); |
| + CFX_WideString sValue = |
|
Tom Sepez
2016/09/07 16:54:47
Note: I put back two casts to eliminate being conf
|
| + 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 { |