summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_formfill.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-11 16:56:00 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-11 16:56:00 +0000
commit073ecf4192469ee4485c826dcee0cb8ece1b94a2 (patch)
treeaa6687acc434a24977b547144aa896168eaccc7b /fpdfsdk/fpdf_formfill.cpp
parentc345065e7aff3368198624f303e711a244e2f7ec (diff)
downloadpdfium-073ecf4192469ee4485c826dcee0cb8ece1b94a2.tar.xz
Rename InterForm classes to InteractiveForm.
Shorten some names to try to avoid CPDF_InteractiveForm* pInteractiveForm = GetInteractiveForm(); Change-Id: I77fafd6c4cce20aa46908830afde12f87784680e Reviewed-on: https://pdfium-review.googlesource.com/c/43815 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_formfill.cpp')
-rw-r--r--fpdfsdk/fpdf_formfill.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/fpdfsdk/fpdf_formfill.cpp b/fpdfsdk/fpdf_formfill.cpp
index 203017798b..5cecb6feef 100644
--- a/fpdfsdk/fpdf_formfill.cpp
+++ b/fpdfsdk/fpdf_formfill.cpp
@@ -144,10 +144,10 @@ static_assert(kFormFieldTypeCount == FPDF_FORMFIELD_COUNT,
namespace {
-CPDFSDK_InterForm* FormHandleToInterForm(FPDF_FORMHANDLE hHandle) {
+CPDFSDK_InteractiveForm* FormHandleToInteractiveForm(FPDF_FORMHANDLE hHandle) {
CPDFSDK_FormFillEnvironment* pFormFillEnv =
CPDFSDKFormFillEnvironmentFromFPDFFormHandle(hHandle);
- return pFormFillEnv ? pFormFillEnv->GetInterForm() : nullptr;
+ return pFormFillEnv ? pFormFillEnv->GetInteractiveForm() : nullptr;
}
CPDFSDK_PageView* FormHandleToPageView(FPDF_FORMHANDLE hHandle,
@@ -232,8 +232,8 @@ FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,
return -1;
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (pPage) {
- CPDF_InterForm interform(pPage->GetDocument());
- CPDF_FormControl* pFormCtrl = interform.GetControlAtPoint(
+ CPDF_InteractiveForm interactive_form(pPage->GetDocument());
+ CPDF_FormControl* pFormCtrl = interactive_form.GetControlAtPoint(
pPage,
CFX_PointF(static_cast<float>(page_x), static_cast<float>(page_y)),
nullptr);
@@ -294,9 +294,9 @@ FPDFPage_FormFieldZOrderAtPoint(FPDF_FORMHANDLE hHandle,
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return -1;
- CPDF_InterForm interform(pPage->GetDocument());
+ CPDF_InteractiveForm interactive_form(pPage->GetDocument());
int z_order = -1;
- (void)interform.GetControlAtPoint(
+ (void)interactive_form.GetControlAtPoint(
pPage, CFX_PointF(static_cast<float>(page_x), static_cast<float>(page_y)),
&z_order);
return z_order;
@@ -585,31 +585,30 @@ FPDF_EXPORT void FPDF_CALLCONV
FPDF_SetFormFieldHighlightColor(FPDF_FORMHANDLE hHandle,
int fieldType,
unsigned long color) {
- CPDFSDK_InterForm* interForm = FormHandleToInterForm(hHandle);
- if (!interForm)
+ CPDFSDK_InteractiveForm* pForm = FormHandleToInteractiveForm(hHandle);
+ if (!pForm)
return;
Optional<FormFieldType> cast_input = IntToFormFieldType(fieldType);
if (!cast_input)
return;
- if (cast_input.value() == FormFieldType::kUnknown) {
- interForm->SetAllHighlightColors(color);
- } else {
- interForm->SetHighlightColor(color, cast_input.value());
- }
+ if (cast_input.value() == FormFieldType::kUnknown)
+ pForm->SetAllHighlightColors(color);
+ else
+ pForm->SetHighlightColor(color, cast_input.value());
}
FPDF_EXPORT void FPDF_CALLCONV
FPDF_SetFormFieldHighlightAlpha(FPDF_FORMHANDLE hHandle, unsigned char alpha) {
- if (CPDFSDK_InterForm* pInterForm = FormHandleToInterForm(hHandle))
- pInterForm->SetHighlightAlpha(alpha);
+ if (CPDFSDK_InteractiveForm* pForm = FormHandleToInteractiveForm(hHandle))
+ pForm->SetHighlightAlpha(alpha);
}
FPDF_EXPORT void FPDF_CALLCONV
FPDF_RemoveFormFieldHighlight(FPDF_FORMHANDLE hHandle) {
- if (CPDFSDK_InterForm* pInterForm = FormHandleToInterForm(hHandle))
- pInterForm->RemoveAllHighLights();
+ if (CPDFSDK_InteractiveForm* pForm = FormHandleToInteractiveForm(hHandle))
+ pForm->RemoveAllHighLights();
}
FPDF_EXPORT void FPDF_CALLCONV FORM_OnAfterLoadPage(FPDF_PAGE page,