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

Unified Diff: xfa/fxfa/app/xfa_ffdoc.cpp

Issue 1919563002: Pass CFX_*StringCs to FX_HashCode_GETA and _GETW hash functions. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix issue from c4 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 | « xfa/fxfa/app/xfa_ffbarcode.cpp ('k') | xfa/fxfa/app/xfa_ffdocview.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_ffdoc.cpp
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp
index 1fecee7547ab034b206a214843e5c167dc2494d1..4b0f67bb6a00c75de01b473a5a077b39b7310a66 100644
--- a/xfa/fxfa/app/xfa_ffdoc.cpp
+++ b/xfa/fxfa/app/xfa_ffdoc.cpp
@@ -326,8 +326,7 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName,
if (!m_pPDFDoc)
return nullptr;
- uint32_t dwHash =
- FX_HashCode_String_GetW(wsName.c_str(), wsName.GetLength(), FALSE);
+ uint32_t dwHash = FX_HashCode_GetW(wsName, false);
FX_IMAGEDIB_AND_DPI* imageDIBDpi = nullptr;
if (m_mapNamedImages.Lookup((void*)(uintptr_t)dwHash, (void*&)imageDIBDpi)) {
iImageXDpi = imageDIBDpi->iImageXDpi;
@@ -384,8 +383,7 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName,
}
CFDE_XMLElement* CXFA_FFDoc::GetPackageData(const CFX_WideStringC& wsPackage) {
- uint32_t packetHash =
- FX_HashCode_String_GetW(wsPackage.c_str(), wsPackage.GetLength());
+ uint32_t packetHash = FX_HashCode_GetW(wsPackage, false);
CXFA_Node* pNode = ToNode(m_pDocument->GetXFAObject(packetHash));
if (!pNode) {
return NULL;
@@ -399,8 +397,7 @@ FX_BOOL CXFA_FFDoc::SavePackage(const CFX_WideStringC& wsPackage,
IFX_FileWrite* pFile,
CXFA_ChecksumContext* pCSContext) {
CXFA_DataExporter* pExport = new CXFA_DataExporter(m_pDocument);
- uint32_t packetHash =
- FX_HashCode_String_GetW(wsPackage.c_str(), wsPackage.GetLength());
+ uint32_t packetHash = FX_HashCode_GetW(wsPackage, false);
CXFA_Node* pNode = NULL;
if (packetHash == XFA_HASHCODE_Xfa) {
pNode = m_pDocument->GetRoot();
« no previous file with comments | « xfa/fxfa/app/xfa_ffbarcode.cpp ('k') | xfa/fxfa/app/xfa_ffdocview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698