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 #ifndef CORE_FPDFAPI_PARSER_CPDF_DICTIONARY_H_ | 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_DICTIONARY_H_ |
8 #define CORE_FPDFAPI_PARSER_CPDF_DICTIONARY_H_ | 8 #define CORE_FPDFAPI_PARSER_CPDF_DICTIONARY_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 // Set* functions invalidate iterators for the element with the key |key|. | 61 // Set* functions invalidate iterators for the element with the key |key|. |
62 void SetFor(const CFX_ByteString& key, CPDF_Object* pObj); | 62 void SetFor(const CFX_ByteString& key, CPDF_Object* pObj); |
63 void SetNameFor(const CFX_ByteString& key, const CFX_ByteString& name); | 63 void SetNameFor(const CFX_ByteString& key, const CFX_ByteString& name); |
64 void SetStringFor(const CFX_ByteString& key, const CFX_ByteString& str); | 64 void SetStringFor(const CFX_ByteString& key, const CFX_ByteString& str); |
65 void SetIntegerFor(const CFX_ByteString& key, int i); | 65 void SetIntegerFor(const CFX_ByteString& key, int i); |
66 void SetNumberFor(const CFX_ByteString& key, FX_FLOAT f); | 66 void SetNumberFor(const CFX_ByteString& key, FX_FLOAT f); |
67 void SetReferenceFor(const CFX_ByteString& key, | 67 void SetReferenceFor(const CFX_ByteString& key, |
68 CPDF_IndirectObjectHolder* pDoc, | 68 CPDF_IndirectObjectHolder* pDoc, |
69 uint32_t objnum); | 69 uint32_t objnum); |
70 void SetReferenceFor(const CFX_ByteString& key, | |
71 CPDF_IndirectObjectHolder* pDoc, | |
72 const CPDF_Object* objnum); | |
73 void SetRectFor(const CFX_ByteString& key, const CFX_FloatRect& rect); | 70 void SetRectFor(const CFX_ByteString& key, const CFX_FloatRect& rect); |
74 void SetMatrixFor(const CFX_ByteString& key, const CFX_Matrix& matrix); | 71 void SetMatrixFor(const CFX_ByteString& key, const CFX_Matrix& matrix); |
75 void SetBooleanFor(const CFX_ByteString& key, bool bValue); | 72 void SetBooleanFor(const CFX_ByteString& key, bool bValue); |
76 | 73 |
77 void ConvertToIndirectObjectFor(const CFX_ByteString& key, | 74 void ConvertToIndirectObjectFor(const CFX_ByteString& key, |
78 CPDF_IndirectObjectHolder* pHolder); | 75 CPDF_IndirectObjectHolder* pHolder); |
79 | 76 |
80 // Invalidates iterators for the element with the key |key|. | 77 // Invalidates iterators for the element with the key |key|. |
81 void RemoveFor(const CFX_ByteString& key); | 78 void RemoveFor(const CFX_ByteString& key); |
82 | 79 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 112 |
116 inline UniqueDictionary ToDictionary(UniqueObject obj) { | 113 inline UniqueDictionary ToDictionary(UniqueObject obj) { |
117 CPDF_Dictionary* pDict = ToDictionary(obj.get()); | 114 CPDF_Dictionary* pDict = ToDictionary(obj.get()); |
118 if (!pDict) | 115 if (!pDict) |
119 return nullptr; | 116 return nullptr; |
120 obj.release(); | 117 obj.release(); |
121 return UniqueDictionary(pDict); | 118 return UniqueDictionary(pDict); |
122 } | 119 } |
123 | 120 |
124 #endif // CORE_FPDFAPI_PARSER_CPDF_DICTIONARY_H_ | 121 #endif // CORE_FPDFAPI_PARSER_CPDF_DICTIONARY_H_ |
OLD | NEW |