Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: xfa/fxfa/parser/xfa_document_serialize.cpp

Issue 2027273002: Fix all the code which has duplicate variable declarations (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 XFA_DataExporter_RegenerateFormFile_Changed(pChildNode, newBuf, 329 XFA_DataExporter_RegenerateFormFile_Changed(pChildNode, newBuf,
330 bSaveXML); 330 bSaveXML);
331 wsChildren += newBuf.AsStringC(); 331 wsChildren += newBuf.AsStringC();
332 newBuf.Clear(); 332 newBuf.Clear();
333 pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_NextSibling); 333 pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_NextSibling);
334 } 334 }
335 if (!bSaveXML && !wsChildren.IsEmpty() && 335 if (!bSaveXML && !wsChildren.IsEmpty() &&
336 pNode->GetClassID() == XFA_ELEMENT_Items) { 336 pNode->GetClassID() == XFA_ELEMENT_Items) {
337 wsChildren.clear(); 337 wsChildren.clear();
338 bSaveXML = TRUE; 338 bSaveXML = TRUE;
339 CXFA_Node* pChildNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild); 339 CXFA_Node* pChild = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
340 while (pChildNode) { 340 while (pChild) {
341 XFA_DataExporter_RegenerateFormFile_Changed(pChildNode, newBuf, 341 XFA_DataExporter_RegenerateFormFile_Changed(pChild, newBuf, bSaveXML);
342 bSaveXML);
343 wsChildren += newBuf.AsStringC(); 342 wsChildren += newBuf.AsStringC();
344 newBuf.Clear(); 343 newBuf.Clear();
345 pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_NextSibling); 344 pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling);
346 } 345 }
347 } 346 }
348 break; 347 break;
349 } 348 }
350 if (!wsChildren.IsEmpty() || !wsAttrs.IsEmpty() || 349 if (!wsChildren.IsEmpty() || !wsAttrs.IsEmpty() ||
351 pNode->HasAttribute(XFA_ATTRIBUTE_Name)) { 350 pNode->HasAttribute(XFA_ATTRIBUTE_Name)) {
352 CFX_WideStringC wsElement; 351 CFX_WideStringC wsElement;
353 pNode->GetClassName(wsElement); 352 pNode->GetClassName(wsElement);
354 CFX_WideString wsName; 353 CFX_WideString wsName;
355 XFA_SaveAttribute(pNode, XFA_ATTRIBUTE_Name, FX_WSTRC(L"name"), TRUE, 354 XFA_SaveAttribute(pNode, XFA_ATTRIBUTE_Name, FX_WSTRC(L"name"), TRUE,
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 pXMLElement->RemoveAttribute(L"xfa:dataNode"); 572 pXMLElement->RemoveAttribute(L"xfa:dataNode");
574 } 573 }
575 } else { 574 } else {
576 CFDE_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode(); 575 CFDE_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode();
577 ASSERT(pXMLNode->GetType() == FDE_XMLNODE_Element); 576 ASSERT(pXMLNode->GetType() == FDE_XMLNODE_Element);
578 static_cast<CFDE_XMLElement*>(pXMLNode)->SetString(L"xfa:dataNode", 577 static_cast<CFDE_XMLElement*>(pXMLNode)->SetString(L"xfa:dataNode",
579 L"dataGroup"); 578 L"dataGroup");
580 } 579 }
581 } 580 }
582 } 581 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_document_datamerger_imp.cpp ('k') | xfa/fxfa/parser/xfa_layout_itemlayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698