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/include/fsdk_baseform.h" | 7 #include "fpdfsdk/include/fsdk_baseform.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2664 int CPDFSDK_InterForm::AfterSelectionChange(const CPDF_FormField* pField) { | 2664 int CPDFSDK_InterForm::AfterSelectionChange(const CPDF_FormField* pField) { |
2665 CPDF_FormField* pFormField = (CPDF_FormField*)pField; | 2665 CPDF_FormField* pFormField = (CPDF_FormField*)pField; |
2666 if (pFormField->GetFieldType() == FIELDTYPE_LISTBOX) { | 2666 if (pFormField->GetFieldType() == FIELDTYPE_LISTBOX) { |
2667 OnCalculate(pFormField); | 2667 OnCalculate(pFormField); |
2668 ResetFieldAppearance(pFormField, NULL, TRUE); | 2668 ResetFieldAppearance(pFormField, NULL, TRUE); |
2669 UpdateField(pFormField); | 2669 UpdateField(pFormField); |
2670 } | 2670 } |
2671 return 0; | 2671 return 0; |
2672 } | 2672 } |
2673 | 2673 |
2674 int CPDFSDK_InterForm::AfterCheckedStatusChange( | 2674 void CPDFSDK_InterForm::AfterCheckedStatusChange(CPDF_FormField* pField) { |
2675 const CPDF_FormField* pField, | 2675 int nType = pField->GetFieldType(); |
2676 const CFX_ByteArray& statusArray) { | |
2677 CPDF_FormField* pFormField = (CPDF_FormField*)pField; | |
2678 int nType = pFormField->GetFieldType(); | |
2679 if (nType == FIELDTYPE_CHECKBOX || nType == FIELDTYPE_RADIOBUTTON) { | 2676 if (nType == FIELDTYPE_CHECKBOX || nType == FIELDTYPE_RADIOBUTTON) { |
2680 OnCalculate(pFormField); | 2677 OnCalculate(pField); |
2681 UpdateField(pFormField); | 2678 UpdateField(pField); |
2682 } | 2679 } |
2683 return 0; | |
2684 } | 2680 } |
2685 | 2681 |
2686 int CPDFSDK_InterForm::BeforeFormReset(const CPDF_InterForm* pForm) { | 2682 int CPDFSDK_InterForm::BeforeFormReset(const CPDF_InterForm* pForm) { |
2687 return 0; | 2683 return 0; |
2688 } | 2684 } |
2689 | 2685 |
2690 int CPDFSDK_InterForm::AfterFormReset(const CPDF_InterForm* pForm) { | 2686 int CPDFSDK_InterForm::AfterFormReset(const CPDF_InterForm* pForm) { |
2691 OnCalculate(nullptr); | 2687 OnCalculate(nullptr); |
2692 return 0; | 2688 return 0; |
2693 } | 2689 } |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2893 break; | 2889 break; |
2894 } | 2890 } |
2895 } | 2891 } |
2896 } | 2892 } |
2897 | 2893 |
2898 CPDF_Rect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { | 2894 CPDF_Rect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { |
2899 CPDF_Rect rcAnnot; | 2895 CPDF_Rect rcAnnot; |
2900 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); | 2896 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); |
2901 return rcAnnot; | 2897 return rcAnnot; |
2902 } | 2898 } |
OLD | NEW |