From 47a90b894ecca2d3547226169602d7f8729d564f Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 31 Aug 2017 14:53:44 -0400 Subject: More BIDI code shuffling Change-Id: I6df7e7d1283541ea2e6b9bcf3de172f6a886054a Reviewed-on: https://pdfium-review.googlesource.com/12731 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fgas/layout/cfx_rtfbreak.cpp | 14 ++++++++------ xfa/fgas/layout/cfx_txtbreak.cpp | 5 +++-- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'xfa/fgas') diff --git a/xfa/fgas/layout/cfx_rtfbreak.cpp b/xfa/fgas/layout/cfx_rtfbreak.cpp index a097361d95..be5780fc7a 100644 --- a/xfa/fgas/layout/cfx_rtfbreak.cpp +++ b/xfa/fgas/layout/cfx_rtfbreak.cpp @@ -565,16 +565,18 @@ int32_t CFX_RTFBreak::GetBreakPos(std::vector& tca, uint32_t nCur = nCodeProp & 0x003F; bool bNeedBreak = false; FX_LINEBREAKTYPE eType; - if (nCur == FX_CBP_TB) { + if (nCur == kBreakPropertyTB) { bNeedBreak = true; - eType = nNext == FX_CBP_TB ? FX_LBT_PROHIBITED_BRK - : gs_FX_LineBreak_PairTable[nCur][nNext]; + eType = nNext == kBreakPropertyTB + ? FX_LBT_PROHIBITED_BRK + : gs_FX_LineBreak_PairTable[nCur][nNext]; } else { - if (nCur == FX_CBP_SP) + if (nCur == kBreakPropertySpace) bNeedBreak = true; - eType = nNext == FX_CBP_SP ? FX_LBT_PROHIBITED_BRK - : gs_FX_LineBreak_PairTable[nCur][nNext]; + eType = nNext == kBreakPropertySpace + ? FX_LBT_PROHIBITED_BRK + : gs_FX_LineBreak_PairTable[nCur][nNext]; } if (bAllChars) pCur->m_nBreakType = eType; diff --git a/xfa/fgas/layout/cfx_txtbreak.cpp b/xfa/fgas/layout/cfx_txtbreak.cpp index 3ba7640904..2ea64d2bd5 100644 --- a/xfa/fgas/layout/cfx_txtbreak.cpp +++ b/xfa/fgas/layout/cfx_txtbreak.cpp @@ -548,14 +548,15 @@ int32_t CFX_TxtBreak::GetBreakPos(std::vector& ca, pCur = &ca[iLength]; nCodeProp = pCur->char_props(); nCur = nCodeProp & 0x003F; - if (nNext == FX_CBP_SP) + if (nNext == kBreakPropertySpace) eType = FX_LBT_PROHIBITED_BRK; else eType = gs_FX_LineBreak_PairTable[nCur][nNext]; if (bAllChars) pCur->m_nBreakType = static_cast(eType); if (!bOnlyBrk) { - if (m_bSingleLine || iEndPos <= m_iLineWidth || nCur == FX_CBP_SP) { + if (m_bSingleLine || iEndPos <= m_iLineWidth || + nCur == kBreakPropertySpace) { if (eType == FX_LBT_DIRECT_BRK && iBreak < 0) { iBreak = iLength; iBreakPos = iEndPos; -- cgit v1.2.3