| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "fpdfsdk/javascript/Field.h" | 7 #include "fpdfsdk/javascript/Field.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 ASSERT(pFormControl); | 303 ASSERT(pFormControl); |
| 304 | 304 |
| 305 CPDFSDK_InterForm* pForm = pDocument->GetInterForm(); | 305 CPDFSDK_InterForm* pForm = pDocument->GetInterForm(); |
| 306 CPDFSDK_Widget* pWidget = pForm->GetWidget(pFormControl, false); | 306 CPDFSDK_Widget* pWidget = pForm->GetWidget(pFormControl, false); |
| 307 | 307 |
| 308 if (pWidget) { | 308 if (pWidget) { |
| 309 if (bResetAP) { | 309 if (bResetAP) { |
| 310 int nFieldType = pWidget->GetFieldType(); | 310 int nFieldType = pWidget->GetFieldType(); |
| 311 if (nFieldType == FIELDTYPE_COMBOBOX || | 311 if (nFieldType == FIELDTYPE_COMBOBOX || |
| 312 nFieldType == FIELDTYPE_TEXTFIELD) { | 312 nFieldType == FIELDTYPE_TEXTFIELD) { |
| 313 FX_BOOL bFormated = FALSE; | 313 FX_BOOL bFormatted = FALSE; |
| 314 CFX_WideString sValue = pWidget->OnFormat(bFormated); | 314 CFX_WideString sValue = pWidget->OnFormat(bFormatted); |
| 315 if (bFormated) | 315 if (bFormatted) |
| 316 pWidget->ResetAppearance(sValue.c_str(), FALSE); | 316 pWidget->ResetAppearance(sValue.c_str(), FALSE); |
| 317 else | 317 else |
| 318 pWidget->ResetAppearance(nullptr, FALSE); | 318 pWidget->ResetAppearance(nullptr, FALSE); |
| 319 } else { | 319 } else { |
| 320 pWidget->ResetAppearance(nullptr, FALSE); | 320 pWidget->ResetAppearance(nullptr, FALSE); |
| 321 } | 321 } |
| 322 } | 322 } |
| 323 | 323 |
| 324 if (bRefresh) { | 324 if (bRefresh) { |
| 325 CPDFSDK_InterForm* pInterForm = pWidget->GetInterForm(); | 325 CPDFSDK_InterForm* pInterForm = pWidget->GetInterForm(); |
| (...skipping 3145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3471 } | 3471 } |
| 3472 } | 3472 } |
| 3473 | 3473 |
| 3474 void Field::AddField(CPDFSDK_Document* pDocument, | 3474 void Field::AddField(CPDFSDK_Document* pDocument, |
| 3475 int nPageIndex, | 3475 int nPageIndex, |
| 3476 int nFieldType, | 3476 int nFieldType, |
| 3477 const CFX_WideString& sName, | 3477 const CFX_WideString& sName, |
| 3478 const CFX_FloatRect& rcCoords) { | 3478 const CFX_FloatRect& rcCoords) { |
| 3479 // Not supported. | 3479 // Not supported. |
| 3480 } | 3480 } |
| OLD | NEW |