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_page.h" | 7 #include "../../../include/fpdfapi/fpdf_page.h" |
8 #include "../../../include/fpdfapi/fpdf_module.h" | 8 #include "../../../include/fpdfapi/fpdf_module.h" |
9 #include "../../../include/fpdfapi/fpdf_pageobj.h" | 9 #include "../../../include/fpdfapi/fpdf_pageobj.h" |
10 #include "font_int.h" | 10 #include "font_int.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 m_bToUnicodeLoaded = FALSE; | 121 m_bToUnicodeLoaded = FALSE; |
122 m_pCharMap = NULL; | 122 m_pCharMap = NULL; |
123 } | 123 } |
124 FX_BOOL CPDF_Font::Initialize() | 124 FX_BOOL CPDF_Font::Initialize() |
125 { | 125 { |
126 m_pCharMap = FX_NEW CPDF_FontCharMap(this); | 126 m_pCharMap = FX_NEW CPDF_FontCharMap(this); |
127 return TRUE; | 127 return TRUE; |
128 } | 128 } |
129 CPDF_Font::~CPDF_Font() | 129 CPDF_Font::~CPDF_Font() |
130 { | 130 { |
131 if (m_pCharMap) { | 131 delete m_pCharMap; |
132 FX_Free(m_pCharMap); | 132 m_pCharMap = NULL; |
133 m_pCharMap = NULL; | 133 |
134 } | 134 delete m_pToUnicodeMap; |
135 if (m_pToUnicodeMap) { | 135 m_pToUnicodeMap = NULL; |
136 delete m_pToUnicodeMap; | 136 |
137 m_pToUnicodeMap = NULL; | |
138 } | |
139 if (m_pFontFile) { | 137 if (m_pFontFile) { |
140 m_pDocument->GetPageData()->ReleaseFontFileStreamAcc((CPDF_Stream*)m_pFo
ntFile->GetStream()); | 138 m_pDocument->GetPageData()->ReleaseFontFileStreamAcc((CPDF_Stream*)m_pFo
ntFile->GetStream()); |
141 } | 139 } |
142 } | 140 } |
143 FX_BOOL CPDF_Font::IsVertWriting() const | 141 FX_BOOL CPDF_Font::IsVertWriting() const |
144 { | 142 { |
145 FX_BOOL bVertWriting = FALSE; | 143 FX_BOOL bVertWriting = FALSE; |
146 CPDF_CIDFont* pCIDFont = GetCIDFont(); | 144 CPDF_CIDFont* pCIDFont = GetCIDFont(); |
147 if (pCIDFont) { | 145 if (pCIDFont) { |
148 bVertWriting = pCIDFont->IsVertWriting(); | 146 bVertWriting = pCIDFont->IsVertWriting(); |
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1761 } | 1759 } |
1762 CPDF_Type3Char::~CPDF_Type3Char() | 1760 CPDF_Type3Char::~CPDF_Type3Char() |
1763 { | 1761 { |
1764 if (m_pForm) { | 1762 if (m_pForm) { |
1765 delete m_pForm; | 1763 delete m_pForm; |
1766 } | 1764 } |
1767 if (m_pBitmap) { | 1765 if (m_pBitmap) { |
1768 delete m_pBitmap; | 1766 delete m_pBitmap; |
1769 } | 1767 } |
1770 } | 1768 } |
OLD | NEW |