Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: core/fpdfapi/font/fpdf_font.cpp

Issue 2477443002: Remove FX_BOOL from core (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfapi/font/cpdf_cidfont.cpp ('k') | core/fpdfapi/page/cpdf_allstates.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "core/fpdfapi/font/font_int.h" 7 #include "core/fpdfapi/font/font_int.h"
8 8
9 #include "core/fpdfapi/cpdf_modulemgr.h" 9 #include "core/fpdfapi/cpdf_modulemgr.h"
10 #include "core/fpdfapi/page/cpdf_form.h" 10 #include "core/fpdfapi/page/cpdf_form.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 uint32_t CPDF_ToUnicodeMap::GetUnicode() { 202 uint32_t CPDF_ToUnicodeMap::GetUnicode() {
203 FX_SAFE_UINT32 uni = m_MultiCharBuf.GetLength(); 203 FX_SAFE_UINT32 uni = m_MultiCharBuf.GetLength();
204 uni = uni * 0x10000 + 0xffff; 204 uni = uni * 0x10000 + 0xffff;
205 return uni.ValueOrDefault(0); 205 return uni.ValueOrDefault(0);
206 } 206 }
207 207
208 void CPDF_ToUnicodeMap::Load(CPDF_Stream* pStream) { 208 void CPDF_ToUnicodeMap::Load(CPDF_Stream* pStream) {
209 CIDSet cid_set = CIDSET_UNKNOWN; 209 CIDSet cid_set = CIDSET_UNKNOWN;
210 CPDF_StreamAcc stream; 210 CPDF_StreamAcc stream;
211 stream.LoadAllData(pStream, FALSE); 211 stream.LoadAllData(pStream, false);
212 CPDF_SimpleParser parser(stream.GetData(), stream.GetSize()); 212 CPDF_SimpleParser parser(stream.GetData(), stream.GetSize());
213 while (1) { 213 while (1) {
214 CFX_ByteStringC word = parser.GetWord(); 214 CFX_ByteStringC word = parser.GetWord();
215 if (word.IsEmpty()) { 215 if (word.IsEmpty()) {
216 break; 216 break;
217 } 217 }
218 if (word == "beginbfchar") { 218 if (word == "beginbfchar") {
219 while (1) { 219 while (1) {
220 word = parser.GetWord(); 220 word = parser.GetWord();
221 if (word.IsEmpty() || word == "endbfchar") { 221 if (word.IsEmpty() || word == "endbfchar") {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } else if (word == "/Adobe-CNS1-UCS2") { 300 } else if (word == "/Adobe-CNS1-UCS2") {
301 cid_set = CIDSET_CNS1; 301 cid_set = CIDSET_CNS1;
302 } else if (word == "/Adobe-GB1-UCS2") { 302 } else if (word == "/Adobe-GB1-UCS2") {
303 cid_set = CIDSET_GB1; 303 cid_set = CIDSET_GB1;
304 } 304 }
305 } 305 }
306 if (cid_set) { 306 if (cid_set) {
307 m_pBaseMap = CPDF_ModuleMgr::Get() 307 m_pBaseMap = CPDF_ModuleMgr::Get()
308 ->GetPageModule() 308 ->GetPageModule()
309 ->GetFontGlobals() 309 ->GetFontGlobals()
310 ->m_CMapManager.GetCID2UnicodeMap(cid_set, FALSE); 310 ->m_CMapManager.GetCID2UnicodeMap(cid_set, false);
311 } else { 311 } else {
312 m_pBaseMap = nullptr; 312 m_pBaseMap = nullptr;
313 } 313 }
314 } 314 }
OLDNEW
« no previous file with comments | « core/fpdfapi/font/cpdf_cidfont.cpp ('k') | core/fpdfapi/page/cpdf_allstates.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698