summaryrefslogtreecommitdiff
path: root/core/src/fxge
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-10 16:51:15 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-10 16:51:15 -0700
commit6f0a64a1bf18ab6636404cdfb883897459083a4d (patch)
tree1ef1326c8bb015213e0cdf0d726a27a537d09c73 /core/src/fxge
parente4503ea9947d2f9c61704da20271b413a364a9c0 (diff)
downloadpdfium-chromium/2433.tar.xz
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.
Diffstat (limited to 'core/src/fxge')
-rw-r--r--core/src/fxge/android/fpf_skiafont.cpp2
-rw-r--r--core/src/fxge/android/fpf_skiafont.h2
-rw-r--r--core/src/fxge/android/fpf_skiafontmgr.cpp18
-rw-r--r--core/src/fxge/android/fpf_skiafontmgr.h10
-rw-r--r--core/src/fxge/ge/fx_ge_fontmap.cpp2
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 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) {
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 afa9918690..ba5725d2f2 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -1298,7 +1298,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);
}