From 5a5180ef4d6d2c169fc168c13912a1043d0e8a7e Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 20 May 2016 13:24:30 -0700 Subject: Use std::map in CXFA_FontMgr and CXFA_PDFFontMgr Review-Url: https://codereview.chromium.org/2005473002 --- xfa/fxfa/include/xfa_fontmgr.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'xfa/fxfa/include') diff --git a/xfa/fxfa/include/xfa_fontmgr.h b/xfa/fxfa/include/xfa_fontmgr.h index c7358a4c2a..d2e731769a 100644 --- a/xfa/fxfa/include/xfa_fontmgr.h +++ b/xfa/fxfa/include/xfa_fontmgr.h @@ -8,6 +8,7 @@ #define XFA_FXFA_INCLUDE_XFA_FONTMGR_H_ #include +#include #include "core/fxcrt/include/fx_ext.h" #include "core/fxcrt/include/fx_system.h" @@ -55,7 +56,7 @@ class CXFA_PDFFontMgr { FX_WCHAR wUnicode, int32_t& iWidth, FX_BOOL bCharCode); - CFX_MapPtrToPtr m_FDE2PDFFont; + std::map m_FDE2PDFFont; protected: IFX_Font* FindFont(CFX_ByteString strFamilyName, @@ -80,20 +81,18 @@ class CXFA_FontMgr { public: CXFA_FontMgr(); ~CXFA_FontMgr(); + IFX_Font* GetFont(CXFA_FFDoc* hDoc, const CFX_WideStringC& wsFontFamily, uint32_t dwFontStyles, uint16_t wCodePage = 0xFFFF); void LoadDocFonts(CXFA_FFDoc* hDoc); void ReleaseDocFonts(CXFA_FFDoc* hDoc); - void SetDefFontMgr(CXFA_DefFontMgr* pFontMgr); protected: - void DelAllMgrMap(); - - CFX_MapPtrToPtr m_PDFFontMgrArray; CXFA_DefFontMgr* m_pDefFontMgr; + std::map> m_PDFFontMgrMap; std::map m_FontMap; }; -- cgit v1.2.3