summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-08 12:20:38 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-08 12:20:39 -0700
commit4c3debb3c91f5842784be30a911b52cdabcab7df (patch)
treee0534dcb43a71376be8da0b376a97de37080ecc5 /core/fpdfapi/fpdf_page
parentf172290a8dc527cd8bc73b0d0ad59e78797968c1 (diff)
downloadpdfium-4c3debb3c91f5842784be30a911b52cdabcab7df.tar.xz
Rename both As{Byte,Wide}StringC() helpers to AsStringC().
The naming is redundant given the base type, and will stand in the way of consolidating Byte and Wide code. BUG= Review URL: https://codereview.chromium.org/1862123003
Diffstat (limited to 'core/fpdfapi/fpdf_page')
-rw-r--r--core/fpdfapi/fpdf_page/cpdf_allstates.cpp2
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_doc.cpp2
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_parser.cpp23
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp2
4 files changed, 14 insertions, 15 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_allstates.cpp b/core/fpdfapi/fpdf_page/cpdf_allstates.cpp
index d81a488d20..f2d637f888 100644
--- a/core/fpdfapi/fpdf_page/cpdf_allstates.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_allstates.cpp
@@ -115,7 +115,7 @@ void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS,
CFX_ByteString mode =
pArray ? pArray->GetStringAt(0) : pObject->GetString();
- pGeneralState->SetBlendMode(mode.AsByteStringC());
+ pGeneralState->SetBlendMode(mode.AsStringC());
if (pGeneralState->m_BlendType > FXDIB_BLEND_MULTIPLY) {
pParser->GetPageObjectHolder()->SetBackgroundAlphaNeeded(TRUE);
}
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index 758ce940d2..2dfccb26d7 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.AsByteStringC());
+ pCSObj = pList->GetDirectObjectBy(name.AsStringC());
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 4f304a3b3b..21edc9e0cd 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));
}
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
index 058ac338b2..5ec25d9fde 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.AsByteStringC(), pObj);
+ pDict->SetAt(key.AsStringC(), pObj);
} else {
pObj->Release();
}