summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_font.cpp
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/fpdfapi/font/cpdf_font.cpp
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/fpdfapi/font/cpdf_font.cpp')
-rw-r--r--core/fpdfapi/font/cpdf_font.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fpdfapi/font/cpdf_font.cpp b/core/fpdfapi/font/cpdf_font.cpp
index 36d7d6aeeb..7988ec7124 100644
--- a/core/fpdfapi/font/cpdf_font.cpp
+++ b/core/fpdfapi/font/cpdf_font.cpp
@@ -118,7 +118,7 @@ bool CPDF_Font::IsUnicodeCompatible() const {
return false;
}
-int CPDF_Font::CountChar(const FX_CHAR* pString, int size) const {
+int CPDF_Font::CountChar(const char* pString, int size) const {
return size;
}
@@ -131,8 +131,8 @@ bool CPDF_Font::IsVertWriting() const {
return pCIDFont ? pCIDFont->IsVertWriting() : m_Font.IsVertical();
}
-int CPDF_Font::AppendChar(FX_CHAR* buf, uint32_t charcode) const {
- *buf = static_cast<FX_CHAR>(charcode);
+int CPDF_Font::AppendChar(char* buf, uint32_t charcode) const {
+ *buf = static_cast<char>(charcode);
return 1;
}
@@ -153,7 +153,7 @@ CFX_WideString CPDF_Font::UnicodeFromCharCode(uint32_t charcode) const {
return m_pToUnicodeMap ? m_pToUnicodeMap->Lookup(charcode) : CFX_WideString();
}
-uint32_t CPDF_Font::CharCodeFromUnicode(FX_WCHAR unicode) const {
+uint32_t CPDF_Font::CharCodeFromUnicode(wchar_t unicode) const {
if (!m_bToUnicodeLoaded)
LoadUnicodeMap();
@@ -281,7 +281,7 @@ void CPDF_Font::LoadUnicodeMap() const {
m_pToUnicodeMap->Load(pStream);
}
-int CPDF_Font::GetStringWidth(const FX_CHAR* pString, int size) {
+int CPDF_Font::GetStringWidth(const char* pString, int size) {
int offset = 0;
int width = 0;
while (offset < size) {
@@ -341,7 +341,7 @@ std::unique_ptr<CPDF_Font> CPDF_Font::Create(CPDF_Document* pDoc,
return pFont->Load() ? std::move(pFont) : nullptr;
}
-uint32_t CPDF_Font::GetNextChar(const FX_CHAR* pString,
+uint32_t CPDF_Font::GetNextChar(const char* pString,
int nStrLen,
int& offset) const {
if (offset < 0 || nStrLen < 1) {
@@ -429,7 +429,7 @@ bool CPDF_Font::IsStandardFont() const {
return true;
}
-const FX_CHAR* CPDF_Font::GetAdobeCharName(
+const char* CPDF_Font::GetAdobeCharName(
int iBaseEncoding,
const std::vector<CFX_ByteString>& charnames,
int charcode) {
@@ -441,7 +441,7 @@ const FX_CHAR* CPDF_Font::GetAdobeCharName(
if (!charnames.empty() && !charnames[charcode].IsEmpty())
return charnames[charcode].c_str();
- const FX_CHAR* name = nullptr;
+ const char* name = nullptr;
if (iBaseEncoding)
name = PDF_CharNameFromPredefinedCharSet(iBaseEncoding, charcode);
return name && name[0] ? name : nullptr;