diff options
author | tsepez <tsepez@chromium.org> | 2016-05-20 13:24:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-20 13:24:30 -0700 |
commit | 5a5180ef4d6d2c169fc168c13912a1043d0e8a7e (patch) | |
tree | c922701e0fc6fd6bf8ac236aa25efb1d476aece6 /xfa/fxfa/include | |
parent | 1b99b2dcde9d8bf1a5944a7e0dac81ca33459af5 (diff) | |
download | pdfium-5a5180ef4d6d2c169fc168c13912a1043d0e8a7e.tar.xz |
Use std::map in CXFA_FontMgr and CXFA_PDFFontMgr
Review-Url: https://codereview.chromium.org/2005473002
Diffstat (limited to 'xfa/fxfa/include')
-rw-r--r-- | xfa/fxfa/include/xfa_fontmgr.h | 9 |
1 files changed, 4 insertions, 5 deletions
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 <map> +#include <memory> #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<IFX_Font*, CPDF_Font*> 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<CXFA_FFDoc*, std::unique_ptr<CXFA_PDFFontMgr>> m_PDFFontMgrMap; std::map<CFX_ByteString, IFX_Font*> m_FontMap; }; |