| 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_serialize.h" | 7 #include "xfa/fxfa/parser/xfa_document_serialize.h" |
| 8 | 8 |
| 9 #include "xfa/fde/xml/fde_xml_imp.h" | 9 #include "xfa/fde/xml/fde_xml_imp.h" |
| 10 #include "xfa/fgas/crt/fgas_codepage.h" | 10 #include "xfa/fgas/crt/fgas_codepage.h" |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 CFX_WideString bodyTagName; | 290 CFX_WideString bodyTagName; |
| 291 bodyTagName = pGrandparentNode->GetCData(XFA_ATTRIBUTE_Name); | 291 bodyTagName = pGrandparentNode->GetCData(XFA_ATTRIBUTE_Name); |
| 292 if (bodyTagName.IsEmpty()) { | 292 if (bodyTagName.IsEmpty()) { |
| 293 bodyTagName = FX_WSTRC(L"ListBox1"); | 293 bodyTagName = FX_WSTRC(L"ListBox1"); |
| 294 } | 294 } |
| 295 buf << FX_WSTRC(L"<"); | 295 buf << FX_WSTRC(L"<"); |
| 296 buf << bodyTagName; | 296 buf << bodyTagName; |
| 297 buf << FX_WSTRC(L" xmlns=\"\"\n>"); | 297 buf << FX_WSTRC(L" xmlns=\"\"\n>"); |
| 298 for (int32_t i = 0; i < wsSelTextArray.GetSize(); i++) { | 298 for (int32_t i = 0; i < wsSelTextArray.GetSize(); i++) { |
| 299 buf << FX_WSTRC(L"<value\n>"); | 299 buf << FX_WSTRC(L"<value\n>"); |
| 300 buf << XFA_ExportEncodeContent(wsSelTextArray[i].AsWideStringC()); | 300 buf << XFA_ExportEncodeContent(wsSelTextArray[i].AsStringC()); |
| 301 buf << FX_WSTRC(L"</value\n>"); | 301 buf << FX_WSTRC(L"</value\n>"); |
| 302 } | 302 } |
| 303 buf << FX_WSTRC(L"</"); | 303 buf << FX_WSTRC(L"</"); |
| 304 buf << bodyTagName; | 304 buf << bodyTagName; |
| 305 buf << FX_WSTRC(L"\n>"); | 305 buf << FX_WSTRC(L"\n>"); |
| 306 wsChildren += buf.GetWideString(); | 306 wsChildren += buf.GetWideString(); |
| 307 buf.Clear(); | 307 buf.Clear(); |
| 308 } else { | 308 } else { |
| 309 CFX_WideStringC wsValue = pRawValueNode->GetCData(XFA_ATTRIBUTE_Value); | 309 CFX_WideStringC wsValue = pRawValueNode->GetCData(XFA_ATTRIBUTE_Value); |
| 310 wsChildren += XFA_ExportEncodeContent(wsValue); | 310 wsChildren += XFA_ExportEncodeContent(wsValue); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 pXMLElement->RemoveAttribute(L"xfa:dataNode"); | 576 pXMLElement->RemoveAttribute(L"xfa:dataNode"); |
| 577 } | 577 } |
| 578 } else { | 578 } else { |
| 579 CFDE_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode(); | 579 CFDE_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode(); |
| 580 FXSYS_assert(pXMLNode->GetType() == FDE_XMLNODE_Element); | 580 FXSYS_assert(pXMLNode->GetType() == FDE_XMLNODE_Element); |
| 581 static_cast<CFDE_XMLElement*>(pXMLNode) | 581 static_cast<CFDE_XMLElement*>(pXMLNode) |
| 582 ->SetString(FX_WSTRC(L"xfa:dataNode"), FX_WSTRC(L"dataGroup")); | 582 ->SetString(FX_WSTRC(L"xfa:dataNode"), FX_WSTRC(L"dataGroup")); |
| 583 } | 583 } |
| 584 } | 584 } |
| 585 } | 585 } |
| OLD | NEW |