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

Unified Diff: core/fpdfdoc/doc_basic.cpp

Issue 1862953004: Make CFX_WideString::FromLocal() take a CFX_ByteStringC arg (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Propogate into CFX_CharMap methods, avoid silent alloc. Created 4 years, 8 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/doc_action.cpp ('k') | core/fpdfdoc/doc_form.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/doc_basic.cpp
diff --git a/core/fpdfdoc/doc_basic.cpp b/core/fpdfdoc/doc_basic.cpp
index 744475e50578c445245d74beb9596454847b0c19..9b241664dd12b4814d431ea36aa6b0d790a52958 100644
--- a/core/fpdfdoc/doc_basic.cpp
+++ b/core/fpdfdoc/doc_basic.cpp
@@ -315,23 +315,28 @@ bool CPDF_FileSpec::GetFileName(CFX_WideString* csFileName) const {
if (CPDF_Dictionary* pDict = m_pObj->AsDictionary()) {
*csFileName = pDict->GetUnicodeTextBy("UF");
if (csFileName->IsEmpty()) {
- *csFileName = CFX_WideString::FromLocal(pDict->GetStringBy("F"));
+ *csFileName =
+ CFX_WideString::FromLocal(pDict->GetStringBy("F").AsByteStringC());
Lei Zhang 2016/04/07 19:21:59 Use GetConstStringBy() instead?
Tom Sepez 2016/04/08 15:47:29 Done.
}
if (pDict->GetStringBy("FS") == "URL")
return true;
if (csFileName->IsEmpty()) {
if (pDict->KeyExist("DOS")) {
- *csFileName = CFX_WideString::FromLocal(pDict->GetStringBy("DOS"));
+ *csFileName = CFX_WideString::FromLocal(
+ pDict->GetStringBy("DOS").AsByteStringC());
} else if (pDict->KeyExist("Mac")) {
- *csFileName = CFX_WideString::FromLocal(pDict->GetStringBy("Mac"));
+ *csFileName = CFX_WideString::FromLocal(
+ pDict->GetStringBy("Mac").AsByteStringC());
} else if (pDict->KeyExist("Unix")) {
- *csFileName = CFX_WideString::FromLocal(pDict->GetStringBy("Unix"));
+ *csFileName = CFX_WideString::FromLocal(
+ pDict->GetStringBy("Unix").AsByteStringC());
} else {
return false;
}
}
} else if (m_pObj->IsString()) {
- *csFileName = CFX_WideString::FromLocal(m_pObj->GetString());
+ *csFileName =
+ CFX_WideString::FromLocal(m_pObj->GetString().AsByteStringC());
} else {
return false;
}
« no previous file with comments | « core/fpdfdoc/doc_action.cpp ('k') | core/fpdfdoc/doc_form.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698