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

Unified Diff: core/fpdfdoc/cpdf_filespec.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 | « core/fpdfdoc/cpdf_bookmarktree.cpp ('k') | core/fpdfdoc/cpdf_filespec_unittest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/cpdf_filespec.cpp
diff --git a/core/fpdfdoc/cpdf_filespec.cpp b/core/fpdfdoc/cpdf_filespec.cpp
index 20846066290f043e809512c9727d148b2b497f60..3176eb51af3722e43a8f4a3c461d3a0f1e9013b1 100644
--- a/core/fpdfdoc/cpdf_filespec.cpp
+++ b/core/fpdfdoc/cpdf_filespec.cpp
@@ -80,23 +80,23 @@ CFX_WideString CPDF_FileSpec::DecodeFileName(const CFX_WideStringC& filepath) {
bool CPDF_FileSpec::GetFileName(CFX_WideString* csFileName) const {
if (CPDF_Dictionary* pDict = m_pObj->AsDictionary()) {
- *csFileName = pDict->GetUnicodeTextBy("UF");
+ *csFileName = pDict->GetUnicodeTextFor("UF");
if (csFileName->IsEmpty()) {
*csFileName =
- CFX_WideString::FromLocal(pDict->GetStringBy("F").AsStringC());
+ CFX_WideString::FromLocal(pDict->GetStringFor("F").AsStringC());
}
- if (pDict->GetStringBy("FS") == "URL")
+ if (pDict->GetStringFor("FS") == "URL")
return true;
if (csFileName->IsEmpty()) {
if (pDict->KeyExist("DOS")) {
*csFileName =
- CFX_WideString::FromLocal(pDict->GetStringBy("DOS").AsStringC());
+ CFX_WideString::FromLocal(pDict->GetStringFor("DOS").AsStringC());
} else if (pDict->KeyExist("Mac")) {
*csFileName =
- CFX_WideString::FromLocal(pDict->GetStringBy("Mac").AsStringC());
+ CFX_WideString::FromLocal(pDict->GetStringFor("Mac").AsStringC());
} else if (pDict->KeyExist("Unix")) {
*csFileName =
- CFX_WideString::FromLocal(pDict->GetStringBy("Unix").AsStringC());
+ CFX_WideString::FromLocal(pDict->GetStringFor("Unix").AsStringC());
} else {
return false;
}
@@ -112,7 +112,7 @@ bool CPDF_FileSpec::GetFileName(CFX_WideString* csFileName) const {
CPDF_FileSpec::CPDF_FileSpec() {
m_pObj = new CPDF_Dictionary;
- m_pObj->AsDictionary()->SetAtName("Type", "Filespec");
+ m_pObj->AsDictionary()->SetNameFor("Type", "Filespec");
}
CFX_WideString CPDF_FileSpec::EncodeFileName(const CFX_WideStringC& filepath) {
@@ -161,7 +161,7 @@ void CPDF_FileSpec::SetFileName(const CFX_WideStringC& wsFileName) {
if (m_pObj->IsString()) {
m_pObj->SetString(CFX_ByteString::FromUnicode(wsStr));
} else if (CPDF_Dictionary* pDict = m_pObj->AsDictionary()) {
- pDict->SetAtString("F", CFX_ByteString::FromUnicode(wsStr));
- pDict->SetAtString("UF", PDF_EncodeText(wsStr));
+ pDict->SetStringFor("F", CFX_ByteString::FromUnicode(wsStr));
+ pDict->SetStringFor("UF", PDF_EncodeText(wsStr));
}
}
« no previous file with comments | « core/fpdfdoc/cpdf_bookmarktree.cpp ('k') | core/fpdfdoc/cpdf_filespec_unittest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698