Chromium Code Reviews| Index: fpdfsdk/pdfwindow/PWL_FontMap.h |
| diff --git a/fpdfsdk/pdfwindow/PWL_FontMap.h b/fpdfsdk/pdfwindow/PWL_FontMap.h |
| index 2c40c92a977955ae4fff0983e3a54fe95e3ef514..2ecf51a1919ce5deb5a55d9739d256fd6fb12c5c 100644 |
| --- a/fpdfsdk/pdfwindow/PWL_FontMap.h |
| +++ b/fpdfsdk/pdfwindow/PWL_FontMap.h |
| @@ -7,6 +7,8 @@ |
| #ifndef FPDFSDK_PDFWINDOW_PWL_FONTMAP_H_ |
| #define FPDFSDK_PDFWINDOW_PWL_FONTMAP_H_ |
| +#include <memory> |
| + |
| #include "core/fpdfdoc/include/ipvt_fontmap.h" |
| #include "fpdfsdk/fxedit/include/fx_edit.h" |
| #include "public/fpdf_sysfontinfo.h" |
| @@ -51,6 +53,8 @@ struct CPWL_FontMap_Native { |
| class CPWL_FontMap : public IPVT_FontMap { |
| public: |
| + using CharsetFontMap = FPDF_CharsetFontMap; |
|
dsinclair
2016/08/03 12:47:55
Is this useful? Seems like it just saves 5 chars b
Wei Li
2016/08/03 17:54:47
Removed it.
|
| + |
| CPWL_FontMap(CFX_SystemHandler* pSystemHandler); |
| ~CPWL_FontMap() override; |
| @@ -80,6 +84,8 @@ class CPWL_FontMap : public IPVT_FontMap { |
| CFX_ByteString& sFontName, |
| uint8_t nCharset); |
| + static const CharsetFontMap defaultTTFMap[]; |
| + |
| protected: |
| virtual void Initialize(); |
| virtual CPDF_Document* GetDocument(); |
| @@ -102,6 +108,9 @@ class CPWL_FontMap : public IPVT_FontMap { |
| int32_t nCharset); |
| CFX_ByteString EncodeFontAlias(const CFX_ByteString& sFontName); |
| + CFX_ArrayTemplate<CPWL_FontMap_Data*> m_aData; |
| + CFX_ArrayTemplate<CPWL_FontMap_Native*> m_aNativeFont; |
| + |
| private: |
| CFX_ByteString GetFontName(int32_t nFontIndex); |
| int32_t FindFont(const CFX_ByteString& sFontName, |
| @@ -109,16 +118,7 @@ class CPWL_FontMap : public IPVT_FontMap { |
| CFX_ByteString GetNativeFont(int32_t nCharset); |
| - public: |
| - using CharsetFontMap = FPDF_CharsetFontMap; |
| - static const CharsetFontMap defaultTTFMap[]; |
| - |
| - protected: |
| - CFX_ArrayTemplate<CPWL_FontMap_Data*> m_aData; |
| - CFX_ArrayTemplate<CPWL_FontMap_Native*> m_aNativeFont; |
| - |
| - private: |
| - CPDF_Document* m_pPDFDoc; |
| + std::unique_ptr<CPDF_Document> m_pPDFDoc; |
| CFX_SystemHandler* m_pSystemHandler; |
| }; |