summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_arabic.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-16 14:18:50 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-16 14:18:50 -0700
commit24e733ef26280268ac6ede6d73fac7475aedd1a9 (patch)
treeb067396d52855d4e7a63d040fd99029f76ac6b94 /core/src/fxcrt/fx_arabic.cpp
parentdb0be96179f0cd5f1787564cbccf86320a4d54ae (diff)
downloadpdfium-24e733ef26280268ac6ede6d73fac7475aedd1a9.tar.xz
fxcrt convergence - XFA side.
Take extern tables portion only of fx_bidi change. Take itoa fixes and corresponding unit test. Merge typo in skia font mgr. Kill some null checks after new. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1409223002 .
Diffstat (limited to 'core/src/fxcrt/fx_arabic.cpp')
-rw-r--r--core/src/fxcrt/fx_arabic.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/core/src/fxcrt/fx_arabic.cpp b/core/src/fxcrt/fx_arabic.cpp
index ab736f9769..139e9f1f48 100644
--- a/core/src/fxcrt/fx_arabic.cpp
+++ b/core/src/fxcrt/fx_arabic.cpp
@@ -7,7 +7,6 @@
#include "../../include/fxcrt/fx_ucd.h"
#include "fx_arabic.h"
-extern const FX_DWORD gs_FX_TextLayout_CodeProperties[65536];
#ifdef __cplusplus
extern "C" {
#endif
@@ -149,19 +148,19 @@ IFX_ArabicChar* IFX_ArabicChar::Create() {
}
FX_BOOL CFX_ArabicChar::IsArabicChar(FX_WCHAR wch) const {
FX_DWORD dwRet =
- (gs_FX_TextLayout_CodeProperties[(FX_WORD)wch] & FX_CHARTYPEBITSMASK);
+ kTextLayoutCodeProperties[(FX_WORD)wch] & FX_CHARTYPEBITSMASK;
return dwRet >= FX_CHARTYPE_ArabicAlef;
}
FX_BOOL CFX_ArabicChar::IsArabicFormChar(FX_WCHAR wch) const {
- return (gs_FX_TextLayout_CodeProperties[(FX_WORD)wch] &
- FX_CHARTYPEBITSMASK) == FX_CHARTYPE_ArabicForm;
+ return (kTextLayoutCodeProperties[(FX_WORD)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, gs_FX_TextLayout_CodeProperties[(FX_WORD)wch]);
- CFX_Char p(prev, gs_FX_TextLayout_CodeProperties[(FX_WORD)prev]);
- CFX_Char n(next, gs_FX_TextLayout_CodeProperties[(FX_WORD)next]);
+ CFX_Char c(wch, kTextLayoutCodeProperties[(FX_WORD)wch]);
+ CFX_Char p(prev, kTextLayoutCodeProperties[(FX_WORD)prev]);
+ CFX_Char n(next, kTextLayoutCodeProperties[(FX_WORD)next]);
return GetFormChar(&c, &p, &n);
}
FX_WCHAR CFX_ArabicChar::GetFormChar(const CFX_Char* cur,
@@ -260,17 +259,17 @@ void FX_BidiClassify(const CFX_WideString& wsText,
if (bWS) {
for (int32_t i = 0; i < iCount; i++) {
wch = *pwsStart++;
- iCls = ((gs_FX_TextLayout_CodeProperties[(FX_WORD)wch] &
- FX_BIDICLASSBITSMASK) >>
- FX_BIDICLASSBITS);
+ iCls =
+ ((kTextLayoutCodeProperties[(FX_WORD)wch] & FX_BIDICLASSBITSMASK) >>
+ FX_BIDICLASSBITS);
classes.SetAt(i, iCls);
}
} else {
for (int32_t i = 0; i < iCount; i++) {
wch = *pwsStart++;
- iCls = ((gs_FX_TextLayout_CodeProperties[(FX_WORD)wch] &
- FX_BIDICLASSBITSMASK) >>
- FX_BIDICLASSBITS);
+ iCls =
+ ((kTextLayoutCodeProperties[(FX_WORD)wch] & FX_BIDICLASSBITSMASK) >>
+ FX_BIDICLASSBITS);
classes.SetAt(i, gc_FX_BidiNTypes[iCls]);
}
}
@@ -1070,7 +1069,7 @@ void CFX_BidiChar::SetPolicy(FX_BOOL bSeparateNeutral) {
}
FX_BOOL CFX_BidiChar::AppendChar(FX_WCHAR wch) {
- FX_DWORD dwProps = gs_FX_TextLayout_CodeProperties[(FX_WORD)wch];
+ FX_DWORD dwProps = kTextLayoutCodeProperties[(FX_WORD)wch];
int32_t iBidiCls = (dwProps & FX_BIDICLASSBITSMASK) >> FX_BIDICLASSBITS;
int32_t iContext = 0;
switch (iBidiCls) {