summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_document.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/parser/cpdf_document.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/parser/cpdf_document.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_document.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp
index 21eb61a991..ed88a4f82a 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -231,8 +231,8 @@ CFX_ByteString FPDF_GetPSNameFromTT(HDC hDC) {
void InsertWidthArray1(CFX_Font* pFont,
CFX_UnicodeEncoding* pEncoding,
- FX_WCHAR start,
- FX_WCHAR end,
+ wchar_t start,
+ wchar_t end,
CPDF_Array* pWidthArray) {
int size = end - start + 1;
int* widths = FX_Alloc(int, size);
@@ -765,7 +765,7 @@ void CPDF_Document::DeletePage(int iPage) {
m_PageList.erase(m_PageList.begin() + iPage);
}
-CPDF_Font* CPDF_Document::AddStandardFont(const FX_CHAR* font,
+CPDF_Font* CPDF_Document::AddStandardFont(const char* font,
CPDF_FontEncoding* pEncoding) {
CFX_ByteString name(font);
if (PDF_GetStandardFontName(&name) < 0)
@@ -804,7 +804,7 @@ CPDF_Dictionary* CPDF_Document::ProcessbCJK(
int charset,
bool bVert,
CFX_ByteString basefont,
- std::function<void(FX_WCHAR, FX_WCHAR, CPDF_Array*)> Insert) {
+ std::function<void(wchar_t, wchar_t, CPDF_Array*)> Insert) {
CPDF_Dictionary* pFontDict = NewIndirect<CPDF_Dictionary>();
CFX_ByteString cmap;
CFX_ByteString ordering;
@@ -914,12 +914,11 @@ CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, bool bVert) {
ProcessNonbCJK(pBaseDict, pFont->IsBold(), pFont->IsItalic(), basefont,
std::move(pWidths));
} else {
- pFontDict = ProcessbCJK(pBaseDict, charset, bVert, basefont,
- [pFont, &pEncoding](FX_WCHAR start, FX_WCHAR end,
- CPDF_Array* widthArr) {
- InsertWidthArray1(pFont, pEncoding.get(), start,
- end, widthArr);
- });
+ pFontDict = ProcessbCJK(
+ pBaseDict, charset, bVert, basefont,
+ [pFont, &pEncoding](wchar_t start, wchar_t end, CPDF_Array* widthArr) {
+ InsertWidthArray1(pFont, pEncoding.get(), start, end, widthArr);
+ });
}
int italicangle =
pFont->GetSubstFont() ? pFont->GetSubstFont()->m_ItalicAngle : 0;
@@ -934,7 +933,7 @@ CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, bool bVert) {
if (pFont->GetSubstFont()) {
nStemV = pFont->GetSubstFont()->m_Weight / 5;
} else {
- static const FX_CHAR stem_chars[] = {'i', 'I', '!', '1'};
+ static const char stem_chars[] = {'i', 'I', '!', '1'};
const size_t count = FX_ArraySize(stem_chars);
uint32_t glyph = pEncoding->GlyphFromCharCode(stem_chars[0]);
nStemV = pFont->GetGlyphWidth(glyph);
@@ -1032,7 +1031,7 @@ CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTA* pLogFont,
} else {
pFontDict =
ProcessbCJK(pBaseDict, pLogFont->lfCharSet, bVert, basefont,
- [&hDC](FX_WCHAR start, FX_WCHAR end, CPDF_Array* widthArr) {
+ [&hDC](wchar_t start, wchar_t end, CPDF_Array* widthArr) {
InsertWidthArray(hDC, start, end, widthArr);
});
}