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