summaryrefslogtreecommitdiff
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
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 .
-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
-rw-r--r--fpdfsdk/formfiller/cffl_formfiller.cpp2
-rw-r--r--fpdfsdk/fpdfppo.cpp10
-rw-r--r--fpdfsdk/fsdk_baseannot.cpp20
-rw-r--r--fpdfsdk/fsdk_baseform.cpp2
-rw-r--r--fpdfsdk/fxedit/fxet_ap.cpp6
-rw-r--r--fpdfsdk/fxedit/fxet_edit.cpp26
-rw-r--r--fpdfsdk/fxedit/fxet_list.cpp4
-rw-r--r--fpdfsdk/fxedit/fxet_pageobjs.cpp2
-rw-r--r--fpdfsdk/include/fsdk_mgr.h6
-rw-r--r--fpdfsdk/include/fx_systemhandler.h16
-rw-r--r--fpdfsdk/include/fxedit/fx_edit.h20
-rw-r--r--fpdfsdk/include/fxedit/fxet_edit.h32
-rw-r--r--fpdfsdk/include/fxedit/fxet_list.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ComboBox.h8
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Edit.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_EditCtrl.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_FontMap.h10
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_IconList.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListBox.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_SpecialButton.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Utils.h8
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Wnd.h6
-rw-r--r--fpdfsdk/javascript/Document.cpp4
-rw-r--r--fpdfsdk/javascript/JS_GlobalData.cpp42
-rw-r--r--fpdfsdk/pdfwindow/PWL_ComboBox.cpp8
-rw-r--r--fpdfsdk/pdfwindow/PWL_Edit.cpp6
-rw-r--r--fpdfsdk/pdfwindow/PWL_EditCtrl.cpp8
-rw-r--r--fpdfsdk/pdfwindow/PWL_FontMap.cpp10
-rw-r--r--fpdfsdk/pdfwindow/PWL_IconList.cpp2
-rw-r--r--fpdfsdk/pdfwindow/PWL_ListBox.cpp4
-rw-r--r--fpdfsdk/pdfwindow/PWL_SpecialButton.cpp4
-rw-r--r--fpdfsdk/pdfwindow/PWL_Utils.cpp2
-rw-r--r--fpdfsdk/pdfwindow/PWL_Wnd.cpp2
-rw-r--r--xfa/fde/css/#fde_cssstyleselector.h#901
-rw-r--r--xfa/fde/css/fde_css.h10
-rw-r--r--xfa/fde/css/fde_cssdatatable.cpp8
-rw-r--r--xfa/fde/css/fde_cssdatatable.h8
-rw-r--r--xfa/fde/css/fde_cssstyleselector.cpp2
-rw-r--r--xfa/fde/css/fde_cssstyleselector.h41
-rw-r--r--xfa/fde/css/fde_cssstylesheet.cpp8
-rw-r--r--xfa/fde/css/fde_cssstylesheet.h10
-rw-r--r--xfa/fde/css/fde_csssyntax.cpp2
-rw-r--r--xfa/fde/xml/fde_xml_imp.cpp8
-rw-r--r--xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp4
-rw-r--r--xfa/fee/fx_wordbreak/fx_wordbreak_impl.h2
-rw-r--r--xfa/fee/fx_wordbreak/fx_wordbreakdata.cpp2
-rw-r--r--xfa/fgas/crt/fgas_codepage.cpp12
-rw-r--r--xfa/fgas/crt/fgas_codepage.h16
-rw-r--r--xfa/fgas/crt/fgas_encode.cpp28
-rw-r--r--xfa/fgas/crt/fgas_stream.cpp20
-rw-r--r--xfa/fgas/crt/fgas_stream.h4
-rw-r--r--xfa/fgas/crt/fgas_utils.h8
-rw-r--r--xfa/fgas/font/fgas_font.h30
-rw-r--r--xfa/fgas/font/fgas_fontutils.cpp4
-rw-r--r--xfa/fgas/font/fgas_fontutils.h4
-rw-r--r--xfa/fgas/font/fgas_gefont.cpp10
-rw-r--r--xfa/fgas/font/fgas_gefont.h6
-rw-r--r--xfa/fgas/font/fgas_stdfontmgr.cpp61
-rw-r--r--xfa/fgas/font/fgas_stdfontmgr.h26
-rw-r--r--xfa/fgas/layout/fgas_linebreak.cpp8
-rw-r--r--xfa/fgas/layout/fgas_rtfbreak.cpp2
-rw-r--r--xfa/fgas/layout/fgas_textbreak.cpp8
-rw-r--r--xfa/fgas/localization/fgas_datetime.cpp36
-rw-r--r--xfa/fgas/localization/fgas_datetime.h18
-rw-r--r--xfa/fgas/localization/fgas_locale.cpp62
-rw-r--r--xfa/fgas/localization/fgas_locale.h8
-rw-r--r--xfa/fgas/localization/fgas_localeimp.h2
-rw-r--r--xfa/fgas/localization/fgas_localemgr.cpp8
-rw-r--r--xfa/fgas/localization/fgas_localemgr.h8
-rw-r--r--xfa/fwl/basewidget/fwl_scrollbarimp.cpp2
-rw-r--r--xfa/fwl/theme/widgettp.cpp14
-rw-r--r--xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp12
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp10
-rw-r--r--xfa/fxfa/app/xfa_ffwidget.cpp2
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp6
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.h10
-rw-r--r--xfa/fxfa/parser/xfa_basic_data.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_basic_data.h2
-rw-r--r--xfa/fxfa/parser/xfa_basic_imp.cpp10
-rw-r--r--xfa/fxfa/parser/xfa_basic_imp.h4
-rw-r--r--xfa/fxfa/parser/xfa_localemgr.cpp10
-rw-r--r--xfa/fxfa/parser/xfa_localemgr.h8
-rw-r--r--xfa/fxfa/parser/xfa_localevalue.cpp26
-rw-r--r--xfa/fxfa/parser/xfa_object.h4
-rw-r--r--xfa/fxfa/parser/xfa_object_imp.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_parser_imp.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_parser_imp.h4
-rw-r--r--xfa/include/fwl/theme/widgettp.h6
-rw-r--r--xfa/include/fxfa/fxfa.h4
-rw-r--r--xfa/include/fxfa/fxfa_basic.h18
197 files changed, 1774 insertions, 872 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;
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 732ea86c4e..ff7bf86449 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -13,7 +13,7 @@
#include "fpdfsdk/include/pdfwindow/PWL_Utils.h"
#define GetRed(rgb) ((uint8_t)(rgb))
-#define GetGreen(rgb) ((uint8_t)(((FX_WORD)(rgb)) >> 8))
+#define GetGreen(rgb) ((uint8_t)(((uint16_t)(rgb)) >> 8))
#define GetBlue(rgb) ((uint8_t)((rgb) >> 16))
#define FFL_HINT_ELAPSE 800
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp
index 6a72141e7d..efbe8f304a 100644
--- a/fpdfsdk/fpdfppo.cpp
+++ b/fpdfsdk/fpdfppo.cpp
@@ -28,7 +28,7 @@ class CPDF_PageOrganizer {
FX_BOOL PDFDocInit(CPDF_Document* pDestPDFDoc, CPDF_Document* pSrcPDFDoc);
FX_BOOL ExportPage(CPDF_Document* pSrcPDFDoc,
- std::vector<FX_WORD>* pPageNums,
+ std::vector<uint16_t>* pPageNums,
CPDF_Document* pDestPDFDoc,
int nIndex);
CPDF_Object* PageDictGetInheritableTag(CPDF_Dictionary* pDict,
@@ -96,7 +96,7 @@ FX_BOOL CPDF_PageOrganizer::PDFDocInit(CPDF_Document* pDestPDFDoc,
}
FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc,
- std::vector<FX_WORD>* pPageNums,
+ std::vector<uint16_t>* pPageNums,
CPDF_Document* pDestPDFDoc,
int nIndex) {
int curpage = nIndex;
@@ -314,7 +314,7 @@ FX_DWORD CPDF_PageOrganizer::GetNewObjId(CPDF_Document* pDoc,
}
FPDF_BOOL ParserPageRangeString(CFX_ByteString rangstring,
- std::vector<FX_WORD>* pageArray,
+ std::vector<uint16_t>* pageArray,
int nCount) {
if (rangstring.GetLength() != 0) {
rangstring.Remove(' ');
@@ -337,7 +337,7 @@ FPDF_BOOL ParserPageRangeString(CFX_ByteString rangstring,
long lPageNum = atol(cbMidRange);
if (lPageNum <= 0 || lPageNum > nCount)
return FALSE;
- pageArray->push_back((FX_WORD)lPageNum);
+ pageArray->push_back((uint16_t)lPageNum);
} else {
int nStartPageNum = atol(cbMidRange.Mid(0, nMid));
if (nStartPageNum == 0)
@@ -375,7 +375,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_ImportPages(FPDF_DOCUMENT dest_doc,
if (!pSrcDoc)
return FALSE;
- std::vector<FX_WORD> pageArray;
+ std::vector<uint16_t> pageArray;
int nCount = pSrcDoc->GetPageCount();
if (pagerange) {
if (!ParserPageRangeString(pagerange, &pageArray, nCount))
diff --git a/fpdfsdk/fsdk_baseannot.cpp b/fpdfsdk/fsdk_baseannot.cpp
index 942751d7df..1494c3908c 100644
--- a/fpdfsdk/fsdk_baseannot.cpp
+++ b/fpdfsdk/fsdk_baseannot.cpp
@@ -27,7 +27,7 @@ FX_BOOL _gAfxIsLeapYear(int16_t year) {
return ((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0)));
}
-FX_WORD _gAfxGetYearDays(int16_t year) {
+uint16_t _gAfxGetYearDays(int16_t year) {
return (_gAfxIsLeapYear(year) == TRUE ? 366 : 365);
}
@@ -373,13 +373,13 @@ void CPDFSDK_DateTime::ToSystemTime(FX_SYSTEMTIME& st) {
time_t t = (time_t)dt;
struct tm* pTime = localtime(&t);
if (pTime) {
- st.wYear = (FX_WORD)pTime->tm_year + 1900;
- st.wMonth = (FX_WORD)pTime->tm_mon + 1;
- st.wDay = (FX_WORD)pTime->tm_mday;
- st.wDayOfWeek = (FX_WORD)pTime->tm_wday;
- st.wHour = (FX_WORD)pTime->tm_hour;
- st.wMinute = (FX_WORD)pTime->tm_min;
- st.wSecond = (FX_WORD)pTime->tm_sec;
+ st.wYear = (uint16_t)pTime->tm_year + 1900;
+ st.wMonth = (uint16_t)pTime->tm_mon + 1;
+ st.wDay = (uint16_t)pTime->tm_mday;
+ st.wDayOfWeek = (uint16_t)pTime->tm_wday;
+ st.wHour = (uint16_t)pTime->tm_hour;
+ st.wMinute = (uint16_t)pTime->tm_min;
+ st.wSecond = (uint16_t)pTime->tm_sec;
st.wMilliseconds = 0;
}
}
@@ -404,7 +404,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::AddDays(short days) {
ldays = days;
if (ldays > 0) {
yy = y;
- if (((FX_WORD)m * 100 + d) > 300)
+ if (((uint16_t)m * 100 + d) > 300)
yy++;
ydays = _gAfxGetYearDays(yy);
while (ldays >= ydays) {
@@ -429,7 +429,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::AddDays(short days) {
} else {
ldays *= -1;
yy = y;
- if (((FX_WORD)m * 100 + d) < 300)
+ if (((uint16_t)m * 100 + d) < 300)
yy--;
ydays = _gAfxGetYearDays(yy);
while (ldays >= ydays) {
diff --git a/fpdfsdk/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp
index c44f346150..bfdcb2dbca 100644
--- a/fpdfsdk/fsdk_baseform.cpp
+++ b/fpdfsdk/fsdk_baseform.cpp
@@ -1566,7 +1566,7 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue) {
pEdit->SetAlignmentV(1);
}
- FX_WORD subWord = 0;
+ uint16_t subWord = 0;
if ((dwFieldFlags >> 13) & 1) {
subWord = '*';
pEdit->SetPasswordChar(subWord);
diff --git a/fpdfsdk/fxedit/fxet_ap.cpp b/fpdfsdk/fxedit/fxet_ap.cpp
index 5bf61365c5..a32340302e 100644
--- a/fpdfsdk/fxedit/fxet_ap.cpp
+++ b/fpdfsdk/fxedit/fxet_ap.cpp
@@ -11,8 +11,8 @@
CFX_ByteString GetPDFWordString(IFX_Edit_FontMap* pFontMap,
int32_t nFontIndex,
- FX_WORD Word,
- FX_WORD SubWord) {
+ uint16_t Word,
+ uint16_t SubWord) {
CFX_ByteString sWord;
if (CPDF_Font* pPDFFont = pFontMap->GetPDFFont(nFontIndex)) {
if (SubWord > 0) {
@@ -62,7 +62,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream(
const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange /* = NULL*/,
FX_BOOL bContinuous /* = TRUE*/,
- FX_WORD SubWord /* = 0*/) {
+ uint16_t SubWord /* = 0*/) {
CFX_ByteTextBuf sEditStream, sWords;
CFX_FloatPoint ptOld(0.0f, 0.0f), ptNew(0.0f, 0.0f);
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index 1b68dc0510..d2a558fc70 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -100,7 +100,7 @@ IFX_Edit_FontMap* CFX_Edit_Provider::GetFontMap() {
}
int32_t CFX_Edit_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 = word;
@@ -131,7 +131,7 @@ int32_t CFX_Edit_Provider::GetTypeDescent(int32_t nFontIndex) {
return 0;
}
-int32_t CFX_Edit_Provider::GetWordFontIndex(FX_WORD word,
+int32_t CFX_Edit_Provider::GetWordFontIndex(uint16_t word,
int32_t charset,
int32_t nFontIndex) {
return m_pFontMap->GetWordFontIndex(word, charset, nFontIndex);
@@ -141,7 +141,7 @@ int32_t CFX_Edit_Provider::GetDefaultFontIndex() {
return 0;
}
-FX_BOOL CFX_Edit_Provider::IsLatinWord(FX_WORD word) {
+FX_BOOL CFX_Edit_Provider::IsLatinWord(uint16_t word) {
return FX_EDIT_ISLATINWORD(word);
}
@@ -409,7 +409,7 @@ CFX_WideString CFX_Edit_GroupUndoItem::GetUndoTitle() {
CFXEU_InsertWord::CFXEU_InsertWord(CFX_Edit* pEdit,
const CPVT_WordPlace& wpOldPlace,
const CPVT_WordPlace& wpNewPlace,
- FX_WORD word,
+ uint16_t word,
int32_t charset,
const CPVT_WordProps* pWordProps)
: m_pEdit(pEdit),
@@ -477,7 +477,7 @@ void CFXEU_InsertReturn::Undo() {
CFXEU_Backspace::CFXEU_Backspace(CFX_Edit* pEdit,
const CPVT_WordPlace& wpOldPlace,
const CPVT_WordPlace& wpNewPlace,
- FX_WORD word,
+ uint16_t word,
int32_t charset,
const CPVT_SecProps& SecProps,
const CPVT_WordProps& WordProps)
@@ -514,7 +514,7 @@ void CFXEU_Backspace::Undo() {
CFXEU_Delete::CFXEU_Delete(CFX_Edit* pEdit,
const CPVT_WordPlace& wpOldPlace,
const CPVT_WordPlace& wpNewPlace,
- FX_WORD word,
+ uint16_t word,
int32_t charset,
const CPVT_SecProps& SecProps,
const CPVT_WordProps& WordProps,
@@ -579,7 +579,7 @@ CFXEU_ClearRich::CFXEU_ClearRich(CFX_Edit* pEdit,
const CPVT_WordPlace& wpOldPlace,
const CPVT_WordPlace& wpNewPlace,
const CPVT_WordRange& wrSel,
- FX_WORD word,
+ uint16_t word,
int32_t charset,
const CPVT_SecProps& SecProps,
const CPVT_WordProps& WordProps)
@@ -833,7 +833,7 @@ void CFX_Edit::SetAlignmentV(int32_t nFormat, FX_BOOL bPaint) {
Paint();
}
-void CFX_Edit::SetPasswordChar(FX_WORD wSubWord, FX_BOOL bPaint) {
+void CFX_Edit::SetPasswordChar(uint16_t wSubWord, FX_BOOL bPaint) {
m_pVT->SetPasswordChar(wSubWord);
if (bPaint)
Paint();
@@ -1589,7 +1589,7 @@ void CFX_Edit::SetText(const FX_WCHAR* text,
SetText(text, charset, pSecProps, pWordProps, TRUE, TRUE);
}
-FX_BOOL CFX_Edit::InsertWord(FX_WORD word,
+FX_BOOL CFX_Edit::InsertWord(uint16_t word,
int32_t charset,
const CPVT_WordProps* pWordProps) {
return InsertWord(word, charset, pWordProps, TRUE, TRUE);
@@ -1623,7 +1623,7 @@ FX_FLOAT CFX_Edit::GetFontSize() const {
return m_pVT->GetFontSize();
}
-FX_WORD CFX_Edit::GetPasswordChar() const {
+uint16_t CFX_Edit::GetPasswordChar() const {
return m_pVT->GetPasswordChar();
}
@@ -2467,7 +2467,7 @@ void CFX_Edit::SetText(const FX_WCHAR* text,
m_pOprNotify->OnSetText(m_wpCaret, m_wpOldCaret);
}
-FX_BOOL CFX_Edit::InsertWord(FX_WORD word,
+FX_BOOL CFX_Edit::InsertWord(uint16_t word,
int32_t charset,
const CPVT_WordProps* pWordProps,
FX_BOOL bAddUndo,
@@ -2972,7 +2972,7 @@ CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place,
CFX_WideString sText = text;
for (int32_t i = 0, sz = sText.GetLength(); i < sz; i++) {
- FX_WORD word = sText[i];
+ uint16_t word = sText[i];
switch (word) {
case 0x0D:
wp = m_pVT->InsertSection(wp, pSecProps, pWordProps);
@@ -2997,7 +2997,7 @@ CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place,
return wp;
}
-int32_t CFX_Edit::GetCharSetFromUnicode(FX_WORD word, int32_t nOldCharset) {
+int32_t CFX_Edit::GetCharSetFromUnicode(uint16_t word, int32_t nOldCharset) {
if (IFX_Edit_FontMap* pFontMap = GetFontMap())
return pFontMap->CharSetFromUnicode(word, nOldCharset);
return nOldCharset;
diff --git a/fpdfsdk/fxedit/fxet_list.cpp b/fpdfsdk/fxedit/fxet_list.cpp
index cc9696030e..f060d93148 100644
--- a/fpdfsdk/fxedit/fxet_list.cpp
+++ b/fpdfsdk/fxedit/fxet_list.cpp
@@ -79,7 +79,7 @@ FX_FLOAT CFX_ListItem::GetItemHeight() const {
return 0.0f;
}
-FX_WORD CFX_ListItem::GetFirstChar() const {
+uint16_t CFX_ListItem::GetFirstChar() const {
CPVT_Word word;
if (IFX_Edit_Iterator* pIterator = GetIterator()) {
@@ -570,7 +570,7 @@ void CFX_ListCtrl::OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) {
OnVK(GetCount() - 1, bShift, bCtrl);
}
-FX_BOOL CFX_ListCtrl::OnChar(FX_WORD nChar, FX_BOOL bShift, FX_BOOL bCtrl) {
+FX_BOOL CFX_ListCtrl::OnChar(uint16_t nChar, FX_BOOL bShift, FX_BOOL bCtrl) {
int32_t nIndex = GetLastSelected();
int32_t nFindIndex = FindNext(nIndex, nChar);
diff --git a/fpdfsdk/fxedit/fxet_pageobjs.cpp b/fpdfsdk/fxedit/fxet_pageobjs.cpp
index 20133529ae..3f32d9d3e1 100644
--- a/fpdfsdk/fxedit/fxet_pageobjs.cpp
+++ b/fpdfsdk/fxedit/fxet_pageobjs.cpp
@@ -153,7 +153,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice,
void* pFFLData) {
const bool bContinuous =
pEdit->GetCharArray() == 0 && pEdit->GetCharSpace() <= 0.0f;
- FX_WORD SubWord = pEdit->GetPasswordChar();
+ uint16_t SubWord = pEdit->GetPasswordChar();
FX_FLOAT fFontSize = pEdit->GetFontSize();
CPVT_WordRange wrSelect = pEdit->GetSelectWordRange();
int32_t nHorzScale = pEdit->GetHorzScale();
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index b80e797f18..17340753ea 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -513,14 +513,14 @@ class CPDFSDK_Document {
FX_BOOL SetFocusAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag = 0);
FX_BOOL KillFocusAnnot(FX_UINT nFlag = 0);
- FX_BOOL ExtractPages(const std::vector<FX_WORD>& arrExtraPages,
+ FX_BOOL ExtractPages(const std::vector<uint16_t>& arrExtraPages,
CPDF_Document* pDstDoc);
FX_BOOL InsertPages(int nInsertAt,
const CPDF_Document* pSrcDoc,
- const std::vector<FX_WORD>& arrSrcPages);
+ const std::vector<uint16_t>& arrSrcPages);
FX_BOOL ReplacePages(int nPage,
const CPDF_Document* pSrcDoc,
- const std::vector<FX_WORD>& arrSrcPages);
+ const std::vector<uint16_t>& arrSrcPages);
void OnCloseDocument();
diff --git a/fpdfsdk/include/fx_systemhandler.h b/fpdfsdk/include/fx_systemhandler.h
index 4a1d61472e..ab0bc46017 100644
--- a/fpdfsdk/include/fx_systemhandler.h
+++ b/fpdfsdk/include/fx_systemhandler.h
@@ -27,14 +27,14 @@ struct FX_SYSTEMTIME {
wMinute(0),
wSecond(0),
wMilliseconds(0) {}
- FX_WORD wYear;
- FX_WORD wMonth;
- FX_WORD wDayOfWeek;
- FX_WORD wDay;
- FX_WORD wHour;
- FX_WORD wMinute;
- FX_WORD wSecond;
- FX_WORD wMilliseconds;
+ uint16_t wYear;
+ uint16_t wMonth;
+ uint16_t wDayOfWeek;
+ uint16_t wDay;
+ uint16_t wHour;
+ uint16_t wMinute;
+ uint16_t wSecond;
+ uint16_t wMilliseconds;
};
// cursor style
diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h
index a70d0e7c4c..d2222a04af 100644
--- a/fpdfsdk/include/fxedit/fx_edit.h
+++ b/fpdfsdk/include/fxedit/fx_edit.h
@@ -59,13 +59,13 @@ class IFX_Edit_FontMap {
// get the alias of a pdf font.
virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) = 0;
// get the index of a font that can show a word.
- virtual int32_t GetWordFontIndex(FX_WORD word,
+ virtual int32_t GetWordFontIndex(uint16_t word,
int32_t charset,
int32_t nFontIndex) = 0;
// get the charcode of word from unicode
- virtual int32_t CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word) = 0;
+ virtual int32_t CharCodeFromUnicode(int32_t nFontIndex, uint16_t word) = 0;
// get the charset of unicode
- virtual int32_t CharSetFromUnicode(FX_WORD word, int32_t nOldCharset) = 0;
+ virtual int32_t CharSetFromUnicode(uint16_t word, int32_t nOldCharset) = 0;
};
class IFX_Edit_Notify {
@@ -215,7 +215,7 @@ class IFX_Edit {
// 2:bottom).
virtual void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) = 0;
// if the text is shown in secret , set a character for substitute.
- virtual void SetPasswordChar(FX_WORD wSubWord = '*',
+ virtual void SetPasswordChar(uint16_t wSubWord = '*',
FX_BOOL bPaint = TRUE) = 0;
// set the maximal count of words of the text.
virtual void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE) = 0;
@@ -336,7 +336,7 @@ class IFX_Edit {
const CPVT_SecProps* pSecProps = NULL,
const CPVT_WordProps* pWordProps = NULL) = 0;
// insert a word into the edit.
- virtual FX_BOOL InsertWord(FX_WORD word,
+ virtual FX_BOOL InsertWord(uint16_t word,
int32_t charset = DEFAULT_CHARSET,
const CPVT_WordProps* pWordProps = NULL) = 0;
// insert a return into the edit.
@@ -404,7 +404,7 @@ class IFX_Edit {
// get the font size of non_rich text or default font size of richtext.
virtual FX_FLOAT GetFontSize() const = 0;
// get the mask character.
- virtual FX_WORD GetPasswordChar() const = 0;
+ virtual uint16_t GetPasswordChar() const = 0;
// get the count of charArray
virtual int32_t GetCharArray() const = 0;
// get the horizontal scale of all characters
@@ -429,7 +429,7 @@ class IFX_Edit {
const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange = NULL,
FX_BOOL bContinuous = TRUE,
- FX_WORD SubWord = 0);
+ uint16_t SubWord = 0);
static CFX_ByteString GetSelectAppearanceStream(
IFX_Edit* pEdit,
const CFX_FloatPoint& ptOffset,
@@ -562,7 +562,7 @@ class IFX_List {
virtual void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) = 0;
virtual void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) = 0;
virtual void OnVK(int32_t nItemIndex, FX_BOOL bShift, FX_BOOL bCtrl) = 0;
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_BOOL bShift, FX_BOOL bCtrl) = 0;
+ virtual FX_BOOL OnChar(uint16_t nChar, FX_BOOL bShift, FX_BOOL bCtrl) = 0;
protected:
virtual ~IFX_List() {}
@@ -570,7 +570,7 @@ class IFX_List {
CFX_ByteString GetPDFWordString(IFX_Edit_FontMap* pFontMap,
int32_t nFontIndex,
- FX_WORD Word,
- FX_WORD SubWord);
+ uint16_t Word,
+ uint16_t SubWord);
#endif // FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_
diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h
index 9809ac9f7d..d3e354d0e8 100644
--- a/fpdfsdk/include/fxedit/fxet_edit.h
+++ b/fpdfsdk/include/fxedit/fxet_edit.h
@@ -287,7 +287,7 @@ class CFXEU_InsertWord : public CFX_Edit_UndoItem {
CFXEU_InsertWord(CFX_Edit* pEdit,
const CPVT_WordPlace& wpOldPlace,
const CPVT_WordPlace& wpNewPlace,
- FX_WORD word,
+ uint16_t word,
int32_t charset,
const CPVT_WordProps* pWordProps);
~CFXEU_InsertWord() override;
@@ -301,7 +301,7 @@ class CFXEU_InsertWord : public CFX_Edit_UndoItem {
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
- FX_WORD m_Word;
+ uint16_t m_Word;
int32_t m_nCharset;
CPVT_WordProps m_WordProps;
};
@@ -333,7 +333,7 @@ class CFXEU_Backspace : public CFX_Edit_UndoItem {
CFXEU_Backspace(CFX_Edit* pEdit,
const CPVT_WordPlace& wpOldPlace,
const CPVT_WordPlace& wpNewPlace,
- FX_WORD word,
+ uint16_t word,
int32_t charset,
const CPVT_SecProps& SecProps,
const CPVT_WordProps& WordProps);
@@ -348,7 +348,7 @@ class CFXEU_Backspace : public CFX_Edit_UndoItem {
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
- FX_WORD m_Word;
+ uint16_t m_Word;
int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
@@ -359,7 +359,7 @@ class CFXEU_Delete : public CFX_Edit_UndoItem {
CFXEU_Delete(CFX_Edit* pEdit,
const CPVT_WordPlace& wpOldPlace,
const CPVT_WordPlace& wpNewPlace,
- FX_WORD word,
+ uint16_t word,
int32_t charset,
const CPVT_SecProps& SecProps,
const CPVT_WordProps& WordProps,
@@ -375,7 +375,7 @@ class CFXEU_Delete : public CFX_Edit_UndoItem {
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
- FX_WORD m_Word;
+ uint16_t m_Word;
int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
@@ -406,7 +406,7 @@ class CFXEU_ClearRich : public CFX_Edit_UndoItem {
const CPVT_WordPlace& wpOldPlace,
const CPVT_WordPlace& wpNewPlace,
const CPVT_WordRange& wrSel,
- FX_WORD word,
+ uint16_t word,
int32_t charset,
const CPVT_SecProps& SecProps,
const CPVT_WordProps& WordProps);
@@ -422,7 +422,7 @@ class CFXEU_ClearRich : public CFX_Edit_UndoItem {
CPVT_WordPlace m_wpOld;
CPVT_WordPlace m_wpNew;
CPVT_WordRange m_wrSel;
- FX_WORD m_Word;
+ uint16_t m_Word;
int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
@@ -537,7 +537,7 @@ class CFX_Edit : public IFX_Edit {
void SetScrollPos(const CFX_FloatPoint& point) override;
void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) override;
void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) override;
- void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE) override;
+ void SetPasswordChar(uint16_t wSubWord = '*', FX_BOOL bPaint = TRUE) override;
void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE) override;
void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE) override;
void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE) override;
@@ -581,7 +581,7 @@ class CFX_Edit : public IFX_Edit {
int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps* pSecProps = NULL,
const CPVT_WordProps* pWordProps = NULL) override;
- FX_BOOL InsertWord(FX_WORD word,
+ FX_BOOL InsertWord(uint16_t word,
int32_t charset = DEFAULT_CHARSET,
const CPVT_WordProps* pWordProps = NULL) override;
FX_BOOL InsertReturn(const CPVT_SecProps* pSecProps = NULL,
@@ -608,7 +608,7 @@ class CFX_Edit : public IFX_Edit {
CFX_WideString GetSelText() const override;
CFX_WideString GetText() const override;
FX_FLOAT GetFontSize() const override;
- FX_WORD GetPasswordChar() const override;
+ uint16_t GetPasswordChar() const override;
CFX_FloatPoint GetScrollPos() const override;
int32_t GetCharArray() const override;
CFX_FloatRect GetPlateRect() const override;
@@ -646,7 +646,7 @@ class CFX_Edit : public IFX_Edit {
int32_t charset,
const CPVT_SecProps* pSecProps,
const CPVT_WordProps* pWordProps);
- int32_t GetCharSetFromUnicode(FX_WORD word, int32_t nOldCharset);
+ int32_t GetCharSetFromUnicode(uint16_t word, int32_t nOldCharset);
int32_t GetTotalLines() const;
@@ -668,7 +668,7 @@ class CFX_Edit : public IFX_Edit {
const CPVT_WordProps* pWordProps,
FX_BOOL bAddUndo,
FX_BOOL bPaint);
- FX_BOOL InsertWord(FX_WORD word,
+ FX_BOOL InsertWord(uint16_t word,
int32_t charset,
const CPVT_WordProps* pWordProps,
FX_BOOL bAddUndo,
@@ -799,15 +799,15 @@ class CFX_Edit_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;
int32_t GetDefaultFontIndex() override;
- FX_BOOL IsLatinWord(FX_WORD word) override;
+ FX_BOOL IsLatinWord(uint16_t word) override;
private:
IFX_Edit_FontMap* m_pFontMap;
diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h
index 05ba4f9e23..d86e6ffeee 100644
--- a/fpdfsdk/include/fxedit/fxet_list.h
+++ b/fpdfsdk/include/fxedit/fxet_list.h
@@ -134,7 +134,7 @@ class CFX_ListItem {
FX_BOOL IsSelected() const;
FX_BOOL IsCaret() const;
FX_FLOAT GetItemHeight() const;
- FX_WORD GetFirstChar() const;
+ uint16_t GetFirstChar() const;
private:
IFX_Edit* m_pEdit;
@@ -296,7 +296,7 @@ class CFX_ListCtrl : public CFX_List {
void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) override;
void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) override;
void OnVK(int32_t nItemIndex, FX_BOOL bShift, FX_BOOL bCtrl) override;
- FX_BOOL OnChar(FX_WORD nChar, FX_BOOL bShift, FX_BOOL bCtrl) override;
+ FX_BOOL OnChar(uint16_t nChar, FX_BOOL bShift, FX_BOOL bCtrl) override;
void SetPlateRect(const CFX_FloatRect& rect) override;
void SetScrollPos(const CFX_FloatPoint& point) override;
void ScrollToListItem(int32_t nItemIndex) override;
diff --git a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
index b08e954947..88b7213920 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
@@ -25,8 +25,8 @@ class CPWL_CBListBox : public CPWL_ListBox {
// CPWL_ListBox
FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
- FX_BOOL OnKeyDownWithExit(FX_WORD nChar, FX_BOOL& bExit, FX_DWORD nFlag);
- FX_BOOL OnCharWithExit(FX_WORD nChar, FX_BOOL& bExit, FX_DWORD nFlag);
+ FX_BOOL OnKeyDownWithExit(uint16_t nChar, FX_BOOL& bExit, FX_DWORD nFlag);
+ FX_BOOL OnCharWithExit(uint16_t nChar, FX_BOOL& bExit, FX_DWORD nFlag);
};
#define PWL_COMBOBOX_BUTTON_WIDTH 13
@@ -54,8 +54,8 @@ class CPWL_ComboBox : public CPWL_Wnd {
// CPWL_Wnd:
CFX_ByteString GetClassName() const override;
void OnCreate(PWL_CREATEPARAM& cp) override;
- FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;
- FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override;
void OnNotify(CPWL_Wnd* pWnd,
FX_DWORD msg,
intptr_t wParam = 0,
diff --git a/fpdfsdk/include/pdfwindow/PWL_Edit.h b/fpdfsdk/include/pdfwindow/PWL_Edit.h
index e93afaaa00..0d764c0f89 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Edit.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Edit.h
@@ -62,8 +62,8 @@ class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify {
FX_BOOL OnMouseWheel(short zDelta,
const CFX_FloatPoint& point,
FX_DWORD nFlag) override;
- FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;
- FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override;
CFX_FloatRect GetFocusRect() const override;
void OnSetFocus() override;
void OnKillFocus() override;
@@ -154,7 +154,7 @@ class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify {
FX_BOOL bArabic) const;
public:
- FX_BOOL IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag);
+ FX_BOOL IsProceedtoOnChar(uint16_t nKeyCode, FX_DWORD nFlag);
private:
IPWL_Filler_Notify* m_pFillerNotify;
diff --git a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
index f80033081e..f2e166385e 100644
--- a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
+++ b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
@@ -103,8 +103,8 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify {
// CPWL_Wnd
void OnCreate(PWL_CREATEPARAM& cp) override;
void OnCreated() override;
- FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;
- FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override;
FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
@@ -149,7 +149,7 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify {
void PasteText();
void CutText();
void ShowVScrollBar(FX_BOOL bShow);
- void InsertWord(FX_WORD word, int32_t nCharset);
+ void InsertWord(uint16_t word, int32_t nCharset);
void InsertReturn();
FX_BOOL IsWndHorV();
diff --git a/fpdfsdk/include/pdfwindow/PWL_FontMap.h b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
index c8c8722c11..a913571960 100644
--- a/fpdfsdk/include/pdfwindow/PWL_FontMap.h
+++ b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
@@ -56,11 +56,11 @@ class CPWL_FontMap : public IFX_Edit_FontMap {
// IFX_Edit_FontMap
CPDF_Font* GetPDFFont(int32_t nFontIndex) override;
CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) override;
- int32_t GetWordFontIndex(FX_WORD word,
+ int32_t GetWordFontIndex(uint16_t word,
int32_t nCharset,
int32_t nFontIndex) override;
- int32_t CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word) override;
- int32_t CharSetFromUnicode(FX_WORD word, int32_t nOldCharset) override;
+ int32_t CharCodeFromUnicode(int32_t nFontIndex, uint16_t word) override;
+ int32_t CharSetFromUnicode(uint16_t word, int32_t nOldCharset) override;
void SetSystemHandler(IFX_SystemHandler* pSystemHandler);
int32_t GetFontMapCount() const;
@@ -86,13 +86,13 @@ class CPWL_FontMap : public IFX_Edit_FontMap {
int32_t nCharset);
virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias);
- FX_BOOL KnowWord(int32_t nFontIndex, FX_WORD word);
+ FX_BOOL KnowWord(int32_t nFontIndex, uint16_t word);
void Empty();
int32_t GetFontIndex(const CFX_ByteString& sFontName,
int32_t nCharset,
FX_BOOL bFind);
- int32_t GetPWLFontIndex(FX_WORD word, int32_t nCharset);
+ int32_t GetPWLFontIndex(uint16_t word, int32_t nCharset);
int32_t AddFontData(CPDF_Font* pFont,
const CFX_ByteString& sFontAlias,
int32_t nCharset = DEFAULT_CHARSET);
diff --git a/fpdfsdk/include/pdfwindow/PWL_IconList.h b/fpdfsdk/include/pdfwindow/PWL_IconList.h
index 71c9f4cb25..a11a73c41a 100644
--- a/fpdfsdk/include/pdfwindow/PWL_IconList.h
+++ b/fpdfsdk/include/pdfwindow/PWL_IconList.h
@@ -78,7 +78,7 @@ class CPWL_IconList_Content : public CPWL_ListCtrl {
FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
- FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override;
private:
CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const;
diff --git a/fpdfsdk/include/pdfwindow/PWL_ListBox.h b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
index e12d727d58..d0d98b9bcc 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ListBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
@@ -59,8 +59,8 @@ class CPWL_ListBox : public CPWL_Wnd {
void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
void DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) override;
- FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;
- FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override;
FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
diff --git a/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h b/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h
index 8731562726..35b2c3f43e 100644
--- a/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h
+++ b/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h
@@ -27,7 +27,7 @@ class CPWL_CheckBox : public CPWL_Button {
// CPWL_Button
CFX_ByteString GetClassName() const override;
FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
- FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override;
void SetCheck(bool bCheck);
bool IsChecked() const;
@@ -44,7 +44,7 @@ class CPWL_RadioButton : public CPWL_Button {
// CPWL_Button
CFX_ByteString GetClassName() const override;
FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
- FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
+ FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag) override;
void SetCheck(bool bCheck);
bool IsChecked() const;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Utils.h b/fpdfsdk/include/pdfwindow/PWL_Utils.h
index 7cce6c2b66..be51f18627 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Utils.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Utils.h
@@ -27,9 +27,9 @@ T PWL_MAX(const T& i, const T& j) {
#define PWL_WIN2PDF(color) ((FX_FLOAT)((FX_FLOAT)color / 255.0f))
#define PWL_MAKEDWORD(low, high) \
- ((FX_DWORD)((FX_WORD)(low) | (FX_DWORD)(((FX_WORD)(high)) << 16)))
-#define PWL_GETLOWWORD(dword) ((FX_WORD)(dword))
-#define PWL_GETHIGHWORD(dword) ((FX_WORD)(dword >> 16))
+ ((FX_DWORD)((uint16_t)(low) | (FX_DWORD)(((uint16_t)(high)) << 16)))
+#define PWL_GETLOWWORD(dword) ((uint16_t)(dword))
+#define PWL_GETHIGHWORD(dword) ((uint16_t)(dword >> 16))
#define PWL_ICONTYPE_CHECKMARK 0
#define PWL_ICONTYPE_CIRCLE 1
@@ -171,7 +171,7 @@ class CPWL_Utils {
const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange = NULL,
FX_BOOL bContinuous = TRUE,
- FX_WORD SubWord = 0);
+ uint16_t SubWord = 0);
static CFX_ByteString GetEditSelAppStream(
IFX_Edit* pEdit,
const CFX_FloatPoint& ptOffset,
diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
index 493cdc0874..6ad356d80d 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
@@ -298,9 +298,9 @@ class CPWL_Wnd : public CPWL_TimerHandler {
void DrawAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device);
- virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnKeyUp(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual FX_BOOL OnKeyDown(uint16_t nChar, FX_DWORD nFlag);
+ virtual FX_BOOL OnKeyUp(uint16_t nChar, FX_DWORD nFlag);
+ virtual FX_BOOL OnChar(uint16_t nChar, FX_DWORD nFlag);
virtual FX_BOOL OnLButtonDblClk(const CFX_FloatPoint& point, FX_DWORD nFlag);
virtual FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag);
virtual FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag);
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 36ea910a47..fe4cd7c8ce 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -1465,7 +1465,7 @@ int Document::CountWords(CPDF_TextObject* pTextObj) {
pTextObj->GetCharInfo(i, charcode, kerning);
CFX_WideString swUnicode = pFont->UnicodeFromCharCode(charcode);
- FX_WORD unicode = 0;
+ uint16_t unicode = 0;
if (swUnicode.GetLength() > 0)
unicode = swUnicode[0];
@@ -1498,7 +1498,7 @@ CFX_WideString Document::GetObjWordStr(CPDF_TextObject* pTextObj,
pTextObj->GetCharInfo(i, charcode, kerning);
CFX_WideString swUnicode = pFont->UnicodeFromCharCode(charcode);
- FX_WORD unicode = 0;
+ uint16_t unicode = 0;
if (swUnicode.GetLength() > 0)
unicode = swUnicode[0];
diff --git a/fpdfsdk/javascript/JS_GlobalData.cpp b/fpdfsdk/javascript/JS_GlobalData.cpp
index ba547fe79e..3376ccdc61 100644
--- a/fpdfsdk/javascript/JS_GlobalData.cpp
+++ b/fpdfsdk/javascript/JS_GlobalData.cpp
@@ -317,14 +317,14 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() {
if (pBuffer) {
uint8_t* p = pBuffer;
- FX_WORD wType = *((FX_WORD*)p);
- p += sizeof(FX_WORD);
+ uint16_t wType = *((uint16_t*)p);
+ p += sizeof(uint16_t);
- // FX_WORD wTemp = (FX_WORD)(('X' << 8) | 'F');
+ // uint16_t wTemp = (uint16_t)(('X' << 8) | 'F');
- if (wType == (FX_WORD)(('X' << 8) | 'F')) {
- FX_WORD wVersion = *((FX_WORD*)p);
- p += sizeof(FX_WORD);
+ if (wType == (uint16_t)(('X' << 8) | 'F')) {
+ uint16_t wVersion = *((uint16_t*)p);
+ p += sizeof(uint16_t);
ASSERT(wVersion <= 2);
@@ -334,7 +334,7 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() {
FX_DWORD dwSize = *((FX_DWORD*)p);
p += sizeof(FX_DWORD);
- if (dwSize == nLength - sizeof(FX_WORD) * 2 - sizeof(FX_DWORD) * 2) {
+ if (dwSize == nLength - sizeof(uint16_t) * 2 - sizeof(FX_DWORD) * 2) {
for (int32_t i = 0, sz = dwCount; i < sz; i++) {
if (p > pBuffer + nLength)
break;
@@ -348,8 +348,8 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() {
CFX_ByteString sEntry = CFX_ByteString(p, dwNameLen);
p += sizeof(char) * dwNameLen;
- FX_WORD wDataType = *((FX_WORD*)p);
- p += sizeof(FX_WORD);
+ uint16_t wDataType = *((uint16_t*)p);
+ p += sizeof(uint16_t);
switch (wDataType) {
case JS_GLOBALDATA_TYPE_NUMBER: {
@@ -369,8 +369,8 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() {
SetGlobalVariablePersistent(sEntry, TRUE);
} break;
case JS_GLOBALDATA_TYPE_BOOLEAN: {
- FX_WORD wData = *((FX_WORD*)p);
- p += sizeof(FX_WORD);
+ uint16_t wData = *((uint16_t*)p);
+ p += sizeof(uint16_t);
SetGlobalVariableBoolean(sEntry, (bool)(wData == 1));
SetGlobalVariablePersistent(sEntry, TRUE);
} break;
@@ -417,10 +417,10 @@ void CJS_GlobalData::SaveGlobalPersisitentVariables() {
CFX_BinaryBuf sFile;
- FX_WORD wType = (FX_WORD)(('X' << 8) | 'F');
- sFile.AppendBlock(&wType, sizeof(FX_WORD));
- FX_WORD wVersion = 2;
- sFile.AppendBlock(&wVersion, sizeof(FX_WORD));
+ uint16_t wType = (uint16_t)(('X' << 8) | 'F');
+ sFile.AppendBlock(&wType, sizeof(uint16_t));
+ uint16_t wVersion = 2;
+ sFile.AppendBlock(&wVersion, sizeof(uint16_t));
sFile.AppendBlock(&nCount, sizeof(FX_DWORD));
FX_DWORD dwSize = sData.GetSize();
sFile.AppendBlock(&dwSize, sizeof(FX_DWORD));
@@ -448,13 +448,13 @@ void CJS_GlobalData::WriteFileBuffer(const FX_WCHAR* sFilePath,
void CJS_GlobalData::MakeByteString(const CFX_ByteString& name,
CJS_KeyValue* pData,
CFX_BinaryBuf& sData) {
- FX_WORD wType = (FX_WORD)pData->nType;
+ uint16_t wType = (uint16_t)pData->nType;
switch (wType) {
case JS_GLOBALDATA_TYPE_NUMBER: {
FX_DWORD dwNameLen = (FX_DWORD)name.GetLength();
sData.AppendBlock(&dwNameLen, sizeof(FX_DWORD));
sData.AppendString(name);
- sData.AppendBlock(&wType, sizeof(FX_WORD));
+ sData.AppendBlock(&wType, sizeof(uint16_t));
double dData = pData->dData;
sData.AppendBlock(&dData, sizeof(double));
@@ -463,16 +463,16 @@ void CJS_GlobalData::MakeByteString(const CFX_ByteString& name,
FX_DWORD dwNameLen = (FX_DWORD)name.GetLength();
sData.AppendBlock(&dwNameLen, sizeof(FX_DWORD));
sData.AppendString(name);
- sData.AppendBlock(&wType, sizeof(FX_WORD));
+ sData.AppendBlock(&wType, sizeof(uint16_t));
- FX_WORD wData = (FX_WORD)pData->bData;
- sData.AppendBlock(&wData, sizeof(FX_WORD));
+ uint16_t wData = (uint16_t)pData->bData;
+ sData.AppendBlock(&wData, sizeof(uint16_t));
} break;
case JS_GLOBALDATA_TYPE_STRING: {
FX_DWORD dwNameLen = (FX_DWORD)name.GetLength();
sData.AppendBlock(&dwNameLen, sizeof(FX_DWORD));
sData.AppendString(name);
- sData.AppendBlock(&wType, sizeof(FX_WORD));
+ sData.AppendBlock(&wType, sizeof(uint16_t));
FX_DWORD dwDataLen = (FX_DWORD)pData->sData.GetLength();
sData.AppendBlock(&dwDataLen, sizeof(FX_DWORD));
diff --git a/fpdfsdk/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/pdfwindow/PWL_ComboBox.cpp
index 1d98a51d26..cf9ce0a5fb 100644
--- a/fpdfsdk/pdfwindow/PWL_ComboBox.cpp
+++ b/fpdfsdk/pdfwindow/PWL_ComboBox.cpp
@@ -45,7 +45,7 @@ FX_BOOL CPWL_CBListBox::OnLButtonUp(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_CBListBox::OnKeyDownWithExit(FX_WORD nChar,
+FX_BOOL CPWL_CBListBox::OnKeyDownWithExit(uint16_t nChar,
FX_BOOL& bExit,
FX_DWORD nFlag) {
if (!m_pList)
@@ -91,7 +91,7 @@ FX_BOOL CPWL_CBListBox::OnKeyDownWithExit(FX_WORD nChar,
return TRUE;
}
-FX_BOOL CPWL_CBListBox::OnCharWithExit(FX_WORD nChar,
+FX_BOOL CPWL_CBListBox::OnCharWithExit(uint16_t nChar,
FX_BOOL& bExit,
FX_DWORD nFlag) {
if (!m_pList)
@@ -517,7 +517,7 @@ void CPWL_ComboBox::SetPopup(FX_BOOL bPopup) {
}
}
-FX_BOOL CPWL_ComboBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_ComboBox::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) {
if (!m_pList)
return FALSE;
if (!m_pEdit)
@@ -576,7 +576,7 @@ FX_BOOL CPWL_ComboBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
return FALSE;
}
-FX_BOOL CPWL_ComboBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_ComboBox::OnChar(uint16_t nChar, FX_DWORD nFlag) {
if (!m_pList)
return FALSE;
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp
index 808b2b56bf..62873e5bc0 100644
--- a/fpdfsdk/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp
@@ -862,7 +862,7 @@ void CPWL_Edit::EnableSpellCheck(FX_BOOL bEnabled) {
RemoveFlag(PES_SPELLCHECK);
}
-FX_BOOL CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_Edit::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) {
if (m_bMouseDown)
return TRUE;
@@ -903,7 +903,7 @@ FX_BOOL CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
*If the event is swallowed, implementation may do other unexpected things, which
*is not the control means to do.
*/
-FX_BOOL CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag) {
+FX_BOOL CPWL_Edit::IsProceedtoOnChar(uint16_t nKeyCode, FX_DWORD nFlag) {
FX_BOOL bCtrl = IsCTRLpressed(nFlag);
FX_BOOL bAlt = IsALTpressed(nFlag);
if (bCtrl && !bAlt) {
@@ -931,7 +931,7 @@ FX_BOOL CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag) {
}
}
-FX_BOOL CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_Edit::OnChar(uint16_t nChar, FX_DWORD nFlag) {
if (m_bMouseDown)
return TRUE;
diff --git a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
index 10b5d6c04f..3109052a20 100644
--- a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
+++ b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
@@ -142,7 +142,7 @@ FX_FLOAT CPWL_EditCtrl::GetFontSize() const {
return m_pEdit->GetFontSize();
}
-FX_BOOL CPWL_EditCtrl::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_EditCtrl::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) {
if (m_bMouseDown)
return TRUE;
@@ -217,7 +217,7 @@ FX_BOOL CPWL_EditCtrl::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
return bRet;
}
-FX_BOOL CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_EditCtrl::OnChar(uint16_t nChar, FX_DWORD nFlag) {
if (m_bMouseDown)
return TRUE;
@@ -236,7 +236,7 @@ FX_BOOL CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
FX_BOOL bAlt = IsALTpressed(nFlag);
FX_BOOL bShift = IsSHIFTpressed(nFlag);
- FX_WORD word = nChar;
+ uint16_t word = nChar;
if (bCtrl && !bAlt) {
switch (nChar) {
@@ -508,7 +508,7 @@ void CPWL_EditCtrl::InsertText(const FX_WCHAR* csText) {
m_pEdit->InsertText(csText);
}
-void CPWL_EditCtrl::InsertWord(FX_WORD word, int32_t nCharset) {
+void CPWL_EditCtrl::InsertWord(uint16_t word, int32_t nCharset) {
if (!IsReadOnly())
m_pEdit->InsertWord(word, nCharset);
}
diff --git a/fpdfsdk/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/pdfwindow/PWL_FontMap.cpp
index ff9e2a3e39..1ac55bcb6e 100644
--- a/fpdfsdk/pdfwindow/PWL_FontMap.cpp
+++ b/fpdfsdk/pdfwindow/PWL_FontMap.cpp
@@ -79,7 +79,7 @@ CFX_ByteString CPWL_FontMap::GetPDFFontAlias(int32_t nFontIndex) {
return "";
}
-FX_BOOL CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word) {
+FX_BOOL CPWL_FontMap::KnowWord(int32_t nFontIndex, uint16_t word) {
if (nFontIndex >= 0 && nFontIndex < m_aData.GetSize()) {
if (m_aData.GetAt(nFontIndex)) {
return CharCodeFromUnicode(nFontIndex, word) >= 0;
@@ -89,7 +89,7 @@ FX_BOOL CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word) {
return FALSE;
}
-int32_t CPWL_FontMap::GetWordFontIndex(FX_WORD word,
+int32_t CPWL_FontMap::GetWordFontIndex(uint16_t word,
int32_t nCharset,
int32_t nFontIndex) {
if (nFontIndex > 0) {
@@ -119,7 +119,7 @@ int32_t CPWL_FontMap::GetWordFontIndex(FX_WORD word,
return -1;
}
-int32_t CPWL_FontMap::CharCodeFromUnicode(int32_t nFontIndex, FX_WORD word) {
+int32_t CPWL_FontMap::CharCodeFromUnicode(int32_t nFontIndex, uint16_t word) {
if (CPWL_FontMap_Data* pData = m_aData.GetAt(nFontIndex)) {
if (pData->pFont) {
if (pData->pFont->IsUnicodeCompatible()) {
@@ -219,7 +219,7 @@ int32_t CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName,
return AddFontData(pFont, sAlias, nCharset);
}
-int32_t CPWL_FontMap::GetPWLFontIndex(FX_WORD word, int32_t nCharset) {
+int32_t CPWL_FontMap::GetPWLFontIndex(uint16_t word, int32_t nCharset) {
int32_t nFind = -1;
for (int32_t i = 0, sz = m_aData.GetSize(); i < sz; i++) {
@@ -434,7 +434,7 @@ CFX_ByteString CPWL_FontMap::GetDefaultFontByCharset(int32_t nCharset) {
return "";
}
-int32_t CPWL_FontMap::CharSetFromUnicode(FX_WORD word, int32_t nOldCharset) {
+int32_t CPWL_FontMap::CharSetFromUnicode(uint16_t word, int32_t nOldCharset) {
if (m_pSystemHandler && (-1 != m_pSystemHandler->GetCharSet()))
return m_pSystemHandler->GetCharSet();
// to avoid CJK Font to show ASCII
diff --git a/fpdfsdk/pdfwindow/PWL_IconList.cpp b/fpdfsdk/pdfwindow/PWL_IconList.cpp
index 7dc8ba9f44..d2418c8ecc 100644
--- a/fpdfsdk/pdfwindow/PWL_IconList.cpp
+++ b/fpdfsdk/pdfwindow/PWL_IconList.cpp
@@ -197,7 +197,7 @@ FX_BOOL CPWL_IconList_Content::OnMouseMove(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_IconList_Content::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) {
switch (nChar) {
case FWL_VKEY_Up:
if (m_nSelectIndex > 0) {
diff --git a/fpdfsdk/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
index 2c0b79d2f1..a673455242 100644
--- a/fpdfsdk/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
@@ -203,7 +203,7 @@ void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice,
}
}
-FX_BOOL CPWL_ListBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_ListBox::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) {
CPWL_Wnd::OnKeyDown(nChar, nFlag);
if (!m_pList)
@@ -250,7 +250,7 @@ FX_BOOL CPWL_ListBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) {
return TRUE;
}
-FX_BOOL CPWL_ListBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_ListBox::OnChar(uint16_t nChar, FX_DWORD nFlag) {
CPWL_Wnd::OnChar(nChar, nFlag);
if (!m_pList)
diff --git a/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp b/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp
index c19a233940..78ded5ebb1 100644
--- a/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp
+++ b/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp
@@ -46,7 +46,7 @@ FX_BOOL CPWL_CheckBox::OnLButtonUp(const CFX_FloatPoint& point,
return TRUE;
}
-FX_BOOL CPWL_CheckBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_CheckBox::OnChar(uint16_t nChar, FX_DWORD nFlag) {
SetCheck(!IsChecked());
return TRUE;
}
@@ -76,7 +76,7 @@ bool CPWL_RadioButton::IsChecked() const {
return m_bChecked;
}
-FX_BOOL CPWL_RadioButton::OnChar(FX_WORD nChar, FX_DWORD nFlag) {
+FX_BOOL CPWL_RadioButton::OnChar(uint16_t nChar, FX_DWORD nFlag) {
SetCheck(TRUE);
return TRUE;
}
diff --git a/fpdfsdk/pdfwindow/PWL_Utils.cpp b/fpdfsdk/pdfwindow/PWL_Utils.cpp
index 23bddcdf1e..9ad12abfe6 100644
--- a/fpdfsdk/pdfwindow/PWL_Utils.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Utils.cpp
@@ -417,7 +417,7 @@ CFX_ByteString CPWL_Utils::GetEditAppStream(IFX_Edit* pEdit,
const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange,
FX_BOOL bContinuous,
- FX_WORD SubWord) {
+ uint16_t SubWord) {
return IFX_Edit::GetEditAppearanceStream(pEdit, ptOffset, pRange, bContinuous,
SubWord);
}
diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
index 597db35ec7..cb5311f59b 100644
--- a/fpdfsdk/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
@@ -407,7 +407,7 @@ void CPWL_Wnd::InvalidateRect(CFX_FloatRect* pRect) {
}
#define PWL_IMPLEMENT_KEY_METHOD(key_method_name) \
- FX_BOOL CPWL_Wnd::key_method_name(FX_WORD nChar, FX_DWORD nFlag) { \
+ FX_BOOL CPWL_Wnd::key_method_name(uint16_t nChar, FX_DWORD nFlag) { \
if (IsValid() && IsVisible() && IsEnabled()) { \
if (IsWndCaptureKeyboard(this)) { \
for (int32_t i = 0, sz = m_aChildren.GetSize(); i < sz; i++) { \
diff --git a/xfa/fde/css/#fde_cssstyleselector.h# b/xfa/fde/css/#fde_cssstyleselector.h#
new file mode 100644
index 0000000000..9078a44dd5
--- /dev/null
+++ b/xfa/fde/css/#fde_cssstyleselector.h#
@@ -0,0 +1,901 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_
+#define XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_
+
+#include <vector>
+
+#include "core/include/fxcrt/fx_ext.h"
+#include "xfa/fde/css/fde_css.h"
+#include "xfa/fde/css/fde_csscache.h"
+#include "xfa/fde/css/fde_cssdeclaration.h"
+#include "xfa/fgas/crt/fgas_memory.h"
+#include "xfa/fgas/crt/fgas_system.h"
+
+#define FDE_CSSUNIVERSALHASH ('*')
+
+class FDE_CSSRuleData : public CFX_Target {
+ public:
+ FDE_CSSRuleData(IFDE_CSSSelector* pSel,
+ IFDE_CSSDeclaration* pDecl,
+ FX_DWORD dwPos);
+
+ IFDE_CSSSelector* pSelector;
+ IFDE_CSSDeclaration* pDeclaration;
+ FX_DWORD dwPriority;
+ FDE_CSSRuleData* pNext;
+};
+
+class CFDE_CSSRuleCollection : public CFX_Target {
+ public:
+ CFDE_CSSRuleCollection()
+ : m_pStaticStore(nullptr),
+ m_pUniversalRules(nullptr),
+ m_pPersudoRules(nullptr),
+ m_iSelectors(0) {}
+ ~CFDE_CSSRuleCollection() { Clear(); }
+ void AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets,
+ FX_DWORD dwMediaList,
+ IFX_FontMgr* pFontMgr);
+ void Clear();
+
+ int32_t CountSelectors() const { return m_iSelectors; }
+ FDE_CSSRuleData* GetIDRuleData(FX_DWORD dwIDHash) {
+ void* pData;
+ return m_IDRules.Lookup((void*)(uintptr_t)dwIDHash, pData)
+ ? (FDE_CSSRuleData*)pData
+ : NULL;
+ }
+ FDE_CSSRuleData* GetTagRuleData(FX_DWORD dwTagHasn) {
+ void* pData;
+ return m_TagRules.Lookup((void*)(uintptr_t)dwTagHasn, pData)
+ ? (FDE_CSSRuleData*)pData
+ : NULL;
+ }
+ FDE_CSSRuleData* GetClassRuleData(FX_DWORD dwIDHash) {
+ void* pData;
+ return m_ClassRules.Lookup((void*)(uintptr_t)dwIDHash, pData)
+ ? (FDE_CSSRuleData*)pData
+ : NULL;
+ }
+ FDE_CSSRuleData* GetUniversalRuleData() { return m_pUniversalRules; }
+ FDE_CSSRuleData* GetPersudoRuleData() { return m_pPersudoRules; }
+ IFX_MEMAllocator* m_pStaticStore;
+
+ protected:
+ void AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet,
+ IFDE_CSSRule* pRule,
+ FX_DWORD dwMediaList,
+ IFX_FontMgr* pFontMgr);
+ void AddRuleTo(CFX_MapPtrToPtr& map,
+ FX_DWORD dwKey,
+ IFDE_CSSSelector* pSel,
+ IFDE_CSSDeclaration* pDecl);
+ FX_BOOL AddRuleTo(FDE_CSSRuleData*& pList, FDE_CSSRuleData* pData);
+ FDE_CSSRuleData* NewRuleData(IFDE_CSSSelector* pSel,
+ IFDE_CSSDeclaration* pDecl);
+ CFX_MapPtrToPtr m_IDRules;
+ CFX_MapPtrToPtr m_TagRules;
+ CFX_MapPtrToPtr m_ClassRules;
+ FDE_CSSRuleData* m_pUniversalRules;
+ FDE_CSSRuleData* m_pPersudoRules;
+ int32_t m_iSelectors;
+};
+class CFDE_CSSAccelerator;
+class CFDE_CSSComputedStyle;
+class CFDE_CSSStyleSelector : public IFDE_CSSStyleSelector, public CFX_Target {
+ public:
+ CFDE_CSSStyleSelector();
+ ~CFDE_CSSStyleSelector();
+ virtual void Release() { delete this; }
+
+ virtual void SetFontMgr(IFX_FontMgr* pFontMgr);
+ virtual void SetDefFontSize(FX_FLOAT fFontSize);
+
+ virtual FX_BOOL SetStyleSheet(FDE_CSSSTYLESHEETGROUP eType,
+ IFDE_CSSStyleSheet* pSheet);
+ virtual FX_BOOL SetStyleSheets(FDE_CSSSTYLESHEETGROUP eType,
+ const CFDE_CSSStyleSheetArray* pArray);
+ virtual void SetStylePriority(FDE_CSSSTYLESHEETGROUP eType,
+ FDE_CSSSTYLESHEETPRIORITY ePriority);
+ virtual void UpdateStyleIndex(FX_DWORD dwMediaList);
+ virtual IFDE_CSSAccelerator* InitAccelerator();
+ virtual IFDE_CSSComputedStyle* CreateComputedStyle(
+ IFDE_CSSComputedStyle* pParentStyle);
+ virtual int32_t MatchDeclarations(
+ IFDE_CSSTagProvider* pTag,
+ CFDE_CSSDeclarationArray& matchedDecls,
+ FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE);
+ virtual void ComputeStyle(IFDE_CSSTagProvider* pTag,
+ const IFDE_CSSDeclaration** ppDeclArray,
+ int32_t iDeclCount,
+ IFDE_CSSComputedStyle* pDestStyle);
+
+ protected:
+ void Reset();
+ void MatchRules(FDE_CSSTagCache* pCache,
+ FDE_CSSRuleData* pList,
+ FDE_CSSPERSUDO ePersudoType);
+ FX_BOOL MatchSelector(FDE_CSSTagCache* pCache,
+ IFDE_CSSSelector* pSel,
+ FDE_CSSPERSUDO ePersudoType);
+ void AppendInlineStyle(CFDE_CSSDeclaration* pDecl,
+ const FX_WCHAR* psz,
+ int32_t iLen);
+ void ApplyDeclarations(FX_BOOL bPriority,
+ const IFDE_CSSDeclaration** ppDeclArray,
+ int32_t iDeclCount,
+ IFDE_CSSComputedStyle* pDestStyle);
+ void ApplyProperty(FDE_CSSPROPERTY eProperty,
+ IFDE_CSSValue* pValue,
+ CFDE_CSSComputedStyle* pComputedStyle);
+
+ FX_FLOAT ApplyNumber(FDE_CSSPRIMITIVETYPE eUnit,
+ FX_FLOAT fValue,
+ FX_FLOAT fPercentBase);
+ FX_BOOL SetLengthWithPercent(FDE_CSSLENGTH& width,
+ FDE_CSSPRIMITIVETYPE eType,
+ IFDE_CSSPrimitiveValue* pPrimitive,
+ FX_FLOAT fFontSize);
+ FX_FLOAT ToFontSize(FDE_CSSPROPERTYVALUE eValue, FX_FLOAT fCurFontSize);
+ FDE_CSSDISPLAY ToDisplay(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSTEXTALIGN ToTextAlign(FDE_CSSPROPERTYVALUE eValue);
+ uint16_t ToFontWeight(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSFONTSTYLE ToFontStyle(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSBORDERSTYLE ToBorderStyle(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSVERTICALALIGN ToVerticalAlign(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSLISTSTYLETYPE ToListStyleType(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSLISTSTYLEPOSITION ToListStylePosition(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSVISIBILITY ToVisibility(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSWHITESPACE ToWhiteSpace(FDE_CSSPROPERTYVALUE eValue);
+ FX_DWORD ToTextDecoration(IFDE_CSSValueList* pList);
+ FDE_CSSTEXTTRANSFORM ToTextTransform(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSFONTVARIANT ToFontVariant(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSFLOAT ToFloat(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSCLEAR ToClear(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSWRITINGMODE ToWritingMode(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSWORDBREAK ToWordBreak(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSPAGEBREAK ToPageBreak(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSOVERFLOW ToOverflow(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSLINEBREAK ToLineBreak(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSTEXTCOMBINE ToTextCombine(FDE_CSSPROPERTYVALUE eValue);
+ FX_BOOL ToTextEmphasisMark(FDE_CSSPROPERTYVALUE eValue,
+ FDE_CSSTEXTEMPHASISMARK& eMark);
+ FX_BOOL ToTextEmphasisFill(FDE_CSSPROPERTYVALUE eValue,
+ FDE_CSSTEXTEMPHASISFILL& eFill);
+ FDE_CSSCURSOR ToCursor(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSPOSITION ToPosition(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSCAPTIONSIDE ToCaptionSide(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSBKGREPEAT ToBKGRepeat(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSBKGATTACHMENT ToBKGAttachment(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSRUBYALIGN ToRubyAlign(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSRUBYOVERHANG ToRubyOverhang(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSRUBYPOSITION ToRubyPosition(FDE_CSSPROPERTYVALUE eValue);
+ FDE_CSSRUBYSPAN ToRubySpan(FDE_CSSPROPERTYVALUE eValue);
+ IFX_FontMgr* m_pFontMgr;
+ FX_FLOAT m_fDefFontSize;
+ IFX_MEMAllocator* m_pRuleDataStore;
+ CFDE_CSSStyleSheetArray m_SheetGroups[FDE_CSSSTYLESHEETGROUP_MAX];
+ CFDE_CSSRuleCollection m_RuleCollection[FDE_CSSSTYLESHEETGROUP_MAX];
+ FDE_CSSSTYLESHEETGROUP m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_MAX];
+ IFX_MEMAllocator* m_pInlineStyleStore;
+ IFX_MEMAllocator* m_pFixedStyleStore;
+ CFDE_CSSAccelerator* m_pAccelerator;
+ std::vector<FDE_CSSRuleData*> m_MatchedRules;
+};
+
+struct FDE_CSSCOUNTERDATA {
+ public:
+ FDE_CSSCOUNTERDATA() { FXSYS_memset(this, 0, sizeof(FDE_CSSCOUNTERDATA)); }
+ FX_BOOL GetCounterIncrement(int32_t& iValue) {
+ iValue = m_iIncVal;
+ return m_bIncrement;
+ }
+ FX_BOOL GetCounterReset(int32_t& iValue) {
+ iValue = m_iResetVal;
+ return m_bReset;
+ }
+
+ const FX_WCHAR* m_pszIdent;
+ FX_BOOL m_bIncrement;
+ FX_BOOL m_bReset;
+ int32_t m_iIncVal;
+ int32_t m_iResetVal;
+};
+
+class CFDE_CSSCounterStyle {
+ public:
+ CFDE_CSSCounterStyle() : m_pCounterInc(NULL), m_pCounterReset(NULL) {}
+ void SetCounterIncrementList(IFDE_CSSValueList* pList) {
+ m_pCounterInc = pList;
+ m_bIndexDirty = TRUE;
+ }
+ void SetCounterResetList(IFDE_CSSValueList* pList) {
+ m_pCounterReset = pList;
+ m_bIndexDirty = TRUE;
+ }
+ int32_t CountCounters() {
+ UpdateIndex();
+ return m_arrCounterData.GetSize();
+ }
+ FX_BOOL GetCounterIncrement(int32_t index, int32_t& iValue) {
+ UpdateIndex();
+ return m_arrCounterData.ElementAt(index).GetCounterIncrement(iValue);
+ }
+ FX_BOOL GetCounterReset(int32_t index, int32_t& iValue) {
+ UpdateIndex();
+ return m_arrCounterData.ElementAt(index).GetCounterReset(iValue);
+ }
+ const FX_WCHAR* GetCounterIdentifier(int32_t index) {
+ UpdateIndex();
+ return m_arrCounterData.ElementAt(index).m_pszIdent;
+ }
+
+ protected:
+ void UpdateIndex();
+ void DoUpdateIndex(IFDE_CSSValueList* pList);
+ int32_t FindIndex(const FX_WCHAR* pszIdentifier);
+ IFDE_CSSValueList* m_pCounterInc;
+ IFDE_CSSValueList* m_pCounterReset;
+ CFX_ArrayTemplate<FDE_CSSCOUNTERDATA> m_arrCounterData;
+ FX_BOOL m_bIndexDirty;
+};
+class CFDE_CSSInheritedData {
+ public:
+ void Reset() {
+ FXSYS_memset(this, 0, sizeof(CFDE_CSSInheritedData));
+ m_LetterSpacing.Set(FDE_CSSLENGTHUNIT_Normal);
+ m_WordSpacing.Set(FDE_CSSLENGTHUNIT_Normal);
+ m_TextIndent.Set(FDE_CSSLENGTHUNIT_Point, 0);
+ m_fFontSize = 12.0f;
+ m_fLineHeight = 14.0f;
+ m_wFontWeight = 400;
+ m_dwFontColor = 0xFF000000;
+ m_iWidows = 2;
+ m_bTextEmphasisColorCurrent = TRUE;
+ m_iOrphans = 2;
+ }
+ const FX_WCHAR* m_pszListStyleImage;
+ FDE_CSSLENGTH m_LetterSpacing;
+ FDE_CSSLENGTH m_WordSpacing;
+ FDE_CSSLENGTH m_TextIndent;
+ IFDE_CSSValueList* m_pFontFamily;
+ IFDE_CSSValueList* m_pQuotes;
+ IFDE_CSSValueList* m_pCursorUris;
+ FDE_CSSCURSOR m_eCursor;
+ FX_FLOAT m_fFontSize;
+ FX_FLOAT m_fLineHeight;
+ FX_ARGB m_dwFontColor;
+ FX_ARGB m_dwTextEmphasisColor;
+ uint16_t m_wFontWeight;
+ int32_t m_iWidows;
+ int32_t m_iOrphans;
+ const FX_WCHAR* m_pszTextEmphasisCustomMark;
+ FX_DWORD m_eFontVariant : 1;
+ FX_DWORD m_eFontStyle : 1;
+ FX_DWORD m_bTextEmphasisColorCurrent : 1;
+ FX_DWORD m_eTextAligh : 2;
+ FX_DWORD m_eVisibility : 2;
+ FX_DWORD m_eWhiteSpace : 3;
+ FX_DWORD m_eTextTransform : 2;
+ FX_DWORD m_eWritingMode : 2;
+ FX_DWORD m_eWordBreak : 2;
+ FX_DWORD m_eLineBreak : 2;
+ FX_DWORD m_eTextEmphasisFill : 1;
+ FX_DWORD m_eTextEmphasisMark : 3;
+ FX_DWORD m_eCaptionSide : 3;
+
+ uint16_t m_eRubyAlign : 4;
+ uint16_t m_eRubyOverhang : 2;
+ uint16_t m_eRubyPosition : 2;
+};
+class CFDE_CSSNonInheritedData {
+ public:
+ void Reset() {
+ FXSYS_memset(this, 0, sizeof(CFDE_CSSNonInheritedData));
+ m_MarginWidth = m_BorderWidth =
+ m_PaddingWidth.Set(FDE_CSSLENGTHUNIT_Point, 0);
+ m_MinBoxSize.Set(FDE_CSSLENGTHUNIT_Point, 0);
+ m_MaxBoxSize.Set(FDE_CSSLENGTHUNIT_None);
+ m_eDisplay = FDE_CSSDISPLAY_Inline;
+ m_fVerticalAlign = 0.0f;
+ m_ColumnCount.Set(FDE_CSSLENGTHUNIT_Auto);
+ m_ColumnGap.Set(FDE_CSSLENGTHUNIT_Normal);
+ m_bColumnRuleColorSame = TRUE;
+ m_ColumnWidth.Set(FDE_CSSLENGTHUNIT_Auto);
+ m_ColumnRuleWidth.Set(FDE_CSSLENGTHUNIT_Auto);
+ m_eTextCombine = FDE_CSSTEXTCOMBINE_None;
+ }
+
+ IFDE_CSSValueList* m_pContentList;
+ CFDE_CSSCounterStyle* m_pCounterStyle;
+ FDE_CSSRECT m_MarginWidth;
+ FDE_CSSRECT m_BorderWidth;
+ FDE_CSSRECT m_PaddingWidth;
+ FDE_CSSSIZE m_BoxSize;
+ FDE_CSSSIZE m_MinBoxSize;
+ FDE_CSSSIZE m_MaxBoxSize;
+ FDE_CSSPOINT m_BKGPosition;
+ const FX_WCHAR* m_pszBKGImage;
+ FX_ARGB m_dwBKGColor;
+ FX_ARGB m_dwBDRLeftColor;
+ FX_ARGB m_dwBDRTopColor;
+ FX_ARGB m_dwBDRRightColor;
+ FX_ARGB m_dwBDRBottomColor;
+ IFDE_CSSValue* m_pRubySpan;
+ FDE_CSSLENGTH m_ColumnCount;
+ FDE_CSSLENGTH m_ColumnGap;
+ FDE_CSSLENGTH m_ColumnRuleWidth;
+ FDE_CSSLENGTH m_ColumnWidth;
+ FX_ARGB m_dwColumnRuleColor;
+ FDE_CSSLENGTH m_Top;
+ FDE_CSSLENGTH m_Bottom;
+ FDE_CSSLENGTH m_Left;
+ FDE_CSSLENGTH m_Right;
+
+ FX_FLOAT m_fVerticalAlign;
+ FX_FLOAT m_fTextCombineNumber;
+ FX_DWORD m_eBDRLeftStyle : 4;
+ FX_DWORD m_eBDRTopStyle : 4;
+ FX_DWORD m_eBDRRightStyle : 4;
+ FX_DWORD m_eBDRBottomStyle : 4;
+ FX_DWORD m_eDisplay : 5;
+ FX_DWORD m_eVerticalAlign : 4;
+ FX_DWORD m_eListStyleType : 5;
+ FX_DWORD m_eColumnRuleStyle : 4;
+ FX_DWORD m_ePageBreakInside : 3;
+ FX_DWORD m_ePageBreakAfter : 3;
+ FX_DWORD m_ePageBreakBefore : 3;
+ FX_DWORD m_ePosition : 2;
+ FX_DWORD m_eBKGRepeat : 2;
+ FX_DWORD m_eFloat : 2;
+ FX_DWORD m_eClear : 2;
+ FX_DWORD m_eOverflowX : 3;
+ FX_DWORD m_eOverflowY : 3;
+ FX_DWORD m_eListStylePosition : 1;
+ FX_DWORD m_eBKGAttachment : 1;
+ FX_DWORD m_bHasMargin : 1;
+ FX_DWORD m_bHasBorder : 1;
+ FX_DWORD m_bHasPadding : 1;
+ FX_DWORD m_dwTextDecoration : 5;
+ FX_DWORD m_eTextCombine : 1;
+ FX_DWORD m_bColumnRuleColorSame : 1;
+ FX_DWORD m_bHasTextCombineNumber : 1;
+};
+class CFDE_CSSComputedStyle : public IFDE_CSSComputedStyle,
+ public IFDE_CSSFontStyle,
+ public IFDE_CSSBoundaryStyle,
+ public IFDE_CSSPositionStyle,
+ public IFDE_CSSParagraphStyle,
+ public IFDE_CSSBackgroundStyle,
+ public IFDE_CSSVisualStyle,
+ public IFDE_CSSListStyle,
+ public IFDE_CSSMultiColumnStyle,
+ public IFDE_CSSGeneratedContentStyle,
+ public IFDE_CSSTableStyle,
+ public IFDE_CSSRubyStyle,
+ public CFX_Target {
+ public:
+ CFDE_CSSComputedStyle(IFX_MEMAllocator* pAlloc)
+ : m_dwRefCount(1), m_pAllocator(pAlloc) {}
+ ~CFDE_CSSComputedStyle() {}
+ virtual FX_DWORD AddRef() { return ++m_dwRefCount; }
+ virtual FX_DWORD Release() {
+ FX_DWORD dwRefCount = --m_dwRefCount;
+ if (dwRefCount == 0) {
+ if (m_NonInheritedData.m_pCounterStyle != NULL) {
+ delete m_NonInheritedData.m_pCounterStyle;
+ }
+ FXTARGET_DeleteWith(CFDE_CSSComputedStyle, m_pAllocator, this);
+ }
+ return dwRefCount;
+ }
+
+ virtual void Reset() {
+ m_InheritedData.Reset();
+ m_NonInheritedData.Reset();
+ }
+ virtual IFDE_CSSFontStyle* GetFontStyles() const {
+ return (IFDE_CSSFontStyle * const) this;
+ }
+ virtual IFDE_CSSBoundaryStyle* GetBoundaryStyles() const {
+ return (IFDE_CSSBoundaryStyle * const) this;
+ }
+ virtual IFDE_CSSPositionStyle* GetPositionStyles() const {
+ return (IFDE_CSSPositionStyle * const) this;
+ }
+ virtual IFDE_CSSParagraphStyle* GetParagraphStyles() const {
+ return (IFDE_CSSParagraphStyle * const) this;
+ }
+ virtual IFDE_CSSBackgroundStyle* GetBackgroundStyles() const {
+ return (IFDE_CSSBackgroundStyle * const) this;
+ }
+ virtual IFDE_CSSVisualStyle* GetVisualStyles() const {
+ return (IFDE_CSSVisualStyle * const) this;
+ }
+ virtual IFDE_CSSListStyle* GetListStyles() const {
+ return (IFDE_CSSListStyle * const) this;
+ }
+ virtual IFDE_CSSTableStyle* GetTableStyle() const {
+ return (IFDE_CSSTableStyle * const) this;
+ }
+ virtual IFDE_CSSMultiColumnStyle* GetMultiColumnStyle() const {
+ return (IFDE_CSSMultiColumnStyle * const) this;
+ }
+ virtual IFDE_CSSGeneratedContentStyle* GetGeneratedContentStyle() const {
+ return (IFDE_CSSGeneratedContentStyle * const) this;
+ }
+ virtual IFDE_CSSRubyStyle* GetRubyStyle() const {
+ return (IFDE_CSSRubyStyle * const) this;
+ }
+ virtual FX_BOOL GetCustomStyle(const CFX_WideStringC& wsName,
+ CFX_WideString& wsValue) const {
+ for (int32_t i = m_CustomProperties.GetSize() - 2; i > -1; i -= 2) {
+ if (wsName == m_CustomProperties[i]) {
+ wsValue = m_CustomProperties[i + 1];
+ return TRUE;
+ }
+ }
+ return FALSE;
+ }
+ virtual FDE_CSSRUBYALIGN GetRubyAlign() const {
+ return (FDE_CSSRUBYALIGN)m_InheritedData.m_eRubyAlign;
+ }
+ virtual FDE_CSSRUBYPOSITION GetRubyPosition() const {
+ return (FDE_CSSRUBYPOSITION)m_InheritedData.m_eRubyPosition;
+ }
+ virtual FDE_CSSRUBYOVERHANG GetRubyOverhang() const {
+ return (FDE_CSSRUBYOVERHANG)m_InheritedData.m_eRubyOverhang;
+ }
+ virtual FDE_CSSRUBYSPAN GetRubySpanType() const {
+ return m_NonInheritedData.m_pRubySpan == NULL ? FDE_CSSRUBYSPAN_None
+ : FDE_CSSRUBYSPAN_Attr;
+ }
+ virtual IFDE_CSSValue* GetRubySpanAttr() const {
+ return m_NonInheritedData.m_pRubySpan;
+ }
+ virtual FDE_CSSCAPTIONSIDE GetCaptionSide() const {
+ return (FDE_CSSCAPTIONSIDE)m_InheritedData.m_eCaptionSide;
+ }
+ virtual int32_t CountCounters() {
+ return (m_NonInheritedData.m_pCounterStyle == NULL)
+ ? 0
+ : m_NonInheritedData.m_pCounterStyle->CountCounters();
+ }
+ virtual const FX_WCHAR* GetCounterIdentifier(int32_t index) {
+ return m_NonInheritedData.m_pCounterStyle->GetCounterIdentifier(index);
+ }
+ virtual FX_BOOL GetCounterReset(int32_t index, int32_t& iValue) {
+ return m_NonInheritedData.m_pCounterStyle->GetCounterReset(index, iValue);
+ }
+ virtual FX_BOOL GetCounterIncrement(int32_t index, int32_t& iValue) {
+ return m_NonInheritedData.m_pCounterStyle->GetCounterIncrement(index,
+ iValue);
+ }
+ virtual IFDE_CSSValueList* GetContent() const {
+ return m_NonInheritedData.m_pContentList;
+ }
+ virtual int32_t CountQuotes() const {
+ return m_InheritedData.m_pQuotes == NULL
+ ? 0
+ : m_InheritedData.m_pQuotes->CountValues();
+ }
+ virtual const FX_WCHAR* GetQuotes(int32_t index) const {
+ FXSYS_assert(m_InheritedData.m_pQuotes != NULL &&
+ m_InheritedData.m_pQuotes->CountValues() > index);
+ return ((IFDE_CSSPrimitiveValue*)(m_InheritedData.m_pQuotes->GetValue(
+ index)))
+ ->GetString(index);
+ }
+ virtual const FDE_CSSLENGTH& GetColumnCount() const {
+ return m_NonInheritedData.m_ColumnCount;
+ }
+ virtual const FDE_CSSLENGTH& GetColumnGap() const {
+ return m_NonInheritedData.m_ColumnGap;
+ }
+ virtual FX_ARGB GetColumnRuleColor() const {
+ return m_NonInheritedData.m_bColumnRuleColorSame
+ ? m_InheritedData.m_dwFontColor
+ : m_NonInheritedData.m_dwColumnRuleColor;
+ }
+ virtual FDE_CSSBORDERSTYLE GetColumnRuleStyle() const {
+ return (FDE_CSSBORDERSTYLE)m_NonInheritedData.m_eColumnRuleStyle;
+ }
+ virtual const FDE_CSSLENGTH& GetColumnRuleWidth() const {
+ return m_NonInheritedData.m_ColumnRuleWidth;
+ }
+ virtual const FDE_CSSLENGTH& GetColumnWidth() const {
+ return m_NonInheritedData.m_ColumnWidth;
+ }
+ virtual void SetColumnCount(const FDE_CSSLENGTH& columnCount) {
+ m_NonInheritedData.m_ColumnCount = columnCount;
+ }
+ virtual void SetColumnGap(const FDE_CSSLENGTH& columnGap) {
+ m_NonInheritedData.m_ColumnGap = columnGap;
+ }
+ virtual void SetColumnRuleColor(FX_ARGB dwColumnRuleColor) {
+ m_NonInheritedData.m_dwColumnRuleColor = dwColumnRuleColor,
+ m_NonInheritedData.m_bColumnRuleColorSame = FALSE;
+ }
+ virtual void SetColumnRuleStyle(FDE_CSSBORDERSTYLE eColumnRuleStyle) {
+ m_NonInheritedData.m_eColumnRuleStyle = eColumnRuleStyle;
+ }
+ virtual void SetColumnRuleWidth(const FDE_CSSLENGTH& columnRuleWidth) {
+ m_NonInheritedData.m_ColumnRuleWidth = columnRuleWidth;
+ }
+ virtual void SetColumnWidth(const FDE_CSSLENGTH& columnWidth) {
+ m_NonInheritedData.m_ColumnWidth = columnWidth;
+ }
+ virtual int32_t CountFontFamilies() const {
+ return m_InheritedData.m_pFontFamily
+ ? m_InheritedData.m_pFontFamily->CountValues()
+ : 0;
+ }
+ virtual const FX_WCHAR* GetFontFamily(int32_t index) const {
+ return ((IFDE_CSSPrimitiveValue*)(m_InheritedData.m_pFontFamily->GetValue(
+ index)))
+ ->GetString(index);
+ }
+ virtual uint16_t GetFontWeight() const {
+ return m_InheritedData.m_wFontWeight;
+ }
+ virtual FDE_CSSFONTVARIANT GetFontVariant() const {
+ return (FDE_CSSFONTVARIANT)m_InheritedData.m_eFontVariant;
+ }
+ virtual FDE_CSSFONTSTYLE GetFontStyle() const {
+ return (FDE_CSSFONTSTYLE)m_InheritedData.m_eFontStyle;
+ }
+ virtual FX_FLOAT GetFontSize() const { return m_InheritedData.m_fFontSize; }
+ virtual FX_ARGB GetColor() const { return m_InheritedData.m_dwFontColor; }
+ virtual void SetFontWeight(uint16_t wFontWeight) {
+ m_InheritedData.m_wFontWeight = wFontWeight;
+ }
+ virtual void SetFontVariant(FDE_CSSFONTVARIANT eFontVariant) {
+ m_InheritedData.m_eFontVariant = eFontVariant;
+ }
+ virtual void SetFontStyle(FDE_CSSFONTSTYLE eFontStyle) {
+ m_InheritedData.m_eFontStyle = eFontStyle;
+ }
+ virtual void SetFontSize(FX_FLOAT fFontSize) {
+ m_InheritedData.m_fFontSize = fFontSize;
+ }
+ virtual void SetColor(FX_ARGB dwFontColor) {
+ m_InheritedData.m_dwFontColor = dwFontColor;
+ }
+ virtual FX_ARGB GetBorderLeftColor() const {
+ return m_NonInheritedData.m_dwBDRLeftColor;
+ }
+ virtual FX_ARGB GetBorderTopColor() const {
+ return m_NonInheritedData.m_dwBDRTopColor;
+ }
+ virtual FX_ARGB GetBorderRightColor() const {
+ return m_NonInheritedData.m_dwBDRRightColor;
+ }
+ virtual FX_ARGB GetBorderBottomColor() const {
+ return m_NonInheritedData.m_dwBDRBottomColor;
+ }
+
+ virtual FDE_CSSBORDERSTYLE GetBorderLeftStyle() const {
+ return (FDE_CSSBORDERSTYLE)m_NonInheritedData.m_eBDRLeftStyle;
+ }
+ virtual FDE_CSSBORDERSTYLE GetBorderTopStyle() const {
+ return (FDE_CSSBORDERSTYLE)m_NonInheritedData.m_eBDRTopStyle;
+ }
+ virtual FDE_CSSBORDERSTYLE GetBorderRightStyle() const {
+ return (FDE_CSSBORDERSTYLE)m_NonInheritedData.m_eBDRRightStyle;
+ }
+ virtual FDE_CSSBORDERSTYLE GetBorderBottomStyle() const {
+ return (FDE_CSSBORDERSTYLE)m_NonInheritedData.m_eBDRBottomStyle;
+ }
+
+ virtual const FDE_CSSRECT* GetBorderWidth() const {
+ return m_NonInheritedData.m_bHasBorder ? &(m_NonInheritedData.m_BorderWidth)
+ : NULL;
+ }
+ virtual const FDE_CSSRECT* GetMarginWidth() const {
+ return m_NonInheritedData.m_bHasMargin ? &(m_NonInheritedData.m_MarginWidth)
+ : NULL;
+ }
+ virtual const FDE_CSSRECT* GetPaddingWidth() const {
+ return m_NonInheritedData.m_bHasPadding
+ ? &(m_NonInheritedData.m_PaddingWidth)
+ : NULL;
+ }
+ virtual void SetBorderLeftColor(FX_ARGB dwBorderColor) {
+ m_NonInheritedData.m_dwBDRLeftColor = dwBorderColor;
+ }
+ virtual void SetBorderTopColor(FX_ARGB dwBorderColor) {
+ m_NonInheritedData.m_dwBDRTopColor = dwBorderColor;
+ }
+ virtual void SetBorderRightColor(FX_ARGB dwBorderColor) {
+ m_NonInheritedData.m_dwBDRRightColor = dwBorderColor;
+ }
+ virtual void SetBorderBottomColor(FX_ARGB dwBorderColor) {
+ m_NonInheritedData.m_dwBDRBottomColor = dwBorderColor;
+ }
+
+ virtual void SetBorderLeftStyle(FDE_CSSBORDERSTYLE eBorderStyle) {
+ m_NonInheritedData.m_eBDRLeftStyle = eBorderStyle;
+ }
+ virtual void SetBorderTopStyle(FDE_CSSBORDERSTYLE eBorderStyle) {
+ m_NonInheritedData.m_eBDRTopStyle = eBorderStyle;
+ }
+ virtual void SetBorderRightStyle(FDE_CSSBORDERSTYLE eBorderStyle) {
+ m_NonInheritedData.m_eBDRRightStyle = eBorderStyle;
+ }
+ virtual void SetBorderBottomStyle(FDE_CSSBORDERSTYLE eBorderStyle) {
+ m_NonInheritedData.m_eBDRBottomStyle = eBorderStyle;
+ }
+
+ virtual void SetBorderWidth(const FDE_CSSRECT& rect) {
+ m_NonInheritedData.m_BorderWidth = rect;
+ m_NonInheritedData.m_bHasBorder = TRUE;
+ }
+ virtual void SetMarginWidth(const FDE_CSSRECT& rect) {
+ m_NonInheritedData.m_MarginWidth = rect;
+ m_NonInheritedData.m_bHasMargin = TRUE;
+ }
+ virtual void SetPaddingWidth(const FDE_CSSRECT& rect) {
+ m_NonInheritedData.m_PaddingWidth = rect;
+ m_NonInheritedData.m_bHasPadding = TRUE;
+ }
+ virtual FDE_CSSDISPLAY GetDisplay() const {
+ return (FDE_CSSDISPLAY)m_NonInheritedData.m_eDisplay;
+ }
+ virtual const FDE_CSSSIZE& GetBoxSize() const {
+ return m_NonInheritedData.m_BoxSize;
+ }
+ virtual const FDE_CSSSIZE& GetMinBoxSize() const {
+ return m_NonInheritedData.m_MinBoxSize;
+ }
+ virtual const FDE_CSSSIZE& GetMaxBoxSize() const {
+ return m_NonInheritedData.m_MaxBoxSize;
+ }
+ virtual FDE_CSSFLOAT GetFloat() const {
+ return (FDE_CSSFLOAT)m_NonInheritedData.m_eFloat;
+ }
+ virtual FDE_CSSCLEAR GetClear() const {
+ return (FDE_CSSCLEAR)m_NonInheritedData.m_eClear;
+ }
+ virtual FDE_CSSPOSITION GetPosition() const {
+ return (FDE_CSSPOSITION)m_NonInheritedData.m_ePosition;
+ }
+ virtual FDE_CSSLENGTH GetTop() const { return m_NonInheritedData.m_Top; }
+ virtual FDE_CSSLENGTH GetBottom() const {
+ return m_NonInheritedData.m_Bottom;
+ }
+ virtual FDE_CSSLENGTH GetLeft() const { return m_NonInheritedData.m_Left; }
+ virtual FDE_CSSLENGTH GetRight() const { return m_NonInheritedData.m_Right; }
+
+ virtual void SetDisplay(FDE_CSSDISPLAY eDisplay) {
+ m_NonInheritedData.m_eDisplay = eDisplay;
+ }
+ virtual void SetBoxSize(const FDE_CSSSIZE& size) {
+ m_NonInheritedData.m_BoxSize = size;
+ }
+ virtual void SetMinBoxSize(const FDE_CSSSIZE& size) {
+ m_NonInheritedData.m_MinBoxSize = size;
+ }
+ virtual void SetMaxBoxSize(const FDE_CSSSIZE& size) {
+ m_NonInheritedData.m_MaxBoxSize = size;
+ }
+ virtual void SetFloat(FDE_CSSFLOAT eFloat) {
+ m_NonInheritedData.m_eFloat = eFloat;
+ }
+ virtual void SetClear(FDE_CSSCLEAR eClear) {
+ m_NonInheritedData.m_eClear = eClear;
+ }
+ virtual FX_FLOAT GetLineHeight() const {
+ return m_InheritedData.m_fLineHeight;
+ }
+ virtual FDE_CSSWHITESPACE GetWhiteSpace() const {
+ return (FDE_CSSWHITESPACE)m_InheritedData.m_eWhiteSpace;
+ }
+ virtual const FDE_CSSLENGTH& GetTextIndent() const {
+ return m_InheritedData.m_TextIndent;
+ }
+ virtual FDE_CSSTEXTALIGN GetTextAlign() const {
+ return (FDE_CSSTEXTALIGN)m_InheritedData.m_eTextAligh;
+ }
+ virtual FDE_CSSVERTICALALIGN GetVerticalAlign() const {
+ return (FDE_CSSVERTICALALIGN)m_NonInheritedData.m_eVerticalAlign;
+ }
+ virtual FX_FLOAT GetNumberVerticalAlign() const {
+ return m_NonInheritedData.m_fVerticalAlign;
+ }
+ virtual FDE_CSSTEXTTRANSFORM GetTextTransform() const {
+ return (FDE_CSSTEXTTRANSFORM)m_InheritedData.m_eTextTransform;
+ }
+ virtual FX_DWORD GetTextDecoration() const {
+ return m_NonInheritedData.m_dwTextDecoration;
+ }
+ virtual const FDE_CSSLENGTH& GetLetterSpacing() const {
+ return m_InheritedData.m_LetterSpacing;
+ }
+ virtual const FDE_CSSLENGTH& GetWordSpacing() const {
+ return m_InheritedData.m_WordSpacing;
+ }
+ virtual FDE_CSSWRITINGMODE GetWritingMode() const {
+ return (FDE_CSSWRITINGMODE)m_InheritedData.m_eWritingMode;
+ }
+ virtual FDE_CSSWORDBREAK GetWordBreak() const {
+ return (FDE_CSSWORDBREAK)m_InheritedData.m_eWordBreak;
+ }
+ virtual int32_t GetWidows() const { return m_InheritedData.m_iWidows; }
+ virtual FX_ARGB GetTextEmphasisColor() const {
+ return m_InheritedData.m_bTextEmphasisColorCurrent
+ ? m_InheritedData.m_dwFontColor
+ : m_InheritedData.m_dwTextEmphasisColor;
+ }
+ virtual FDE_CSSPAGEBREAK GetPageBreakBefore() const {
+ return (FDE_CSSPAGEBREAK)m_NonInheritedData.m_ePageBreakBefore;
+ }
+ virtual FDE_CSSPAGEBREAK GetPageBreakAfter() const {
+ return (FDE_CSSPAGEBREAK)m_NonInheritedData.m_ePageBreakAfter;
+ }
+ virtual FDE_CSSPAGEBREAK GetPageBreakInside() const {
+ return (FDE_CSSPAGEBREAK)m_NonInheritedData.m_ePageBreakInside;
+ }
+ virtual int32_t GetOrphans() const { return m_InheritedData.m_iOrphans; }
+ virtual FDE_CSSLINEBREAK GetLineBreak() const {
+ return (FDE_CSSLINEBREAK)m_InheritedData.m_eLineBreak;
+ }
+ virtual FDE_CSSTEXTEMPHASISMARK GetTextEmphasisMark() const;
+ virtual FDE_CSSTEXTEMPHASISFILL GetTextEmphasisFill() const {
+ return (FDE_CSSTEXTEMPHASISFILL)m_InheritedData.m_eTextEmphasisFill;
+ }
+ virtual const FX_WCHAR* GetTextEmphasisCustom() const {
+ FXSYS_assert(m_InheritedData.m_eTextEmphasisMark ==
+ FDE_CSSTEXTEMPHASISMARK_Custom);
+ return m_InheritedData.m_pszTextEmphasisCustomMark;
+ }
+ virtual FDE_CSSTEXTCOMBINE GetTextCombineType() const {
+ return (FDE_CSSTEXTCOMBINE)m_NonInheritedData.m_eTextCombine;
+ }
+ virtual FX_BOOL HasTextCombineNumber() const {
+ return m_NonInheritedData.m_bHasTextCombineNumber;
+ }
+ virtual FX_FLOAT GetTextCombineNumber() const {
+ FXSYS_assert(m_NonInheritedData.m_eTextCombine ==
+ FDE_CSSTEXTCOMBINE_Horizontal);
+ return m_NonInheritedData.m_fTextCombineNumber;
+ }
+ virtual void SetLineHeight(FX_FLOAT fLineHeight) {
+ m_InheritedData.m_fLineHeight = fLineHeight;
+ }
+ virtual void SetWhiteSpace(FDE_CSSWHITESPACE eWhiteSpace) {
+ m_InheritedData.m_eWhiteSpace = eWhiteSpace;
+ }
+ virtual void SetTextIndent(const FDE_CSSLENGTH& textIndent) {
+ m_InheritedData.m_TextIndent = textIndent;
+ }
+ virtual void SetTextAlign(FDE_CSSTEXTALIGN eTextAlign) {
+ m_InheritedData.m_eTextAligh = eTextAlign;
+ }
+ virtual void SetVerticalAlign(FDE_CSSVERTICALALIGN eVerticalAlign) {
+ m_NonInheritedData.m_eVerticalAlign = eVerticalAlign;
+ }
+ virtual void SetNumberVerticalAlign(FX_FLOAT fAlign) {
+ m_NonInheritedData.m_eVerticalAlign = FDE_CSSVERTICALALIGN_Number,
+ m_NonInheritedData.m_fVerticalAlign = fAlign;
+ }
+ virtual void SetTextTransform(FDE_CSSTEXTTRANSFORM eTextTransform) {
+ m_InheritedData.m_eTextTransform = eTextTransform;
+ }
+ virtual void SetTextDecoration(FX_DWORD dwTextDecoration) {
+ m_NonInheritedData.m_dwTextDecoration = dwTextDecoration;
+ }
+ virtual void SetLetterSpacing(const FDE_CSSLENGTH& letterSpacing) {
+ m_InheritedData.m_LetterSpacing = letterSpacing;
+ }
+ virtual void SetWordSpacing(const FDE_CSSLENGTH& wordSpacing) {
+ m_InheritedData.m_WordSpacing = wordSpacing;
+ }
+ virtual void SetWritingMode(FDE_CSSWRITINGMODE eWritingMode) {
+ m_InheritedData.m_eWritingMode = eWritingMode;
+ }
+ virtual void SetWordBreak(FDE_CSSWORDBREAK eWordBreak) {
+ m_InheritedData.m_eWordBreak = eWordBreak;
+ }
+ virtual void SetWidows(int32_t iWidows) {
+ m_InheritedData.m_iWidows = iWidows;
+ }
+ virtual void SetTextEmphasisColor(FX_ARGB dwTextEmphasisColor) {
+ m_InheritedData.m_dwTextEmphasisColor = dwTextEmphasisColor,
+ m_InheritedData.m_bTextEmphasisColorCurrent = FALSE;
+ }
+ virtual void SetPageBreakBefore(FDE_CSSPAGEBREAK ePageBreakBefore) {
+ m_NonInheritedData.m_ePageBreakBefore = ePageBreakBefore;
+ }
+ virtual void SetPageBreakAfter(FDE_CSSPAGEBREAK ePageBreakAfter) {
+ m_NonInheritedData.m_ePageBreakAfter = ePageBreakAfter;
+ }
+ virtual void SetPageBreakInside(FDE_CSSPAGEBREAK ePageBreakInside) {
+ m_NonInheritedData.m_ePageBreakInside = ePageBreakInside;
+ }
+ virtual void SetOrphans(int32_t iOrphans) {
+ m_InheritedData.m_iOrphans = iOrphans;
+ }
+ virtual void SetLineBreak(FDE_CSSLINEBREAK eLineBreak) {
+ m_InheritedData.m_eLineBreak = eLineBreak;
+ }
+ virtual FX_ARGB GetBKGColor() const {
+ return m_NonInheritedData.m_dwBKGColor;
+ }
+ virtual const FX_WCHAR* GetBKGImage() const {
+ return m_NonInheritedData.m_pszBKGImage;
+ }
+ virtual const FDE_CSSPOINT& GetBKGPosition() const {
+ return m_NonInheritedData.m_BKGPosition;
+ }
+ virtual FDE_CSSBKGREPEAT GetBKGRepeat() const {
+ return (FDE_CSSBKGREPEAT)m_NonInheritedData.m_eBKGRepeat;
+ }
+ virtual FDE_CSSBKGATTACHMENT GetBKGAttachment() const {
+ return (FDE_CSSBKGATTACHMENT)m_NonInheritedData.m_eBKGAttachment;
+ }
+ virtual void SetBKGColor(FX_ARGB dwBKGColor) {
+ m_NonInheritedData.m_dwBKGColor = dwBKGColor;
+ }
+ virtual void SetBKGPosition(const FDE_CSSPOINT& bkgPosition) {
+ m_NonInheritedData.m_BKGPosition = bkgPosition;
+ }
+ virtual FDE_CSSVISIBILITY GetVisibility() const {
+ return (FDE_CSSVISIBILITY)m_InheritedData.m_eVisibility;
+ }
+ virtual FDE_CSSOVERFLOW GetOverflowX() const {
+ return (FDE_CSSOVERFLOW)m_NonInheritedData.m_eOverflowX;
+ }
+ virtual FDE_CSSOVERFLOW GetOverflowY() const {
+ return (FDE_CSSOVERFLOW)m_NonInheritedData.m_eOverflowY;
+ }
+ virtual int32_t CountCursorUrls() const {
+ return m_InheritedData.m_pCursorUris == NULL
+ ? 0
+ : m_InheritedData.m_pCursorUris->CountValues();
+ }
+ virtual const FX_WCHAR* GetCursorUrl(int32_t index) const {
+ FXSYS_assert(m_InheritedData.m_pCursorUris != NULL);
+ return ((IFDE_CSSPrimitiveValue*)(m_InheritedData.m_pCursorUris->GetValue(
+ index)))
+ ->GetString(index);
+ }
+ virtual FDE_CSSCURSOR GetCursorType() const {
+ return m_InheritedData.m_eCursor;
+ }
+ virtual void SetVisibility(FDE_CSSVISIBILITY eVisibility) {
+ m_InheritedData.m_eVisibility = eVisibility;
+ }
+ virtual FDE_CSSLISTSTYLETYPE GetListStyleType() const {
+ return (FDE_CSSLISTSTYLETYPE)m_NonInheritedData.m_eListStyleType;
+ }
+ virtual FDE_CSSLISTSTYLEPOSITION GetListStylePosition() const {
+ return (FDE_CSSLISTSTYLEPOSITION)m_NonInheritedData.m_eListStylePosition;
+ }
+ virtual const FX_WCHAR* GetListStyleImage() const {
+ return m_InheritedData.m_pszListStyleImage;
+ }
+ virtual void SetListStyleType(FDE_CSSLISTSTYLETYPE eListStyleType) {
+ m_NonInheritedData.m_eListStyleType = eListStyleType;
+ }
+ virtual void SetListStylePosition(
+ FDE_CSSLISTSTYLEPOSITION eListStylePosition) {
+ m_NonInheritedData.m_eListStylePosition = eListStylePosition;
+ }
+ void AddCustomStyle(const CFX_WideString& wsName,
+ const CFX_WideString& wsValue) {
+ m_CustomProperties.Add(wsName);
+ m_CustomProperties.Add(wsValue);
+ }
+ FX_DWORD m_dwRefCount;
+ IFX_MEMAllocator* m_pAllocator;
+ CFDE_CSSInheritedData m_InheritedData;
+ CFDE_CSSNonInheritedData m_NonInheritedData;
+ CFX_WideStringArray m_CustomProperties;
+};
+
+#endif // XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_
diff --git a/xfa/fde/css/fde_css.h b/xfa/fde/css/fde_css.h
index 4c3e253167..791620071d 100644
--- a/xfa/fde/css/fde_css.h
+++ b/xfa/fde/css/fde_css.h
@@ -443,17 +443,17 @@ class IFDE_CSSStyleSheet : public IFX_Unknown {
static IFDE_CSSStyleSheet* LoadFromStream(
const CFX_WideString& szUrl,
IFX_Stream* pStream,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL);
static IFDE_CSSStyleSheet* LoadFromBuffer(
const CFX_WideString& szUrl,
const FX_WCHAR* pBuffer,
int32_t iBufSize,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL);
virtual FX_BOOL GetUrl(CFX_WideString& szUrl) = 0;
virtual FX_DWORD GetMediaList() const = 0;
- virtual FX_WORD GetCodePage() const = 0;
+ virtual uint16_t GetCodePage() const = 0;
virtual int32_t CountRules() const = 0;
virtual IFDE_CSSRule* GetRule(int32_t index) = 0;
@@ -866,12 +866,12 @@ class IFDE_CSSFontStyle {
virtual ~IFDE_CSSFontStyle() {}
virtual int32_t CountFontFamilies() const = 0;
virtual const FX_WCHAR* GetFontFamily(int32_t index) const = 0;
- virtual FX_WORD GetFontWeight() const = 0;
+ virtual uint16_t GetFontWeight() const = 0;
virtual FDE_CSSFONTVARIANT GetFontVariant() const = 0;
virtual FDE_CSSFONTSTYLE GetFontStyle() const = 0;
virtual FX_FLOAT GetFontSize() const = 0;
virtual FX_ARGB GetColor() const = 0;
- virtual void SetFontWeight(FX_WORD wFontWeight) = 0;
+ virtual void SetFontWeight(uint16_t wFontWeight) = 0;
virtual void SetFontVariant(FDE_CSSFONTVARIANT eFontVariant) = 0;
virtual void SetFontStyle(FDE_CSSFONTSTYLE eFontStyle) = 0;
virtual void SetFontSize(FX_FLOAT fFontSize) = 0;
diff --git a/xfa/fde/css/fde_cssdatatable.cpp b/xfa/fde/css/fde_cssdatatable.cpp
index ef09e99baf..8f448d8536 100644
--- a/xfa/fde/css/fde_cssdatatable.cpp
+++ b/xfa/fde/css/fde_cssdatatable.cpp
@@ -609,11 +609,11 @@ FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByEnum(
FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(const FX_WCHAR* pszName,
int32_t iLength) {
FXSYS_assert(pszName != NULL && iLength > 0);
- FX_WORD wHash = (FX_WORD)FX_HashCode_String_GetW(pszName, iLength, TRUE);
+ uint16_t wHash = (uint16_t)FX_HashCode_String_GetW(pszName, iLength, TRUE);
int32_t iEnd =
sizeof(g_FDE_CSSMediaTypes) / sizeof(FDE_CSSMEDIATYPETABLE) - 1;
int32_t iMid, iStart = 0;
- FX_WORD uMid;
+ uint16_t uMid;
do {
iMid = (iStart + iEnd) / 2;
uMid = g_FDE_CSSMediaTypes[iMid].wHash;
@@ -630,11 +630,11 @@ FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(const FX_WCHAR* pszName,
FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(const FX_WCHAR* pszName,
int32_t iLength) {
FXSYS_assert(pszName != NULL && iLength > 0);
- FX_WORD wHash = (FX_WORD)FX_HashCode_String_GetW(pszName, iLength, TRUE);
+ uint16_t wHash = (uint16_t)FX_HashCode_String_GetW(pszName, iLength, TRUE);
int32_t iEnd =
sizeof(g_FDE_CSSLengthUnits) / sizeof(FDE_CSSLENGTHUNITTABLE) - 1;
int32_t iMid, iStart = 0;
- FX_WORD wMid;
+ uint16_t wMid;
do {
iMid = (iStart + iEnd) / 2;
wMid = g_FDE_CSSLengthUnits[iMid].wHash;
diff --git a/xfa/fde/css/fde_cssdatatable.h b/xfa/fde/css/fde_cssdatatable.h
index ef7e0dc704..c96520a670 100644
--- a/xfa/fde/css/fde_cssdatatable.h
+++ b/xfa/fde/css/fde_cssdatatable.h
@@ -153,15 +153,15 @@ FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName(
FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByEnum(
FDE_CSSPROPERTYVALUE eName);
struct FDE_CSSMEDIATYPETABLE {
- FX_WORD wHash;
- FX_WORD wValue;
+ uint16_t wHash;
+ uint16_t wValue;
};
typedef FDE_CSSMEDIATYPETABLE const* FDE_LPCCSSMEDIATYPETABLE;
FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(const FX_WCHAR* pszName,
int32_t iLength);
struct FDE_CSSLENGTHUNITTABLE {
- FX_WORD wHash;
- FX_WORD wValue;
+ uint16_t wHash;
+ uint16_t wValue;
};
typedef FDE_CSSLENGTHUNITTABLE const* FDE_LPCCSSLENGTHUNITTABLE;
FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(const FX_WCHAR* pszName,
diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp
index ca3a01c4c7..ebf2d262c1 100644
--- a/xfa/fde/css/fde_cssstyleselector.cpp
+++ b/xfa/fde/css/fde_cssstyleselector.cpp
@@ -1523,7 +1523,7 @@ FDE_CSSTEXTALIGN CFDE_CSSStyleSelector::ToTextAlign(
return FDE_CSSTEXTALIGN_Left;
}
}
-FX_WORD CFDE_CSSStyleSelector::ToFontWeight(FDE_CSSPROPERTYVALUE eValue) {
+uint16_t CFDE_CSSStyleSelector::ToFontWeight(FDE_CSSPROPERTYVALUE eValue) {
switch (eValue) {
case FDE_CSSPROPERTYVALUE_Normal:
return 400;
diff --git a/xfa/fde/css/fde_cssstyleselector.h b/xfa/fde/css/fde_cssstyleselector.h
index 4f8177f5c5..5016e8f5cb 100644
--- a/xfa/fde/css/fde_cssstyleselector.h
+++ b/xfa/fde/css/fde_cssstyleselector.h
@@ -144,7 +144,7 @@ class CFDE_CSSStyleSelector : public IFDE_CSSStyleSelector, public CFX_Target {
FX_FLOAT ToFontSize(FDE_CSSPROPERTYVALUE eValue, FX_FLOAT fCurFontSize);
FDE_CSSDISPLAY ToDisplay(FDE_CSSPROPERTYVALUE eValue);
FDE_CSSTEXTALIGN ToTextAlign(FDE_CSSPROPERTYVALUE eValue);
- FX_WORD ToFontWeight(FDE_CSSPROPERTYVALUE eValue);
+ uint16_t ToFontWeight(FDE_CSSPROPERTYVALUE eValue);
FDE_CSSFONTSTYLE ToFontStyle(FDE_CSSPROPERTYVALUE eValue);
FDE_CSSBORDERSTYLE ToBorderStyle(FDE_CSSPROPERTYVALUE eValue);
FDE_CSSVERTICALALIGN ToVerticalAlign(FDE_CSSPROPERTYVALUE eValue);
@@ -271,27 +271,26 @@ class CFDE_CSSInheritedData {
FX_FLOAT m_fLineHeight;
FX_ARGB m_dwFontColor;
FX_ARGB m_dwTextEmphasisColor;
- FX_WORD m_wFontWeight;
+ uint16_t m_wFontWeight;
int32_t m_iWidows;
int32_t m_iOrphans;
const FX_WCHAR* m_pszTextEmphasisCustomMark;
- FX_WORD m_eFontVariant : 1;
- FX_WORD m_eFontStyle : 1;
- FX_WORD m_bTextEmphasisColorCurrent : 1;
- FX_WORD m_eTextAligh : 2;
- FX_WORD m_eVisibility : 2;
- FX_WORD m_eWhiteSpace : 3;
- FX_WORD m_eTextTransform : 2;
- FX_WORD m_eWritingMode : 2;
- FX_WORD m_eWordBreak : 2;
- FX_WORD m_eLineBreak : 2;
- FX_WORD m_eTextEmphasisFill : 1;
- FX_WORD m_eTextEmphasisMark : 3;
- FX_WORD m_eCaptionSide : 3;
-
- FX_WORD m_eRubyAlign : 4;
- FX_WORD m_eRubyOverhang : 2;
- FX_WORD m_eRubyPosition : 2;
+ uint32_t m_eFontVariant : 1;
+ uint32_t m_eFontStyle : 1;
+ uint32_t m_bTextEmphasisColorCurrent : 1;
+ uint32_t m_eTextAligh : 2;
+ uint32_t m_eVisibility : 2;
+ uint32_t m_eWhiteSpace : 3;
+ uint32_t m_eTextTransform : 2;
+ uint32_t m_eWritingMode : 2;
+ uint32_t m_eWordBreak : 2;
+ uint32_t m_eLineBreak : 2;
+ uint32_t m_eTextEmphasisFill : 1;
+ uint32_t m_eTextEmphasisMark : 3;
+ uint32_t m_eCaptionSide : 3;
+ uint8_t m_eRubyAlign : 4;
+ uint8_t m_eRubyOverhang : 2;
+ uint8_t m_eRubyPosition : 2;
};
class CFDE_CSSNonInheritedData {
public:
@@ -540,7 +539,7 @@ class CFDE_CSSComputedStyle : public IFDE_CSSComputedStyle,
index)))
->GetString(index);
}
- virtual FX_WORD GetFontWeight() const {
+ virtual uint16_t GetFontWeight() const {
return m_InheritedData.m_wFontWeight;
}
virtual FDE_CSSFONTVARIANT GetFontVariant() const {
@@ -551,7 +550,7 @@ class CFDE_CSSComputedStyle : public IFDE_CSSComputedStyle,
}
virtual FX_FLOAT GetFontSize() const { return m_InheritedData.m_fFontSize; }
virtual FX_ARGB GetColor() const { return m_InheritedData.m_dwFontColor; }
- virtual void SetFontWeight(FX_WORD wFontWeight) {
+ virtual void SetFontWeight(uint16_t wFontWeight) {
m_InheritedData.m_wFontWeight = wFontWeight;
}
virtual void SetFontVariant(FDE_CSSFONTVARIANT eFontVariant) {
diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp
index 561b2f42f3..e0f8fa6cdf 100644
--- a/xfa/fde/css/fde_cssstylesheet.cpp
+++ b/xfa/fde/css/fde_cssstylesheet.cpp
@@ -48,7 +48,7 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadHTMLStandardStyleSheet() {
IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromStream(
const CFX_WideString& szUrl,
IFX_Stream* pStream,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwMediaList) {
CFDE_CSSStyleSheet* pStyleSheet = new CFDE_CSSStyleSheet(dwMediaList);
if (!pStyleSheet->LoadFromStream(szUrl, pStream, wCodePage)) {
@@ -61,7 +61,7 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromBuffer(
const CFX_WideString& szUrl,
const FX_WCHAR* pBuffer,
int32_t iBufSize,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwMediaList) {
CFDE_CSSStyleSheet* pStyleSheet = new CFDE_CSSStyleSheet(dwMediaList);
if (!pStyleSheet->LoadFromBuffer(szUrl, pBuffer, iBufSize, wCodePage)) {
@@ -124,7 +124,7 @@ IFDE_CSSRule* CFDE_CSSStyleSheet::GetRule(int32_t index) {
}
FX_BOOL CFDE_CSSStyleSheet::LoadFromStream(const CFX_WideString& szUrl,
IFX_Stream* pStream,
- FX_WORD wCodePage) {
+ uint16_t wCodePage) {
FXSYS_assert(pStream != NULL);
IFDE_CSSSyntaxParser* pSyntax = IFDE_CSSSyntaxParser::Create();
if (pSyntax == NULL) {
@@ -142,7 +142,7 @@ FX_BOOL CFDE_CSSStyleSheet::LoadFromStream(const CFX_WideString& szUrl,
FX_BOOL CFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString& szUrl,
const FX_WCHAR* pBuffer,
int32_t iBufSize,
- FX_WORD wCodePage) {
+ uint16_t wCodePage) {
FXSYS_assert(pBuffer != NULL && iBufSize > 0);
IFDE_CSSSyntaxParser* pSyntax = IFDE_CSSSyntaxParser::Create();
if (pSyntax == NULL) {
diff --git a/xfa/fde/css/fde_cssstylesheet.h b/xfa/fde/css/fde_cssstylesheet.h
index f39ff1f22a..e6f4f2904d 100644
--- a/xfa/fde/css/fde_cssstylesheet.h
+++ b/xfa/fde/css/fde_cssstylesheet.h
@@ -106,16 +106,16 @@ class CFDE_CSSStyleSheet : public IFDE_CSSStyleSheet, public CFX_Target {
return szUrl.GetLength() > 0;
}
virtual FX_DWORD GetMediaList() const { return m_dwMediaList; }
- virtual FX_WORD GetCodePage() const { return m_wCodePage; }
+ virtual uint16_t GetCodePage() const { return m_wCodePage; }
virtual int32_t CountRules() const;
virtual IFDE_CSSRule* GetRule(int32_t index);
FX_BOOL LoadFromStream(const CFX_WideString& szUrl,
IFX_Stream* pStream,
- FX_WORD wCodePage);
+ uint16_t wCodePage);
FX_BOOL LoadFromBuffer(const CFX_WideString& szUrl,
const FX_WCHAR* pBuffer,
int32_t iBufSize,
- FX_WORD wCodePage);
+ uint16_t wCodePage);
protected:
void Reset();
@@ -128,8 +128,8 @@ class CFDE_CSSStyleSheet : public IFDE_CSSStyleSheet, public CFX_Target {
FDE_CSSSYNTAXSTATUS LoadFontFaceRule(IFDE_CSSSyntaxParser* pSyntax,
CFDE_CSSRuleArray& ruleArray);
FDE_CSSSYNTAXSTATUS SkipRuleSet(IFDE_CSSSyntaxParser* pSyntax);
- FX_WORD m_wCodePage;
- FX_WORD m_wRefCount;
+ uint16_t m_wCodePage;
+ uint16_t m_wRefCount;
FX_DWORD m_dwMediaList;
IFX_MEMAllocator* m_pAllocator;
CFDE_CSSRuleArray m_RuleArray;
diff --git a/xfa/fde/css/fde_csssyntax.cpp b/xfa/fde/css/fde_csssyntax.cpp
index e03c57c6a8..2d0d972f77 100644
--- a/xfa/fde/css/fde_csssyntax.cpp
+++ b/xfa/fde/css/fde_csssyntax.cpp
@@ -337,7 +337,7 @@ FDE_CSSSYNTAXSTATUS CFDE_CSSSyntaxParser::DoSyntaxParse() {
DisableCharset();
if (m_iTextDatLen > 0) {
if (m_pStream != NULL) {
- FX_WORD wCodePage = FX_GetCodePageFormStringW(
+ uint16_t wCodePage = FX_GetCodePageFormStringW(
m_TextData.GetBuffer(), m_iTextDatLen);
if (wCodePage < 0xFFFF &&
m_pStream->GetCodePage() != wCodePage) {
diff --git a/xfa/fde/xml/fde_xml_imp.cpp b/xfa/fde/xml/fde_xml_imp.cpp
index 731f88db40..3e0c87f821 100644
--- a/xfa/fde/xml/fde_xml_imp.cpp
+++ b/xfa/fde/xml/fde_xml_imp.cpp
@@ -388,7 +388,7 @@ void CFDE_XMLNode::SaveXMLNode(IFX_Stream* pXMLStream) {
CFDE_XMLInstruction* pInstruction = (CFDE_XMLInstruction*)pNode;
if (pInstruction->m_wsTarget.CompareNoCase(L"xml") == 0) {
ws = L"<?xml version=\"1.0\" encoding=\"";
- FX_WORD wCodePage = pXMLStream->GetCodePage();
+ uint16_t wCodePage = pXMLStream->GetCodePage();
if (wCodePage == FX_CODEPAGE_UTF16LE) {
ws += L"UTF-16";
} else if (wCodePage == FX_CODEPAGE_UTF16BE) {
@@ -914,7 +914,7 @@ FX_BOOL CFDE_XMLDoc::LoadXML(IFX_Stream* pXMLStream,
iTextDataSize = 128;
}
m_pStream = pXMLStream;
- FX_WORD wCodePage = m_pStream->GetCodePage();
+ uint16_t wCodePage = m_pStream->GetCodePage();
if (wCodePage != FX_CODEPAGE_UTF16LE && wCodePage != FX_CODEPAGE_UTF16BE &&
wCodePage != FX_CODEPAGE_UTF8) {
m_pStream->SetCodePage(FX_CODEPAGE_UTF8);
@@ -958,7 +958,7 @@ void CFDE_XMLDoc::SaveXMLNode(IFX_Stream* pXMLStream, IFDE_XMLNode* pINode) {
CFDE_XMLInstruction* pInstruction = (CFDE_XMLInstruction*)pNode;
if (pInstruction->m_wsTarget.CompareNoCase(L"xml") == 0) {
ws = L"<?xml version=\"1.0\" encoding=\"";
- FX_WORD wCodePage = pXMLStream->GetCodePage();
+ uint16_t wCodePage = pXMLStream->GetCodePage();
if (wCodePage == FX_CODEPAGE_UTF16LE) {
ws += L"UTF-16";
} else if (wCodePage == FX_CODEPAGE_UTF16BE) {
@@ -1067,7 +1067,7 @@ void CFDE_XMLDoc::SaveXML(IFX_Stream* pXMLStream, FX_BOOL bSaveBOM) {
}
FXSYS_assert((pXMLStream->GetAccessModes() & FX_STREAMACCESS_Text) != 0);
FXSYS_assert((pXMLStream->GetAccessModes() & FX_STREAMACCESS_Write) != 0);
- FX_WORD wCodePage = pXMLStream->GetCodePage();
+ uint16_t wCodePage = pXMLStream->GetCodePage();
if (wCodePage != FX_CODEPAGE_UTF16LE && wCodePage != FX_CODEPAGE_UTF16BE &&
wCodePage != FX_CODEPAGE_UTF8) {
wCodePage = FX_CODEPAGE_UTF8;
diff --git a/xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp b/xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp
index d1b079edb1..6b8ae806d6 100644
--- a/xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp
+++ b/xfa/fee/fx_wordbreak/fx_wordbreak_impl.cpp
@@ -158,8 +158,8 @@ FX_BOOL CFX_WordBreak::FindNextBreakPos(IFX_CharIter* pIter,
pIter->Next(bPrev);
FX_WCHAR wcTemp = pIter->GetChar();
eNextType = FX_GetWordBreakProperty(wcTemp);
- FX_WORD wBreak =
- gs_FX_WordBreak_Table[eCurType] & ((FX_WORD)(1 << eNextType));
+ uint16_t wBreak =
+ gs_FX_WordBreak_Table[eCurType] & ((uint16_t)(1 << eNextType));
if (wBreak) {
if (pIter->IsEOF(!bPrev)) {
pIter->Next(!bPrev);
diff --git a/xfa/fee/fx_wordbreak/fx_wordbreak_impl.h b/xfa/fee/fx_wordbreak/fx_wordbreak_impl.h
index 95f5a43eb0..e7421ca1af 100644
--- a/xfa/fee/fx_wordbreak/fx_wordbreak_impl.h
+++ b/xfa/fee/fx_wordbreak/fx_wordbreak_impl.h
@@ -15,7 +15,7 @@
#include "xfa/fee/fx_wordbreak/fx_wordbreak_impl.h"
#include "xfa/fee/ifde_txtedtengine.h"
-extern const FX_WORD gs_FX_WordBreak_Table[16];
+extern const uint16_t gs_FX_WordBreak_Table[16];
extern const uint8_t gs_FX_WordBreak_CodePointProperties[(0xFFFF - 1) / 2 + 1];
enum FX_WordBreakProp {
FX_WordBreakProp_None = 0,
diff --git a/xfa/fee/fx_wordbreak/fx_wordbreakdata.cpp b/xfa/fee/fx_wordbreak/fx_wordbreakdata.cpp
index ffb4889954..b632d5fafc 100644
--- a/xfa/fee/fx_wordbreak/fx_wordbreakdata.cpp
+++ b/xfa/fee/fx_wordbreak/fx_wordbreakdata.cpp
@@ -6,7 +6,7 @@
#include "xfa/fee/fx_wordbreak/fx_wordbreak_impl.h"
-const FX_WORD gs_FX_WordBreak_Table[16] = {
+const uint16_t gs_FX_WordBreak_Table[16] = {
0xFFFF, 0xFFF9, 0xFFFB, 0xFFFB, 0xFFFB, 0xFFFB, 0xEFBB, 0xE77B,
0xFFFB, 0xFFFB, 0xFFFB, 0xE77B, 0xE73B, 0xFFFB, 0xFFFB, 0xFFFB,
};
diff --git a/xfa/fgas/crt/fgas_codepage.cpp b/xfa/fgas/crt/fgas_codepage.cpp
index e717873abe..dcf3dfa690 100644
--- a/xfa/fgas/crt/fgas_codepage.cpp
+++ b/xfa/fgas/crt/fgas_codepage.cpp
@@ -17,7 +17,7 @@ static const FX_CHARSET_MAP g_FXCharset2CodePageTable[] = {
{186, 1257}, {204, 1251}, {222, 874}, {238, 1250}, {254, 437},
{255, 850},
};
-FX_WORD FX_GetCodePageFromCharset(uint8_t charset) {
+uint16_t FX_GetCodePageFromCharset(uint8_t charset) {
int32_t iEnd = sizeof(g_FXCharset2CodePageTable) / sizeof(FX_CHARSET_MAP) - 1;
FXSYS_assert(iEnd >= 0);
int32_t iStart = 0, iMid;
@@ -43,7 +43,7 @@ static const FX_CHARSET_MAP g_FXCodepage2CharsetTable[] = {
{84, 10004}, {85, 10006}, {86, 10081}, {87, 10021}, {88, 10029},
{89, 10007},
};
-FX_WORD FX_GetCharsetFromCodePage(FX_WORD codepage) {
+uint16_t FX_GetCharsetFromCodePage(uint16_t codepage) {
int32_t iEnd = sizeof(g_FXCodepage2CharsetTable) / sizeof(FX_CHARSET_MAP) - 1;
FXSYS_assert(iEnd >= 0);
int32_t iStart = 0, iMid;
@@ -197,7 +197,7 @@ const FX_LANG2CPMAP g_FXLang2CodepageTable[] = {
{FX_LANG_Spanish_Nicaragua, FX_CODEPAGE_MSWin_WesternEuropean},
{FX_LANG_Spanish_PuertoRico, FX_CODEPAGE_MSWin_WesternEuropean},
};
-FX_WORD FX_GetDefCodePageByLanguage(FX_WORD wLanguage) {
+uint16_t FX_GetDefCodePageByLanguage(uint16_t wLanguage) {
int32_t iEnd = sizeof(g_FXLang2CodepageTable) / sizeof(FX_LANG2CPMAP) - 1;
FXSYS_assert(iEnd >= 0);
int32_t iStart = 0, iMid;
@@ -301,7 +301,7 @@ static const FX_STR2CPHASH g_FXCPHashTable[] = {
{0xf3d463c2, 0x3a4}, {0xf52a70a3, 0xc42e}, {0xf5693147, 0x6fb3},
{0xf637e157, 0x478}, {0xfc213f3a, 0x2717}, {0xff654d14, 0x3b5},
};
-FX_WORD FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength) {
+uint16_t FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength) {
FXSYS_assert(pStr != NULL);
if (iLength < 0) {
iLength = FXSYS_strlen(pStr);
@@ -317,7 +317,7 @@ FX_WORD FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength) {
iMid = (iStart + iEnd) / 2;
const FX_STR2CPHASH& cp = g_FXCPHashTable[iMid];
if (uHash == cp.uHash) {
- return (FX_WORD)cp.uCodePage;
+ return (uint16_t)cp.uCodePage;
} else if (uHash < cp.uHash) {
iEnd = iMid - 1;
} else {
@@ -326,7 +326,7 @@ FX_WORD FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength) {
} while (iStart <= iEnd);
return 0xFFFF;
}
-FX_WORD FX_GetCodePageFormStringW(const FX_WCHAR* pStr, int32_t iLength) {
+uint16_t FX_GetCodePageFormStringW(const FX_WCHAR* pStr, int32_t iLength) {
if (iLength < 0) {
iLength = FXSYS_wcslen(pStr);
}
diff --git a/xfa/fgas/crt/fgas_codepage.h b/xfa/fgas/crt/fgas_codepage.h
index ec01816386..fe69f7ce93 100644
--- a/xfa/fgas/crt/fgas_codepage.h
+++ b/xfa/fgas/crt/fgas_codepage.h
@@ -133,24 +133,24 @@
#define FX_CHARSET_US 254
#define FX_CHARSET_OEM 255
-FX_WORD FX_GetCodePageFromCharset(uint8_t charset);
-FX_WORD FX_GetCharsetFromCodePage(FX_WORD codepage);
-FX_WORD FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength);
-FX_WORD FX_GetCodePageFormStringW(const FX_WCHAR* pStr, int32_t iLength);
-FX_WORD FX_GetDefCodePageByLanguage(FX_WORD wLanguage);
+uint16_t FX_GetCodePageFromCharset(uint8_t charset);
+uint16_t FX_GetCharsetFromCodePage(uint16_t codepage);
+uint16_t FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength);
+uint16_t FX_GetCodePageFormStringW(const FX_WCHAR* pStr, int32_t iLength);
+uint16_t FX_GetDefCodePageByLanguage(uint16_t wLanguage);
void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength);
void FX_SwapByteOrderCopy(const FX_WCHAR* pSrc,
FX_WCHAR* pDst,
int32_t iLength);
void FX_UTF16ToWChar(void* pBuffer, int32_t iLength);
-void FX_UTF16ToWCharCopy(const FX_WORD* pUTF16,
+void FX_UTF16ToWCharCopy(const uint16_t* pUTF16,
FX_WCHAR* pWChar,
int32_t iLength);
void FX_WCharToUTF16(void* pBuffer, int32_t iLength);
void FX_WCharToUTF16Copy(const FX_WCHAR* pWChar,
- FX_WORD* pUTF16,
+ uint16_t* pUTF16,
int32_t iLength);
-int32_t FX_DecodeString(FX_WORD wCodePage,
+int32_t FX_DecodeString(uint16_t wCodePage,
const FX_CHAR* pSrc,
int32_t* pSrcLen,
FX_WCHAR* pDst,
diff --git a/xfa/fgas/crt/fgas_encode.cpp b/xfa/fgas/crt/fgas_encode.cpp
index 138b4b1f5e..7d04e58131 100644
--- a/xfa/fgas/crt/fgas_encode.cpp
+++ b/xfa/fgas/crt/fgas_encode.cpp
@@ -11,17 +11,17 @@ void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength) {
if (iLength < 0) {
iLength = FXSYS_wcslen(pStr);
}
- FX_WORD wch;
+ uint16_t wch;
if (sizeof(FX_WCHAR) > 2) {
while (iLength-- > 0) {
- wch = (FX_WORD)*pStr;
+ wch = (uint16_t)*pStr;
wch = (wch >> 8) | (wch << 8);
wch &= 0x00FF;
*pStr++ = wch;
}
} else {
while (iLength-- > 0) {
- wch = (FX_WORD)*pStr;
+ wch = (uint16_t)*pStr;
wch = (wch >> 8) | (wch << 8);
*pStr++ = wch;
}
@@ -34,17 +34,17 @@ void FX_SwapByteOrderCopy(const FX_WCHAR* pSrc,
if (iLength < 0) {
iLength = FXSYS_wcslen(pSrc);
}
- FX_WORD wch;
+ uint16_t wch;
if (sizeof(FX_WCHAR) > 2) {
while (iLength-- > 0) {
- wch = (FX_WORD)*pSrc++;
+ wch = (uint16_t)*pSrc++;
wch = (wch >> 8) | (wch << 8);
wch &= 0x00FF;
*pDst++ = wch;
}
} else {
while (iLength-- > 0) {
- wch = (FX_WORD)*pSrc++;
+ wch = (uint16_t)*pSrc++;
wch = (wch >> 8) | (wch << 8);
*pDst++ = wch;
}
@@ -55,13 +55,13 @@ void FX_UTF16ToWChar(void* pBuffer, int32_t iLength) {
if (sizeof(FX_WCHAR) == 2) {
return;
}
- FX_WORD* pSrc = (FX_WORD*)pBuffer;
+ uint16_t* pSrc = (uint16_t*)pBuffer;
FX_WCHAR* pDst = (FX_WCHAR*)pBuffer;
while (--iLength >= 0) {
pDst[iLength] = (FX_WCHAR)pSrc[iLength];
}
}
-void FX_UTF16ToWCharCopy(const FX_WORD* pUTF16,
+void FX_UTF16ToWCharCopy(const uint16_t* pUTF16,
FX_WCHAR* pWChar,
int32_t iLength) {
FXSYS_assert(pUTF16 != NULL && pWChar != NULL && iLength > 0);
@@ -79,30 +79,30 @@ void FX_WCharToUTF16(void* pBuffer, int32_t iLength) {
return;
}
const FX_WCHAR* pSrc = (const FX_WCHAR*)pBuffer;
- FX_WORD* pDst = (FX_WORD*)pBuffer;
+ uint16_t* pDst = (uint16_t*)pBuffer;
while (--iLength >= 0) {
- *pDst++ = (FX_WORD)*pSrc++;
+ *pDst++ = (uint16_t)*pSrc++;
}
}
void FX_WCharToUTF16Copy(const FX_WCHAR* pWChar,
- FX_WORD* pUTF16,
+ uint16_t* pUTF16,
int32_t iLength) {
FXSYS_assert(pWChar != NULL && pUTF16 != NULL && iLength > 0);
if (sizeof(FX_WCHAR) == 2) {
FXSYS_memcpy(pUTF16, pWChar, iLength * sizeof(FX_WCHAR));
} else {
while (--iLength >= 0) {
- *pUTF16++ = (FX_WORD)*pWChar++;
+ *pUTF16++ = (uint16_t)*pWChar++;
}
}
}
inline FX_DWORD FX_DWordFromBytes(const uint8_t* pStr) {
return FXBSTR_ID(pStr[3], pStr[2], pStr[1], pStr[0]);
}
-inline FX_WORD FX_WordFromBytes(const uint8_t* pStr) {
+inline uint16_t FX_WordFromBytes(const uint8_t* pStr) {
return (pStr[1] << 8 | pStr[0]);
}
-int32_t FX_DecodeString(FX_WORD wCodePage,
+int32_t FX_DecodeString(uint16_t wCodePage,
const FX_CHAR* pSrc,
int32_t* pSrcLen,
FX_WCHAR* pDst,
diff --git a/xfa/fgas/crt/fgas_stream.cpp b/xfa/fgas/crt/fgas_stream.cpp
index 6f082dd5f1..4dc3737d75 100644
--- a/xfa/fgas/crt/fgas_stream.cpp
+++ b/xfa/fgas/crt/fgas_stream.cpp
@@ -201,8 +201,8 @@ class CFX_Stream : public IFX_Stream {
virtual void Flush();
virtual FX_BOOL SetLength(int32_t iLength);
virtual int32_t GetBOM(uint8_t bom[4]) const;
- virtual FX_WORD GetCodePage() const;
- virtual FX_WORD SetCodePage(FX_WORD wCodePage);
+ virtual uint16_t GetCodePage() const;
+ virtual uint16_t SetCodePage(uint16_t wCodePage);
virtual IFX_Stream* CreateSharedStream(FX_DWORD dwAccess,
int32_t iOffset,
int32_t iLength);
@@ -242,15 +242,15 @@ class CFX_TextStream : public IFX_Stream {
virtual FX_BOOL SetLength(int32_t iLength);
virtual int32_t GetBOM(uint8_t bom[4]) const;
- virtual FX_WORD GetCodePage() const;
- virtual FX_WORD SetCodePage(FX_WORD wCodePage);
+ virtual uint16_t GetCodePage() const;
+ virtual uint16_t SetCodePage(uint16_t wCodePage);
virtual IFX_Stream* CreateSharedStream(FX_DWORD dwAccess,
int32_t iOffset,
int32_t iLength);
protected:
- FX_WORD m_wCodePage;
+ uint16_t m_wCodePage;
int32_t m_wBOMLength;
FX_DWORD m_dwBOM;
uint8_t* m_pBuf;
@@ -1015,7 +1015,7 @@ void CFX_TextStream::Flush() {
FX_BOOL CFX_TextStream::SetLength(int32_t iLength) {
return m_pStreamImp->SetLength(iLength);
}
-FX_WORD CFX_TextStream::GetCodePage() const {
+uint16_t CFX_TextStream::GetCodePage() const {
return m_wCodePage;
}
IFX_Stream* CFX_TextStream::CreateSharedStream(FX_DWORD dwAccess,
@@ -1038,11 +1038,11 @@ int32_t CFX_TextStream::GetBOM(uint8_t bom[4]) const {
*(FX_DWORD*)bom = m_dwBOM;
return m_wBOMLength;
}
-FX_WORD CFX_TextStream::SetCodePage(FX_WORD wCodePage) {
+uint16_t CFX_TextStream::SetCodePage(uint16_t wCodePage) {
if (m_wBOMLength > 0) {
return m_wCodePage;
}
- FX_WORD v = m_wCodePage;
+ uint16_t v = m_wCodePage;
m_wCodePage = wCodePage;
return v;
}
@@ -1421,14 +1421,14 @@ int32_t CFX_Stream::GetBOM(uint8_t bom[4]) const {
}
return 0;
}
-FX_WORD CFX_Stream::GetCodePage() const {
+uint16_t CFX_Stream::GetCodePage() const {
#if _FX_ENDIAN_ == _FX_LITTLE_ENDIAN_
return FX_CODEPAGE_UTF16LE;
#else
return FX_CODEPAGE_UTF16BE;
#endif
}
-FX_WORD CFX_Stream::SetCodePage(FX_WORD wCodePage) {
+uint16_t CFX_Stream::SetCodePage(uint16_t wCodePage) {
#if _FX_ENDIAN_ == _FX_LITTLE_ENDIAN_
return FX_CODEPAGE_UTF16LE;
#else
diff --git a/xfa/fgas/crt/fgas_stream.h b/xfa/fgas/crt/fgas_stream.h
index e083886ec7..94b7f01ed6 100644
--- a/xfa/fgas/crt/fgas_stream.h
+++ b/xfa/fgas/crt/fgas_stream.h
@@ -68,8 +68,8 @@ class IFX_Stream {
virtual void Flush() = 0;
virtual FX_BOOL SetLength(int32_t iLength) = 0;
virtual int32_t GetBOM(uint8_t bom[4]) const = 0;
- virtual FX_WORD GetCodePage() const = 0;
- virtual FX_WORD SetCodePage(FX_WORD wCodePage) = 0;
+ virtual uint16_t GetCodePage() const = 0;
+ virtual uint16_t SetCodePage(uint16_t wCodePage) = 0;
virtual IFX_Stream* CreateSharedStream(FX_DWORD dwAccess,
int32_t iOffset,
int32_t iLength) = 0;
diff --git a/xfa/fgas/crt/fgas_utils.h b/xfa/fgas/crt/fgas_utils.h
index f03e3983fa..1138cfd7c9 100644
--- a/xfa/fgas/crt/fgas_utils.h
+++ b/xfa/fgas/crt/fgas_utils.h
@@ -85,7 +85,7 @@ class CFX_BaseArrayTemplate : public CFX_BaseArray {
};
typedef CFX_BaseArrayTemplate<void*> CFDE_PtrArray;
typedef CFX_BaseArrayTemplate<FX_DWORD> CFDE_DWordArray;
-typedef CFX_BaseArrayTemplate<FX_WORD> CFDE_WordArray;
+typedef CFX_BaseArrayTemplate<uint16_t> CFDE_WordArray;
template <class baseType>
class CFX_ObjectBaseArrayTemplate : public CFX_BaseArray {
@@ -282,7 +282,7 @@ class CFX_MassArrayTemplate : public CFX_BaseMassArray {
typedef CFX_MassArrayTemplate<void*> CFX_PtrMassArray;
typedef CFX_MassArrayTemplate<int32_t> CFX_Int32MassArray;
typedef CFX_MassArrayTemplate<FX_DWORD> CFX_DWordMassArray;
-typedef CFX_MassArrayTemplate<FX_WORD> CFX_WordMassArray;
+typedef CFX_MassArrayTemplate<uint16_t> CFX_WordMassArray;
typedef CFX_MassArrayTemplate<CFX_Rect> CFX_RectMassArray;
typedef CFX_MassArrayTemplate<CFX_RectF> CFX_RectFMassArray;
@@ -397,7 +397,7 @@ class CFX_DiscreteArrayTemplate : public CFX_BaseDiscreteArray {
};
typedef CFX_DiscreteArrayTemplate<void*> CFX_PtrDiscreteArray;
typedef CFX_DiscreteArrayTemplate<FX_DWORD> CFX_DWordDiscreteArray;
-typedef CFX_DiscreteArrayTemplate<FX_WORD> CFX_WordDiscreteArray;
+typedef CFX_DiscreteArrayTemplate<uint16_t> CFX_WordDiscreteArray;
class CFX_BaseStack : public CFX_Target {
protected:
@@ -436,7 +436,7 @@ class CFX_StackTemplate : public CFX_BaseStack {
};
typedef CFX_StackTemplate<void*> CFX_PtrStack;
typedef CFX_StackTemplate<FX_DWORD> CFX_DWordStack;
-typedef CFX_StackTemplate<FX_WORD> CFX_WordStack;
+typedef CFX_StackTemplate<uint16_t> CFX_WordStack;
typedef CFX_StackTemplate<int32_t> CFX_Int32Stack;
template <class baseType>
diff --git a/xfa/fgas/font/fgas_font.h b/xfa/fgas/font/fgas_font.h
index 5c362122ba..b13602cee6 100644
--- a/xfa/fgas/font/fgas_font.h
+++ b/xfa/fgas/font/fgas_font.h
@@ -61,7 +61,7 @@ class IFX_Font {
public:
static IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
IFX_FontMgr* pFontMgr);
static IFX_Font* LoadFont(const uint8_t* pBuffer,
int32_t iLength,
@@ -76,7 +76,7 @@ class IFX_Font {
virtual ~IFX_Font() {}
virtual void Release() = 0;
virtual IFX_Font* Retain() = 0;
- virtual IFX_Font* Derive(FX_DWORD dwFontStyles, FX_WORD wCodePage = 0) = 0;
+ virtual IFX_Font* Derive(FX_DWORD dwFontStyles, uint16_t wCodePage = 0) = 0;
virtual void GetFamilyName(CFX_WideString& wsFamily) const = 0;
virtual void GetPsName(CFX_WideString& wsName) const = 0;
virtual FX_DWORD GetFontStyles() const = 0;
@@ -108,7 +108,7 @@ struct FX_FONTMATCHPARAMS {
FX_DWORD dwUSB;
FX_DWORD dwMatchFlags;
FX_WCHAR wUnicode;
- FX_WORD wCodePage;
+ uint16_t wCodePage;
};
typedef FX_FONTMATCHPARAMS* FX_LPFONTMATCHPARAMS;
typedef FX_FONTMATCHPARAMS const* FX_LPCFONTMATCHPARAMS;
@@ -161,7 +161,7 @@ class IFX_FontMgr {
virtual ~IFX_FontMgr() {}
virtual void Release() = 0;
virtual IFX_Font* GetDefFontByCodePage(
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByCharset(
@@ -173,22 +173,22 @@ class IFX_FontMgr {
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByLanguage(
- FX_WORD wLanguage,
+ uint16_t wLanguage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage = 0xFFFF) = 0;
+ uint16_t wCodePage = 0xFFFF) = 0;
virtual IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength) = 0;
virtual IFX_Font* LoadFont(const FX_WCHAR* pszFileName) = 0;
virtual IFX_Font* LoadFont(IFX_Stream* pFontStream,
const FX_WCHAR* pszFontAlias = NULL,
FX_DWORD dwFontStyles = 0,
- FX_WORD wCodePage = 0,
+ uint16_t wCodePage = 0,
FX_BOOL bSaveStream = FALSE) = 0;
virtual IFX_Font* LoadFont(IFX_Font* pSrcFont,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage = 0xFFFF) = 0;
+ uint16_t wCodePage = 0xFFFF) = 0;
virtual void ClearFontCache() = 0;
virtual void RemoveFont(IFX_Font* pFont) = 0;
};
@@ -198,7 +198,7 @@ class IFX_FontMgrDelegate {
virtual ~IFX_FontMgrDelegate() {}
virtual IFX_Font* GetDefFontByCodePage(
IFX_FontMgr* pFontMgr,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByCharset(
@@ -213,7 +213,7 @@ class IFX_FontMgrDelegate {
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByLanguage(
IFX_FontMgr* pFontMgr,
- FX_WORD wLanguage,
+ uint16_t wLanguage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
};
@@ -233,7 +233,7 @@ class IFX_FontMgr {
virtual ~IFX_FontMgr() {}
virtual void Release() = 0;
virtual IFX_Font* GetDefFontByCodePage(
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByCharset(
@@ -245,15 +245,15 @@ class IFX_FontMgr {
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* GetDefFontByLanguage(
- FX_WORD wLanguage,
+ uint16_t wLanguage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetFontByCodePage(FX_WORD wCodePage,
+ virtual IFX_Font* GetFontByCodePage(uint16_t wCodePage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
inline IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage) {
+ uint16_t wCodePage) {
return GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily);
}
virtual IFX_Font* GetFontByCharset(uint8_t nCharset,
@@ -262,7 +262,7 @@ class IFX_FontMgr {
virtual IFX_Font* GetFontByUnicode(FX_WCHAR wUnicode,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
- virtual IFX_Font* GetFontByLanguage(FX_WORD wLanguage,
+ virtual IFX_Font* GetFontByLanguage(uint16_t wLanguage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL) = 0;
virtual IFX_Font* LoadFont(const uint8_t* pBuffer,
diff --git a/xfa/fgas/font/fgas_fontutils.cpp b/xfa/fgas/font/fgas_fontutils.cpp
index 51bba0123e..e115e0f42d 100644
--- a/xfa/fgas/font/fgas_fontutils.cpp
+++ b/xfa/fgas/font/fgas_fontutils.cpp
@@ -9,7 +9,7 @@
#include "core/include/fxcrt/fx_ext.h"
#include "xfa/fgas/font/fgas_font.h"
-FX_DWORD FGAS_GetFontHashCode(FX_WORD wCodePage, FX_DWORD dwFontStyles) {
+FX_DWORD FGAS_GetFontHashCode(uint16_t wCodePage, FX_DWORD dwFontStyles) {
FX_DWORD dwHash = wCodePage;
if (dwFontStyles & FX_FONTSTYLE_FixedPitch) {
dwHash |= 0x00010000;
@@ -33,7 +33,7 @@ FX_DWORD FGAS_GetFontHashCode(FX_WORD wCodePage, FX_DWORD dwFontStyles) {
}
FX_DWORD FGAS_GetFontFamilyHash(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage) {
+ uint16_t wCodePage) {
CFX_WideString wsFont(pszFontFamily);
if (dwFontStyles & FX_FONTSTYLE_Bold) {
wsFont += L"Bold";
diff --git a/xfa/fgas/font/fgas_fontutils.h b/xfa/fgas/font/fgas_fontutils.h
index ab567aee6b..d5608063ca 100644
--- a/xfa/fgas/font/fgas_fontutils.h
+++ b/xfa/fgas/font/fgas_fontutils.h
@@ -16,10 +16,10 @@ struct FGAS_FONTUSB {
uint16_t wCodePage;
};
-FX_DWORD FGAS_GetFontHashCode(FX_WORD wCodePage, FX_DWORD dwFontStyles);
+FX_DWORD FGAS_GetFontHashCode(uint16_t wCodePage, FX_DWORD dwFontStyles);
FX_DWORD FGAS_GetFontFamilyHash(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage);
+ uint16_t wCodePage);
const FGAS_FONTUSB* FGAS_GetUnicodeBitField(FX_WCHAR wUnicode);
#endif // XFA_FGAS_FONT_FGAS_FONTUTILS_H_
diff --git a/xfa/fgas/font/fgas_gefont.cpp b/xfa/fgas/font/fgas_gefont.cpp
index 831da7e7d6..75ed0b2a1f 100644
--- a/xfa/fgas/font/fgas_gefont.cpp
+++ b/xfa/fgas/font/fgas_gefont.cpp
@@ -11,7 +11,7 @@
IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
IFX_FontMgr* pFontMgr) {
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
if (NULL != pFontMgr) {
@@ -189,7 +189,7 @@ IFX_Font* CFX_GEFont::Retain() {
}
FX_BOOL CFX_GEFont::LoadFont(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage) {
+ uint16_t wCodePage) {
if (m_pFont) {
return FALSE;
}
@@ -221,7 +221,7 @@ FX_BOOL CFX_GEFont::LoadFont(const FX_WCHAR* pszFontFamily,
}
int32_t iWeight =
(dwFontStyles & FX_FONTSTYLE_Bold) ? FXFONT_FW_BOLD : FXFONT_FW_NORMAL;
- FX_WORD wCharSet = FX_GetCharsetFromCodePage(wCodePage);
+ uint16_t wCharSet = FX_GetCharsetFromCodePage(wCodePage);
if (wCharSet == 0xFFFF) {
wCharSet = FXSYS_GetACP();
}
@@ -329,7 +329,7 @@ FX_BOOL CFX_GEFont::InitFont() {
}
return TRUE;
}
-IFX_Font* CFX_GEFont::Derive(FX_DWORD dwFontStyles, FX_WORD wCodePage) {
+IFX_Font* CFX_GEFont::Derive(FX_DWORD dwFontStyles, uint16_t wCodePage) {
if (GetFontStyles() == dwFontStyles) {
return Retain();
}
@@ -489,7 +489,7 @@ int32_t CFX_GEFont::GetGlyphIndex(FX_WCHAR wUnicode,
if (pFontUSB == NULL) {
return 0xFFFF;
}
- FX_WORD wBitField = pFontUSB->wBitField;
+ uint16_t wBitField = pFontUSB->wBitField;
if (wBitField >= 128) {
return 0xFFFF;
}
diff --git a/xfa/fgas/font/fgas_gefont.h b/xfa/fgas/font/fgas_gefont.h
index 034220ef64..03bc32ce63 100644
--- a/xfa/fgas/font/fgas_gefont.h
+++ b/xfa/fgas/font/fgas_gefont.h
@@ -21,12 +21,12 @@ class CFX_GEFont : public IFX_Font {
virtual IFX_Font* Retain();
FX_BOOL LoadFont(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage);
+ uint16_t wCodePage);
FX_BOOL LoadFont(const uint8_t* pBuffer, int32_t length);
FX_BOOL LoadFont(const FX_WCHAR* pszFileName);
FX_BOOL LoadFont(IFX_Stream* pFontStream, FX_BOOL bSaveStream);
FX_BOOL LoadFont(CFX_Font* pExtFont, FX_BOOL bTakeOver = FALSE);
- virtual IFX_Font* Derive(FX_DWORD dwFontStyles, FX_WORD wCodePage = 0);
+ virtual IFX_Font* Derive(FX_DWORD dwFontStyles, uint16_t wCodePage = 0);
virtual void GetFamilyName(CFX_WideString& wsFamily) const;
virtual void GetPsName(CFX_WideString& wsName) const;
virtual FX_DWORD GetFontStyles() const;
@@ -71,7 +71,7 @@ class CFX_GEFont : public IFX_Font {
CFX_RectMassArray* m_pRectArray;
CFX_MapPtrToPtr* m_pBBoxMap;
IFX_FontProvider* m_pProvider;
- FX_WORD m_wCharSet;
+ uint16_t m_wCharSet;
CFX_PtrArray m_SubstFonts;
CFX_MapPtrToPtr m_FontMapper;
FX_BOOL InitFont();
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index ffe520dc87..331ea86582 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -57,7 +57,7 @@ CFX_StdFontMgrImp::~CFX_StdFontMgrImp() {
m_Fonts.RemoveAll();
}
IFX_Font* CFX_StdFontMgrImp::GetDefFontByCodePage(
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily) {
FX_DWORD dwHash = FGAS_GetFontHashCode(wCodePage, dwFontStyles);
@@ -115,7 +115,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(
if (!pFD)
return nullptr;
- FX_WORD wCodePage = FX_GetCodePageFromCharset(pFD->uCharSet);
+ uint16_t wCodePage = FX_GetCodePageFromCharset(pFD->uCharSet);
const FX_WCHAR* pFontFace = pFD->wsFontFace;
pFont = IFX_Font::LoadFont(pFontFace, dwFontStyles, wCodePage, this);
if (pFont) {
@@ -131,7 +131,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByUnicode(
}
IFX_Font* CFX_StdFontMgrImp::GetDefFontByLanguage(
- FX_WORD wLanguage,
+ uint16_t wLanguage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily) {
return GetDefFontByCodePage(FX_GetDefCodePageByLanguage(wLanguage),
@@ -139,7 +139,7 @@ IFX_Font* CFX_StdFontMgrImp::GetDefFontByLanguage(
}
IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage) {
+ uint16_t wCodePage) {
FX_DWORD dwHash =
FGAS_GetFontFamilyHash(pszFontFamily, dwFontStyles, wCodePage);
IFX_Font* pFont = NULL;
@@ -203,7 +203,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(const FX_WCHAR* pszFileName) {
IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream,
const FX_WCHAR* pszFontAlias,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_BOOL bSaveStream) {
FXSYS_assert(pFontStream != NULL && pFontStream->GetLength() > 0);
IFX_Font* pFont = NULL;
@@ -232,7 +232,7 @@ IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Stream* pFontStream,
}
IFX_Font* CFX_StdFontMgrImp::LoadFont(IFX_Font* pSrcFont,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage) {
+ uint16_t wCodePage) {
FXSYS_assert(pSrcFont != NULL);
if (pSrcFont->GetFontStyles() == dwFontStyles) {
return pSrcFont->Retain();
@@ -299,7 +299,7 @@ void CFX_StdFontMgrImp::RemoveFont(IFX_Font* pFont) {
FX_LPCFONTDESCRIPTOR CFX_StdFontMgrImp::FindFont(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
FX_DWORD dwMatchFlags,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwUSB,
FX_WCHAR wUnicode) {
if (m_pMatcher == NULL) {
@@ -688,7 +688,7 @@ void CFX_FontMgrImp::Release() {
}
delete this;
}
-IFX_Font* CFX_FontMgrImp::GetDefFontByCodePage(FX_WORD wCodePage,
+IFX_Font* CFX_FontMgrImp::GetDefFontByCodePage(uint16_t wCodePage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily) {
return NULL == m_pDelegate ? NULL : m_pDelegate->GetDefFontByCodePage(
@@ -709,14 +709,14 @@ IFX_Font* CFX_FontMgrImp::GetDefFontByUnicode(FX_WCHAR wUnicode,
: m_pDelegate->GetDefFontByUnicode(
this, wUnicode, dwFontStyles, pszFontFamily);
}
-IFX_Font* CFX_FontMgrImp::GetDefFontByLanguage(FX_WORD wLanguage,
+IFX_Font* CFX_FontMgrImp::GetDefFontByLanguage(uint16_t wLanguage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily) {
return NULL == m_pDelegate ? NULL : m_pDelegate->GetDefFontByLanguage(
this, wLanguage, dwFontStyles,
pszFontFamily);
}
-IFX_Font* CFX_FontMgrImp::GetFontByCodePage(FX_WORD wCodePage,
+IFX_Font* CFX_FontMgrImp::GetFontByCodePage(uint16_t wCodePage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily) {
CFX_ByteString bsHash;
@@ -770,8 +770,8 @@ IFX_Font* CFX_FontMgrImp::GetFontByUnicode(FX_WCHAR wUnicode,
if (m_FailedUnicodes2NULL.Lookup(wUnicode, pFont))
return nullptr;
const FGAS_FONTUSB* x = FGAS_GetUnicodeBitField(wUnicode);
- FX_WORD wCodePage = x ? x->wCodePage : 0xFFFF;
- FX_WORD wBitField = x ? x->wBitField : 0x03E7;
+ uint16_t wCodePage = x ? x->wCodePage : 0xFFFF;
+ uint16_t wBitField = x ? x->wBitField : 0x03E7;
CFX_ByteString bsHash;
if (wCodePage == 0xFFFF)
bsHash.Format("%d, %d, %d", wCodePage, wBitField, dwFontStyles);
@@ -851,7 +851,7 @@ FX_BOOL CFX_FontMgrImp::VerifyUnicode(IFX_Font* pFont, FX_WCHAR wcUnicode) {
}
return TRUE;
}
-IFX_Font* CFX_FontMgrImp::GetFontByLanguage(FX_WORD wLanguage,
+IFX_Font* CFX_FontMgrImp::GetFontByLanguage(uint16_t wLanguage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily) {
return GetFontByCodePage(FX_GetDefCodePageByLanguage(wLanguage), dwFontStyles,
@@ -1072,7 +1072,7 @@ IFX_FileRead* CFX_FontMgrImp::CreateFontStream(
return nullptr;
}
int32_t CFX_FontMgrImp::MatchFonts(CFX_FontDescriptorInfos& MatchedFonts,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwFontStyles,
const CFX_WideString& FontName,
FX_WCHAR wcUnicode) {
@@ -1104,8 +1104,8 @@ int32_t CFX_FontMgrImp::MatchFonts(CFX_FontDescriptorInfos& MatchedFonts,
return MatchedFonts.GetSize();
}
struct FX_BitCodePage {
- FX_WORD wBit;
- FX_WORD wCodePage;
+ uint16_t wBit;
+ uint16_t wCodePage;
};
static const FX_BitCodePage g_Bit2CodePage[] = {
{0, 1252}, {1, 1250}, {2, 1251}, {3, 1253}, {4, 1254}, {5, 1255},
@@ -1121,21 +1121,21 @@ static const FX_BitCodePage g_Bit2CodePage[] = {
{60, 737}, {61, 708}, {62, 850}, {63, 437},
};
-FX_WORD FX_GetCodePageBit(FX_WORD wCodePage) {
+uint16_t FX_GetCodePageBit(uint16_t wCodePage) {
for (size_t i = 0; i < FX_ArraySize(g_Bit2CodePage); ++i) {
if (g_Bit2CodePage[i].wCodePage == wCodePage)
return g_Bit2CodePage[i].wBit;
}
- return (FX_WORD)-1;
+ return (uint16_t)-1;
}
-FX_WORD FX_GetUnicodeBit(FX_WCHAR wcUnicode) {
+uint16_t FX_GetUnicodeBit(FX_WCHAR wcUnicode) {
const FGAS_FONTUSB* x = FGAS_GetUnicodeBitField(wcUnicode);
return x ? x->wBitField : 999;
}
int32_t CFX_FontMgrImp::CalcPenalty(CFX_FontDescriptor* pInstalled,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwFontStyles,
const CFX_WideString& FontName,
FX_WCHAR wcUnicode) {
@@ -1192,10 +1192,10 @@ int32_t CFX_FontMgrImp::CalcPenalty(CFX_FontDescriptor* pInstalled,
if (nPenalty >= 0xFFFF) {
return 0xFFFF;
}
- FX_WORD wBit =
- ((0 == wCodePage || 0xFFFF == wCodePage) ? (FX_WORD)-1
+ uint16_t wBit =
+ ((0 == wCodePage || 0xFFFF == wCodePage) ? (uint16_t)-1
: FX_GetCodePageBit(wCodePage));
- if (wBit != (FX_WORD)-1) {
+ if (wBit != (uint16_t)-1) {
FXSYS_assert(wBit < 64);
if (0 == (pInstalled->m_dwCsb[wBit / 32] & (1 << (wBit % 32)))) {
nPenalty += 0xFFFF;
@@ -1204,9 +1204,9 @@ int32_t CFX_FontMgrImp::CalcPenalty(CFX_FontDescriptor* pInstalled,
}
}
wBit =
- ((0 == wcUnicode || 0xFFFE == wcUnicode) ? (FX_WORD)999
+ ((0 == wcUnicode || 0xFFFE == wcUnicode) ? (uint16_t)999
: FX_GetUnicodeBit(wcUnicode));
- if (wBit != (FX_WORD)999) {
+ if (wBit != (uint16_t)999) {
FXSYS_assert(wBit < 128);
if (0 == (pInstalled->m_dwUsb[wBit / 32] & (1 << (wBit % 32)))) {
nPenalty += 0xFFFF;
@@ -1290,7 +1290,7 @@ void CFX_FontMgrImp::RegisterFace(FXFT_Face pFace,
pFont->m_dwFontStyles |= FXFT_Is_Face_Bold(pFace) ? FX_FONTSTYLE_Bold : 0;
pFont->m_dwFontStyles |= FXFT_Is_Face_Italic(pFace) ? FX_FONTSTYLE_Italic : 0;
pFont->m_dwFontStyles |= GetFlags(pFace);
- CFX_WordArray Charsets;
+ CFX_ArrayTemplate<uint16_t> Charsets;
GetCharsets(pFace, Charsets);
GetUSBCSB(pFace, pFont->m_dwUsb, pFont->m_dwCsb);
unsigned long nLength = 0;
@@ -1404,8 +1404,8 @@ void CFX_FontMgrImp::GetNames(const uint8_t* name_table,
#undef GetUInt16
#undef GetUInt32
struct FX_BIT2CHARSET {
- FX_WORD wBit;
- FX_WORD wCharset;
+ uint16_t wBit;
+ uint16_t wCharset;
};
FX_BIT2CHARSET g_FX_Bit2Charset1[16] = {
{1 << 0, FX_CHARSET_ANSI},
@@ -1469,11 +1469,12 @@ FX_BIT2CHARSET g_FX_Bit2Charset4[16] = {
Charsets.Add(g_FX_Bit2Charset##n[i].wCharset); \
} \
}
-void CFX_FontMgrImp::GetCharsets(FXFT_Face pFace, CFX_WordArray& Charsets) {
+void CFX_FontMgrImp::GetCharsets(FXFT_Face pFace,
+ CFX_ArrayTemplate<uint16_t>& Charsets) {
Charsets.RemoveAll();
TT_OS2* pOS2 = (TT_OS2*)FT_Get_Sfnt_Table(pFace, ft_sfnt_os2);
if (NULL != pOS2) {
- FX_WORD a1, a2, a3, a4;
+ uint16_t a1, a2, a3, a4;
a1 = pOS2->ulCodePageRange1 & 0x0000ffff;
CODEPAGERANGE_IMPLEMENT(1);
a2 = (pOS2->ulCodePageRange1 >> 16) & 0x0000ffff;
diff --git a/xfa/fgas/font/fgas_stdfontmgr.h b/xfa/fgas/font/fgas_stdfontmgr.h
index e646c28917..e548cf5d2b 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.h
+++ b/xfa/fgas/font/fgas_stdfontmgr.h
@@ -26,7 +26,7 @@ class CFX_StdFontMgrImp : public IFX_FontMgr {
void* pUserData);
~CFX_StdFontMgrImp();
virtual void Release() { delete this; }
- virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage,
+ virtual IFX_Font* GetDefFontByCodePage(uint16_t wCodePage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset,
@@ -35,22 +35,22 @@ class CFX_StdFontMgrImp : public IFX_FontMgr {
virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
- virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage,
+ virtual IFX_Font* GetDefFontByLanguage(uint16_t wLanguage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* LoadFont(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage = 0xFFFF);
+ uint16_t wCodePage = 0xFFFF);
virtual IFX_Font* LoadFont(const uint8_t* pBuffer, int32_t iLength);
virtual IFX_Font* LoadFont(const FX_WCHAR* pszFileName);
virtual IFX_Font* LoadFont(IFX_Stream* pFontStream,
const FX_WCHAR* pszFontAlias = NULL,
FX_DWORD dwFontStyles = 0,
- FX_WORD wCodePage = 0,
+ uint16_t wCodePage = 0,
FX_BOOL bSaveStream = FALSE);
virtual IFX_Font* LoadFont(IFX_Font* pSrcFont,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage = 0xFFFF);
+ uint16_t wCodePage = 0xFFFF);
virtual void ClearFontCache();
virtual void RemoveFont(IFX_Font* pFont);
@@ -71,7 +71,7 @@ class CFX_StdFontMgrImp : public IFX_FontMgr {
FX_LPCFONTDESCRIPTOR FindFont(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
FX_DWORD dwMatchFlags,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwUSB = 999,
FX_WCHAR wUnicode = 0);
IFX_Font* GetFont(FX_LPCFONTDESCRIPTOR pFD, FX_DWORD dwFontStyles);
@@ -159,7 +159,7 @@ class CFX_FontMgrImp : public IFX_FontMgr {
IFX_FontMgrDelegate* pDelegate = NULL,
void* pUserData = NULL);
virtual void Release();
- virtual IFX_Font* GetDefFontByCodePage(FX_WORD wCodePage,
+ virtual IFX_Font* GetDefFontByCodePage(uint16_t wCodePage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetDefFontByCharset(uint8_t nCharset,
@@ -168,10 +168,10 @@ class CFX_FontMgrImp : public IFX_FontMgr {
virtual IFX_Font* GetDefFontByUnicode(FX_WCHAR wUnicode,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
- virtual IFX_Font* GetDefFontByLanguage(FX_WORD wLanguage,
+ virtual IFX_Font* GetDefFontByLanguage(uint16_t wLanguage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
- virtual IFX_Font* GetFontByCodePage(FX_WORD wCodePage,
+ virtual IFX_Font* GetFontByCodePage(uint16_t wCodePage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* GetFontByCharset(uint8_t nCharset,
@@ -180,7 +180,7 @@ class CFX_FontMgrImp : public IFX_FontMgr {
virtual IFX_Font* GetFontByUnicode(FX_WCHAR wUnicode,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
- virtual IFX_Font* GetFontByLanguage(FX_WORD wLanguage,
+ virtual IFX_Font* GetFontByLanguage(uint16_t wLanguage,
FX_DWORD dwFontStyles,
const FX_WCHAR* pszFontFamily = NULL);
virtual IFX_Font* LoadFont(const uint8_t* pBuffer,
@@ -211,7 +211,7 @@ class CFX_FontMgrImp : public IFX_FontMgr {
void RegisterFaces(IFX_FileRead* pFontStream,
const CFX_WideString* pFaceName);
void GetNames(const uint8_t* name_table, CFX_WideStringArray& Names);
- void GetCharsets(FXFT_Face pFace, CFX_WordArray& Charsets);
+ void GetCharsets(FXFT_Face pFace, CFX_ArrayTemplate<uint16_t>& Charsets);
void GetUSBCSB(FXFT_Face pFace, FX_DWORD* USB, FX_DWORD* CSB);
FX_DWORD GetFlags(FXFT_Face pFace);
CFX_FontDescriptors m_InstalledFonts;
@@ -219,12 +219,12 @@ class CFX_FontMgrImp : public IFX_FontMgr {
FX_BOOL VerifyUnicode(IFX_Font* pFont, FX_WCHAR wcUnicode);
int32_t IsPartName(const CFX_WideString& Name1, const CFX_WideString& Name2);
int32_t MatchFonts(CFX_FontDescriptorInfos& MatchedFonts,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwFontStyles,
const CFX_WideString& FontName,
FX_WCHAR wcUnicode = 0xFFFE);
int32_t CalcPenalty(CFX_FontDescriptor* pInstalled,
- FX_WORD wCodePage,
+ uint16_t wCodePage,
FX_DWORD dwFontStyles,
const CFX_WideString& FontName,
FX_WCHAR wcUnicode = 0xFFFE);
diff --git a/xfa/fgas/layout/fgas_linebreak.cpp b/xfa/fgas/layout/fgas_linebreak.cpp
index 8155af870a..4e5b405f5a 100644
--- a/xfa/fgas/layout/fgas_linebreak.cpp
+++ b/xfa/fgas/layout/fgas_linebreak.cpp
@@ -276,11 +276,11 @@ void FX_GetLineBreakPositions(const FX_WCHAR* pwsText,
FX_DWORD dwCur, dwNext;
FX_WCHAR wch;
wch = *pwsText++;
- dwCur = kTextLayoutCodeProperties[(FX_WORD)wch] & 0x003F;
+ dwCur = kTextLayoutCodeProperties[(uint16_t)wch] & 0x003F;
iLength--;
for (int32_t i = 0; i < iLength; i++) {
wch = *pwsText++;
- dwNext = kTextLayoutCodeProperties[(FX_WORD)wch] & 0x003F;
+ dwNext = kTextLayoutCodeProperties[(uint16_t)wch] & 0x003F;
if (dwNext == FX_CBP_SP) {
pBrkType[i] = FX_LBT_PROHIBITED_BRK;
} else {
@@ -301,11 +301,11 @@ void FX_GetLineBreakPositions(const FX_WCHAR* pwsText,
FX_DWORD dwCur, dwNext;
FX_WCHAR wch;
wch = *pwsText++;
- dwCur = kTextLayoutCodeProperties[(FX_WORD)wch] & 0x003F;
+ dwCur = kTextLayoutCodeProperties[(uint16_t)wch] & 0x003F;
iLength--;
for (int32_t i = 0; i < iLength; i++) {
wch = *pwsText++;
- dwNext = kTextLayoutCodeProperties[(FX_WORD)wch] & 0x003F;
+ dwNext = kTextLayoutCodeProperties[(uint16_t)wch] & 0x003F;
if (dwNext == FX_CBP_SP) {
eType = FX_LBT_PROHIBITED_BRK;
} else {
diff --git a/xfa/fgas/layout/fgas_rtfbreak.cpp b/xfa/fgas/layout/fgas_rtfbreak.cpp
index f57a1335fb..dd150a3002 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.cpp
+++ b/xfa/fgas/layout/fgas_rtfbreak.cpp
@@ -515,7 +515,7 @@ FX_DWORD CFX_RTFBreak::AppendChar(FX_WCHAR wch) {
if (m_bCharCode) {
return AppendChar_CharCode(wch);
}
- FX_DWORD dwProps = kTextLayoutCodeProperties[(FX_WORD)wch];
+ FX_DWORD dwProps = kTextLayoutCodeProperties[(uint16_t)wch];
FX_DWORD dwType = (dwProps & FX_CHARTYPEBITSMASK);
CFX_RTFCharArray& tca = m_pCurLine->m_LineChars;
CFX_RTFChar* pCurChar = tca.AddSpace();
diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp
index 0cc41980cb..f182a6d413 100644
--- a/xfa/fgas/layout/fgas_textbreak.cpp
+++ b/xfa/fgas/layout/fgas_textbreak.cpp
@@ -732,10 +732,10 @@ static const FX_TxtBreak_LPFAppendChar g_FX_TxtBreak_lpfAppendChar[16] = {
&CFX_TxtBreak::AppendChar_Others, &CFX_TxtBreak::AppendChar_Others,
};
FX_DWORD CFX_TxtBreak::AppendChar(FX_WCHAR wch) {
- FX_DWORD dwProps = kTextLayoutCodeProperties[(FX_WORD)wch];
+ FX_DWORD dwProps = kTextLayoutCodeProperties[(uint16_t)wch];
FX_DWORD dwType = (dwProps & FX_CHARTYPEBITSMASK);
CFX_TxtChar* pCurChar = m_pCurLine->m_pLineChars->AddSpace();
- pCurChar->m_wCharCode = (FX_WORD)wch;
+ pCurChar->m_wCharCode = (uint16_t)wch;
pCurChar->m_nRotation = m_iCharRotation;
pCurChar->m_dwCharProps = dwProps;
pCurChar->m_dwCharStyles = 0;
@@ -1324,8 +1324,8 @@ void CFX_TxtBreak::Reset() {
}
struct FX_FORMCHAR {
- FX_WORD wch;
- FX_WORD wForm;
+ uint16_t wch;
+ uint16_t wForm;
int32_t iWidth;
};
diff --git a/xfa/fgas/localization/fgas_datetime.cpp b/xfa/fgas/localization/fgas_datetime.cpp
index 34b8210fc3..ac5ee4a01d 100644
--- a/xfa/fgas/localization/fgas_datetime.cpp
+++ b/xfa/fgas/localization/fgas_datetime.cpp
@@ -124,14 +124,14 @@ static void FX_DaysToDate(int64_t iDays,
}
struct FXUT_SYSTEMTIME {
- FX_WORD wYear;
- FX_WORD wMonth;
- FX_WORD wDayOfWeek;
- FX_WORD wDay;
- FX_WORD wHour;
- FX_WORD wMinute;
- FX_WORD wSecond;
- FX_WORD wMilliseconds;
+ uint16_t wYear;
+ uint16_t wMonth;
+ uint16_t wDayOfWeek;
+ uint16_t wDay;
+ uint16_t wHour;
+ uint16_t wMinute;
+ uint16_t wSecond;
+ uint16_t wMilliseconds;
};
void CFX_Unitime::Now() {
@@ -160,7 +160,7 @@ void CFX_Unitime::Now() {
#endif
Set(utLocal.wYear, (uint8_t)utLocal.wMonth, (uint8_t)utLocal.wDay,
(uint8_t)utLocal.wHour, (uint8_t)utLocal.wMinute,
- (uint8_t)utLocal.wSecond, (FX_WORD)utLocal.wMilliseconds);
+ (uint8_t)utLocal.wSecond, (uint16_t)utLocal.wMilliseconds);
}
void CFX_Unitime::SetGMTime() {
FXUT_SYSTEMTIME utLocal;
@@ -188,7 +188,7 @@ void CFX_Unitime::SetGMTime() {
#endif
Set(utLocal.wYear, (uint8_t)utLocal.wMonth, (uint8_t)utLocal.wDay,
(uint8_t)utLocal.wHour, (uint8_t)utLocal.wMinute,
- (uint8_t)utLocal.wSecond, (FX_WORD)utLocal.wMilliseconds);
+ (uint8_t)utLocal.wSecond, (uint16_t)utLocal.wMilliseconds);
}
void CFX_Unitime::Set(int32_t year,
uint8_t month,
@@ -196,7 +196,7 @@ void CFX_Unitime::Set(int32_t year,
uint8_t hour,
uint8_t minute,
uint8_t second,
- FX_WORD millisecond) {
+ uint16_t millisecond) {
FXSYS_assert(hour <= 23);
FXSYS_assert(minute <= 59);
FXSYS_assert(second <= 59);
@@ -238,7 +238,7 @@ FX_WEEKDAY CFX_Unitime::GetDayOfWeek() const {
}
return (FX_WEEKDAY)v;
}
-FX_WORD CFX_Unitime::GetDayOfYear() const {
+uint16_t CFX_Unitime::GetDayOfYear() const {
int32_t iYear;
uint8_t iMonth, iDay;
FX_DaysToDate(GetDayOfAD(), iYear, iMonth, iDay);
@@ -274,12 +274,12 @@ uint8_t CFX_Unitime::GetSecond() const {
}
return (uint8_t)(v / g_FXMillisecondsPerSecond);
}
-FX_WORD CFX_Unitime::GetMillisecond() const {
+uint16_t CFX_Unitime::GetMillisecond() const {
int32_t v = (int32_t)(m_iUnitime % g_FXMillisecondsPerSecond);
if (v < 0) {
v += g_FXMillisecondsPerSecond;
}
- return (FX_WORD)v;
+ return (uint16_t)v;
}
FX_BOOL CFX_Unitime::AddYears(int32_t iYears) {
FX_UNITIME ut = m_iUnitime;
@@ -350,7 +350,7 @@ FX_BOOL CFX_DateTime::Set(int32_t year,
uint8_t hour,
uint8_t minute,
uint8_t second,
- FX_WORD millisecond) {
+ uint16_t millisecond) {
ASSERT(year != 0);
ASSERT(month >= 1 && month <= 12);
ASSERT(day >= 1 && day <= FX_DaysInMonth(year, month));
@@ -407,7 +407,7 @@ FX_WEEKDAY CFX_DateTime::GetDayOfWeek() const {
}
return (FX_WEEKDAY)v;
}
-FX_WORD CFX_DateTime::GetDayOfYear() const {
+uint16_t CFX_DateTime::GetDayOfYear() const {
return FX_DaysBeforeMonthInYear(m_DateTime.Date.sDate.year,
m_DateTime.Date.sDate.month) +
m_DateTime.Date.sDate.day;
@@ -425,7 +425,7 @@ uint8_t CFX_DateTime::GetMinute() const {
uint8_t CFX_DateTime::GetSecond() const {
return m_DateTime.Time.sTime.second;
}
-FX_WORD CFX_DateTime::GetMillisecond() const {
+uint16_t CFX_DateTime::GetMillisecond() const {
return m_DateTime.Time.sTime.millisecond;
}
FX_BOOL CFX_DateTime::AddYears(int32_t iYears) {
@@ -542,7 +542,7 @@ FX_BOOL CFX_DateTime::AddMilliseconds(int32_t iMilliseconds) {
if (iMilliseconds < 0) {
iSeconds--, iMilliseconds += g_FXMillisecondsPerSecond;
}
- m_DateTime.Time.sTime.millisecond = (FX_WORD)iMilliseconds;
+ m_DateTime.Time.sTime.millisecond = (uint16_t)iMilliseconds;
if (iSeconds != 0) {
AddSeconds(iSeconds);
}
diff --git a/xfa/fgas/localization/fgas_datetime.h b/xfa/fgas/localization/fgas_datetime.h
index 4aa5093006..0a3d14d240 100644
--- a/xfa/fgas/localization/fgas_datetime.h
+++ b/xfa/fgas/localization/fgas_datetime.h
@@ -68,18 +68,18 @@ class CFX_Unitime {
uint8_t hour = 0,
uint8_t minute = 0,
uint8_t second = 0,
- FX_WORD millisecond = 0);
+ uint16_t millisecond = 0);
void Set(FX_UNITIME t);
int32_t GetYear() const;
uint8_t GetMonth() const;
uint8_t GetDay() const;
FX_WEEKDAY GetDayOfWeek() const;
- FX_WORD GetDayOfYear() const;
+ uint16_t GetDayOfYear() const;
int64_t GetDayOfAD() const;
uint8_t GetHour() const;
uint8_t GetMinute() const;
uint8_t GetSecond() const;
- FX_WORD GetMillisecond() const;
+ uint16_t GetMillisecond() const;
FX_BOOL AddYears(int32_t iYears);
FX_BOOL AddMonths(int32_t iMonths);
FX_BOOL AddDays(int32_t iDays);
@@ -177,7 +177,7 @@ struct FX_TIME {
uint8_t hour;
uint8_t minute;
uint8_t second;
- FX_WORD millisecond;
+ uint16_t millisecond;
};
struct FX_TIMEZONE {
@@ -199,7 +199,7 @@ struct FX_DATETIME {
uint8_t hour;
uint8_t minute;
uint8_t second;
- FX_WORD millisecond;
+ uint16_t millisecond;
} sTime;
FX_TIME aTime;
} Time;
@@ -221,7 +221,7 @@ struct FX_DATETIMEZONE {
uint8_t hour;
uint8_t minute;
uint8_t second;
- FX_WORD millisecond;
+ uint16_t millisecond;
};
FX_TIME time;
};
@@ -280,19 +280,19 @@ class CFX_DateTime {
uint8_t hour = 0,
uint8_t minute = 0,
uint8_t second = 0,
- FX_WORD millisecond = 0);
+ uint16_t millisecond = 0);
virtual FX_BOOL FromUnitime(FX_UNITIME t);
virtual FX_UNITIME ToUnitime() const;
virtual int32_t GetYear() const;
virtual uint8_t GetMonth() const;
virtual uint8_t GetDay() const;
virtual FX_WEEKDAY GetDayOfWeek() const;
- virtual FX_WORD GetDayOfYear() const;
+ virtual uint16_t GetDayOfYear() const;
virtual int64_t GetDayOfAD() const;
virtual uint8_t GetHour() const;
virtual uint8_t GetMinute() const;
virtual uint8_t GetSecond() const;
- virtual FX_WORD GetMillisecond() const;
+ virtual uint16_t GetMillisecond() const;
virtual FX_BOOL AddYears(int32_t iYears);
virtual FX_BOOL AddMonths(int32_t iMonths);
virtual FX_BOOL AddDays(int32_t iDays);
diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp
index 6af9205d30..db94f766b5 100644
--- a/xfa/fgas/localization/fgas_locale.cpp
+++ b/xfa/fgas/localization/fgas_locale.cpp
@@ -629,14 +629,14 @@ FX_LOCALECATEGORY CFX_FormatString::GetCategory(
}
return eCategory;
}
-static FX_WORD FX_WStringToLCID(const FX_WCHAR* pstrLCID) {
+static uint16_t FX_WStringToLCID(const FX_WCHAR* pstrLCID) {
if (!pstrLCID) {
return 0;
}
wchar_t* pEnd;
- return (FX_WORD)wcstol((wchar_t*)pstrLCID, &pEnd, 16);
+ return (uint16_t)wcstol((wchar_t*)pstrLCID, &pEnd, 16);
}
-FX_WORD CFX_FormatString::GetLCID(const CFX_WideString& wsPattern) {
+uint16_t CFX_FormatString::GetLCID(const CFX_WideString& wsPattern) {
return FX_WStringToLCID(GetLocaleName(wsPattern));
}
CFX_WideString CFX_FormatString::GetLocaleName(
@@ -2386,7 +2386,7 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate,
}
} else if (dwSymbol == FXBSTR_ID(0, 0, 'M', '3')) {
CFX_WideString wsMonthNameAbbr;
- FX_WORD i = 0;
+ uint16_t i = 0;
for (; i < 12; i++) {
pLocale->GetMonthName(i, wsMonthNameAbbr, TRUE);
if (wsMonthNameAbbr.IsEmpty()) {
@@ -2403,7 +2403,7 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate,
}
} else if (dwSymbol == FXBSTR_ID(0, 0, 'M', '4')) {
CFX_WideString wsMonthName;
- FX_WORD i = 0;
+ uint16_t i = 0;
for (; i < 12; i++) {
pLocale->GetMonthName(i, wsMonthName, FALSE);
if (wsMonthName.IsEmpty()) {
@@ -2422,7 +2422,7 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate,
cc += 1;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'E', '3')) {
CFX_WideString wsDayNameAbbr;
- FX_WORD i = 0;
+ uint16_t i = 0;
for (; i < 7; i++) {
pLocale->GetDayName(i, wsDayNameAbbr, TRUE);
if (wsDayNameAbbr.IsEmpty()) {
@@ -2529,7 +2529,7 @@ static FX_BOOL FX_ParseLocaleTime(const CFX_WideString& wsTime,
uint8_t hour = 0;
uint8_t minute = 0;
uint8_t second = 0;
- FX_WORD millisecond = 0;
+ uint16_t millisecond = 0;
int32_t ccf = 0;
const FX_WCHAR* str = (const FX_WCHAR*)wsTime;
int len = wsTime.GetLength();
@@ -3768,7 +3768,7 @@ FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate,
int32_t year = 1900;
int32_t month = 1;
int32_t day = 1;
- FX_WORD wYear = 0;
+ uint16_t wYear = 0;
int cc_start = 0, cc = 0;
const FX_WCHAR* str = (const FX_WCHAR*)wsDate;
int len = wsDate.GetLength();
@@ -3851,7 +3851,7 @@ FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime,
uint8_t hour = 0;
uint8_t minute = 0;
uint8_t second = 0;
- FX_WORD millisecond = 0;
+ uint16_t millisecond = 0;
int cc_start = 0, cc = cc_start;
const FX_WCHAR* str = (const FX_WCHAR*)wsTime.GetPtr();
int len = wsTime.GetLength();
@@ -3923,7 +3923,7 @@ FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime,
datetime = datetime + ut;
return TRUE;
}
-static FX_WORD FX_GetSolarMonthDays(FX_WORD year, FX_WORD month) {
+static uint16_t FX_GetSolarMonthDays(uint16_t year, uint16_t month) {
if (month % 2) {
return 31;
} else if (month == 2) {
@@ -3931,9 +3931,9 @@ static FX_WORD FX_GetSolarMonthDays(FX_WORD year, FX_WORD month) {
}
return 30;
}
-static FX_WORD FX_GetWeekDay(FX_WORD year, FX_WORD month, FX_WORD day) {
- FX_WORD g_month_day[] = {0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5};
- FX_WORD nDays =
+static uint16_t FX_GetWeekDay(uint16_t year, uint16_t month, uint16_t day) {
+ uint16_t g_month_day[] = {0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5};
+ uint16_t nDays =
(year - 1) % 7 + (year - 1) / 4 - (year - 1) / 100 + (year - 1) / 400;
nDays += g_month_day[month - 1] + day;
if (FX_IsLeapYear(year) && month > 2) {
@@ -3941,9 +3941,9 @@ static FX_WORD FX_GetWeekDay(FX_WORD year, FX_WORD month, FX_WORD day) {
}
return nDays % 7;
}
-static FX_WORD FX_GetWeekOfMonth(FX_WORD year, FX_WORD month, FX_WORD day) {
- FX_WORD week_day = FX_GetWeekDay(year, month, 1);
- FX_WORD week_index = 0;
+static uint16_t FX_GetWeekOfMonth(uint16_t year, uint16_t month, uint16_t day) {
+ uint16_t week_day = FX_GetWeekDay(year, month, 1);
+ uint16_t week_index = 0;
week_index += day / 7;
day = day % 7;
if (week_day + day > 7) {
@@ -3951,14 +3951,14 @@ static FX_WORD FX_GetWeekOfMonth(FX_WORD year, FX_WORD month, FX_WORD day) {
}
return week_index;
}
-static FX_WORD FX_GetWeekOfYear(FX_WORD year, FX_WORD month, FX_WORD day) {
- FX_WORD nDays = 0;
- for (FX_WORD i = 1; i < month; i++) {
+static uint16_t FX_GetWeekOfYear(uint16_t year, uint16_t month, uint16_t day) {
+ uint16_t nDays = 0;
+ for (uint16_t i = 1; i < month; i++) {
nDays += FX_GetSolarMonthDays(year, i);
}
nDays += day;
- FX_WORD week_day = FX_GetWeekDay(year, 1, 1);
- FX_WORD week_index = 1;
+ uint16_t week_day = FX_GetWeekDay(year, 1, 1);
+ uint16_t week_index = 1;
week_index += nDays / 7;
nDays = nDays % 7;
if (week_day + nDays > 7) {
@@ -4002,7 +4002,7 @@ static FX_BOOL FX_DateFormat(const CFX_WideString& wsDatePattern,
wsDay.Format(L"%02d", day);
wsResult += wsDay;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'J', '1')) {
- FX_WORD nDays = 0;
+ uint16_t nDays = 0;
for (int i = 1; i < month; i++) {
nDays += FX_GetSolarMonthDays(year, i);
}
@@ -4011,7 +4011,7 @@ static FX_BOOL FX_DateFormat(const CFX_WideString& wsDatePattern,
wsDays.Format(L"%d", nDays);
wsResult += wsDays;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'J', '3')) {
- FX_WORD nDays = 0;
+ uint16_t nDays = 0;
for (int i = 1; i < month; i++) {
nDays += FX_GetSolarMonthDays(year, i);
}
@@ -4036,24 +4036,24 @@ static FX_BOOL FX_DateFormat(const CFX_WideString& wsDatePattern,
pLocale->GetMonthName(month - 1, wsTemp, FALSE);
wsResult += wsTemp;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'E', '1')) {
- FX_WORD wWeekDay = FX_GetWeekDay(year, month, day);
+ uint16_t wWeekDay = FX_GetWeekDay(year, month, day);
CFX_WideString wsWeekDay;
wsWeekDay.Format(L"%d", wWeekDay + 1);
wsResult += wsWeekDay;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'E', '3')) {
- FX_WORD wWeekDay = FX_GetWeekDay(year, month, day);
+ uint16_t wWeekDay = FX_GetWeekDay(year, month, day);
CFX_WideString wsTemp;
pLocale->GetDayName(wWeekDay, wsTemp, TRUE);
wsResult += wsTemp;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'E', '4')) {
- FX_WORD wWeekDay = FX_GetWeekDay(year, month, day);
+ uint16_t wWeekDay = FX_GetWeekDay(year, month, day);
if (pLocale) {
CFX_WideString wsTemp;
pLocale->GetDayName(wWeekDay, wsTemp, FALSE);
wsResult += wsTemp;
}
} else if (dwSymbol == FXBSTR_ID(0, 0, 'e', '1')) {
- FX_WORD wWeekDay = FX_GetWeekDay(year, month, day);
+ uint16_t wWeekDay = FX_GetWeekDay(year, month, day);
CFX_WideString wsWeekDay;
wsWeekDay.Format(L"%d", wWeekDay ? wWeekDay : 7);
wsResult += wsWeekDay;
@@ -4070,12 +4070,12 @@ static FX_BOOL FX_DateFormat(const CFX_WideString& wsDatePattern,
wsYear.Format(L"%d", year);
wsResult += wsYear;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'w', '1')) {
- FX_WORD week_index = FX_GetWeekOfMonth(year, month, day);
+ uint16_t week_index = FX_GetWeekOfMonth(year, month, day);
CFX_WideString wsWeekInMonth;
wsWeekInMonth.Format(L"%d", week_index);
wsResult += wsWeekInMonth;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'W', '2')) {
- FX_WORD week_index = FX_GetWeekOfYear(year, month, day);
+ uint16_t week_index = FX_GetWeekOfYear(year, month, day);
CFX_WideString wsWeekInYear;
wsWeekInYear.Format(L"%02d", week_index);
wsResult += wsWeekInYear;
@@ -4092,11 +4092,11 @@ static FX_BOOL FX_TimeFormat(const CFX_WideString& wsTimePattern,
uint8_t hour = datetime.GetHour();
uint8_t minute = datetime.GetMinute();
uint8_t second = datetime.GetSecond();
- FX_WORD millisecond = datetime.GetMillisecond();
+ uint16_t millisecond = datetime.GetMillisecond();
int32_t ccf = 0;
const FX_WCHAR* strf = (const FX_WCHAR*)wsTimePattern;
int32_t lenf = wsTimePattern.GetLength();
- FX_WORD wHour = hour;
+ uint16_t wHour = hour;
FX_BOOL bPM = FALSE;
if (wsTimePattern.Find('A') != -1) {
if (wHour >= 12) {
diff --git a/xfa/fgas/localization/fgas_locale.h b/xfa/fgas/localization/fgas_locale.h
index a7e14b3c26..3dd6c79fb7 100644
--- a/xfa/fgas/localization/fgas_locale.h
+++ b/xfa/fgas/localization/fgas_locale.h
@@ -87,13 +87,13 @@ class IFX_LocaleMgr {
public:
virtual ~IFX_LocaleMgr() {}
virtual void Release() = 0;
- virtual FX_WORD GetDefLocaleID() = 0;
+ virtual uint16_t GetDefLocaleID() = 0;
virtual IFX_Locale* GetDefLocale() = 0;
- virtual IFX_Locale* GetLocale(FX_WORD lcid) = 0;
+ virtual IFX_Locale* GetLocale(uint16_t lcid) = 0;
virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName) = 0;
};
IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath,
- FX_WORD wDefaultLCID);
+ uint16_t wDefaultLCID);
void FX_ParseNumString(const CFX_WideString& wsNum, CFX_WideString& wsResult);
FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate,
CFX_Unitime& datetime);
@@ -109,7 +109,7 @@ class IFX_FormatString {
virtual void SplitFormatString(const CFX_WideString& wsFormatString,
CFX_WideStringArray& wsPatterns) = 0;
virtual FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern) = 0;
- virtual FX_WORD GetLCID(const CFX_WideString& wsPattern) = 0;
+ virtual uint16_t GetLCID(const CFX_WideString& wsPattern) = 0;
virtual CFX_WideString GetLocaleName(const CFX_WideString& wsPattern) = 0;
virtual FX_BOOL ParseText(const CFX_WideString& wsSrcText,
const CFX_WideString& wsPattern,
diff --git a/xfa/fgas/localization/fgas_localeimp.h b/xfa/fgas/localization/fgas_localeimp.h
index f4b2b0ec8a..1eeaa418ca 100644
--- a/xfa/fgas/localization/fgas_localeimp.h
+++ b/xfa/fgas/localization/fgas_localeimp.h
@@ -52,7 +52,7 @@ class CFX_FormatString : public IFX_FormatString {
virtual void SplitFormatString(const CFX_WideString& wsFormatString,
CFX_WideStringArray& wsPatterns);
virtual FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern);
- virtual FX_WORD GetLCID(const CFX_WideString& wsPattern);
+ virtual uint16_t GetLCID(const CFX_WideString& wsPattern);
virtual CFX_WideString GetLocaleName(const CFX_WideString& wsPattern);
virtual FX_BOOL ParseText(const CFX_WideString& wsSrcText,
const CFX_WideString& wsPattern,
diff --git a/xfa/fgas/localization/fgas_localemgr.cpp b/xfa/fgas/localization/fgas_localemgr.cpp
index 4ed8ddb79a..02061f75f3 100644
--- a/xfa/fgas/localization/fgas_localemgr.cpp
+++ b/xfa/fgas/localization/fgas_localemgr.cpp
@@ -9,7 +9,7 @@
#include "core/include/fxcrt/fx_xml.h"
IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath,
- FX_WORD wDefaultLCID) {
+ uint16_t wDefaultLCID) {
void* pPathHandle = FX_OpenFolder(pszLocalPath);
if (!pPathHandle) {
return NULL;
@@ -53,7 +53,7 @@ IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath,
FX_CloseFolder(pPathHandle);
return pLocaleMgr;
}
-CFX_LocaleMgr::CFX_LocaleMgr(FX_WORD wDefLCID) : m_wDefLCID(wDefLCID) {}
+CFX_LocaleMgr::CFX_LocaleMgr(uint16_t wDefLCID) : m_wDefLCID(wDefLCID) {}
CFX_LocaleMgr::~CFX_LocaleMgr() {
FX_POSITION ps = m_lcid2locale.GetStartPosition();
while (ps) {
@@ -72,13 +72,13 @@ CFX_LocaleMgr::~CFX_LocaleMgr() {
}
m_lcid2xml.RemoveAll();
}
-FX_WORD CFX_LocaleMgr::GetDefLocaleID() {
+uint16_t CFX_LocaleMgr::GetDefLocaleID() {
return m_wDefLCID;
}
IFX_Locale* CFX_LocaleMgr::GetDefLocale() {
return GetLocale(m_wDefLCID);
}
-IFX_Locale* CFX_LocaleMgr::GetLocale(FX_WORD lcid) {
+IFX_Locale* CFX_LocaleMgr::GetLocale(uint16_t lcid) {
IFX_Locale* pLocale =
(IFX_Locale*)m_lcid2locale.GetValueAt((void*)(uintptr_t)lcid);
if (!pLocale) {
diff --git a/xfa/fgas/localization/fgas_localemgr.h b/xfa/fgas/localization/fgas_localemgr.h
index 5ae0d738cb..5f2647071b 100644
--- a/xfa/fgas/localization/fgas_localemgr.h
+++ b/xfa/fgas/localization/fgas_localemgr.h
@@ -11,18 +11,18 @@
class CFX_LocaleMgr : public IFX_LocaleMgr {
public:
- CFX_LocaleMgr(FX_WORD wDefLCID);
+ CFX_LocaleMgr(uint16_t wDefLCID);
virtual void Release() { delete this; }
- virtual FX_WORD GetDefLocaleID();
+ virtual uint16_t GetDefLocaleID();
virtual IFX_Locale* GetDefLocale();
- virtual IFX_Locale* GetLocale(FX_WORD lcid);
+ virtual IFX_Locale* GetLocale(uint16_t lcid);
virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName);
CFX_MapPtrToPtr m_lcid2xml;
protected:
~CFX_LocaleMgr();
CFX_MapPtrToPtr m_lcid2locale;
- FX_WORD m_wDefLCID;
+ uint16_t m_wDefLCID;
};
#endif // XFA_FGAS_LOCALIZATION_FGAS_LOCALEMGR_H_
diff --git a/xfa/fwl/basewidget/fwl_scrollbarimp.cpp b/xfa/fwl/basewidget/fwl_scrollbarimp.cpp
index 86c78890d8..6bab12be53 100644
--- a/xfa/fwl/basewidget/fwl_scrollbarimp.cpp
+++ b/xfa/fwl/basewidget/fwl_scrollbarimp.cpp
@@ -606,7 +606,7 @@ FX_BOOL CFWL_ScrollBarImp::SendEvent() {
return m_rtThumb.Contains(m_cpTrackPointX, m_cpTrackPointY);
}
if (m_iMouseWheel) {
- FX_WORD dwCode =
+ uint16_t dwCode =
m_iMouseWheel < 0 ? FWL_SCBCODE_StepForward : FWL_SCBCODE_StepBackward;
DoScroll(dwCode, m_fTrackPos);
}
diff --git a/xfa/fwl/theme/widgettp.cpp b/xfa/fwl/theme/widgettp.cpp
index 61b505f8d3..7d3f4626f6 100644
--- a/xfa/fwl/theme/widgettp.cpp
+++ b/xfa/fwl/theme/widgettp.cpp
@@ -676,13 +676,13 @@ FWLCOLOR CFWL_WidgetTP::BlendColor(FWLCOLOR srcColor,
FWLCOLOR dstColor;
uint8_t n = 255 - scale;
dstColor.a = (uint8_t)(
- ((FX_WORD)srcColor.a * n + (FX_WORD)renderColor.a * scale) >> 8);
+ ((uint16_t)srcColor.a * n + (uint16_t)renderColor.a * scale) >> 8);
dstColor.r = (uint8_t)(
- ((FX_WORD)srcColor.r * n + (FX_WORD)renderColor.r * scale) >> 8);
+ ((uint16_t)srcColor.r * n + (uint16_t)renderColor.r * scale) >> 8);
dstColor.g = (uint8_t)(
- ((FX_WORD)srcColor.g * n + (FX_WORD)renderColor.g * scale) >> 8);
+ ((uint16_t)srcColor.g * n + (uint16_t)renderColor.g * scale) >> 8);
dstColor.b = (uint8_t)(
- ((FX_WORD)srcColor.b * n + (FX_WORD)renderColor.b * scale) >> 8);
+ ((uint16_t)srcColor.b * n + (uint16_t)renderColor.b * scale) >> 8);
return dstColor;
}
CFWL_ArrowData::CFWL_ArrowData() : m_pColorData(NULL) {
@@ -714,13 +714,13 @@ CFWL_FontData::~CFWL_FontData() {
}
FX_BOOL CFWL_FontData::Equal(const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage) {
+ uint16_t wCodePage) {
return m_wsFamily == wsFontFamily && m_dwStyles == dwFontStyles &&
m_dwCodePage == wCodePage;
}
FX_BOOL CFWL_FontData::LoadFont(const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD dwCodePage) {
+ uint16_t dwCodePage) {
m_wsFamily = wsFontFamily;
m_dwStyles = dwFontStyles;
m_dwCodePage = dwCodePage;
@@ -751,7 +751,7 @@ CFWL_FontManager::CFWL_FontManager() {}
CFWL_FontManager::~CFWL_FontManager() {}
IFX_Font* CFWL_FontManager::FindFont(const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage) {
+ uint16_t wCodePage) {
for (const auto& pData : m_FontsArray) {
if (pData->Equal(wsFontFamily, dwFontStyles, wCodePage))
return pData->GetFont();
diff --git a/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp b/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
index f091de08b5..1c20b7c8a1 100644
--- a/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
@@ -183,20 +183,20 @@ CFX_WideString CBC_ErrorCorrection::createECCBlock(CFX_WideString codewords,
e = BCExceptionIllegalArgument;
return (FX_WCHAR*)"";
}
- FX_WORD* ecc = FX_Alloc(FX_WORD, numECWords);
- FXSYS_memset(ecc, 0, numECWords * sizeof(FX_WORD));
+ uint16_t* ecc = FX_Alloc(uint16_t, numECWords);
+ FXSYS_memset(ecc, 0, numECWords * sizeof(uint16_t));
for (int32_t l = start; l < start + len; l++) {
- FX_WORD m = ecc[numECWords - 1] ^ codewords.GetAt(l);
+ uint16_t m = ecc[numECWords - 1] ^ codewords.GetAt(l);
for (int32_t k = numECWords - 1; k > 0; k--) {
if (m != 0 && FACTORS[table][k] != 0) {
- ecc[k] = (FX_WORD)(ecc[k - 1] ^
- ALOG[(LOG[m] + LOG[FACTORS[table][k]]) % 255]);
+ ecc[k] = (uint16_t)(ecc[k - 1] ^
+ ALOG[(LOG[m] + LOG[FACTORS[table][k]]) % 255]);
} else {
ecc[k] = ecc[k - 1];
}
}
if (m != 0 && FACTORS[table][0] != 0) {
- ecc[0] = (FX_WORD)ALOG[(LOG[m] + LOG[FACTORS[table][0]]) % 255];
+ ecc[0] = (uint16_t)ALOG[(LOG[m] + LOG[FACTORS[table][0]]) % 255];
} else {
ecc[0] = 0;
}
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp b/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp
index d52648c683..04246bd5d8 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417DecodedBitStreamParser.cpp
@@ -361,7 +361,7 @@ int32_t CBC_DecodedBitStreamPaser::byteCompaction(int32_t mode,
if (mode == BYTE_COMPACTION_MODE_LATCH) {
int32_t count = 0;
int64_t value = 0;
- FX_WORD* decodedData = FX_Alloc(FX_WORD, 6);
+ uint16_t* decodedData = FX_Alloc(uint16_t, 6);
CFX_Int32Array byteCompactedCodewords;
byteCompactedCodewords.SetSize(6);
FX_BOOL end = FALSE;
@@ -383,7 +383,7 @@ int32_t CBC_DecodedBitStreamPaser::byteCompaction(int32_t mode,
if ((count % 5 == 0) && (count > 0)) {
int32_t j = 0;
for (; j < 6; ++j) {
- decodedData[5 - j] = (FX_WORD)(value % 256);
+ decodedData[5 - j] = (uint16_t)(value % 256);
value >>= 8;
}
for (j = 0; j < 6; ++j) {
@@ -398,7 +398,7 @@ int32_t CBC_DecodedBitStreamPaser::byteCompaction(int32_t mode,
byteCompactedCodewords[count++] = nextCode;
}
for (int32_t i = 0; i < count; i++) {
- result += (FX_CHAR)(FX_WORD)byteCompactedCodewords[i];
+ result += (FX_CHAR)(uint16_t)byteCompactedCodewords[i];
}
} else if (mode == BYTE_COMPACTION_MODE_LATCH_6) {
int32_t count = 0;
@@ -422,10 +422,10 @@ int32_t CBC_DecodedBitStreamPaser::byteCompaction(int32_t mode,
}
}
if ((count % 5 == 0) && (count > 0)) {
- FX_WORD* decodedData = FX_Alloc(FX_WORD, 6);
+ uint16_t* decodedData = FX_Alloc(uint16_t, 6);
int32_t j = 0;
for (; j < 6; ++j) {
- decodedData[5 - j] = (FX_WORD)(value & 0xFF);
+ decodedData[5 - j] = (uint16_t)(value & 0xFF);
value >>= 8;
}
for (j = 0; j < 6; ++j) {
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index d585e279ce..37d363f443 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -1310,7 +1310,7 @@ static void XFA_BOX_GetFillPath(CXFA_Box box,
const CXFA_StrokeArray& strokes,
CFX_RectF rtWidget,
CFX_Path& fillPath,
- FX_WORD dwFlags) {
+ uint16_t dwFlags) {
if (box.IsArc() || (dwFlags & XFA_DRAWBOX_ForceRound) != 0) {
CXFA_Edge edge = box.GetEdge(0);
FX_FLOAT fThickness = edge.GetThickness();
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index 5fc3ce97aa..25a291f093 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1765,7 +1765,7 @@ CXFA_DefFontMgr::~CXFA_DefFontMgr() {
IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage) {
+ uint16_t wCodePage) {
CFX_WideString wsFontName = wsFontFamily;
IFX_FontMgr* pFDEFontMgr =
static_cast<CXFA_FFDoc*>(hDoc)->GetApp()->GetFDEFontMgr();
@@ -1809,7 +1809,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc,
IFX_Font* CXFA_DefFontMgr::GetDefaultFont(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage) {
+ uint16_t wCodePage) {
IFX_FontMgr* pFDEFontMgr = ((CXFA_FFDoc*)hDoc)->GetApp()->GetFDEFontMgr();
IFX_Font* pFont =
pFDEFontMgr->LoadFont(L"Arial Narrow", dwFontStyles, wCodePage);
@@ -2021,7 +2021,7 @@ CXFA_FontMgr::~CXFA_FontMgr() {
IFX_Font* CXFA_FontMgr::GetFont(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage) {
+ uint16_t wCodePage) {
FX_DWORD dwHash = FX_HashCode_String_GetW(wsFontFamily.GetPtr(),
wsFontFamily.GetLength(), FALSE);
CFX_ByteString bsKey;
diff --git a/xfa/fxfa/app/xfa_fontmgr.h b/xfa/fxfa/app/xfa_fontmgr.h
index 44360796e9..09d42931a5 100644
--- a/xfa/fxfa/app/xfa_fontmgr.h
+++ b/xfa/fxfa/app/xfa_fontmgr.h
@@ -20,8 +20,8 @@ struct XFA_FONTINFO {
FX_DWORD dwFontNameHash;
const FX_WCHAR* pPsName;
const FX_WCHAR* pReplaceFont;
- FX_WORD dwStyles;
- FX_WORD wCodePage;
+ uint16_t dwStyles;
+ uint16_t wCodePage;
};
class CXFA_DefFontMgr : public IXFA_FontMgr {
@@ -33,11 +33,11 @@ class CXFA_DefFontMgr : public IXFA_FontMgr {
IFX_Font* GetFont(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage = 0xFFFF) override;
+ uint16_t wCodePage = 0xFFFF) override;
IFX_Font* GetDefaultFont(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage = 0xFFFF) override;
+ uint16_t wCodePage = 0xFFFF) override;
protected:
CFX_PtrArray m_CacheFonts;
@@ -83,7 +83,7 @@ class CXFA_FontMgr {
IFX_Font* GetFont(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage = 0xFFFF);
+ uint16_t wCodePage = 0xFFFF);
void LoadDocFonts(IXFA_Doc* hDoc);
void ReleaseDocFonts(IXFA_Doc* hDoc);
diff --git a/xfa/fxfa/parser/xfa_basic_data.cpp b/xfa/fxfa/parser/xfa_basic_data.cpp
index 58e71debd3..f8a26dc1cd 100644
--- a/xfa/fxfa/parser/xfa_basic_data.cpp
+++ b/xfa/fxfa/parser/xfa_basic_data.cpp
@@ -2242,7 +2242,7 @@ const XFA_ELEMENTHIERARCHY g_XFAElementChildrenIndex[] = {
{228, 0}, {228, 2}, {230, 0}, {230, 0}, {230, 0}, {230, 0}, {230, 0},
{230, 0}, {230, 0}, {230, 0}, {230, 10},
};
-const FX_WORD g_XFAElementChildrenData[] = {
+const uint16_t g_XFAElementChildrenData[] = {
XFA_ELEMENT_Extras,
XFA_ELEMENT_SubformSet,
XFA_ELEMENT_BreakBefore,
diff --git a/xfa/fxfa/parser/xfa_basic_data.h b/xfa/fxfa/parser/xfa_basic_data.h
index 8d36650a87..9bc6dcb23b 100644
--- a/xfa/fxfa/parser/xfa_basic_data.h
+++ b/xfa/fxfa/parser/xfa_basic_data.h
@@ -26,7 +26,7 @@ extern const XFA_ELEMENTINFO g_XFAElementData[];
extern const int32_t g_iXFAElementCount;
extern const XFA_ELEMENTHIERARCHY g_XFAElementChildrenIndex[];
-extern const FX_WORD g_XFAElementChildrenData[];
+extern const uint16_t g_XFAElementChildrenData[];
extern const XFA_ELEMENTHIERARCHY g_XFAElementAttributeIndex[];
extern const uint8_t g_XFAElementAttributeData[];
diff --git a/xfa/fxfa/parser/xfa_basic_imp.cpp b/xfa/fxfa/parser/xfa_basic_imp.cpp
index a6d4fc069a..61e2ab629b 100644
--- a/xfa/fxfa/parser/xfa_basic_imp.cpp
+++ b/xfa/fxfa/parser/xfa_basic_imp.cpp
@@ -213,7 +213,7 @@ const XFA_ELEMENTINFO* XFA_GetElementByName(const CFX_WideStringC& wsName) {
const XFA_ELEMENTINFO* XFA_GetElementByID(XFA_ELEMENT eName) {
return (eName < g_iXFAElementCount) ? (g_XFAElementData + eName) : NULL;
}
-const FX_WORD* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t& iCount) {
+const uint16_t* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t& iCount) {
if (eElement >= g_iXFAElementCount) {
return NULL;
}
@@ -252,11 +252,11 @@ const XFA_ELEMENTINFO* XFA_GetChildOfElement(XFA_ELEMENT eElement,
XFA_ELEMENT eChild,
FX_DWORD dwPacket) {
int32_t iCount = 0;
- const FX_WORD* pChild = XFA_GetElementChildren(eElement, iCount);
+ const uint16_t* pChild = XFA_GetElementChildren(eElement, iCount);
if (pChild == NULL || iCount < 1) {
return NULL;
}
- CFX_DSPATemplate<FX_WORD> search;
+ CFX_DSPATemplate<uint16_t> search;
int32_t index = search.Lookup(eChild, pChild, iCount);
if (index < 0) {
return NULL;
@@ -604,9 +604,9 @@ int32_t CXFA_WideTextRead::ReadString(FX_WCHAR* pStr,
bEOS = IsEOF();
return iMaxLength;
}
-FX_WORD CXFA_WideTextRead::GetCodePage() const {
+uint16_t CXFA_WideTextRead::GetCodePage() const {
return (sizeof(FX_WCHAR) == 2) ? FX_CODEPAGE_UTF16LE : FX_CODEPAGE_UTF32LE;
}
-FX_WORD CXFA_WideTextRead::SetCodePage(FX_WORD wCodePage) {
+uint16_t CXFA_WideTextRead::SetCodePage(uint16_t wCodePage) {
return GetCodePage();
}
diff --git a/xfa/fxfa/parser/xfa_basic_imp.h b/xfa/fxfa/parser/xfa_basic_imp.h
index 7e67d2b96e..d0440face1 100644
--- a/xfa/fxfa/parser/xfa_basic_imp.h
+++ b/xfa/fxfa/parser/xfa_basic_imp.h
@@ -48,8 +48,8 @@ class CXFA_WideTextRead : public IFX_Stream {
virtual FX_BOOL SetLength(int32_t iLength) { return FALSE; }
virtual int32_t GetBOM(uint8_t bom[4]) const { return 0; }
- virtual FX_WORD GetCodePage() const;
- virtual FX_WORD SetCodePage(FX_WORD wCodePage);
+ virtual uint16_t GetCodePage() const;
+ virtual uint16_t SetCodePage(uint16_t wCodePage);
virtual void Lock() {}
virtual void Unlock() {}
diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp
index c3ec203fa0..05706d4eb2 100644
--- a/xfa/fxfa/parser/xfa_localemgr.cpp
+++ b/xfa/fxfa/parser/xfa_localemgr.cpp
@@ -1060,8 +1060,8 @@ static IFX_Locale* XFA_GetLocaleFromBuffer(const uint8_t* pBuf, int nBufLen) {
}
return NULL;
}
-static FX_WORD XFA_GetLanguage(CFX_WideString wsLanguage) {
- FX_WORD dwLangueID = XFA_LANGID_en_US;
+static uint16_t XFA_GetLanguage(CFX_WideString wsLanguage) {
+ uint16_t dwLangueID = XFA_LANGID_en_US;
if (wsLanguage.GetLength() < 2) {
return dwLangueID;
}
@@ -1147,7 +1147,7 @@ CXFA_LocaleMgr::~CXFA_LocaleMgr() {
void CXFA_LocaleMgr::Release() {
delete this;
}
-FX_WORD CXFA_LocaleMgr::GetDefLocaleID() {
+uint16_t CXFA_LocaleMgr::GetDefLocaleID() {
return m_dwDeflcid;
}
IFX_Locale* CXFA_LocaleMgr::GetDefLocale() {
@@ -1163,7 +1163,7 @@ IFX_Locale* CXFA_LocaleMgr::GetDefLocale() {
m_XMLLocaleArray.Add(m_pDefLocale);
return m_pDefLocale;
}
-IFX_Locale* CXFA_LocaleMgr::GetLocale(FX_WORD lcid) {
+IFX_Locale* CXFA_LocaleMgr::GetLocale(uint16_t lcid) {
IFX_Locale* pLocal = NULL;
switch (lcid) {
case XFA_LANGID_zh_CN:
@@ -1236,7 +1236,7 @@ IFX_Locale* CXFA_LocaleMgr::GetLocaleByName(
return pLocale;
}
}
- FX_WORD dwLangueID = XFA_GetLanguage(wsLocaleName);
+ uint16_t dwLangueID = XFA_GetLanguage(wsLocaleName);
IFX_Locale* pLocale = GetLocale(dwLangueID);
if (pLocale)
m_XMLLocaleArray.Add(pLocale);
diff --git a/xfa/fxfa/parser/xfa_localemgr.h b/xfa/fxfa/parser/xfa_localemgr.h
index e296fc4663..a30d0cc1ad 100644
--- a/xfa/fxfa/parser/xfa_localemgr.h
+++ b/xfa/fxfa/parser/xfa_localemgr.h
@@ -35,9 +35,9 @@ class CXFA_LocaleMgr : public IFX_LocaleMgr {
public:
CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid);
virtual void Release();
- virtual FX_WORD GetDefLocaleID();
+ virtual uint16_t GetDefLocaleID();
virtual IFX_Locale* GetDefLocale();
- virtual IFX_Locale* GetLocale(FX_WORD lcid);
+ virtual IFX_Locale* GetLocale(uint16_t lcid);
virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName);
~CXFA_LocaleMgr();
void SetDefLocale(IFX_Locale* pLocale);
@@ -48,8 +48,8 @@ class CXFA_LocaleMgr : public IFX_LocaleMgr {
CFX_PtrArray m_XMLLocaleArray;
IFX_Locale* m_pDefLocale;
CFX_WideString m_wsConfigLocale;
- FX_WORD m_dwDeflcid;
- FX_WORD m_dwLocaleFlags;
+ uint16_t m_dwDeflcid;
+ uint16_t m_dwLocaleFlags;
};
class IXFA_TimeZoneProvider {
diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp
index 8b3efa5951..b7ee9d48ad 100644
--- a/xfa/fxfa/parser/xfa_localevalue.cpp
+++ b/xfa/fxfa/parser/xfa_localevalue.cpp
@@ -591,16 +591,16 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalValue(const CFX_WideString& wsValue,
}
FX_BOOL CXFA_LocaleValue::ValidateCanonicalDate(const CFX_WideString& wsDate,
CFX_Unitime& unDate) {
- const FX_WORD LastDay[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
- const FX_WORD wCountY = 4, wCountM = 2, wCountD = 2;
+ const uint16_t LastDay[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+ const uint16_t wCountY = 4, wCountM = 2, wCountD = 2;
int nLen = wsDate.GetLength();
if (nLen < wCountY || nLen > wCountY + wCountM + wCountD + 2) {
return FALSE;
}
const bool bSymbol = wsDate.Find(0x2D) != -1;
- FX_WORD wYear = 0;
- FX_WORD wMonth = 0;
- FX_WORD wDay = 0;
+ uint16_t wYear = 0;
+ uint16_t wMonth = 0;
+ uint16_t wDay = 0;
const FX_WCHAR* pDate = (const FX_WCHAR*)wsDate;
int nIndex = 0, nStart = 0;
while (pDate[nIndex] != '\0' && nIndex < wCountY) {
@@ -678,15 +678,15 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalTime(const CFX_WideString& wsTime) {
int nLen = wsTime.GetLength();
if (nLen < 2)
return FALSE;
- const FX_WORD wCountH = 2;
- const FX_WORD wCountM = 2;
- const FX_WORD wCountS = 2;
- const FX_WORD wCountF = 3;
+ const uint16_t wCountH = 2;
+ const uint16_t wCountM = 2;
+ const uint16_t wCountS = 2;
+ const uint16_t wCountF = 3;
const bool bSymbol = wsTime.Find(':') != -1;
- FX_WORD wHour = 0;
- FX_WORD wMinute = 0;
- FX_WORD wSecond = 0;
- FX_WORD wFraction = 0;
+ uint16_t wHour = 0;
+ uint16_t wMinute = 0;
+ uint16_t wSecond = 0;
+ uint16_t wFraction = 0;
const FX_WCHAR* pTime = (const FX_WCHAR*)wsTime;
int nIndex = 0;
int nStart = 0;
diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h
index 96dfeee39e..e50d6ab46f 100644
--- a/xfa/fxfa/parser/xfa_object.h
+++ b/xfa/fxfa/parser/xfa_object.h
@@ -585,7 +585,7 @@ class CXFA_Node : public CXFA_Object {
XFA_ATTRIBUTE eAttribute);
protected:
- CXFA_Node(CXFA_Document* pDoc, FX_WORD ePacket, XFA_ELEMENT eElement);
+ CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_ELEMENT eElement);
~CXFA_Node();
friend class CXFA_Document;
CXFA_Node* Deprecated_GetPrevSibling();
@@ -640,7 +640,7 @@ class CXFA_Node : public CXFA_Object {
CXFA_Node* m_pParent;
IFDE_XMLNode* m_pXMLNode;
XFA_ELEMENT m_eNodeClass;
- FX_WORD m_ePacket;
+ uint16_t m_ePacket;
FX_DWORD m_dwNameHash;
CXFA_Node* m_pAuxNode;
XFA_MAPMODULEDATA* m_pMapModuleData;
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index f65e304066..368e919e11 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -85,7 +85,9 @@ static XFA_MAPDATABLOCKCALLBACKINFO deleteWideStringCallBack = {
static XFA_OBJECTTYPE XFA_GetElementObjectType(XFA_ELEMENT eElement) {
return (XFA_OBJECTTYPE)XFA_GetElementByID(eElement)->eObjectType;
}
-CXFA_Node::CXFA_Node(CXFA_Document* pDoc, FX_WORD ePacket, XFA_ELEMENT eElement)
+CXFA_Node::CXFA_Node(CXFA_Document* pDoc,
+ uint16_t ePacket,
+ XFA_ELEMENT eElement)
: CXFA_Object(pDoc, XFA_GetElementObjectType(eElement)),
m_pNext(nullptr),
m_pChild(nullptr),
diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp
index f27e3a6c0f..638ce8b248 100644
--- a/xfa/fxfa/parser/xfa_parser_imp.cpp
+++ b/xfa/fxfa/parser/xfa_parser_imp.cpp
@@ -73,7 +73,7 @@ int32_t CXFA_SimpleParser::StartParse(IFX_FileRead* pStream,
if (m_pStream == NULL) {
return XFA_PARSESTATUS_StreamErr;
}
- FX_WORD wCodePage = m_pStream->GetCodePage();
+ uint16_t wCodePage = m_pStream->GetCodePage();
if (wCodePage != FX_CODEPAGE_UTF16LE && wCodePage != FX_CODEPAGE_UTF16BE &&
wCodePage != FX_CODEPAGE_UTF8) {
m_pStream->SetCodePage(FX_CODEPAGE_UTF8);
diff --git a/xfa/fxfa/parser/xfa_parser_imp.h b/xfa/fxfa/parser/xfa_parser_imp.h
index 136cae6744..f01ffa2123 100644
--- a/xfa/fxfa/parser/xfa_parser_imp.h
+++ b/xfa/fxfa/parser/xfa_parser_imp.h
@@ -119,8 +119,8 @@ class CXFA_XMLParser : public IFDE_XMLParser {
FX_FILESIZE m_nStart[2];
size_t m_nSize[2];
FX_FILESIZE m_nElementStart;
- FX_WORD m_dwCheckStatus;
- FX_WORD m_dwCurrentCheckStatus;
+ uint16_t m_dwCheckStatus;
+ uint16_t m_dwCurrentCheckStatus;
protected:
IFDE_XMLNode* m_pRoot;
diff --git a/xfa/include/fwl/theme/widgettp.h b/xfa/include/fwl/theme/widgettp.h
index b451d4f373..1585db9ce2 100644
--- a/xfa/include/fwl/theme/widgettp.h
+++ b/xfa/include/fwl/theme/widgettp.h
@@ -181,10 +181,10 @@ class CFWL_FontData {
virtual ~CFWL_FontData();
FX_BOOL Equal(const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage);
+ uint16_t wCodePage);
FX_BOOL LoadFont(const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage);
+ uint16_t wCodePage);
IFX_Font* GetFont() const { return m_pFont; }
protected:
@@ -205,7 +205,7 @@ class CFWL_FontManager {
IFX_Font* FindFont(const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD dwCodePage);
+ uint16_t dwCodePage);
protected:
CFWL_FontManager();
diff --git a/xfa/include/fxfa/fxfa.h b/xfa/include/fxfa/fxfa.h
index 202d616f07..0015ae443d 100644
--- a/xfa/include/fxfa/fxfa.h
+++ b/xfa/include/fxfa/fxfa.h
@@ -296,11 +296,11 @@ class IXFA_FontMgr {
virtual IFX_Font* GetFont(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage = 0xFFFF) = 0;
+ uint16_t wCodePage = 0xFFFF) = 0;
virtual IFX_Font* GetDefaultFont(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
- FX_WORD wCodePage = 0xFFFF) = 0;
+ uint16_t wCodePage = 0xFFFF) = 0;
};
class IXFA_App {
public:
diff --git a/xfa/include/fxfa/fxfa_basic.h b/xfa/include/fxfa/fxfa_basic.h
index dba3522dc4..5c0c5db935 100644
--- a/xfa/include/fxfa/fxfa_basic.h
+++ b/xfa/include/fxfa/fxfa_basic.h
@@ -969,20 +969,20 @@ CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement,
XFA_ATTRIBUTE eAttribute,
FX_DWORD dwPacket);
struct XFA_ELEMENTHIERARCHY {
- FX_WORD wStart;
- FX_WORD wCount;
+ uint16_t wStart;
+ uint16_t wCount;
};
struct XFA_SCRIPTHIERARCHY {
- FX_WORD wMethodStart;
- FX_WORD wMethodCount;
- FX_WORD wAttributeStart;
- FX_WORD wAttributeCount;
+ uint16_t wMethodStart;
+ uint16_t wMethodCount;
+ uint16_t wAttributeStart;
+ uint16_t wAttributeCount;
int16_t wParentIndex;
};
typedef XFA_SCRIPTHIERARCHY const* XFA_LPCSCRIPTHIERARCHY;
-const FX_WORD* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t& iCount);
+const uint16_t* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t& iCount);
const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t& iCount);
const XFA_ELEMENTINFO* XFA_GetChildOfElement(XFA_ELEMENT eElement,
XFA_ELEMENT eChild,
@@ -993,7 +993,7 @@ const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_ELEMENT eElement,
#define XFA_PROPERTYFLAG_OneOf 0x01
#define XFA_PROPERTYFLAG_DefaultOneOf 0x02
struct XFA_PROPERTY {
- FX_WORD eName;
+ uint16_t eName;
uint8_t uOccur;
uint8_t uFlags;
};
@@ -1070,7 +1070,7 @@ struct XFA_SCRIPTATTRIBUTEINFO {
const FX_WCHAR* pName;
XFA_ATTRIBUTE_CALLBACK lpfnCallback;
int32_t eAttribute;
- FX_WORD eValueType;
+ uint16_t eValueType;
};
const XFA_SCRIPTATTRIBUTEINFO* XFA_GetScriptAttributeByName(
XFA_ELEMENT eElement,