summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/doc_form.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-03-29 14:51:50 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-29 14:51:50 -0700
commitbd56755ba86f2d87e24a3cee5cb92aa14a81bb27 (patch)
treefb4692dc44cb549b7149be080ec26f4b7cd7b086 /core/fpdfdoc/doc_form.cpp
parent7f432a1c87014d6673ee69ff0ffa3724f237acf4 (diff)
downloadpdfium-bd56755ba86f2d87e24a3cee5cb92aa14a81bb27.tar.xz
Rename GetElementValue() to GetDirectObject{By,At}().
Every time I read this code, I have to make the mental substituion that "Element value" means "de-ref indirect object", so it might as well just say so. BUG= Review URL: https://codereview.chromium.org/1841173002
Diffstat (limited to 'core/fpdfdoc/doc_form.cpp')
-rw-r--r--core/fpdfdoc/doc_form.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfdoc/doc_form.cpp b/core/fpdfdoc/doc_form.cpp
index 7642fac6bf..2a6d739549 100644
--- a/core/fpdfdoc/doc_form.cpp
+++ b/core/fpdfdoc/doc_form.cpp
@@ -756,7 +756,7 @@ CPDF_FormField* CPDF_InterForm::GetFieldInCalculationOrder(int index) {
return NULL;
}
if (CPDF_Dictionary* pElement =
- ToDictionary(pArray->GetElementValue(index))) {
+ ToDictionary(pArray->GetDirectObjectAt(index))) {
return GetFieldByDict(pElement);
}
return NULL;
@@ -770,7 +770,7 @@ int CPDF_InterForm::FindFieldInCalculationOrder(const CPDF_FormField* pField) {
return -1;
}
for (uint32_t i = 0; i < pArray->GetCount(); i++) {
- CPDF_Object* pElement = pArray->GetElementValue(i);
+ CPDF_Object* pElement = pArray->GetDirectObjectAt(i);
if (pElement == pField->m_pDict) {
return i;
}
@@ -953,20 +953,20 @@ CPDF_FormField* CPDF_InterForm::AddTerminalField(CPDF_Dictionary* pFieldDict) {
}
if (pParent && pParent != pFieldDict && !pParent->KeyExist("FT")) {
if (pFieldDict->KeyExist("FT")) {
- CPDF_Object* pFTValue = pFieldDict->GetElementValue("FT");
+ CPDF_Object* pFTValue = pFieldDict->GetDirectObjectBy("FT");
if (pFTValue) {
pParent->SetAt("FT", pFTValue->Clone());
}
}
if (pFieldDict->KeyExist("Ff")) {
- CPDF_Object* pFfValue = pFieldDict->GetElementValue("Ff");
+ CPDF_Object* pFfValue = pFieldDict->GetDirectObjectBy("Ff");
if (pFfValue) {
pParent->SetAt("Ff", pFfValue->Clone());
}
}
}
pField = new CPDF_FormField(this, pParent);
- CPDF_Object* pTObj = pDict->GetElement("T");
+ CPDF_Object* pTObj = pDict->GetObjectBy("T");
if (ToReference(pTObj)) {
CPDF_Object* pClone = pTObj->Clone(TRUE);
if (pClone)
@@ -1157,7 +1157,7 @@ void CPDF_InterForm::FDF_ImportField(CPDF_Dictionary* pFieldDict,
if ((eType == CPDF_FormField::ListBox || eType == CPDF_FormField::ComboBox) &&
pFieldDict->KeyExist("Opt")) {
pField->m_pDict->SetAt("Opt",
- pFieldDict->GetElementValue("Opt")->Clone(TRUE));
+ pFieldDict->GetDirectObjectBy("Opt")->Clone(TRUE));
}
if (bNotify && m_pFormNotify) {
if (iType == FIELDTYPE_CHECKBOX || iType == FIELDTYPE_RADIOBUTTON) {