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

Side by Side Diff: core/fpdfapi/fpdf_font/cpdf_cidfont.cpp

Issue 1832113003: Replace CFX_DWordArray with CFX_ArrayTemplate<FX_DWORD>. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Re-upload Created 4 years, 9 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/fpdfapi/fpdf_font/cpdf_cidfont.h ('k') | core/fpdfapi/fpdf_parser/cpdf_data_avail.h » ('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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/fpdfapi/fpdf_font/cpdf_cidfont.h" 7 #include "core/fpdfapi/fpdf_font/cpdf_cidfont.h"
8 8
9 #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" 9 #include "core/fpdfapi/fpdf_cmaps/cmap_int.h"
10 #include "core/fpdfapi/fpdf_font/font_int.h" 10 #include "core/fpdfapi/fpdf_font/font_int.h"
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 return TRUE; 805 return TRUE;
806 } 806 }
807 FX_BOOL CPDF_CIDFont::IsFontStyleFromCharCode(FX_DWORD charcode) const { 807 FX_BOOL CPDF_CIDFont::IsFontStyleFromCharCode(FX_DWORD charcode) const {
808 return TRUE; 808 return TRUE;
809 } 809 }
810 void CPDF_CIDFont::LoadSubstFont() { 810 void CPDF_CIDFont::LoadSubstFont() {
811 m_Font.LoadSubst(m_BaseFont, !m_bType1, m_Flags, m_StemV * 5, m_ItalicAngle, 811 m_Font.LoadSubst(m_BaseFont, !m_bType1, m_Flags, m_StemV * 5, m_ItalicAngle,
812 g_CharsetCPs[m_Charset], IsVertWriting()); 812 g_CharsetCPs[m_Charset], IsVertWriting());
813 } 813 }
814 void CPDF_CIDFont::LoadMetricsArray(CPDF_Array* pArray, 814 void CPDF_CIDFont::LoadMetricsArray(CPDF_Array* pArray,
815 CFX_DWordArray& result, 815 CFX_ArrayTemplate<FX_DWORD>& result,
816 int nElements) { 816 int nElements) {
817 int width_status = 0; 817 int width_status = 0;
818 int iCurElement = 0; 818 int iCurElement = 0;
819 int first_code = 0; 819 int first_code = 0;
820 int last_code = 0; 820 int last_code = 0;
821 FX_DWORD count = pArray->GetCount(); 821 FX_DWORD count = pArray->GetCount();
822 for (FX_DWORD i = 0; i < count; i++) { 822 for (FX_DWORD i = 0; i < count; i++) {
823 CPDF_Object* pObj = pArray->GetElementValue(i); 823 CPDF_Object* pObj = pArray->GetElementValue(i);
824 if (!pObj) 824 if (!pObj)
825 continue; 825 continue;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 899
900 const uint8_t* CPDF_CIDFont::GetCIDTransform(uint16_t CID) const { 900 const uint8_t* CPDF_CIDFont::GetCIDTransform(uint16_t CID) const {
901 if (m_Charset != CIDSET_JAPAN1 || m_pFontFile) 901 if (m_Charset != CIDSET_JAPAN1 || m_pFontFile)
902 return nullptr; 902 return nullptr;
903 903
904 const struct CIDTransform* found = (const struct CIDTransform*)FXSYS_bsearch( 904 const struct CIDTransform* found = (const struct CIDTransform*)FXSYS_bsearch(
905 &CID, g_Japan1_VertCIDs, FX_ArraySize(g_Japan1_VertCIDs), 905 &CID, g_Japan1_VertCIDs, FX_ArraySize(g_Japan1_VertCIDs),
906 sizeof(g_Japan1_VertCIDs[0]), CompareCIDTransform); 906 sizeof(g_Japan1_VertCIDs[0]), CompareCIDTransform);
907 return found ? &found->a : nullptr; 907 return found ? &found->a : nullptr;
908 } 908 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_font/cpdf_cidfont.h ('k') | core/fpdfapi/fpdf_parser/cpdf_data_avail.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698