summaryrefslogtreecommitdiff
path: root/core
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
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')
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp4
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp4
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-V_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-H_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-V_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-H_5.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-V_5.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h34
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp4
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h30
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-H_2.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-V_2.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/90pv-RKSJ-H_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-V_2.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/H_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-H_4.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-V_4.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h46
-rw-r--r--core/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-V_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-H_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-V_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Korea1/KSCpc-EUC-H_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp2
-rw-r--r--core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h24
-rw-r--r--core/fpdfapi/fpdf_cmaps/cmap_int.h10
-rw-r--r--core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp56
-rw-r--r--core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp4
-rw-r--r--core/fpdfapi/fpdf_font/font_int.h14
-rw-r--r--core/fpdfapi/fpdf_font/fpdf_font.cpp18
-rw-r--r--core/fpdfapi/fpdf_font/fpdf_font_charset.cpp24
-rw-r--r--core/fpdfapi/fpdf_font/fpdf_font_cid.cpp63
-rw-r--r--core/fpdfapi/fpdf_page/cpdf_textobject.cpp6
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp2
-rw-r--r--core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp10
-rw-r--r--core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h2
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_text.cpp2
-rw-r--r--core/fpdfdoc/doc_ap.cpp14
-rw-r--r--core/fpdfdoc/doc_form.cpp2
-rw-r--r--core/fpdfdoc/doc_vt.cpp28
-rw-r--r--core/fpdfdoc/pdf_vt.h26
-rw-r--r--core/fpdftext/fpdf_text_int.h4
-rw-r--r--core/fxcodec/codec/fx_codec_flate.cpp4
-rw-r--r--core/fxcodec/codec/fx_codec_tiff.cpp10
-rw-r--r--core/fxcodec/jbig2/JBig2_BitStream.cpp2
-rw-r--r--core/fxcodec/jbig2/JBig2_BitStream.h2
-rw-r--r--core/fxcodec/jbig2/JBig2_Context.cpp8
-rw-r--r--core/fxcodec/jbig2/JBig2_GrdProc.h2
-rw-r--r--core/fxcodec/jbig2/JBig2_HtrdProc.h4
-rw-r--r--core/fxcodec/jbig2/JBig2_Page.h2
-rw-r--r--core/fxcodec/lbmp/fx_bmp.cpp12
-rw-r--r--core/fxcodec/lbmp/fx_bmp.h26
-rw-r--r--core/fxcodec/lgif/fx_gif.cpp26
-rw-r--r--core/fxcodec/lgif/fx_gif.h52
-rw-r--r--core/fxcrt/fx_arabic.cpp14
-rw-r--r--core/fxcrt/fx_basic_wstring.cpp8
-rw-r--r--core/fxcrt/fx_unicode.cpp2
-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
-rw-r--r--core/include/fpdfapi/fpdf_resource.h20
-rw-r--r--core/include/fpdfdoc/fpdf_ap.h8
-rw-r--r--core/include/fpdfdoc/fpdf_vt.h14
-rw-r--r--core/include/fxcodec/fx_codec.h2
-rw-r--r--core/include/fxcrt/fx_basic.h5
-rw-r--r--core/include/fxcrt/fx_ext.h4
-rw-r--r--core/include/fxcrt/fx_string.h2
-rw-r--r--core/include/fxcrt/fx_system.h5
-rw-r--r--core/include/fxcrt/fx_ucd.h4
107 files changed, 397 insertions, 398 deletions
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp
index 5a45d0aa39..30968a5bea 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_CNS1CID2Unicode_5[19088] = {
+const uint16_t g_FXCMAP_CNS1CID2Unicode_5[19088] = {
0xFFFD, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, 0x0030,
0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp
index 532ecd1013..1b19edc3c4 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_B5pc_H_0[247 * 3] = {
+const uint16_t g_FXCMAP_B5pc_H_0[247 * 3] = {
0x0020, 0x007E, 0x0001, 0x0080, 0x0080, 0x003D, 0x00FD, 0x00FF, 0x0060,
0xA140, 0xA158, 0x0063, 0xA159, 0xA15C, 0x35AF, 0xA15D, 0xA17E, 0x0080,
0xA1A1, 0xA1F5, 0x00A2, 0xA1F6, 0xA1F6, 0x00F8, 0xA1F7, 0xA1F7, 0x00F7,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp
index 482c4db05f..b872a69ab5 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_B5pc_V_0[12 * 3] = {
+const uint16_t g_FXCMAP_B5pc_V_0[12 * 3] = {
0xA14B, 0xA14B, 0x354E, 0xA15A, 0xA15A, 0x35AF, 0xA15C, 0xA15C, 0x35B1,
0xA15D, 0xA15E, 0x0082, 0xA161, 0xA162, 0x0086, 0xA165, 0xA166, 0x008A,
0xA169, 0xA16A, 0x008E, 0xA16D, 0xA16E, 0x0092, 0xA171, 0xA172, 0x0096,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp
index 3d61451403..ab893832bb 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_CNS_EUC_H_0[157 * 3] = {
+const uint16_t g_FXCMAP_CNS_EUC_H_0[157 * 3] = {
0x0020, 0x007E, 0x3550, 0xA1A1, 0xA1FE, 0x0063, 0xA2A1, 0xA2FE, 0x00C1,
0xA3A1, 0xA3CE, 0x011F, 0xA4A1, 0xA4FE, 0x014D, 0xA5A1, 0xA5EC, 0x01AB,
0xA5EE, 0xA5F0, 0x01F7, 0xA6A1, 0xA6BE, 0x01FA, 0xA7A1, 0xA7A1, 0x0253,
@@ -62,7 +62,7 @@ const FX_WORD g_FXCMAP_CNS_EUC_H_0[157 * 3] = {
0xFDA1, 0xFDCB, 0x1741,
};
-const FX_WORD g_FXCMAP_CNS_EUC_H_0_DWord[238 * 4] = {
+const uint16_t g_FXCMAP_CNS_EUC_H_0_DWord[238 * 4] = {
0x8EA1, 0xA1A1, 0xA1FE, 0x0063, 0x8EA1, 0xA2A1, 0xA2FE, 0x00C1, 0x8EA1,
0xA3A1, 0xA3CE, 0x011F, 0x8EA1, 0xA4A1, 0xA4FE, 0x014D, 0x8EA1, 0xA5A1,
0xA5EC, 0x01AB, 0x8EA1, 0xA5EE, 0xA5F0, 0x01F7, 0x8EA1, 0xA6A1, 0xA6BE,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp
index 5348785d10..e3137ad6eb 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_CNS_EUC_V_0[180 * 3] = {
+const uint16_t g_FXCMAP_CNS_EUC_V_0[180 * 3] = {
0x0020, 0x007E, 0x3550, 0xA1A1, 0xA1AB, 0x0063, 0xA1AC, 0xA1AC, 0x354E,
0xA1AD, 0xA1BA, 0x006F, 0xA1BB, 0xA1BB, 0x007C, 0xA1BC, 0xA1BC, 0x007E,
0xA1BD, 0xA1BD, 0x007E, 0xA1BE, 0xA1BF, 0x0082, 0xA1C0, 0xA1C1, 0x0082,
@@ -69,7 +69,7 @@ const FX_WORD g_FXCMAP_CNS_EUC_V_0[180 * 3] = {
0xFBA1, 0xFBFE, 0x1685, 0xFCA1, 0xFCFE, 0x16E3, 0xFDA1, 0xFDCB, 0x1741,
};
-const FX_WORD g_FXCMAP_CNS_EUC_V_0_DWord[261 * 4] = {
+const uint16_t g_FXCMAP_CNS_EUC_V_0_DWord[261 * 4] = {
0x8EA1, 0xA1A1, 0xA1AB, 0x0063, 0x8EA1, 0xA1AC, 0xA1AC, 0x354E, 0x8EA1,
0xA1AD, 0xA1BA, 0x006F, 0x8EA1, 0xA1BB, 0xA1BB, 0x007C, 0x8EA1, 0xA1BC,
0xA1BC, 0x007E, 0x8EA1, 0xA1BD, 0xA1BD, 0x007E, 0x8EA1, 0xA1BE, 0xA1BF,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp
index 5f7ccd42ab..291ab2627c 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_ETen_B5_H_0[254 * 3] = {
+const uint16_t g_FXCMAP_ETen_B5_H_0[254 * 3] = {
0x0020, 0x007E, 0x3550, 0xA140, 0xA158, 0x0063, 0xA159, 0xA15C, 0x35AF,
0xA15D, 0xA17E, 0x0080, 0xA1A1, 0xA1F5, 0x00A2, 0xA1F6, 0xA1F6, 0x00F8,
0xA1F7, 0xA1F7, 0x00F7, 0xA1F8, 0xA1FE, 0x00F9, 0xA240, 0xA27E, 0x0100,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-V_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-V_0.cpp
index 3de105a413..dfbc1e35ba 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-V_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-V_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_ETen_B5_V_0[13 * 3] = {
+const uint16_t g_FXCMAP_ETen_B5_V_0[13 * 3] = {
0xA14B, 0xA14B, 0x354E, 0xA15A, 0xA15A, 0x35AF, 0xA15C, 0xA15C,
0x35B1, 0xA15D, 0xA15E, 0x0082, 0xA161, 0xA162, 0x0086, 0xA165,
0xA166, 0x008A, 0xA169, 0xA16A, 0x008E, 0xA16D, 0xA16E, 0x0092,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-H_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-H_0.cpp
index 267fee6af8..40fae5086a 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-H_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-H_0.cpp
@@ -6,6 +6,6 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_ETenms_B5_H_0[1 * 3] = {
+const uint16_t g_FXCMAP_ETenms_B5_H_0[1 * 3] = {
0x0020, 0x007E, 0x0001,
};
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-V_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-V_0.cpp
index 4f555fadba..b7f79e44bb 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-V_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-V_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_ETenms_B5_V_0[18 * 3] = {
+const uint16_t g_FXCMAP_ETenms_B5_V_0[18 * 3] = {
0xA14B, 0xA14B, 0x354E, 0xA14C, 0xA14C, 0x006D, 0xA156, 0xA156, 0x0138,
0xA158, 0xA158, 0x007A, 0xA15A, 0xA15A, 0x35AF, 0xA15C, 0xA15C, 0x35B1,
0xA15D, 0xA15E, 0x0082, 0xA161, 0xA162, 0x0086, 0xA165, 0xA166, 0x008A,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-H_5.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-H_5.cpp
index 67459a505f..170c33052b 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-H_5.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-H_5.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_HKscs_B5_H_5[1210 * 3] = {
+const uint16_t g_FXCMAP_HKscs_B5_H_5[1210 * 3] = {
0x0020, 0x007E, 0x0001, 0x8740, 0x8765, 0x4A15, 0x8767, 0x8779, 0x4A3B,
0x8840, 0x8855, 0x44C9, 0x8856, 0x887E, 0x4961, 0x88A1, 0x88A8, 0x498A,
0x88A9, 0x88AA, 0x499C, 0x8940, 0x8941, 0x4534, 0x8943, 0x8943, 0x4536,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-V_5.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-V_5.cpp
index d9cbab8826..cfb1817c0d 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-V_5.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-V_5.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_HKscs_B5_V_5[13 * 3] = {
+const uint16_t g_FXCMAP_HKscs_B5_V_5[13 * 3] = {
0xA14B, 0xA14B, 0x354E, 0xA15A, 0xA15A, 0x35AF, 0xA15C, 0xA15C,
0x35B1, 0xA15D, 0xA15E, 0x0082, 0xA161, 0xA162, 0x0086, 0xA165,
0xA166, 0x008A, 0xA169, 0xA16A, 0x008E, 0xA16D, 0xA16E, 0x0092,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp
index f02c9dc655..64e52de650 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_UniCNS_UCS2_H_3[16418 * 3] = {
+const uint16_t g_FXCMAP_UniCNS_UCS2_H_3[16418 * 3] = {
0x0020, 0x007E, 0x0001, 0x00A2, 0x00A3, 0x0106, 0x00A5, 0x00A5, 0x0104,
0x00A7, 0x00A7, 0x00B2, 0x00A8, 0x00A8, 0x35B3, 0x00AC, 0x00AC, 0x36E1,
0x00B0, 0x00B0, 0x0118, 0x00B1, 0x00B1, 0x00D4, 0x00B7, 0x00B7, 0x0073,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp
index b77835c3f3..e1bb27c2f5 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_UniCNS_UCS2_V_3[13 * 3] = {
+const uint16_t g_FXCMAP_UniCNS_UCS2_V_3[13 * 3] = {
0x2013, 0x2013, 0x0078, 0x2014, 0x2014, 0x007A, 0x2025, 0x2025,
0x006D, 0x3008, 0x3009, 0x0096, 0x300A, 0x300B, 0x0092, 0x300C,
0x300D, 0x009A, 0x300E, 0x300F, 0x009E, 0x3010, 0x3011, 0x008E,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp
index c30dc46568..5cee7b2f8c 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h"
-const FX_WORD g_FXCMAP_UniCNS_UTF16_H_0[14557 * 2] = {
+const uint16_t g_FXCMAP_UniCNS_UTF16_H_0[14557 * 2] = {
0x0020, 0x0001, 0x0021, 0x0002, 0x0022, 0x0003, 0x0023, 0x0004, 0x0024,
0x0005, 0x0025, 0x0006, 0x0026, 0x0007, 0x0027, 0x0008, 0x0028, 0x0009,
0x0029, 0x000A, 0x002A, 0x000B, 0x002B, 0x000C, 0x002C, 0x000D, 0x002D,
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h b/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h
index 249d529b91..bef9f6c04d 100644
--- a/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h
+++ b/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h
@@ -7,23 +7,23 @@
#ifndef CORE_FPDFAPI_FPDF_CMAPS_CNS1_CMAPS_CNS1_H_
#define CORE_FPDFAPI_FPDF_CMAPS_CNS1_CMAPS_CNS1_H_
-#include "core/include/fxcrt/fx_system.h" // For FX_WORD.
+#include <stdint.h>
-extern const FX_WORD g_FXCMAP_B5pc_H_0[];
-extern const FX_WORD g_FXCMAP_B5pc_V_0[];
-extern const FX_WORD g_FXCMAP_HKscs_B5_H_5[];
-extern const FX_WORD g_FXCMAP_HKscs_B5_V_5[];
-extern const FX_WORD g_FXCMAP_ETen_B5_H_0[];
-extern const FX_WORD g_FXCMAP_ETen_B5_V_0[];
-extern const FX_WORD g_FXCMAP_ETenms_B5_H_0[];
-extern const FX_WORD g_FXCMAP_ETenms_B5_V_0[];
-extern const FX_WORD g_FXCMAP_CNS_EUC_H_0[];
-extern const FX_WORD g_FXCMAP_CNS_EUC_H_0_DWord[];
-extern const FX_WORD g_FXCMAP_CNS_EUC_V_0[];
-extern const FX_WORD g_FXCMAP_CNS_EUC_V_0_DWord[];
-extern const FX_WORD g_FXCMAP_UniCNS_UCS2_H_3[];
-extern const FX_WORD g_FXCMAP_UniCNS_UCS2_V_3[];
-extern const FX_WORD g_FXCMAP_UniCNS_UTF16_H_0[];
-extern const FX_WORD g_FXCMAP_CNS1CID2Unicode_5[];
+extern const uint16_t g_FXCMAP_B5pc_H_0[];
+extern const uint16_t g_FXCMAP_B5pc_V_0[];
+extern const uint16_t g_FXCMAP_HKscs_B5_H_5[];
+extern const uint16_t g_FXCMAP_HKscs_B5_V_5[];
+extern const uint16_t g_FXCMAP_ETen_B5_H_0[];
+extern const uint16_t g_FXCMAP_ETen_B5_V_0[];
+extern const uint16_t g_FXCMAP_ETenms_B5_H_0[];
+extern const uint16_t g_FXCMAP_ETenms_B5_V_0[];
+extern const uint16_t g_FXCMAP_CNS_EUC_H_0[];
+extern const uint16_t g_FXCMAP_CNS_EUC_H_0_DWord[];
+extern const uint16_t g_FXCMAP_CNS_EUC_V_0[];
+extern const uint16_t g_FXCMAP_CNS_EUC_V_0_DWord[];
+extern const uint16_t g_FXCMAP_UniCNS_UCS2_H_3[];
+extern const uint16_t g_FXCMAP_UniCNS_UCS2_V_3[];
+extern const uint16_t g_FXCMAP_UniCNS_UTF16_H_0[];
+extern const uint16_t g_FXCMAP_CNS1CID2Unicode_5[];
#endif // CORE_FPDFAPI_FPDF_CMAPS_CNS1_CMAPS_CNS1_H_
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp b/core/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp
index c6e5752ede..a7468964f9 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_GB1CID2Unicode_5[30284] = {
+const uint16_t g_FXCMAP_GB1CID2Unicode_5[30284] = {
0xFFFD, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, 0x0030,
0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp
index 0485aee635..bf4f12f04b 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_GB_EUC_H_0[90 * 3] = {
+const uint16_t g_FXCMAP_GB_EUC_H_0[90 * 3] = {
0x0020, 0x0020, 0x1E24, 0x0021, 0x007E, 0x032E, 0xA1A1, 0xA1FE, 0x0060,
0xA2B1, 0xA2E2, 0x00BE, 0xA2E5, 0xA2EE, 0x00F0, 0xA2F1, 0xA2FC, 0x00FA,
0xA3A1, 0xA3FE, 0x0106, 0xA4A1, 0xA4F3, 0x0164, 0xA5A1, 0xA5F6, 0x01B7,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp
index 274d0d2fd2..dd4e0b8742 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_GB_EUC_V_0[20 * 3] = {
+const uint16_t g_FXCMAP_GB_EUC_V_0[20 * 3] = {
0xA1A2, 0xA1A2, 0x023F, 0xA1A3, 0xA1A3, 0x023E, 0xA1AA, 0xA1AA, 0x0256,
0xA1AB, 0xA1AC, 0x1E18, 0xA1AD, 0xA1AD, 0x0257, 0xA1B2, 0xA1BF, 0x0246,
0xA1FE, 0xA1FE, 0x1E1A, 0xA3A1, 0xA3A1, 0x0242, 0xA3A8, 0xA3A9, 0x0244,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp
index 7f668947b5..ed68358705 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_GBK_EUC_H_2[4071 * 3] = {
+const uint16_t g_FXCMAP_GBK_EUC_H_2[4071 * 3] = {
0x0020, 0x0020, 0x1E24, 0x0021, 0x007E, 0x032E, 0x8140, 0x8178, 0x2758,
0x8179, 0x8179, 0x2059, 0x817A, 0x817E, 0x2791, 0x8180, 0x8185, 0x2796,
0x8186, 0x8186, 0x21F1, 0x8187, 0x81EC, 0x279C, 0x81ED, 0x81ED, 0x1FF2,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp
index ec35055da5..5c993f8b4d 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_GBK_EUC_V_2[20 * 3] = {
+const uint16_t g_FXCMAP_GBK_EUC_V_2[20 * 3] = {
0xA1A2, 0xA1A2, 0x023F, 0xA1A3, 0xA1A3, 0x023E, 0xA1AA, 0xA1AA, 0x0256,
0xA1AB, 0xA1AC, 0x1E18, 0xA1AD, 0xA1AD, 0x0257, 0xA1B2, 0xA1BF, 0x0246,
0xA1FE, 0xA1FE, 0x1E1A, 0xA3A1, 0xA3A1, 0x0242, 0xA3A8, 0xA3A9, 0x0244,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp
index bd0b1be516..7ad5864c9d 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_GBK2K_H_5[4071 * 3] = {
+const uint16_t g_FXCMAP_GBK2K_H_5[4071 * 3] = {
0x0020, 0x007E, 0x0001, 0x8140, 0x8178, 0x2758, 0x8179, 0x8179, 0x2059,
0x817A, 0x817E, 0x2791, 0x8180, 0x8185, 0x2796, 0x8186, 0x8186, 0x21F1,
0x8187, 0x81EC, 0x279C, 0x81ED, 0x81ED, 0x1FF2, 0x81EE, 0x81F5, 0x2802,
@@ -1366,7 +1366,7 @@ const FX_WORD g_FXCMAP_GBK2K_H_5[4071 * 3] = {
0xFE40, 0xFE40, 0x1259, 0xFE41, 0xFE7E, 0x5610, 0xFE80, 0xFEA0, 0x564E,
};
-const FX_WORD g_FXCMAP_GBK2K_H_5_DWord[1017 * 4] = {
+const uint16_t g_FXCMAP_GBK2K_H_5_DWord[1017 * 4] = {
0x8130, 0x8436, 0x8436, 0x5752, 0x8138, 0xFD38, 0xFD39, 0x579C, 0x8138,
0xFE30, 0xFE39, 0x579E, 0x8139, 0x8130, 0x8137, 0x57A8, 0x8139, 0x8139,
0x8139, 0x57B0, 0x8139, 0x8230, 0x8239, 0x57B1, 0x8139, 0x8330, 0x8339,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp
index 5e66e43b7e..0445263e02 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_GBK2K_V_5[41 * 3] = {
+const uint16_t g_FXCMAP_GBK2K_V_5[41 * 3] = {
0xA1A2, 0xA1A2, 0x023F, 0xA1A3, 0xA1A3, 0x023E, 0xA1AA, 0xA1AA, 0x0256,
0xA1AB, 0xA1AC, 0x1E18, 0xA1AD, 0xA1AD, 0x0257, 0xA1B2, 0xA1BF, 0x0246,
0xA1FE, 0xA1FE, 0x1E1A, 0xA3A1, 0xA3A1, 0x0242, 0xA3A8, 0xA3A9, 0x0244,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp
index 540e7b6c2a..44a5b7f8a1 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_GBKp_EUC_H_2[4070 * 3] = {
+const uint16_t g_FXCMAP_GBKp_EUC_H_2[4070 * 3] = {
0x0020, 0x007E, 0x0001, 0x8140, 0x8178, 0x2758, 0x8179, 0x8179, 0x2059,
0x817A, 0x817E, 0x2791, 0x8180, 0x8185, 0x2796, 0x8186, 0x8186, 0x21F1,
0x8187, 0x81EC, 0x279C, 0x81ED, 0x81ED, 0x1FF2, 0x81EE, 0x81F5, 0x2802,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp
index 8c8b3d5c92..c9aac3d3ff 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_GBKp_EUC_V_2[20 * 3] = {
+const uint16_t g_FXCMAP_GBKp_EUC_V_2[20 * 3] = {
0xA1A2, 0xA1A2, 0x023F, 0xA1A3, 0xA1A3, 0x023E, 0xA1AA, 0xA1AA, 0x0256,
0xA1AB, 0xA1AC, 0x1E18, 0xA1AD, 0xA1AD, 0x0257, 0xA1B2, 0xA1BF, 0x0246,
0xA1FE, 0xA1FE, 0x1E1A, 0xA3A1, 0xA3A1, 0x0242, 0xA3A8, 0xA3A9, 0x0244,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp
index 0fab35577c..4553f7ca1e 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_GBpc_EUC_H_0[91 * 3] = {
+const uint16_t g_FXCMAP_GBpc_EUC_H_0[91 * 3] = {
0x0020, 0x007E, 0x0001, 0x0080, 0x0080, 0x1E20, 0x00FD, 0x00FF, 0x1E21,
0xA1A1, 0xA1FE, 0x0060, 0xA2B1, 0xA2E2, 0x00BE, 0xA2E5, 0xA2EE, 0x00F0,
0xA2F1, 0xA2FC, 0x00FA, 0xA3A1, 0xA3FE, 0x0106, 0xA4A1, 0xA4F3, 0x0164,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp
index c07c8a18c0..70cacb5546 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_GBpc_EUC_V_0[20 * 3] = {
+const uint16_t g_FXCMAP_GBpc_EUC_V_0[20 * 3] = {
0xA1A2, 0xA1A2, 0x023F, 0xA1A3, 0xA1A3, 0x023E, 0xA1AA, 0xA1AA, 0x0256,
0xA1AB, 0xA1AC, 0x1E18, 0xA1AD, 0xA1AD, 0x0257, 0xA1B2, 0xA1BF, 0x0246,
0xA1FE, 0xA1FE, 0x1E1A, 0xA3A1, 0xA3A1, 0x0242, 0xA3A8, 0xA3A9, 0x0244,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp b/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp
index 60e109f864..e01692f36a 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_UniGB_UCS2_H_4[13825 * 3] = {
+const uint16_t g_FXCMAP_UniGB_UCS2_H_4[13825 * 3] = {
0x0020, 0x007E, 0x0001, 0x00A4, 0x00A4, 0x00A7, 0x00A5, 0x00A5, 0x5752,
0x00A7, 0x00A7, 0x00AB, 0x00A8, 0x00A8, 0x0066, 0x00B0, 0x00B0, 0x00A2,
0x00B1, 0x00B1, 0x007F, 0x00D7, 0x00D7, 0x0080, 0x00E0, 0x00E0, 0x029F,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp b/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp
index 5d53067e26..1889171420 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp
+++ b/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h"
-const FX_WORD g_FXCMAP_UniGB_UCS2_V_4[24 * 3] = {
+const uint16_t g_FXCMAP_UniGB_UCS2_V_4[24 * 3] = {
0x2014, 0x2014, 0x0256, 0x2026, 0x2026, 0x0257, 0x2225, 0x2225, 0x1E1C,
0x3001, 0x3001, 0x023F, 0x3002, 0x3002, 0x023E, 0x3008, 0x300F, 0x0248,
0x3010, 0x3011, 0x0252, 0x3013, 0x3013, 0x1E1A, 0x3014, 0x3015, 0x0246,
diff --git a/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h b/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h
index 348783de9d..e80809897d 100644
--- a/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h
+++ b/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h
@@ -7,21 +7,21 @@
#ifndef CORE_FPDFAPI_FPDF_CMAPS_GB1_CMAPS_GB1_H_
#define CORE_FPDFAPI_FPDF_CMAPS_GB1_CMAPS_GB1_H_
-#include "core/include/fxcrt/fx_system.h" // For FX_WORD.
+#include <stdint.h>
-extern const FX_WORD g_FXCMAP_GB_EUC_H_0[];
-extern const FX_WORD g_FXCMAP_GB_EUC_V_0[];
-extern const FX_WORD g_FXCMAP_GBpc_EUC_H_0[];
-extern const FX_WORD g_FXCMAP_GBpc_EUC_V_0[];
-extern const FX_WORD g_FXCMAP_GBK_EUC_H_2[];
-extern const FX_WORD g_FXCMAP_GBK_EUC_V_2[];
-extern const FX_WORD g_FXCMAP_GBKp_EUC_H_2[];
-extern const FX_WORD g_FXCMAP_GBKp_EUC_V_2[];
-extern const FX_WORD g_FXCMAP_GBK2K_H_5[];
-extern const FX_WORD g_FXCMAP_GBK2K_H_5_DWord[];
-extern const FX_WORD g_FXCMAP_GBK2K_V_5[];
-extern const FX_WORD g_FXCMAP_UniGB_UCS2_H_4[];
-extern const FX_WORD g_FXCMAP_UniGB_UCS2_V_4[];
-extern const FX_WORD g_FXCMAP_GB1CID2Unicode_5[];
+extern const uint16_t g_FXCMAP_GB_EUC_H_0[];
+extern const uint16_t g_FXCMAP_GB_EUC_V_0[];
+extern const uint16_t g_FXCMAP_GBpc_EUC_H_0[];
+extern const uint16_t g_FXCMAP_GBpc_EUC_V_0[];
+extern const uint16_t g_FXCMAP_GBK_EUC_H_2[];
+extern const uint16_t g_FXCMAP_GBK_EUC_V_2[];
+extern const uint16_t g_FXCMAP_GBKp_EUC_H_2[];
+extern const uint16_t g_FXCMAP_GBKp_EUC_V_2[];
+extern const uint16_t g_FXCMAP_GBK2K_H_5[];
+extern const uint16_t g_FXCMAP_GBK2K_H_5_DWord[];
+extern const uint16_t g_FXCMAP_GBK2K_V_5[];
+extern const uint16_t g_FXCMAP_UniGB_UCS2_H_4[];
+extern const uint16_t g_FXCMAP_UniGB_UCS2_V_4[];
+extern const uint16_t g_FXCMAP_GB1CID2Unicode_5[];
#endif // CORE_FPDFAPI_FPDF_CMAPS_GB1_CMAPS_GB1_H_
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp
index 19b3976a07..e3ac795e98 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_83pv_RKSJ_H_1[222 * 3] = {
+const uint16_t g_FXCMAP_83pv_RKSJ_H_1[222 * 3] = {
0x0020, 0x007E, 0x0001, 0x0080, 0x0080, 0x0061, 0x00A0, 0x00DF, 0x0146,
0x00FD, 0x00FD, 0x0098, 0x00FE, 0x00FE, 0x00E4, 0x00FF, 0x00FF, 0x007C,
0x8140, 0x817E, 0x0279, 0x8180, 0x81AC, 0x02B8, 0x81B8, 0x81BF, 0x02E5,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp
index d38111784e..485b6a8500 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_90ms_RKSJ_H_2[171 * 3] = {
+const uint16_t g_FXCMAP_90ms_RKSJ_H_2[171 * 3] = {
0x0020, 0x007D, 0x00E7, 0x007E, 0x007E, 0x0277, 0x00A0, 0x00DF, 0x0146,
0x8140, 0x817E, 0x0279, 0x8180, 0x81AC, 0x02B8, 0x81B8, 0x81BF, 0x02E5,
0x81C8, 0x81CE, 0x02ED, 0x81DA, 0x81E8, 0x02F4, 0x81F0, 0x81F7, 0x0303,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp
index 31a9ae55e2..19716da07d 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_90ms_RKSJ_V_2[78 * 3] = {
+const uint16_t g_FXCMAP_90ms_RKSJ_V_2[78 * 3] = {
0x8141, 0x8142, 0x1ECF, 0x8143, 0x8143, 0x204C, 0x8144, 0x8144, 0x2052,
0x8150, 0x8151, 0x1ED1, 0x815B, 0x815D, 0x1ED3, 0x8160, 0x8164, 0x1ED6,
0x8169, 0x817A, 0x1EDB, 0x8181, 0x8181, 0x1EED, 0x81A8, 0x81A8, 0x02E3,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-H_2.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-H_2.cpp
index dd930ea66d..471a0ef776 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-H_2.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-H_2.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_90msp_RKSJ_H_2[170 * 3] = {
+const uint16_t g_FXCMAP_90msp_RKSJ_H_2[170 * 3] = {
0x0020, 0x007E, 0x0001, 0x00A0, 0x00DF, 0x0146, 0x8140, 0x817E, 0x0279,
0x8180, 0x81AC, 0x02B8, 0x81B8, 0x81BF, 0x02E5, 0x81C8, 0x81CE, 0x02ED,
0x81DA, 0x81E8, 0x02F4, 0x81F0, 0x81F7, 0x0303, 0x81FC, 0x81FC, 0x030B,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-V_2.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-V_2.cpp
index a9731c4f8a..4aff86612c 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-V_2.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-V_2.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_90msp_RKSJ_V_2[78 * 3] = {
+const uint16_t g_FXCMAP_90msp_RKSJ_V_2[78 * 3] = {
0x8141, 0x8142, 0x1ECF, 0x8143, 0x8143, 0x204C, 0x8144, 0x8144, 0x2052,
0x8150, 0x8151, 0x1ED1, 0x815B, 0x815D, 0x1ED3, 0x8160, 0x8164, 0x1ED6,
0x8169, 0x817A, 0x1EDB, 0x8181, 0x8181, 0x1EED, 0x81A8, 0x81A8, 0x02E3,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/90pv-RKSJ-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/90pv-RKSJ-H_1.cpp
index 331e75614c..61890ad2d7 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/90pv-RKSJ-H_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/90pv-RKSJ-H_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_90pv_RKSJ_H_1[263 * 3] = {
+const uint16_t g_FXCMAP_90pv_RKSJ_H_1[263 * 3] = {
0x0020, 0x007E, 0x0001, 0x0080, 0x0080, 0x0061, 0x00A0, 0x00DF, 0x0146,
0x00FD, 0x00FD, 0x0098, 0x00FE, 0x00FE, 0x00E4, 0x00FF, 0x00FF, 0x007C,
0x8140, 0x817E, 0x0279, 0x8180, 0x81AC, 0x02B8, 0x81B8, 0x81BF, 0x02E5,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp
index ee3027a526..1034dd9713 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_Add_RKSJ_H_1[635 * 3] = {
+const uint16_t g_FXCMAP_Add_RKSJ_H_1[635 * 3] = {
0x0020, 0x007E, 0x00E7, 0x00A0, 0x00DF, 0x0146, 0x8140, 0x817E, 0x0279,
0x8180, 0x81AC, 0x02B8, 0x81B8, 0x81BF, 0x02E5, 0x81C8, 0x81CE, 0x02ED,
0x81DA, 0x81E8, 0x02F4, 0x81F0, 0x81F7, 0x0303, 0x81FC, 0x81FC, 0x030B,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp
index b23057f738..8c3eee5843 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_Add_RKSJ_V_1[57 * 3] = {
+const uint16_t g_FXCMAP_Add_RKSJ_V_1[57 * 3] = {
0x8141, 0x8142, 0x1ECF, 0x8143, 0x8143, 0x204C, 0x8144, 0x8144, 0x2052,
0x8150, 0x8151, 0x1ED1, 0x815B, 0x815D, 0x1ED3, 0x8160, 0x8164, 0x1ED6,
0x8165, 0x8165, 0x205A, 0x8166, 0x8166, 0x2053, 0x8167, 0x8167, 0x2058,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp
index 6be7bbfe5c..2f127aa9f1 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_Japan1CID2Unicode_4[15444] = {
+const uint16_t g_FXCMAP_Japan1CID2Unicode_4[15444] = {
0xFFFD, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, 0x0030,
0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp
index e729ebf90c..fc8c7913d8 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_EUC_H_1[120 * 3] = {
+const uint16_t g_FXCMAP_EUC_H_1[120 * 3] = {
0x0020, 0x007E, 0x00E7, 0x8EA0, 0x8EDF, 0x0146, 0xA1A1, 0xA1FE, 0x0279,
0xA2A1, 0xA2AE, 0x02D7, 0xA2BA, 0xA2C1, 0x02E5, 0xA2CA, 0xA2D0, 0x02ED,
0xA2DC, 0xA2EA, 0x02F4, 0xA2F2, 0xA2F9, 0x0303, 0xA2FE, 0xA2FE, 0x030B,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp
index af095bc570..b5b72fedde 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_EUC_V_1[27 * 3] = {
+const uint16_t g_FXCMAP_EUC_V_1[27 * 3] = {
0xA1A2, 0xA1A3, 0x1ECF, 0xA1B1, 0xA1B2, 0x1ED1, 0xA1BC, 0xA1BE, 0x1ED3,
0xA1C1, 0xA1C5, 0x1ED6, 0xA1CA, 0xA1DB, 0x1EDB, 0xA1E1, 0xA1E1, 0x1EED,
0xA4A1, 0xA4A1, 0x1EEE, 0xA4A3, 0xA4A3, 0x1EEF, 0xA4A5, 0xA4A5, 0x1EF0,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp
index f4399cbdea..aed4cd992b 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_Ext_RKSJ_H_2[665 * 3] = {
+const uint16_t g_FXCMAP_Ext_RKSJ_H_2[665 * 3] = {
0x0020, 0x007E, 0x00E7, 0x00A0, 0x00DF, 0x0146, 0x8140, 0x817E, 0x0279,
0x8180, 0x8188, 0x02B8, 0x8189, 0x8189, 0x1D36, 0x818A, 0x81AC, 0x02C2,
0x824F, 0x8258, 0x030C, 0x8260, 0x8279, 0x0316, 0x8281, 0x829A, 0x0330,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-V_2.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-V_2.cpp
index f3dbea981c..06cc2fecc1 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-V_2.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-V_2.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_Ext_RKSJ_V_2[39 * 3] = {
+const uint16_t g_FXCMAP_Ext_RKSJ_V_2[39 * 3] = {
0x8141, 0x8142, 0x1ECF, 0x8143, 0x8143, 0x204C, 0x8144, 0x8144, 0x2052,
0x814A, 0x814A, 0x2050, 0x814B, 0x814B, 0x204F, 0x815B, 0x815D, 0x1ED3,
0x8160, 0x8164, 0x1ED6, 0x8165, 0x8165, 0x2059, 0x8166, 0x8166, 0x2054,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/H_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/H_1.cpp
index 2905a5896b..082c1fadf1 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/H_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/H_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_H_1[118 * 3] = {
+const uint16_t g_FXCMAP_H_1[118 * 3] = {
0x2121, 0x217E, 0x0279, 0x2221, 0x222E, 0x02D7, 0x223A, 0x2241, 0x02E5,
0x224A, 0x2250, 0x02ED, 0x225C, 0x226A, 0x02F4, 0x2272, 0x2279, 0x0303,
0x227E, 0x227E, 0x030B, 0x2330, 0x2339, 0x030C, 0x2341, 0x235A, 0x0316,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-H_4.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-H_4.cpp
index ac3ae2f82c..9137660760 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-H_4.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-H_4.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_UniJIS_UCS2_HW_H_4[4 * 3] = {
+const uint16_t g_FXCMAP_UniJIS_UCS2_HW_H_4[4 * 3] = {
0x0020, 0x005B, 0x00E7, 0x005C, 0x005C, 0x220F,
0x005D, 0x007E, 0x0124, 0x00A5, 0x00A5, 0x0123,
};
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-V_4.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-V_4.cpp
index 2753934fc2..0df6fb3019 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-V_4.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-V_4.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_UniJIS_UCS2_HW_V_4[199 * 3] = {
+const uint16_t g_FXCMAP_UniJIS_UCS2_HW_V_4[199 * 3] = {
0x0020, 0x005B, 0x00E7, 0x005C, 0x005C, 0x220F, 0x005D, 0x007E, 0x0124,
0x00A5, 0x00A5, 0x0123, 0x00B0, 0x00B0, 0x204D, 0x2010, 0x2010, 0x1ED5,
0x2015, 0x2015, 0x1ED4, 0x2016, 0x2016, 0x1ED7, 0x2018, 0x2019, 0x2059,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp
index 9c1387a185..03af2e8aee 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_UniJIS_UCS2_H_4[9772 * 2] = {
+const uint16_t g_FXCMAP_UniJIS_UCS2_H_4[9772 * 2] = {
0x0020, 0x0001, 0x0021, 0x0002, 0x0022, 0x0003, 0x0023, 0x0004, 0x0024,
0x0005, 0x0025, 0x0006, 0x0026, 0x0007, 0x0027, 0x0008, 0x0028, 0x0009,
0x0029, 0x000A, 0x002A, 0x000B, 0x002B, 0x000C, 0x002C, 0x000D, 0x002D,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp
index fc0375cb20..715ceb09c0 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_UniJIS_UCS2_V_4[251 * 2] = {
+const uint16_t g_FXCMAP_UniJIS_UCS2_V_4[251 * 2] = {
0x00B0, 0x204D, 0x2010, 0x1ED5, 0x2015, 0x1ED4, 0x2016, 0x1ED7, 0x2018,
0x2059, 0x2019, 0x205A, 0x201C, 0x2057, 0x201D, 0x2058, 0x2025, 0x1EDA,
0x2026, 0x1ED9, 0x2032, 0x2051, 0x2033, 0x205B, 0x2190, 0x02E2, 0x2191,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp
index 1c5663e3d9..85adc38cbb 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h"
-const FX_WORD g_FXCMAP_V_1[27 * 3] = {
+const uint16_t g_FXCMAP_V_1[27 * 3] = {
0x2122, 0x2123, 0x1ECF, 0x2131, 0x2132, 0x1ED1, 0x213C, 0x213E, 0x1ED3,
0x2141, 0x2145, 0x1ED6, 0x214A, 0x215B, 0x1EDB, 0x2161, 0x2161, 0x1EED,
0x2421, 0x2421, 0x1EEE, 0x2423, 0x2423, 0x1EEF, 0x2425, 0x2425, 0x1EF0,
diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h b/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h
index 851dbde44e..d871735942 100644
--- a/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h
+++ b/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h
@@ -7,29 +7,29 @@
#ifndef CORE_FPDFAPI_FPDF_CMAPS_JAPAN1_CMAPS_JAPAN1_H_
#define CORE_FPDFAPI_FPDF_CMAPS_JAPAN1_CMAPS_JAPAN1_H_
-#include "core/include/fxcrt/fx_system.h" // For FX_WORD.
+#include <stdint.h>
-extern const FX_WORD g_FXCMAP_83pv_RKSJ_H_1[];
-extern const FX_WORD g_FXCMAP_90ms_RKSJ_H_2[];
-extern const FX_WORD g_FXCMAP_90ms_RKSJ_V_2[];
-extern const FX_WORD g_FXCMAP_90msp_RKSJ_H_2[];
-extern const FX_WORD g_FXCMAP_90msp_RKSJ_V_2[];
-extern const FX_WORD g_FXCMAP_90pv_RKSJ_H_1[];
-extern const FX_WORD g_FXCMAP_Add_RKSJ_H_1[];
-extern const FX_WORD g_FXCMAP_Add_RKSJ_V_1[];
-extern const FX_WORD g_FXCMAP_EUC_H_1[];
-extern const FX_WORD g_FXCMAP_EUC_V_1[];
-extern const FX_WORD g_FXCMAP_Ext_RKSJ_H_2[];
-extern const FX_WORD g_FXCMAP_Ext_RKSJ_V_2[];
-extern const FX_WORD g_FXCMAP_H_1[];
-extern const FX_WORD g_FXCMAP_V_1[];
-extern const FX_WORD g_FXCMAP_UniJIS_UCS2_H_4[];
-extern const FX_WORD g_FXCMAP_UniJIS_UCS2_V_4[];
-extern const FX_WORD g_FXCMAP_UniJIS_UCS2_HW_H_4[];
-extern const FX_WORD g_FXCMAP_UniJIS_UCS2_HW_V_4[];
-extern const FX_WORD g_FXCMAP_UniJIS_UTF16_H_0[];
-extern const FX_WORD g_FXCMAP_UniJIS_UTF16_H_0_DWord[];
-extern const FX_WORD g_FXCMAP_UniJIS_UTF16_V_0[];
-extern const FX_WORD g_FXCMAP_Japan1CID2Unicode_4[];
+extern const uint16_t g_FXCMAP_83pv_RKSJ_H_1[];
+extern const uint16_t g_FXCMAP_90ms_RKSJ_H_2[];
+extern const uint16_t g_FXCMAP_90ms_RKSJ_V_2[];
+extern const uint16_t g_FXCMAP_90msp_RKSJ_H_2[];
+extern const uint16_t g_FXCMAP_90msp_RKSJ_V_2[];
+extern const uint16_t g_FXCMAP_90pv_RKSJ_H_1[];
+extern const uint16_t g_FXCMAP_Add_RKSJ_H_1[];
+extern const uint16_t g_FXCMAP_Add_RKSJ_V_1[];
+extern const uint16_t g_FXCMAP_EUC_H_1[];
+extern const uint16_t g_FXCMAP_EUC_V_1[];
+extern const uint16_t g_FXCMAP_Ext_RKSJ_H_2[];
+extern const uint16_t g_FXCMAP_Ext_RKSJ_V_2[];
+extern const uint16_t g_FXCMAP_H_1[];
+extern const uint16_t g_FXCMAP_V_1[];
+extern const uint16_t g_FXCMAP_UniJIS_UCS2_H_4[];
+extern const uint16_t g_FXCMAP_UniJIS_UCS2_V_4[];
+extern const uint16_t g_FXCMAP_UniJIS_UCS2_HW_H_4[];
+extern const uint16_t g_FXCMAP_UniJIS_UCS2_HW_V_4[];
+extern const uint16_t g_FXCMAP_UniJIS_UTF16_H_0[];
+extern const uint16_t g_FXCMAP_UniJIS_UTF16_H_0_DWord[];
+extern const uint16_t g_FXCMAP_UniJIS_UTF16_V_0[];
+extern const uint16_t g_FXCMAP_Japan1CID2Unicode_4[];
#endif // CORE_FPDFAPI_FPDF_CMAPS_JAPAN1_CMAPS_JAPAN1_H_
diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp
index 71c065375e..80c6caacc4 100644
--- a/core/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h"
-const FX_WORD g_FXCMAP_Korea1CID2Unicode_2[18352] = {
+const uint16_t g_FXCMAP_Korea1CID2Unicode_2[18352] = {
0xFFFD, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, 0x0030,
0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039,
diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp
index 93349291d7..6c63a89263 100644
--- a/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h"
-const FX_WORD g_FXCMAP_KSC_EUC_H_0[467 * 3] = {
+const uint16_t g_FXCMAP_KSC_EUC_H_0[467 * 3] = {
0x0020, 0x007E, 0x1F9E, 0xA1A1, 0xA1FE, 0x0065, 0xA2A1, 0xA2E5, 0x00C3,
0xA3A1, 0xA3FE, 0x0108, 0xA4A1, 0xA4D3, 0x0166, 0xA4D5, 0xA4FE, 0x0199,
0xA5A1, 0xA5AA, 0x01C3, 0xA5B0, 0xA5B9, 0x01CD, 0xA5C1, 0xA5D8, 0x01D7,
diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp
index 843ab7c0d1..64d8bb2649 100644
--- a/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h"
-const FX_WORD g_FXCMAP_KSC_EUC_V_0[16 * 3] = {
+const uint16_t g_FXCMAP_KSC_EUC_V_0[16 * 3] = {
0xA1A2, 0xA1A3, 0x1F78, 0xA1A5, 0xA1A5, 0x1F7A, 0xA1A6, 0xA1A6,
0x2080, 0xA1A9, 0xA1AB, 0x1F7B, 0xA1AD, 0xA1AD, 0x1F7E, 0xA1B2,
0xA1BD, 0x1F7F, 0xA1EB, 0xA1EB, 0x1F8B, 0xA3A1, 0xA3A1, 0x1F8C,
diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp
index 4476c3c169..f4c0d0a1a2 100644
--- a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h"
-const FX_WORD g_FXCMAP_KSCms_UHC_HW_H_1[675 * 3] = {
+const uint16_t g_FXCMAP_KSCms_UHC_HW_H_1[675 * 3] = {
0x0020, 0x007E, 0x1F9E, 0x8141, 0x815A, 0x2475, 0x8161, 0x817A, 0x248F,
0x8181, 0x81FE, 0x24A9, 0x8241, 0x825A, 0x2527, 0x8261, 0x827A, 0x2541,
0x8281, 0x82FE, 0x255B, 0x8341, 0x835A, 0x25D9, 0x8361, 0x837A, 0x25F3,
diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-V_1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-V_1.cpp
index 1ebcdd34be..a6e284125c 100644
--- a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-V_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-V_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h"
-const FX_WORD g_FXCMAP_KSCms_UHC_HW_V_1[16 * 3] = {
+const uint16_t g_FXCMAP_KSCms_UHC_HW_V_1[16 * 3] = {
0xA1A2, 0xA1A3, 0x1F78, 0xA1A5, 0xA1A5, 0x1F7A, 0xA1A6, 0xA1A6,
0x2080, 0xA1A9, 0xA1AB, 0x1F7B, 0xA1AD, 0xA1AD, 0x1F7E, 0xA1B2,
0xA1BD, 0x1F7F, 0xA1EB, 0xA1EB, 0x1F8B, 0xA3A1, 0xA3A1, 0x1F8C,
diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-H_1.cpp
index 865b7c6c79..1bec769eeb 100644
--- a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-H_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-H_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h"
-const FX_WORD g_FXCMAP_KSCms_UHC_H_1[675 * 3] = {
+const uint16_t g_FXCMAP_KSCms_UHC_H_1[675 * 3] = {
0x0020, 0x007E, 0x0001, 0x8141, 0x815A, 0x2475, 0x8161, 0x817A, 0x248F,
0x8181, 0x81FE, 0x24A9, 0x8241, 0x825A, 0x2527, 0x8261, 0x827A, 0x2541,
0x8281, 0x82FE, 0x255B, 0x8341, 0x835A, 0x25D9, 0x8361, 0x837A, 0x25F3,
diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-V_1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-V_1.cpp
index ed55f14c12..ce17fec819 100644
--- a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-V_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-V_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h"
-const FX_WORD g_FXCMAP_KSCms_UHC_V_1[16 * 3] = {
+const uint16_t g_FXCMAP_KSCms_UHC_V_1[16 * 3] = {
0xA1A2, 0xA1A3, 0x1F78, 0xA1A5, 0xA1A5, 0x1F7A, 0xA1A6, 0xA1A6,
0x2080, 0xA1A9, 0xA1AB, 0x1F7B, 0xA1AD, 0xA1AD, 0x1F7E, 0xA1B2,
0xA1BD, 0x1F7F, 0xA1EB, 0xA1EB, 0x1F8B, 0xA3A1, 0xA3A1, 0x1F8C,
diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSCpc-EUC-H_0.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSCpc-EUC-H_0.cpp
index 2fcebc1fb1..4639797059 100644
--- a/core/fpdfapi/fpdf_cmaps/Korea1/KSCpc-EUC-H_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSCpc-EUC-H_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h"
-const FX_WORD g_FXCMAP_KSCpc_EUC_H_0[509 * 3] = {
+const uint16_t g_FXCMAP_KSCpc_EUC_H_0[509 * 3] = {
0x0020, 0x007E, 0x0001, 0x0081, 0x0083, 0x0060, 0x00FE, 0x00FF, 0x0063,
0xA141, 0xA17D, 0x1FFF, 0xA181, 0xA19A, 0x203C, 0xA19C, 0xA1A0, 0x2056,
0xA1A1, 0xA1A1, 0x0065, 0xA1A2, 0xA1A3, 0x205B, 0xA1A4, 0xA1FE, 0x0068,
diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp
index 8bab432fcd..9080deacd1 100644
--- a/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h"
-const FX_WORD g_FXCMAP_UniKS_UCS2_H_1[8394 * 3] = {
+const uint16_t g_FXCMAP_UniKS_UCS2_H_1[8394 * 3] = {
0x0020, 0x007E, 0x0001, 0x00A1, 0x00A1, 0x00D0, 0x00A4, 0x00A4, 0x00D6,
0x00A7, 0x00A7, 0x009B, 0x00A8, 0x00A8, 0x006B, 0x00AA, 0x00AA, 0x029C,
0x00AB, 0x00AB, 0x00B0, 0x00B0, 0x00B0, 0x008A, 0x00B1, 0x00B1, 0x0082,
diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp
index 834594d007..3eefc131e0 100644
--- a/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h"
-const FX_WORD g_FXCMAP_UniKS_UCS2_V_1[18 * 3] = {
+const uint16_t g_FXCMAP_UniKS_UCS2_V_1[18 * 3] = {
0x2013, 0x2014, 0x1F7B, 0x2016, 0x2016, 0x1F7D, 0x2025, 0x2025, 0x1F7A,
0x3001, 0x3002, 0x1F78, 0x3008, 0x3011, 0x1F81, 0x3013, 0x3013, 0x1F8B,
0x3014, 0x3015, 0x1F7F, 0xFF01, 0xFF01, 0x1F8C, 0xFF08, 0xFF09, 0x1F8D,
diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp
index 81f0c6ea7e..537eab0a42 100644
--- a/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp
+++ b/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h"
-const FX_WORD g_FXCMAP_UniKS_UTF16_H_0[158 * 2] = {
+const uint16_t g_FXCMAP_UniKS_UTF16_H_0[158 * 2] = {
0x00A9, 0x0062, 0x2010, 0x0061, 0x20A9, 0x0060, 0x2F00, 0x193C, 0x2F04,
0x18EC, 0x2F06, 0x190D, 0x2F08, 0x192B, 0x2F0A, 0x194D, 0x2F0B, 0x1D4B,
0x2F11, 0x10AE, 0x2F12, 0x116A, 0x2F14, 0x143F, 0x2F17, 0x168C, 0x2F18,
diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h b/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h
index 0180658422..cca9a59905 100644
--- a/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h
+++ b/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h
@@ -7,18 +7,18 @@
#ifndef CORE_FPDFAPI_FPDF_CMAPS_KOREA1_CMAPS_KOREA1_H_
#define CORE_FPDFAPI_FPDF_CMAPS_KOREA1_CMAPS_KOREA1_H_
-#include "core/include/fxcrt/fx_system.h" // For FX_WORD.
+#include <stdint.h>
-extern const FX_WORD g_FXCMAP_KSC_EUC_H_0[];
-extern const FX_WORD g_FXCMAP_KSC_EUC_V_0[];
-extern const FX_WORD g_FXCMAP_KSCms_UHC_H_1[];
-extern const FX_WORD g_FXCMAP_KSCms_UHC_V_1[];
-extern const FX_WORD g_FXCMAP_KSCms_UHC_HW_H_1[];
-extern const FX_WORD g_FXCMAP_KSCms_UHC_HW_V_1[];
-extern const FX_WORD g_FXCMAP_KSCpc_EUC_H_0[];
-extern const FX_WORD g_FXCMAP_UniKS_UCS2_H_1[];
-extern const FX_WORD g_FXCMAP_UniKS_UCS2_V_1[];
-extern const FX_WORD g_FXCMAP_UniKS_UTF16_H_0[];
-extern const FX_WORD g_FXCMAP_Korea1CID2Unicode_2[];
+extern const uint16_t g_FXCMAP_KSC_EUC_H_0[];
+extern const uint16_t g_FXCMAP_KSC_EUC_V_0[];
+extern const uint16_t g_FXCMAP_KSCms_UHC_H_1[];
+extern const uint16_t g_FXCMAP_KSCms_UHC_V_1[];
+extern const uint16_t g_FXCMAP_KSCms_UHC_HW_H_1[];
+extern const uint16_t g_FXCMAP_KSCms_UHC_HW_V_1[];
+extern const uint16_t g_FXCMAP_KSCpc_EUC_H_0[];
+extern const uint16_t g_FXCMAP_UniKS_UCS2_H_1[];
+extern const uint16_t g_FXCMAP_UniKS_UCS2_V_1[];
+extern const uint16_t g_FXCMAP_UniKS_UTF16_H_0[];
+extern const uint16_t g_FXCMAP_Korea1CID2Unicode_2[];
#endif // CORE_FPDFAPI_FPDF_CMAPS_KOREA1_CMAPS_KOREA1_H_
diff --git a/core/fpdfapi/fpdf_cmaps/cmap_int.h b/core/fpdfapi/fpdf_cmaps/cmap_int.h
index a812d84f33..8dea4b4759 100644
--- a/core/fpdfapi/fpdf_cmaps/cmap_int.h
+++ b/core/fpdfapi/fpdf_cmaps/cmap_int.h
@@ -7,17 +7,17 @@
#ifndef CORE_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_
#define CORE_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_
-#include "core/include/fxcrt/fx_system.h" // For FX_WORD.
+#include "core/include/fxcrt/fx_system.h"
struct FXCMAP_CMap {
enum MapType { None, Single, Range, Reverse };
const char* m_Name;
MapType m_WordMapType;
- const FX_WORD* m_pWordMap;
+ const uint16_t* m_pWordMap;
int m_WordCount;
MapType m_DWordMapType;
- const FX_WORD* m_pDWordMap;
+ const uint16_t* m_pDWordMap;
int m_DWordCount;
int m_UseOffset;
};
@@ -26,7 +26,7 @@ void FPDFAPI_FindEmbeddedCMap(const char* name,
int charset,
int coding,
const FXCMAP_CMap*& pMap);
-FX_WORD FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode);
-FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid);
+uint16_t FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode);
+FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, uint16_t cid);
#endif // CORE_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_
diff --git a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
index d54620d701..73ac8e1f6a 100644
--- a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
+++ b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
@@ -30,15 +30,15 @@ void FPDFAPI_FindEmbeddedCMap(const char* name,
}
extern "C" {
static int compareWord(const void* p1, const void* p2) {
- return (*(FX_WORD*)p1) - (*(FX_WORD*)p2);
+ return (*(uint16_t*)p1) - (*(uint16_t*)p2);
}
};
extern "C" {
static int compareWordRange(const void* key, const void* element) {
- if (*(FX_WORD*)key < *(FX_WORD*)element) {
+ if (*(uint16_t*)key < *(uint16_t*)element) {
return -1;
}
- if (*(FX_WORD*)key > ((FX_WORD*)element)[1]) {
+ if (*(uint16_t*)key > ((uint16_t*)element)[1]) {
return 1;
}
return 0;
@@ -47,15 +47,15 @@ static int compareWordRange(const void* key, const void* element) {
extern "C" {
static int compareDWordRange(const void* p1, const void* p2) {
FX_DWORD key = *(FX_DWORD*)p1;
- FX_WORD hiword = (FX_WORD)(key >> 16);
- FX_WORD* element = (FX_WORD*)p2;
+ uint16_t hiword = (uint16_t)(key >> 16);
+ uint16_t* element = (uint16_t*)p2;
if (hiword < element[0]) {
return -1;
}
if (hiword > element[0]) {
return 1;
}
- FX_WORD loword = (FX_WORD)key;
+ uint16_t loword = (uint16_t)key;
if (loword < element[1]) {
return -1;
}
@@ -68,7 +68,7 @@ static int compareDWordRange(const void* p1, const void* p2) {
extern "C" {
static int compareDWordSingle(const void* p1, const void* p2) {
FX_DWORD key = *(FX_DWORD*)p1;
- FX_DWORD value = ((*(FX_WORD*)p2) << 16) | ((FX_WORD*)p2)[1];
+ FX_DWORD value = ((*(uint16_t*)p2) << 16) | ((uint16_t*)p2)[1];
if (key < value) {
return -1;
}
@@ -78,20 +78,20 @@ static int compareDWordSingle(const void* p1, const void* p2) {
return 0;
}
};
-FX_WORD FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode) {
+uint16_t FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode) {
if (charcode >> 16) {
while (1) {
if (pMap->m_DWordMapType == FXCMAP_CMap::Range) {
- FX_WORD* found =
- (FX_WORD*)FXSYS_bsearch(&charcode, pMap->m_pDWordMap,
- pMap->m_DWordCount, 8, compareDWordRange);
+ uint16_t* found =
+ (uint16_t*)FXSYS_bsearch(&charcode, pMap->m_pDWordMap,
+ pMap->m_DWordCount, 8, compareDWordRange);
if (found) {
- return found[3] + (FX_WORD)charcode - found[1];
+ return found[3] + (uint16_t)charcode - found[1];
}
} else if (pMap->m_DWordMapType == FXCMAP_CMap::Single) {
- FX_WORD* found =
- (FX_WORD*)FXSYS_bsearch(&charcode, pMap->m_pDWordMap,
- pMap->m_DWordCount, 6, compareDWordSingle);
+ uint16_t* found =
+ (uint16_t*)FXSYS_bsearch(&charcode, pMap->m_pDWordMap,
+ pMap->m_DWordCount, 6, compareDWordSingle);
if (found) {
return found[2];
}
@@ -103,19 +103,19 @@ FX_WORD FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode) {
}
return 0;
}
- FX_WORD code = (FX_WORD)charcode;
+ uint16_t code = (uint16_t)charcode;
while (1) {
if (!pMap->m_pWordMap) {
return 0;
}
if (pMap->m_WordMapType == FXCMAP_CMap::Single) {
- FX_WORD* found = (FX_WORD*)FXSYS_bsearch(
+ uint16_t* found = (uint16_t*)FXSYS_bsearch(
&code, pMap->m_pWordMap, pMap->m_WordCount, 4, compareWord);
if (found) {
return found[1];
}
} else if (pMap->m_WordMapType == FXCMAP_CMap::Range) {
- FX_WORD* found = (FX_WORD*)FXSYS_bsearch(
+ uint16_t* found = (uint16_t*)FXSYS_bsearch(
&code, pMap->m_pWordMap, pMap->m_WordCount, 6, compareWordRange);
if (found) {
return found[2] + code - found[0];
@@ -128,11 +128,11 @@ FX_WORD FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode) {
}
return 0;
}
-FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid) {
+FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, uint16_t cid) {
while (1) {
if (pMap->m_WordMapType == FXCMAP_CMap::Single) {
- const FX_WORD* pCur = pMap->m_pWordMap;
- const FX_WORD* pEnd = pMap->m_pWordMap + pMap->m_WordCount * 2;
+ const uint16_t* pCur = pMap->m_pWordMap;
+ const uint16_t* pEnd = pMap->m_pWordMap + pMap->m_WordCount * 2;
while (pCur < pEnd) {
if (pCur[1] == cid) {
return pCur[0];
@@ -140,8 +140,8 @@ FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid) {
pCur += 2;
}
} else if (pMap->m_WordMapType == FXCMAP_CMap::Range) {
- const FX_WORD* pCur = pMap->m_pWordMap;
- const FX_WORD* pEnd = pMap->m_pWordMap + pMap->m_WordCount * 3;
+ const uint16_t* pCur = pMap->m_pWordMap;
+ const uint16_t* pEnd = pMap->m_pWordMap + pMap->m_WordCount * 3;
while (pCur < pEnd) {
if (cid >= pCur[2] && cid <= pCur[2] + pCur[1] - pCur[0]) {
return pCur[0] + cid - pCur[2];
@@ -156,8 +156,8 @@ FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid) {
}
while (1) {
if (pMap->m_DWordMapType == FXCMAP_CMap::Range) {
- const FX_WORD* pCur = pMap->m_pDWordMap;
- const FX_WORD* pEnd = pMap->m_pDWordMap + pMap->m_DWordCount * 4;
+ const uint16_t* pCur = pMap->m_pDWordMap;
+ const uint16_t* pEnd = pMap->m_pDWordMap + pMap->m_DWordCount * 4;
while (pCur < pEnd) {
if (cid >= pCur[3] && cid <= pCur[3] + pCur[2] - pCur[1]) {
return (((FX_DWORD)pCur[0] << 16) | pCur[1]) + cid - pCur[3];
@@ -165,8 +165,8 @@ FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid) {
pCur += 4;
}
} else if (pMap->m_DWordMapType == FXCMAP_CMap::Single) {
- const FX_WORD* pCur = pMap->m_pDWordMap;
- const FX_WORD* pEnd = pMap->m_pDWordMap + pMap->m_DWordCount * 3;
+ const uint16_t* pCur = pMap->m_pDWordMap;
+ const uint16_t* pEnd = pMap->m_pDWordMap + pMap->m_DWordCount * 3;
while (pCur < pEnd) {
if (pCur[2] == cid) {
return ((FX_DWORD)pCur[0] << 16) | pCur[1];
@@ -183,7 +183,7 @@ FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid) {
}
void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset,
- const FX_WORD*& pMap,
+ const uint16_t*& pMap,
FX_DWORD& count) {
CPDF_FontGlobals* pFontGlobals =
CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals();
diff --git a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 2fddf10a78..874b205c84 100644
--- a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -463,7 +463,7 @@ static const FX_LANG2CS gs_FXLang2CharsetTable[] = {
{3763, 163}, {3886, 134}, {105943, 0}, {106375, 1}, {3923451837, 134},
{3923451838, 136},
};
-static FX_WORD FX_GetCsFromLangCode(uint32_t uCode) {
+static uint16_t FX_GetCsFromLangCode(uint32_t uCode) {
int32_t iStart = 0;
int32_t iEnd = sizeof(gs_FXLang2CharsetTable) / sizeof(FX_LANG2CS) - 1;
while (iStart <= iEnd) {
@@ -480,7 +480,7 @@ static FX_WORD FX_GetCsFromLangCode(uint32_t uCode) {
}
return 0;
}
-static FX_WORD FX_GetCharsetFromLang(const FX_CHAR* pLang, int32_t iLength) {
+static uint16_t FX_GetCharsetFromLang(const FX_CHAR* pLang, int32_t iLength) {
FXSYS_assert(pLang);
if (iLength < 0) {
iLength = FXSYS_strlen(pLang);
diff --git a/core/fpdfapi/fpdf_font/font_int.h b/core/fpdfapi/fpdf_font/font_int.h
index 8ceefe353e..c9981387e6 100644
--- a/core/fpdfapi/fpdf_font/font_int.h
+++ b/core/fpdfapi/fpdf_font/font_int.h
@@ -71,7 +71,7 @@ class CPDF_FontGlobals {
int m_Count;
} m_EmbeddedCharsets[CIDSET_NUM_SETS];
struct {
- const FX_WORD* m_pMap;
+ const uint16_t* m_pMap;
int m_Count;
} m_EmbeddedToUnicodes[CIDSET_NUM_SETS];
@@ -128,8 +128,8 @@ class CPDF_CMap {
void Release();
FX_BOOL IsLoaded() const { return m_bLoaded; }
FX_BOOL IsVertWriting() const { return m_bVertical; }
- FX_WORD CIDFromCharCode(FX_DWORD charcode) const;
- FX_DWORD CharCodeFromCID(FX_WORD CID) const;
+ uint16_t CIDFromCharCode(FX_DWORD charcode) const;
+ FX_DWORD CharCodeFromCID(uint16_t CID) const;
int GetCharSize(FX_DWORD charcode) const;
FX_DWORD GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const;
int CountChar(const FX_CHAR* pString, int size) const;
@@ -155,7 +155,7 @@ class CPDF_CMap {
CodingScheme m_CodingScheme;
int m_nCodeRanges;
uint8_t* m_pLeadingBytes;
- FX_WORD* m_pMapping;
+ uint16_t* m_pMapping;
uint8_t* m_pAddMapping;
FX_BOOL m_bLoaded;
const FXCMAP_CMap* m_pEmbedMap;
@@ -169,11 +169,11 @@ class CPDF_CID2UnicodeMap {
FX_BOOL Initialize();
FX_BOOL IsLoaded();
void Load(CPDF_CMapManager* pMgr, CIDSet charset, FX_BOOL bPromptCJK);
- FX_WCHAR UnicodeFromCID(FX_WORD CID);
+ FX_WCHAR UnicodeFromCID(uint16_t CID);
protected:
CIDSet m_Charset;
- const FX_WORD* m_pEmbeddedMap;
+ const uint16_t* m_pEmbeddedMap;
FX_DWORD m_EmbeddedCount;
};
@@ -197,7 +197,7 @@ class CPDF_ToUnicodeMap {
};
void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset,
- const FX_WORD*& pMap,
+ const uint16_t*& pMap,
FX_DWORD& count);
#endif // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_
diff --git a/core/fpdfapi/fpdf_font/fpdf_font.cpp b/core/fpdfapi/fpdf_font/fpdf_font.cpp
index 0f58bcba09..d079110679 100644
--- a/core/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -531,7 +531,7 @@ CFX_WideString CPDF_ToUnicodeMap::Lookup(FX_DWORD charcode) {
return CFX_WideString(buf + index + 1, len);
}
if (m_pBaseMap) {
- return m_pBaseMap->UnicodeFromCID((FX_WORD)charcode);
+ return m_pBaseMap->UnicodeFromCID((uint16_t)charcode);
}
return CFX_WideString();
}
@@ -1106,7 +1106,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
for (int charcode = 0; charcode < 256; charcode++) {
const uint8_t prefix[4] = {0x00, 0xf0, 0xf1, 0xf2};
for (int j = 0; j < 4; j++) {
- FX_WORD unicode = prefix[j] * 256 + charcode;
+ uint16_t unicode = prefix[j] * 256 + charcode;
m_GlyphIndex[charcode] =
FXFT_Get_Char_Index(m_Font.GetFace(), unicode);
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
@@ -1383,7 +1383,7 @@ int CPDF_FontEncoding::CharCodeFromUnicode(FX_WCHAR unicode) const {
}
CPDF_FontEncoding::CPDF_FontEncoding(int PredefinedEncoding) {
- const FX_WORD* pSrc = PDF_UnicodesForPredefinedCharSet(PredefinedEncoding);
+ const uint16_t* pSrc = PDF_UnicodesForPredefinedCharSet(PredefinedEncoding);
if (!pSrc) {
FXSYS_memset(m_Unicodes, 0, sizeof(m_Unicodes));
} else {
@@ -1401,7 +1401,7 @@ CPDF_Object* CPDF_FontEncoding::Realize() {
int predefined = 0;
for (int cs = PDFFONT_ENCODING_WINANSI; cs < PDFFONT_ENCODING_ZAPFDINGBATS;
cs++) {
- const FX_WORD* pSrc = PDF_UnicodesForPredefinedCharSet(cs);
+ const uint16_t* pSrc = PDF_UnicodesForPredefinedCharSet(cs);
FX_BOOL match = TRUE;
for (int i = 0; i < 256; ++i) {
if (m_Unicodes[i] != pSrc[i]) {
@@ -1426,7 +1426,7 @@ CPDF_Object* CPDF_FontEncoding::Realize() {
}
return NULL;
}
- const FX_WORD* pStandard =
+ const uint16_t* pStandard =
PDF_UnicodesForPredefinedCharSet(PDFFONT_ENCODING_WINANSI);
CPDF_Array* pDiff = new CPDF_Array;
for (int i = 0; i < 256; i++) {
@@ -1503,7 +1503,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() {
for (; charcode < nStartChar; charcode++) {
m_GlyphIndex[charcode] = 0;
}
- FX_WORD nGlyph = charcode - nStartChar + 3;
+ uint16_t nGlyph = charcode - nStartChar + 3;
for (; charcode < 256; charcode++, nGlyph++) {
m_GlyphIndex[charcode] = nGlyph;
}
@@ -1533,7 +1533,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() {
if (bMSSymbol) {
const uint8_t prefix[4] = {0x00, 0xf0, 0xf1, 0xf2};
for (int j = 0; j < 4; j++) {
- FX_WORD unicode = prefix[j] * 256 + charcode;
+ uint16_t unicode = prefix[j] * 256 + charcode;
m_GlyphIndex[charcode] =
FXFT_Get_Char_Index(m_Font.GetFace(), unicode);
if (m_GlyphIndex[charcode]) {
@@ -1587,7 +1587,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() {
FX_BOOL bGotOne = FALSE;
for (int charcode = 0; charcode < 256; charcode++) {
for (int j = 0; j < 4; j++) {
- FX_WORD unicode = prefix[j] * 256 + charcode;
+ uint16_t unicode = prefix[j] * 256 + charcode;
m_GlyphIndex[charcode] = FXFT_Get_Char_Index(m_Font.GetFace(), unicode);
if (m_GlyphIndex[charcode]) {
bGotOne = TRUE;
@@ -1630,7 +1630,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() {
}
if (FXFT_Select_Charmap(m_Font.GetFace(), FXFT_ENCODING_UNICODE) == 0) {
FX_BOOL bGotOne = FALSE;
- const FX_WORD* pUnicodes = PDF_UnicodesForPredefinedCharSet(baseEncoding);
+ const uint16_t* pUnicodes = PDF_UnicodesForPredefinedCharSet(baseEncoding);
for (int charcode = 0; charcode < 256; charcode++) {
if (m_pFontFile) {
m_Encoding.m_Unicodes[charcode] = charcode;
diff --git a/core/fpdfapi/fpdf_font/fpdf_font_charset.cpp b/core/fpdfapi/fpdf_font/fpdf_font_charset.cpp
index 642efd62ca..1b503c69a6 100644
--- a/core/fpdfapi/fpdf_font/fpdf_font_charset.cpp
+++ b/core/fpdfapi/fpdf_font/fpdf_font_charset.cpp
@@ -9,7 +9,7 @@
#include "core/include/fxge/fx_freetype.h"
static const struct _UnicodeAlt {
- FX_WORD m_Unicode;
+ uint16_t m_Unicode;
const FX_CHAR* m_Alter;
} UnicodeAlts[] = {
{0x00a0, " "}, {0x00a1, "!"}, {0x00a2, "c"}, {0x00a3, "P"},
@@ -60,7 +60,7 @@ const FX_CHAR* FCS_GetAltStr(FX_WCHAR unicode) {
int end = sizeof UnicodeAlts / sizeof(struct _UnicodeAlt) - 1;
while (begin <= end) {
int middle = (begin + end) / 2;
- FX_WORD middlecode = UnicodeAlts[middle].m_Unicode;
+ uint16_t middlecode = UnicodeAlts[middle].m_Unicode;
if (middlecode > unicode) {
end = middle - 1;
} else if (middlecode < unicode) {
@@ -71,7 +71,7 @@ const FX_CHAR* FCS_GetAltStr(FX_WCHAR unicode) {
}
return NULL;
}
-static const FX_WORD StandardEncoding[256] = {
+static const uint16_t StandardEncoding[256] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -101,7 +101,7 @@ static const FX_WORD StandardEncoding[256] = {
0x0152, 0x00ba, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00e6, 0x0000,
0x0000, 0x0000, 0x0131, 0x0000, 0x0000, 0x0142, 0x00f8, 0x0153, 0x00df,
0x0000, 0x0000, 0x0000, 0x0000};
-static const FX_WORD MacRomanEncoding[256] = {
+static const uint16_t MacRomanEncoding[256] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -131,7 +131,7 @@ static const FX_WORD MacRomanEncoding[256] = {
0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, 0x0000, 0x00d2, 0x00da,
0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, 0x00af, 0x02d8, 0x02d9, 0x02da,
0x00b8, 0x02dd, 0x02db, 0x02c7};
-static const FX_WORD AdobeWinAnsiEncoding[256] = {
+static const uint16_t AdobeWinAnsiEncoding[256] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -161,7 +161,7 @@ static const FX_WORD AdobeWinAnsiEncoding[256] = {
0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 0x00f0, 0x00f1, 0x00f2,
0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb,
0x00fc, 0x00fd, 0x00fe, 0x00ff};
-static const FX_WORD MacExpertEncoding[256] = {
+static const uint16_t MacExpertEncoding[256] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -191,7 +191,7 @@ static const FX_WORD MacExpertEncoding[256] = {
0xf6f2, 0xf6eb, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf6ee, 0xf6fb,
0xf6f4, 0xf7af, 0xf6ea, 0x207f, 0xf6ef, 0xf6e2, 0xf6e8, 0xf6f7, 0xf6fc,
0x0000, 0x0000, 0x0000, 0x0000};
-static const FX_WORD AdobeSymbolEncoding[256] = {
+static const uint16_t AdobeSymbolEncoding[256] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -222,7 +222,7 @@ static const FX_WORD AdobeSymbolEncoding[256] = {
0x2320, 0xF8F5, 0x2321, 0xF8F6, 0xF8F7, 0xF8F8, 0xF8F9, 0xF8FA, 0xF8FB,
0xF8FC, 0xF8FD, 0xF8FE, 0x0000,
};
-static const FX_WORD ZapfEncoding[256] = {
+static const uint16_t ZapfEncoding[256] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -1677,7 +1677,7 @@ const FX_CHAR* PDF_CharNameFromPredefinedCharSet(int encoding,
FX_WCHAR FT_UnicodeFromCharCode(int encoding, FX_DWORD charcode) {
switch (encoding) {
case FXFT_ENCODING_UNICODE:
- return (FX_WORD)charcode;
+ return (uint16_t)charcode;
case FXFT_ENCODING_ADOBE_STANDARD:
return StandardEncoding[(uint8_t)charcode];
case FXFT_ENCODING_ADOBE_EXPERT:
@@ -1691,14 +1691,14 @@ FX_WCHAR FT_UnicodeFromCharCode(int encoding, FX_DWORD charcode) {
}
return 0;
}
-static FX_DWORD PDF_FindCode(const FX_WORD* pCodes, FX_WORD unicode) {
+static FX_DWORD PDF_FindCode(const uint16_t* pCodes, uint16_t unicode) {
for (FX_DWORD i = 0; i < 256; i++)
if (pCodes[i] == unicode) {
return i;
}
return 0;
}
-static const FX_WORD MSSymbolEncoding[256] = {
+static const uint16_t MSSymbolEncoding[256] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -1747,7 +1747,7 @@ FX_DWORD FT_CharCodeFromUnicode(int encoding, FX_WCHAR unicode) {
}
return 0;
}
-const FX_WORD* PDF_UnicodesForPredefinedCharSet(int encoding) {
+const uint16_t* PDF_UnicodesForPredefinedCharSet(int encoding) {
switch (encoding) {
case PDFFONT_ENCODING_WINANSI:
return AdobeWinAnsiEncoding;
diff --git a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index f370b86049..60fa40103b 100644
--- a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -306,7 +306,7 @@ FX_DWORD EmbeddedCharcodeFromUnicode(const FXCMAP_CMap* pEmbedMap,
CPDF_FontGlobals* pFontGlobals =
CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals();
- const FX_WORD* pCodes = pFontGlobals->m_EmbeddedToUnicodes[charset].m_pMap;
+ const uint16_t* pCodes = pFontGlobals->m_EmbeddedToUnicodes[charset].m_pMap;
if (!pCodes)
return 0;
@@ -329,13 +329,13 @@ FX_WCHAR EmbeddedUnicodeFromCharcode(const FXCMAP_CMap* pEmbedMap,
if (!IsValidEmbeddedCharcodeFromUnicodeCharset(charset))
return 0;
- FX_WORD cid = FPDFAPI_CIDFromCharCode(pEmbedMap, charcode);
+ uint16_t cid = FPDFAPI_CIDFromCharCode(pEmbedMap, charcode);
if (cid == 0)
return 0;
CPDF_FontGlobals* pFontGlobals =
CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals();
- const FX_WORD* pCodes = pFontGlobals->m_EmbeddedToUnicodes[charset].m_pMap;
+ const uint16_t* pCodes = pFontGlobals->m_EmbeddedToUnicodes[charset].m_pMap;
if (!pCodes)
return 0;
@@ -372,7 +372,7 @@ void FT_UseCIDCharmap(FXFT_Face face, int coding) {
}
const struct CIDTransform {
- FX_WORD CID;
+ uint16_t CID;
uint8_t a, b, c, d, e, f;
} g_Japan1_VertCIDs[] = {
{97, 129, 0, 0, 127, 55, 0}, {7887, 127, 0, 0, 127, 76, 89},
@@ -455,7 +455,7 @@ const struct CIDTransform {
};
int CompareCIDTransform(const void* key, const void* element) {
- FX_WORD CID = *static_cast<const FX_WORD*>(key);
+ uint16_t CID = *static_cast<const uint16_t*>(key);
return CID - static_cast<const struct CIDTransform*>(element)->CID;
}
@@ -565,24 +565,24 @@ void CPDF_CMapParser::ParseWord(const CFX_ByteStringC& word) {
m_CodePoints[m_CodeSeq] = CMap_GetCode(word);
m_CodeSeq++;
FX_DWORD StartCode, EndCode;
- FX_WORD StartCID;
+ uint16_t StartCID;
if (m_Status == 1) {
if (m_CodeSeq < 2) {
return;
}
EndCode = StartCode = m_CodePoints[0];
- StartCID = (FX_WORD)m_CodePoints[1];
+ StartCID = (uint16_t)m_CodePoints[1];
} else {
if (m_CodeSeq < 3) {
return;
}
StartCode = m_CodePoints[0];
EndCode = m_CodePoints[1];
- StartCID = (FX_WORD)m_CodePoints[2];
+ StartCID = (uint16_t)m_CodePoints[2];
}
if (EndCode < 0x10000) {
for (FX_DWORD code = StartCode; code <= EndCode; code++) {
- m_pCMap->m_pMapping[code] = (FX_WORD)(StartCID + code - StartCode);
+ m_pCMap->m_pMapping[code] = (uint16_t)(StartCID + code - StartCode);
}
} else {
FX_DWORD buf[2];
@@ -755,7 +755,7 @@ FX_BOOL CPDF_CMap::LoadPredefined(CPDF_CMapManager* pMgr,
return FALSE;
}
FX_BOOL CPDF_CMap::LoadEmbedded(const uint8_t* pData, FX_DWORD size) {
- m_pMapping = FX_Alloc(FX_WORD, 65536);
+ m_pMapping = FX_Alloc(uint16_t, 65536);
CPDF_CMapParser parser;
parser.Initialize(this);
CPDF_SimpleParser syntax(pData, size);
@@ -777,15 +777,15 @@ FX_BOOL CPDF_CMap::LoadEmbedded(const uint8_t* pData, FX_DWORD size) {
return TRUE;
}
-FX_WORD CPDF_CMap::CIDFromCharCode(FX_DWORD charcode) const {
+uint16_t CPDF_CMap::CIDFromCharCode(FX_DWORD charcode) const {
if (m_Coding == CIDCODING_CID) {
- return (FX_WORD)charcode;
+ return (uint16_t)charcode;
}
if (m_pEmbedMap) {
return FPDFAPI_CIDFromCharCode(m_pEmbedMap, charcode);
}
if (!m_pMapping) {
- return (FX_WORD)charcode;
+ return (uint16_t)charcode;
}
if (charcode >> 16) {
if (m_pAddMapping) {
@@ -797,8 +797,8 @@ FX_WORD CPDF_CMap::CIDFromCharCode(FX_DWORD charcode) const {
}
return 0;
}
- return (FX_WORD)(((FX_DWORD*)found)[1] % 65536 + charcode -
- *(FX_DWORD*)found);
+ return (uint16_t)(((FX_DWORD*)found)[1] % 65536 + charcode -
+ *(FX_DWORD*)found);
}
if (m_pUseMap)
return m_pUseMap->CIDFromCharCode(charcode);
@@ -807,7 +807,7 @@ FX_WORD CPDF_CMap::CIDFromCharCode(FX_DWORD charcode) const {
FX_DWORD CID = m_pMapping[charcode];
if (!CID && m_pUseMap)
return m_pUseMap->CIDFromCharCode(charcode);
- return (FX_WORD)CID;
+ return (uint16_t)CID;
}
FX_DWORD CPDF_CMap::GetNextChar(const FX_CHAR* pString,
@@ -956,7 +956,7 @@ FX_BOOL CPDF_CID2UnicodeMap::Initialize() {
FX_BOOL CPDF_CID2UnicodeMap::IsLoaded() {
return m_EmbeddedCount != 0;
}
-FX_WCHAR CPDF_CID2UnicodeMap::UnicodeFromCID(FX_WORD CID) {
+FX_WCHAR CPDF_CID2UnicodeMap::UnicodeFromCID(uint16_t CID) {
if (m_Charset == CIDSET_UNICODE) {
return CID;
}
@@ -1004,9 +1004,9 @@ CPDF_CIDFont* CPDF_CIDFont::AsCIDFont() {
return this;
}
-FX_WORD CPDF_CIDFont::CIDFromCharCode(FX_DWORD charcode) const {
+uint16_t CPDF_CIDFont::CIDFromCharCode(FX_DWORD charcode) const {
if (!m_pCMap) {
- return (FX_WORD)charcode;
+ return (uint16_t)charcode;
}
return m_pCMap->CIDFromCharCode(charcode);
}
@@ -1034,7 +1034,7 @@ FX_WCHAR CPDF_CIDFont::GetUnicodeFromCharCode(FX_DWORD charcode) const {
if (!m_pCID2UnicodeMap || !m_pCID2UnicodeMap->IsLoaded()) {
return 0;
}
- return m_pCID2UnicodeMap->UnicodeFromCID((FX_WORD)charcode);
+ return m_pCID2UnicodeMap->UnicodeFromCID((uint16_t)charcode);
}
if (!m_pCMap->IsLoaded() || !m_pCID2UnicodeMap ||
!m_pCID2UnicodeMap->IsLoaded()) {
@@ -1078,7 +1078,8 @@ FX_DWORD CPDF_CIDFont::CharCodeFromUnicode(FX_WCHAR unicode) const {
}
FX_DWORD CID = 0;
while (CID < 65536) {
- FX_WCHAR this_unicode = m_pCID2UnicodeMap->UnicodeFromCID((FX_WORD)CID);
+ FX_WCHAR this_unicode =
+ m_pCID2UnicodeMap->UnicodeFromCID((uint16_t)CID);
if (this_unicode == unicode) {
return CID;
}
@@ -1287,7 +1288,7 @@ FX_RECT CPDF_CIDFont::GetCharBBox(FX_DWORD charcode, int level) {
}
}
if (!m_pFontFile && m_Charset == CIDSET_JAPAN1) {
- FX_WORD CID = CIDFromCharCode(charcode);
+ uint16_t CID = CIDFromCharCode(charcode);
const uint8_t* pTransform = GetCIDTransform(CID);
if (pTransform && !bVert) {
CFX_Matrix matrix(CIDTransformToFloat(pTransform[0]),
@@ -1310,7 +1311,7 @@ int CPDF_CIDFont::GetCharWidthF(FX_DWORD charcode, int level) {
if (m_pAnsiWidths && charcode < 0x80) {
return m_pAnsiWidths[charcode];
}
- FX_WORD cid = CIDFromCharCode(charcode);
+ uint16_t cid = CIDFromCharCode(charcode);
int size = m_WidthList.GetSize();
FX_DWORD* list = m_WidthList.GetData();
for (int i = 0; i < size; i += 3) {
@@ -1320,7 +1321,7 @@ int CPDF_CIDFont::GetCharWidthF(FX_DWORD charcode, int level) {
}
return m_DefaultWidth;
}
-short CPDF_CIDFont::GetVertWidth(FX_WORD CID) const {
+short CPDF_CIDFont::GetVertWidth(uint16_t CID) const {
FX_DWORD vertsize = m_VertMetrics.GetSize() / 5;
if (vertsize == 0) {
return m_DefaultW1;
@@ -1332,7 +1333,7 @@ short CPDF_CIDFont::GetVertWidth(FX_WORD CID) const {
}
return m_DefaultW1;
}
-void CPDF_CIDFont::GetVertOrigin(FX_WORD CID, short& vx, short& vy) const {
+void CPDF_CIDFont::GetVertOrigin(uint16_t CID, short& vx, short& vy) const {
FX_DWORD vertsize = m_VertMetrics.GetSize() / 5;
if (vertsize) {
const FX_DWORD* pTable = m_VertMetrics.GetData();
@@ -1348,7 +1349,7 @@ void CPDF_CIDFont::GetVertOrigin(FX_WORD CID, short& vx, short& vy) const {
const FX_DWORD* list = m_WidthList.GetData();
for (int i = 0; i < size; i += 3) {
if (CID >= list[i] && CID <= list[i + 1]) {
- dwWidth = (FX_WORD)list[i + 2];
+ dwWidth = (uint16_t)list[i + 2];
break;
}
}
@@ -1410,7 +1411,7 @@ int CPDF_CIDFont::GlyphFromCharCode(FX_DWORD charcode, FX_BOOL* pVertGlyph) {
*pVertGlyph = FALSE;
}
if (!m_pFontFile && !m_pCIDToGIDMap) {
- FX_WORD cid = CIDFromCharCode(charcode);
+ uint16_t cid = CIDFromCharCode(charcode);
FX_WCHAR unicode = 0;
if (m_bCIDIsGID) {
#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_
@@ -1458,7 +1459,7 @@ int CPDF_CIDFont::GlyphFromCharCode(FX_DWORD charcode, FX_BOOL* pVertGlyph) {
if (!name) {
return charcode == 0 ? -1 : (int)charcode;
}
- FX_WORD unicode = PDF_UnicodeFromAdobeName(name);
+ uint16_t unicode = PDF_UnicodeFromAdobeName(name);
if (unicode) {
if (bMSUnicode) {
index = FXFT_Get_Char_Index(face, unicode);
@@ -1520,7 +1521,7 @@ int CPDF_CIDFont::GlyphFromCharCode(FX_DWORD charcode, FX_BOOL* pVertGlyph) {
if (!m_Font.GetFace())
return -1;
- FX_WORD cid = CIDFromCharCode(charcode);
+ uint16_t cid = CIDFromCharCode(charcode);
if (m_bType1) {
if (!m_pCIDToGIDMap) {
return cid;
@@ -1658,14 +1659,14 @@ FX_BOOL CPDF_CIDFont::LoadGB2312() {
}
CheckFontMetrics();
m_DefaultWidth = 1000;
- m_pAnsiWidths = FX_Alloc(FX_WORD, 128);
+ m_pAnsiWidths = FX_Alloc(uint16_t, 128);
for (int i = 32; i < 127; i++) {
m_pAnsiWidths[i] = 500;
}
return TRUE;
}
-const uint8_t* CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const {
+const uint8_t* CPDF_CIDFont::GetCIDTransform(uint16_t CID) const {
if (m_Charset != CIDSET_JAPAN1 || m_pFontFile)
return nullptr;
diff --git a/core/fpdfapi/fpdf_page/cpdf_textobject.cpp b/core/fpdfapi/fpdf_page/cpdf_textobject.cpp
index b4161f320e..ef37b30631 100644
--- a/core/fpdfapi/fpdf_page/cpdf_textobject.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_textobject.cpp
@@ -35,7 +35,7 @@ void CPDF_TextObject::GetItemInfo(int index, CPDF_TextObjectItem* pInfo) const {
if (!pFont->AsCIDFont()->IsVertWriting()) {
return;
}
- FX_WORD CID = pFont->AsCIDFont()->CIDFromCharCode(pInfo->m_CharCode);
+ uint16_t CID = pFont->AsCIDFont()->CIDFromCharCode(pInfo->m_CharCode);
pInfo->m_OriginY = pInfo->m_OriginX;
pInfo->m_OriginX = 0;
short vx, vy;
@@ -179,7 +179,7 @@ FX_FLOAT CPDF_TextObject::GetCharWidth(FX_DWORD charcode) const {
if (!bVertWriting)
return pFont->GetCharWidthF(charcode, 0) * fontsize;
- FX_WORD CID = pCIDFont->CIDFromCharCode(charcode);
+ uint16_t CID = pCIDFont->CIDFromCharCode(charcode);
return pCIDFont->GetVertWidth(CID) * fontsize;
}
@@ -240,7 +240,7 @@ void CPDF_TextObject::CalcPositionData(FX_FLOAT* pTextAdvanceX,
}
charwidth = pFont->GetCharWidthF(charcode, level) * fontsize / 1000;
} else {
- FX_WORD CID = pCIDFont->CIDFromCharCode(charcode);
+ uint16_t CID = pCIDFont->CIDFromCharCode(charcode);
short vx;
short vy;
pCIDFont->GetVertOrigin(CID, vx, vy);
diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp
index b343618f28..dc4d757120 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp
@@ -82,7 +82,7 @@ TEST(cpdf_parser, RebuildCrossRefCorrectly) {
ASSERT_TRUE(parser.RebuildCrossRef());
const FX_FILESIZE offsets[] = {0, 15, 61, 154, 296, 374, 450};
- const FX_WORD versions[] = {0, 0, 2, 4, 6, 8, 0};
+ const uint16_t versions[] = {0, 0, 2, 4, 6, 8, 0};
for (size_t i = 0; i < FX_ArraySize(offsets); ++i)
EXPECT_EQ(offsets[i], parser.m_ObjectInfo[i].pos);
for (size_t i = 0; i < FX_ArraySize(versions); ++i)
diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
index c91e99b9cb..75ff11c60c 100644
--- a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
+++ b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
@@ -19,7 +19,7 @@
#define _STREAM_MAX_SIZE_ 20 * 1024 * 1024
-const FX_WORD PDFDocEncoding[256] = {
+const uint16_t PDFDocEncoding[256] = {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008,
0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011,
0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x02d8, 0x02c7, 0x02c6,
@@ -447,13 +447,13 @@ CFX_WideString PDF_DecodeText(const uint8_t* src_data, FX_DWORD src_len) {
const uint8_t* uni_str = src_data + 2;
int dest_pos = 0;
for (FX_DWORD i = 0; i < max_chars * 2; i += 2) {
- FX_WORD unicode = bBE ? (uni_str[i] << 8 | uni_str[i + 1])
- : (uni_str[i + 1] << 8 | uni_str[i]);
+ uint16_t unicode = bBE ? (uni_str[i] << 8 | uni_str[i + 1])
+ : (uni_str[i + 1] << 8 | uni_str[i]);
if (unicode == 0x1b) {
i += 2;
while (i < max_chars * 2) {
- FX_WORD unicode = bBE ? (uni_str[i] << 8 | uni_str[i + 1])
- : (uni_str[i + 1] << 8 | uni_str[i]);
+ uint16_t unicode = bBE ? (uni_str[i] << 8 | uni_str[i + 1])
+ : (uni_str[i + 1] << 8 | uni_str[i]);
i += 2;
if (unicode == 0x1b) {
break;
diff --git a/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h b/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h
index 6a17ac5332..6904099b52 100644
--- a/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h
+++ b/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h
@@ -12,7 +12,7 @@
class CPDF_Dictionary;
// Indexed by 8-bit char code, contains unicode code points.
-extern const FX_WORD PDFDocEncoding[256];
+extern const uint16_t PDFDocEncoding[256];
CFX_ByteString PDF_NameDecode(const CFX_ByteStringC& orig);
CFX_ByteString PDF_NameDecode(const CFX_ByteString& orig);
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
index 6741d1a70b..44e57e49ea 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -566,7 +566,7 @@ void CPDF_CharPosList::Load(int nChars,
if (!pCIDFont) {
continue;
}
- FX_WORD CID = pCIDFont->CIDFromCharCode(CharCode);
+ uint16_t CID = pCIDFont->CIDFromCharCode(CharCode);
if (bVertWriting) {
charpos.m_OriginY = charpos.m_OriginX;
charpos.m_OriginX = 0;
diff --git a/core/fpdfdoc/doc_ap.cpp b/core/fpdfdoc/doc_ap.cpp
index e64080dbd0..cdbdd1e9a8 100644
--- a/core/fpdfdoc/doc_ap.cpp
+++ b/core/fpdfdoc/doc_ap.cpp
@@ -136,7 +136,7 @@ CPVT_Provider::CPVT_Provider(IPVT_FontMap* pFontMap) : m_pFontMap(pFontMap) {
}
CPVT_Provider::~CPVT_Provider() {}
int32_t CPVT_Provider::GetCharWidth(int32_t nFontIndex,
- FX_WORD word,
+ uint16_t word,
int32_t nWordStyle) {
if (CPDF_Font* pPDFFont = m_pFontMap->GetPDFFont(nFontIndex)) {
FX_DWORD charcode = pPDFFont->CharCodeFromUnicode(word);
@@ -158,7 +158,7 @@ int32_t CPVT_Provider::GetTypeDescent(int32_t nFontIndex) {
}
return 0;
}
-int32_t CPVT_Provider::GetWordFontIndex(FX_WORD word,
+int32_t CPVT_Provider::GetWordFontIndex(uint16_t word,
int32_t charset,
int32_t nFontIndex) {
if (CPDF_Font* pDefFont = m_pFontMap->GetPDFFont(0)) {
@@ -173,7 +173,7 @@ int32_t CPVT_Provider::GetWordFontIndex(FX_WORD word,
}
return -1;
}
-FX_BOOL CPVT_Provider::IsLatinWord(FX_WORD word) {
+FX_BOOL CPVT_Provider::IsLatinWord(uint16_t word) {
if ((word >= 0x61 && word <= 0x7A) || (word >= 0x41 && word <= 0x5A) ||
word == 0x2D || word == 0x27) {
return TRUE;
@@ -186,8 +186,8 @@ int32_t CPVT_Provider::GetDefaultFontIndex() {
static CFX_ByteString GetPDFWordString(IPVT_FontMap* pFontMap,
int32_t nFontIndex,
- FX_WORD Word,
- FX_WORD SubWord) {
+ uint16_t Word,
+ uint16_t SubWord) {
CFX_ByteString sWord;
if (SubWord > 0) {
sWord.Format("%c", SubWord);
@@ -485,7 +485,7 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
vt.SetMultiLine(TRUE);
vt.SetAutoReturn(TRUE);
}
- FX_WORD subWord = 0;
+ uint16_t subWord = 0;
if ((dwFlags >> 13) & 1) {
subWord = '*';
vt.SetPasswordChar(subWord);
@@ -721,7 +721,7 @@ CFX_ByteString CPVT_GenerateAP::GenerateEditAP(
IPDF_VariableText_Iterator* pIterator,
const CFX_FloatPoint& ptOffset,
FX_BOOL bContinuous,
- FX_WORD SubWord,
+ uint16_t SubWord,
const CPVT_WordRange* pVisible) {
CFX_ByteTextBuf sEditStream, sLineStream, sWords;
CFX_FloatPoint ptOld(0.0f, 0.0f), ptNew(0.0f, 0.0f);
diff --git a/core/fpdfdoc/doc_form.cpp b/core/fpdfdoc/doc_form.cpp
index 8329a5f68a..cecf6a8a5f 100644
--- a/core/fpdfdoc/doc_form.cpp
+++ b/core/fpdfdoc/doc_form.cpp
@@ -21,7 +21,7 @@ const int nMaxRecursion = 32;
const struct SupportFieldEncoding {
const FX_CHAR* m_name;
- FX_WORD m_codePage;
+ uint16_t m_codePage;
} g_fieldEncoding[] = {
{"BigFive", 950},
{"GBK", 936},
diff --git a/core/fpdfdoc/doc_vt.cpp b/core/fpdfdoc/doc_vt.cpp
index 3c08e46080..5ccba85b72 100644
--- a/core/fpdfdoc/doc_vt.cpp
+++ b/core/fpdfdoc/doc_vt.cpp
@@ -410,7 +410,7 @@ static const uint8_t special_chars[128] = {
0x01, 0x01, 0x01, 0x0C, 0x00, 0x08, 0x00, 0x00,
};
-static bool IsLatin(FX_WORD word) {
+static bool IsLatin(uint16_t word) {
if (word <= 0x007F)
return !!(special_chars[word] & 0x01);
@@ -509,7 +509,7 @@ static bool IsOpenStylePunctuation(FX_DWORD word) {
word == 0xFF3B || word == 0xFF5B || word == 0xFF62);
}
-static bool IsCurrencySymbol(FX_WORD word) {
+static bool IsCurrencySymbol(uint16_t word) {
return (word == 0x0024 || word == 0x0080 || word == 0x00A2 ||
word == 0x00A3 || word == 0x00A4 || word == 0x00A5 ||
(word >= 0x20A0 && word <= 0x20CF) || word == 0xFE69 ||
@@ -517,15 +517,15 @@ static bool IsCurrencySymbol(FX_WORD word) {
word == 0xFFE5 || word == 0xFFE6);
}
-static bool IsPrefixSymbol(FX_WORD word) {
+static bool IsPrefixSymbol(uint16_t word) {
return IsCurrencySymbol(word) || word == 0x2116;
}
-static bool IsSpace(FX_WORD word) {
+static bool IsSpace(uint16_t word) {
return word == 0x0020 || word == 0x3000;
}
-static bool NeedDivision(FX_WORD prevWord, FX_WORD curWord) {
+static bool NeedDivision(uint16_t prevWord, uint16_t curWord) {
if ((IsLatin(prevWord) || IsDigit(prevWord)) &&
(IsLatin(curWord) || IsDigit(curWord))) {
return false;
@@ -819,7 +819,7 @@ void CPDF_VariableText::ResetAll() {
ResetSectionArray();
}
CPVT_WordPlace CPDF_VariableText::InsertWord(const CPVT_WordPlace& place,
- FX_WORD word,
+ uint16_t word,
int32_t charset,
const CPVT_WordProps* pWordProps) {
int32_t nTotlaWords = GetTotalWords();
@@ -896,7 +896,7 @@ CPVT_WordPlace CPDF_VariableText::InsertText(const CPVT_WordPlace& place,
CPVT_WordPlace wp = place;
for (int32_t i = 0, sz = swText.GetLength(); i < sz; i++) {
CPVT_WordPlace oldwp = wp;
- FX_WORD word = swText.GetAt(i);
+ uint16_t word = swText.GetAt(i);
switch (word) {
case 0x0D:
if (m_bMultiLine) {
@@ -974,7 +974,7 @@ void CPDF_VariableText::SetText(const FX_WCHAR* text,
if (m_nCharArray > 0 && nCharCount >= m_nCharArray) {
break;
}
- FX_WORD word = swText.GetAt(i);
+ uint16_t word = swText.GetAt(i);
switch (word) {
case 0x0D:
if (m_bMultiLine) {
@@ -1332,8 +1332,8 @@ int32_t CPDF_VariableText::GetWordFontIndex(const CPVT_WordInfo& WordInfo) {
: WordInfo.nFontIndex;
}
FX_FLOAT CPDF_VariableText::GetWordWidth(int32_t nFontIndex,
- FX_WORD Word,
- FX_WORD SubWord,
+ uint16_t Word,
+ uint16_t SubWord,
FX_FLOAT fCharSpace,
int32_t nHorzScale,
FX_FLOAT fFontSize,
@@ -1612,8 +1612,8 @@ CPVT_FloatRect CPDF_VariableText::RearrangeSections(
return rcRet;
}
int32_t CPDF_VariableText::GetCharWidth(int32_t nFontIndex,
- FX_WORD Word,
- FX_WORD SubWord,
+ uint16_t Word,
+ uint16_t SubWord,
int32_t nWordStyle) {
if (!m_pVTProvider) {
return 0;
@@ -1629,7 +1629,7 @@ int32_t CPDF_VariableText::GetTypeAscent(int32_t nFontIndex) {
int32_t CPDF_VariableText::GetTypeDescent(int32_t nFontIndex) {
return m_pVTProvider ? m_pVTProvider->GetTypeDescent(nFontIndex) : 0;
}
-int32_t CPDF_VariableText::GetWordFontIndex(FX_WORD word,
+int32_t CPDF_VariableText::GetWordFontIndex(uint16_t word,
int32_t charset,
int32_t nFontIndex) {
return m_pVTProvider
@@ -1639,7 +1639,7 @@ int32_t CPDF_VariableText::GetWordFontIndex(FX_WORD word,
int32_t CPDF_VariableText::GetDefaultFontIndex() {
return m_pVTProvider ? m_pVTProvider->GetDefaultFontIndex() : -1;
}
-FX_BOOL CPDF_VariableText::IsLatinWord(FX_WORD word) {
+FX_BOOL CPDF_VariableText::IsLatinWord(uint16_t word) {
return m_pVTProvider ? m_pVTProvider->IsLatinWord(word) : FALSE;
}
IPDF_VariableText_Iterator* CPDF_VariableText::GetIterator() {
diff --git a/core/fpdfdoc/pdf_vt.h b/core/fpdfdoc/pdf_vt.h
index 53c48af4ec..f97c48638f 100644
--- a/core/fpdfdoc/pdf_vt.h
+++ b/core/fpdfdoc/pdf_vt.h
@@ -115,7 +115,7 @@ struct CPVT_WordInfo {
fWordTail(0.0f),
nFontIndex(-1),
pWordProps(NULL) {}
- CPVT_WordInfo(FX_WORD word,
+ CPVT_WordInfo(uint16_t word,
int32_t charset,
int32_t fontIndex,
CPVT_WordProps* pProps)
@@ -152,7 +152,7 @@ struct CPVT_WordInfo {
}
}
}
- FX_WORD Word;
+ uint16_t Word;
int32_t nCharset;
FX_FLOAT fWordX;
FX_FLOAT fWordY;
@@ -349,7 +349,7 @@ class CPDF_VariableText : public IPDF_VariableText, private CPDF_EditContainer {
CPDF_EditContainer::SetPlateRect(rect);
}
void SetAlignment(int32_t nFormat = 0) override { m_nAlignment = nFormat; }
- void SetPasswordChar(FX_WORD wSubWord = '*') override {
+ void SetPasswordChar(uint16_t wSubWord = '*') override {
m_wSubWord = wSubWord;
}
void SetLimitChar(int32_t nLimitChar = 0) override {
@@ -387,7 +387,7 @@ class CPDF_VariableText : public IPDF_VariableText, private CPDF_EditContainer {
const CPVT_SecProps* pSecProps = NULL,
const CPVT_WordProps* pWordProps = NULL) override;
CPVT_WordPlace InsertWord(const CPVT_WordPlace& place,
- FX_WORD word,
+ uint16_t word,
int32_t charset = 1,
const CPVT_WordProps* pWordProps = NULL) override;
CPVT_WordPlace InsertSection(
@@ -409,7 +409,7 @@ class CPDF_VariableText : public IPDF_VariableText, private CPDF_EditContainer {
int32_t GetTotalWords() const override;
FX_FLOAT GetFontSize() const override { return m_fFontSize; }
int32_t GetAlignment() const override { return m_nAlignment; }
- FX_WORD GetPasswordChar() const override { return GetSubWord(); }
+ uint16_t GetPasswordChar() const override { return GetSubWord(); }
int32_t GetCharArray() const override { return m_nCharArray; }
int32_t GetLimitChar() const override { return m_nLimitChar; }
FX_BOOL IsMultiLine() const override { return m_bMultiLine; }
@@ -435,18 +435,18 @@ class CPDF_VariableText : public IPDF_VariableText, private CPDF_EditContainer {
int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const override;
CPVT_WordPlace WordIndexToWordPlace(int32_t index) const override;
- FX_WORD GetSubWord() const { return m_wSubWord; }
+ uint16_t GetSubWord() const { return m_wSubWord; }
private:
int32_t GetCharWidth(int32_t nFontIndex,
- FX_WORD Word,
- FX_WORD SubWord,
+ uint16_t Word,
+ uint16_t SubWord,
int32_t nWordStyle);
int32_t GetTypeAscent(int32_t nFontIndex);
int32_t GetTypeDescent(int32_t nFontIndex);
- int32_t GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex);
+ int32_t GetWordFontIndex(uint16_t word, int32_t charset, int32_t nFontIndex);
int32_t GetDefaultFontIndex();
- FX_BOOL IsLatinWord(FX_WORD word);
+ FX_BOOL IsLatinWord(uint16_t word);
CPVT_WordPlace AddSection(const CPVT_WordPlace& place,
const CPVT_SectionInfo& secinfo);
@@ -463,8 +463,8 @@ class CPDF_VariableText : public IPDF_VariableText, private CPDF_EditContainer {
FX_FLOAT GetWordFontSize(const CPVT_WordInfo& WordInfo,
FX_BOOL bFactFontSize = FALSE);
FX_FLOAT GetWordWidth(int32_t nFontIndex,
- FX_WORD Word,
- FX_WORD SubWord,
+ uint16_t Word,
+ uint16_t SubWord,
FX_FLOAT fCharSpace,
int32_t nHorzScale,
FX_FLOAT fFontSize,
@@ -515,7 +515,7 @@ class CPDF_VariableText : public IPDF_VariableText, private CPDF_EditContainer {
FX_FLOAT m_fLineLeading;
FX_FLOAT m_fCharSpace;
int32_t m_nHorzScale;
- FX_WORD m_wSubWord;
+ uint16_t m_wSubWord;
FX_FLOAT m_fFontSize;
private:
diff --git a/core/fpdftext/fpdf_text_int.h b/core/fpdftext/fpdf_text_int.h
index c0885b59b7..be6b0bf241 100644
--- a/core/fpdftext/fpdf_text_int.h
+++ b/core/fpdftext/fpdf_text_int.h
@@ -140,7 +140,7 @@ class CPDF_TextPage : public IPDF_TextPage {
int nItems) const;
const CPDF_Page* const m_pPage;
- std::vector<FX_WORD> m_CharIndex;
+ std::vector<uint16_t> m_CharIndex;
std::deque<PAGECHAR_INFO> m_CharList;
std::deque<PAGECHAR_INFO> m_TempCharList;
CFX_WideTextBuf m_TextBuf;
@@ -189,7 +189,7 @@ class CPDF_TextPageFind : public IPDF_TextPageFind {
int GetCharIndex(int index) const;
private:
- std::vector<FX_WORD> m_CharIndex;
+ std::vector<uint16_t> m_CharIndex;
const IPDF_TextPage* m_pTextPage;
CFX_WideString m_strText;
CFX_WideString m_findWhat;
diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp
index 27416f1c67..d4ad241a4d 100644
--- a/core/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/fxcodec/codec/fx_codec_flate.cpp
@@ -530,7 +530,7 @@ void TIFF_PredictorEncodeLine(uint8_t* dest_buf,
} else {
for (int i = row_size - BytesPerPixel; i >= BytesPerPixel;
i -= BytesPerPixel) {
- FX_WORD pixel = (dest_buf[i] << 8) | dest_buf[i + 1];
+ uint16_t pixel = (dest_buf[i] << 8) | dest_buf[i + 1];
pixel -=
(dest_buf[i - BytesPerPixel] << 8) | dest_buf[i - BytesPerPixel + 1];
dest_buf[i] = pixel >> 8;
@@ -587,7 +587,7 @@ void TIFF_PredictLine(uint8_t* dest_buf,
int BytesPerPixel = BitsPerComponent * Colors / 8;
if (BitsPerComponent == 16) {
for (FX_DWORD i = BytesPerPixel; i < row_size; i += 2) {
- FX_WORD pixel =
+ uint16_t pixel =
(dest_buf[i - BytesPerPixel] << 8) | dest_buf[i - BytesPerPixel + 1];
pixel += (dest_buf[i] << 8) | dest_buf[i + 1];
dest_buf[i] = pixel >> 8;
diff --git a/core/fxcodec/codec/fx_codec_tiff.cpp b/core/fxcodec/codec/fx_codec_tiff.cpp
index 0312622fb4..58f08707cb 100644
--- a/core/fxcodec/codec/fx_codec_tiff.cpp
+++ b/core/fxcodec/codec/fx_codec_tiff.cpp
@@ -285,11 +285,11 @@ FX_BOOL CCodec_TiffContext::LoadFrameInfo(int32_t frame,
if (!TIFFSetDirectory(tif_ctx, (uint16)frame)) {
return FALSE;
}
- FX_WORD tif_cs;
+ uint16_t tif_cs;
FX_DWORD tif_icc_size = 0;
uint8_t* tif_icc_buf = NULL;
- FX_WORD tif_bpc = 0;
- FX_WORD tif_cps;
+ uint16_t tif_bpc = 0;
+ uint16_t tif_cps;
FX_DWORD tif_rps;
width = height = comps = 0;
TIFFGetField(tif_ctx, TIFFTAG_IMAGEWIDTH, &width);
@@ -306,7 +306,7 @@ FX_BOOL CCodec_TiffContext::LoadFrameInfo(int32_t frame,
&pAttribute->m_wDPIUnit)) {
pAttribute->m_wDPIUnit -= 1;
}
- Tiff_Exif_GetInfo<FX_WORD>(tif_ctx, TIFFTAG_ORIENTATION, pAttribute);
+ Tiff_Exif_GetInfo<uint16_t>(tif_ctx, TIFFTAG_ORIENTATION, pAttribute);
if (Tiff_Exif_GetInfo<FX_FLOAT>(tif_ctx, TIFFTAG_XRESOLUTION, pAttribute)) {
void* val = pAttribute->m_Exif[TIFFTAG_XRESOLUTION];
FX_FLOAT fDpi = val ? *reinterpret_cast<FX_FLOAT*>(val) : 0;
@@ -487,7 +487,7 @@ FX_BOOL CCodec_TiffContext::Decode(CFX_DIBitmap* pDIBitmap) {
return FALSE;
}
if (pDIBitmap->GetBPP() == 32) {
- FX_WORD rotation = ORIENTATION_TOPLEFT;
+ uint16_t rotation = ORIENTATION_TOPLEFT;
TIFFGetField(tif_ctx, TIFFTAG_ORIENTATION, &rotation);
if (TIFFReadRGBAImageOriented(tif_ctx, img_wid, img_hei,
(uint32*)pDIBitmap->GetBuffer(), rotation,
diff --git a/core/fxcodec/jbig2/JBig2_BitStream.cpp b/core/fxcodec/jbig2/JBig2_BitStream.cpp
index a2a4c2c7c0..4ca4be16d4 100644
--- a/core/fxcodec/jbig2/JBig2_BitStream.cpp
+++ b/core/fxcodec/jbig2/JBig2_BitStream.cpp
@@ -101,7 +101,7 @@ int32_t CJBig2_BitStream::readInteger(FX_DWORD* dwResult) {
return 0;
}
-int32_t CJBig2_BitStream::readShortInteger(FX_WORD* dwResult) {
+int32_t CJBig2_BitStream::readShortInteger(uint16_t* dwResult) {
if (m_dwByteIdx + 1 >= m_dwLength)
return -1;
diff --git a/core/fxcodec/jbig2/JBig2_BitStream.h b/core/fxcodec/jbig2/JBig2_BitStream.h
index c24fedfba1..37b18b53a3 100644
--- a/core/fxcodec/jbig2/JBig2_BitStream.h
+++ b/core/fxcodec/jbig2/JBig2_BitStream.h
@@ -23,7 +23,7 @@ class CJBig2_BitStream {
int32_t read1Bit(FX_BOOL* bResult);
int32_t read1Byte(uint8_t* cResult);
int32_t readInteger(FX_DWORD* dwResult);
- int32_t readShortInteger(FX_WORD* wResult);
+ int32_t readShortInteger(uint16_t* wResult);
void alignByte();
uint8_t getCurByte() const;
void incByteIdx();
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp
index 7060f3522b..da020a6a75 100644
--- a/core/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/fxcodec/jbig2/JBig2_Context.cpp
@@ -302,7 +302,7 @@ int32_t CJBig2_Context::parseSegmentHeader(CJBig2_Segment* pSegment) {
pSegment->m_pReferred_to_segment_numbers[i] = cTemp;
break;
case 2:
- FX_WORD wTemp;
+ uint16_t wTemp;
if (m_pStream->readShortInteger(&wTemp) != 0)
return JBIG2_ERROR_TOO_SHORT;
@@ -379,7 +379,7 @@ int32_t CJBig2_Context::ProcessingParseSegmentData(CJBig2_Segment* pSegment,
return JBIG2_ERROR_FATAL;
return parseGenericRefinementRegion(pSegment);
case 48: {
- FX_WORD wTemp;
+ uint16_t wTemp;
std::unique_ptr<JBig2PageInfo> pPageInfo(new JBig2PageInfo);
if (m_pStream->readInteger(&pPageInfo->m_dwWidth) != 0 ||
m_pStream->readInteger(&pPageInfo->m_dwHeight) != 0 ||
@@ -435,7 +435,7 @@ int32_t CJBig2_Context::ProcessingParseSegmentData(CJBig2_Segment* pSegment,
int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment* pSegment,
IFX_Pause* pPause) {
- FX_WORD wFlags;
+ uint16_t wFlags;
if (m_pStream->readShortInteger(&wFlags) != 0)
return JBIG2_ERROR_TOO_SHORT;
@@ -653,7 +653,7 @@ int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment* pSegment,
}
int32_t CJBig2_Context::parseTextRegion(CJBig2_Segment* pSegment) {
- FX_WORD wFlags;
+ uint16_t wFlags;
JBig2RegionInfo ri;
if (parseRegionInfo(&ri) != JBIG2_SUCCESS ||
m_pStream->readShortInteger(&wFlags) != 0) {
diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.h b/core/fxcodec/jbig2/JBig2_GrdProc.h
index 2a181b1822..9d7f8b0221 100644
--- a/core/fxcodec/jbig2/JBig2_GrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_GrdProc.h
@@ -116,7 +116,7 @@ class CJBig2_GRDProc {
CJBig2_Image** m_pImage;
CJBig2_ArithDecoder* m_pArithDecoder;
JBig2ArithCtx* m_gbContext;
- FX_WORD m_DecodeType;
+ uint16_t m_DecodeType;
FX_BOOL LTP;
FX_RECT m_ReplaceRect;
};
diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.h b/core/fxcodec/jbig2/JBig2_HtrdProc.h
index 583145b5ca..7766ce6d46 100644
--- a/core/fxcodec/jbig2/JBig2_HtrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_HtrdProc.h
@@ -37,8 +37,8 @@ class CJBig2_HTRDProc {
FX_DWORD HGH;
int32_t HGX;
int32_t HGY;
- FX_WORD HRX;
- FX_WORD HRY;
+ uint16_t HRX;
+ uint16_t HRY;
uint8_t HPW;
uint8_t HPH;
};
diff --git a/core/fxcodec/jbig2/JBig2_Page.h b/core/fxcodec/jbig2/JBig2_Page.h
index b3e09d8ae0..81800ba2d4 100644
--- a/core/fxcodec/jbig2/JBig2_Page.h
+++ b/core/fxcodec/jbig2/JBig2_Page.h
@@ -16,7 +16,7 @@ struct JBig2PageInfo {
FX_DWORD m_dwResolutionY;
uint8_t m_cFlags;
FX_BOOL m_bIsStriped;
- FX_WORD m_wMaxStripeSize;
+ uint16_t m_wMaxStripeSize;
};
#endif // CORE_FXCODEC_JBIG2_JBIG2_PAGE_H_
diff --git a/core/fxcodec/lbmp/fx_bmp.cpp b/core/fxcodec/lbmp/fx_bmp.cpp
index 15384d56ff..90d8fe1247 100644
--- a/core/fxcodec/lbmp/fx_bmp.cpp
+++ b/core/fxcodec/lbmp/fx_bmp.cpp
@@ -26,10 +26,10 @@ void SetDWord_LSBFirst(uint8_t* p, FX_DWORD v) {
}
} // namespace
-FX_WORD GetWord_LSBFirst(uint8_t* p) {
+uint16_t GetWord_LSBFirst(uint8_t* p) {
return p[0] | (p[1] << 8);
}
-void SetWord_LSBFirst(uint8_t* p, FX_WORD v) {
+void SetWord_LSBFirst(uint8_t* p, uint16_t v) {
p[0] = (uint8_t)v;
p[1] = (uint8_t)(v >> 8);
}
@@ -145,7 +145,7 @@ int32_t bmp_read_header(bmp_decompress_struct_p bmp_ptr) {
bmp_ptr->skip_size = skip_size_org;
return 2;
}
- FX_WORD biPlanes;
+ uint16_t biPlanes;
bmp_ptr->width =
GetDWord_LSBFirst((uint8_t*)&bmp_info_header_ptr->biWidth);
bmp_ptr->height =
@@ -340,7 +340,7 @@ int32_t bmp_decode_rgb(bmp_decompress_struct_p bmp_ptr) {
}
} break;
case 16: {
- FX_WORD* buf = (FX_WORD*)des_buf;
+ uint16_t* buf = (uint16_t*)des_buf;
uint8_t blue_bits = 0;
uint8_t green_bits = 0;
uint8_t red_bits = 0;
@@ -551,7 +551,7 @@ int32_t bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr) {
}
} break;
default: {
- uint8_t size = (uint8_t)(((FX_WORD)(*first_byte_ptr) + 1) >> 1);
+ uint8_t size = (uint8_t)(((uint16_t)(*first_byte_ptr) + 1) >> 1);
if ((int32_t)*first_byte_ptr >=
bmp_ptr->out_row_bytes - bmp_ptr->col_num) {
if (size + (bmp_ptr->col_num >> 1) > bmp_ptr->src_row_bytes) {
@@ -584,7 +584,7 @@ int32_t bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr) {
}
if ((int32_t)*first_byte_ptr >
bmp_ptr->out_row_bytes - bmp_ptr->col_num) {
- uint8_t size = (uint8_t)(((FX_WORD)(*first_byte_ptr) + 1) >> 1);
+ uint8_t size = (uint8_t)(((uint16_t)(*first_byte_ptr) + 1) >> 1);
if (size + (bmp_ptr->col_num >> 1) > bmp_ptr->src_row_bytes) {
bmp_error(bmp_ptr, "The Bmp File Is Corrupt");
return 0;
diff --git a/core/fxcodec/lbmp/fx_bmp.h b/core/fxcodec/lbmp/fx_bmp.h
index 2ef0c0a8b0..1c269c6507 100644
--- a/core/fxcodec/lbmp/fx_bmp.h
+++ b/core/fxcodec/lbmp/fx_bmp.h
@@ -35,25 +35,25 @@
#define BMP_MAX_ERROR_SIZE 256
#pragma pack(1)
typedef struct tagBmpFileHeader {
- FX_WORD bfType;
+ uint16_t bfType;
FX_DWORD bfSize;
- FX_WORD bfReserved1;
- FX_WORD bfReserved2;
+ uint16_t bfReserved1;
+ uint16_t bfReserved2;
FX_DWORD bfOffBits;
} BmpFileHeader, *BmpFileHeaderPtr;
typedef struct tagBmpCoreHeader {
FX_DWORD bcSize;
- FX_WORD bcWidth;
- FX_WORD bcHeight;
- FX_WORD bcPlanes;
- FX_WORD bcBitCount;
+ uint16_t bcWidth;
+ uint16_t bcHeight;
+ uint16_t bcPlanes;
+ uint16_t bcBitCount;
} BmpCoreHeader, *BmpCoreHeaderPtr;
typedef struct tagBmpInfoHeader {
FX_DWORD biSize;
int32_t biWidth;
int32_t biHeight;
- FX_WORD biPlanes;
- FX_WORD biBitCount;
+ uint16_t biPlanes;
+ uint16_t biBitCount;
FX_DWORD biCompression;
FX_DWORD biSizeImage;
int32_t biXPelsPerMeter;
@@ -82,7 +82,7 @@ struct tag_bmp_decompress_struct {
int32_t src_row_bytes;
int32_t out_row_bytes;
uint8_t* out_row_buffer;
- FX_WORD bitCounts;
+ uint16_t bitCounts;
FX_DWORD color_used;
FX_BOOL imgTB_flag;
int32_t pal_num;
@@ -139,7 +139,7 @@ struct tag_bmp_compress_struct {
FX_DWORD src_width;
FX_BOOL src_free;
FX_DWORD* pal_ptr;
- FX_WORD pal_num;
+ uint16_t pal_num;
uint8_t bit_type;
};
@@ -149,7 +149,7 @@ FX_BOOL bmp_encode_image(bmp_compress_struct_p bmp_ptr,
uint8_t*& dst_buf,
FX_DWORD& dst_size);
-FX_WORD GetWord_LSBFirst(uint8_t* p);
-void SetWord_LSBFirst(uint8_t* p, FX_WORD v);
+uint16_t GetWord_LSBFirst(uint8_t* p);
+void SetWord_LSBFirst(uint8_t* p, uint16_t v);
#endif // CORE_FXCODEC_LBMP_FX_BMP_H_
diff --git a/core/fxcodec/lgif/fx_gif.cpp b/core/fxcodec/lgif/fx_gif.cpp
index af447dc84b..b20b4dfdec 100644
--- a/core/fxcodec/lgif/fx_gif.cpp
+++ b/core/fxcodec/lgif/fx_gif.cpp
@@ -30,14 +30,14 @@ void CGifLZWDecoder::InitTable(uint8_t code_len) {
void CGifLZWDecoder::ClearTable() {
code_size_cur = code_size + 1;
code_next = code_end + 1;
- code_old = (FX_WORD)-1;
+ code_old = (uint16_t)-1;
FXSYS_memset(code_table, 0, sizeof(tag_Table) * GIF_MAX_LZW_CODE);
FXSYS_memset(stack, 0, GIF_MAX_LZW_CODE);
- for (FX_WORD i = 0; i < code_clear; i++) {
+ for (uint16_t i = 0; i < code_clear; i++) {
code_table[i].suffix = (uint8_t)i;
}
}
-void CGifLZWDecoder::DecodeString(FX_WORD code) {
+void CGifLZWDecoder::DecodeString(uint16_t code) {
stack_size = 0;
while (TRUE) {
ASSERT(code <= code_next);
@@ -50,7 +50,7 @@ void CGifLZWDecoder::DecodeString(FX_WORD code) {
stack[GIF_MAX_LZW_CODE - 1 - stack_size++] = (uint8_t)code;
code_first = (uint8_t)code;
}
-void CGifLZWDecoder::AddCode(FX_WORD prefix_code, uint8_t append_char) {
+void CGifLZWDecoder::AddCode(uint16_t prefix_code, uint8_t append_char) {
if (code_next == GIF_MAX_LZW_CODE) {
return;
}
@@ -70,7 +70,7 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size) {
if (stack_size != 0) {
if (des_size < stack_size) {
FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], des_size);
- stack_size -= (FX_WORD)des_size;
+ stack_size -= (uint16_t)des_size;
return 3;
}
FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size], stack_size);
@@ -78,7 +78,7 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size) {
i += stack_size;
stack_size = 0;
}
- FX_WORD code = 0;
+ uint16_t code = 0;
while (i <= des_size && (avail_in > 0 || bits_left >= code_size_cur)) {
if (code_size_cur > 12) {
if (err_msg_ptr) {
@@ -93,7 +93,7 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size) {
bits_left += 8;
}
while (bits_left >= code_size_cur) {
- code = (FX_WORD)code_store & ((1 << code_size_cur) - 1);
+ code = (uint16_t)code_store & ((1 << code_size_cur) - 1);
code_store >>= code_size_cur;
bits_left -= code_size_cur;
if (code == code_clear) {
@@ -103,7 +103,7 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size) {
des_size = i;
return 1;
} else {
- if (code_old != (FX_WORD)-1) {
+ if (code_old != (uint16_t)-1) {
if (code_next < GIF_MAX_LZW_CODE) {
if (code == code_next) {
AddCode(code_old, code_first);
@@ -127,7 +127,7 @@ int32_t CGifLZWDecoder::Decode(uint8_t* des_buf, FX_DWORD& des_size) {
if (i + stack_size > des_size) {
FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size],
des_size - i);
- stack_size -= (FX_WORD)(des_size - i);
+ stack_size -= (uint16_t)(des_size - i);
return 3;
}
FXSYS_memcpy(des_buf, &stack[GIF_MAX_LZW_CODE - stack_size],
@@ -179,7 +179,7 @@ static inline uint8_t gif_cut_buf(const uint8_t* buf,
uint8_t& bit_offset,
FX_DWORD& bit_num) {
if (bit_cut != 8) {
- FX_WORD index = 0;
+ uint16_t index = 0;
index |= ((1 << bit_cut) - 1) << (7 - bit_offset);
uint8_t ret = ((index & buf[offset]) >> (7 - bit_offset));
bit_offset += bit_cut;
@@ -204,7 +204,7 @@ void CGifLZWEncoder::ClearTable() {
index_bit_cur = code_size + 1;
index_num = code_end + 1;
table_cur = code_end + 1;
- for (FX_WORD i = 0; i < GIF_MAX_LZW_CODE; i++) {
+ for (uint16_t i = 0; i < GIF_MAX_LZW_CODE; i++) {
code_table[i].prefix = 0;
code_table[i].suffix = 0;
}
@@ -335,7 +335,7 @@ FX_BOOL CGifLZWEncoder::Encode(const uint8_t* src_buf,
FX_BOOL CGifLZWEncoder::LookUpInTable(const uint8_t* buf,
FX_DWORD& offset,
uint8_t& bit_offset) {
- for (FX_WORD i = table_cur; i < index_num; i++) {
+ for (uint16_t i = table_cur; i < index_num; i++) {
if (code_table[i].prefix == code_table[index_num].prefix &&
code_table[i].suffix == code_table[index_num].suffix) {
code_table[index_num].prefix = i;
@@ -1041,7 +1041,7 @@ static FX_BOOL gif_write_header(gif_compress_struct_p gif_ptr,
dst_buf[gif_ptr->cur_offset++] = gif_ptr->lsd_ptr->bc_index;
dst_buf[gif_ptr->cur_offset++] = gif_ptr->lsd_ptr->pixel_aspect;
if (gif_ptr->global_pal) {
- FX_WORD size = sizeof(GifPalette) * gif_ptr->gpal_num;
+ uint16_t size = sizeof(GifPalette) * gif_ptr->gpal_num;
if (!gif_grow_buf(dst_buf, dst_len, gif_ptr->cur_offset + size)) {
return FALSE;
}
diff --git a/core/fxcodec/lgif/fx_gif.h b/core/fxcodec/lgif/fx_gif.h
index c44fb7a7cb..ad65d199b6 100644
--- a/core/fxcodec/lgif/fx_gif.h
+++ b/core/fxcodec/lgif/fx_gif.h
@@ -52,17 +52,17 @@ typedef struct tagGifHeader {
char version[3];
} GifHeader;
typedef struct tagGifLSD {
- FX_WORD width;
- FX_WORD height;
+ uint16_t width;
+ uint16_t height;
uint8_t global_flag;
uint8_t bc_index;
uint8_t pixel_aspect;
} GifLSD;
typedef struct tagGifImageInfo {
- FX_WORD left;
- FX_WORD top;
- FX_WORD width;
- FX_WORD height;
+ uint16_t left;
+ uint16_t top;
+ uint16_t width;
+ uint16_t height;
uint8_t local_flag;
} GifImageInfo;
@@ -75,15 +75,15 @@ typedef struct tagGifCEF {
typedef struct tagGifGCE {
uint8_t block_size;
uint8_t gce_flag;
- FX_WORD delay_time;
+ uint16_t delay_time;
uint8_t trans_index;
} GifGCE;
typedef struct tagGifPTE {
uint8_t block_size;
- FX_WORD grid_left;
- FX_WORD grid_top;
- FX_WORD grid_width;
- FX_WORD grid_height;
+ uint16_t grid_left;
+ uint16_t grid_top;
+ uint16_t grid_width;
+ uint16_t grid_height;
uint8_t char_width;
uint8_t char_height;
@@ -115,7 +115,7 @@ typedef struct tagGifPlainText {
class CGifLZWDecoder {
public:
struct tag_Table {
- FX_WORD prefix;
+ uint16_t prefix;
uint8_t suffix;
};
CGifLZWDecoder(FX_CHAR* error_ptr = NULL) { err_msg_ptr = error_ptr; }
@@ -128,18 +128,18 @@ class CGifLZWDecoder {
private:
void ClearTable();
- void AddCode(FX_WORD prefix_code, uint8_t append_char);
- void DecodeString(FX_WORD code);
+ void AddCode(uint16_t prefix_code, uint8_t append_char);
+ void DecodeString(uint16_t code);
uint8_t code_size;
uint8_t code_size_cur;
- FX_WORD code_clear;
- FX_WORD code_end;
- FX_WORD code_next;
+ uint16_t code_clear;
+ uint16_t code_end;
+ uint16_t code_next;
uint8_t code_first;
uint8_t stack[GIF_MAX_LZW_CODE];
- FX_WORD stack_size;
+ uint16_t stack_size;
tag_Table code_table[GIF_MAX_LZW_CODE];
- FX_WORD code_old;
+ uint16_t code_old;
uint8_t* next_in;
FX_DWORD avail_in;
@@ -152,7 +152,7 @@ class CGifLZWDecoder {
class CGifLZWEncoder {
public:
struct tag_Table {
- FX_WORD prefix;
+ uint16_t prefix;
uint8_t suffix;
};
CGifLZWEncoder();
@@ -184,15 +184,15 @@ class CGifLZWEncoder {
uint8_t src_bit_cut;
FX_DWORD src_bit_num;
uint8_t code_size;
- FX_WORD code_clear;
- FX_WORD code_end;
- FX_WORD index_num;
+ uint16_t code_clear;
+ uint16_t code_end;
+ uint16_t index_num;
uint8_t bit_offset;
uint8_t index_bit_cur;
uint8_t index_buf[GIF_DATA_BLOCK];
uint8_t index_buf_len;
tag_Table code_table[GIF_MAX_LZW_CODE];
- FX_WORD table_cur;
+ uint16_t table_cur;
};
typedef struct tag_gif_decompress_struct gif_decompress_struct;
typedef gif_decompress_struct* gif_decompress_struct_p;
@@ -251,9 +251,9 @@ struct tag_gif_compress_struct {
GifHeader* header_ptr;
GifLSD* lsd_ptr;
GifPalette* global_pal;
- FX_WORD gpal_num;
+ uint16_t gpal_num;
GifPalette* local_pal;
- FX_WORD lpal_num;
+ uint16_t lpal_num;
GifImageInfo* image_info_ptr;
CGifLZWEncoder* img_encoder_ptr;
diff --git a/core/fxcrt/fx_arabic.cpp b/core/fxcrt/fx_arabic.cpp
index dfc3d802e5..f28b916c59 100644
--- a/core/fxcrt/fx_arabic.cpp
+++ b/core/fxcrt/fx_arabic.cpp
@@ -150,19 +150,19 @@ IFX_ArabicChar* IFX_ArabicChar::Create() {
}
FX_BOOL CFX_ArabicChar::IsArabicChar(FX_WCHAR wch) const {
FX_DWORD dwRet =
- kTextLayoutCodeProperties[(FX_WORD)wch] & FX_CHARTYPEBITSMASK;
+ kTextLayoutCodeProperties[(uint16_t)wch] & FX_CHARTYPEBITSMASK;
return dwRet >= FX_CHARTYPE_ArabicAlef;
}
FX_BOOL CFX_ArabicChar::IsArabicFormChar(FX_WCHAR wch) const {
- return (kTextLayoutCodeProperties[(FX_WORD)wch] & FX_CHARTYPEBITSMASK) ==
+ return (kTextLayoutCodeProperties[(uint16_t)wch] & FX_CHARTYPEBITSMASK) ==
FX_CHARTYPE_ArabicForm;
}
FX_WCHAR CFX_ArabicChar::GetFormChar(FX_WCHAR wch,
FX_WCHAR prev,
FX_WCHAR next) const {
- CFX_Char c(wch, kTextLayoutCodeProperties[(FX_WORD)wch]);
- CFX_Char p(prev, kTextLayoutCodeProperties[(FX_WORD)prev]);
- CFX_Char n(next, kTextLayoutCodeProperties[(FX_WORD)next]);
+ CFX_Char c(wch, kTextLayoutCodeProperties[(uint16_t)wch]);
+ CFX_Char p(prev, kTextLayoutCodeProperties[(uint16_t)prev]);
+ CFX_Char n(next, kTextLayoutCodeProperties[(uint16_t)next]);
return GetFormChar(&c, &p, &n);
}
FX_WCHAR CFX_ArabicChar::GetFormChar(const CFX_Char* cur,
@@ -262,7 +262,7 @@ void FX_BidiClassify(const CFX_WideString& wsText,
for (int32_t i = 0; i < iCount; i++) {
wch = *pwsStart++;
iCls =
- ((kTextLayoutCodeProperties[(FX_WORD)wch] & FX_BIDICLASSBITSMASK) >>
+ ((kTextLayoutCodeProperties[(uint16_t)wch] & FX_BIDICLASSBITSMASK) >>
FX_BIDICLASSBITS);
classes.SetAt(i, iCls);
}
@@ -270,7 +270,7 @@ void FX_BidiClassify(const CFX_WideString& wsText,
for (int32_t i = 0; i < iCount; i++) {
wch = *pwsStart++;
iCls =
- ((kTextLayoutCodeProperties[(FX_WORD)wch] & FX_BIDICLASSBITSMASK) >>
+ ((kTextLayoutCodeProperties[(uint16_t)wch] & FX_BIDICLASSBITSMASK) >>
FX_BIDICLASSBITS);
classes.SetAt(i, gc_FX_BidiNTypes[iCls]);
}
diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp
index 8282bd5014..89e3f8b1fd 100644
--- a/core/fxcrt/fx_basic_wstring.cpp
+++ b/core/fxcrt/fx_basic_wstring.cpp
@@ -16,7 +16,7 @@
namespace {
#ifndef NDEBUG
-bool IsValidCodePage(FX_WORD codepage) {
+bool IsValidCodePage(uint16_t codepage) {
switch (codepage) {
case 0:
case 932:
@@ -367,7 +367,7 @@ CFX_WideString CFX_WideString::FromLocal(const CFX_ByteString& str) {
// static
CFX_WideString CFX_WideString::FromCodePage(const CFX_ByteString& str,
- FX_WORD codepage) {
+ uint16_t codepage) {
return CFX_CharMap::GetWideString(codepage, str);
}
@@ -1017,7 +1017,7 @@ FX_FLOAT CFX_WideString::GetFloat() const {
}
// static
-CFX_ByteString CFX_CharMap::GetByteString(FX_WORD codepage,
+CFX_ByteString CFX_CharMap::GetByteString(uint16_t codepage,
const CFX_WideString& wstr) {
FXSYS_assert(IsValidCodePage(codepage));
int src_len = wstr.GetLength();
@@ -1034,7 +1034,7 @@ CFX_ByteString CFX_CharMap::GetByteString(FX_WORD codepage,
}
// static
-CFX_WideString CFX_CharMap::GetWideString(FX_WORD codepage,
+CFX_WideString CFX_CharMap::GetWideString(uint16_t codepage,
const CFX_ByteString& bstr) {
FXSYS_assert(IsValidCodePage(codepage));
int src_len = bstr.GetLength();
diff --git a/core/fxcrt/fx_unicode.cpp b/core/fxcrt/fx_unicode.cpp
index 140bab0b27..9094c65294 100644
--- a/core/fxcrt/fx_unicode.cpp
+++ b/core/fxcrt/fx_unicode.cpp
@@ -9,7 +9,7 @@
FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch) {
size_t idx = static_cast<size_t>(wch);
if (idx < kTextLayoutCodePropertiesSize)
- return kTextLayoutCodeProperties[(FX_WORD)wch];
+ return kTextLayoutCodeProperties[(uint16_t)wch];
return 0;
}
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;
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h
index a8a3ecc52a..1ae0030df8 100644
--- a/core/include/fpdfapi/fpdf_resource.h
+++ b/core/include/fpdfapi/fpdf_resource.h
@@ -47,7 +47,7 @@ const FX_CHAR* PDF_CharNameFromPredefinedCharSet(int encoding,
FX_WCHAR FT_UnicodeFromCharCode(int encoding, FX_DWORD charcode);
FX_DWORD FT_CharCodeFromUnicode(int encoding, FX_WCHAR unicode);
-const FX_WORD* PDF_UnicodesForPredefinedCharSet(int encoding);
+const uint16_t* PDF_UnicodesForPredefinedCharSet(int encoding);
const FX_CHAR* GetAdobeCharName(int iBaseEncoding,
const CFX_ByteString* pCharNames,
int charcode);
@@ -243,11 +243,11 @@ class CPDF_SimpleFont : public CPDF_Font {
void LoadCharMetrics(int charcode);
CPDF_FontEncoding m_Encoding;
- FX_WORD m_GlyphIndex[256];
- FX_WORD m_ExtGID[256];
+ uint16_t m_GlyphIndex[256];
+ uint16_t m_ExtGID[256];
CFX_ByteString* m_pCharNames;
int m_BaseEncoding;
- FX_WORD m_CharWidth[256];
+ uint16_t m_CharWidth[256];
FX_SMALL_RECT m_CharBBox[256];
FX_BOOL m_bUseFontWidth;
};
@@ -381,10 +381,10 @@ class CPDF_CIDFont : public CPDF_Font {
FX_DWORD CharCodeFromUnicode(FX_WCHAR Unicode) const override;
FX_BOOL LoadGB2312();
- FX_WORD CIDFromCharCode(FX_DWORD charcode) const;
- const uint8_t* GetCIDTransform(FX_WORD CID) const;
- short GetVertWidth(FX_WORD CID) const;
- void GetVertOrigin(FX_WORD CID, short& vx, short& vy) const;
+ uint16_t CIDFromCharCode(FX_DWORD charcode) const;
+ const uint8_t* GetCIDTransform(uint16_t CID) const;
+ short GetVertWidth(uint16_t CID) const;
+ void GetVertOrigin(uint16_t CID, short& vx, short& vy) const;
virtual FX_BOOL IsFontStyleFromCharCode(FX_DWORD charcode) const;
protected:
@@ -402,8 +402,8 @@ class CPDF_CIDFont : public CPDF_Font {
FX_BOOL m_bType1;
CPDF_StreamAcc* m_pCIDToGIDMap;
FX_BOOL m_bCIDIsGID;
- FX_WORD m_DefaultWidth;
- FX_WORD* m_pAnsiWidths;
+ uint16_t m_DefaultWidth;
+ uint16_t* m_pAnsiWidths;
FX_SMALL_RECT m_CharBBox[256];
CFX_DWordArray m_WidthList;
short m_DefaultVY;
diff --git a/core/include/fpdfdoc/fpdf_ap.h b/core/include/fpdfdoc/fpdf_ap.h
index 62e3907593..b468d14d20 100644
--- a/core/include/fpdfdoc/fpdf_ap.h
+++ b/core/include/fpdfdoc/fpdf_ap.h
@@ -53,14 +53,14 @@ class CPVT_Provider : public IPDF_VariableText_Provider {
// IPDF_VariableText_Provider
int32_t GetCharWidth(int32_t nFontIndex,
- FX_WORD word,
+ uint16_t word,
int32_t nWordStyle) override;
int32_t GetTypeAscent(int32_t nFontIndex) override;
int32_t GetTypeDescent(int32_t nFontIndex) override;
- int32_t GetWordFontIndex(FX_WORD word,
+ int32_t GetWordFontIndex(uint16_t word,
int32_t charset,
int32_t nFontIndex) override;
- FX_BOOL IsLatinWord(FX_WORD word) override;
+ FX_BOOL IsLatinWord(uint16_t word) override;
int32_t GetDefaultFontIndex() override;
private:
@@ -82,7 +82,7 @@ class CPVT_GenerateAP {
IPDF_VariableText_Iterator* pIterator,
const CFX_FloatPoint& ptOffset,
FX_BOOL bContinuous,
- FX_WORD SubWord = 0,
+ uint16_t SubWord = 0,
const CPVT_WordRange* pVisible = NULL);
static CFX_ByteString GenerateBorderAP(const CFX_FloatRect& rect,
diff --git a/core/include/fpdfdoc/fpdf_vt.h b/core/include/fpdfdoc/fpdf_vt.h
index dd2e300162..d79cad42d6 100644
--- a/core/include/fpdfdoc/fpdf_vt.h
+++ b/core/include/fpdfdoc/fpdf_vt.h
@@ -216,7 +216,7 @@ struct CPVT_Word {
fFontSize(0),
WordProps() {}
- FX_WORD Word;
+ uint16_t Word;
int32_t nCharset;
@@ -266,18 +266,18 @@ class IPDF_VariableText_Provider {
virtual ~IPDF_VariableText_Provider() {}
virtual int32_t GetCharWidth(int32_t nFontIndex,
- FX_WORD word,
+ uint16_t word,
int32_t nWordStyle) = 0;
virtual int32_t GetTypeAscent(int32_t nFontIndex) = 0;
virtual int32_t GetTypeDescent(int32_t nFontIndex) = 0;
- virtual int32_t GetWordFontIndex(FX_WORD word,
+ virtual int32_t GetWordFontIndex(uint16_t word,
int32_t charset,
int32_t nFontIndex) = 0;
- virtual FX_BOOL IsLatinWord(FX_WORD word) = 0;
+ virtual FX_BOOL IsLatinWord(uint16_t word) = 0;
virtual int32_t GetDefaultFontIndex() = 0;
};
@@ -328,7 +328,7 @@ class IPDF_VariableText {
virtual void SetAlignment(int32_t nFormat = 0) = 0;
- virtual void SetPasswordChar(FX_WORD wSubWord = '*') = 0;
+ virtual void SetPasswordChar(uint16_t wSubWord = '*') = 0;
virtual void SetLimitChar(int32_t nLimitChar = 0) = 0;
@@ -369,7 +369,7 @@ class IPDF_VariableText {
virtual CPVT_WordPlace InsertWord(
const CPVT_WordPlace& place,
- FX_WORD word,
+ uint16_t word,
int32_t charset = 1,
const CPVT_WordProps* pWordProps = NULL) = 0;
@@ -401,7 +401,7 @@ class IPDF_VariableText {
virtual int32_t GetAlignment() const = 0;
- virtual FX_WORD GetPasswordChar() const = 0;
+ virtual uint16_t GetPasswordChar() const = 0;
virtual int32_t GetCharArray() const = 0;
diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h
index 183783d86c..bce7e49a1f 100644
--- a/core/include/fxcodec/fx_codec.h
+++ b/core/include/fxcodec/fx_codec.h
@@ -46,7 +46,7 @@ class CFX_DIBAttribute {
int32_t m_nXDPI;
int32_t m_nYDPI;
FX_FLOAT m_fAspectRatio;
- FX_WORD m_wDPIUnit;
+ uint16_t m_wDPIUnit;
CFX_ByteString m_strAuthor;
uint8_t m_strTime[20];
int32_t m_nGifLeft;
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
index 11c573be6e..277286c80c 100644
--- a/core/include/fxcrt/fx_basic.h
+++ b/core/include/fxcrt/fx_basic.h
@@ -205,10 +205,10 @@ class CFX_FileBufferArchive {
class CFX_CharMap {
public:
- static CFX_ByteString GetByteString(FX_WORD codepage,
+ static CFX_ByteString GetByteString(uint16_t codepage,
const CFX_WideString& wstr);
- static CFX_WideString GetWideString(FX_WORD codepage,
+ static CFX_WideString GetWideString(uint16_t codepage,
const CFX_ByteString& bstr);
CFX_CharMap() = delete;
@@ -402,7 +402,6 @@ typedef CFX_ArrayTemplate<FX_DWORD> CFX_DWordArray;
#ifdef PDF_ENABLE_XFA
typedef CFX_ArrayTemplate<CFX_WideStringC> CFX_WideStringCArray;
-typedef CFX_ArrayTemplate<FX_WORD> CFX_WordArray;
typedef CFX_ArrayTemplate<FX_FLOAT> CFX_FloatArray;
typedef CFX_ArrayTemplate<uint8_t> CFX_ByteArray;
typedef CFX_ArrayTemplate<int32_t> CFX_Int32Array;
diff --git a/core/include/fxcrt/fx_ext.h b/core/include/fxcrt/fx_ext.h
index 0deb4266c8..08f735b910 100644
--- a/core/include/fxcrt/fx_ext.h
+++ b/core/include/fxcrt/fx_ext.h
@@ -97,8 +97,8 @@ void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount);
#ifdef PDF_ENABLE_XFA
typedef struct FX_GUID {
FX_DWORD data1;
- FX_WORD data2;
- FX_WORD data3;
+ uint16_t data2;
+ uint16_t data3;
uint8_t data4[8];
} FX_GUID, *FX_LPGUID;
typedef FX_GUID const* FX_LPCGUID;
diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h
index 9b623b9e71..afaf94b538 100644
--- a/core/include/fxcrt/fx_string.h
+++ b/core/include/fxcrt/fx_string.h
@@ -569,7 +569,7 @@ class CFX_WideString {
static CFX_WideString FromLocal(const CFX_ByteString& str);
static CFX_WideString FromCodePage(const CFX_ByteString& str,
- FX_WORD codepage);
+ uint16_t codepage);
static CFX_WideString FromUTF8(const char* str, FX_STRSIZE len);
diff --git a/core/include/fxcrt/fx_system.h b/core/include/fxcrt/fx_system.h
index f62e126fbb..770b1e7b2f 100644
--- a/core/include/fxcrt/fx_system.h
+++ b/core/include/fxcrt/fx_system.h
@@ -68,7 +68,6 @@
extern "C" {
#endif
typedef void* FX_POSITION; // Keep until fxcrt containers gone
-typedef uint16_t FX_WORD; // Keep - "an efficient small type"
typedef uint32_t FX_DWORD; // Keep - "an efficient type"
typedef float FX_FLOAT; // Keep, allow upgrade to doubles.
typedef double FX_DOUBLE; // Keep, allow downgrade to floats.
@@ -266,8 +265,8 @@ wchar_t* FXSYS_wcsupr(wchar_t* str);
(static_cast<FX_DWORD>(p[2]) << 8) | (static_cast<FX_DWORD>(p[3])))
#define FXSYS_HIBYTE(word) ((uint8_t)((word) >> 8))
#define FXSYS_LOBYTE(word) ((uint8_t)(word))
-#define FXSYS_HIWORD(dword) ((FX_WORD)((dword) >> 16))
-#define FXSYS_LOWORD(dword) ((FX_WORD)(dword))
+#define FXSYS_HIWORD(dword) ((uint16_t)((dword) >> 16))
+#define FXSYS_LOWORD(dword) ((uint16_t)(dword))
int32_t FXSYS_atoi(const FX_CHAR* str);
uint32_t FXSYS_atoui(const FX_CHAR* str);
int32_t FXSYS_wtoi(const FX_WCHAR* str);
diff --git a/core/include/fxcrt/fx_ucd.h b/core/include/fxcrt/fx_ucd.h
index 969f116d60..de7feccf58 100644
--- a/core/include/fxcrt/fx_ucd.h
+++ b/core/include/fxcrt/fx_ucd.h
@@ -124,7 +124,7 @@ class CFX_Char {
m_iCharWidth(0),
m_iHorizontalScale(100),
m_iVertialScale(100) {}
- CFX_Char(FX_WORD wCharCode, FX_DWORD dwCharProps)
+ CFX_Char(uint16_t wCharCode, FX_DWORD dwCharProps)
: m_wCharCode(wCharCode),
m_nBreakType(0),
m_nRotation(0),
@@ -134,7 +134,7 @@ class CFX_Char {
m_iHorizontalScale(100),
m_iVertialScale(100) {}
FX_DWORD GetCharType() const { return m_dwCharProps & FX_CHARTYPEBITSMASK; }
- FX_WORD m_wCharCode;
+ uint16_t m_wCharCode;
uint8_t m_nBreakType;
int8_t m_nRotation;
FX_DWORD m_dwCharProps;