diff options
author | dsinclair <dsinclair@chromium.org> | 2016-09-15 10:15:32 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-15 10:15:32 -0700 |
commit | 38fd84428a1ea007a043be0b7d9b289e47aa5da0 (patch) | |
tree | 2bae09e8ae60d6d86e451eb7fa212f7aa9d899a8 /core/fpdfdoc/cpdf_filespec.cpp | |
parent | 41d6bbe3d413e7854be89142b70c42a89e315cba (diff) | |
download | pdfium-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 'core/fpdfdoc/cpdf_filespec.cpp')
-rw-r--r-- | core/fpdfdoc/cpdf_filespec.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/fpdfdoc/cpdf_filespec.cpp b/core/fpdfdoc/cpdf_filespec.cpp index 2084606629..3176eb51af 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)); } } |