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

Unified Diff: fpdfsdk/javascript/Field.cpp

Issue 1841173002: Rename GetElementValue() to GetDirectObject{By,At}(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use "At" for arrays. 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
Index: fpdfsdk/javascript/Field.cpp
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index 54b4f6432c9e230d93b9bdf8ac56807ba9aca3c9..b21a6b509f513f41e007cf7ef560062e6b494952 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -958,7 +958,7 @@ FX_BOOL Field::currentValueIndices(IJS_Context* cc,
int iSelecting;
vp >> SelArray;
for (int i = 0, sz = SelArray.GetLength(); i < sz; i++) {
- SelArray.GetElement(i, SelValue);
+ SelArray.GetObjectBy(i, SelValue);
iSelecting = SelValue.ToInt();
array.push_back(iSelecting);
}
@@ -2083,10 +2083,10 @@ FX_BOOL Field::rect(IJS_Context* cc,
CJS_Array rcArray(pRuntime);
vp >> rcArray;
- rcArray.GetElement(0, Upper_Leftx);
- rcArray.GetElement(1, Upper_Lefty);
- rcArray.GetElement(2, Lower_Rightx);
- rcArray.GetElement(3, Lower_Righty);
+ rcArray.GetObjectBy(0, Upper_Leftx);
+ rcArray.GetObjectBy(1, Upper_Lefty);
+ rcArray.GetObjectBy(2, Lower_Rightx);
+ rcArray.GetObjectBy(3, Lower_Righty);
FX_FLOAT pArray[4] = {0.0f, 0.0f, 0.0f, 0.0f};
pArray[0] = (FX_FLOAT)Upper_Leftx.ToInt();
@@ -2714,7 +2714,7 @@ FX_BOOL Field::value(IJS_Context* cc,
vp.ConvertToArray(ValueArray);
for (int i = 0, sz = ValueArray.GetLength(); i < sz; i++) {
CJS_Value ElementValue(pRuntime);
- ValueArray.GetElement(i, ElementValue);
+ ValueArray.GetObjectBy(i, ElementValue);
strArray.push_back(ElementValue.ToCFXWideString());
}
} else {

Powered by Google App Engine
This is Rietveld 408576698