From 812e96c2b4c5908a1979da5e27cdcecda0d1dfc9 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 13 Mar 2017 16:43:37 -0400 Subject: Replace FX_CHAR and FX_WCHAR with underlying types. Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8 Reviewed-on: https://pdfium-review.googlesource.com/2967 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- core/fpdfapi/parser/cpdf_document.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'core/fpdfapi/parser/cpdf_document.cpp') 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 Insert) { + std::function Insert) { CPDF_Dictionary* pFontDict = NewIndirect(); 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); }); } -- cgit v1.2.3