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 <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 2961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2972 pDataScope = pRootBoundNode->GetBindData(); | 2972 pDataScope = pRootBoundNode->GetBindData(); |
2973 if (pDataScope) { | 2973 if (pDataScope) { |
2974 break; | 2974 break; |
2975 } | 2975 } |
2976 } | 2976 } |
2977 if (!pDataScope) { | 2977 if (!pDataScope) { |
2978 pDataScope = ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Record)); | 2978 pDataScope = ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Record)); |
2979 ASSERT(pDataScope); | 2979 ASSERT(pDataScope); |
2980 } | 2980 } |
2981 CXFA_Node* pInstance = pDocument->DataMerge_CopyContainer( | 2981 CXFA_Node* pInstance = pDocument->DataMerge_CopyContainer( |
2982 pTemplateNode, pFormParent, pDataScope, TRUE, bDataMerge); | 2982 pTemplateNode, pFormParent, pDataScope, TRUE, bDataMerge, TRUE); |
2983 if (pInstance) { | 2983 if (pInstance) { |
2984 pDocument->DataMerge_UpdateBindingRelations(pInstance); | 2984 pDocument->DataMerge_UpdateBindingRelations(pInstance); |
2985 pFormParent->RemoveChild(pInstance); | 2985 pFormParent->RemoveChild(pInstance); |
2986 } | 2986 } |
2987 return pInstance; | 2987 return pInstance; |
2988 } | 2988 } |
2989 void CXFA_Node::Script_InstanceManager_Count(CFXJSE_Value* pValue, | 2989 void CXFA_Node::Script_InstanceManager_Count(CFXJSE_Value* pValue, |
2990 FX_BOOL bSetting, | 2990 FX_BOOL bSetting, |
2991 XFA_ATTRIBUTE eAttribute) { | 2991 XFA_ATTRIBUTE eAttribute) { |
2992 if (bSetting) { | 2992 if (bSetting) { |
(...skipping 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5263 return m_pAttachNode->InsertChild(pNewNode, pBeforeNode); | 5263 return m_pAttachNode->InsertChild(pNewNode, pBeforeNode); |
5264 } | 5264 } |
5265 FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode) { | 5265 FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode) { |
5266 return m_pAttachNode->RemoveChild(pNode); | 5266 return m_pAttachNode->RemoveChild(pNode); |
5267 } | 5267 } |
5268 CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex) { | 5268 CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex) { |
5269 return m_pAttachNode->GetChild( | 5269 return m_pAttachNode->GetChild( |
5270 iIndex, XFA_Element::Unknown, | 5270 iIndex, XFA_Element::Unknown, |
5271 m_pAttachNode->GetElementType() == XFA_Element::Subform); | 5271 m_pAttachNode->GetElementType() == XFA_Element::Subform); |
5272 } | 5272 } |
OLD | NEW |