summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/fpdf_page')
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_doc.cpp2
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_parser.cpp16
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp2
3 files changed, 10 insertions, 10 deletions
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index 6cd66185c6..b9019f8577 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
@@ -331,7 +331,7 @@ CPDF_ColorSpace* CPDF_DocPageData::GetColorSpace(
if (!pCS && pResources) {
CPDF_Dictionary* pList = pResources->GetDictBy("ColorSpace");
if (pList) {
- pCSObj = pList->GetDirectObjectBy(name.AsStringC());
+ pCSObj = pList->GetDirectObjectBy(name);
return GetColorSpace(pCSObj, nullptr);
}
}
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 654c9350a9..d2889d89b1 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -566,9 +566,9 @@ void CPDF_StreamContentParser::Handle_BeginImage() {
if (!key.IsEmpty()) {
uint32_t dwObjNum = pObj ? pObj->GetObjNum() : 0;
if (dwObjNum)
- pDict->SetAtReference(key.AsStringC(), m_pDocument, dwObjNum);
+ pDict->SetAtReference(key, m_pDocument, dwObjNum);
else
- pDict->SetAt(key.AsStringC(), pObj.release());
+ pDict->SetAt(key, pObj.release());
}
}
PDF_ReplaceAbbr(pDict);
@@ -721,7 +721,7 @@ void CPDF_StreamContentParser::Handle_ExecuteXObject() {
pList = m_pPageResources->GetDictBy("XObject");
if (!pList)
return;
- CPDF_Reference* pRes = ToReference(pList->GetObjectBy(name.AsStringC()));
+ CPDF_Reference* pRes = ToReference(pList->GetObjectBy(name));
if (!pRes)
return;
@@ -1258,7 +1258,7 @@ CPDF_Object* CPDF_StreamContentParser::FindResourceObj(
if (!pList) {
return NULL;
}
- CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsStringC());
+ CPDF_Object* pRes = pList->GetDirectObjectBy(name);
return pRes;
}
CPDF_Dictionary* pList = m_pResources->GetDictBy(type);
@@ -1270,10 +1270,10 @@ CPDF_Object* CPDF_StreamContentParser::FindResourceObj(
if (!pList) {
return NULL;
}
- CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsStringC());
+ CPDF_Object* pRes = pList->GetDirectObjectBy(name);
return pRes;
}
- CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsStringC());
+ CPDF_Object* pRes = pList->GetDirectObjectBy(name);
return pRes;
}
@@ -1794,9 +1794,9 @@ void PDF_ReplaceAbbr(CPDF_Object* pObj) {
}
for (const auto& op : replacements) {
if (op.is_replace_key)
- pDict->ReplaceKey(op.key.AsStringC(), op.replacement);
+ pDict->ReplaceKey(op.key, op.replacement);
else
- pDict->SetAtName(op.key.AsStringC(), op.replacement);
+ pDict->SetAtName(op.key, op.replacement);
}
break;
}
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
index 48bb667ec7..940881bacb 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
@@ -427,7 +427,7 @@ CPDF_Object* CPDF_StreamParser::ReadNextObject(FX_BOOL bAllowNestedArray,
return nullptr;
}
if (!key.IsEmpty()) {
- pDict->SetAt(key.AsStringC(), pObj);
+ pDict->SetAt(key, pObj);
} else {
pObj->Release();
}