| 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 "core/fpdfapi/parser/cpdf_dictionary.h" | 7 #include "core/fpdfapi/parser/cpdf_dictionary.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 CFX_Matrix CPDF_Dictionary::GetMatrixFor(const CFX_ByteString& key) const { | 157 CFX_Matrix CPDF_Dictionary::GetMatrixFor(const CFX_ByteString& key) const { |
| 158 CFX_Matrix matrix; | 158 CFX_Matrix matrix; |
| 159 CPDF_Array* pArray = GetArrayFor(key); | 159 CPDF_Array* pArray = GetArrayFor(key); |
| 160 if (pArray) | 160 if (pArray) |
| 161 matrix = pArray->GetMatrix(); | 161 matrix = pArray->GetMatrix(); |
| 162 return matrix; | 162 return matrix; |
| 163 } | 163 } |
| 164 | 164 |
| 165 FX_BOOL CPDF_Dictionary::KeyExist(const CFX_ByteString& key) const { | 165 bool CPDF_Dictionary::KeyExist(const CFX_ByteString& key) const { |
| 166 return pdfium::ContainsKey(m_Map, key); | 166 return pdfium::ContainsKey(m_Map, key); |
| 167 } | 167 } |
| 168 | 168 |
| 169 bool CPDF_Dictionary::IsSignatureDict() const { | 169 bool CPDF_Dictionary::IsSignatureDict() const { |
| 170 CPDF_Object* pType = GetDirectObjectFor("Type"); | 170 CPDF_Object* pType = GetDirectObjectFor("Type"); |
| 171 if (!pType) | 171 if (!pType) |
| 172 pType = GetDirectObjectFor("FT"); | 172 pType = GetDirectObjectFor("FT"); |
| 173 return pType && pType->GetString() == "Sig"; | 173 return pType && pType->GetString() == "Sig"; |
| 174 } | 174 } |
| 175 | 175 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 pArray->AddNumber(matrix.c); | 266 pArray->AddNumber(matrix.c); |
| 267 pArray->AddNumber(matrix.d); | 267 pArray->AddNumber(matrix.d); |
| 268 pArray->AddNumber(matrix.e); | 268 pArray->AddNumber(matrix.e); |
| 269 pArray->AddNumber(matrix.f); | 269 pArray->AddNumber(matrix.f); |
| 270 SetFor(key, pArray); | 270 SetFor(key, pArray); |
| 271 } | 271 } |
| 272 | 272 |
| 273 CFX_ByteString CPDF_Dictionary::MaybeIntern(const CFX_ByteString& str) { | 273 CFX_ByteString CPDF_Dictionary::MaybeIntern(const CFX_ByteString& str) { |
| 274 return m_pPool ? m_pPool->Intern(str) : str; | 274 return m_pPool ? m_pPool->Intern(str) : str; |
| 275 } | 275 } |
| OLD | NEW |