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/page/cpdf_image.cpp | 16 ++++++++-------- core/fpdfapi/page/cpdf_psengine.h | 2 +- core/fpdfapi/page/cpdf_streamcontentparser.cpp | 4 ++-- core/fpdfapi/page/cpdf_streamparser.cpp | 6 +++--- core/fpdfapi/page/cpdf_textobject.cpp | 2 +- core/fpdfapi/page/fpdf_page_func.cpp | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) (limited to 'core/fpdfapi/page') diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp index 6b0bfd7d6d..fea03c70e1 100644 --- a/core/fpdfapi/page/cpdf_image.cpp +++ b/core/fpdfapi/page/cpdf_image.cpp @@ -88,7 +88,7 @@ std::unique_ptr CPDF_Image::InitJPEG(uint8_t* pData, pDict->SetNewFor("Subtype", "Image"); pDict->SetNewFor("Width", width); pDict->SetNewFor("Height", height); - const FX_CHAR* csname = nullptr; + const char* csname = nullptr; if (num_comps == 1) { csname = "DeviceGray"; } else if (num_comps == 3) { @@ -200,13 +200,13 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap) { pCS->AddNew("DeviceRGB"); pCS->AddNew(1); CFX_ByteString ct; - FX_CHAR* pBuf = ct.GetBuffer(6); - pBuf[0] = (FX_CHAR)reset_r; - pBuf[1] = (FX_CHAR)reset_g; - pBuf[2] = (FX_CHAR)reset_b; - pBuf[3] = (FX_CHAR)set_r; - pBuf[4] = (FX_CHAR)set_g; - pBuf[5] = (FX_CHAR)set_b; + char* pBuf = ct.GetBuffer(6); + pBuf[0] = (char)reset_r; + pBuf[1] = (char)reset_g; + pBuf[2] = (char)reset_b; + pBuf[3] = (char)set_r; + pBuf[4] = (char)set_g; + pBuf[5] = (char)set_b; ct.ReleaseBuffer(6); pCS->AddNew(ct, true); } diff --git a/core/fpdfapi/page/cpdf_psengine.h b/core/fpdfapi/page/cpdf_psengine.h index 659ca82f6b..eba3e9bbf2 100644 --- a/core/fpdfapi/page/cpdf_psengine.h +++ b/core/fpdfapi/page/cpdf_psengine.h @@ -83,7 +83,7 @@ class CPDF_PSEngine { CPDF_PSEngine(); ~CPDF_PSEngine(); - bool Parse(const FX_CHAR* str, int size); + bool Parse(const char* str, int size); bool Execute(); bool DoOperator(PDF_PSOP op); void Reset() { m_StackCount = 0; } diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp index 102ec7973a..fe277f2839 100644 --- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp +++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp @@ -135,8 +135,8 @@ CFX_FloatRect GetShadingBBox(CPDF_ShadingPattern* pShading, } struct AbbrPair { - const FX_CHAR* abbr; - const FX_CHAR* full_name; + const char* abbr; + const char* full_name; }; const AbbrPair InlineKeyAbbr[] = { diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp index 294d72c950..978617ee8d 100644 --- a/core/fpdfapi/page/cpdf_streamparser.cpp +++ b/core/fpdfapi/page/cpdf_streamparser.cpp @@ -500,7 +500,7 @@ CFX_ByteString CPDF_StreamParser::ReadString() { break; case 1: if (ch >= '0' && ch <= '7') { - iEscCode = FXSYS_toDecimalDigit(static_cast(ch)); + iEscCode = FXSYS_toDecimalDigit(static_cast(ch)); status = 2; break; } @@ -526,7 +526,7 @@ CFX_ByteString CPDF_StreamParser::ReadString() { case 2: if (ch >= '0' && ch <= '7') { iEscCode = - iEscCode * 8 + FXSYS_toDecimalDigit(static_cast(ch)); + iEscCode * 8 + FXSYS_toDecimalDigit(static_cast(ch)); status = 3; } else { buf.AppendChar(iEscCode); @@ -537,7 +537,7 @@ CFX_ByteString CPDF_StreamParser::ReadString() { case 3: if (ch >= '0' && ch <= '7') { iEscCode = - iEscCode * 8 + FXSYS_toDecimalDigit(static_cast(ch)); + iEscCode * 8 + FXSYS_toDecimalDigit(static_cast(ch)); buf.AppendChar(iEscCode); status = 0; } else { diff --git a/core/fpdfapi/page/cpdf_textobject.cpp b/core/fpdfapi/page/cpdf_textobject.cpp index da69de8ce1..1c940bc057 100644 --- a/core/fpdfapi/page/cpdf_textobject.cpp +++ b/core/fpdfapi/page/cpdf_textobject.cpp @@ -149,7 +149,7 @@ void CPDF_TextObject::SetSegments(const CFX_ByteString* pStrs, m_CharPos.resize(nChars - 1); int index = 0; for (int i = 0; i < nsegs; ++i) { - const FX_CHAR* segment = pStrs[i].c_str(); + const char* segment = pStrs[i].c_str(); int len = pStrs[i].GetLength(); int offset = 0; while (offset < len) diff --git a/core/fpdfapi/page/fpdf_page_func.cpp b/core/fpdfapi/page/fpdf_page_func.cpp index f81ec9e6bd..9c0cc945b3 100644 --- a/core/fpdfapi/page/fpdf_page_func.cpp +++ b/core/fpdfapi/page/fpdf_page_func.cpp @@ -25,7 +25,7 @@ namespace { struct PDF_PSOpName { - const FX_CHAR* name; + const char* name; PDF_PSOP op; }; @@ -95,7 +95,7 @@ class CPDF_PSFunc : public CPDF_Function { bool CPDF_PSFunc::v_Init(CPDF_Object* pObj) { CPDF_StreamAcc acc; acc.LoadAllData(pObj->AsStream(), false); - return m_PS.Parse(reinterpret_cast(acc.GetData()), + return m_PS.Parse(reinterpret_cast(acc.GetData()), acc.GetSize()); } @@ -200,7 +200,7 @@ FX_FLOAT CPDF_PSEngine::Pop() { } return m_Stack[--m_StackCount]; } -bool CPDF_PSEngine::Parse(const FX_CHAR* str, int size) { +bool CPDF_PSEngine::Parse(const char* str, int size) { CPDF_SimpleParser parser((uint8_t*)str, size); CFX_ByteStringC word = parser.GetWord(); if (word != "{") { -- cgit v1.2.3