OLD | NEW |
1 // Copyright 2015 PDFium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CORE_FPDFDOC_DOC_UTILS_H_ | 7 #ifndef CORE_FPDFDOC_DOC_UTILS_H_ |
8 #define CORE_FPDFDOC_DOC_UTILS_H_ | 8 #define CORE_FPDFDOC_DOC_UTILS_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "core/fpdfapi/fpdf_parser/include/cpdf_parser.h" | 12 #include "core/fpdfapi/fpdf_parser/include/cpdf_parser.h" |
13 | 13 |
14 class CPDF_Dictionary; | 14 class CPDF_Dictionary; |
15 class CPDF_FormField; | 15 class CPDF_FormField; |
16 | 16 |
17 class CPDF_NumberTree { | 17 class CPDF_NumberTree { |
18 public: | 18 public: |
19 CPDF_NumberTree(CPDF_Dictionary* pRoot) : m_pRoot(pRoot) {} | 19 CPDF_NumberTree(CPDF_Dictionary* pRoot) : m_pRoot(pRoot) {} |
20 CPDF_Object* LookupValue(int num) const; | 20 CPDF_Object* LookupValue(int num) const; |
21 | 21 |
22 protected: | 22 protected: |
23 CPDF_Dictionary* const m_pRoot; | 23 CPDF_Dictionary* const m_pRoot; |
24 }; | 24 }; |
25 | 25 |
26 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict); | 26 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict); |
27 void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Document* pDocument); | 27 void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Document* pDocument); |
28 FX_DWORD CountInterFormFonts(CPDF_Dictionary* pFormDict); | 28 uint32_t CountInterFormFonts(CPDF_Dictionary* pFormDict); |
29 CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict, | 29 CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict, |
30 CPDF_Document* pDocument, | 30 CPDF_Document* pDocument, |
31 FX_DWORD index, | 31 uint32_t index, |
32 CFX_ByteString& csNameTag); | 32 CFX_ByteString& csNameTag); |
33 CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict, | 33 CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict, |
34 CPDF_Document* pDocument, | 34 CPDF_Document* pDocument, |
35 CFX_ByteString csNameTag); | 35 CFX_ByteString csNameTag); |
36 CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict, | 36 CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict, |
37 CPDF_Document* pDocument, | 37 CPDF_Document* pDocument, |
38 CFX_ByteString csFontName, | 38 CFX_ByteString csFontName, |
39 CFX_ByteString& csNameTag); | 39 CFX_ByteString& csNameTag); |
40 CPDF_Font* GetNativeInterFormFont(CPDF_Dictionary* pFormDict, | 40 CPDF_Font* GetNativeInterFormFont(CPDF_Dictionary* pFormDict, |
41 CPDF_Document* pDocument, | 41 CPDF_Document* pDocument, |
(...skipping 28 matching lines...) Expand all Loading... |
70 void SetDefaultInterFormFont(CPDF_Dictionary*& pFormDict, | 70 void SetDefaultInterFormFont(CPDF_Dictionary*& pFormDict, |
71 CPDF_Document* pDocument, | 71 CPDF_Document* pDocument, |
72 const CPDF_Font* pFont); | 72 const CPDF_Font* pFont); |
73 std::vector<bool> SaveCheckedFieldStatus(CPDF_FormField* pField); | 73 std::vector<bool> SaveCheckedFieldStatus(CPDF_FormField* pField); |
74 FX_BOOL NeedPDFEncodeForFieldFullName(const CFX_WideString& csFieldName); | 74 FX_BOOL NeedPDFEncodeForFieldFullName(const CFX_WideString& csFieldName); |
75 FX_BOOL NeedPDFEncodeForFieldTree(CPDF_Dictionary* pFieldDict, int nLevel = 0); | 75 FX_BOOL NeedPDFEncodeForFieldTree(CPDF_Dictionary* pFieldDict, int nLevel = 0); |
76 void EncodeFieldName(const CFX_WideString& csName, CFX_ByteString& csT); | 76 void EncodeFieldName(const CFX_WideString& csName, CFX_ByteString& csT); |
77 void UpdateEncodeFieldName(CPDF_Dictionary* pFieldDict, int nLevel = 0); | 77 void UpdateEncodeFieldName(CPDF_Dictionary* pFieldDict, int nLevel = 0); |
78 | 78 |
79 #endif // CORE_FPDFDOC_DOC_UTILS_H_ | 79 #endif // CORE_FPDFDOC_DOC_UTILS_H_ |
OLD | NEW |