| 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/fpdf_parser/include/cpdf_dictionary.h" | 7 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_parser/cpdf_boolean.h" | 9 #include "core/fpdfapi/fpdf_parser/cpdf_boolean.h" |
| 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 SetAt(key, new CPDF_Name(name)); | 222 SetAt(key, new CPDF_Name(name)); |
| 223 } | 223 } |
| 224 | 224 |
| 225 void CPDF_Dictionary::SetAtString(const CFX_ByteStringC& key, | 225 void CPDF_Dictionary::SetAtString(const CFX_ByteStringC& key, |
| 226 const CFX_ByteString& str) { | 226 const CFX_ByteString& str) { |
| 227 SetAt(key, new CPDF_String(str, FALSE)); | 227 SetAt(key, new CPDF_String(str, FALSE)); |
| 228 } | 228 } |
| 229 | 229 |
| 230 void CPDF_Dictionary::SetAtReference(const CFX_ByteStringC& key, | 230 void CPDF_Dictionary::SetAtReference(const CFX_ByteStringC& key, |
| 231 CPDF_IndirectObjectHolder* pDoc, | 231 CPDF_IndirectObjectHolder* pDoc, |
| 232 FX_DWORD objnum) { | 232 uint32_t objnum) { |
| 233 SetAt(key, new CPDF_Reference(pDoc, objnum)); | 233 SetAt(key, new CPDF_Reference(pDoc, objnum)); |
| 234 } | 234 } |
| 235 | 235 |
| 236 void CPDF_Dictionary::AddReference(const CFX_ByteStringC& key, | 236 void CPDF_Dictionary::AddReference(const CFX_ByteStringC& key, |
| 237 CPDF_IndirectObjectHolder* pDoc, | 237 CPDF_IndirectObjectHolder* pDoc, |
| 238 FX_DWORD objnum) { | 238 uint32_t objnum) { |
| 239 SetAt(key, new CPDF_Reference(pDoc, objnum)); | 239 SetAt(key, new CPDF_Reference(pDoc, objnum)); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void CPDF_Dictionary::SetAtNumber(const CFX_ByteStringC& key, FX_FLOAT f) { | 242 void CPDF_Dictionary::SetAtNumber(const CFX_ByteStringC& key, FX_FLOAT f) { |
| 243 CPDF_Number* pNumber = new CPDF_Number(f); | 243 CPDF_Number* pNumber = new CPDF_Number(f); |
| 244 SetAt(key, pNumber); | 244 SetAt(key, pNumber); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void CPDF_Dictionary::SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue) { | 247 void CPDF_Dictionary::SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue) { |
| 248 SetAt(key, new CPDF_Boolean(bValue)); | 248 SetAt(key, new CPDF_Boolean(bValue)); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 262 const CFX_Matrix& matrix) { | 262 const CFX_Matrix& matrix) { |
| 263 CPDF_Array* pArray = new CPDF_Array; | 263 CPDF_Array* pArray = new CPDF_Array; |
| 264 pArray->AddNumber(matrix.a); | 264 pArray->AddNumber(matrix.a); |
| 265 pArray->AddNumber(matrix.b); | 265 pArray->AddNumber(matrix.b); |
| 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 SetAt(key, pArray); | 270 SetAt(key, pArray); |
| 271 } | 271 } |
| OLD | NEW |