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); |
70 void SetRectFor(const CFX_ByteString& key, const CFX_FloatRect& rect); | 73 void SetRectFor(const CFX_ByteString& key, const CFX_FloatRect& rect); |
71 void SetMatrixFor(const CFX_ByteString& key, const CFX_Matrix& matrix); | 74 void SetMatrixFor(const CFX_ByteString& key, const CFX_Matrix& matrix); |
72 void SetBooleanFor(const CFX_ByteString& key, bool bValue); | 75 void SetBooleanFor(const CFX_ByteString& key, bool bValue); |
73 | 76 |
74 void ConvertToIndirectObjectFor(const CFX_ByteString& key, | 77 void ConvertToIndirectObjectFor(const CFX_ByteString& key, |
75 CPDF_IndirectObjectHolder* pHolder); | 78 CPDF_IndirectObjectHolder* pHolder); |
76 | 79 |
77 // Invalidates iterators for the element with the key |key|. | 80 // Invalidates iterators for the element with the key |key|. |
78 void RemoveFor(const CFX_ByteString& key); | 81 void RemoveFor(const CFX_ByteString& key); |
79 | 82 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 115 |
113 inline UniqueDictionary ToDictionary(UniqueObject obj) { | 116 inline UniqueDictionary ToDictionary(UniqueObject obj) { |
114 CPDF_Dictionary* pDict = ToDictionary(obj.get()); | 117 CPDF_Dictionary* pDict = ToDictionary(obj.get()); |
115 if (!pDict) | 118 if (!pDict) |
116 return nullptr; | 119 return nullptr; |
117 obj.release(); | 120 obj.release(); |
118 return UniqueDictionary(pDict); | 121 return UniqueDictionary(pDict); |
119 } | 122 } |
120 | 123 |
121 #endif // CORE_FPDFAPI_PARSER_CPDF_DICTIONARY_H_ | 124 #endif // CORE_FPDFAPI_PARSER_CPDF_DICTIONARY_H_ |
OLD | NEW |