diff options
author | tsepez <tsepez@chromium.org> | 2016-03-29 14:51:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-29 14:51:50 -0700 |
commit | bd56755ba86f2d87e24a3cee5cb92aa14a81bb27 (patch) | |
tree | fb4692dc44cb549b7149be080ec26f4b7cd7b086 /core/fpdfdoc/doc_formfield.cpp | |
parent | 7f432a1c87014d6673ee69ff0ffa3724f237acf4 (diff) | |
download | pdfium-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_formfield.cpp')
-rw-r--r-- | core/fpdfdoc/doc_formfield.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdfdoc/doc_formfield.cpp b/core/fpdfdoc/doc_formfield.cpp index 88d35d8a11..cc34a9d297 100644 --- a/core/fpdfdoc/doc_formfield.cpp +++ b/core/fpdfdoc/doc_formfield.cpp @@ -305,7 +305,7 @@ CFX_WideString CPDF_FormField::GetValue(FX_BOOL bDefault) { case CPDF_Object::STREAM: return pValue->GetUnicodeText(); case CPDF_Object::ARRAY: - pValue = pValue->AsArray()->GetElementValue(0); + pValue = pValue->AsArray()->GetDirectObjectAt(0); if (pValue) return pValue->GetUnicodeText(); break; @@ -447,7 +447,7 @@ int CPDF_FormField::GetSelectedIndex(int index) { if (!pArray || index < 0) return -1; - CPDF_Object* elementValue = pArray->GetElementValue(index); + CPDF_Object* elementValue = pArray->GetDirectObjectAt(index); sel_value = elementValue ? elementValue->GetUnicodeText() : CFX_WideString(); } @@ -538,7 +538,7 @@ FX_BOOL CPDF_FormField::IsItemSelected(int index) { } } for (uint32_t i = 0; i < pArray->GetCount(); i++) - if (pArray->GetElementValue(i)->GetUnicodeText() == opt_value && + if (pArray->GetDirectObjectAt(i)->GetUnicodeText() == opt_value && (int)i == iPos) { return TRUE; } @@ -691,11 +691,11 @@ CFX_WideString CPDF_FormField::GetOptionText(int index, int sub_index) { if (!pArray) return CFX_WideString(); - CPDF_Object* pOption = pArray->GetElementValue(index); + CPDF_Object* pOption = pArray->GetDirectObjectAt(index); if (!pOption) return CFX_WideString(); if (CPDF_Array* pOptionArray = pOption->AsArray()) - pOption = pOptionArray->GetElementValue(sub_index); + pOption = pOptionArray->GetDirectObjectAt(sub_index); CPDF_String* pString = ToString(pOption); return pString ? pString->GetUnicodeText() : CFX_WideString(); |