summaryrefslogtreecommitdiff
path: root/core/fxge/ge
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-13 16:43:37 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-14 14:14:51 +0000
commit812e96c2b4c5908a1979da5e27cdcecda0d1dfc9 (patch)
treef0b0607f6b757eb22237527215094bd87b5d03ba /core/fxge/ge
parent893822aa5b6254591f8e80fbffcbb4fa6ad849aa (diff)
downloadpdfium-812e96c2b4c5908a1979da5e27cdcecda0d1dfc9.tar.xz
Replace FX_CHAR and FX_WCHAR with underlying types.
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8 Reviewed-on: https://pdfium-review.googlesource.com/2967 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/ge')
-rw-r--r--core/fxge/ge/cfx_folderfontinfo.cpp10
-rw-r--r--core/fxge/ge/cfx_folderfontinfo.h6
-rw-r--r--core/fxge/ge/cfx_fontmapper.cpp23
-rw-r--r--core/fxge/ge/cfx_fontmgr.cpp2
-rw-r--r--core/fxge/ge/cfx_unicodeencodingex.cpp2
-rw-r--r--core/fxge/ge/fx_ge_linux.cpp14
-rw-r--r--core/fxge/ge/fx_text_int.h2
7 files changed, 29 insertions, 30 deletions
diff --git a/core/fxge/ge/cfx_folderfontinfo.cpp b/core/fxge/ge/cfx_folderfontinfo.cpp
index 776a37319b..52dfc2d243 100644
--- a/core/fxge/ge/cfx_folderfontinfo.cpp
+++ b/core/fxge/ge/cfx_folderfontinfo.cpp
@@ -16,8 +16,8 @@
namespace {
const struct {
- const FX_CHAR* m_pName;
- const FX_CHAR* m_pSubstName;
+ const char* m_pName;
+ const char* m_pSubstName;
} Base14Substs[] = {
{"Courier", "Courier New"},
{"Courier-Bold", "Courier New Bold"},
@@ -275,7 +275,7 @@ void* CFX_FolderFontInfo::FindFont(int weight,
bool bItalic,
int charset,
int pitch_family,
- const FX_CHAR* family,
+ const char* family,
bool bMatchName) {
CFX_FontFaceInfo* pFind = nullptr;
if (charset == FXFONT_ANSI_CHARSET && (pitch_family & FXFONT_FF_FIXEDPITCH))
@@ -306,7 +306,7 @@ void* CFX_FolderFontInfo::MapFont(int weight,
bool bItalic,
int charset,
int pitch_family,
- const FX_CHAR* family,
+ const char* family,
int& iExact) {
return nullptr;
}
@@ -320,7 +320,7 @@ void* CFX_FolderFontInfo::MapFontByUnicode(uint32_t dwUnicode,
}
#endif // PDF_ENABLE_XFA
-void* CFX_FolderFontInfo::GetFont(const FX_CHAR* face) {
+void* CFX_FolderFontInfo::GetFont(const char* face) {
auto it = m_FontList.find(face);
return it != m_FontList.end() ? it->second : nullptr;
}
diff --git a/core/fxge/ge/cfx_folderfontinfo.h b/core/fxge/ge/cfx_folderfontinfo.h
index d031eef3d0..9e9a1a2a6a 100644
--- a/core/fxge/ge/cfx_folderfontinfo.h
+++ b/core/fxge/ge/cfx_folderfontinfo.h
@@ -27,7 +27,7 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo {
bool bItalic,
int charset,
int pitch_family,
- const FX_CHAR* face,
+ const char* face,
int& bExact) override;
#ifdef PDF_ENABLE_XFA
void* MapFontByUnicode(uint32_t dwUnicode,
@@ -35,7 +35,7 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo {
bool bItalic,
int pitch_family) override;
#endif // PDF_ENABLE_XFA
- void* GetFont(const FX_CHAR* face) override;
+ void* GetFont(const char* face) override;
uint32_t GetFontData(void* hFont,
uint32_t table,
uint8_t* buffer,
@@ -56,7 +56,7 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo {
bool bItalic,
int charset,
int pitch_family,
- const FX_CHAR* family,
+ const char* family,
bool bMatchName);
std::map<CFX_ByteString, CFX_FontFaceInfo*> m_FontList;
diff --git a/core/fxge/ge/cfx_fontmapper.cpp b/core/fxge/ge/cfx_fontmapper.cpp
index 064fc9610a..622b457396 100644
--- a/core/fxge/ge/cfx_fontmapper.cpp
+++ b/core/fxge/ge/cfx_fontmapper.cpp
@@ -25,7 +25,7 @@ namespace {
const int kNumStandardFonts = 14;
-const FX_CHAR* const g_Base14FontNames[kNumStandardFonts] = {
+const char* const g_Base14FontNames[kNumStandardFonts] = {
"Courier",
"Courier-Bold",
"Courier-BoldOblique",
@@ -43,7 +43,7 @@ const FX_CHAR* const g_Base14FontNames[kNumStandardFonts] = {
};
const struct AltFontName {
- const FX_CHAR* m_pName;
+ const char* m_pName;
int m_Index;
} g_AltFontNames[] = {
{"Arial", 4},
@@ -138,8 +138,8 @@ const struct AltFontName {
};
const struct AltFontFamily {
- const FX_CHAR* m_pFontName;
- const FX_CHAR* m_pFontFamily;
+ const char* m_pFontName;
+ const char* m_pFontFamily;
} g_AltFontFamilies[] = {
{"AGaramondPro", "Adobe Garamond Pro"},
{"BankGothicBT-Medium", "BankGothic Md BT"},
@@ -147,7 +147,7 @@ const struct AltFontFamily {
};
const struct FX_FontStyle {
- const FX_CHAR* style;
+ const char* style;
int32_t len;
} g_FontStyles[] = {
{"Bold", 4}, {"Italic", 6}, {"BoldItalic", 10}, {"Reg", 3}, {"Regular", 7},
@@ -167,20 +167,19 @@ const struct CODEPAGE_MAP {
};
int CompareFontFamilyString(const void* key, const void* element) {
- CFX_ByteString str_key((const FX_CHAR*)key);
+ CFX_ByteString str_key((const char*)key);
const AltFontFamily* family = reinterpret_cast<const AltFontFamily*>(element);
if (str_key.Find(family->m_pFontName) != -1)
return 0;
- return FXSYS_stricmp(reinterpret_cast<const FX_CHAR*>(key),
- family->m_pFontName);
+ return FXSYS_stricmp(reinterpret_cast<const char*>(key), family->m_pFontName);
}
int CompareString(const void* key, const void* element) {
- return FXSYS_stricmp(reinterpret_cast<const FX_CHAR*>(key),
+ return FXSYS_stricmp(reinterpret_cast<const char*>(key),
reinterpret_cast<const AltFontName*>(element)->m_pName);
}
-CFX_ByteString TT_NormalizeName(const FX_CHAR* family) {
+CFX_ByteString TT_NormalizeName(const char* family) {
CFX_ByteString norm(family);
norm.Remove(' ');
norm.Remove('-');
@@ -223,7 +222,7 @@ CFX_ByteString GetFontFamily(CFX_ByteString fontName, int nStyle) {
return found ? CFX_ByteString(found->m_pFontFamily) : fontName;
}
-CFX_ByteString ParseStyle(const FX_CHAR* pStyle, int iLen, int iIndex) {
+CFX_ByteString ParseStyle(const char* pStyle, int iLen, int iIndex) {
CFX_ByteTextBuf buf;
if (!iLen || iLen <= iIndex)
return buf.MakeString();
@@ -505,7 +504,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name,
}
if (!style.IsEmpty()) {
int nLen = style.GetLength();
- const FX_CHAR* pStyle = style.c_str();
+ const char* pStyle = style.c_str();
int i = 0;
bool bFirstItem = true;
CFX_ByteString buf;
diff --git a/core/fxge/ge/cfx_fontmgr.cpp b/core/fxge/ge/cfx_fontmgr.cpp
index 64f647e3f6..97d143804b 100644
--- a/core/fxge/ge/cfx_fontmgr.cpp
+++ b/core/fxge/ge/cfx_fontmgr.cpp
@@ -215,7 +215,7 @@ FXFT_Face CFX_FontMgr::GetFixedFace(const uint8_t* pData,
return FXFT_Set_Pixel_Sizes(face, 64, 64) ? nullptr : face;
}
-FXFT_Face CFX_FontMgr::GetFileFace(const FX_CHAR* filename, int face_index) {
+FXFT_Face CFX_FontMgr::GetFileFace(const char* filename, int face_index) {
InitFTLibrary();
FXFT_Library library = m_FTLibrary;
FXFT_Face face = nullptr;
diff --git a/core/fxge/ge/cfx_unicodeencodingex.cpp b/core/fxge/ge/cfx_unicodeencodingex.cpp
index c7e3303f02..cd7625fb17 100644
--- a/core/fxge/ge/cfx_unicodeencodingex.cpp
+++ b/core/fxge/ge/cfx_unicodeencodingex.cpp
@@ -62,7 +62,7 @@ uint32_t CFX_UnicodeEncodingEx::GlyphFromCharCode(uint32_t charcode) {
return 0;
}
-uint32_t CFX_UnicodeEncodingEx::CharCodeFromUnicode(FX_WCHAR Unicode) const {
+uint32_t CFX_UnicodeEncodingEx::CharCodeFromUnicode(wchar_t Unicode) const {
if (m_nEncodingID == FXFM_ENCODING_UNICODE ||
m_nEncodingID == FXFM_ENCODING_MS_SYMBOL) {
return Unicode;
diff --git a/core/fxge/ge/fx_ge_linux.cpp b/core/fxge/ge/fx_ge_linux.cpp
index e7086bb4e0..502a3674ab 100644
--- a/core/fxge/ge/fx_ge_linux.cpp
+++ b/core/fxge/ge/fx_ge_linux.cpp
@@ -15,7 +15,7 @@ namespace {
const size_t kLinuxGpNameSize = 6;
-const FX_CHAR* const g_LinuxGpFontList[][kLinuxGpNameSize] = {
+const char* const g_LinuxGpFontList[][kLinuxGpNameSize] = {
{"TakaoPGothic", "VL PGothic", "IPAPGothic", "VL Gothic", "Kochi Gothic",
"VL Gothic regular"},
{"TakaoGothic", "VL Gothic", "IPAGothic", "Kochi Gothic", nullptr,
@@ -26,19 +26,19 @@ const FX_CHAR* const g_LinuxGpFontList[][kLinuxGpNameSize] = {
"VL Gothic regular"},
};
-const FX_CHAR* const g_LinuxGbFontList[] = {
+const char* const g_LinuxGbFontList[] = {
"AR PL UMing CN Light", "WenQuanYi Micro Hei", "AR PL UKai CN",
};
-const FX_CHAR* const g_LinuxB5FontList[] = {
+const char* const g_LinuxB5FontList[] = {
"AR PL UMing TW Light", "WenQuanYi Micro Hei", "AR PL UKai TW",
};
-const FX_CHAR* const g_LinuxHGFontList[] = {
+const char* const g_LinuxHGFontList[] = {
"UnDotum",
};
-size_t GetJapanesePreference(const FX_CHAR* facearr,
+size_t GetJapanesePreference(const char* facearr,
int weight,
int pitch_family) {
CFX_ByteString face = facearr;
@@ -72,7 +72,7 @@ class CFX_LinuxFontInfo : public CFX_FolderFontInfo {
bool bItalic,
int charset,
int pitch_family,
- const FX_CHAR* family,
+ const char* family,
int& iExact) override;
bool ParseFontCfg(const char** pUserPaths);
};
@@ -81,7 +81,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight,
bool bItalic,
int charset,
int pitch_family,
- const FX_CHAR* cstr_face,
+ const char* cstr_face,
int& iExact) {
void* font = GetSubstFont(cstr_face);
if (font) {
diff --git a/core/fxge/ge/fx_text_int.h b/core/fxge/ge/fx_text_int.h
index 4de6587d41..8ea01f91d6 100644
--- a/core/fxge/ge/fx_text_int.h
+++ b/core/fxge/ge/fx_text_int.h
@@ -14,7 +14,7 @@
struct _CFX_UniqueKeyGen {
void Generate(int count, ...);
- FX_CHAR m_Key[128];
+ char m_Key[128];
int m_KeyLen;
};