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

Side by Side Diff: core/include/fpdfapi/fpdf_resource.h

Issue 1408063016: Fix a leak in CPDF_Type3Font::LoadChar(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@parser_b268
Patch Set: Created 5 years, 1 month 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 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
8 #define CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ 8 #define CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
9 9
10 #include <map>
11
10 #include "../fxcrt/fx_system.h" 12 #include "../fxcrt/fx_system.h"
11 #include "../fxge/fx_font.h" 13 #include "../fxge/fx_font.h"
12 #include "fpdf_parser.h" 14 #include "fpdf_parser.h"
13 15
14 class CFX_CTTGSUBTable; 16 class CFX_CTTGSUBTable;
15 class CFX_DIBitmap; 17 class CFX_DIBitmap;
16 class CFX_Font; 18 class CFX_Font;
17 class CFX_SubstFont; 19 class CFX_SubstFont;
18 class CPDF_CID2UnicodeMap; 20 class CPDF_CID2UnicodeMap;
19 class CPDF_CIDFont; 21 class CPDF_CIDFont;
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 CFX_AffineMatrix m_FontMatrix; 405 CFX_AffineMatrix m_FontMatrix;
404 406
405 private: 407 private:
406 FX_BOOL _Load() override; 408 FX_BOOL _Load() override;
407 void LoadGlyphMap() override {} 409 void LoadGlyphMap() override {}
408 410
409 int m_CharWidthL[256]; 411 int m_CharWidthL[256];
410 CPDF_Dictionary* m_pCharProcs; 412 CPDF_Dictionary* m_pCharProcs;
411 CPDF_Dictionary* m_pPageResources; 413 CPDF_Dictionary* m_pPageResources;
412 CPDF_Dictionary* m_pFontResources; 414 CPDF_Dictionary* m_pFontResources;
413 CFX_MapPtrToPtr m_CacheMap; 415 std::map<FX_DWORD, CPDF_Type3Char*> m_CacheMap;
414 CFX_MapPtrToPtr m_DeletedMap;
415 }; 416 };
416 417
417 enum CIDSet { 418 enum CIDSet {
418 CIDSET_UNKNOWN, 419 CIDSET_UNKNOWN,
419 CIDSET_GB1, 420 CIDSET_GB1,
420 CIDSET_CNS1, 421 CIDSET_CNS1,
421 CIDSET_JAPAN1, 422 CIDSET_JAPAN1,
422 CIDSET_KOREA1, 423 CIDSET_KOREA1,
423 CIDSET_UNICODE, 424 CIDSET_UNICODE,
424 CIDSET_NUM_SETS 425 CIDSET_NUM_SETS
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 855
855 FX_BOOL m_bInterpolate; 856 FX_BOOL m_bInterpolate;
856 857
857 CPDF_Document* m_pDocument; 858 CPDF_Document* m_pDocument;
858 859
859 CPDF_Dictionary* m_pOC; 860 CPDF_Dictionary* m_pOC;
860 CPDF_Dictionary* InitJPEG(uint8_t* pData, FX_DWORD size); 861 CPDF_Dictionary* InitJPEG(uint8_t* pData, FX_DWORD size);
861 }; 862 };
862 863
863 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ 864 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698