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

Side by Side Diff: xfa/fxfa/app/xfa_ffdocview.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 unified diff | Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_ffdoc.cpp ('k') | xfa/fxfa/app/xfa_fontmgr.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/include/xfa_ffdocview.h" 7 #include "xfa/fxfa/include/xfa_ffdocview.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fxfa/app/xfa_ffbarcode.h" 10 #include "xfa/fxfa/app/xfa_ffbarcode.h"
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 continue; 772 continue;
773 } 773 }
774 CFX_WideStringC wsValueRef, wsLabelRef; 774 CFX_WideStringC wsValueRef, wsLabelRef;
775 binditems.GetValueRef(wsValueRef); 775 binditems.GetValueRef(wsValueRef);
776 binditems.GetLabelRef(wsLabelRef); 776 binditems.GetLabelRef(wsLabelRef);
777 const bool bUseValue = wsLabelRef.IsEmpty() || wsLabelRef == wsValueRef; 777 const bool bUseValue = wsLabelRef.IsEmpty() || wsLabelRef == wsValueRef;
778 const bool bLabelUseContent = 778 const bool bLabelUseContent =
779 wsLabelRef.IsEmpty() || wsLabelRef == FX_WSTRC(L"$"); 779 wsLabelRef.IsEmpty() || wsLabelRef == FX_WSTRC(L"$");
780 const bool bValueUseContent = 780 const bool bValueUseContent =
781 wsValueRef.IsEmpty() || wsValueRef == FX_WSTRC(L"$"); 781 wsValueRef.IsEmpty() || wsValueRef == FX_WSTRC(L"$");
782 CFX_WideString wsValue, wsLabel; 782 CFX_WideString wsValue;
783 uint32_t uValueHash = 783 CFX_WideString wsLabel;
784 FX_HashCode_String_GetW(wsValueRef.c_str(), wsValueRef.GetLength()); 784 uint32_t uValueHash = FX_HashCode_GetW(wsValueRef, false);
785 for (int32_t i = 0; i < iCount; i++) { 785 for (int32_t i = 0; i < iCount; i++) {
786 CXFA_Object* refObj = rs.nodes[i]; 786 CXFA_Object* refObj = rs.nodes[i];
787 if (!refObj->IsNode()) { 787 if (!refObj->IsNode()) {
788 continue; 788 continue;
789 } 789 }
790 CXFA_Node* refNode = refObj->AsNode(); 790 CXFA_Node* refNode = refObj->AsNode();
791 if (bValueUseContent) { 791 if (bValueUseContent) {
792 wsValue = refNode->GetContent(); 792 wsValue = refNode->GetContent();
793 } else { 793 } else {
794 CXFA_Node* nodeValue = refNode->GetFirstChildByName(uValueHash); 794 CXFA_Node* nodeValue = refNode->GetFirstChildByName(uValueHash);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() { 906 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() {
907 return NULL; 907 return NULL;
908 } 908 }
909 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) { 909 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) {
910 return FALSE; 910 return FALSE;
911 } 911 }
912 void CXFA_WidgetAccIterator::SkipTree() { 912 void CXFA_WidgetAccIterator::SkipTree() {
913 m_ContentIterator.SkipChildrenAndMoveToNext(); 913 m_ContentIterator.SkipChildrenAndMoveToNext();
914 m_pCurWidgetAcc = NULL; 914 m_pCurWidgetAcc = NULL;
915 } 915 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffdoc.cpp ('k') | xfa/fxfa/app/xfa_fontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698