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/cpdfsdk_formfillenvironment.h" | 7 #include "fpdfsdk/cpdfsdk_formfillenvironment.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "core/fpdfapi/parser/cpdf_array.h" | 11 #include "core/fpdfapi/parser/cpdf_array.h" |
12 #include "core/fpdfdoc/cpdf_docjsactions.h" | 12 #include "core/fpdfdoc/cpdf_docjsactions.h" |
13 #include "fpdfsdk/cpdfsdk_annothandlermgr.h" | 13 #include "fpdfsdk/cpdfsdk_annothandlermgr.h" |
14 #include "fpdfsdk/cpdfsdk_interform.h" | 14 #include "fpdfsdk/cpdfsdk_interform.h" |
15 #include "fpdfsdk/cpdfsdk_pageview.h" | 15 #include "fpdfsdk/cpdfsdk_pageview.h" |
16 #include "fpdfsdk/cpdfsdk_widget.h" | 16 #include "fpdfsdk/cpdfsdk_widget.h" |
17 #include "fpdfsdk/formfiller/cffl_interactiveformfiller.h" | 17 #include "fpdfsdk/formfiller/cffl_interactiveformfiller.h" |
18 #include "fpdfsdk/fsdk_actionhandler.h" | 18 #include "fpdfsdk/fsdk_actionhandler.h" |
19 #include "fpdfsdk/javascript/ijs_runtime.h" | 19 #include "fpdfsdk/javascript/ijs_runtime.h" |
20 #include "third_party/base/ptr_util.h" | 20 #include "third_party/base/ptr_util.h" |
21 | 21 |
22 #ifdef PDF_ENABLE_XFA | |
23 #include "fpdfsdk/fpdfxfa/cpdfxfa_app.h" | |
24 #endif // PDF_ENABLE_XFA | |
25 | |
26 namespace { | 22 namespace { |
27 | 23 |
28 // NOTE: |bsUTF16LE| must outlive the use of the result. Care must be taken | 24 // NOTE: |bsUTF16LE| must outlive the use of the result. Care must be taken |
29 // since modifying the result would impact |bsUTF16LE|. | 25 // since modifying the result would impact |bsUTF16LE|. |
30 FPDF_WIDESTRING AsFPDFWideString(CFX_ByteString* bsUTF16LE) { | 26 FPDF_WIDESTRING AsFPDFWideString(CFX_ByteString* bsUTF16LE) { |
31 return reinterpret_cast<FPDF_WIDESTRING>( | 27 return reinterpret_cast<FPDF_WIDESTRING>( |
32 bsUTF16LE->GetBuffer(bsUTF16LE->GetLength())); | 28 bsUTF16LE->GetBuffer(bsUTF16LE->GetLength())); |
33 } | 29 } |
34 | 30 |
35 } // namespace | 31 } // namespace |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 } else { | 751 } else { |
756 m_pFocusAnnot.Reset(pFocusAnnot.Get()); | 752 m_pFocusAnnot.Reset(pFocusAnnot.Get()); |
757 } | 753 } |
758 } | 754 } |
759 return FALSE; | 755 return FALSE; |
760 } | 756 } |
761 | 757 |
762 FX_BOOL CPDFSDK_FormFillEnvironment::GetPermissions(int nFlag) { | 758 FX_BOOL CPDFSDK_FormFillEnvironment::GetPermissions(int nFlag) { |
763 return !!(GetPDFDocument()->GetUserPermissions() & nFlag); | 759 return !!(GetPDFDocument()->GetUserPermissions() & nFlag); |
764 } | 760 } |
OLD | NEW |