Remove direct dependence between fm2js/ and third_party/icu
The remainder of the codebase calls through fx_extension.h to
get this functionality, so fm2js should do the same.
Change-Id: I1f92b1b5138863a225c2c6efd325b603de3e50b4
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/63950
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fxfa/fm2js/BUILD.gn b/xfa/fxfa/fm2js/BUILD.gn
index ff33e10..7782b39 100644
--- a/xfa/fxfa/fm2js/BUILD.gn
+++ b/xfa/fxfa/fm2js/BUILD.gn
@@ -22,7 +22,6 @@
]
deps = [
"../../../core/fxcrt",
- "//third_party/icu:icuuc",
]
configs += [
"../../../:pdfium_core_config",
diff --git a/xfa/fxfa/fm2js/cxfa_fmlexer.cpp b/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
index 11157a2..efb59f2 100644
--- a/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmlexer.cpp
@@ -9,7 +9,6 @@
#include <algorithm>
#include "core/fxcrt/fx_extension.h"
-#include "third_party/icu/source/common/unicode/uchar.h"
namespace {
@@ -19,14 +18,14 @@
}
bool IsIdentifierCharacter(wchar_t c) {
- return u_isalnum(c) || c == 0x005F || // '_'
- c == 0x0024; // '$'
+ return FXSYS_iswalnum(c) || c == 0x005F || // '_'
+ c == 0x0024; // '$'
}
bool IsInitialIdentifierCharacter(wchar_t c) {
- return u_isalpha(c) || c == 0x005F || // '_'
- c == 0x0024 || // '$'
- c == 0x0021; // '!'
+ return FXSYS_iswalpha(c) || c == 0x005F || // '_'
+ c == 0x0024 || // '$'
+ c == 0x0021; // '!'
}
bool IsWhitespaceCharacter(wchar_t c) {