From 2563fc3895f2a6a1faf74b46387b99c61be7370a Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 1 Aug 2018 19:13:06 +0000 Subject: Make FPDF_FormHandle be represented as an incomplete type. 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 Commit-Queue: Tom Sepez --- fxjs/cjs_publicmethods_embeddertest.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'fxjs/cjs_publicmethods_embeddertest.cpp') diff --git a/fxjs/cjs_publicmethods_embeddertest.cpp b/fxjs/cjs_publicmethods_embeddertest.cpp index 38604555ae..623ce6801e 100644 --- a/fxjs/cjs_publicmethods_embeddertest.cpp +++ b/fxjs/cjs_publicmethods_embeddertest.cpp @@ -180,7 +180,8 @@ TEST_F(CJS_PublicMethodsEmbedderTest, AFSimple_CalculateSum) { auto* page = LoadPage(0); ASSERT_TRUE(page); - CJS_Runtime runtime(static_cast(form_handle())); + CJS_Runtime runtime( + CPDFSDKFormFillEnvironmentFromFPDFFormHandle(form_handle())); runtime.NewEventContext(); WideString result; @@ -214,7 +215,8 @@ TEST_F(CJS_PublicMethodsEmbedderTest, AFNumber_Keystroke) { auto* page = LoadPage(0); ASSERT_TRUE(page); - CJS_Runtime runtime(static_cast(form_handle())); + CJS_Runtime runtime( + CPDFSDKFormFillEnvironmentFromFPDFFormHandle(form_handle())); runtime.NewEventContext(); auto* handler = runtime.GetCurrentEventContext()->GetEventHandler(); -- cgit v1.2.3