diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-03-13 16:43:37 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-14 14:14:51 +0000 |
commit | 812e96c2b4c5908a1979da5e27cdcecda0d1dfc9 (patch) | |
tree | f0b0607f6b757eb22237527215094bd87b5d03ba /core/fxge/win32 | |
parent | 893822aa5b6254591f8e80fbffcbb4fa6ad849aa (diff) | |
download | pdfium-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/win32')
-rw-r--r-- | core/fxge/win32/cfx_psrenderer.cpp | 28 | ||||
-rw-r--r-- | core/fxge/win32/cfx_windowsdib.h | 6 | ||||
-rw-r--r-- | core/fxge/win32/cpsoutput.cpp | 4 | ||||
-rw-r--r-- | core/fxge/win32/cpsoutput.h | 2 | ||||
-rw-r--r-- | core/fxge/win32/fx_win32_device.cpp | 22 | ||||
-rw-r--r-- | core/fxge/win32/fx_win32_dib.cpp | 4 | ||||
-rw-r--r-- | core/fxge/win32/fx_win32_gdipext.cpp | 4 | ||||
-rw-r--r-- | core/fxge/win32/win32_int.h | 2 |
8 files changed, 36 insertions, 36 deletions
diff --git a/core/fxge/win32/cfx_psrenderer.cpp b/core/fxge/win32/cfx_psrenderer.cpp index 74fae088d9..c3d2c66d9d 100644 --- a/core/fxge/win32/cfx_psrenderer.cpp +++ b/core/fxge/win32/cfx_psrenderer.cpp @@ -147,7 +147,7 @@ void CFX_PSRenderer::OutputPath(const CFX_PathData* pPathData, } } } - m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize()); + m_pOutput->OutputPS((const char*)buf.GetBuffer(), buf.GetSize()); } void CFX_PSRenderer::SetClip_PathFill(const CFX_PathData* pPathData, @@ -180,7 +180,7 @@ void CFX_PSRenderer::SetClip_PathStroke(const CFX_PathData* pPathData, buf << "mx Cm [" << pObject2Device->a << " " << pObject2Device->b << " " << pObject2Device->c << " " << pObject2Device->d << " " << pObject2Device->e << " " << pObject2Device->f << "]cm "; - m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize()); + m_pOutput->OutputPS((const char*)buf.GetBuffer(), buf.GetSize()); } OutputPath(pPathData, nullptr); CFX_FloatRect rect = pPathData->GetBoundingBox(pGraphState->m_LineWidth, @@ -219,7 +219,7 @@ bool CFX_PSRenderer::DrawPath(const CFX_PathData* pPathData, buf << "mx Cm [" << pObject2Device->a << " " << pObject2Device->b << " " << pObject2Device->c << " " << pObject2Device->d << " " << pObject2Device->e << " " << pObject2Device->f << "]cm "; - m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize()); + m_pOutput->OutputPS((const char*)buf.GetBuffer(), buf.GetSize()); } } OutputPath(pPathData, stroke_alpha ? nullptr : pObject2Device); @@ -282,7 +282,7 @@ void CFX_PSRenderer::SetGraphState(const CFX_GraphStateData* pGraphState) { m_CurGraphState.Copy(*pGraphState); m_bGraphStateSet = true; if (buf.GetSize()) { - m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize()); + m_pOutput->OutputPS((const char*)buf.GetBuffer(), buf.GetSize()); } } @@ -306,7 +306,7 @@ static void PSCompressData(int PSLevel, uint32_t src_size, uint8_t** output_buf, uint32_t* output_size, - const FX_CHAR** filter) { + const char** filter) { *output_buf = src_buf; *output_size = src_size; *filter = ""; @@ -415,7 +415,7 @@ bool CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, } else { buf << "false 1 colorimage\n"; } - m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize()); + m_pOutput->OutputPS((const char*)buf.GetBuffer(), buf.GetSize()); WritePSBinary(output_buf.get(), output_size); output_buf.release(); } else { @@ -451,7 +451,7 @@ bool CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, int bpp = pConverted->GetBPP() / 8; uint8_t* output_buf = nullptr; FX_STRSIZE output_size = 0; - const FX_CHAR* filter = nullptr; + const char* filter = nullptr; if ((m_PSLevel == 2 || flags & FXRENDER_IMAGE_LOSSY) && CCodec_JpegModule::JpegEncode(pConverted.Get(), &output_buf, &output_size)) { @@ -493,7 +493,7 @@ bool CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, } buf << "false " << bpp; buf << " colorimage\n"; - m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize()); + m_pOutput->OutputPS((const char*)buf.GetBuffer(), buf.GetSize()); WritePSBinary(output_buf, output_size); FX_Free(output_buf); } @@ -518,7 +518,7 @@ void CFX_PSRenderer::SetColor(uint32_t color) { m_bColorSet = true; m_LastColor = color; } - m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize()); + m_pOutput->OutputPS((const char*)buf.GetBuffer(), buf.GetSize()); } } @@ -564,7 +564,7 @@ void CFX_PSRenderer::FindPSFontGlyph(CFX_FaceCache* pFaceCache, "currentdict end\n"; buf << "/X" << static_cast<uint32_t>(m_PSFontList.size() - 1) << " exch definefont pop\n"; - m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize()); + m_pOutput->OutputPS((const char*)buf.GetBuffer(), buf.GetSize()); buf.Clear(); } *ps_fontnum = m_PSFontList.size() - 1; @@ -625,7 +625,7 @@ void CFX_PSRenderer::FindPSFontGlyph(CFX_FaceCache* pFaceCache, buf << "f}bind def end\n"; buf << "/X" << *ps_fontnum << " Ff/Encoding get " << glyphindex << "/" << glyphindex << " put\n"; - m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize()); + m_pOutput->OutputPS((const char*)buf.GetBuffer(), buf.GetSize()); } bool CFX_PSRenderer::DrawText(int nChars, @@ -666,7 +666,7 @@ bool CFX_PSRenderer::DrawText(int nChars, buf << hex.AsStringC() << "Tj\n"; } buf << "Q\n"; - m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize()); + m_pOutput->OutputPS((const char*)buf.GetBuffer(), buf.GetSize()); pCache->ReleaseCachedFace(pFont); return true; } @@ -678,9 +678,9 @@ void CFX_PSRenderer::WritePSBinary(const uint8_t* data, int len) { if (pEncoders && pEncoders->GetBasicModule()->A85Encode(data, len, &dest_buf, &dest_size)) { - m_pOutput->OutputPS((const FX_CHAR*)dest_buf, dest_size); + m_pOutput->OutputPS((const char*)dest_buf, dest_size); FX_Free(dest_buf); } else { - m_pOutput->OutputPS((const FX_CHAR*)data, len); + m_pOutput->OutputPS((const char*)data, len); } } diff --git a/core/fxge/win32/cfx_windowsdib.h b/core/fxge/win32/cfx_windowsdib.h index 2564b7fa36..0bfab3fee1 100644 --- a/core/fxge/win32/cfx_windowsdib.h +++ b/core/fxge/win32/cfx_windowsdib.h @@ -20,7 +20,7 @@ typedef struct WINDIB_Open_Args_ { size_t memory_size; - const FX_WCHAR* path_name; + const wchar_t* path_name; } WINDIB_Open_Args_; class CFX_WindowsDIB : public CFX_DIBitmap { @@ -31,8 +31,8 @@ class CFX_WindowsDIB : public CFX_DIBitmap { static CFX_ByteString GetBitmapInfo(const CFX_DIBitmap* pBitmap); static CFX_DIBitmap* LoadFromBuf(BITMAPINFO* pbmi, void* pData); static HBITMAP GetDDBitmap(const CFX_DIBitmap* pBitmap, HDC hDC); - static CFX_DIBitmap* LoadFromFile(const FX_WCHAR* filename); - static CFX_DIBitmap* LoadFromFile(const FX_CHAR* filename); + static CFX_DIBitmap* LoadFromFile(const wchar_t* filename); + static CFX_DIBitmap* LoadFromFile(const char* filename); static CFX_DIBitmap* LoadDIBitmap(WINDIB_Open_Args_ args); HDC GetDC() const { return m_hMemDC; } diff --git a/core/fxge/win32/cpsoutput.cpp b/core/fxge/win32/cpsoutput.cpp index 76b37d7dac..24df15226b 100644 --- a/core/fxge/win32/cpsoutput.cpp +++ b/core/fxge/win32/cpsoutput.cpp @@ -20,13 +20,13 @@ void CPSOutput::Release() { delete this; } -void CPSOutput::OutputPS(const FX_CHAR* str, int len) { +void CPSOutput::OutputPS(const char* str, int len) { if (len < 0) len = static_cast<int>(FXSYS_strlen(str)); int sent_len = 0; while (len > 0) { - FX_CHAR buffer[1026]; + char buffer[1026]; int send_len = std::min(len, 1024); *(reinterpret_cast<uint16_t*>(buffer)) = send_len; FXSYS_memcpy(buffer + 2, str + sent_len, send_len); diff --git a/core/fxge/win32/cpsoutput.h b/core/fxge/win32/cpsoutput.h index bc9225bd7e..1a4709b36b 100644 --- a/core/fxge/win32/cpsoutput.h +++ b/core/fxge/win32/cpsoutput.h @@ -18,7 +18,7 @@ class CPSOutput { // IFX_PSOutput void Release(); - void OutputPS(const FX_CHAR* str, int len); + void OutputPS(const char* str, int len); HDC m_hDC; }; diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index 92e9b41e06..d1d81b18e4 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -34,15 +34,15 @@ namespace { const struct { - const FX_CHAR* m_pFaceName; - const FX_CHAR* m_pVariantName; + const char* m_pFaceName; + const char* m_pVariantName; } g_VariantNames[] = { {"DFKai-SB", "\x19\x6A\x77\x69\xD4\x9A"}, }; const struct { - const FX_CHAR* m_pName; - const FX_CHAR* m_pWinName; + const char* m_pName; + const char* m_pWinName; bool m_bBold; bool m_bItalic; } g_Base14Substs[] = { @@ -61,8 +61,8 @@ const struct { }; struct FontNameMap { - const FX_CHAR* m_pSubFontName; - const FX_CHAR* m_pSrcFontName; + const char* m_pSubFontName; + const char* m_pSrcFontName; }; const FontNameMap g_JpFontNameMap[] = { {"MS Mincho", "Heiseimin-W3"}, @@ -324,7 +324,7 @@ class CFX_Win32FallbackFontInfo final : public CFX_FolderFontInfo { bool bItalic, int charset, int pitch_family, - const FX_CHAR* family, + const char* family, int& iExact) override; }; @@ -339,9 +339,9 @@ class CFX_Win32FontInfo final : public IFX_SystemFontInfo { bool bItalic, int charset, int pitch_family, - const FX_CHAR* face, + const char* face, int& iExact) override; - void* GetFont(const FX_CHAR* face) override { return nullptr; } + void* GetFont(const char* face) override { return nullptr; } uint32_t GetFontData(void* hFont, uint32_t table, uint8_t* buffer, @@ -476,7 +476,7 @@ void* CFX_Win32FallbackFontInfo::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) { @@ -569,7 +569,7 @@ void* CFX_Win32FontInfo::MapFont(int weight, bool bItalic, int charset, int pitch_family, - const FX_CHAR* cstr_face, + const char* cstr_face, int& iExact) { CFX_ByteString face = cstr_face; int iBaseFont; diff --git a/core/fxge/win32/fx_win32_dib.cpp b/core/fxge/win32/fx_win32_dib.cpp index 40c9ca6e31..9b85b57317 100644 --- a/core/fxge/win32/fx_win32_dib.cpp +++ b/core/fxge/win32/fx_win32_dib.cpp @@ -116,7 +116,7 @@ void GetBitmapSize(HBITMAP hBitmap, int& w, int& h) { h = bmp.bmHeight; } -CFX_DIBitmap* CFX_WindowsDIB::LoadFromFile(const FX_WCHAR* filename) { +CFX_DIBitmap* CFX_WindowsDIB::LoadFromFile(const wchar_t* filename) { CWin32Platform* pPlatform = (CWin32Platform*)CFX_GEModule::Get()->GetPlatformData(); if (pPlatform->m_GdiplusExt.IsAvailable()) { @@ -150,7 +150,7 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadFromFile(const FX_WCHAR* filename) { return pDIBitmap; } -CFX_DIBitmap* CFX_WindowsDIB::LoadFromFile(const FX_CHAR* filename) { +CFX_DIBitmap* CFX_WindowsDIB::LoadFromFile(const char* filename) { return LoadFromFile(CFX_WideString::FromLocal(filename).c_str()); } diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp index 1be2a54b18..1e51bba2b3 100644 --- a/core/fxge/win32/fx_win32_gdipext.cpp +++ b/core/fxge/win32/fx_win32_gdipext.cpp @@ -680,7 +680,7 @@ CGdiplusExt::CGdiplusExt() { } void CGdiplusExt::Load() { CFX_ByteString strPlusPath = ""; - FX_CHAR buf[MAX_PATH]; + char buf[MAX_PATH]; GetSystemDirectoryA(buf, MAX_PATH); strPlusPath += buf; strPlusPath += "\\"; @@ -765,7 +765,7 @@ bool CGdiplusExt::GdipCreateFromImage(void* bitmap, void** graphics) { } return false; } -bool CGdiplusExt::GdipCreateFontFamilyFromName(const FX_WCHAR* name, +bool CGdiplusExt::GdipCreateFontFamilyFromName(const wchar_t* name, void* pFontCollection, void** pFamily) { CGdiplusExt& GdiplusExt = diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h index f8eae87308..08a8224db6 100644 --- a/core/fxge/win32/win32_int.h +++ b/core/fxge/win32/win32_int.h @@ -83,7 +83,7 @@ class CGdiplusExt { FX_FLOAT f, void** matrix); void GdipDeleteMatrix(void* matrix); - bool GdipCreateFontFamilyFromName(const FX_WCHAR* name, + bool GdipCreateFontFamilyFromName(const wchar_t* name, void* pFontCollection, void** pFamily); void GdipDeleteFontFamily(void* pFamily); |