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

Side by Side Diff: core/fxge/apple/fx_mac_imp.cpp

Issue 1885973002: Remove implicit cast from CFX_ByteString to (const char*). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Typo Created 4 years, 8 months 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/fxcrt/include/fx_string.h ('k') | core/fxge/ge/fx_ge_fontmap.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/fxge/apple/apple_int.h" 7 #include "core/fxge/apple/apple_int.h"
8 #include "core/fxge/include/fx_ge.h" 8 #include "core/fxge/include/fx_ge.h"
9 9
10 #if _FX_OS_ == _FX_MACOSX_ 10 #if _FX_OS_ == _FX_MACOSX_
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 int& iExact) { 57 int& iExact) {
58 CFX_ByteString face = cstr_face; 58 CFX_ByteString face = cstr_face;
59 int iBaseFont; 59 int iBaseFont;
60 for (iBaseFont = 0; iBaseFont < 12; iBaseFont++) 60 for (iBaseFont = 0; iBaseFont < 12; iBaseFont++)
61 if (face == CFX_ByteStringC(Base14Substs[iBaseFont].m_pName)) { 61 if (face == CFX_ByteStringC(Base14Substs[iBaseFont].m_pName)) {
62 face = Base14Substs[iBaseFont].m_pSubstName; 62 face = Base14Substs[iBaseFont].m_pSubstName;
63 iExact = TRUE; 63 iExact = TRUE;
64 break; 64 break;
65 } 65 }
66 if (iBaseFont < 12) { 66 if (iBaseFont < 12) {
67 return GetFont(face); 67 return GetFont(face.c_str());
68 } 68 }
69 auto it = m_FontList.find(face); 69 auto it = m_FontList.find(face);
70 if (it != m_FontList.end()) 70 if (it != m_FontList.end())
71 return it->second; 71 return it->second;
72 72
73 if (charset == FXFONT_ANSI_CHARSET && (pitch_family & FXFONT_FF_FIXEDPITCH)) { 73 if (charset == FXFONT_ANSI_CHARSET && (pitch_family & FXFONT_FF_FIXEDPITCH)) {
74 return GetFont("Courier New"); 74 return GetFont("Courier New");
75 } 75 }
76 if (charset == FXFONT_ANSI_CHARSET || charset == FXFONT_SYMBOL_CHARSET) { 76 if (charset == FXFONT_ANSI_CHARSET || charset == FXFONT_SYMBOL_CHARSET) {
77 return NULL; 77 return NULL;
(...skipping 26 matching lines...) Expand all
104 } 104 }
105 void CFX_GEModule::InitPlatform() { 105 void CFX_GEModule::InitPlatform() {
106 m_pPlatformData = new CApplePlatform; 106 m_pPlatformData = new CApplePlatform;
107 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault(nullptr)); 107 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault(nullptr));
108 } 108 }
109 void CFX_GEModule::DestroyPlatform() { 109 void CFX_GEModule::DestroyPlatform() {
110 delete (CApplePlatform*)m_pPlatformData; 110 delete (CApplePlatform*)m_pPlatformData;
111 m_pPlatformData = NULL; 111 m_pPlatformData = NULL;
112 } 112 }
113 #endif 113 #endif
OLDNEW
« no previous file with comments | « core/fxcrt/include/fx_string.h ('k') | core/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698