| 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 "xfa/fxfa/parser/xfa_basic_imp.h" | 7 #include "xfa/fxfa/parser/xfa_basic_imp.h" |
| 8 | 8 |
| 9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
| 10 #include "xfa/fgas/crt/fgas_codepage.h" | 10 #include "xfa/fgas/crt/fgas_codepage.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 iEnd = iMid - 1; | 190 iEnd = iMid - 1; |
| 191 } else { | 191 } else { |
| 192 iStart = iMid + 1; | 192 iStart = iMid + 1; |
| 193 } | 193 } |
| 194 } while (iStart <= iEnd); | 194 } while (iStart <= iEnd); |
| 195 return NULL; | 195 return NULL; |
| 196 } | 196 } |
| 197 const XFA_ELEMENTINFO* XFA_GetElementByID(XFA_ELEMENT eName) { | 197 const XFA_ELEMENTINFO* XFA_GetElementByID(XFA_ELEMENT eName) { |
| 198 return (eName < g_iXFAElementCount) ? (g_XFAElementData + eName) : NULL; | 198 return (eName < g_iXFAElementCount) ? (g_XFAElementData + eName) : NULL; |
| 199 } | 199 } |
| 200 const uint16_t* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t& iCount) { | 200 |
| 201 if (eElement >= g_iXFAElementCount) { | |
| 202 return NULL; | |
| 203 } | |
| 204 const XFA_ELEMENTHIERARCHY* pElement = g_XFAElementChildrenIndex + eElement; | |
| 205 iCount = pElement->wCount; | |
| 206 return g_XFAElementChildrenData + pElement->wStart; | |
| 207 } | |
| 208 const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t& iCount) { | 201 const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t& iCount) { |
| 209 if (eElement >= g_iXFAElementCount) { | 202 if (eElement >= g_iXFAElementCount) { |
| 210 return NULL; | 203 return NULL; |
| 211 } | 204 } |
| 212 const XFA_ELEMENTHIERARCHY* pElement = g_XFAElementAttributeIndex + eElement; | 205 const XFA_ELEMENTHIERARCHY* pElement = g_XFAElementAttributeIndex + eElement; |
| 213 iCount = pElement->wCount; | 206 iCount = pElement->wCount; |
| 214 return g_XFAElementAttributeData + pElement->wStart; | 207 return g_XFAElementAttributeData + pElement->wStart; |
| 215 } | 208 } |
| 216 | 209 |
| 217 const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_ELEMENT eElement, | 210 const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_ELEMENT eElement, |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 return NULL; | 588 return NULL; |
| 596 } | 589 } |
| 597 | 590 |
| 598 void CXFA_WideTextRead::Lock() {} | 591 void CXFA_WideTextRead::Lock() {} |
| 599 | 592 |
| 600 void CXFA_WideTextRead::Unlock() {} | 593 void CXFA_WideTextRead::Unlock() {} |
| 601 | 594 |
| 602 CFX_WideString CXFA_WideTextRead::GetSrcText() const { | 595 CFX_WideString CXFA_WideTextRead::GetSrcText() const { |
| 603 return m_wsBuffer; | 596 return m_wsBuffer; |
| 604 } | 597 } |
| OLD | NEW |