OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |