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/cpdfsdk_interform.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "core/fpdfapi/fpdf_page/cpdf_page.h" | 13 #include "core/fpdfapi/fpdf_page/cpdf_page.h" |
14 #include "core/fpdfapi/fpdf_parser/cfdf_document.h" | 14 #include "core/fpdfapi/fpdf_parser/cfdf_document.h" |
15 #include "core/fpdfapi/fpdf_parser/cpdf_array.h" | 15 #include "core/fpdfapi/fpdf_parser/cpdf_array.h" |
16 #include "core/fpdfapi/fpdf_parser/cpdf_document.h" | 16 #include "core/fpdfapi/fpdf_parser/cpdf_document.h" |
17 #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" | 17 #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" |
18 #include "core/fpdfdoc/cpdf_actionfields.h" | 18 #include "core/fpdfdoc/cpdf_actionfields.h" |
19 #include "core/fpdfdoc/cpdf_interform.h" | 19 #include "core/fpdfdoc/cpdf_interform.h" |
20 #include "core/fxge/cfx_graphstatedata.h" | 20 #include "core/fxge/cfx_graphstatedata.h" |
21 #include "core/fxge/cfx_pathdata.h" | 21 #include "core/fxge/cfx_pathdata.h" |
22 #include "core/fxge/cfx_renderdevice.h" | 22 #include "core/fxge/cfx_renderdevice.h" |
| 23 #include "fpdfsdk/cba_annotiterator.h" |
| 24 #include "fpdfsdk/cpdfsdk_annot.h" |
| 25 #include "fpdfsdk/cpdfsdk_document.h" |
| 26 #include "fpdfsdk/cpdfsdk_environment.h" |
| 27 #include "fpdfsdk/cpdfsdk_pageview.h" |
| 28 #include "fpdfsdk/cpdfsdk_widget.h" |
23 #include "fpdfsdk/formfiller/cffl_formfiller.h" | 29 #include "fpdfsdk/formfiller/cffl_formfiller.h" |
| 30 #include "fpdfsdk/fsdk_actionhandler.h" |
| 31 #include "fpdfsdk/fsdk_define.h" |
24 #include "fpdfsdk/fxedit/fxet_edit.h" | 32 #include "fpdfsdk/fxedit/fxet_edit.h" |
25 #include "fpdfsdk/include/cba_annotiterator.h" | 33 #include "fpdfsdk/ipdfsdk_annothandler.h" |
26 #include "fpdfsdk/include/cpdfsdk_annot.h" | |
27 #include "fpdfsdk/include/cpdfsdk_document.h" | |
28 #include "fpdfsdk/include/cpdfsdk_environment.h" | |
29 #include "fpdfsdk/include/cpdfsdk_pageview.h" | |
30 #include "fpdfsdk/include/cpdfsdk_widget.h" | |
31 #include "fpdfsdk/include/fsdk_actionhandler.h" | |
32 #include "fpdfsdk/include/fsdk_define.h" | |
33 #include "fpdfsdk/include/ipdfsdk_annothandler.h" | |
34 #include "fpdfsdk/javascript/ijs_context.h" | 34 #include "fpdfsdk/javascript/ijs_context.h" |
35 #include "fpdfsdk/javascript/ijs_runtime.h" | 35 #include "fpdfsdk/javascript/ijs_runtime.h" |
36 #include "fpdfsdk/pdfwindow/PWL_Utils.h" | 36 #include "fpdfsdk/pdfwindow/PWL_Utils.h" |
37 #include "third_party/base/stl_util.h" | 37 #include "third_party/base/stl_util.h" |
38 | 38 |
39 #ifdef PDF_ENABLE_XFA | 39 #ifdef PDF_ENABLE_XFA |
| 40 #include "fpdfsdk/cpdfsdk_xfawidget.h" |
40 #include "fpdfsdk/fpdfxfa/fpdfxfa_doc.h" | 41 #include "fpdfsdk/fpdfxfa/fpdfxfa_doc.h" |
41 #include "fpdfsdk/fpdfxfa/fpdfxfa_util.h" | 42 #include "fpdfsdk/fpdfxfa/fpdfxfa_util.h" |
42 #include "fpdfsdk/include/cpdfsdk_xfawidget.h" | |
43 #include "xfa/fxfa/include/cxfa_eventparam.h" | 43 #include "xfa/fxfa/include/cxfa_eventparam.h" |
44 #include "xfa/fxfa/include/xfa_ffdocview.h" | 44 #include "xfa/fxfa/include/xfa_ffdocview.h" |
45 #include "xfa/fxfa/include/xfa_ffwidget.h" | 45 #include "xfa/fxfa/include/xfa_ffwidget.h" |
46 #include "xfa/fxfa/include/xfa_ffwidgethandler.h" | 46 #include "xfa/fxfa/include/xfa_ffwidgethandler.h" |
47 #endif // PDF_ENABLE_XFA | 47 #endif // PDF_ENABLE_XFA |
48 | 48 |
49 CPDFSDK_InterForm::CPDFSDK_InterForm(CPDFSDK_Document* pDocument) | 49 CPDFSDK_InterForm::CPDFSDK_InterForm(CPDFSDK_Document* pDocument) |
50 : m_pDocument(pDocument), | 50 : m_pDocument(pDocument), |
51 m_pInterForm(new CPDF_InterForm(m_pDocument->GetPDFDocument())), | 51 m_pInterForm(new CPDF_InterForm(m_pDocument->GetPDFDocument())), |
52 #ifdef PDF_ENABLE_XFA | 52 #ifdef PDF_ENABLE_XFA |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 } | 721 } |
722 } | 722 } |
723 | 723 |
724 FX_COLORREF CPDFSDK_InterForm::GetHighlightColor(int nFieldType) { | 724 FX_COLORREF CPDFSDK_InterForm::GetHighlightColor(int nFieldType) { |
725 if (nFieldType < 0 || nFieldType > kNumFieldTypes) | 725 if (nFieldType < 0 || nFieldType > kNumFieldTypes) |
726 return FXSYS_RGB(255, 255, 255); | 726 return FXSYS_RGB(255, 255, 255); |
727 if (nFieldType == 0) | 727 if (nFieldType == 0) |
728 return m_aHighlightColor[0]; | 728 return m_aHighlightColor[0]; |
729 return m_aHighlightColor[nFieldType - 1]; | 729 return m_aHighlightColor[nFieldType - 1]; |
730 } | 730 } |
OLD | NEW |