Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1251)

Unified Diff: core/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 1862123003: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, fix new usage. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_doc.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 4f304a3b3b98626ae8e8c6d76e2c16d5f1776b00..21edc9e0cd04c96aca7fbf05ff3d467b9a22dba3 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.AsByteStringC(), m_pDocument, dwObjNum);
+ pDict->SetAtReference(key.AsStringC(), m_pDocument, dwObjNum);
else
- pDict->SetAt(key.AsByteStringC(), pObj.release());
+ pDict->SetAt(key.AsStringC(), pObj.release());
}
}
PDF_ReplaceAbbr(pDict);
@@ -721,8 +721,7 @@ void CPDF_StreamContentParser::Handle_ExecuteXObject() {
pList = m_pPageResources->GetDictBy("XObject");
if (!pList)
return;
- CPDF_Reference* pRes =
- ToReference(pList->GetObjectBy(name.AsByteStringC()));
+ CPDF_Reference* pRes = ToReference(pList->GetObjectBy(name.AsStringC()));
if (!pRes)
return;
@@ -1258,7 +1257,7 @@ CPDF_Object* CPDF_StreamContentParser::FindResourceObj(
if (!pList) {
return NULL;
}
- CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsByteStringC());
+ CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsStringC());
return pRes;
}
CPDF_Dictionary* pList = m_pResources->GetDictBy(type);
@@ -1270,10 +1269,10 @@ CPDF_Object* CPDF_StreamContentParser::FindResourceObj(
if (!pList) {
return NULL;
}
- CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsByteStringC());
+ CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsStringC());
return pRes;
}
- CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsByteStringC());
+ CPDF_Object* pRes = pList->GetDirectObjectBy(name.AsStringC());
return pRes;
}
@@ -1766,7 +1765,7 @@ void PDF_ReplaceAbbr(CPDF_Object* pObj) {
CPDF_Object* value = it.second;
CFX_ByteStringC fullname =
PDF_FindFullName(PDF_InlineKeyAbbr, FX_ArraySize(PDF_InlineKeyAbbr),
- key.AsByteStringC());
+ key.AsStringC());
if (!fullname.IsEmpty()) {
AbbrReplacementOp op;
op.is_replace_key = true;
@@ -1780,7 +1779,7 @@ void PDF_ReplaceAbbr(CPDF_Object* pObj) {
CFX_ByteString name = value->GetString();
fullname = PDF_FindFullName(PDF_InlineValueAbbr,
FX_ArraySize(PDF_InlineValueAbbr),
- name.AsByteStringC());
+ name.AsStringC());
if (!fullname.IsEmpty()) {
AbbrReplacementOp op;
op.is_replace_key = false;
@@ -1794,9 +1793,9 @@ void PDF_ReplaceAbbr(CPDF_Object* pObj) {
}
for (const auto& op : replacements) {
if (op.is_replace_key)
- pDict->ReplaceKey(op.key.AsByteStringC(), op.replacement);
+ pDict->ReplaceKey(op.key.AsStringC(), op.replacement);
else
- pDict->SetAtName(op.key.AsByteStringC(), op.replacement);
+ pDict->SetAtName(op.key.AsStringC(), op.replacement);
}
break;
}
@@ -1808,7 +1807,7 @@ void PDF_ReplaceAbbr(CPDF_Object* pObj) {
CFX_ByteString name = pElement->GetString();
CFX_ByteStringC fullname = PDF_FindFullName(
PDF_InlineValueAbbr, FX_ArraySize(PDF_InlineValueAbbr),
- name.AsByteStringC());
+ name.AsStringC());
if (!fullname.IsEmpty()) {
pArray->SetAt(i, new CPDF_Name(fullname));
}
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_doc.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698