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

Unified Diff: core/fpdfdoc/doc_formfield.cpp

Issue 1841173002: Rename GetElementValue() to GetDirectObject{By,At}(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix test name Created 4 years, 9 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/fpdfdoc/doc_form.cpp ('k') | core/fpdfdoc/doc_link.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/doc_formfield.cpp
diff --git a/core/fpdfdoc/doc_formfield.cpp b/core/fpdfdoc/doc_formfield.cpp
index 88d35d8a11af8b6fe56146372d221b91bc149483..cc34a9d297393f8df970f52c574dbfc374434d5f 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();
« no previous file with comments | « core/fpdfdoc/doc_form.cpp ('k') | core/fpdfdoc/doc_link.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698