| 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 "../../third_party/base/nonstd_unique_ptr.h" | 7 #include "../../third_party/base/nonstd_unique_ptr.h" |
| 8 #include "../include/fsdk_define.h" | 8 #include "../include/fsdk_define.h" |
| 9 #include "../include/fpdfxfa/fpdfxfa_doc.h" | 9 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
| 10 #include "../include/fpdfxfa/fpdfxfa_util.h" | 10 #include "../include/fpdfxfa/fpdfxfa_util.h" |
| (...skipping 3303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3314 SynchronizeField(pFormField, FALSE); | 3314 SynchronizeField(pFormField, FALSE); |
| 3315 | 3315 |
| 3316 int nType = pFormField->GetFieldType(); | 3316 int nType = pFormField->GetFieldType(); |
| 3317 | 3317 |
| 3318 if (nType == FIELDTYPE_COMBOBOX || nType == FIELDTYPE_TEXTFIELD) | 3318 if (nType == FIELDTYPE_COMBOBOX || nType == FIELDTYPE_TEXTFIELD) |
| 3319 { | 3319 { |
| 3320 this->OnCalculate(pFormField); | 3320 this->OnCalculate(pFormField); |
| 3321 FX_BOOL bFormated = FALSE; | 3321 FX_BOOL bFormated = FALSE; |
| 3322 CFX_WideString sValue = this->OnFormat(pFormField, 0, bFormated)
; | 3322 CFX_WideString sValue = this->OnFormat(pFormField, 0, bFormated)
; |
| 3323 if (bFormated) | 3323 if (bFormated) |
| 3324 » » » this->ResetFieldAppearance(pFormField, sValue, TRUE); | 3324 » » » this->ResetFieldAppearance(pFormField, sValue.c_str(), T
RUE); |
| 3325 else | 3325 else |
| 3326 this->ResetFieldAppearance(pFormField, NULL, TRUE); | 3326 this->ResetFieldAppearance(pFormField, NULL, TRUE); |
| 3327 this->UpdateField(pFormField); | 3327 this->UpdateField(pFormField); |
| 3328 } | 3328 } |
| 3329 | 3329 |
| 3330 return 0; | 3330 return 0; |
| 3331 } | 3331 } |
| 3332 | 3332 |
| 3333 int CPDFSDK_InterForm::BeforeSelectionChange(const CPDF_FormField* pField, C
FX_WideString& csValue) | 3333 int CPDFSDK_InterForm::BeforeSelectionChange(const CPDF_FormField* pField, C
FX_WideString& csValue) |
| 3334 { | 3334 { |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3788 | 3788 |
| 3789 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); | 3789 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); |
| 3790 ASSERT(pPDFAnnot != NULL); | 3790 ASSERT(pPDFAnnot != NULL); |
| 3791 | 3791 |
| 3792 CPDF_Rect rcAnnot; | 3792 CPDF_Rect rcAnnot; |
| 3793 pPDFAnnot->GetRect(rcAnnot); | 3793 pPDFAnnot->GetRect(rcAnnot); |
| 3794 | 3794 |
| 3795 return rcAnnot; | 3795 return rcAnnot; |
| 3796 } | 3796 } |
| 3797 | 3797 |
| OLD | NEW |