Index: fpdfsdk/formfiller/cffl_interactiveformfiller.cpp |
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp |
index 3c921b20da9ea0c3b6de577a3d906bca35377f92..6d1f9ae536535836ac4a9007bf95bc42d7068421 100644 |
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp |
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp |
@@ -27,8 +27,8 @@ |
#define FFL_MAXLISTBOXHEIGHT 140.0f |
CFFL_InteractiveFormFiller::CFFL_InteractiveFormFiller( |
- CPDFSDK_FormFillEnvironment* pEnv) |
- : m_pEnv(pEnv), m_bNotifying(FALSE) {} |
+ CPDFSDK_FormFillEnvironment* pFormFillEnv) |
+ : m_pFormFillEnv(pFormFillEnv), m_bNotifying(FALSE) {} |
CFFL_InteractiveFormFiller::~CFFL_InteractiveFormFiller() {} |
@@ -66,7 +66,7 @@ void CFFL_InteractiveFormFiller::OnDraw(CPDFSDK_PageView* pPageView, |
pFormFiller->OnDraw(pPageView, pAnnot, pDevice, pUser2Device); |
pAnnot->GetPDFPage(); |
- if (m_pEnv->GetFocusAnnot() == pAnnot) { |
+ if (m_pFormFillEnv->GetFocusAnnot() == pAnnot) { |
CFX_FloatRect rcFocus = pFormFiller->GetFocusBox(pPageView); |
if (!rcFocus.IsEmpty()) { |
CFX_PathData path; |
@@ -135,8 +135,8 @@ void CFFL_InteractiveFormFiller::OnMouseEnter( |
ASSERT(pPageView); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag); |
pWidget->OnAAction(CPDF_AAction::CursorEnter, fa, pPageView); |
m_bNotifying = FALSE; |
if (!(*pAnnot)) |
@@ -169,8 +169,8 @@ void CFFL_InteractiveFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView, |
ASSERT(pPageView); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag); |
pWidget->OnAAction(CPDF_AAction::CursorExit, fa, pPageView); |
m_bNotifying = FALSE; |
if (!(*pAnnot)) |
@@ -206,8 +206,8 @@ FX_BOOL CFFL_InteractiveFormFiller::OnLButtonDown( |
ASSERT(pPageView); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlags); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlags); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlags); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlags); |
pWidget->OnAAction(CPDF_AAction::ButtonDown, fa, pPageView); |
m_bNotifying = FALSE; |
if (!(*pAnnot)) |
@@ -244,10 +244,10 @@ FX_BOOL CFFL_InteractiveFormFiller::OnLButtonUp( |
case FIELDTYPE_RADIOBUTTON: |
if (GetViewBBox(pPageView, pAnnot->Get()) |
.Contains((int)point.x, (int)point.y)) |
- m_pEnv->SetFocusAnnot(pAnnot); |
+ m_pFormFillEnv->SetFocusAnnot(pAnnot); |
break; |
default: |
- m_pEnv->SetFocusAnnot(pAnnot); |
+ m_pFormFillEnv->SetFocusAnnot(pAnnot); |
break; |
} |
@@ -255,7 +255,7 @@ FX_BOOL CFFL_InteractiveFormFiller::OnLButtonUp( |
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get(), FALSE)) |
bRet = pFormFiller->OnLButtonUp(pPageView, pAnnot->Get(), nFlags, point); |
- if (m_pEnv->GetFocusAnnot() == pAnnot->Get()) { |
+ if (m_pFormFillEnv->GetFocusAnnot() == pAnnot->Get()) { |
FX_BOOL bExit = FALSE; |
FX_BOOL bReset = FALSE; |
OnButtonUp(pAnnot, pPageView, bReset, bExit, nFlags); |
@@ -285,8 +285,8 @@ void CFFL_InteractiveFormFiller::OnButtonUp(CPDFSDK_Annot::ObservedPtr* pAnnot, |
ASSERT(pPageView); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag); |
pWidget->OnAAction(CPDF_AAction::ButtonUp, fa, pPageView); |
m_bNotifying = FALSE; |
if (!(*pAnnot) || !IsValidAnnot(pPageView, pWidget)) { |
@@ -410,8 +410,8 @@ FX_BOOL CFFL_InteractiveFormFiller::OnSetFocus( |
ASSERT(pPageView); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag); |
pFormFiller->GetActionData(pPageView, CPDF_AAction::GetFocus, fa); |
pWidget->OnAAction(CPDF_AAction::GetFocus, fa, pPageView); |
m_bNotifying = FALSE; |
@@ -452,8 +452,8 @@ FX_BOOL CFFL_InteractiveFormFiller::OnKillFocus( |
ASSERT(pPageView); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag); |
pFormFiller->GetActionData(pPageView, CPDF_AAction::LoseFocus, fa); |
pWidget->OnAAction(CPDF_AAction::LoseFocus, fa, pPageView); |
m_bNotifying = FALSE; |
@@ -501,22 +501,22 @@ CFFL_FormFiller* CFFL_InteractiveFormFiller::GetFormFiller( |
CFFL_FormFiller* pFormFiller; |
switch (nFieldType) { |
case FIELDTYPE_PUSHBUTTON: |
- pFormFiller = new CFFL_PushButton(m_pEnv, pWidget); |
+ pFormFiller = new CFFL_PushButton(m_pFormFillEnv, pWidget); |
break; |
case FIELDTYPE_CHECKBOX: |
- pFormFiller = new CFFL_CheckBox(m_pEnv, pWidget); |
+ pFormFiller = new CFFL_CheckBox(m_pFormFillEnv, pWidget); |
break; |
case FIELDTYPE_RADIOBUTTON: |
- pFormFiller = new CFFL_RadioButton(m_pEnv, pWidget); |
+ pFormFiller = new CFFL_RadioButton(m_pFormFillEnv, pWidget); |
break; |
case FIELDTYPE_TEXTFIELD: |
- pFormFiller = new CFFL_TextField(m_pEnv, pWidget); |
+ pFormFiller = new CFFL_TextField(m_pFormFillEnv, pWidget); |
break; |
case FIELDTYPE_LISTBOX: |
- pFormFiller = new CFFL_ListBox(m_pEnv, pWidget); |
+ pFormFiller = new CFFL_ListBox(m_pFormFillEnv, pWidget); |
break; |
case FIELDTYPE_COMBOBOX: |
- pFormFiller = new CFFL_ComboBox(m_pEnv, pWidget); |
+ pFormFiller = new CFFL_ComboBox(m_pFormFillEnv, pWidget); |
break; |
case FIELDTYPE_UNKNOWN: |
default: |
@@ -632,8 +632,8 @@ void CFFL_InteractiveFormFiller::OnKeyStrokeCommit( |
pWidget->ClearAppModified(); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag); |
fa.bWillCommit = TRUE; |
fa.bKeyDown = TRUE; |
fa.bRC = TRUE; |
@@ -664,8 +664,8 @@ void CFFL_InteractiveFormFiller::OnValidate(CPDFSDK_Annot::ObservedPtr* pAnnot, |
pWidget->ClearAppModified(); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag); |
fa.bKeyDown = TRUE; |
fa.bRC = TRUE; |
@@ -731,8 +731,8 @@ void CFFL_InteractiveFormFiller::OnClick(CPDFSDK_Widget* pWidget, |
int nValueAge = pWidget->GetValueAge(); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag); |
pWidget->OnXFAAAction(PDFSDK_XFA_Click, fa, pPageView); |
m_bNotifying = FALSE; |
@@ -766,8 +766,8 @@ void CFFL_InteractiveFormFiller::OnFull(CPDFSDK_Widget* pWidget, |
int nValueAge = pWidget->GetValueAge(); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag); |
pWidget->OnXFAAAction(PDFSDK_XFA_Full, fa, pPageView); |
m_bNotifying = FALSE; |
@@ -829,8 +829,8 @@ void CFFL_InteractiveFormFiller::OnPreOpen(CPDFSDK_Widget* pWidget, |
int nValueAge = pWidget->GetValueAge(); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag); |
pWidget->OnXFAAAction(PDFSDK_XFA_PreOpen, fa, pPageView); |
m_bNotifying = FALSE; |
@@ -864,8 +864,8 @@ void CFFL_InteractiveFormFiller::OnPostOpen(CPDFSDK_Widget* pWidget, |
int nValueAge = pWidget->GetValueAge(); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag); |
pWidget->OnXFAAAction(PDFSDK_XFA_PostOpen, fa, pPageView); |
m_bNotifying = FALSE; |
@@ -931,8 +931,8 @@ void CFFL_InteractiveFormFiller::OnBeforeKeyStroke( |
pData->pPageView->GetFormFillEnv(); |
PDFSDK_FieldAction fa; |
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag); |
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag); |
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag); |
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag); |
fa.sChange = strChange; |
fa.sChangeEx = strChangeEx; |
fa.bKeyDown = bKeyDown; |