Avoid a copy in CPDFSDK_InteractiveForm::SubmitForm().

Since CPDFSDK_FormFillEnvironment::SubmitForm() now takes a const span,
CPDFSDK_InteractiveForm can just create one out of the ByteString it
already has, rather than copying the ByteString data into a vector.

Change-Id: I65411bdd71289235aea3a98815881e5d21eaf401
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/96431
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_interactiveform.cpp b/fpdfsdk/cpdfsdk_interactiveform.cpp
index 6e4aa60..489dabe 100644
--- a/fpdfsdk/cpdfsdk_interactiveform.cpp
+++ b/fpdfsdk/cpdfsdk_interactiveform.cpp
@@ -25,7 +25,6 @@
 #include "core/fpdfdoc/cpdf_formcontrol.h"
 #include "core/fpdfdoc/cpdf_interactiveform.h"
 #include "core/fxcrt/autorestorer.h"
-#include "core/fxcrt/data_vector.h"
 #include "core/fxcrt/fx_string_wrappers.h"
 #include "core/fxcrt/stl_util.h"
 #include "core/fxge/cfx_graphstatedata.h"
@@ -472,12 +471,11 @@
   if (!pFDFDoc)
     return false;
 
-  ByteString fdfBuffer = pFDFDoc->WriteToString();
-  if (fdfBuffer.IsEmpty())
+  ByteString fdf_buffer = pFDFDoc->WriteToString();
+  if (fdf_buffer.IsEmpty())
     return false;
 
-  DataVector<uint8_t> buffer(fdfBuffer.begin(), fdfBuffer.end());
-  m_pFormFillEnv->SubmitForm(buffer, sDestination);
+  m_pFormFillEnv->SubmitForm(fdf_buffer.raw_span(), sDestination);
   return true;
 }