From 6f0a64a1bf18ab6636404cdfb883897459083a4d Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 10 Jun 2015 16:51:15 -0700 Subject: Remove FX_BSTR and FX_WSTR typedefs. These stand for const CFX_{Byte,Wide}StringC&, which is just monumentally confusing, since there are so many string types running around here. The following had manual changes: core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp core/src/fpdfdoc/doc_form.cpp fpdfsdk/src/fpdf_ext.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1180593004. --- core/src/fxge/android/fpf_skiafontmgr.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'core/src/fxge/android/fpf_skiafontmgr.cpp') diff --git a/core/src/fxge/android/fpf_skiafontmgr.cpp b/core/src/fxge/android/fpf_skiafontmgr.cpp index 214d67477b..0851a93b72 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; @@ -388,7 +388,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; @@ -425,7 +425,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) { @@ -456,7 +456,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) { -- cgit v1.2.3