OLD | NEW |
| (Empty) |
1 // Copyright 2015 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef CORE_FPDFDOC_DOC_UTILS_H_ | |
8 #define CORE_FPDFDOC_DOC_UTILS_H_ | |
9 | |
10 #include <vector> | |
11 | |
12 #include "core/fpdfapi/fpdf_parser/include/cpdf_parser.h" | |
13 | |
14 class CPDF_Dictionary; | |
15 class CPDF_FormField; | |
16 | |
17 class CPDF_NumberTree { | |
18 public: | |
19 CPDF_NumberTree(CPDF_Dictionary* pRoot) : m_pRoot(pRoot) {} | |
20 CPDF_Object* LookupValue(int num) const; | |
21 | |
22 protected: | |
23 CPDF_Dictionary* const m_pRoot; | |
24 }; | |
25 | |
26 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict); | |
27 void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Document* pDocument); | |
28 uint32_t CountInterFormFonts(CPDF_Dictionary* pFormDict); | |
29 CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict, | |
30 CPDF_Document* pDocument, | |
31 uint32_t index, | |
32 CFX_ByteString& csNameTag); | |
33 CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict, | |
34 CPDF_Document* pDocument, | |
35 CFX_ByteString csNameTag); | |
36 CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict, | |
37 CPDF_Document* pDocument, | |
38 CFX_ByteString csFontName, | |
39 CFX_ByteString& csNameTag); | |
40 CPDF_Font* GetNativeInterFormFont(CPDF_Dictionary* pFormDict, | |
41 CPDF_Document* pDocument, | |
42 uint8_t charSet, | |
43 CFX_ByteString& csNameTag); | |
44 CPDF_Font* GetNativeInterFormFont(CPDF_Dictionary* pFormDict, | |
45 CPDF_Document* pDocument, | |
46 CFX_ByteString& csNameTag); | |
47 FX_BOOL FindInterFormFont(CPDF_Dictionary* pFormDict, | |
48 const CPDF_Font* pFont, | |
49 CFX_ByteString& csNameTag); | |
50 FX_BOOL FindInterFormFont(CPDF_Dictionary* pFormDict, | |
51 CPDF_Document* pDocument, | |
52 CFX_ByteString csFontName, | |
53 CPDF_Font*& pFont, | |
54 CFX_ByteString& csNameTag); | |
55 void AddInterFormFont(CPDF_Dictionary*& pFormDict, | |
56 CPDF_Document* pDocument, | |
57 const CPDF_Font* pFont, | |
58 CFX_ByteString& csNameTag); | |
59 CPDF_Font* AddNativeInterFormFont(CPDF_Dictionary*& pFormDict, | |
60 CPDF_Document* pDocument, | |
61 uint8_t charSet, | |
62 CFX_ByteString& csNameTag); | |
63 CPDF_Font* AddNativeInterFormFont(CPDF_Dictionary*& pFormDict, | |
64 CPDF_Document* pDocument, | |
65 CFX_ByteString& csNameTag); | |
66 void RemoveInterFormFont(CPDF_Dictionary* pFormDict, const CPDF_Font* pFont); | |
67 void RemoveInterFormFont(CPDF_Dictionary* pFormDict, CFX_ByteString csNameTag); | |
68 CPDF_Font* GetDefaultInterFormFont(CPDF_Dictionary* pFormDict, | |
69 CPDF_Document* pDocument); | |
70 void SetDefaultInterFormFont(CPDF_Dictionary*& pFormDict, | |
71 CPDF_Document* pDocument, | |
72 const CPDF_Font* pFont); | |
73 std::vector<bool> SaveCheckedFieldStatus(CPDF_FormField* pField); | |
74 FX_BOOL NeedPDFEncodeForFieldFullName(const CFX_WideString& csFieldName); | |
75 FX_BOOL NeedPDFEncodeForFieldTree(CPDF_Dictionary* pFieldDict, int nLevel = 0); | |
76 void EncodeFieldName(const CFX_WideString& csName, CFX_ByteString& csT); | |
77 void UpdateEncodeFieldName(CPDF_Dictionary* pFieldDict, int nLevel = 0); | |
78 | |
79 #endif // CORE_FPDFDOC_DOC_UTILS_H_ | |
OLD | NEW |