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

Unified Diff: fpdfsdk/javascript/Document.cpp

Issue 2334323005: Rename dictionary set and get methods (Closed)
Patch Set: Created 4 years, 3 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 | « fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp ('k') | fpdfsdk/pdfwindow/PWL_Icon.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/Document.cpp
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index d1b614877680dcf42d545623a314dae0af28ecc1..8935037ec870aaaef641d5df7fd57dca23fcbf36 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;
« no previous file with comments | « fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp ('k') | fpdfsdk/pdfwindow/PWL_Icon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698