summaryrefslogtreecommitdiff
path: root/xfa/src
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 /xfa/src
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 'xfa/src')
-rw-r--r--xfa/src/fgas/src/layout/fx_linebreak.cpp10
-rw-r--r--xfa/src/fgas/src/layout/fx_rtfbreak.cpp5
-rw-r--r--xfa/src/fgas/src/layout/fx_textbreak.cpp5
3 files changed, 7 insertions, 13 deletions
diff --git a/xfa/src/fgas/src/layout/fx_linebreak.cpp b/xfa/src/fgas/src/layout/fx_linebreak.cpp
index 3eef550a02..76fc222195 100644
--- a/xfa/src/fgas/src/layout/fx_linebreak.cpp
+++ b/xfa/src/fgas/src/layout/fx_linebreak.cpp
@@ -5,7 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../fgas_base.h"
-extern const FX_DWORD gs_FX_TextLayout_CodeProperties[65536];
+
extern 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,
FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB,
@@ -273,11 +273,11 @@ void FX_GetLineBreakPositions(const FX_WCHAR* pwsText,
FX_DWORD dwCur, dwNext;
FX_WCHAR wch;
wch = *pwsText++;
- dwCur = gs_FX_TextLayout_CodeProperties[(FX_WORD)wch] & 0x003F;
+ dwCur = kTextLayoutCodeProperties[(FX_WORD)wch] & 0x003F;
iLength--;
for (int32_t i = 0; i < iLength; i++) {
wch = *pwsText++;
- dwNext = gs_FX_TextLayout_CodeProperties[(FX_WORD)wch] & 0x003F;
+ dwNext = kTextLayoutCodeProperties[(FX_WORD)wch] & 0x003F;
if (dwNext == FX_CBP_SP) {
pBrkType[i] = FX_LBT_PROHIBITED_BRK;
} else {
@@ -298,11 +298,11 @@ void FX_GetLineBreakPositions(const FX_WCHAR* pwsText,
FX_DWORD dwCur, dwNext;
FX_WCHAR wch;
wch = *pwsText++;
- dwCur = gs_FX_TextLayout_CodeProperties[(FX_WORD)wch] & 0x003F;
+ dwCur = kTextLayoutCodeProperties[(FX_WORD)wch] & 0x003F;
iLength--;
for (int32_t i = 0; i < iLength; i++) {
wch = *pwsText++;
- dwNext = gs_FX_TextLayout_CodeProperties[(FX_WORD)wch] & 0x003F;
+ dwNext = kTextLayoutCodeProperties[(FX_WORD)wch] & 0x003F;
if (dwNext == FX_CBP_SP) {
eType = FX_LBT_PROHIBITED_BRK;
} else {
diff --git a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
index a341c2574f..4e1866b8e4 100644
--- a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
+++ b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp
@@ -7,9 +7,6 @@
#include "../fgas_base.h"
#include "fx_unicode.h"
#include "fx_rtfbreak.h"
-extern const FX_DWORD gs_FX_TextLayout_CodeProperties[65536];
-extern const FX_WCHAR gs_FX_TextLayout_VerticalMirror[64];
-extern const FX_WCHAR gs_FX_TextLayout_BidiMirror[512];
extern const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32];
IFX_RTFBreak* IFX_RTFBreak::Create(FX_DWORD dwPolicies) {
return new CFX_RTFBreak(dwPolicies);
@@ -349,7 +346,7 @@ FX_DWORD CFX_RTFBreak::AppendChar(FX_WCHAR wch) {
if (m_bCharCode) {
return AppendChar_CharCode(wch);
}
- FX_DWORD dwProps = gs_FX_TextLayout_CodeProperties[(FX_WORD)wch];
+ FX_DWORD dwProps = kTextLayoutCodeProperties[(FX_WORD)wch];
FX_DWORD dwType = (dwProps & FX_CHARTYPEBITSMASK);
CFX_RTFCharArray& tca = m_pCurLine->m_LineChars;
CFX_RTFChar* pCurChar = tca.AddSpace();
diff --git a/xfa/src/fgas/src/layout/fx_textbreak.cpp b/xfa/src/fgas/src/layout/fx_textbreak.cpp
index 05f5510ccd..461ac03d47 100644
--- a/xfa/src/fgas/src/layout/fx_textbreak.cpp
+++ b/xfa/src/fgas/src/layout/fx_textbreak.cpp
@@ -9,9 +9,6 @@
#include "fx_unicode.h"
#include "fx_textbreak.h"
-extern const FX_DWORD gs_FX_TextLayout_CodeProperties[65536];
-extern const FX_WCHAR gs_FX_TextLayout_VerticalMirror[64];
-extern const FX_WCHAR gs_FX_TextLayout_BidiMirror[512];
extern const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32];
IFX_TxtBreak* IFX_TxtBreak::Create(FX_DWORD dwPolicies) {
return new CFX_TxtBreak(dwPolicies);
@@ -569,7 +566,7 @@ static const FX_TxtBreak_LPFAppendChar g_FX_TxtBreak_lpfAppendChar[16] = {
&CFX_TxtBreak::AppendChar_Others, &CFX_TxtBreak::AppendChar_Others,
};
FX_DWORD CFX_TxtBreak::AppendChar(FX_WCHAR wch) {
- FX_DWORD dwProps = gs_FX_TextLayout_CodeProperties[(FX_WORD)wch];
+ FX_DWORD dwProps = kTextLayoutCodeProperties[(FX_WORD)wch];
FX_DWORD dwType = (dwProps & FX_CHARTYPEBITSMASK);
CFX_TxtChar* pCurChar = m_pCurLine->m_pLineChars->AddSpace();
pCurChar->m_wCharCode = (FX_WORD)wch;