Cleanup XFA default value code

This CL adds helper methods to CXFA_Node to retrieve the default values
for attributes with the correct data types.

Change-Id: I644435b4b430819f1060a95fa4fffe4ba2826cfe
Reviewed-on: https://pdfium-review.googlesource.com/18450
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 72b8970..374fe56 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -904,16 +904,15 @@
   if (!pFormFillEnv)
     return false;
 
-  WideStringView csURLC;
-  submitData.GetSubmitTarget(csURLC);
-  WideString csURL(csURLC);
+  WideString csURL;
+  submitData.GetSubmitTarget(csURL);
   if (csURL.IsEmpty()) {
     WideString ws;
     ws.FromLocal("Submit cancelled.");
     ByteString bs = ws.UTF16LE_Encode();
     int len = bs.GetLength();
-    pFormFillEnv->Alert((FPDF_WIDESTRING)bs.GetBuffer(len),
-                        (FPDF_WIDESTRING)L"", 0, 4);
+    pFormFillEnv->Alert(reinterpret_cast<FPDF_WIDESTRING>(bs.GetBuffer(len)),
+                        reinterpret_cast<FPDF_WIDESTRING>(L""), 0, 4);
     bs.ReleaseBuffer(len);
     return false;
   }
@@ -922,10 +921,8 @@
   int fileFlag = -1;
   switch (submitData.GetSubmitFormat()) {
     case XFA_ATTRIBUTEENUM_Xdp: {
-      WideStringView csContentC;
-      submitData.GetSubmitXDPContent(csContentC);
       WideString csContent;
-      csContent = csContentC;
+      submitData.GetSubmitXDPContent(csContent);
       csContent.TrimLeft();
       csContent.TrimRight();
       WideString space;