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_object.h" | 7 #include "xfa/fxfa/parser/xfa_object.h" |
8 | 8 |
9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
10 #include "xfa/fde/xml/fde_xml_imp.h" | 10 #include "xfa/fde/xml/fde_xml_imp.h" |
(...skipping 4066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4077 return FALSE; | 4077 return FALSE; |
4078 } | 4078 } |
4079 FX_BOOL CXFA_Node::TryCData(XFA_ATTRIBUTE eAttr, | 4079 FX_BOOL CXFA_Node::TryCData(XFA_ATTRIBUTE eAttr, |
4080 CFX_WideStringC& wsValue, | 4080 CFX_WideStringC& wsValue, |
4081 FX_BOOL bUseDefault, | 4081 FX_BOOL bUseDefault, |
4082 FX_BOOL bProto) { | 4082 FX_BOOL bProto) { |
4083 void* pKey = XFA_GetMapKey_Element(GetClassID(), eAttr); | 4083 void* pKey = XFA_GetMapKey_Element(GetClassID(), eAttr); |
4084 if (eAttr == XFA_ATTRIBUTE_Value) { | 4084 if (eAttr == XFA_ATTRIBUTE_Value) { |
4085 CFX_WideString* pStr = (CFX_WideString*)GetUserData(pKey, bProto); | 4085 CFX_WideString* pStr = (CFX_WideString*)GetUserData(pKey, bProto); |
4086 if (pStr) { | 4086 if (pStr) { |
4087 wsValue = *pStr; | 4087 wsValue = pStr->AsStringC(); |
4088 return TRUE; | 4088 return TRUE; |
4089 } | 4089 } |
4090 } else { | 4090 } else { |
4091 if (GetMapModuleString(pKey, wsValue)) { | 4091 if (GetMapModuleString(pKey, wsValue)) { |
4092 return TRUE; | 4092 return TRUE; |
4093 } | 4093 } |
4094 } | 4094 } |
4095 if (!bUseDefault) { | 4095 if (!bUseDefault) { |
4096 return FALSE; | 4096 return FALSE; |
4097 } | 4097 } |
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5395 return m_pAttachNode->InsertChild(pNewNode, pBeforeNode); | 5395 return m_pAttachNode->InsertChild(pNewNode, pBeforeNode); |
5396 } | 5396 } |
5397 FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode) { | 5397 FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode) { |
5398 return m_pAttachNode->RemoveChild(pNode); | 5398 return m_pAttachNode->RemoveChild(pNode); |
5399 } | 5399 } |
5400 CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex) { | 5400 CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex) { |
5401 return m_pAttachNode->GetChild( | 5401 return m_pAttachNode->GetChild( |
5402 iIndex, XFA_ELEMENT_UNKNOWN, | 5402 iIndex, XFA_ELEMENT_UNKNOWN, |
5403 m_pAttachNode->GetClassID() == XFA_ELEMENT_Subform); | 5403 m_pAttachNode->GetClassID() == XFA_ELEMENT_Subform); |
5404 } | 5404 } |
OLD | NEW |