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

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

Issue 1862123003: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, fix new usage. 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 | « xfa/fgas/font/fgas_gefont.cpp ('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 = 564 IFX_FileAccess* pAccess = FX_CreateDefaultFileAccess(m_wsNext.AsStringC());
565 FX_CreateDefaultFileAccess(m_wsNext.AsWideStringC());
566 m_wsNext = GetNextFile().UTF8Decode(); 565 m_wsNext = GetNextFile().UTF8Decode();
567 pos = 0 != m_wsNext.GetLength() ? pAccess : NULL; 566 pos = 0 != m_wsNext.GetLength() ? pAccess : NULL;
568 return (IFX_FileAccess*)pAccess; 567 return (IFX_FileAccess*)pAccess;
569 } 568 }
570 IFX_FontSourceEnum* FX_CreateDefaultFontSourceEnum() { 569 IFX_FontSourceEnum* FX_CreateDefaultFontSourceEnum() {
571 return (IFX_FontSourceEnum*)new CFX_FontSourceEnum_File; 570 return (IFX_FontSourceEnum*)new CFX_FontSourceEnum_File;
572 } 571 }
573 IFX_FontMgr* IFX_FontMgr::Create(IFX_FontSourceEnum* pFontEnum, 572 IFX_FontMgr* IFX_FontMgr::Create(IFX_FontSourceEnum* pFontEnum,
574 IFX_FontMgrDelegate* pDelegate, 573 IFX_FontMgrDelegate* pDelegate,
575 void* pUserData) { 574 void* pUserData) {
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 } 1507 }
1509 } 1508 }
1510 int32_t CFX_FontMgrImp::IsPartName(const CFX_WideString& Name1, 1509 int32_t CFX_FontMgrImp::IsPartName(const CFX_WideString& Name1,
1511 const CFX_WideString& Name2) { 1510 const CFX_WideString& Name2) {
1512 if (Name1.Find((const FX_WCHAR*)Name2) != -1) { 1511 if (Name1.Find((const FX_WCHAR*)Name2) != -1) {
1513 return 1; 1512 return 1;
1514 } 1513 }
1515 return 0; 1514 return 0;
1516 } 1515 }
1517 #endif 1516 #endif
OLDNEW
« no previous file with comments | « xfa/fgas/font/fgas_gefont.cpp ('k') | xfa/fgas/localization/fgas_locale.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698