summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-03-21 15:00:20 -0700
committerTom Sepez <tsepez@chromium.org>2016-03-21 15:00:20 -0700
commit62a70f90c49cf7714c960186eb063ad55333e6f3 (patch)
tree84b5d0f70b770e6a9ec261342d46638f4d5102bd /core/fxge
parent4161c5ca6c5438476bf07b6dacfafb61ea611cc5 (diff)
downloadpdfium-62a70f90c49cf7714c960186eb063ad55333e6f3.tar.xz
Remove FX_WORD in favor of uint16_t.
It isn't buying us anthing, and it looks strange in a struct when other uint types are already present. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1821043003 .
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/apple/apple_int.h2
-rw-r--r--core/fxge/apple/fx_apple_platform.cpp2
-rw-r--r--core/fxge/apple/fx_quartz_device.cpp4
-rw-r--r--core/fxge/ge/fx_ge_fontmap.cpp8
-rw-r--r--core/fxge/win32/fx_win32_print.cpp2
5 files changed, 9 insertions, 9 deletions
diff --git a/core/fxge/apple/apple_int.h b/core/fxge/apple/apple_int.h
index 6fc665e8c3..c2b2714bc8 100644
--- a/core/fxge/apple/apple_int.h
+++ b/core/fxge/apple/apple_int.h
@@ -59,7 +59,7 @@ class CQuartz2D {
FX_BOOL drawGraphicsString(void* graphics,
void* font,
FX_FLOAT fontSize,
- FX_WORD* glyphIndices,
+ uint16_t* glyphIndices,
CGPoint* glyphPositions,
int32_t chars,
FX_ARGB argb,
diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp
index 098e9261ae..8aae334b97 100644
--- a/core/fxge/apple/fx_apple_platform.cpp
+++ b/core/fxge/apple/fx_apple_platform.cpp
@@ -74,7 +74,7 @@ static FX_BOOL _CGDrawGlyphRun(CGContextRef pContext,
return FALSE;
}
}
- CFX_FixedBufGrow<FX_WORD, 32> glyph_indices(nChars);
+ CFX_FixedBufGrow<uint16_t, 32> glyph_indices(nChars);
CFX_FixedBufGrow<CGPoint, 32> glyph_positions(nChars);
for (int i = 0; i < nChars; i++) {
glyph_indices[i] = pCharPos[i].m_ExtGID;
diff --git a/core/fxge/apple/fx_quartz_device.cpp b/core/fxge/apple/fx_quartz_device.cpp
index c39ee5e795..006f701e1e 100644
--- a/core/fxge/apple/fx_quartz_device.cpp
+++ b/core/fxge/apple/fx_quartz_device.cpp
@@ -69,7 +69,7 @@ void CQuartz2D::setGraphicsTextMatrix(void* graphics, CFX_Matrix* matrix) {
FX_BOOL CQuartz2D::drawGraphicsString(void* graphics,
void* font,
FX_FLOAT fontSize,
- FX_WORD* glyphIndices,
+ uint16_t* glyphIndices,
CGPoint* glyphPositions,
int32_t charsCount,
FX_ARGB argb,
@@ -760,7 +760,7 @@ FX_BOOL CFX_QuartzDeviceDriver::CG_DrawGlypRun(int nChars,
return FALSE;
}
}
- CFX_FixedBufGrow<FX_WORD, 32> glyph_indices(nChars);
+ CFX_FixedBufGrow<uint16_t, 32> glyph_indices(nChars);
CFX_FixedBufGrow<CGPoint, 32> glyph_positions(nChars);
for (int i = 0; i < nChars; i++) {
glyph_indices[i] = pCharPos[i].m_ExtGID;
diff --git a/core/fxge/ge/fx_ge_fontmap.cpp b/core/fxge/ge/fx_ge_fontmap.cpp
index 1dc61a210f..441c87b18d 100644
--- a/core/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/fxge/ge/fx_ge_fontmap.cpp
@@ -14,7 +14,7 @@
#include "core/include/fxge/fx_ge.h"
#include "third_party/base/stl_util.h"
-#define GET_TT_SHORT(w) (FX_WORD)(((w)[0] << 8) | (w)[1])
+#define GET_TT_SHORT(w) (uint16_t)(((w)[0] << 8) | (w)[1])
#define GET_TT_LONG(w) \
(FX_DWORD)(((w)[0] << 24) | ((w)[1] << 16) | ((w)[2] << 8) | (w)[3])
@@ -199,7 +199,7 @@ const struct FX_FontStyle {
};
const struct CODEPAGE_MAP {
- FX_WORD codepage;
+ uint16_t codepage;
uint8_t charset;
} g_Codepage2CharsetTable[] = {
{0, 1}, {42, 2}, {437, 254}, {850, 255}, {874, 222},
@@ -281,12 +281,12 @@ CFX_ByteString FPDF_LoadTableFromTT(FXSYS_FILE* pFile,
return CFX_ByteString();
}
-uint8_t GetCharsetFromCodePage(FX_WORD codepage) {
+uint8_t GetCharsetFromCodePage(uint16_t codepage) {
const CODEPAGE_MAP* pEnd =
g_Codepage2CharsetTable + FX_ArraySize(g_Codepage2CharsetTable);
const CODEPAGE_MAP* pCharmap =
std::lower_bound(g_Codepage2CharsetTable, pEnd, codepage,
- [](const CODEPAGE_MAP& charset, FX_WORD page) {
+ [](const CODEPAGE_MAP& charset, uint16_t page) {
return charset.codepage < page;
});
if (pCharmap < pEnd && codepage == pCharmap->codepage)
diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp
index c8529098eb..f7a1bb69a0 100644
--- a/core/fxge/win32/fx_win32_print.cpp
+++ b/core/fxge/win32/fx_win32_print.cpp
@@ -294,7 +294,7 @@ void CPSOutput::OutputPS(const FX_CHAR* str, int len) {
int sent_len = 0;
while (len > 0) {
int send_len = len > 1024 ? 1024 : len;
- *(FX_WORD*)m_pBuf = send_len;
+ *(uint16_t*)m_pBuf = send_len;
FXSYS_memcpy(m_pBuf + 2, str + sent_len, send_len);
ExtEscape(m_hDC, PASSTHROUGH, send_len + 2, m_pBuf, 0, NULL);
sent_len += send_len;