summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_formfillenvironment.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-04-11 21:11:28 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-11 21:11:28 +0000
commit1e934f6868465bca960f9f13489489ba1d649581 (patch)
tree36df9044ccd3327d3d60fb43ac523e2bc260cca6 /fpdfsdk/cpdfsdk_formfillenvironment.h
parent4796acb896dabefe6d9a2dbe6d8a61ff7e086dfd (diff)
downloadpdfium-1e934f6868465bca960f9f13489489ba1d649581.tar.xz
Remove use of GetBuffer()/ReleaseBuffer() when c_str() is sufficient.
Greatly simplify the code which was neither changing allocations nor doing any actual work. Eventually GetBuffer() will return a span, and this makes fewer places to change. Comment AsFPDFWideString() as a place where we may want a redundant copy, and make available outside the .cpp file. Fix one "const" along the way. Change-Id: I187758b69a0ba3501b3622f6c06280793cd5d464 Reviewed-on: https://pdfium-review.googlesource.com/30011 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_formfillenvironment.h')
-rw-r--r--fpdfsdk/cpdfsdk_formfillenvironment.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h
index 3c14ac06ac..18626cfde3 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.h
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.h
@@ -29,6 +29,10 @@ class CPDFSDK_InterForm;
class CPDFSDK_PageView;
class IJS_Runtime;
+// NOTE: |bsUTF16LE| must outlive the use of the result. Care must be taken
+// since modifying the result would impact |bsUTF16LE|.
+FPDF_WIDESTRING AsFPDFWideString(ByteString* bsUTF16LE);
+
// The CPDFSDK_FormFillEnvironment is "owned" by the embedder across the
// C API as a FPDF_FormHandle, and may pop out of existence at any time,
// so long as the associated embedder-owned FPDF_Document outlives it.