Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: core/fxcrt/fx_arabic.cpp

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix a bad merge Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fxcodec/lgif/fx_gif.cpp ('k') | core/fxcrt/fx_basic_array.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « core/fxcodec/lgif/fx_gif.cpp ('k') | core/fxcrt/fx_basic_array.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698