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/fx_arabic.h" | 7 #include "core/fxcrt/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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 return v.wIsolated; | 142 return v.wIsolated; |
143 } | 143 } |
144 } | 144 } |
145 return shadda; | 145 return shadda; |
146 } | 146 } |
147 | 147 |
148 IFX_ArabicChar* IFX_ArabicChar::Create() { | 148 IFX_ArabicChar* IFX_ArabicChar::Create() { |
149 return new CFX_ArabicChar; | 149 return new CFX_ArabicChar; |
150 } | 150 } |
151 FX_BOOL CFX_ArabicChar::IsArabicChar(FX_WCHAR wch) const { | 151 FX_BOOL CFX_ArabicChar::IsArabicChar(FX_WCHAR wch) const { |
152 FX_DWORD dwRet = | 152 uint32_t dwRet = |
153 kTextLayoutCodeProperties[(uint16_t)wch] & FX_CHARTYPEBITSMASK; | 153 kTextLayoutCodeProperties[(uint16_t)wch] & FX_CHARTYPEBITSMASK; |
154 return dwRet >= FX_CHARTYPE_ArabicAlef; | 154 return dwRet >= FX_CHARTYPE_ArabicAlef; |
155 } | 155 } |
156 FX_BOOL CFX_ArabicChar::IsArabicFormChar(FX_WCHAR wch) const { | 156 FX_BOOL CFX_ArabicChar::IsArabicFormChar(FX_WCHAR wch) const { |
157 return (kTextLayoutCodeProperties[(uint16_t)wch] & FX_CHARTYPEBITSMASK) == | 157 return (kTextLayoutCodeProperties[(uint16_t)wch] & FX_CHARTYPEBITSMASK) == |
158 FX_CHARTYPE_ArabicForm; | 158 FX_CHARTYPE_ArabicForm; |
159 } | 159 } |
160 FX_WCHAR CFX_ArabicChar::GetFormChar(FX_WCHAR wch, | 160 FX_WCHAR CFX_ArabicChar::GetFormChar(FX_WCHAR wch, |
161 FX_WCHAR prev, | 161 FX_WCHAR prev, |
162 FX_WCHAR next) const { | 162 FX_WCHAR next) const { |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 } | 961 } |
962 }; | 962 }; |
963 void FX_BidiLine(CFX_TxtCharArray& chars, int32_t iCount, int32_t iBaseLevel) { | 963 void FX_BidiLine(CFX_TxtCharArray& chars, int32_t iCount, int32_t iBaseLevel) { |
964 CFX_BidiLineTemplate<CFX_TxtChar> blt; | 964 CFX_BidiLineTemplate<CFX_TxtChar> blt; |
965 blt.FX_BidiLine(chars, iCount, iBaseLevel); | 965 blt.FX_BidiLine(chars, iCount, iBaseLevel); |
966 } | 966 } |
967 void FX_BidiLine(CFX_RTFCharArray& chars, int32_t iCount, int32_t iBaseLevel) { | 967 void FX_BidiLine(CFX_RTFCharArray& chars, int32_t iCount, int32_t iBaseLevel) { |
968 CFX_BidiLineTemplate<CFX_RTFChar> blt; | 968 CFX_BidiLineTemplate<CFX_RTFChar> blt; |
969 blt.FX_BidiLine(chars, iCount, iBaseLevel); | 969 blt.FX_BidiLine(chars, iCount, iBaseLevel); |
970 } | 970 } |
OLD | NEW |