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_pageobj.h" | 9 #include "../../../include/fpdfapi/fpdf_pageobj.h" |
10 #include "../../../include/fpdfapi/fpdf_resource.h" | 10 #include "../../../include/fpdfapi/fpdf_resource.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 } | 23 } |
24 } | 24 } |
25 return FALSE; | 25 return FALSE; |
26 } | 26 } |
27 CPDF_FontGlobals::CPDF_FontGlobals() : m_pContrastRamps(NULL) { | 27 CPDF_FontGlobals::CPDF_FontGlobals() : m_pContrastRamps(NULL) { |
28 FXSYS_memset(m_EmbeddedCharsets, 0, sizeof(m_EmbeddedCharsets)); | 28 FXSYS_memset(m_EmbeddedCharsets, 0, sizeof(m_EmbeddedCharsets)); |
29 FXSYS_memset(m_EmbeddedToUnicodes, 0, sizeof(m_EmbeddedToUnicodes)); | 29 FXSYS_memset(m_EmbeddedToUnicodes, 0, sizeof(m_EmbeddedToUnicodes)); |
30 } | 30 } |
31 CPDF_FontGlobals::~CPDF_FontGlobals() { | 31 CPDF_FontGlobals::~CPDF_FontGlobals() { |
32 ClearAll(); | 32 ClearAll(); |
33 if (m_pContrastRamps) { | 33 FX_Free(m_pContrastRamps); |
34 FX_Free(m_pContrastRamps); | |
35 } | |
36 } | 34 } |
37 class CFX_StockFontArray { | 35 class CFX_StockFontArray { |
38 public: | 36 public: |
39 CFX_StockFontArray() { | 37 CFX_StockFontArray() { |
40 FXSYS_memset(m_pStockFonts, 0, sizeof(m_pStockFonts)); | 38 FXSYS_memset(m_pStockFonts, 0, sizeof(m_pStockFonts)); |
41 } | 39 } |
42 ~CFX_StockFontArray() { | 40 ~CFX_StockFontArray() { |
43 for (int i = 0; i < FX_ArraySize(m_pStockFonts); i++) { | 41 for (int i = 0; i < FX_ArraySize(m_pStockFonts); i++) { |
44 if (!m_pStockFonts[i]) | 42 if (!m_pStockFonts[i]) |
45 continue; | 43 continue; |
(...skipping 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1788 CPDF_Type3Char::CPDF_Type3Char() { | 1786 CPDF_Type3Char::CPDF_Type3Char() { |
1789 m_pForm = NULL; | 1787 m_pForm = NULL; |
1790 m_pBitmap = NULL; | 1788 m_pBitmap = NULL; |
1791 m_bPageRequired = FALSE; | 1789 m_bPageRequired = FALSE; |
1792 m_bColored = FALSE; | 1790 m_bColored = FALSE; |
1793 } | 1791 } |
1794 CPDF_Type3Char::~CPDF_Type3Char() { | 1792 CPDF_Type3Char::~CPDF_Type3Char() { |
1795 delete m_pForm; | 1793 delete m_pForm; |
1796 delete m_pBitmap; | 1794 delete m_pBitmap; |
1797 } | 1795 } |
OLD | NEW |