diff options
-rw-r--r-- | fpdfsdk/pwl/cpwl_font_map.cpp | 17 | ||||
-rw-r--r-- | fpdfsdk/pwl/cpwl_font_map.h | 7 |
2 files changed, 3 insertions, 21 deletions
diff --git a/fpdfsdk/pwl/cpwl_font_map.cpp b/fpdfsdk/pwl/cpwl_font_map.cpp index 47365f8f42..532d210fa5 100644 --- a/fpdfsdk/pwl/cpwl_font_map.cpp +++ b/fpdfsdk/pwl/cpwl_font_map.cpp @@ -47,16 +47,6 @@ CPWL_FontMap::~CPWL_FontMap() { Empty(); } -CPDF_Document* CPWL_FontMap::GetDocument() { - if (!m_pPDFDoc) { - if (CPDF_ModuleMgr::Get()) { - m_pPDFDoc = pdfium::MakeUnique<CPDF_Document>(); - m_pPDFDoc->CreateNewDoc(); - } - } - return m_pPDFDoc.get(); -} - CPDF_Font* CPWL_FontMap::GetPDFFont(int32_t nFontIndex) { if (pdfium::IndexInBounds(m_Data, nFontIndex) && m_Data[nFontIndex]) return m_Data[nFontIndex]->pFont; @@ -187,11 +177,6 @@ int32_t CPWL_FontMap::GetFontIndex(const ByteString& sFontName, return AddFontData(pFont, sAlias, nCharset); } -CPDF_Font* CPWL_FontMap::FindFontSameCharset(ByteString* sFontAlias, - int32_t nCharset) { - return nullptr; -} - int32_t CPWL_FontMap::AddFontData(CPDF_Font* pFont, const ByteString& sFontAlias, int32_t nCharset) { @@ -203,8 +188,6 @@ int32_t CPWL_FontMap::AddFontData(CPDF_Font* pFont, return pdfium::CollectionSize<int32_t>(m_Data) - 1; } -void CPWL_FontMap::AddedFont(CPDF_Font* pFont, const ByteString& sFontAlias) {} - ByteString CPWL_FontMap::GetNativeFont(int32_t nCharset) { if (nCharset == FX_CHARSET_Default) nCharset = GetNativeCharset(); diff --git a/fpdfsdk/pwl/cpwl_font_map.h b/fpdfsdk/pwl/cpwl_font_map.h index 159bd7ff56..c9c7fff3fc 100644 --- a/fpdfsdk/pwl/cpwl_font_map.h +++ b/fpdfsdk/pwl/cpwl_font_map.h @@ -48,10 +48,10 @@ class CPWL_FontMap : public IPVT_FontMap { protected: virtual void Initialize(); - virtual CPDF_Document* GetDocument(); + virtual CPDF_Document* GetDocument() = 0; virtual CPDF_Font* FindFontSameCharset(ByteString* sFontAlias, - int32_t nCharset); - virtual void AddedFont(CPDF_Font* pFont, const ByteString& sFontAlias); + int32_t nCharset) = 0; + virtual void AddedFont(CPDF_Font* pFont, const ByteString& sFontAlias) = 0; bool KnowWord(int32_t nFontIndex, uint16_t word); @@ -81,7 +81,6 @@ class CPWL_FontMap : public IPVT_FontMap { ByteString& sFontName, uint8_t nCharset); - std::unique_ptr<CPDF_Document> m_pPDFDoc; UnownedPtr<CFX_SystemHandler> const m_pSystemHandler; }; |