summaryrefslogtreecommitdiff
path: root/core/fpdfapi/cmaps/fpdf_cmaps.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-04 13:25:01 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-04 17:48:24 +0000
commit0181a84160e754717ebd26290628220f998ff66f (patch)
tree141b38e15a0b2f0c71ba612ebdf82be32f94596e /core/fpdfapi/cmaps/fpdf_cmaps.cpp
parent6ed297c5b418f8c9435b656b565cf48e6dcc2836 (diff)
downloadpdfium-0181a84160e754717ebd26290628220f998ff66f.tar.xz
Make CPDF_FontGlobals members private
This CL makes the embedded maps and the cmap manager private to CPDF_FontGlobals and adds accessor methods as needed. Change-Id: I50350fcfad5428defe5e68d9d3b29e8961e66e9f Reviewed-on: https://pdfium-review.googlesource.com/15412 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/cmaps/fpdf_cmaps.cpp')
-rw-r--r--core/fpdfapi/cmaps/fpdf_cmaps.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/fpdfapi/cmaps/fpdf_cmaps.cpp b/core/fpdfapi/cmaps/fpdf_cmaps.cpp
index 01c8da9691..ac8456dc69 100644
--- a/core/fpdfapi/cmaps/fpdf_cmaps.cpp
+++ b/core/fpdfapi/cmaps/fpdf_cmaps.cpp
@@ -60,10 +60,11 @@ void FPDFAPI_FindEmbeddedCMap(const ByteString& bsName,
pMap = nullptr;
CPDF_FontGlobals* pFontGlobals =
CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals();
- const FXCMAP_CMap* pCMaps =
- pFontGlobals->m_EmbeddedCharsets[charset].m_pMapList.Get();
- for (uint32_t i = 0; i < pFontGlobals->m_EmbeddedCharsets[charset].m_Count;
- i++) {
+
+ const FXCMAP_CMap* pCMaps;
+ uint32_t count;
+ std::tie(count, pCMaps) = pFontGlobals->GetEmbeddedCharset(charset);
+ for (uint32_t i = 0; i < count; i++) {
if (bsName == pCMaps[i].m_Name) {
pMap = &pCMaps[i];
break;