OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
(...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1436 if (GetPacketID() == XFA_XDPPACKET_Datasets) { | 1436 if (GetPacketID() == XFA_XDPPACKET_Datasets) { |
1437 pElement = GetXMLMappingNode(); | 1437 pElement = GetXMLMappingNode(); |
1438 if (!pElement || pElement->GetType() != FDE_XMLNODE_Element) { | 1438 if (!pElement || pElement->GetType() != FDE_XMLNODE_Element) { |
1439 pArguments->GetReturnValue()->SetString(bsXMLHeader); | 1439 pArguments->GetReturnValue()->SetString(bsXMLHeader); |
1440 return; | 1440 return; |
1441 } | 1441 } |
1442 XFA_DataExporter_DealWithDataGroupNode(this); | 1442 XFA_DataExporter_DealWithDataGroupNode(this); |
1443 } | 1443 } |
1444 std::unique_ptr<IFX_MemoryStream, ReleaseDeleter<IFX_MemoryStream>> | 1444 std::unique_ptr<IFX_MemoryStream, ReleaseDeleter<IFX_MemoryStream>> |
1445 pMemoryStream(IFX_MemoryStream::Create(true)); | 1445 pMemoryStream(IFX_MemoryStream::Create(true)); |
1446 std::unique_ptr<IFX_Stream, ReleaseDeleter<IFX_Stream>> pStream( | 1446 std::unique_ptr<IFGAS_Stream, ReleaseDeleter<IFGAS_Stream>> pStream( |
1447 IFX_Stream::CreateStream( | 1447 IFGAS_Stream::CreateStream( |
1448 static_cast<IFX_SeekableWriteStream*>(pMemoryStream.get()), | 1448 static_cast<IFX_SeekableWriteStream*>(pMemoryStream.get()), |
1449 FX_STREAMACCESS_Text | FX_STREAMACCESS_Write | | 1449 FX_STREAMACCESS_Text | FX_STREAMACCESS_Write | |
1450 FX_STREAMACCESS_Append)); | 1450 FX_STREAMACCESS_Append)); |
1451 if (!pStream) { | 1451 if (!pStream) { |
1452 pArguments->GetReturnValue()->SetString(bsXMLHeader); | 1452 pArguments->GetReturnValue()->SetString(bsXMLHeader); |
1453 return; | 1453 return; |
1454 } | 1454 } |
1455 pStream->SetCodePage(FX_CODEPAGE_UTF8); | 1455 pStream->SetCodePage(FX_CODEPAGE_UTF8); |
1456 pStream->WriteData(bsXMLHeader.raw_str(), bsXMLHeader.GetLength()); | 1456 pStream->WriteData(bsXMLHeader.raw_str(), bsXMLHeader.GetLength()); |
1457 if (GetPacketID() == XFA_XDPPACKET_Form) | 1457 if (GetPacketID() == XFA_XDPPACKET_Form) |
(...skipping 3728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5186 CXFA_Node* pSrcChild = pSrcModule->GetNodeItem(XFA_NODEITEM_FirstChild); | 5186 CXFA_Node* pSrcChild = pSrcModule->GetNodeItem(XFA_NODEITEM_FirstChild); |
5187 CXFA_Node* pDstChild = pDstModule->GetNodeItem(XFA_NODEITEM_FirstChild); | 5187 CXFA_Node* pDstChild = pDstModule->GetNodeItem(XFA_NODEITEM_FirstChild); |
5188 for (; pSrcChild && pDstChild; | 5188 for (; pSrcChild && pDstChild; |
5189 pSrcChild = pSrcChild->GetNodeItem(XFA_NODEITEM_NextSibling), | 5189 pSrcChild = pSrcChild->GetNodeItem(XFA_NODEITEM_NextSibling), |
5190 pDstChild = pDstChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { | 5190 pDstChild = pDstChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { |
5191 MoveBufferMapData(pSrcChild, pDstChild, pKey, true); | 5191 MoveBufferMapData(pSrcChild, pDstChild, pKey, true); |
5192 } | 5192 } |
5193 } | 5193 } |
5194 pSrcModule->MoveBufferMapData(pDstModule, pKey); | 5194 pSrcModule->MoveBufferMapData(pDstModule, pKey); |
5195 } | 5195 } |
OLD | NEW |