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

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp

Issue 1108903002: Merge to XFA: Reduce usage of operator LPCWSTR from CFX_WideString(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 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
Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
index 028e5e29726d822a339fef6a692d6462d7445c6d..b851a119267cd65b8349942f48b932a8ebbbdc2f 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
@@ -141,7 +141,7 @@ void FPDF_FileSpec_SetWin32Path(CPDF_Object* pFileSpec, const CFX_WideString& fi
} else if (filepath.GetLength() > 1 && filepath[0] == '\\' && filepath[1] == '\\') {
result = ChangeSlash(filepath.c_str() + 1);
} else {
- result = ChangeSlash(filepath);
+ result = ChangeSlash(filepath.c_str());
}
if (pFileSpec->GetType() == PDFOBJ_STRING) {
pFileSpec->SetString(CFX_ByteString::FromUnicode(result));
@@ -173,7 +173,7 @@ CFX_WideString FPDF_FileSpec_GetWin32Path(const CPDF_Object* pFileSpec)
wsFileName = CFX_WideString::FromLocal(pFileSpec->GetString());
}
if (wsFileName[0] != '/') {
- return ChangeSlash(wsFileName);
+ return ChangeSlash(wsFileName.c_str());
}
if (wsFileName[2] == '/') {
CFX_WideString result;
@@ -184,7 +184,7 @@ CFX_WideString FPDF_FileSpec_GetWin32Path(const CPDF_Object* pFileSpec)
} else {
CFX_WideString result;
result += '\\';
- result += ChangeSlash(wsFileName);
+ result += ChangeSlash(wsFileName.c_str());
return result;
}
}
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698