summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/doc_action.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_action.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_action.cpp')
-rw-r--r--core/fpdfdoc/doc_action.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/fpdfdoc/doc_action.cpp b/core/fpdfdoc/doc_action.cpp
index ce37e1e9c9..2f08bfa3af 100644
--- a/core/fpdfdoc/doc_action.cpp
+++ b/core/fpdfdoc/doc_action.cpp
@@ -32,7 +32,7 @@ CPDF_Dest CPDF_Action::GetDest(CPDF_Document* pDoc) const {
if (type != "GoTo" && type != "GoToR") {
return CPDF_Dest();
}
- CPDF_Object* pDest = m_pDict->GetElementValue("D");
+ CPDF_Object* pDest = m_pDict->GetDirectObjectBy("D");
if (!pDest) {
return CPDF_Dest();
}
@@ -67,7 +67,7 @@ CFX_WideString CPDF_Action::GetFilePath() const {
type != "ImportData") {
return CFX_WideString();
}
- CPDF_Object* pFile = m_pDict->GetElementValue("F");
+ CPDF_Object* pFile = m_pDict->GetDirectObjectBy("F");
CFX_WideString path;
if (!pFile) {
if (type == "Launch") {
@@ -111,7 +111,7 @@ uint32_t CPDF_ActionFields::GetFieldsCount() const {
CFX_ByteString csType = pDict->GetStringBy("S");
CPDF_Object* pFields = NULL;
if (csType == "Hide") {
- pFields = pDict->GetElementValue("T");
+ pFields = pDict->GetDirectObjectBy("T");
} else {
pFields = pDict->GetArrayBy("Fields");
}
@@ -138,7 +138,7 @@ std::vector<CPDF_Object*> CPDF_ActionFields::GetAllFields() const {
CFX_ByteString csType = pDict->GetStringBy("S");
CPDF_Object* pFields;
if (csType == "Hide")
- pFields = pDict->GetElementValue("T");
+ pFields = pDict->GetDirectObjectBy("T");
else
pFields = pDict->GetArrayBy("Fields");
if (!pFields)
@@ -149,7 +149,7 @@ std::vector<CPDF_Object*> CPDF_ActionFields::GetAllFields() const {
} else if (CPDF_Array* pArray = pFields->AsArray()) {
uint32_t iCount = pArray->GetCount();
for (uint32_t i = 0; i < iCount; ++i) {
- CPDF_Object* pObj = pArray->GetElementValue(i);
+ CPDF_Object* pObj = pArray->GetDirectObjectAt(i);
if (pObj) {
fields.push_back(pObj);
}
@@ -169,7 +169,7 @@ CPDF_Object* CPDF_ActionFields::GetField(uint32_t iIndex) const {
CFX_ByteString csType = pDict->GetStringBy("S");
CPDF_Object* pFields = NULL;
if (csType == "Hide") {
- pFields = pDict->GetElementValue("T");
+ pFields = pDict->GetDirectObjectBy("T");
} else {
pFields = pDict->GetArrayBy("Fields");
}
@@ -181,7 +181,7 @@ CPDF_Object* CPDF_ActionFields::GetField(uint32_t iIndex) const {
if (iIndex == 0)
pFindObj = pFields;
} else if (CPDF_Array* pArray = pFields->AsArray()) {
- pFindObj = pArray->GetElementValue(iIndex);
+ pFindObj = pArray->GetDirectObjectAt(iIndex);
}
return pFindObj;
}
@@ -191,7 +191,7 @@ CFX_WideString CPDF_Action::GetJavaScript() const {
if (!m_pDict) {
return csJS;
}
- CPDF_Object* pJS = m_pDict->GetElementValue("JS");
+ CPDF_Object* pJS = m_pDict->GetDirectObjectBy("JS");
return pJS ? pJS->GetUnicodeText() : csJS;
}
CPDF_Dictionary* CPDF_Action::GetAnnot() const {
@@ -236,7 +236,7 @@ uint32_t CPDF_Action::GetSubActionsCount() const {
if (!m_pDict || !m_pDict->KeyExist("Next"))
return 0;
- CPDF_Object* pNext = m_pDict->GetElementValue("Next");
+ CPDF_Object* pNext = m_pDict->GetDirectObjectBy("Next");
if (!pNext)
return 0;
if (pNext->IsDictionary())
@@ -249,7 +249,7 @@ CPDF_Action CPDF_Action::GetSubAction(uint32_t iIndex) const {
if (!m_pDict || !m_pDict->KeyExist("Next")) {
return CPDF_Action();
}
- CPDF_Object* pNext = m_pDict->GetElementValue("Next");
+ CPDF_Object* pNext = m_pDict->GetDirectObjectBy("Next");
if (CPDF_Dictionary* pDict = ToDictionary(pNext)) {
if (iIndex == 0)
return CPDF_Action(pDict);