summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/fpdf_parser')
-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
3 files changed, 7 insertions, 7 deletions
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);