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

Unified Diff: xfa/fxfa/parser/xfa_document_serialize.cpp

Issue 1867463002: Make static FX_WCHAR arrays more const. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fde/css/fde_cssstylesheet.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_document_serialize.cpp
diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp
index 91b8ff129c73a79cfe958a20082ffb54304d438e..f08215aa4c8f7973a30a30d04e41d775d650a446 100644
--- a/xfa/fxfa/parser/xfa_document_serialize.cpp
+++ b/xfa/fxfa/parser/xfa_document_serialize.cpp
@@ -429,11 +429,11 @@ void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode,
const FX_CHAR* pChecksum,
FX_BOOL bSaveXML) {
if (pNode->GetObjectType() == XFA_OBJECTTYPE_ModelNode) {
- static const FX_WCHAR* s_pwsTagName = L"<form";
- static const FX_WCHAR* s_pwsClose = L"</form\n>";
+ static const FX_WCHAR s_pwsTagName[] = L"<form";
+ static const FX_WCHAR s_pwsClose[] = L"</form\n>";
pStream->WriteString(s_pwsTagName, FXSYS_wcslen(s_pwsTagName));
if (pChecksum) {
- static const FX_WCHAR* s_pwChecksum = L" checksum=\"";
+ static const FX_WCHAR s_pwChecksum[] = L" checksum=\"";
CFX_WideString wsChecksum = CFX_WideString::FromUTF8(pChecksum);
pStream->WriteString(s_pwChecksum, FXSYS_wcslen(s_pwChecksum));
pStream->WriteString((const FX_WCHAR*)wsChecksum, wsChecksum.GetLength());
@@ -497,14 +497,14 @@ FX_BOOL CXFA_DataExporter::Export(IFX_Stream* pStream,
if (pNode->GetObjectType() == XFA_OBJECTTYPE_ModelNode) {
switch (pNode->GetPacketID()) {
case XFA_XDPPACKET_XDP: {
- static const FX_WCHAR* s_pwsPreamble =
+ static const FX_WCHAR s_pwsPreamble[] =
L"<xdp:xdp xmlns:xdp=\"http://ns.adobe.com/xdp/\">";
pStream->WriteString(s_pwsPreamble, FXSYS_wcslen(s_pwsPreamble));
for (CXFA_Node* pChild = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
pChild; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
Export(pStream, pChild, dwFlag, pChecksum);
}
- static const FX_WCHAR* s_pwsPostamble = L"</xdp:xdp\n>";
+ static const FX_WCHAR s_pwsPostamble[] = L"</xdp:xdp\n>";
pStream->WriteString(s_pwsPostamble, FXSYS_wcslen(s_pwsPostamble));
} break;
case XFA_XDPPACKET_Datasets: {
« no previous file with comments | « xfa/fde/css/fde_cssstylesheet.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698