summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-09-15 10:15:32 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-15 10:15:32 -0700
commit38fd84428a1ea007a043be0b7d9b289e47aa5da0 (patch)
tree2bae09e8ae60d6d86e451eb7fa212f7aa9d899a8 /xfa
parent41d6bbe3d413e7854be89142b70c42a89e315cba (diff)
downloadpdfium-38fd84428a1ea007a043be0b7d9b289e47aa5da0.tar.xz
Rename dictionary set and get methods
This Cl makes the Get and Set methods consistenly use {G|S}et<Type>For. BUG=pdfium:596 Review-Url: https://codereview.chromium.org/2334323005
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/app/xfa_ffdoc.cpp8
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp6
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp10
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.h6
4 files changed, 15 insertions, 15 deletions
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp
index 14c4f2d2b4..48631cd6b6 100644
--- a/xfa/fxfa/app/xfa_ffdoc.cpp
+++ b/xfa/fxfa/app/xfa_ffdoc.cpp
@@ -303,11 +303,11 @@ FX_BOOL CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc) {
if (!pRoot)
return FALSE;
- CPDF_Dictionary* pAcroForm = pRoot->GetDictBy("AcroForm");
+ CPDF_Dictionary* pAcroForm = pRoot->GetDictFor("AcroForm");
if (!pAcroForm)
return FALSE;
- CPDF_Object* pElementXFA = pAcroForm->GetDirectObjectBy("XFA");
+ CPDF_Object* pElementXFA = pAcroForm->GetDirectObjectFor("XFA");
if (!pElementXFA)
return FALSE;
@@ -387,11 +387,11 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName,
if (!pRoot)
return nullptr;
- CPDF_Dictionary* pNames = pRoot->GetDictBy("Names");
+ CPDF_Dictionary* pNames = pRoot->GetDictFor("Names");
if (!pNames)
return nullptr;
- CPDF_Dictionary* pXFAImages = pNames->GetDictBy("XFAImages");
+ CPDF_Dictionary* pXFAImages = pNames->GetDictFor("XFAImages");
if (!pXFAImages)
return nullptr;
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index d191ce3537..3a478038f6 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1838,11 +1838,11 @@ CFGAS_GEFont* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName,
return nullptr;
}
CPDF_Dictionary* pFontSetDict =
- pDoc->GetRoot()->GetDictBy("AcroForm")->GetDictBy("DR");
+ pDoc->GetRoot()->GetDictFor("AcroForm")->GetDictFor("DR");
if (!pFontSetDict) {
return nullptr;
}
- pFontSetDict = pFontSetDict->GetDictBy("Font");
+ pFontSetDict = pFontSetDict->GetDictFor("Font");
if (!pFontSetDict) {
return nullptr;
}
@@ -1856,7 +1856,7 @@ CFGAS_GEFont* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName,
continue;
}
CPDF_Dictionary* pFontDict = ToDictionary(pObj->GetDirect());
- if (!pFontDict || pFontDict->GetStringBy("Type") != "Font") {
+ if (!pFontDict || pFontDict->GetStringFor("Type") != "Font") {
return nullptr;
}
CPDF_Font* pPDFFont = pDoc->LoadFont(pFontDict);
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 4afcb32e6f..0d735a1b9b 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -5572,8 +5572,8 @@ void CXFA_FM2JSContext::dot_accessor(CFXJSE_Value* pThis,
iRet = ResolveObjects(pThis, argAccessor.get(), szSomExp.AsStringC(),
resoveNodeRS, TRUE, szName.IsEmpty());
} else if (!argAccessor->IsObject() && !bsAccessorName.IsEmpty() &&
- GetObjectByName(pThis, argAccessor.get(),
- bsAccessorName.AsStringC())) {
+ GetObjectForName(pThis, argAccessor.get(),
+ bsAccessorName.AsStringC())) {
iRet = ResolveObjects(pThis, argAccessor.get(), szSomExp.AsStringC(),
resoveNodeRS, TRUE, szName.IsEmpty());
}
@@ -5710,8 +5710,8 @@ void CXFA_FM2JSContext::dotdot_accessor(CFXJSE_Value* pThis,
iRet = ResolveObjects(pThis, argAccessor.get(), szSomExp.AsStringC(),
resoveNodeRS, FALSE);
} else if (!argAccessor->IsObject() && !bsAccessorName.IsEmpty() &&
- GetObjectByName(pThis, argAccessor.get(),
- bsAccessorName.AsStringC())) {
+ GetObjectForName(pThis, argAccessor.get(),
+ bsAccessorName.AsStringC())) {
iRet = ResolveObjects(pThis, argAccessor.get(), szSomExp.AsStringC(),
resoveNodeRS, FALSE);
}
@@ -6203,7 +6203,7 @@ void CXFA_FM2JSContext::GenerateSomExpression(const CFX_ByteStringC& szName,
}
// static
-FX_BOOL CXFA_FM2JSContext::GetObjectByName(
+FX_BOOL CXFA_FM2JSContext::GetObjectForName(
CFXJSE_Value* pThis,
CFXJSE_Value* accessorValue,
const CFX_ByteStringC& szAccessorName) {
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.h b/xfa/fxfa/fm2js/xfa_fm2jscontext.h
index 1483cbc707..5f87b60f90 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.h
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.h
@@ -412,9 +412,9 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject {
int32_t iIndexValue,
bool bIsStar,
CFX_ByteString& szSomExp);
- static FX_BOOL GetObjectByName(CFXJSE_Value* pThis,
- CFXJSE_Value* accessorValue,
- const CFX_ByteStringC& szAccessorName);
+ static FX_BOOL GetObjectForName(CFXJSE_Value* pThis,
+ CFXJSE_Value* accessorValue,
+ const CFX_ByteStringC& szAccessorName);
static int32_t ResolveObjects(CFXJSE_Value* pThis,
CFXJSE_Value* pParentValue,
const CFX_ByteStringC& bsSomExp,