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/fsdk_mgr.h" | 9 #include "../include/fsdk_mgr.h" |
10 #include "../include/fsdk_baseannot.h" | 10 #include "../include/fsdk_baseannot.h" |
(...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2522 | 2522 |
2523 CPDF_FormField* pFormField = (CPDF_FormField*)pField; | 2523 CPDF_FormField* pFormField = (CPDF_FormField*)pField; |
2524 int nType = pFormField->GetFieldType(); | 2524 int nType = pFormField->GetFieldType(); |
2525 | 2525 |
2526 if (nType == FIELDTYPE_COMBOBOX || nType == FIELDTYPE_TEXTFIELD) | 2526 if (nType == FIELDTYPE_COMBOBOX || nType == FIELDTYPE_TEXTFIELD) |
2527 { | 2527 { |
2528 this->OnCalculate(pFormField); | 2528 this->OnCalculate(pFormField); |
2529 FX_BOOL bFormated = FALSE; | 2529 FX_BOOL bFormated = FALSE; |
2530 CFX_WideString sValue = this->OnFormat(pFormField, 0, bFormated)
; | 2530 CFX_WideString sValue = this->OnFormat(pFormField, 0, bFormated)
; |
2531 if (bFormated) | 2531 if (bFormated) |
2532 » » » this->ResetFieldAppearance(pFormField, sValue, TRUE); | 2532 » » » this->ResetFieldAppearance(pFormField, sValue.c_str(), T
RUE); |
2533 else | 2533 else |
2534 this->ResetFieldAppearance(pFormField, NULL, TRUE); | 2534 this->ResetFieldAppearance(pFormField, NULL, TRUE); |
2535 this->UpdateField(pFormField); | 2535 this->UpdateField(pFormField); |
2536 } | 2536 } |
2537 | 2537 |
2538 return 0; | 2538 return 0; |
2539 } | 2539 } |
2540 | 2540 |
2541 int CPDFSDK_InterForm::BeforeSelectionChange(const CPDF_FormField* pField, C
FX_WideString& csValue) | 2541 int CPDFSDK_InterForm::BeforeSelectionChange(const CPDF_FormField* pField, C
FX_WideString& csValue) |
2542 { | 2542 { |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2996 | 2996 |
2997 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); | 2997 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); |
2998 ASSERT(pPDFAnnot != NULL); | 2998 ASSERT(pPDFAnnot != NULL); |
2999 | 2999 |
3000 CPDF_Rect rcAnnot; | 3000 CPDF_Rect rcAnnot; |
3001 pPDFAnnot->GetRect(rcAnnot); | 3001 pPDFAnnot->GetRect(rcAnnot); |
3002 | 3002 |
3003 return rcAnnot; | 3003 return rcAnnot; |
3004 } | 3004 } |
3005 | 3005 |
OLD | NEW |