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

Side by Side Diff: fpdfsdk/fsdk_mgr.cpp

Issue 1853233002: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix CPDF_Name::GetConstString() 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 | « fpdfsdk/fsdk_baseform.cpp ('k') | fpdfsdk/fxedit/fxet_pageobjs.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 "fpdfsdk/include/fsdk_mgr.h" 7 #include "fpdfsdk/include/fsdk_mgr.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return FALSE; 179 return FALSE;
180 180
181 CFX_FontMapper* pFontMapper = pFontMgr->GetBuiltinMapper(); 181 CFX_FontMapper* pFontMapper = pFontMgr->GetBuiltinMapper();
182 if (!pFontMapper) 182 if (!pFontMapper)
183 return FALSE; 183 return FALSE;
184 184
185 if (pFontMapper->m_InstalledTTFonts.empty()) 185 if (pFontMapper->m_InstalledTTFonts.empty())
186 pFontMapper->LoadInstalledFonts(); 186 pFontMapper->LoadInstalledFonts();
187 187
188 for (const auto& font : pFontMapper->m_InstalledTTFonts) { 188 for (const auto& font : pFontMapper->m_InstalledTTFonts) {
189 if (font.Compare(sFontFaceName)) 189 if (font.Compare(sFontFaceName.AsByteStringC()))
190 return TRUE; 190 return TRUE;
191 } 191 }
192 192
193 return FALSE; 193 return FALSE;
194 } 194 }
195 195
196 CPDF_Font* CFX_SystemHandler::AddNativeTrueTypeFontToPDF( 196 CPDF_Font* CFX_SystemHandler::AddNativeTrueTypeFontToPDF(
197 CPDF_Document* pDoc, 197 CPDF_Document* pDoc,
198 CFX_ByteString sFontFaceName, 198 CFX_ByteString sFontFaceName,
199 uint8_t nCharset) { 199 uint8_t nCharset) {
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); 1199 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot();
1200 if (!pFocusAnnot) 1200 if (!pFocusAnnot)
1201 return nullptr; 1201 return nullptr;
1202 1202
1203 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { 1203 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) {
1204 if (pAnnot == pFocusAnnot) 1204 if (pAnnot == pFocusAnnot)
1205 return pAnnot; 1205 return pAnnot;
1206 } 1206 }
1207 return nullptr; 1207 return nullptr;
1208 } 1208 }
OLDNEW
« no previous file with comments | « fpdfsdk/fsdk_baseform.cpp ('k') | fpdfsdk/fxedit/fxet_pageobjs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698