summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-23 08:17:59 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-23 08:17:59 -0700
commitdecfa7b0447538dec6cbcfa8ea50481f2173ce12 (patch)
tree7271b72d9e676ac0b7ca26335ecdc2968ea3717e /core
parenta5c85987a7604c0915268cb694f03f3452fdac6a (diff)
downloadpdfium-decfa7b0447538dec6cbcfa8ea50481f2173ce12.tar.xz
Remove FPDFAPI_LoadCID2UnicodeMap.
This Cl removes FPDFAPI_LoadCID2UnicodeMap() and inlines the code into the one caller. Review-Url: https://codereview.chromium.org/2097513002
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp9
-rw-r--r--core/fpdfapi/fpdf_font/font_int.h4
-rw-r--r--core/fpdfapi/fpdf_font/fpdf_font_cid.cpp7
3 files changed, 6 insertions, 14 deletions
diff --git a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
index 2a9900df91..8a1f369c00 100644
--- a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
+++ b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
@@ -180,12 +180,3 @@ uint32_t FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, uint16_t cid) {
}
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 ea6c246e78..fd2d87f5d8 100644
--- a/core/fpdfapi/fpdf_font/font_int.h
+++ b/core/fpdfapi/fpdf_font/font_int.h
@@ -211,8 +211,4 @@ class CPDF_ToUnicodeMap {
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 efc5e7cedc..289782bfb3 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 @@ void CPDF_CID2UnicodeMap::Load(CPDF_CMapManager* pMgr,
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) {