summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_helpers.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-01 19:13:06 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-01 19:13:06 +0000
commit2563fc3895f2a6a1faf74b46387b99c61be7370a (patch)
treebc809136c0daa416387c9a2044474969171796ca /fpdfsdk/cpdfsdk_helpers.h
parent6214ce98801c1f7a226781701ed290079b2a4031 (diff)
downloadpdfium-2563fc3895f2a6a1faf74b46387b99c61be7370a.tar.xz
Make FPDF_FormHandle be represented as an incomplete type.chromium/3510
Make consistent with other public API types. Introduce CPDFSDKFormFillEnvironmentFromFPDFFormHandle() and FPDFFormHandleFromCPDFSDKFormFillEnvironment() helper functions. Use these to kill off some casts in the process. Change-Id: I6230ecdb4cecd03076f5e24c8cc49c45ad694da7 Reviewed-on: https://pdfium-review.googlesource.com/39250 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_helpers.h')
-rw-r--r--fpdfsdk/cpdfsdk_helpers.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/fpdfsdk/cpdfsdk_helpers.h b/fpdfsdk/cpdfsdk_helpers.h
index 4fd85cfc72..5de947afdf 100644
--- a/fpdfsdk/cpdfsdk_helpers.h
+++ b/fpdfsdk/cpdfsdk_helpers.h
@@ -38,6 +38,7 @@ class CPDF_StructElement;
class CPDF_StructTree;
class CPDF_TextPage;
class CPDF_TextPageFind;
+class CPDFSDK_FormFillEnvironment;
class IPDFSDK_PauseAdapter;
class FX_PATHPOINT;
@@ -197,6 +198,15 @@ inline CPDF_TextPageFind* CPDFTextPageFindFromFPDFSchHandle(
return reinterpret_cast<CPDF_TextPageFind*>(handle);
}
+inline FPDF_FORMHANDLE FPDFFormHandleFromCPDFSDKFormFillEnvironment(
+ CPDFSDK_FormFillEnvironment* handle) {
+ return reinterpret_cast<FPDF_FORMHANDLE>(handle);
+}
+inline CPDFSDK_FormFillEnvironment*
+CPDFSDKFormFillEnvironmentFromFPDFFormHandle(FPDF_FORMHANDLE handle) {
+ return reinterpret_cast<CPDFSDK_FormFillEnvironment*>(handle);
+}
+
ByteString CFXByteStringFromFPDFWideString(FPDF_WIDESTRING wide_string);
#ifdef PDF_ENABLE_XFA