Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Unified Diff: core/src/fxcrt/fx_arabic.cpp

Issue 1409223002: fxcrt convergence - XFA side. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: GN. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fxcrt/fx_ucd.h ('k') | core/src/fxcrt/fx_basic_gcc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcrt/fx_arabic.cpp
diff --git a/core/src/fxcrt/fx_arabic.cpp b/core/src/fxcrt/fx_arabic.cpp
index ab736f97690509fe3a0c4fe658542fac6c9bdae2..139e9f1f48fae163e906f949b4bffd0659693c24 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) {
« no previous file with comments | « core/include/fxcrt/fx_ucd.h ('k') | core/src/fxcrt/fx_basic_gcc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698