summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Document.cpp
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 /fpdfsdk/javascript/Document.cpp
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 'fpdfsdk/javascript/Document.cpp')
-rw-r--r--fpdfsdk/javascript/Document.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index d1b6148776..8935037ec8 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -784,15 +784,16 @@ FX_BOOL Document::info(IJS_Context* cc,
if (!pDictionary)
return FALSE;
- CFX_WideString cwAuthor = pDictionary->GetUnicodeTextBy("Author");
- CFX_WideString cwTitle = pDictionary->GetUnicodeTextBy("Title");
- CFX_WideString cwSubject = pDictionary->GetUnicodeTextBy("Subject");
- CFX_WideString cwKeywords = pDictionary->GetUnicodeTextBy("Keywords");
- CFX_WideString cwCreator = pDictionary->GetUnicodeTextBy("Creator");
- CFX_WideString cwProducer = pDictionary->GetUnicodeTextBy("Producer");
- CFX_WideString cwCreationDate = pDictionary->GetUnicodeTextBy("CreationDate");
- CFX_WideString cwModDate = pDictionary->GetUnicodeTextBy("ModDate");
- CFX_WideString cwTrapped = pDictionary->GetUnicodeTextBy("Trapped");
+ CFX_WideString cwAuthor = pDictionary->GetUnicodeTextFor("Author");
+ CFX_WideString cwTitle = pDictionary->GetUnicodeTextFor("Title");
+ CFX_WideString cwSubject = pDictionary->GetUnicodeTextFor("Subject");
+ CFX_WideString cwKeywords = pDictionary->GetUnicodeTextFor("Keywords");
+ CFX_WideString cwCreator = pDictionary->GetUnicodeTextFor("Creator");
+ CFX_WideString cwProducer = pDictionary->GetUnicodeTextFor("Producer");
+ CFX_WideString cwCreationDate =
+ pDictionary->GetUnicodeTextFor("CreationDate");
+ CFX_WideString cwModDate = pDictionary->GetUnicodeTextFor("ModDate");
+ CFX_WideString cwTrapped = pDictionary->GetUnicodeTextFor("Trapped");
CJS_Context* pContext = (CJS_Context*)cc;
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
@@ -838,7 +839,7 @@ FX_BOOL Document::getPropertyInternal(IJS_Context* cc,
return FALSE;
if (vp.IsGetting()) {
- vp << pDictionary->GetUnicodeTextBy(propName);
+ vp << pDictionary->GetUnicodeTextFor(propName);
} else {
if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) {
sError = JSGetStringFromID(IDS_STRING_JSNOPERMISSION);
@@ -846,7 +847,7 @@ FX_BOOL Document::getPropertyInternal(IJS_Context* cc,
}
CFX_WideString csProperty;
vp >> csProperty;
- pDictionary->SetAtString(propName, PDF_EncodeText(csProperty));
+ pDictionary->SetStringFor(propName, PDF_EncodeText(csProperty));
m_pDocument->SetChangeMark();
}
return TRUE;