summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_IFormFiller.cpp')
-rw-r--r--fpdfsdk/src/formfiller/FFL_IFormFiller.cpp248
1 files changed, 124 insertions, 124 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
index 7ce811e85b..922d8c037e 100644
--- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
@@ -22,7 +22,7 @@
CFFL_IFormFiller::CFFL_IFormFiller(CPDFDoc_Environment* pApp) :
m_pApp(pApp),
- m_bNotifying(FALSE)
+ m_bNotifying(false)
{
}
@@ -33,17 +33,17 @@ CFFL_IFormFiller::~CFFL_IFormFiller()
m_Maps.clear();
}
-FX_BOOL CFFL_IFormFiller::Annot_HitTest(CPDFSDK_PageView* pPageView,CPDFSDK_Annot* pAnnot, CPDF_Point point)
+bool CFFL_IFormFiller::Annot_HitTest(CPDFSDK_PageView* pPageView,CPDFSDK_Annot* pAnnot, CPDF_Point point)
{
CPDF_Rect rc = pAnnot->GetRect();
if(rc.Contains(point.x, point.y))
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
FX_RECT CFFL_IFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot)
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
return pFormFiller->GetViewBBox(pPageView, pAnnot);
ASSERT(pPageView != NULL);
@@ -65,7 +65,7 @@ void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView, /*HDC hDC,*/ CPDFSDK_
if (IsVisible(pWidget))
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
if (pFormFiller->IsValid())
{
@@ -98,7 +98,7 @@ void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView, /*HDC hDC,*/ CPDFSDK_
}
}
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
pFormFiller->OnDrawDeactive(pPageView, pAnnot, pDevice, pUser2Device, dwFlags);
else
pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
@@ -110,7 +110,7 @@ void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView, /*HDC hDC,*/ CPDFSDK_
void CFFL_IFormFiller::OnCreate(CPDFSDK_Annot* pAnnot)
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
pFormFiller->OnCreate(pAnnot);
}
@@ -118,7 +118,7 @@ void CFFL_IFormFiller::OnCreate(CPDFSDK_Annot* pAnnot)
void CFFL_IFormFiller::OnLoad(CPDFSDK_Annot* pAnnot)
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
pFormFiller->OnLoad(pAnnot);
}
@@ -126,7 +126,7 @@ void CFFL_IFormFiller::OnLoad(CPDFSDK_Annot* pAnnot)
void CFFL_IFormFiller::OnDelete(CPDFSDK_Annot* pAnnot)
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
pFormFiller->OnDelete(pAnnot);
}
@@ -144,7 +144,7 @@ void CFFL_IFormFiller::OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot*
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (pWidget->GetAAction(CPDF_AAction::CursorEnter))
{
- m_bNotifying = TRUE;
+ m_bNotifying = true;
int nValueAge = pWidget->GetValueAge();
@@ -158,13 +158,13 @@ void CFFL_IFormFiller::OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot*
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::CursorEnter, fa, pPageView );
- m_bNotifying = FALSE;
+ m_bNotifying = false;
//if ( !IsValidAnnot(pPageView, pAnnot) ) return;
if (pWidget->IsAppModified())
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false))
{
pFormFiller->ResetPDFWindow(pPageView, pWidget->GetValueAge() == nValueAge);
}
@@ -172,7 +172,7 @@ void CFFL_IFormFiller::OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot*
}
}
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, true))
{
pFormFiller->OnMouseEnter(pPageView, pAnnot);
}
@@ -188,7 +188,7 @@ void CFFL_IFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* p
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (pWidget->GetAAction(CPDF_AAction::CursorExit))
{
- m_bNotifying = TRUE;
+ m_bNotifying = true;
pWidget->GetAppearanceAge();
int nValueAge = pWidget->GetValueAge();
pWidget->ClearAppModified();
@@ -202,13 +202,13 @@ void CFFL_IFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* p
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::CursorExit, fa, pPageView);
- m_bNotifying = FALSE;
+ m_bNotifying = false;
//if (!IsValidAnnot(pPageView, pAnnot)) return;
if (pWidget->IsAppModified())
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false))
{
pFormFiller->ResetPDFWindow(pPageView, nValueAge == pWidget->GetValueAge());
}
@@ -216,13 +216,13 @@ void CFFL_IFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* p
}
}
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
pFormFiller->OnMouseExit(pPageView, pAnnot);
}
}
-FX_BOOL CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
@@ -232,7 +232,7 @@ FX_BOOL CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Ann
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (Annot_HitTest(pPageView, pAnnot, point) && pWidget->GetAAction(CPDF_AAction::ButtonDown))
{
- m_bNotifying = TRUE;
+ m_bNotifying = true;
pWidget->GetAppearanceAge();
int nValueAge = pWidget->GetValueAge();
pWidget->ClearAppModified();
@@ -245,13 +245,13 @@ FX_BOOL CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Ann
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlags);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlags);
pWidget->OnAAction(CPDF_AAction::ButtonDown, fa, pPageView);
- m_bNotifying = FALSE;
+ m_bNotifying = false;
- if (!IsValidAnnot(pPageView, pAnnot)) return TRUE;
+ if (!IsValidAnnot(pPageView, pAnnot)) return true;
if (pWidget->IsAppModified())
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false))
{
pFormFiller->ResetPDFWindow(pPageView, nValueAge == pWidget->GetValueAge());
}
@@ -259,15 +259,15 @@ FX_BOOL CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Ann
}
}
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
return pFormFiller->OnLButtonDown(pPageView, pAnnot, nFlags, point);
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_IFormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_IFormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
@@ -286,24 +286,24 @@ FX_BOOL CFFL_IFormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot
break;
}
- FX_BOOL bRet = FALSE;
+ bool bRet = false;
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
bRet = pFormFiller->OnLButtonUp(pPageView, pAnnot, nFlags, point);
}
if (pDocument->GetFocusAnnot() == pAnnot)
{
- FX_BOOL bExit = FALSE;
- FX_BOOL bReset = FALSE;
+ bool bExit = false;
+ bool bReset = false;
OnButtonUp(pWidget, pPageView, bReset, bExit,nFlags);
- if (bExit) return TRUE;
+ if (bExit) return true;
}
return bRet;
}
-void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bReset, FX_BOOL& bExit,FX_UINT nFlag)
+void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bReset, bool& bExit,FX_UINT nFlag)
{
ASSERT(pWidget != NULL);
@@ -311,7 +311,7 @@ void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPa
{
if (pWidget->GetAAction(CPDF_AAction::ButtonUp))
{
- m_bNotifying = TRUE;
+ m_bNotifying = true;
int nAge = pWidget->GetAppearanceAge();
int nValueAge = pWidget->GetValueAge();
@@ -326,122 +326,122 @@ void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPa
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::ButtonUp, fa, pPageView);
- m_bNotifying = FALSE;
+ m_bNotifying = false;
if (!IsValidAnnot(pPageView, pWidget))
{
- bExit = TRUE;
+ bExit = true;
return;
}
if (nAge != pWidget->GetAppearanceAge())
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false))
{
pFormFiller->ResetPDFWindow(pPageView, nValueAge == pWidget->GetValueAge());
}
- bReset = TRUE;
+ bReset = true;
}
}
}
}
-FX_BOOL CFFL_IFormFiller::OnLButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_IFormFiller::OnLButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
return pFormFiller->OnLButtonDblClk(pPageView, pAnnot, nFlags, point);
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_IFormFiller::OnMouseMove(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_IFormFiller::OnMouseMove(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
//change cursor
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, true))
{
return pFormFiller->OnMouseMove(pPageView, pAnnot, nFlags, point);
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_IFormFiller::OnMouseWheel(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, short zDelta, const CPDF_Point& point)
+bool CFFL_IFormFiller::OnMouseWheel(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, short zDelta, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
return pFormFiller->OnMouseWheel(pPageView, pAnnot, nFlags, zDelta, point);
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_IFormFiller::OnRButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_IFormFiller::OnRButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
return pFormFiller->OnRButtonDown(pPageView, pAnnot, nFlags, point);
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_IFormFiller::OnRButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_IFormFiller::OnRButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
return pFormFiller->OnRButtonUp(pPageView, pAnnot, nFlags, point);
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_IFormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
+bool CFFL_IFormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
return pFormFiller->OnKeyDown(pAnnot, nKeyCode, nFlags);
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_IFormFiller::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+bool CFFL_IFormFiller::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
if (nChar == FWL_VKEY_Tab)
- return TRUE;
+ return true;
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
return pFormFiller->OnChar(pAnnot, nChar, nFlags);
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
+bool CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
{
if (!pAnnot)
- return FALSE;
+ return false;
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
@@ -450,7 +450,7 @@ FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (pWidget->GetAAction(CPDF_AAction::GetFocus))
{
- m_bNotifying = TRUE;
+ m_bNotifying = true;
pWidget->GetAppearanceAge();
int nValueAge = pWidget->GetValueAge();
@@ -463,15 +463,15 @@ FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, TRUE);
- if(!pFormFiller) return FALSE;
+ CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, true);
+ if(!pFormFiller) return false;
pFormFiller->GetActionData(pPageView, CPDF_AAction::GetFocus, fa);
pWidget->OnAAction(CPDF_AAction::GetFocus, fa, pPageView);
- m_bNotifying = FALSE;
+ m_bNotifying = false;
if (pWidget->IsAppModified())
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false))
{
pFormFiller->ResetPDFWindow(pPageView, nValueAge == pWidget->GetValueAge());
}
@@ -479,18 +479,18 @@ FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
}
}
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, true))
return pFormFiller->OnSetFocus(pAnnot, nFlag);
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
+bool CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
{
- if(!pAnnot) return FALSE;
+ if(!pAnnot) return false;
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
{
if (pFormFiller->OnKillFocus(pAnnot, nFlag))
{
@@ -499,7 +499,7 @@ FX_BOOL CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (pWidget->GetAAction(CPDF_AAction::LoseFocus))
{
- m_bNotifying = TRUE;
+ m_bNotifying = true;
pWidget->ClearAppModified();
CPDFSDK_PageView* pPageView = pWidget->GetPageView();
@@ -512,24 +512,24 @@ FX_BOOL CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
pFormFiller->GetActionData(pPageView, CPDF_AAction::LoseFocus, fa);
pWidget->OnAAction(CPDF_AAction::LoseFocus, fa, pPageView);
- m_bNotifying = FALSE;
+ m_bNotifying = false;
}
}
}
else
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_IFormFiller::IsVisible(CPDFSDK_Widget* pWidget)
+bool CFFL_IFormFiller::IsVisible(CPDFSDK_Widget* pWidget)
{
return pWidget->IsVisible();
}
-FX_BOOL CFFL_IFormFiller::IsReadOnly(CPDFSDK_Widget* pWidget)
+bool CFFL_IFormFiller::IsReadOnly(CPDFSDK_Widget* pWidget)
{
ASSERT(pWidget != NULL);
@@ -538,12 +538,12 @@ FX_BOOL CFFL_IFormFiller::IsReadOnly(CPDFSDK_Widget* pWidget)
return (nFieldFlags & FIELDFLAG_READONLY) == FIELDFLAG_READONLY;
}
-FX_BOOL CFFL_IFormFiller::IsFillingAllowed(CPDFSDK_Widget* pWidget)
+bool CFFL_IFormFiller::IsFillingAllowed(CPDFSDK_Widget* pWidget)
{
ASSERT(pWidget != NULL);
if (pWidget->GetFieldType() == FIELDTYPE_PUSHBUTTON)
- return TRUE;
+ return true;
else
{
CPDF_Page* pPage = pWidget->GetPDFPage();
@@ -557,10 +557,10 @@ FX_BOOL CFFL_IFormFiller::IsFillingAllowed(CPDFSDK_Widget* pWidget)
(dwPermissions&FPDFPERM_ANNOT_FORM) ||
(dwPermissions&FPDFPERM_MODIFY);
}
- return TRUE;
+ return true;
}
-CFFL_FormFiller* CFFL_IFormFiller::GetFormFiller(CPDFSDK_Annot* pAnnot, FX_BOOL bRegister)
+CFFL_FormFiller* CFFL_IFormFiller::GetFormFiller(CPDFSDK_Annot* pAnnot, bool bRegister)
{
auto it = m_Maps.find(pAnnot);
if (it != m_Maps.end())
@@ -666,7 +666,7 @@ void CFFL_IFormFiller::QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX
}
FX_FLOAT fFactHeight = 0;
- FX_BOOL bBottom = TRUE;
+ bool bBottom = true;
FX_FLOAT fMaxListBoxHeight = 0;
if (fPopupMax > FFL_MAXLISTBOXHEIGHT)
{
@@ -685,26 +685,26 @@ void CFFL_IFormFiller::QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX
if (fBottom > fMaxListBoxHeight)
{
fFactHeight = fMaxListBoxHeight;
- bBottom = TRUE;
+ bBottom = true;
}
else
{
if (fTop > fMaxListBoxHeight)
{
fFactHeight = fMaxListBoxHeight;
- bBottom = FALSE;
+ bBottom = false;
}
else
{
if (fTop > fBottom)
{
fFactHeight = fTop;
- bBottom = FALSE;
+ bBottom = false;
}
else
{
fFactHeight = fBottom;
- bBottom = TRUE;
+ bBottom = true;
}
}
}
@@ -713,14 +713,14 @@ void CFFL_IFormFiller::QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX
fPopupRet = fFactHeight;
}
-void CFFL_IFormFiller::OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bRC, FX_BOOL& bExit, FX_DWORD nFlag)
+void CFFL_IFormFiller::OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bRC, bool& bExit, FX_DWORD nFlag)
{
if (!m_bNotifying)
{
ASSERT(pWidget != NULL);
if (pWidget->GetAAction(CPDF_AAction::KeyStroke))
{
- m_bNotifying = TRUE;
+ m_bNotifying = true;
pWidget->ClearAppModified();
ASSERT(pPageView != NULL);
@@ -728,11 +728,11 @@ void CFFL_IFormFiller::OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, CPDFSDK_PageVi
PDFSDK_FieldAction fa;
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
- fa.bWillCommit = TRUE;
- fa.bKeyDown = TRUE;
- fa.bRC = TRUE;
+ fa.bWillCommit = true;
+ fa.bKeyDown = true;
+ fa.bRC = true;
- CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE);
+ CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false);
ASSERT(pFormFiller != NULL);
pFormFiller->GetActionData(pPageView, CPDF_AAction::KeyStroke, fa);
@@ -744,19 +744,19 @@ void CFFL_IFormFiller::OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, CPDFSDK_PageVi
bRC = fa.bRC;
// bExit = !IsValidAnnot(m_pApp, pDocument, pDocView, pPageView, pWidget);
- m_bNotifying = FALSE;
+ m_bNotifying = false;
}
}
}
-void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bRC, FX_BOOL& bExit, FX_DWORD nFlag)
+void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bRC, bool& bExit, FX_DWORD nFlag)
{
if (!m_bNotifying)
{
ASSERT(pWidget != NULL);
if (pWidget->GetAAction(CPDF_AAction::Validate))
{
- m_bNotifying = TRUE;
+ m_bNotifying = true;
pWidget->ClearAppModified();
ASSERT(pPageView != NULL);
@@ -768,10 +768,10 @@ void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPa
PDFSDK_FieldAction fa;
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
- fa.bKeyDown = TRUE;
- fa.bRC = TRUE;
+ fa.bKeyDown = true;
+ fa.bRC = true;
- CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE);
+ CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false);
ASSERT(pFormFiller != NULL);
pFormFiller->GetActionData(pPageView, CPDF_AAction::Validate, fa);
@@ -783,12 +783,12 @@ void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPa
bRC = fa.bRC;
// bExit = !IsValidAnnot(m_pApp, pDocument, pDocView, pPageView, pWidget);
- m_bNotifying = FALSE;
+ m_bNotifying = false;
}
}
}
-void CFFL_IFormFiller::OnCalculate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bExit, FX_DWORD nFlag)
+void CFFL_IFormFiller::OnCalculate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bExit, FX_DWORD nFlag)
{
if (!m_bNotifying)
{
@@ -806,11 +806,11 @@ void CFFL_IFormFiller::OnCalculate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pP
// bExit = !IsValidAnnot(m_pApp, pDocument, pDocView, pPageView, pWidget);
- m_bNotifying = FALSE;
+ m_bNotifying = false;
}
}
-void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bExit, FX_DWORD nFlag)
+void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bExit, FX_DWORD nFlag)
{
if (!m_bNotifying)
{
@@ -824,7 +824,7 @@ void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPage
CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)pDocument->GetInterForm();
ASSERT(pInterForm != NULL);
- FX_BOOL bFormated = FALSE;
+ bool bFormated = false;
CFX_WideString sValue = pInterForm->OnFormat(pWidget->GetFormField(), bFormated);
// bExit = !IsValidAnnot(m_pApp, pDocument, pDocView, pPageView, pWidget);
@@ -833,15 +833,15 @@ void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPage
if (bFormated)
{
- pInterForm->ResetFieldAppearance(pWidget->GetFormField(), sValue.c_str(), TRUE);
+ pInterForm->ResetFieldAppearance(pWidget->GetFormField(), sValue.c_str(), true);
pInterForm->UpdateField(pWidget->GetFormField());
}
- m_bNotifying = FALSE;
+ m_bNotifying = false;
}
}
-FX_BOOL CFFL_IFormFiller::IsValidAnnot(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot)
+bool CFFL_IFormFiller::IsValidAnnot(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot)
{
ASSERT(pPageView != NULL);
@@ -850,26 +850,26 @@ FX_BOOL CFFL_IFormFiller::IsValidAnnot(CPDFSDK_PageView* pPageView, CPDFSDK_Anno
if(pPageView)
return pPageView->IsValidAnnot(pAnnot->GetPDFAnnot());
else
- return FALSE;
+ return false;
}
-void CFFL_IFormFiller::OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode,
+void CFFL_IFormFiller::OnBeforeKeyStroke(bool bEditOrList, void* pPrivateData, int32_t nKeyCode,
CFX_WideString & strChange, const CFX_WideString& strChangeEx,
int nSelStart, int nSelEnd,
- FX_BOOL bKeyDown, FX_BOOL & bRC, FX_BOOL & bExit, FX_DWORD nFlag)
+ bool bKeyDown, bool & bRC, bool & bExit, FX_DWORD nFlag)
{
ASSERT(pPrivateData != NULL);
CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData;
ASSERT(pData->pWidget != NULL);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pData->pWidget, FALSE);
+ CFFL_FormFiller* pFormFiller = GetFormFiller(pData->pWidget, false);
ASSERT(pFormFiller != NULL);
if (!m_bNotifying)
{
if (pData->pWidget->GetAAction(CPDF_AAction::KeyStroke))
{
- m_bNotifying = TRUE;
+ m_bNotifying = true;
int nAge = pData->pWidget->GetAppearanceAge();
int nValueAge = pData->pWidget->GetValueAge();
@@ -882,8 +882,8 @@ void CFFL_IFormFiller::OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData
fa.sChange = strChange;
fa.sChangeEx = strChangeEx;
fa.bKeyDown = bKeyDown;
- fa.bWillCommit = FALSE;
- fa.bRC = TRUE;
+ fa.bWillCommit = false;
+ fa.bRC = true;
fa.nSelStart = nSelStart;
fa.nSelEnd = nSelEnd;
@@ -895,8 +895,8 @@ void CFFL_IFormFiller::OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData
{
if (!IsValidAnnot(pData->pPageView, pData->pWidget))
{
- bExit = TRUE;
- m_bNotifying = FALSE;
+ bExit = true;
+ m_bNotifying = false;
return;
}
@@ -904,48 +904,48 @@ void CFFL_IFormFiller::OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData
{
CPWL_Wnd* pWnd = pFormFiller->ResetPDFWindow(pData->pPageView, nValueAge == pData->pWidget->GetValueAge());
pData = (CFFL_PrivateData*)pWnd->GetAttachedData();
- bExit = TRUE;
+ bExit = true;
}
if (fa.bRC)
{
pFormFiller->SetActionData(pData->pPageView, CPDF_AAction::KeyStroke, fa);
- bRC = FALSE;
+ bRC = false;
}
else
{
pFormFiller->RestoreState(pData->pPageView);
- bRC = FALSE;
+ bRC = false;
}
if (pDocument->GetFocusAnnot() != pData->pWidget)
{
pFormFiller->CommitData(pData->pPageView,nFlag);
- bExit = TRUE;
+ bExit = true;
}
}
else
{
if (!IsValidAnnot(pData->pPageView, pData->pWidget))
{
- bExit = TRUE;
- m_bNotifying = FALSE;
+ bExit = true;
+ m_bNotifying = false;
return;
}
}
- m_bNotifying = FALSE;
+ m_bNotifying = false;
}
}
}
-void CFFL_IFormFiller::OnAfterKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_BOOL & bExit,FX_DWORD nFlag)
+void CFFL_IFormFiller::OnAfterKeyStroke(bool bEditOrList, void* pPrivateData, bool & bExit,FX_DWORD nFlag)
{
ASSERT(pPrivateData != NULL);
CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData;
ASSERT(pData->pWidget != NULL);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pData->pWidget, FALSE);
+ CFFL_FormFiller* pFormFiller = GetFormFiller(pData->pWidget, false);
ASSERT(pFormFiller != NULL);
if (!bEditOrList)