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

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

Issue 1862123003: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, fix new usage. Created 4 years, 8 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
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