OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/cpdfsdk_interform.h" | 7 #include "fpdfsdk/include/cpdfsdk_interform.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 m_XFAMap.clear(); | 64 m_XFAMap.clear(); |
65 #endif // PDF_ENABLE_XFA | 65 #endif // PDF_ENABLE_XFA |
66 } | 66 } |
67 | 67 |
68 FX_BOOL CPDFSDK_InterForm::HighlightWidgets() { | 68 FX_BOOL CPDFSDK_InterForm::HighlightWidgets() { |
69 return FALSE; | 69 return FALSE; |
70 } | 70 } |
71 | 71 |
72 CPDFSDK_Widget* CPDFSDK_InterForm::GetSibling(CPDFSDK_Widget* pWidget, | 72 CPDFSDK_Widget* CPDFSDK_InterForm::GetSibling(CPDFSDK_Widget* pWidget, |
73 FX_BOOL bNext) const { | 73 FX_BOOL bNext) const { |
74 std::unique_ptr<CBA_AnnotIterator> pIterator( | 74 std::unique_ptr<CBA_AnnotIterator> pIterator(new CBA_AnnotIterator( |
75 new CBA_AnnotIterator(pWidget->GetPageView(), "Widget")); | 75 pWidget->GetPageView(), CPDF_Annot::Subtype::WIDGET)); |
76 | 76 |
77 if (bNext) | 77 if (bNext) |
78 return static_cast<CPDFSDK_Widget*>(pIterator->GetNextAnnot(pWidget)); | 78 return static_cast<CPDFSDK_Widget*>(pIterator->GetNextAnnot(pWidget)); |
79 | 79 |
80 return static_cast<CPDFSDK_Widget*>(pIterator->GetPrevAnnot(pWidget)); | 80 return static_cast<CPDFSDK_Widget*>(pIterator->GetPrevAnnot(pWidget)); |
81 } | 81 } |
82 | 82 |
83 CPDFSDK_Widget* CPDFSDK_InterForm::GetWidget(CPDF_FormControl* pControl, | 83 CPDFSDK_Widget* CPDFSDK_InterForm::GetWidget(CPDF_FormControl* pControl, |
84 bool createIfNeeded) const { | 84 bool createIfNeeded) const { |
85 if (!pControl || !m_pInterForm) | 85 if (!pControl || !m_pInterForm) |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 } | 717 } |
718 } | 718 } |
719 | 719 |
720 FX_COLORREF CPDFSDK_InterForm::GetHighlightColor(int nFieldType) { | 720 FX_COLORREF CPDFSDK_InterForm::GetHighlightColor(int nFieldType) { |
721 if (nFieldType < 0 || nFieldType > kNumFieldTypes) | 721 if (nFieldType < 0 || nFieldType > kNumFieldTypes) |
722 return FXSYS_RGB(255, 255, 255); | 722 return FXSYS_RGB(255, 255, 255); |
723 if (nFieldType == 0) | 723 if (nFieldType == 0) |
724 return m_aHighlightColor[0]; | 724 return m_aHighlightColor[0]; |
725 return m_aHighlightColor[nFieldType - 1]; | 725 return m_aHighlightColor[nFieldType - 1]; |
726 } | 726 } |
OLD | NEW |