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_document_datamerger_imp.h" | 7 #include "xfa/fxfa/parser/xfa_document_datamerger_imp.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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 switch (objectType) { | 72 switch (objectType) { |
73 case XFA_OBJECTTYPE_ContentNode: { | 73 case XFA_OBJECTTYPE_ContentNode: { |
74 CXFA_Node* pContentRawDataNode = | 74 CXFA_Node* pContentRawDataNode = |
75 pChildNode->GetNodeItem(XFA_NODEITEM_FirstChild); | 75 pChildNode->GetNodeItem(XFA_NODEITEM_FirstChild); |
76 if (!pContentRawDataNode) { | 76 if (!pContentRawDataNode) { |
77 XFA_ELEMENT element = XFA_ELEMENT_Sharptext; | 77 XFA_ELEMENT element = XFA_ELEMENT_Sharptext; |
78 if (pChildNode->GetClassID() == XFA_ELEMENT_ExData) { | 78 if (pChildNode->GetClassID() == XFA_ELEMENT_ExData) { |
79 CFX_WideString wsContentType; | 79 CFX_WideString wsContentType; |
80 pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, | 80 pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, |
81 FALSE); | 81 FALSE); |
82 if (wsContentType.Equal(FX_WSTRC(L"text/html"))) { | 82 if (wsContentType == FX_WSTRC(L"text/html")) { |
83 element = XFA_ELEMENT_SharpxHTML; | 83 element = XFA_ELEMENT_SharpxHTML; |
84 } else if (wsContentType.Equal(FX_WSTRC(L"text/xml"))) { | 84 } else if (wsContentType == FX_WSTRC(L"text/xml")) { |
85 element = XFA_ELEMENT_Sharpxml; | 85 element = XFA_ELEMENT_Sharpxml; |
86 } | 86 } |
87 } | 87 } |
88 pContentRawDataNode = pChildNode->CreateSamePacketNode(element); | 88 pContentRawDataNode = pChildNode->CreateSamePacketNode(element); |
89 pChildNode->InsertChild(pContentRawDataNode); | 89 pChildNode->InsertChild(pContentRawDataNode); |
90 } | 90 } |
91 pContentRawDataNode->SetCData(XFA_ATTRIBUTE_Value, wsContent); | 91 pContentRawDataNode->SetCData(XFA_ATTRIBUTE_Value, wsContent); |
92 } break; | 92 } break; |
93 case XFA_OBJECTTYPE_NodeC: | 93 case XFA_OBJECTTYPE_NodeC: |
94 case XFA_OBJECTTYPE_TextNode: | 94 case XFA_OBJECTTYPE_TextNode: |
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1423 } | 1423 } |
1424 pFormRoot->SetObject(XFA_ATTRIBUTE_BindingNode, NULL); | 1424 pFormRoot->SetObject(XFA_ATTRIBUTE_BindingNode, NULL); |
1425 } | 1425 } |
1426 XFA_DataMerge_ClearGlobalBinding(this); | 1426 XFA_DataMerge_ClearGlobalBinding(this); |
1427 if (bDoDataMerge) { | 1427 if (bDoDataMerge) { |
1428 DoDataMerge(); | 1428 DoDataMerge(); |
1429 } | 1429 } |
1430 CXFA_LayoutProcessor* pLayoutProcessor = GetLayoutProcessor(); | 1430 CXFA_LayoutProcessor* pLayoutProcessor = GetLayoutProcessor(); |
1431 pLayoutProcessor->SetForceReLayout(TRUE); | 1431 pLayoutProcessor->SetForceReLayout(TRUE); |
1432 } | 1432 } |
OLD | NEW |