Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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 "../../../include/fpdfapi/fpdf_module.h" | 7 #include "../../../include/fpdfapi/fpdf_module.h" |
| 8 #include "../../../include/fpdfapi/fpdf_page.h" | 8 #include "../../../include/fpdfapi/fpdf_page.h" |
| 9 #include "../../../include/fpdfapi/fpdf_resource.h" | 9 #include "../../../include/fpdfapi/fpdf_resource.h" |
| 10 #include "../../../include/fxge/fx_freetype.h" | 10 #include "../../../include/fxge/fx_freetype.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 294 m_bVertical = 0; | 294 m_bVertical = 0; |
| 295 m_bLoaded = FALSE; | 295 m_bLoaded = FALSE; |
| 296 m_pMapping = NULL; | 296 m_pMapping = NULL; |
| 297 m_pLeadingBytes = NULL; | 297 m_pLeadingBytes = NULL; |
| 298 m_pAddMapping = NULL; | 298 m_pAddMapping = NULL; |
| 299 m_pEmbedMap = NULL; | 299 m_pEmbedMap = NULL; |
| 300 m_pUseMap = NULL; | 300 m_pUseMap = NULL; |
| 301 m_nCodeRanges = 0; | 301 m_nCodeRanges = 0; |
| 302 } | 302 } |
| 303 CPDF_CMap::~CPDF_CMap() { | 303 CPDF_CMap::~CPDF_CMap() { |
| 304 if (m_pMapping) { | |
| 305 FX_Free(m_pMapping); | 304 FX_Free(m_pMapping); |
|
Tom Sepez
2015/08/14 21:21:34
nit: indentations.
Lei Zhang
2015/08/14 21:43:14
I was being sloppy and hoping for clang-format to
| |
| 306 } | |
| 307 if (m_pAddMapping) { | |
| 308 FX_Free(m_pAddMapping); | 305 FX_Free(m_pAddMapping); |
| 309 } | |
| 310 if (m_pLeadingBytes) { | |
| 311 FX_Free(m_pLeadingBytes); | 306 FX_Free(m_pLeadingBytes); |
| 312 } | |
| 313 delete m_pUseMap; | 307 delete m_pUseMap; |
| 314 } | 308 } |
| 315 void CPDF_CMap::Release() { | 309 void CPDF_CMap::Release() { |
| 316 if (m_PredefinedCMap.IsEmpty()) { | 310 if (m_PredefinedCMap.IsEmpty()) { |
| 317 delete this; | 311 delete this; |
| 318 } | 312 } |
| 319 } | 313 } |
| 320 const CPDF_PredefinedCMap g_PredefinedCMaps[] = { | 314 const CPDF_PredefinedCMap g_PredefinedCMaps[] = { |
| 321 {"GB-EUC", | 315 {"GB-EUC", |
| 322 CIDSET_GB1, | 316 CIDSET_GB1, |
| (...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1656 if (middlecode > CID) { | 1650 if (middlecode > CID) { |
| 1657 end = middle - 1; | 1651 end = middle - 1; |
| 1658 } else if (middlecode < CID) { | 1652 } else if (middlecode < CID) { |
| 1659 begin = middle + 1; | 1653 begin = middle + 1; |
| 1660 } else { | 1654 } else { |
| 1661 return &Japan1_VertCIDs[middle].a; | 1655 return &Japan1_VertCIDs[middle].a; |
| 1662 } | 1656 } |
| 1663 } | 1657 } |
| 1664 return NULL; | 1658 return NULL; |
| 1665 } | 1659 } |
| OLD | NEW |