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

Side by Side Diff: core/src/fpdfdoc/doc_form.cpp

Issue 811593007: XFA: merge patch from CL 733693003, getting rid of more casts (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 12 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 | « core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp ('k') | core/src/fxcrt/fx_basic_bstring.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 "../../include/fpdfdoc/fpdf_doc.h" 7 #include "../../include/fpdfdoc/fpdf_doc.h"
8 #include "../../include/fxcrt/fx_xml.h" 8 #include "../../include/fxcrt/fx_xml.h"
9 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict); 9 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict);
10 void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Docu ment* pDocument); 10 void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Docu ment* pDocument);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 CFieldTree::_Node *CFieldTree::_Lookup(_Node *pParent, const CFX_WideString &sho rt_name) 155 CFieldTree::_Node *CFieldTree::_Lookup(_Node *pParent, const CFX_WideString &sho rt_name)
156 { 156 {
157 if (pParent == NULL) { 157 if (pParent == NULL) {
158 return NULL; 158 return NULL;
159 } 159 }
160 CFX_PtrArray& ptr_array = pParent->children; 160 CFX_PtrArray& ptr_array = pParent->children;
161 for (int i = 0; i < ptr_array.GetSize(); i ++) { 161 for (int i = 0; i < ptr_array.GetSize(); i ++) {
162 _Node *pNode = (_Node *)ptr_array[i]; 162 _Node *pNode = (_Node *)ptr_array[i];
163 if (pNode->short_name.GetLength() == short_name.GetLength() && 163 if (pNode->short_name.GetLength() == short_name.GetLength() &&
164 FXSYS_memcmp32((FX_LPCWSTR)pNode->short_name, (FX_LPCWSTR)short_ name, short_name.GetLength()*sizeof(FX_WCHAR)) == 0) { 164 FXSYS_memcmp32(pNode->short_name.c_str(), short_name.c_str(), sh ort_name.GetLength()*sizeof(FX_WCHAR)) == 0) {
165 return pNode; 165 return pNode;
166 } 166 }
167 } 167 }
168 return NULL; 168 return NULL;
169 } 169 }
170 void CFieldTree::RemoveAll() 170 void CFieldTree::RemoveAll()
171 { 171 {
172 CFX_PtrArray& ptr_array = m_Root.children; 172 CFX_PtrArray& ptr_array = m_Root.children;
173 for (int i = 0; i < ptr_array.GetSize(); i ++) { 173 for (int i = 0; i < ptr_array.GetSize(); i ++) {
174 _Node *pNode = (_Node *)ptr_array[i]; 174 _Node *pNode = (_Node *)ptr_array[i];
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 continue; 1655 continue;
1656 } 1656 }
1657 CPDF_FormControl* pControl = NULL; 1657 CPDF_FormControl* pControl = NULL;
1658 if (m_ControlMap.Lookup(pAnnotDict, (void*&)pControl)) { 1658 if (m_ControlMap.Lookup(pAnnotDict, (void*&)pControl)) {
1659 return iNewPage; 1659 return iNewPage;
1660 } 1660 }
1661 } 1661 }
1662 } while (TRUE); 1662 } while (TRUE);
1663 return -1; 1663 return -1;
1664 } 1664 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp ('k') | core/src/fxcrt/fx_basic_bstring.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698