Replace wide literals with narrow ones in WideTextBuf operations.

Squeeze some 0s out of the binary. Only non-mechanical change
was one widestring addition to consecutive << operations.

Change-Id: I730a77eeb099c7fa3cf48ca91606bb660fc569c8
Reviewed-on: https://pdfium-review.googlesource.com/c/46310
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fxfa/fm2js/cxfa_fmexpression.cpp b/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
index 244030e..61035c5 100644
--- a/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
@@ -53,16 +53,16 @@
   if (m_wsName.IsEmpty())
     return false;
 
-  *js << L"function " << IdentifierToName(m_wsName) << L"(";
+  *js << "function " << IdentifierToName(m_wsName) << "(";
   for (const auto& identifier : m_pArguments) {
     if (identifier != m_pArguments.front())
-      *js << L", ";
+      *js << ", ";
 
     *js << IdentifierToName(identifier);
   }
-  *js << L") {\n";
+  *js << ") {\n";
 
-  *js << L"var pfm_ret = null;\n";
+  *js << "var pfm_ret = null;\n";
   for (const auto& expr : m_pExpressions) {
     ReturnType ret_type = expr == m_pExpressions.back() ? ReturnType::kImplied
                                                         : ReturnType::kInfered;
@@ -70,8 +70,8 @@
       return false;
   }
 
-  *js << L"return pfm_ret;\n";
-  *js << L"}\n";
+  *js << "return pfm_ret;\n";
+  *js << "}\n";
 
   return !CXFA_IsTooBig(js);
 }
@@ -84,22 +84,22 @@
 
 bool CXFA_FMAST::ToJavaScript(CFX_WideTextBuf* js) {
   if (expressions_.empty()) {
-    *js << L"// comments only";
+    *js << "// comments only";
     return !CXFA_IsTooBig(js);
   }
 
-  *js << L"(function() {\n";
-  *js << L"let pfm_method_runner = function(obj, cb) {\n";
-  *js << L"  if (pfm_rt.is_ary(obj)) {\n";
-  *js << L"    let pfm_method_return = null;\n";
-  *js << L"    for (var idx = obj.length -1; idx > 1; idx--) {\n";
-  *js << L"      pfm_method_return = cb(obj[idx]);\n";
-  *js << L"    }\n";
-  *js << L"    return pfm_method_return;\n";
-  *js << L"  }\n";
-  *js << L"  return cb(obj);\n";
-  *js << L"};\n";
-  *js << L"var pfm_ret = null;\n";
+  *js << "(function() {\n";
+  *js << "let pfm_method_runner = function(obj, cb) {\n";
+  *js << "  if (pfm_rt.is_ary(obj)) {\n";
+  *js << "    let pfm_method_return = null;\n";
+  *js << "    for (var idx = obj.length -1; idx > 1; idx--) {\n";
+  *js << "      pfm_method_return = cb(obj[idx]);\n";
+  *js << "    }\n";
+  *js << "    return pfm_method_return;\n";
+  *js << "  }\n";
+  *js << "  return cb(obj);\n";
+  *js << "};\n";
+  *js << "var pfm_ret = null;\n";
 
   for (const auto& expr : expressions_) {
     ReturnType ret_type = expr == expressions_.back() ? ReturnType::kImplied
@@ -108,8 +108,8 @@
       return false;
   }
 
-  *js << L"return pfm_rt.get_val(pfm_ret);\n";
-  *js << L"}).call(this);";
+  *js << "return pfm_rt.get_val(pfm_ret);\n";
+  *js << "}).call(this);";
   return !CXFA_IsTooBig(js);
 }
 
@@ -126,19 +126,19 @@
     return false;
 
   WideString tempName = IdentifierToName(m_wsName);
-  *js << L"var " << tempName << L" = ";
+  *js << "var " << tempName << " = ";
   if (m_pInit) {
     if (!m_pInit->ToJavaScript(js, ReturnType::kInfered))
       return false;
 
-    *js << L";\n";
-    *js << tempName << L" = pfm_rt.var_filter(" << tempName << L");\n";
+    *js << ";\n";
+    *js << tempName << " = pfm_rt.var_filter(" << tempName << ");\n";
   } else {
-    *js << L"\"\";\n";
+    *js << "\"\";\n";
   }
 
   if (type == ReturnType::kImplied)
-    *js << L"pfm_ret = " << tempName << L";\n";
+    *js << "pfm_ret = " << tempName << ";\n";
 
   return !CXFA_IsTooBig(js);
 }
@@ -157,7 +157,7 @@
   if (type == ReturnType::kInfered) {
     bool ret = m_pExpression->ToJavaScript(js, ReturnType::kInfered);
     if (m_pExpression->GetOperatorToken() != TOKassign)
-      *js << L";\n";
+      *js << ";\n";
 
     return ret;
   }
@@ -170,19 +170,19 @@
       m_pExpression->GetOperatorToken() == TOKdotscream ||
       m_pExpression->GetOperatorToken() == TOKdotdot ||
       m_pExpression->GetOperatorToken() == TOKdot) {
-    *js << L"pfm_ret = pfm_rt.get_val(";
+    *js << "pfm_ret = pfm_rt.get_val(";
     if (!m_pExpression->ToJavaScript(js, ReturnType::kInfered))
       return false;
 
-    *js << L");\n";
+    *js << ");\n";
     return !CXFA_IsTooBig(js);
   }
 
-  *js << L"pfm_ret = ";
+  *js << "pfm_ret = ";
   if (!m_pExpression->ToJavaScript(js, ReturnType::kInfered))
     return false;
 
-  *js << L";\n";
+  *js << ";\n";
   return !CXFA_IsTooBig(js);
 }
 
@@ -198,7 +198,7 @@
   if (CXFA_IsTooBig(js) || !depthManager.IsWithinMaxDepth())
     return false;
 
-  *js << L"{\n";
+  *js << "{\n";
   for (const auto& expr : m_ExpressionList) {
     if (type == ReturnType::kInfered) {
       if (!expr->ToJavaScript(js, ReturnType::kInfered))
@@ -211,7 +211,7 @@
         return false;
     }
   }
-  *js << L"}\n";
+  *js << "}\n";
 
   return !CXFA_IsTooBig(js);
 }
@@ -251,12 +251,12 @@
     return false;
 
   if (type == ReturnType::kImplied)
-    *js << L"pfm_ret = 0;\n";
+    *js << "pfm_ret = 0;\n";
 
-  *js << L"if (pfm_rt.get_val(";
+  *js << "if (pfm_rt.get_val(";
   if (!m_pExpression->ToJavaScript(js, ReturnType::kInfered))
     return false;
-  *js << L"))\n";
+  *js << "))\n";
 
   if (CXFA_IsTooBig(js))
     return false;
@@ -269,13 +269,13 @@
   }
 
   for (auto& expr : m_pElseIfExpressions) {
-    *js << L"else ";
+    *js << "else ";
     if (!expr->ToJavaScript(js, ReturnType::kInfered))
       return false;
   }
 
   if (m_pElseExpression) {
-    *js << L"else ";
+    *js << "else ";
     if (!m_pElseExpression->ToJavaScript(js, type))
       return false;
   }
@@ -298,13 +298,13 @@
     return false;
 
   if (type == ReturnType::kImplied)
-    *js << L"pfm_ret = 0;\n";
+    *js << "pfm_ret = 0;\n";
 
-  *js << L"while (";
+  *js << "while (";
   if (!m_pCondition->ToJavaScript(js, ReturnType::kInfered))
     return false;
 
-  *js << L")\n";
+  *js << ")\n";
   if (CXFA_IsTooBig(js))
     return false;
 
@@ -324,7 +324,7 @@
   if (CXFA_IsTooBig(js) || !depthManager.IsWithinMaxDepth())
     return false;
 
-  *js << L"pfm_ret = 0;\nbreak;\n";
+  *js << "pfm_ret = 0;\nbreak;\n";
   return !CXFA_IsTooBig(js);
 }
 
@@ -338,7 +338,7 @@
   if (CXFA_IsTooBig(js) || !depthManager.IsWithinMaxDepth())
     return false;
 
-  *js << L"pfm_ret = 0;\ncontinue;\n";
+  *js << "pfm_ret = 0;\ncontinue;\n";
   return !CXFA_IsTooBig(js);
 }
 
@@ -365,41 +365,41 @@
     return false;
 
   if (type == ReturnType::kImplied)
-    *js << L"pfm_ret = 0;\n";
+    *js << "pfm_ret = 0;\n";
 
-  *js << L"{\n";
+  *js << "{\n";
 
   WideString tmpName = IdentifierToName(m_wsVariant);
-  *js << L"var " << tmpName << L" = null;\n";
+  *js << "var " << tmpName << " = null;\n";
 
-  *js << L"for (" << tmpName << L" = pfm_rt.get_val(";
+  *js << "for (" << tmpName << " = pfm_rt.get_val(";
   if (!m_pAssignment->ToJavaScript(js, ReturnType::kInfered))
     return false;
-  *js << L"); ";
+  *js << "); ";
 
   *js << tmpName << (m_bDirection ? kLessEqual : kGreaterEqual);
-  *js << L"pfm_rt.get_val(";
+  *js << "pfm_rt.get_val(";
   if (!m_pAccessor->ToJavaScript(js, ReturnType::kInfered))
     return false;
-  *js << L"); ";
+  *js << "); ";
 
   *js << tmpName << (m_bDirection ? kPlusEqual : kMinusEqual);
   if (m_pStep) {
-    *js << L"pfm_rt.get_val(";
+    *js << "pfm_rt.get_val(";
     if (!m_pStep->ToJavaScript(js, ReturnType::kInfered))
       return false;
-    *js << L")";
+    *js << ")";
   } else {
-    *js << L"1";
+    *js << "1";
   }
-  *js << L")\n";
+  *js << ")\n";
   if (CXFA_IsTooBig(js))
     return false;
 
   if (!m_pList->ToJavaScript(js, type))
     return false;
 
-  *js << L"}\n";
+  *js << "}\n";
   return !CXFA_IsTooBig(js);
 }
 
@@ -421,28 +421,28 @@
     return false;
 
   if (type == ReturnType::kImplied)
-    *js << L"pfm_ret = 0;\n";
+    *js << "pfm_ret = 0;\n";
 
-  *js << L"{\n";
+  *js << "{\n";
 
   WideString tmpName = IdentifierToName(m_wsIdentifier);
-  *js << L"var " << tmpName << L" = null;\n";
-  *js << L"var pfm_ary = pfm_rt.concat_obj(";
+  *js << "var " << tmpName << " = null;\n";
+  *js << "var pfm_ary = pfm_rt.concat_obj(";
   for (const auto& expr : m_pAccessors) {
     if (!expr->ToJavaScript(js, ReturnType::kInfered))
       return false;
     if (expr != m_pAccessors.back())
-      *js << L", ";
+      *js << ", ";
   }
-  *js << L");\n";
+  *js << ");\n";
 
-  *js << L"var pfm_ary_idx = 0;\n";
-  *js << L"while(pfm_ary_idx < pfm_ary.length)\n{\n";
-  *js << tmpName << L" = pfm_ary[pfm_ary_idx++];\n";
+  *js << "var pfm_ary_idx = 0;\n";
+  *js << "while(pfm_ary_idx < pfm_ary.length)\n{\n";
+  *js << tmpName << " = pfm_ary[pfm_ary_idx++];\n";
   if (!m_pList->ToJavaScript(js, type))
     return false;
-  *js << L"}\n";  // while
+  *js << "}\n";  // while
 
-  *js << L"}\n";  // block
+  *js << "}\n";  // block
   return !CXFA_IsTooBig(js);
 }
diff --git a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp
index 63d3d6a..6e1b9b1 100644
--- a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp
@@ -85,7 +85,7 @@
   if (CXFA_IsTooBig(js) || !depthManager.IsWithinMaxDepth())
     return false;
 
-  *js << L"null";
+  *js << "null";
   return !CXFA_IsTooBig(js);
 }
 
@@ -121,25 +121,25 @@
     return !CXFA_IsTooBig(js);
   }
 
-  *js << L"\"";
+  *js << "\"";
   for (size_t i = 1; i < tempStr.GetLength() - 1; i++) {
     wchar_t oneChar = tempStr[i];
     switch (oneChar) {
       case L'\"':
         ++i;
-        *js << L"\\\"";
+        *js << "\\\"";
         break;
       case 0x0d:
         break;
       case 0x0a:
-        *js << L"\\n";
+        *js << "\\n";
         break;
       default:
         js->AppendChar(oneChar);
         break;
     }
   }
-  *js << L"\"";
+  *js << "\"";
   return !CXFA_IsTooBig(js);
 }
 
@@ -156,24 +156,24 @@
     return false;
 
   if (m_wsIdentifier == L"$")
-    *js << L"this";
+    *js << "this";
   else if (m_wsIdentifier == L"!")
-    *js << L"xfa.datasets";
+    *js << "xfa.datasets";
   else if (m_wsIdentifier == L"$data")
-    *js << L"xfa.datasets.data";
+    *js << "xfa.datasets.data";
   else if (m_wsIdentifier == L"$event")
-    *js << L"xfa.event";
+    *js << "xfa.event";
   else if (m_wsIdentifier == L"$form")
-    *js << L"xfa.form";
+    *js << "xfa.form";
   else if (m_wsIdentifier == L"$host")
-    *js << L"xfa.host";
+    *js << "xfa.host";
   else if (m_wsIdentifier == L"$layout")
-    *js << L"xfa.layout";
+    *js << "xfa.layout";
   else if (m_wsIdentifier == L"$template")
-    *js << L"xfa.template";
+    *js << "xfa.template";
   else if (m_wsIdentifier[0] == L'!')
-    *js << L"pfm__excl__" +
-               m_wsIdentifier.Right(m_wsIdentifier.GetLength() - 1);
+    *js << "pfm__excl__"
+        << m_wsIdentifier.Right(m_wsIdentifier.GetLength() - 1);
   else
     *js << m_wsIdentifier;
 
@@ -200,25 +200,25 @@
   if (!m_pExp1->ToJavaScript(&tempExp1, ReturnType::kInfered))
     return false;
 
-  *js << L"if (pfm_rt.is_obj(" << tempExp1 << L"))\n{\n";
+  *js << "if (pfm_rt.is_obj(" << tempExp1 << "))\n{\n";
   if (type == ReturnType::kImplied)
-    *js << L"pfm_ret = ";
+    *js << "pfm_ret = ";
 
   CFX_WideTextBuf tempExp2;
   if (!m_pExp2->ToJavaScript(&tempExp2, ReturnType::kInfered))
     return false;
 
-  *js << L"pfm_rt.asgn_val_op(" << tempExp1 << L", " << tempExp2 << L");\n}\n";
+  *js << "pfm_rt.asgn_val_op(" << tempExp1 << ", " << tempExp2 << ");\n}\n";
 
   if (m_pExp1->GetOperatorToken() == TOKidentifier &&
       tempExp1.AsStringView() != L"this") {
-    *js << L"else\n{\n";
+    *js << "else\n{\n";
     if (type == ReturnType::kImplied)
-      *js << L"pfm_ret = ";
+      *js << "pfm_ret = ";
 
-    *js << tempExp1 << L" = pfm_rt.asgn_val_op";
-    *js << L"(" << tempExp1 << L", " << tempExp2 << L");\n";
-    *js << L"}\n";
+    *js << tempExp1 << " = pfm_rt.asgn_val_op";
+    *js << "(" << tempExp1 << ", " << tempExp2 << ");\n";
+    *js << "}\n";
   }
   return !CXFA_IsTooBig(js);
 }
@@ -240,13 +240,13 @@
   if (CXFA_IsTooBig(js) || !depthManager.IsWithinMaxDepth())
     return false;
 
-  *js << L"pfm_rt." << m_OpName << L"(";
+  *js << "pfm_rt." << m_OpName << "(";
   if (!m_pExp1->ToJavaScript(js, ReturnType::kInfered))
     return false;
-  *js << L", ";
+  *js << ", ";
   if (!m_pExp2->ToJavaScript(js, ReturnType::kInfered))
     return false;
-  *js << L")";
+  *js << ")";
   return !CXFA_IsTooBig(js);
 }
 
@@ -372,10 +372,10 @@
   if (CXFA_IsTooBig(js) || !depthManager.IsWithinMaxDepth())
     return false;
 
-  *js << L"pfm_rt." << m_OpName.c_str() << L"(";
+  *js << "pfm_rt." << m_OpName.c_str() << "(";
   if (!m_pExp->ToJavaScript(js, ReturnType::kInfered))
     return false;
-  *js << L")";
+  *js << ")";
   return !CXFA_IsTooBig(js);
 }
 
@@ -445,37 +445,37 @@
     return false;
 
   if (m_bIsSomMethod) {
-    *js << funcName << L"(";
+    *js << funcName << "(";
     uint32_t methodPara = IsMethodWithObjParam(funcName.MakeString());
     if (methodPara > 0) {
       for (size_t i = 0; i < m_Arguments.size(); ++i) {
         // Currently none of our expressions use objects for a parameter over
         // the 6th. Make sure we don't overflow the shift when doing this
         // check. If we ever need more the 32 object params we can revisit.
-        *js << L"pfm_rt.get_";
+        *js << "pfm_rt.get_";
         if (i < 32 && (methodPara & (0x01 << i)) > 0)
-          *js << L"jsobj";
+          *js << "jsobj";
         else
-          *js << L"val";
+          *js << "val";
 
-        *js << L"(";
+        *js << "(";
         if (!m_Arguments[i]->ToJavaScript(js, ReturnType::kInfered))
           return false;
-        *js << L")";
+        *js << ")";
         if (i + 1 < m_Arguments.size())
-          *js << L", ";
+          *js << ", ";
       }
     } else {
       for (const auto& expr : m_Arguments) {
-        *js << L"pfm_rt.get_val(";
+        *js << "pfm_rt.get_val(";
         if (!expr->ToJavaScript(js, ReturnType::kInfered))
           return false;
-        *js << L")";
+        *js << ")";
         if (expr != m_Arguments.back())
-          *js << L", ";
+          *js << ", ";
       }
     }
-    *js << L")";
+    *js << ")";
     return !CXFA_IsTooBig(js);
   }
 
@@ -491,38 +491,38 @@
 
   if (funcName.AsStringView() == L"Eval") {
     isEvalFunc = true;
-    *js << L"eval.call(this, pfm_rt.Translate";
+    *js << "eval.call(this, pfm_rt.Translate";
   } else {
     if (funcName.AsStringView() == L"Exists")
       isExistsFunc = true;
 
-    *js << L"pfm_rt." << funcName;
+    *js << "pfm_rt." << funcName;
   }
 
-  *js << L"(";
+  *js << "(";
   if (isExistsFunc) {
-    *js << L"\n(\nfunction ()\n{\ntry\n{\n";
+    *js << "\n(\nfunction ()\n{\ntry\n{\n";
     if (!m_Arguments.empty()) {
-      *js << L"return ";
+      *js << "return ";
       if (!m_Arguments[0]->ToJavaScript(js, ReturnType::kInfered))
         return false;
-      *js << L";\n}\n";
+      *js << ";\n}\n";
     } else {
-      *js << L"return 0;\n}\n";
+      *js << "return 0;\n}\n";
     }
-    *js << L"catch(accessExceptions)\n";
-    *js << L"{\nreturn 0;\n}\n}\n).call(this)\n";
+    *js << "catch(accessExceptions)\n";
+    *js << "{\nreturn 0;\n}\n}\n).call(this)\n";
   } else {
     for (const auto& expr : m_Arguments) {
       if (!expr->ToJavaScript(js, ReturnType::kInfered))
         return false;
       if (expr != m_Arguments.back())
-        *js << L", ";
+        *js << ", ";
     }
   }
-  *js << L")";
+  *js << ")";
   if (isEvalFunc)
-    *js << L")";
+    *js << ")";
 
   return !CXFA_IsTooBig(js);
 }
@@ -545,7 +545,7 @@
   if (CXFA_IsTooBig(js) || !depthManager.IsWithinMaxDepth())
     return false;
 
-  *js << L"pfm_rt.dot_acc(";
+  *js << "pfm_rt.dot_acc(";
 
   CFX_WideTextBuf tempExp1;
   if (m_pExp1) {
@@ -554,27 +554,27 @@
 
     *js << tempExp1;
   } else {
-    *js << L"null";
+    *js << "null";
   }
-  *js << L", \"";
+  *js << ", \"";
 
   if (m_pExp1 && m_pExp1->GetOperatorToken() == TOKidentifier)
     *js << tempExp1;
 
-  *js << L"\", ";
+  *js << "\", ";
   if (m_op == TOKdotscream)
-    *js << L"\"#" << m_wsIdentifier << L"\", ";
+    *js << "\"#" << m_wsIdentifier << "\", ";
   else if (m_op == TOKdotstar)
-    *js << L"\"*\", ";
+    *js << "\"*\", ";
   else if (m_op == TOKcall)
-    *js << L"\"\", ";
+    *js << "\"\", ";
   else
-    *js << L"\"" << m_wsIdentifier << L"\", ";
+    *js << "\"" << m_wsIdentifier << "\", ";
 
   if (!m_pExp2->ToJavaScript(js, ReturnType::kInfered))
     return false;
 
-  *js << L")";
+  *js << ")";
   return !CXFA_IsTooBig(js);
 }
 
@@ -597,29 +597,29 @@
 
   switch (m_accessorIndex) {
     case ACCESSOR_NO_INDEX:
-      *js << L"0";
+      *js << "0";
       break;
     case ACCESSOR_NO_RELATIVEINDEX:
-      *js << L"1";
+      *js << "1";
       break;
     case ACCESSOR_POSITIVE_INDEX:
-      *js << L"2";
+      *js << "2";
       break;
     case ACCESSOR_NEGATIVE_INDEX:
-      *js << L"3";
+      *js << "3";
       break;
     default:
-      *js << L"0";
+      *js << "0";
   }
   if (m_bIsStarIndex)
     return !CXFA_IsTooBig(js);
 
-  *js << L", ";
+  *js << ", ";
   if (m_pExp) {
     if (!m_pExp->ToJavaScript(js, ReturnType::kInfered))
       return false;
   } else {
-    *js << L"0";
+    *js << "0";
   }
   return !CXFA_IsTooBig(js);
 }
@@ -642,19 +642,20 @@
   if (CXFA_IsTooBig(js) || !depthManager.IsWithinMaxDepth())
     return false;
 
-  *js << L"pfm_rt.dotdot_acc(";
+  *js << "pfm_rt.dotdot_acc(";
   if (!m_pExp1->ToJavaScript(js, ReturnType::kInfered))
     return false;
-  *js << L", " << L"\"";
+  *js << ", "
+      << "\"";
   if (m_pExp1->GetOperatorToken() == TOKidentifier) {
     if (!m_pExp1->ToJavaScript(js, ReturnType::kInfered))
       return false;
   }
 
-  *js << L"\", \"" << m_wsIdentifier << L"\", ";
+  *js << "\", \"" << m_wsIdentifier << "\", ";
   if (!m_pExp2->ToJavaScript(js, ReturnType::kInfered))
     return false;
-  *js << L")";
+  *js << ")";
   return !CXFA_IsTooBig(js);
 }
 
@@ -677,14 +678,14 @@
   if (!m_pExp1->ToJavaScript(&buf, ReturnType::kInfered))
     return false;
 
-  *js << L"(function() {\n";
-  *js << L"  return pfm_method_runner(" << buf << L", function(obj) {\n";
-  *js << L"    return obj.";
+  *js << "(function() {\n";
+  *js << "  return pfm_method_runner(" << buf << ", function(obj) {\n";
+  *js << "    return obj.";
   if (!m_pExp2->ToJavaScript(js, ReturnType::kInfered))
     return false;
-  *js << L";\n";
-  *js << L"  });\n";
-  *js << L"}).call(this)";
+  *js << ";\n";
+  *js << "  });\n";
+  *js << "}).call(this)";
   return !CXFA_IsTooBig(js);
 }
 
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp
index a59d1c2..69a7fef 100644
--- a/xfa/fxfa/parser/xfa_utils.cpp
+++ b/xfa/fxfa/parser/xfa_utils.cpp
@@ -55,19 +55,19 @@
   for (int32_t i = 0; i < iLen; i++) {
     switch (str[i]) {
       case '&':
-        textBuf << L"&amp;";
+        textBuf << "&amp;";
         break;
       case '<':
-        textBuf << L"&lt;";
+        textBuf << "&lt;";
         break;
       case '>':
-        textBuf << L"&gt;";
+        textBuf << "&gt;";
         break;
       case '\'':
-        textBuf << L"&apos;";
+        textBuf << "&apos;";
         break;
       case '\"':
-        textBuf << L"&quot;";
+        textBuf << "&quot;";
         break;
       default:
         textBuf.AppendChar(str[i]);
@@ -90,20 +90,20 @@
       continue;
 
     if (ch == '&') {
-      textBuf << L"&amp;";
+      textBuf << "&amp;";
     } else if (ch == '<') {
-      textBuf << L"&lt;";
+      textBuf << "&lt;";
     } else if (ch == '>') {
-      textBuf << L"&gt;";
+      textBuf << "&gt;";
     } else if (ch == '\'') {
-      textBuf << L"&apos;";
+      textBuf << "&apos;";
     } else if (ch == '\"') {
-      textBuf << L"&quot;";
+      textBuf << "&quot;";
     } else if (ch == ' ') {
       if (i && str[i - 1] != ' ') {
         textBuf.AppendChar(' ');
       } else {
-        textBuf << L"&#x20;";
+        textBuf << "&#x20;";
       }
     } else {
       textBuf.AppendChar(str[i]);
@@ -252,18 +252,18 @@
         if (bodyTagName.IsEmpty())
           bodyTagName = L"ListBox1";
 
-        buf << L"<";
+        buf << "<";
         buf << bodyTagName;
-        buf << L" xmlns=\"\"\n>";
+        buf << " xmlns=\"\"\n>";
         for (int32_t i = 0; i < pdfium::CollectionSize<int32_t>(wsSelTextArray);
              i++) {
-          buf << L"<value\n>";
+          buf << "<value\n>";
           buf << ExportEncodeContent(wsSelTextArray[i]);
-          buf << L"</value\n>";
+          buf << "</value\n>";
         }
-        buf << L"</";
+        buf << "</";
         buf << bodyTagName;
-        buf << L"\n>";
+        buf << "\n>";
         wsChildren += buf.AsStringView();
         buf.Clear();
       } else {
@@ -317,18 +317,18 @@
     WideStringView wsElement = pNode->GetClassName();
     WideString wsName;
     SaveAttribute(pNode, XFA_Attribute::Name, L"name", true, wsName);
-    buf << L"<";
+    buf << "<";
     buf << wsElement;
     buf << wsName;
     buf << wsAttrs;
     if (wsChildren.IsEmpty()) {
-      buf << L"\n/>";
+      buf << "\n/>";
     } else {
-      buf << L"\n>";
+      buf << "\n>";
       buf << wsChildren;
-      buf << L"</";
+      buf << "</";
       buf << wsElement;
-      buf << L"\n>";
+      buf << "\n>";
     }
   }
 }