summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/font')
-rw-r--r--core/fpdfapi/font/cpdf_cidfont.cpp2
-rw-r--r--core/fpdfapi/font/cpdf_cmap.cpp4
-rw-r--r--core/fpdfapi/font/cpdf_cmap.h2
-rw-r--r--core/fpdfapi/font/cpdf_tounicodemap.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp
index f17af41eda..4a96b0abcb 100644
--- a/core/fpdfapi/font/cpdf_cidfont.cpp
+++ b/core/fpdfapi/font/cpdf_cidfont.cpp
@@ -376,7 +376,7 @@ bool CPDF_CIDFont::Load() {
auto pAcc = pdfium::MakeRetain<CPDF_StreamAcc>(pStream);
pAcc->LoadAllDataFiltered();
m_pCMap = pdfium::MakeRetain<CPDF_CMap>();
- m_pCMap->LoadEmbedded(pAcc->GetData(), pAcc->GetSize());
+ m_pCMap->LoadEmbedded(pAcc->GetDataView());
} else {
return false;
}
diff --git a/core/fpdfapi/font/cpdf_cmap.cpp b/core/fpdfapi/font/cpdf_cmap.cpp
index a654fcced3..e82e86b474 100644
--- a/core/fpdfapi/font/cpdf_cmap.cpp
+++ b/core/fpdfapi/font/cpdf_cmap.cpp
@@ -290,10 +290,10 @@ void CPDF_CMap::LoadPredefined(CPDF_CMapManager* pMgr,
m_bLoaded = true;
}
-void CPDF_CMap::LoadEmbedded(const uint8_t* pData, uint32_t size) {
+void CPDF_CMap::LoadEmbedded(const ByteStringView& data) {
m_DirectCharcodeToCIDTable = std::vector<uint16_t>(65536);
CPDF_CMapParser parser(this);
- CPDF_SimpleParser syntax(pData, size);
+ CPDF_SimpleParser syntax(data);
while (1) {
ByteStringView word = syntax.GetWord();
if (word.IsEmpty()) {
diff --git a/core/fpdfapi/font/cpdf_cmap.h b/core/fpdfapi/font/cpdf_cmap.h
index 98a77286d0..3ad74ca187 100644
--- a/core/fpdfapi/font/cpdf_cmap.h
+++ b/core/fpdfapi/font/cpdf_cmap.h
@@ -53,7 +53,7 @@ class CPDF_CMap : public Retainable {
void LoadPredefined(CPDF_CMapManager* pMgr,
const ByteString& name,
bool bPromptCJK);
- void LoadEmbedded(const uint8_t* pData, uint32_t dwSize);
+ void LoadEmbedded(const ByteStringView& data);
bool IsLoaded() const { return m_bLoaded; }
bool IsVertWriting() const { return m_bVertical; }
diff --git a/core/fpdfapi/font/cpdf_tounicodemap.cpp b/core/fpdfapi/font/cpdf_tounicodemap.cpp
index 0b746d7bfc..88904f27f5 100644
--- a/core/fpdfapi/font/cpdf_tounicodemap.cpp
+++ b/core/fpdfapi/font/cpdf_tounicodemap.cpp
@@ -126,7 +126,7 @@ void CPDF_ToUnicodeMap::Load(CPDF_Stream* pStream) {
CIDSet cid_set = CIDSET_UNKNOWN;
auto pAcc = pdfium::MakeRetain<CPDF_StreamAcc>(pStream);
pAcc->LoadAllDataFiltered();
- CPDF_SimpleParser parser(pAcc->GetData(), pAcc->GetSize());
+ CPDF_SimpleParser parser(pAcc->GetDataView());
while (1) {
ByteStringView word = parser.GetWord();
if (word.IsEmpty()) {