Index: fpdfsdk/src/formfiller/FFL_IFormFiller.cpp |
diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp |
index cd4b45b06293b5e9355d36d2575dd053682e76fd..6cc88cd338d17fdb846bec55323f96742dfb99ea 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); |
} |
@@ -76,7 +76,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()) |
{ |
@@ -109,7 +109,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); |
@@ -121,7 +121,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); |
} |
@@ -129,7 +129,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); |
} |
@@ -137,7 +137,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); |
} |
@@ -155,7 +155,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(); |
@@ -169,13 +169,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); |
} |
@@ -183,7 +183,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); |
} |
@@ -199,7 +199,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(); |
@@ -213,13 +213,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()); |
} |
@@ -227,13 +227,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"); |
@@ -243,7 +243,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(); |
@@ -256,13 +256,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()); |
} |
@@ -270,15 +270,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; |
@@ -297,24 +297,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); |
@@ -322,7 +322,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(); |
@@ -337,124 +337,124 @@ 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 != NULL); |
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget"); |
- if (nChar == FWL_VKEY_Tab) return TRUE; |
+ if (nChar == FWL_VKEY_Tab) 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; |
+ if(!pAnnot) return false; |
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget"); |
if (!m_bNotifying) |
@@ -462,7 +462,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(); |
pWidget->ClearAppModified(); |
@@ -476,18 +476,18 @@ FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT 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 (!IsValidAnnot(m_pApp, pDocument, pDocView, pPageView, pAnnot)) return FALSE; |
+ // if (!IsValidAnnot(m_pApp, pDocument, pDocView, pPageView, pAnnot)) return false; |
if (pWidget->IsAppModified()) |
{ |
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) |
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false)) |
{ |
pFormFiller->ResetPDFWindow(pPageView, nValueAge == pWidget->GetValueAge()); |
} |
@@ -495,25 +495,25 @@ 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)) |
{ |
if (pFormFiller->OnSetFocus(pAnnot, nFlag)) |
{ |
- return TRUE; |
+ return true; |
} |
else |
- return FALSE; |
+ return false; |
} |
- 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)) |
{ |
@@ -522,7 +522,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(); |
@@ -535,24 +535,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); |
@@ -561,12 +561,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(); |
@@ -580,10 +580,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()) |
@@ -689,7 +689,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) |
{ |
@@ -708,26 +708,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; |
} |
} |
} |
@@ -736,14 +736,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); |
@@ -751,11 +751,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); |
@@ -767,19 +767,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); |
@@ -791,10 +791,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); |
@@ -806,12 +806,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) |
{ |
@@ -829,11 +829,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) |
{ |
@@ -847,7 +847,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); |
@@ -856,15 +856,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); |
@@ -873,26 +873,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(); |
@@ -905,8 +905,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; |
@@ -918,8 +918,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; |
} |
@@ -927,48 +927,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) |