Chromium Code Reviews| 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 "../../../include/fpdfapi/fpdf_module.h" | 7 #include "../../../include/fpdfapi/fpdf_module.h" |
| 8 #include "../../../include/fpdfapi/fpdf_page.h" | 8 #include "../../../include/fpdfapi/fpdf_page.h" |
| 9 #include "../../../include/fpdfapi/fpdf_pageobj.h" | 9 #include "../../../include/fpdfapi/fpdf_pageobj.h" |
| 10 #include "../../../include/fpdfapi/fpdf_resource.h" | 10 #include "../../../include/fpdfapi/fpdf_resource.h" |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 CPDF_FontGlobals::~CPDF_FontGlobals() { | 31 CPDF_FontGlobals::~CPDF_FontGlobals() { |
| 32 ClearAll(); | 32 ClearAll(); |
| 33 FX_Free(m_pContrastRamps); | 33 FX_Free(m_pContrastRamps); |
| 34 } | 34 } |
| 35 class CFX_StockFontArray { | 35 class CFX_StockFontArray { |
| 36 public: | 36 public: |
| 37 CFX_StockFontArray() { | 37 CFX_StockFontArray() { |
| 38 FXSYS_memset(m_pStockFonts, 0, sizeof(m_pStockFonts)); | 38 FXSYS_memset(m_pStockFonts, 0, sizeof(m_pStockFonts)); |
| 39 } | 39 } |
| 40 ~CFX_StockFontArray() { | 40 ~CFX_StockFontArray() { |
| 41 for (int i = 0; i < FX_ArraySize(m_pStockFonts); i++) { | 41 for (size_t i = 0; i < FX_ArraySize(m_pStockFonts); i++) { |
| 42 if (!m_pStockFonts[i]) | 42 if (!m_pStockFonts[i]) |
| 43 continue; | 43 continue; |
| 44 CPDF_Dictionary* pFontDict = m_pStockFonts[i]->GetFontDict(); | 44 CPDF_Dictionary* pFontDict = m_pStockFonts[i]->GetFontDict(); |
| 45 if (pFontDict) | 45 if (pFontDict) |
| 46 pFontDict->Release(); | 46 pFontDict->Release(); |
| 47 delete m_pStockFonts[i]; | 47 delete m_pStockFonts[i]; |
| 48 } | 48 } |
| 49 } | 49 } |
| 50 CPDF_Font* GetFont(int index) const { | 50 CPDF_Font* GetFont(int index) const { |
| 51 if (index < 0 || index >= FX_ArraySize(m_pStockFonts)) | 51 if (index < 0 || index >= FX_ArraySize(m_pStockFonts)) |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 586 ch = 0; | 586 ch = 0; |
| 587 } | 587 } |
| 588 } | 588 } |
| 589 return result; | 589 return result; |
| 590 } | 590 } |
| 591 if (buf[0] == '(') { | 591 if (buf[0] == '(') { |
| 592 } | 592 } |
| 593 return result; | 593 return result; |
| 594 } | 594 } |
| 595 void CPDF_ToUnicodeMap::Load(CPDF_Stream* pStream) { | 595 void CPDF_ToUnicodeMap::Load(CPDF_Stream* pStream) { |
| 596 int CIDSet = 0; | 596 size_t CIDSet = 0; |
|
Tom Sepez
2015/09/25 16:06:37
Shouldn't this be CIDSET_UNKNOW?
| |
| 597 CPDF_StreamAcc stream; | 597 CPDF_StreamAcc stream; |
| 598 stream.LoadAllData(pStream, FALSE); | 598 stream.LoadAllData(pStream, FALSE); |
| 599 CPDF_SimpleParser parser(stream.GetData(), stream.GetSize()); | 599 CPDF_SimpleParser parser(stream.GetData(), stream.GetSize()); |
| 600 while (1) { | 600 while (1) { |
| 601 CFX_ByteStringC word = parser.GetWord(); | 601 CFX_ByteStringC word = parser.GetWord(); |
| 602 if (word.IsEmpty()) { | 602 if (word.IsEmpty()) { |
| 603 break; | 603 break; |
| 604 } | 604 } |
| 605 if (word == FX_BSTRC("beginbfchar")) { | 605 if (word == FX_BSTRC("beginbfchar")) { |
| 606 while (1) { | 606 while (1) { |
| (...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1780 CPDF_Type3Char::CPDF_Type3Char() { | 1780 CPDF_Type3Char::CPDF_Type3Char() { |
| 1781 m_pForm = NULL; | 1781 m_pForm = NULL; |
| 1782 m_pBitmap = NULL; | 1782 m_pBitmap = NULL; |
| 1783 m_bPageRequired = FALSE; | 1783 m_bPageRequired = FALSE; |
| 1784 m_bColored = FALSE; | 1784 m_bColored = FALSE; |
| 1785 } | 1785 } |
| 1786 CPDF_Type3Char::~CPDF_Type3Char() { | 1786 CPDF_Type3Char::~CPDF_Type3Char() { |
| 1787 delete m_pForm; | 1787 delete m_pForm; |
| 1788 delete m_pBitmap; | 1788 delete m_pBitmap; |
| 1789 } | 1789 } |
| OLD | NEW |