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

Side by Side Diff: xfa/fgas/font/fgas_stdfontmgr.cpp

Issue 1857073002: Make down-conversion explicit from CFX_Widetring to CFX_WideStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: String argument type 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 | « testing/libfuzzer/pdf_fm2js_fuzzer.cc ('k') | xfa/fgas/localization/fgas_locale.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 "xfa/fgas/font/fgas_stdfontmgr.h" 7 #include "xfa/fgas/font/fgas_stdfontmgr.h"
8 8
9 #include "core/fxcrt/include/fx_stream.h" 9 #include "core/fxcrt/include/fx_stream.h"
10 #include "xfa/fgas/crt/fgas_codepage.h" 10 #include "xfa/fgas/crt/fgas_codepage.h"
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 } 554 }
555 FX_POSITION CFX_FontSourceEnum_File::GetStartPosition(void* pUserData) { 555 FX_POSITION CFX_FontSourceEnum_File::GetStartPosition(void* pUserData) {
556 m_wsNext = GetNextFile().UTF8Decode(); 556 m_wsNext = GetNextFile().UTF8Decode();
557 if (0 == m_wsNext.GetLength()) { 557 if (0 == m_wsNext.GetLength()) {
558 return (FX_POSITION)0; 558 return (FX_POSITION)0;
559 } 559 }
560 return (FX_POSITION)-1; 560 return (FX_POSITION)-1;
561 } 561 }
562 IFX_FileAccess* CFX_FontSourceEnum_File::GetNext(FX_POSITION& pos, 562 IFX_FileAccess* CFX_FontSourceEnum_File::GetNext(FX_POSITION& pos,
563 void* pUserData) { 563 void* pUserData) {
564 IFX_FileAccess* pAccess = FX_CreateDefaultFileAccess(m_wsNext); 564 IFX_FileAccess* pAccess =
565 FX_CreateDefaultFileAccess(m_wsNext.AsWideStringC());
565 m_wsNext = GetNextFile().UTF8Decode(); 566 m_wsNext = GetNextFile().UTF8Decode();
566 pos = 0 != m_wsNext.GetLength() ? pAccess : NULL; 567 pos = 0 != m_wsNext.GetLength() ? pAccess : NULL;
567 return (IFX_FileAccess*)pAccess; 568 return (IFX_FileAccess*)pAccess;
568 } 569 }
569 IFX_FontSourceEnum* FX_CreateDefaultFontSourceEnum() { 570 IFX_FontSourceEnum* FX_CreateDefaultFontSourceEnum() {
570 return (IFX_FontSourceEnum*)new CFX_FontSourceEnum_File; 571 return (IFX_FontSourceEnum*)new CFX_FontSourceEnum_File;
571 } 572 }
572 IFX_FontMgr* IFX_FontMgr::Create(IFX_FontSourceEnum* pFontEnum, 573 IFX_FontMgr* IFX_FontMgr::Create(IFX_FontSourceEnum* pFontEnum,
573 IFX_FontMgrDelegate* pDelegate, 574 IFX_FontMgrDelegate* pDelegate,
574 void* pUserData) { 575 void* pUserData) {
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 } 1508 }
1508 } 1509 }
1509 int32_t CFX_FontMgrImp::IsPartName(const CFX_WideString& Name1, 1510 int32_t CFX_FontMgrImp::IsPartName(const CFX_WideString& Name1,
1510 const CFX_WideString& Name2) { 1511 const CFX_WideString& Name2) {
1511 if (Name1.Find((const FX_WCHAR*)Name2) != -1) { 1512 if (Name1.Find((const FX_WCHAR*)Name2) != -1) {
1512 return 1; 1513 return 1;
1513 } 1514 }
1514 return 0; 1515 return 0;
1515 } 1516 }
1516 #endif 1517 #endif
OLDNEW
« no previous file with comments | « testing/libfuzzer/pdf_fm2js_fuzzer.cc ('k') | xfa/fgas/localization/fgas_locale.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698