Remove FPDFAPI_LoadCID2UnicodeMap. This Cl removes FPDFAPI_LoadCID2UnicodeMap() and inlines the code into the one caller. Review-Url: https://codereview.chromium.org/2097513002
diff --git a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp index 2a9900d..8a1f369 100644 --- a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp +++ b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
@@ -180,12 +180,3 @@ } return 0; } - -void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset, - const uint16_t*& pMap, - uint32_t& count) { - CPDF_FontGlobals* pFontGlobals = - CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals(); - pMap = pFontGlobals->m_EmbeddedToUnicodes[charset].m_pMap; - count = pFontGlobals->m_EmbeddedToUnicodes[charset].m_Count; -}
diff --git a/core/fpdfapi/fpdf_font/font_int.h b/core/fpdfapi/fpdf_font/font_int.h index ea6c246..fd2d87f 100644 --- a/core/fpdfapi/fpdf_font/font_int.h +++ b/core/fpdfapi/fpdf_font/font_int.h
@@ -211,8 +211,4 @@ static CFX_WideString StringToWideString(const CFX_ByteStringC& str); }; -void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset, - const uint16_t*& pMap, - uint32_t& count); - #endif // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_
diff --git a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp index efc5e7c..289782b 100644 --- a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp +++ b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -8,6 +8,7 @@ #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" #include "core/fpdfapi/fpdf_font/ttgsubtable.h" +#include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h" @@ -794,7 +795,11 @@ CIDSet charset, FX_BOOL bPromptCJK) { m_Charset = charset; - FPDFAPI_LoadCID2UnicodeMap(charset, m_pEmbeddedMap, m_EmbeddedCount); + + CPDF_FontGlobals* pFontGlobals = + CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals(); + m_pEmbeddedMap = pFontGlobals->m_EmbeddedToUnicodes[charset].m_pMap; + m_EmbeddedCount = pFontGlobals->m_EmbeddedToUnicodes[charset].m_Count; } CIDSet CharsetFromOrdering(const CFX_ByteStringC& ordering) {