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/fpdfapi/fpdf_font/fpdf_font_cid.cpp

Issue 1801383002: Re-enable several MSVC warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address more comments 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
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/fpdfapi/fpdf_font/font_int.h" 7 #include "core/fpdfapi/fpdf_font/font_int.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/ttgsubtable.h" 10 #include "core/fpdfapi/fpdf_font/ttgsubtable.h"
(...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 } 1578 }
1579 void CPDF_CIDFont::LoadSubstFont() { 1579 void CPDF_CIDFont::LoadSubstFont() {
1580 m_Font.LoadSubst(m_BaseFont, !m_bType1, m_Flags, m_StemV * 5, m_ItalicAngle, 1580 m_Font.LoadSubst(m_BaseFont, !m_bType1, m_Flags, m_StemV * 5, m_ItalicAngle,
1581 g_CharsetCPs[m_Charset], IsVertWriting()); 1581 g_CharsetCPs[m_Charset], IsVertWriting());
1582 } 1582 }
1583 void CPDF_CIDFont::LoadMetricsArray(CPDF_Array* pArray, 1583 void CPDF_CIDFont::LoadMetricsArray(CPDF_Array* pArray,
1584 CFX_DWordArray& result, 1584 CFX_DWordArray& result,
1585 int nElements) { 1585 int nElements) {
1586 int width_status = 0; 1586 int width_status = 0;
1587 int iCurElement = 0; 1587 int iCurElement = 0;
1588 int first_code = 0, last_code; 1588 int first_code = 0;
1589 int last_code = 0;
1589 FX_DWORD count = pArray->GetCount(); 1590 FX_DWORD count = pArray->GetCount();
1590 for (FX_DWORD i = 0; i < count; i++) { 1591 for (FX_DWORD i = 0; i < count; i++) {
1591 CPDF_Object* pObj = pArray->GetElementValue(i); 1592 CPDF_Object* pObj = pArray->GetElementValue(i);
1592 if (!pObj) 1593 if (!pObj)
1593 continue; 1594 continue;
1594 1595
1595 if (CPDF_Array* pArray = pObj->AsArray()) { 1596 if (CPDF_Array* pArray = pObj->AsArray()) {
1596 if (width_status != 1) 1597 if (width_status != 1)
1597 return; 1598 return;
1598 1599
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 1668
1668 const uint8_t* CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const { 1669 const uint8_t* CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const {
1669 if (m_Charset != CIDSET_JAPAN1 || m_pFontFile) 1670 if (m_Charset != CIDSET_JAPAN1 || m_pFontFile)
1670 return nullptr; 1671 return nullptr;
1671 1672
1672 const struct CIDTransform* found = (const struct CIDTransform*)FXSYS_bsearch( 1673 const struct CIDTransform* found = (const struct CIDTransform*)FXSYS_bsearch(
1673 &CID, g_Japan1_VertCIDs, FX_ArraySize(g_Japan1_VertCIDs), 1674 &CID, g_Japan1_VertCIDs, FX_ArraySize(g_Japan1_VertCIDs),
1674 sizeof(g_Japan1_VertCIDs[0]), CompareCIDTransform); 1675 sizeof(g_Japan1_VertCIDs[0]), CompareCIDTransform);
1675 return found ? &found->a : nullptr; 1676 return found ? &found->a : nullptr;
1676 } 1677 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698