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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 buf << FX_WSTRC(L"</"); | 364 buf << FX_WSTRC(L"</"); |
365 buf << wsElement; | 365 buf << wsElement; |
366 buf << FX_WSTRC(L"\n>"); | 366 buf << FX_WSTRC(L"\n>"); |
367 } | 367 } |
368 } | 368 } |
369 } | 369 } |
370 static void XFA_DataExporter_RegenerateFormFile_Container( | 370 static void XFA_DataExporter_RegenerateFormFile_Container( |
371 CXFA_Node* pNode, | 371 CXFA_Node* pNode, |
372 IFX_Stream* pStream, | 372 IFX_Stream* pStream, |
373 FX_BOOL bSaveXML = FALSE) { | 373 FX_BOOL bSaveXML = FALSE) { |
374 XFA_Element eElement = pNode->GetElementType(); | 374 XFA_Element eType = pNode->GetElementType(); |
375 if (eElement == XFA_Element::Field || eElement == XFA_Element::Draw || | 375 if (eType == XFA_Element::Field || eType == XFA_Element::Draw || |
376 !pNode->IsContainerNode()) { | 376 !pNode->IsContainerNode()) { |
377 CFX_WideTextBuf buf; | 377 CFX_WideTextBuf buf; |
378 XFA_DataExporter_RegenerateFormFile_Changed(pNode, buf, bSaveXML); | 378 XFA_DataExporter_RegenerateFormFile_Changed(pNode, buf, bSaveXML); |
379 FX_STRSIZE nLen = buf.GetLength(); | 379 FX_STRSIZE nLen = buf.GetLength(); |
380 if (nLen > 0) { | 380 if (nLen > 0) { |
381 pStream->WriteString((const FX_WCHAR*)buf.GetBuffer(), nLen); | 381 pStream->WriteString((const FX_WCHAR*)buf.GetBuffer(), nLen); |
382 } | 382 } |
383 return; | 383 return; |
384 } | 384 } |
385 CFX_WideStringC wsElement; | 385 CFX_WideStringC wsElement; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 pXMLElement->RemoveAttribute(L"xfa:dataNode"); | 572 pXMLElement->RemoveAttribute(L"xfa:dataNode"); |
573 } | 573 } |
574 } else { | 574 } else { |
575 CFDE_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode(); | 575 CFDE_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode(); |
576 ASSERT(pXMLNode->GetType() == FDE_XMLNODE_Element); | 576 ASSERT(pXMLNode->GetType() == FDE_XMLNODE_Element); |
577 static_cast<CFDE_XMLElement*>(pXMLNode)->SetString(L"xfa:dataNode", | 577 static_cast<CFDE_XMLElement*>(pXMLNode)->SetString(L"xfa:dataNode", |
578 L"dataGroup"); | 578 L"dataGroup"); |
579 } | 579 } |
580 } | 580 } |
581 } | 581 } |
OLD | NEW |