diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-10 17:38:11 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-10 17:38:11 -0700 |
commit | ca3ac5e9ffc936066267fbb1c329e5297d8e23e6 (patch) | |
tree | 986e666023ae0eec649051613d83c6c60ef3dac0 /core/src/fxge | |
parent | 0aa0e7331b3512066df3e33d6642456a0de63de7 (diff) | |
download | pdfium-ca3ac5e9ffc936066267fbb1c329e5297d8e23e6.tar.xz |
Merge to XFA: Remove FX_BSTR and FX_WSTR typedefs.
Nearly automatic merge + re-run script on new files.
Original Review URL: https://codereview.chromium.org/1180593004.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1174303002.
Diffstat (limited to 'core/src/fxge')
-rw-r--r-- | core/src/fxge/android/fpf_skiafont.cpp | 2 | ||||
-rw-r--r-- | core/src/fxge/android/fpf_skiafont.h | 2 | ||||
-rw-r--r-- | core/src/fxge/android/fpf_skiafontmgr.cpp | 18 | ||||
-rw-r--r-- | core/src/fxge/android/fpf_skiafontmgr.h | 10 | ||||
-rw-r--r-- | core/src/fxge/ge/fx_ge_fontmap.cpp | 2 |
5 files changed, 17 insertions, 17 deletions
diff --git a/core/src/fxge/android/fpf_skiafont.cpp b/core/src/fxge/android/fpf_skiafont.cpp index 213a6595aa..e94f20f876 100644 --- a/core/src/fxge/android/fpf_skiafont.cpp +++ b/core/src/fxge/android/fpf_skiafont.cpp @@ -166,7 +166,7 @@ FX_DWORD CFPF_SkiaFont::GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD } return dwSize; } -FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, FX_BSTR bsFamily, FX_DWORD dwStyle, uint8_t uCharset) +FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, const CFX_ByteStringC& bsFamily, FX_DWORD dwStyle, uint8_t uCharset) { if (!pFontMgr || !pFontDes) { return FALSE; diff --git a/core/src/fxge/android/fpf_skiafont.h b/core/src/fxge/android/fpf_skiafont.h index af33402846..f3a61c9611 100644 --- a/core/src/fxge/android/fpf_skiafont.h +++ b/core/src/fxge/android/fpf_skiafont.h @@ -45,7 +45,7 @@ public: virtual int32_t GetHeight() const; virtual int32_t GetItalicAngle() const; virtual FX_DWORD GetFontData(FX_DWORD dwTable, uint8_t* pBuffer, FX_DWORD dwSize); - FX_BOOL InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, FX_BSTR bsFamily, FX_DWORD dwStyle, uint8_t uCharset); + FX_BOOL InitFont(CFPF_SkiaFontMgr *pFontMgr, CFPF_SkiaFontDescriptor *pFontDes, const CFX_ByteStringC& bsFamily, FX_DWORD dwStyle, uint8_t uCharset); protected: CFPF_SkiaFontMgr *m_pFontMgr; CFPF_SkiaFontDescriptor *m_pFontDes; diff --git a/core/src/fxge/android/fpf_skiafontmgr.cpp b/core/src/fxge/android/fpf_skiafontmgr.cpp index df9ce8983a..db3dcfea25 100644 --- a/core/src/fxge/android/fpf_skiafontmgr.cpp +++ b/core/src/fxge/android/fpf_skiafontmgr.cpp @@ -181,7 +181,7 @@ static FX_DWORD FPF_SkiaGetCharset(uint8_t uCharset) } return FPF_SKIACHARSET_Default; } -static FX_DWORD FPF_SKIANormalizeFontName(FX_BSTR bsfamily) +static FX_DWORD FPF_SKIANormalizeFontName(const CFX_ByteStringC& bsfamily) { FX_DWORD dwHash = 0; int32_t iLength = bsfamily.GetLength(); @@ -195,7 +195,7 @@ static FX_DWORD FPF_SKIANormalizeFontName(FX_BSTR bsfamily) } return dwHash; } -static FX_DWORD FPF_SKIAGetFamilyHash(FX_BSTR bsFamily, FX_DWORD dwStyle, uint8_t uCharset) +static FX_DWORD FPF_SKIAGetFamilyHash(const CFX_ByteStringC& bsFamily, FX_DWORD dwStyle, uint8_t uCharset) { CFX_ByteString bsFont(bsFamily); if (dwStyle & FXFONT_BOLD) { @@ -215,13 +215,13 @@ static FX_BOOL FPF_SkiaIsCJK(uint8_t uCharset) return (uCharset == FXFONT_GB2312_CHARSET) || (uCharset == FXFONT_CHINESEBIG5_CHARSET) || (uCharset == FXFONT_HANGEUL_CHARSET) || (uCharset == FXFONT_SHIFTJIS_CHARSET); } -static FX_BOOL FPF_SkiaMaybeSymbol(FX_BSTR bsFacename) +static FX_BOOL FPF_SkiaMaybeSymbol(const CFX_ByteStringC& bsFacename) { CFX_ByteString bsName = bsFacename; bsName.MakeLower(); return bsName.Find("symbol") > -1; } -static FX_BOOL FPF_SkiaMaybeArabic(FX_BSTR bsFacename) +static FX_BOOL FPF_SkiaMaybeArabic(const CFX_ByteStringC& bsFacename) { CFX_ByteString bsName = bsFacename; bsName.MakeLower(); @@ -273,13 +273,13 @@ void CFPF_SkiaFontMgr::LoadSystemFonts() void CFPF_SkiaFontMgr::LoadPrivateFont(IFX_FileRead* pFontFile) { } -void CFPF_SkiaFontMgr::LoadPrivateFont(FX_BSTR bsFileName) +void CFPF_SkiaFontMgr::LoadPrivateFont(const CFX_ByteStringC& bsFileName) { } void CFPF_SkiaFontMgr::LoadPrivateFont(void* pBuffer, size_t szBuffer) { } -IFPF_Font* CFPF_SkiaFontMgr::CreateFont(FX_BSTR bsFamilyname, uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch) +IFPF_Font* CFPF_SkiaFontMgr::CreateFont(const CFX_ByteStringC& bsFamilyname, uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch) { FX_DWORD dwHash = FPF_SKIAGetFamilyHash(bsFamilyname, dwStyle, uCharset); IFPF_Font *pFont = NULL; @@ -399,7 +399,7 @@ FXFT_Face CFPF_SkiaFontMgr::GetFontFace(IFX_FileRead *pFileRead, int32_t iFaceIn FXFT_Set_Pixel_Sizes(face, 0, 64); return face; } -FXFT_Face CFPF_SkiaFontMgr::GetFontFace(FX_BSTR bsFile, int32_t iFaceIndex ) +FXFT_Face CFPF_SkiaFontMgr::GetFontFace(const CFX_ByteStringC& bsFile, int32_t iFaceIndex ) { if (bsFile.IsEmpty()) { return NULL; @@ -436,7 +436,7 @@ FXFT_Face CFPF_SkiaFontMgr::GetFontFace(const uint8_t* pBuffer, size_t szBuffer, FXFT_Set_Pixel_Sizes(face, 0, 64); return face; } -void CFPF_SkiaFontMgr::ScanPath(FX_BSTR path) +void CFPF_SkiaFontMgr::ScanPath(const CFX_ByteStringC& path) { void *handle = FX_OpenFolder(path.GetCStr()); if (!handle) { @@ -467,7 +467,7 @@ void CFPF_SkiaFontMgr::ScanPath(FX_BSTR path) } FX_CloseFolder(handle); } -void CFPF_SkiaFontMgr::ScanFile(FX_BSTR file) +void CFPF_SkiaFontMgr::ScanFile(const CFX_ByteStringC& file) { FXFT_Face face = GetFontFace(file); if (face) { diff --git a/core/src/fxge/android/fpf_skiafontmgr.h b/core/src/fxge/android/fpf_skiafontmgr.h index ba9ea9134a..5acf14e3ac 100644 --- a/core/src/fxge/android/fpf_skiafontmgr.h +++ b/core/src/fxge/android/fpf_skiafontmgr.h @@ -97,16 +97,16 @@ public: FX_BOOL InitFTLibrary(); virtual void LoadSystemFonts(); virtual void LoadPrivateFont(IFX_FileRead* pFontFile); - virtual void LoadPrivateFont(FX_BSTR bsFileName); + virtual void LoadPrivateFont(const CFX_ByteStringC& bsFileName); virtual void LoadPrivateFont(void* pBuffer, size_t szBuffer); - virtual IFPF_Font* CreateFont(FX_BSTR bsFamilyname, uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0); + virtual IFPF_Font* CreateFont(const CFX_ByteStringC& bsFamilyname, uint8_t uCharset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0); FXFT_Face GetFontFace(IFX_FileRead *pFileRead, int32_t iFaceIndex = 0); - FXFT_Face GetFontFace(FX_BSTR bsFile, int32_t iFaceIndex = 0); + FXFT_Face GetFontFace(const CFX_ByteStringC& bsFile, int32_t iFaceIndex = 0); FXFT_Face GetFontFace(const uint8_t* pBuffer, size_t szBuffer, int32_t iFaceIndex = 0); protected: - void ScanPath(FX_BSTR path); - void ScanFile(FX_BSTR file); + void ScanPath(const CFX_ByteStringC& path); + void ScanFile(const CFX_ByteStringC& file); void ReportFace(FXFT_Face face, CFPF_SkiaFontDescriptor *pFontDesc); void OutputSystemFonts(); FX_BOOL m_bLoaded; diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp index 620b82953c..dbf9768148 100644 --- a/core/src/fxge/ge/fx_ge_fontmap.cpp +++ b/core/src/fxge/ge/fx_ge_fontmap.cpp @@ -1395,7 +1395,7 @@ CFX_FolderFontInfo::~CFX_FolderFontInfo() delete (CFontFaceInfo*)value; } } -void CFX_FolderFontInfo::AddPath(FX_BSTR path) +void CFX_FolderFontInfo::AddPath(const CFX_ByteStringC& path) { m_PathList.Add(path); } |