summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn3
-rw-r--r--core/fpdftext/cpdf_textpage.cpp2
-rw-r--r--core/fxcrt/cfx_char.h2
-rw-r--r--core/fxcrt/fx_arabic.cpp2
-rw-r--r--core/fxcrt/fx_bidi.cpp2
-rw-r--r--core/fxcrt/fx_ucddata.cpp3
-rw-r--r--core/fxcrt/fx_ucddata.h18
-rw-r--r--core/fxcrt/fx_unicode.cpp4
-rw-r--r--core/fxcrt/fx_unicode.h (renamed from core/fxcrt/fx_ucd.h)12
-rw-r--r--xfa/fgas/layout/cfx_linebreak.cpp2
-rw-r--r--xfa/fgas/layout/cfx_rtfbreak.h2
-rw-r--r--xfa/fgas/layout/cfx_txtbreak.cpp2
12 files changed, 35 insertions, 19 deletions
diff --git a/BUILD.gn b/BUILD.gn
index c7b86ea411..ddb0d5e8e2 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -850,9 +850,10 @@ static_library("fxcrt") {
"core/fxcrt/fx_string.h",
"core/fxcrt/fx_system.cpp",
"core/fxcrt/fx_system.h",
- "core/fxcrt/fx_ucd.h",
"core/fxcrt/fx_ucddata.cpp",
+ "core/fxcrt/fx_ucddata.h",
"core/fxcrt/fx_unicode.cpp",
+ "core/fxcrt/fx_unicode.h",
"core/fxcrt/ifx_fileaccess.h",
"core/fxcrt/ifx_pauseindicator.h",
"core/fxcrt/xml/cxml_attritem.cpp",
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index ffc3729af4..3006ebce2b 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -21,7 +21,7 @@
#include "core/fpdftext/unicodenormalizationdata.h"
#include "core/fxcrt/fx_bidi.h"
#include "core/fxcrt/fx_extension.h"
-#include "core/fxcrt/fx_ucd.h"
+#include "core/fxcrt/fx_unicode.h"
#include "third_party/base/stl_util.h"
namespace {
diff --git a/core/fxcrt/cfx_char.h b/core/fxcrt/cfx_char.h
index 009e87b388..74f0a4f9cd 100644
--- a/core/fxcrt/cfx_char.h
+++ b/core/fxcrt/cfx_char.h
@@ -9,7 +9,7 @@
#include <stdint.h>
-#include "core/fxcrt/fx_ucd.h"
+#include "core/fxcrt/fx_unicode.h"
enum class CFX_BreakType { None = 0, Piece, Line, Paragraph, Page };
diff --git a/core/fxcrt/fx_arabic.cpp b/core/fxcrt/fx_arabic.cpp
index d9804ba4a9..0d6f0395a6 100644
--- a/core/fxcrt/fx_arabic.cpp
+++ b/core/fxcrt/fx_arabic.cpp
@@ -10,7 +10,7 @@
#include <vector>
#include "core/fxcrt/fx_memory.h"
-#include "core/fxcrt/fx_ucd.h"
+#include "core/fxcrt/fx_unicode.h"
#include "third_party/base/stl_util.h"
namespace {
diff --git a/core/fxcrt/fx_bidi.cpp b/core/fxcrt/fx_bidi.cpp
index 5b5b1982cc..b7c7cacad8 100644
--- a/core/fxcrt/fx_bidi.cpp
+++ b/core/fxcrt/fx_bidi.cpp
@@ -8,7 +8,7 @@
#include <algorithm>
-#include "core/fxcrt/fx_ucd.h"
+#include "core/fxcrt/fx_unicode.h"
#include "third_party/base/ptr_util.h"
#ifdef PDF_ENABLE_XFA
diff --git a/core/fxcrt/fx_ucddata.cpp b/core/fxcrt/fx_ucddata.cpp
index 1f28bfbd37..527eacfdbd 100644
--- a/core/fxcrt/fx_ucddata.cpp
+++ b/core/fxcrt/fx_ucddata.cpp
@@ -4,8 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "core/fxcrt/fx_ucddata.h"
+
#include "core/fxcrt/fx_memory.h"
-#include "core/fxcrt/fx_ucd.h"
const uint32_t kTextLayoutCodeProperties[] = {
0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93,
diff --git a/core/fxcrt/fx_ucddata.h b/core/fxcrt/fx_ucddata.h
new file mode 100644
index 0000000000..78a6b970cc
--- /dev/null
+++ b/core/fxcrt/fx_ucddata.h
@@ -0,0 +1,18 @@
+// Copyright 2017 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 CORE_FXCRT_FX_UCDDATA_H_
+#define CORE_FXCRT_FX_UCDDATA_H_
+
+#include "core/fxcrt/fx_system.h"
+
+extern const uint32_t kTextLayoutCodeProperties[];
+extern const size_t kTextLayoutCodePropertiesSize;
+
+extern const uint16_t kFXTextLayoutBidiMirror[];
+extern const size_t kFXTextLayoutBidiMirrorSize;
+
+#endif // CORE_FXCRT_FX_UCDDATA_H_
diff --git a/core/fxcrt/fx_unicode.cpp b/core/fxcrt/fx_unicode.cpp
index f23200491a..aafdba15ee 100644
--- a/core/fxcrt/fx_unicode.cpp
+++ b/core/fxcrt/fx_unicode.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/fxcrt/fx_ucd.h"
+#include "core/fxcrt/fx_unicode.h"
+
+#include "core/fxcrt/fx_ucddata.h"
namespace {
diff --git a/core/fxcrt/fx_ucd.h b/core/fxcrt/fx_unicode.h
index bca830fc0f..a4a237ae6d 100644
--- a/core/fxcrt/fx_ucd.h
+++ b/core/fxcrt/fx_unicode.h
@@ -4,17 +4,11 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef CORE_FXCRT_FX_UCD_H_
-#define CORE_FXCRT_FX_UCD_H_
+#ifndef CORE_FXCRT_FX_UNICODE_H_
+#define CORE_FXCRT_FX_UNICODE_H_
#include "core/fxcrt/cfx_retain_ptr.h"
-extern const uint32_t kTextLayoutCodeProperties[];
-extern const size_t kTextLayoutCodePropertiesSize;
-
-extern const uint16_t kFXTextLayoutBidiMirror[];
-extern const size_t kFXTextLayoutBidiMirrorSize;
-
uint32_t FX_GetUnicodeProperties(wchar_t wch);
wchar_t FX_GetMirrorChar(wchar_t wch);
@@ -51,4 +45,4 @@ wchar_t FX_GetMirrorChar(wchar_t wch, uint32_t dwProps);
#endif // PDF_ENABLE_XFA
-#endif // CORE_FXCRT_FX_UCD_H_
+#endif // CORE_FXCRT_FX_UNICODE_H_
diff --git a/xfa/fgas/layout/cfx_linebreak.cpp b/xfa/fgas/layout/cfx_linebreak.cpp
index 9531bc55b0..14352481bd 100644
--- a/xfa/fgas/layout/cfx_linebreak.cpp
+++ b/xfa/fgas/layout/cfx_linebreak.cpp
@@ -6,7 +6,7 @@
#include "xfa/fgas/layout/cfx_linebreak.h"
-#include "core/fxcrt/fx_ucd.h"
+#include "core/fxcrt/fx_unicode.h"
const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32] = {
{FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB,
diff --git a/xfa/fgas/layout/cfx_rtfbreak.h b/xfa/fgas/layout/cfx_rtfbreak.h
index 5151f4f6db..699815ab98 100644
--- a/xfa/fgas/layout/cfx_rtfbreak.h
+++ b/xfa/fgas/layout/cfx_rtfbreak.h
@@ -12,7 +12,7 @@
#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/fx_coordinates.h"
-#include "core/fxcrt/fx_ucd.h"
+#include "core/fxcrt/fx_unicode.h"
#include "core/fxge/cfx_renderdevice.h"
#include "xfa/fgas/layout/cfx_break.h"
#include "xfa/fxfa/cxfa_textuserdata.h"
diff --git a/xfa/fgas/layout/cfx_txtbreak.cpp b/xfa/fgas/layout/cfx_txtbreak.cpp
index 2ea64d2bd5..c30b4a1704 100644
--- a/xfa/fgas/layout/cfx_txtbreak.cpp
+++ b/xfa/fgas/layout/cfx_txtbreak.cpp
@@ -202,7 +202,7 @@ CFX_BreakType CFX_TxtBreak::AppendChar_Others(CFX_Char* pCurChar) {
}
CFX_BreakType CFX_TxtBreak::AppendChar(wchar_t wch) {
- uint32_t dwProps = kTextLayoutCodeProperties[static_cast<uint16_t>(wch)];
+ uint32_t dwProps = FX_GetUnicodeProperties(wch);
FX_CHARTYPE chartype = GetCharTypeFromProp(dwProps);
m_pCurLine->m_LineChars.emplace_back(wch, dwProps, m_iHorizontalScale,
m_iVerticalScale);