| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 if (!pFT || eType >= FX_CHARTYPE_ArabicNormal) | 244 if (!pFT || eType >= FX_CHARTYPE_ArabicNormal) |
| 245 eType = FX_CHARTYPE_Unknown; | 245 eType = FX_CHARTYPE_Unknown; |
| 246 | 246 |
| 247 return pFT; | 247 return pFT; |
| 248 } | 248 } |
| 249 | 249 |
| 250 } // namespace | 250 } // namespace |
| 251 | 251 |
| 252 const FX_ARBFORMTABLE* FX_GetArabicFormTable(FX_WCHAR unicode) { | 252 const FX_ARBFORMTABLE* FX_GetArabicFormTable(FX_WCHAR unicode) { |
| 253 if (unicode < 0x622 || unicode > 0x6d5) { | 253 if (unicode < 0x622 || unicode > 0x6d5) { |
| 254 return NULL; | 254 return nullptr; |
| 255 } | 255 } |
| 256 return g_FX_ArabicFormTables + unicode - 0x622; | 256 return g_FX_ArabicFormTables + unicode - 0x622; |
| 257 } | 257 } |
| 258 FX_WCHAR FX_GetArabicFromAlefTable(FX_WCHAR alef) { | 258 FX_WCHAR FX_GetArabicFromAlefTable(FX_WCHAR alef) { |
| 259 static const int32_t s_iAlefCount = | 259 static const int32_t s_iAlefCount = |
| 260 sizeof(gs_FX_AlefTable) / sizeof(FX_ARAALEF); | 260 sizeof(gs_FX_AlefTable) / sizeof(FX_ARAALEF); |
| 261 for (int32_t iStart = 0; iStart < s_iAlefCount; iStart++) { | 261 for (int32_t iStart = 0; iStart < s_iAlefCount; iStart++) { |
| 262 const FX_ARAALEF& v = gs_FX_AlefTable[iStart]; | 262 const FX_ARAALEF& v = gs_FX_AlefTable[iStart]; |
| 263 if (v.wAlef == alef) { | 263 if (v.wAlef == alef) { |
| 264 return v.wIsolated; | 264 return v.wIsolated; |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 } | 741 } |
| 742 }; | 742 }; |
| 743 void FX_BidiLine(CFX_TxtCharArray& chars, int32_t iCount, int32_t iBaseLevel) { | 743 void FX_BidiLine(CFX_TxtCharArray& chars, int32_t iCount, int32_t iBaseLevel) { |
| 744 CFX_BidiLineTemplate<CFX_TxtChar> blt; | 744 CFX_BidiLineTemplate<CFX_TxtChar> blt; |
| 745 blt.FX_BidiLine(chars, iCount, iBaseLevel); | 745 blt.FX_BidiLine(chars, iCount, iBaseLevel); |
| 746 } | 746 } |
| 747 void FX_BidiLine(CFX_RTFCharArray& chars, int32_t iCount, int32_t iBaseLevel) { | 747 void FX_BidiLine(CFX_RTFCharArray& chars, int32_t iCount, int32_t iBaseLevel) { |
| 748 CFX_BidiLineTemplate<CFX_RTFChar> blt; | 748 CFX_BidiLineTemplate<CFX_RTFChar> blt; |
| 749 blt.FX_BidiLine(chars, iCount, iBaseLevel); | 749 blt.FX_BidiLine(chars, iCount, iBaseLevel); |
| 750 } | 750 } |
| OLD | NEW |