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_parser_imp.h" | 7 #include "xfa/fxfa/parser/xfa_parser_imp.h" |
8 | 8 |
9 #include "xfa/fgas/crt/fgas_codepage.h" | 9 #include "xfa/fgas/crt/fgas_codepage.h" |
10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" | 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 pElement->GetNamespacePrefix(wsNodeStr); | 238 pElement->GetNamespacePrefix(wsNodeStr); |
239 if (!XFA_FDEExtension_ResolveNamespaceQualifier(pElement, wsNodeStr, | 239 if (!XFA_FDEExtension_ResolveNamespaceQualifier(pElement, wsNodeStr, |
240 wsNamespaceURI)) { | 240 wsNamespaceURI)) { |
241 wsNamespaceURI.Empty(); | 241 wsNamespaceURI.Empty(); |
242 } | 242 } |
243 } | 243 } |
244 static FX_BOOL XFA_FDEExtension_MatchNodeName( | 244 static FX_BOOL XFA_FDEExtension_MatchNodeName( |
245 IFDE_XMLNode* pNode, | 245 IFDE_XMLNode* pNode, |
246 const CFX_WideStringC& wsLocalTagName, | 246 const CFX_WideStringC& wsLocalTagName, |
247 const CFX_WideStringC& wsNamespaceURIPrefix, | 247 const CFX_WideStringC& wsNamespaceURIPrefix, |
248 FX_DWORD eMatchFlags = XFA_XDPPACKET_FLAGS_NOMATCH) { | 248 uint32_t eMatchFlags = XFA_XDPPACKET_FLAGS_NOMATCH) { |
249 if (!pNode || pNode->GetType() != FDE_XMLNODE_Element) { | 249 if (!pNode || pNode->GetType() != FDE_XMLNODE_Element) { |
250 return FALSE; | 250 return FALSE; |
251 } | 251 } |
252 IFDE_XMLElement* pElement = reinterpret_cast<IFDE_XMLElement*>(pNode); | 252 IFDE_XMLElement* pElement = reinterpret_cast<IFDE_XMLElement*>(pNode); |
253 CFX_WideString wsNodeStr; | 253 CFX_WideString wsNodeStr; |
254 pElement->GetLocalTagName(wsNodeStr); | 254 pElement->GetLocalTagName(wsNodeStr); |
255 if (wsNodeStr != wsLocalTagName) { | 255 if (wsNodeStr != wsLocalTagName) { |
256 return FALSE; | 256 return FALSE; |
257 } | 257 } |
258 XFA_FDEExtension_GetElementTagNamespaceURI(pElement, wsNodeStr); | 258 XFA_FDEExtension_GetElementTagNamespaceURI(pElement, wsNodeStr); |
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1559 break; | 1559 break; |
1560 } | 1560 } |
1561 if (pPause && iCount > 500 && pPause->NeedToPauseNow()) { | 1561 if (pPause && iCount > 500 && pPause->NeedToPauseNow()) { |
1562 break; | 1562 break; |
1563 } | 1563 } |
1564 } | 1564 } |
1565 return (m_dwStatus == FDE_XMLSYNTAXSTATUS_Error || m_NodeStack.GetSize() != 1) | 1565 return (m_dwStatus == FDE_XMLSYNTAXSTATUS_Error || m_NodeStack.GetSize() != 1) |
1566 ? -1 | 1566 ? -1 |
1567 : m_pParser->GetStatus(); | 1567 : m_pParser->GetStatus(); |
1568 } | 1568 } |
OLD | NEW |