| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "core/fxcrt/include/fx_arabic.h" | 7 #include "core/fxcrt/include/fx_arabic.h" |
| 8 #include "core/fxcrt/include/fx_ucd.h" | 8 #include "core/fxcrt/include/fx_ucd.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 if (!pFT || eType >= FX_CHARTYPE_ArabicNormal) | 128 if (!pFT || eType >= FX_CHARTYPE_ArabicNormal) |
| 129 eType = FX_CHARTYPE_Unknown; | 129 eType = FX_CHARTYPE_Unknown; |
| 130 | 130 |
| 131 return pFT; | 131 return pFT; |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace | 134 } // namespace |
| 135 | 135 |
| 136 const FX_ARBFORMTABLE* FX_GetArabicFormTable(FX_WCHAR unicode) { | 136 const FX_ARBFORMTABLE* FX_GetArabicFormTable(FX_WCHAR unicode) { |
| 137 if (unicode < 0x622 || unicode > 0x6d5) { | 137 if (unicode < 0x622 || unicode > 0x6d5) { |
| 138 return NULL; | 138 return nullptr; |
| 139 } | 139 } |
| 140 return g_FX_ArabicFormTables + unicode - 0x622; | 140 return g_FX_ArabicFormTables + unicode - 0x622; |
| 141 } | 141 } |
| 142 FX_WCHAR FX_GetArabicFromAlefTable(FX_WCHAR alef) { | 142 FX_WCHAR FX_GetArabicFromAlefTable(FX_WCHAR alef) { |
| 143 static const int32_t s_iAlefCount = | 143 static const int32_t s_iAlefCount = |
| 144 sizeof(gs_FX_AlefTable) / sizeof(FX_ARAALEF); | 144 sizeof(gs_FX_AlefTable) / sizeof(FX_ARAALEF); |
| 145 for (int32_t iStart = 0; iStart < s_iAlefCount; iStart++) { | 145 for (int32_t iStart = 0; iStart < s_iAlefCount; iStart++) { |
| 146 const FX_ARAALEF& v = gs_FX_AlefTable[iStart]; | 146 const FX_ARAALEF& v = gs_FX_AlefTable[iStart]; |
| 147 if (v.wAlef == alef) { | 147 if (v.wAlef == alef) { |
| 148 return v.wIsolated; | 148 return v.wIsolated; |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 } | 964 } |
| 965 }; | 965 }; |
| 966 void FX_BidiLine(CFX_TxtCharArray& chars, int32_t iCount, int32_t iBaseLevel) { | 966 void FX_BidiLine(CFX_TxtCharArray& chars, int32_t iCount, int32_t iBaseLevel) { |
| 967 CFX_BidiLineTemplate<CFX_TxtChar> blt; | 967 CFX_BidiLineTemplate<CFX_TxtChar> blt; |
| 968 blt.FX_BidiLine(chars, iCount, iBaseLevel); | 968 blt.FX_BidiLine(chars, iCount, iBaseLevel); |
| 969 } | 969 } |
| 970 void FX_BidiLine(CFX_RTFCharArray& chars, int32_t iCount, int32_t iBaseLevel) { | 970 void FX_BidiLine(CFX_RTFCharArray& chars, int32_t iCount, int32_t iBaseLevel) { |
| 971 CFX_BidiLineTemplate<CFX_RTFChar> blt; | 971 CFX_BidiLineTemplate<CFX_RTFChar> blt; |
| 972 blt.FX_BidiLine(chars, iCount, iBaseLevel); | 972 blt.FX_BidiLine(chars, iCount, iBaseLevel); |
| 973 } | 973 } |
| OLD | NEW |