summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_cmapparser.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-04 14:54:32 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-04 19:12:35 +0000
commit75a205f03fb755f4766ea674e470ff8de5d905b7 (patch)
treee7cfbc570b1d8ec9362269e91698b3b9867a6fb7 /core/fpdfapi/font/cpdf_cmapparser.cpp
parent3878e1a206db89f8a9e38c72e7557fab04f96aa5 (diff)
downloadpdfium-75a205f03fb755f4766ea674e470ff8de5d905b7.tar.xz
Remove CPDF_CMap friends
This CL removes the friends from CPDF_CMap and adds accessors for the needed items. Change-Id: Icf7b3e639c0904209f7db80c9460146cd29dd78a Reviewed-on: https://pdfium-review.googlesource.com/15452 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_cmapparser.cpp')
-rw-r--r--core/fpdfapi/font/cpdf_cmapparser.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/fpdfapi/font/cpdf_cmapparser.cpp b/core/fpdfapi/font/cpdf_cmapparser.cpp
index a5d79776ba..4c74761ec9 100644
--- a/core/fpdfapi/font/cpdf_cmapparser.cpp
+++ b/core/fpdfapi/font/cpdf_cmapparser.cpp
@@ -90,8 +90,8 @@ void CPDF_CMapParser::ParseWord(const ByteStringView& word) {
}
if (EndCode < 0x10000) {
for (uint32_t code = StartCode; code <= EndCode; code++) {
- m_pCMap->m_DirectCharcodeToCIDTable[code] =
- static_cast<uint16_t>(StartCID + code - StartCode);
+ m_pCMap->SetDirectCharcodeToCIDTable(
+ code, static_cast<uint16_t>(StartCID + code - StartCode));
}
} else {
m_AdditionalCharcodeToCIDMappings.push_back(
@@ -101,23 +101,23 @@ void CPDF_CMapParser::ParseWord(const ByteStringView& word) {
} else if (m_Status == 3) {
m_Status = 0;
} else if (m_Status == 4) {
- m_pCMap->m_Charset = CharsetFromOrdering(CMap_GetString(word));
+ m_pCMap->SetCharset(CharsetFromOrdering(CMap_GetString(word)));
m_Status = 0;
} else if (m_Status == 5) {
m_Status = 0;
} else if (m_Status == 6) {
- m_pCMap->m_bVertical = CMap_GetCode(word) != 0;
+ m_pCMap->SetVertical(CMap_GetCode(word) != 0);
m_Status = 0;
} else if (m_Status == 7) {
if (word == "endcodespacerange") {
uint32_t nSegs = pdfium::CollectionSize<uint32_t>(m_CodeRanges);
if (nSegs > 1) {
- m_pCMap->m_CodingScheme = CPDF_CMap::MixedFourBytes;
- m_pCMap->m_MixedFourByteLeadingRanges = m_CodeRanges;
+ m_pCMap->SetCodingScheme(CPDF_CMap::MixedFourBytes);
+ m_pCMap->SetMixedFourByteLeadingRanges(m_CodeRanges);
} else if (nSegs == 1) {
- m_pCMap->m_CodingScheme = (m_CodeRanges[0].m_CharSize == 2)
- ? CPDF_CMap::TwoBytes
- : CPDF_CMap::OneByte;
+ m_pCMap->SetCodingScheme((m_CodeRanges[0].m_CharSize == 2)
+ ? CPDF_CMap::TwoBytes
+ : CPDF_CMap::OneByte);
}
m_Status = 0;
} else {