summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-27 11:55:29 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-27 11:55:29 -0700
commitff46aaf499edcf153ee2f57c7016587aa96dcfa0 (patch)
tree0a0d92713af476897899b126d180cc6294433d10 /fpdfsdk/src/formfiller
parentaafeff816e22c1333c17d8a0eb4fe8927c28142d (diff)
downloadpdfium-ff46aaf499edcf153ee2f57c7016587aa96dcfa0.tar.xz
FX Bool considered harmful, part 3
Try to reland this patch after fixing underlying issues that caused it to be reverted. fx_system.h is the only manual edit. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1258093002 .
Diffstat (limited to 'fpdfsdk/src/formfiller')
-rw-r--r--fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp2
-rw-r--r--fpdfsdk/src/formfiller/FFL_CheckBox.cpp38
-rw-r--r--fpdfsdk/src/formfiller/FFL_ComboBox.cpp66
-rw-r--r--fpdfsdk/src/formfiller/FFL_FormFiller.cpp190
-rw-r--r--fpdfsdk/src/formfiller/FFL_IFormFiller.cpp248
-rw-r--r--fpdfsdk/src/formfiller/FFL_ListBox.cpp40
-rw-r--r--fpdfsdk/src/formfiller/FFL_Notify.cpp90
-rw-r--r--fpdfsdk/src/formfiller/FFL_PushButton.cpp2
-rw-r--r--fpdfsdk/src/formfiller/FFL_RadioButton.cpp42
-rw-r--r--fpdfsdk/src/formfiller/FFL_TextField.cpp58
-rw-r--r--fpdfsdk/src/formfiller/FFL_Utils.cpp10
11 files changed, 393 insertions, 393 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index 699a7e4ffe..6570b3ee15 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -230,7 +230,7 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString &sAlias)
CPDF_Dictionary* pAcroFormDict = NULL;
- FX_BOOL bWidget = (m_pAnnotDict->GetString("Subtype") == "Widget");
+ bool bWidget = (m_pAnnotDict->GetString("Subtype") == "Widget");
if (bWidget)
{
diff --git a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
index 55d2d45bc2..72ff575c11 100644
--- a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
@@ -31,18 +31,18 @@ CPWL_Wnd* CFFL_CheckBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVie
return pWnd;
}
-FX_BOOL CFFL_CheckBox::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
+bool CFFL_CheckBox::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
{
switch (nKeyCode)
{
case FWL_VKEY_Return:
case FWL_VKEY_Space:
- return TRUE;
+ return true;
default:
return CFFL_FormFiller::OnKeyDown(pAnnot, nKeyCode, nFlags);
}
}
-FX_BOOL CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+bool CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
switch (nChar)
{
@@ -55,57 +55,57 @@ FX_BOOL CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFla
CPDFSDK_PageView* pPageView = pAnnot->GetPageView();
ASSERT(pPageView != NULL);
- FX_BOOL bReset = FALSE;
- FX_BOOL bExit = FALSE;
+ bool bReset = false;
+ bool bExit = false;
pIFormFiller->OnButtonUp(m_pWidget, pPageView, bReset, bExit,nFlags);
- if (bReset) return TRUE;
- if (bExit) return TRUE;
+ if (bReset) return true;
+ if (bExit) return true;
CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
- if (CPWL_CheckBox * pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, TRUE))
+ if (CPWL_CheckBox * pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, true))
pWnd->SetCheck(!pWnd->IsChecked());
CommitData(pPageView,nFlags);
- return TRUE;
+ return true;
}
default:
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
}
-FX_BOOL CFFL_CheckBox::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_CheckBox::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
CFFL_Button::OnLButtonUp(pPageView, pAnnot, nFlags, point);
if (IsValid())
{
- if (CPWL_CheckBox * pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, TRUE))
+ if (CPWL_CheckBox * pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, true))
{
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
pWnd->SetCheck(!pWidget->IsChecked());
// pWnd->SetCheck(!pWnd->IsChecked());
}
- if (!CommitData(pPageView, nFlags)) return FALSE;
+ if (!CommitData(pPageView, nFlags)) return false;
}
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_CheckBox::IsDataChanged(CPDFSDK_PageView* pPageView)
+bool CFFL_CheckBox::IsDataChanged(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, false))
{
return pWnd->IsChecked() != m_pWidget->IsChecked();
}
- return FALSE;
+ return false;
}
void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView)
@@ -113,10 +113,10 @@ void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView)
ASSERT(m_pWidget != NULL);
- if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, false))
{
- FX_BOOL bNewChecked = pWnd->IsChecked();
+ bool bNewChecked = pWnd->IsChecked();
if (bNewChecked)
@@ -136,7 +136,7 @@ void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView)
}
}
- m_pWidget->SetCheck(bNewChecked, FALSE);
+ m_pWidget->SetCheck(bNewChecked, false);
m_pWidget->UpdateField();
SetChangeMark();
}
diff --git a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
index 841b45ecba..d6d4d3da4e 100644
--- a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
@@ -78,16 +78,16 @@ CPWL_Wnd* CFFL_ComboBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVie
}
-FX_BOOL CFFL_ComboBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+bool CFFL_ComboBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
-FX_BOOL CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView)
+bool CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView)
{
- CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE);
+ CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, false);
if (!pWnd)
- return FALSE;
+ return false;
int32_t nCurSel = pWnd->GetSelect();
if (!(m_pWidget->GetFieldFlags() & FIELDFLAG_EDIT))
@@ -103,28 +103,28 @@ void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, false))
{
CFX_WideString swText = pWnd->GetText();
int32_t nCurSel = pWnd->GetSelect();
//mantis:0004157
- FX_BOOL bSetValue = TRUE;
+ bool bSetValue = true;
if (m_pWidget->GetFieldFlags() & FIELDFLAG_EDIT)
{
if (nCurSel >= 0)
{
if (swText != m_pWidget->GetOptionLabel(nCurSel))
- bSetValue = TRUE;
+ bSetValue = true;
else
- bSetValue = FALSE;
+ bSetValue = false;
}
else
- bSetValue = TRUE;
+ bSetValue = true;
}
else
- bSetValue = FALSE;
+ bSetValue = false;
CFX_WideString sOldValue;
@@ -132,15 +132,15 @@ void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView)
if (bSetValue)
{
sOldValue = m_pWidget->GetValue();
- m_pWidget->SetValue(swText, FALSE);
+ m_pWidget->SetValue(swText, false);
}
else
{
m_pWidget->GetSelectedIndex(0);
- m_pWidget->SetOptionSelection(nCurSel, TRUE, FALSE);
+ m_pWidget->SetOptionSelection(nCurSel, true, false);
}
- m_pWidget->ResetFieldAppearance(TRUE);
+ m_pWidget->ResetFieldAppearance(true);
m_pWidget->UpdateField();
SetChangeMark();
@@ -155,7 +155,7 @@ void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView)
switch (type)
{
case CPDF_AAction::KeyStroke:
- if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, false))
{
if (CPWL_Edit* pEdit = (CPWL_Edit*)*pComboBox)
{
@@ -177,7 +177,7 @@ void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView)
}
break;
case CPDF_AAction::Validate:
- if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, false))
{
if (CPWL_Edit* pEdit = (CPWL_Edit*)*pComboBox)
{
@@ -203,7 +203,7 @@ void CFFL_ComboBox::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAc
switch (type)
{
case CPDF_AAction::KeyStroke:
- if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, false))
{
if (CPWL_Edit* pEdit = (CPWL_Edit*)*pComboBox)
{
@@ -217,7 +217,7 @@ void CFFL_ComboBox::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAc
}
}
-FX_BOOL CFFL_ComboBox::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
+bool CFFL_ComboBox::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
const PDFSDK_FieldAction& faNew)
{
switch (type)
@@ -229,14 +229,14 @@ FX_BOOL CFFL_ComboBox::IsActionDataChanged(CPDF_AAction::AActionType type, const
break;
}
- return FALSE;
+ return false;
}
void CFFL_ComboBox::SaveState(CPDFSDK_PageView* pPageView)
{
ASSERT(pPageView != NULL);
- if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, false))
{
m_State.nIndex = pComboBox->GetSelect();
@@ -252,7 +252,7 @@ void CFFL_ComboBox::RestoreState(CPDFSDK_PageView* pPageView)
{
ASSERT(pPageView != NULL);
- if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, TRUE))
+ if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, true))
{
if (m_State.nIndex >= 0)
pComboBox->SetSelect(m_State.nIndex);
@@ -267,7 +267,7 @@ void CFFL_ComboBox::RestoreState(CPDFSDK_PageView* pPageView)
}
}
-CPWL_Wnd* CFFL_ComboBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue)
+CPWL_Wnd* CFFL_ComboBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestoreValue)
{
if (bRestoreValue)
SaveState(pPageView);
@@ -279,17 +279,17 @@ CPWL_Wnd* CFFL_ComboBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRe
if (bRestoreValue)
{
RestoreState(pPageView);
- pRet = GetPDFWindow(pPageView, FALSE);
+ pRet = GetPDFWindow(pPageView, false);
}
else
- pRet = GetPDFWindow(pPageView, TRUE);
+ pRet = GetPDFWindow(pPageView, true);
m_pWidget->UpdateField();
return pRet;
}
-void CFFL_ComboBox::OnKeyStroke(FX_BOOL bKeyDown, FX_UINT nFlag)
+void CFFL_ComboBox::OnKeyStroke(bool bKeyDown, FX_UINT nFlag)
{
ASSERT(m_pWidget != NULL);
@@ -305,7 +305,7 @@ void CFFL_ComboBox::OnKeyStroke(FX_BOOL bKeyDown, FX_UINT nFlag)
if (CommitData(pPageView, nFlag))
{
DestroyPDFWindow(pPageView);
- m_bValid = FALSE;
+ m_bValid = false;
}
}
}
@@ -328,7 +328,7 @@ void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd)
int nCharacters = wsText.GetLength();
CFX_ByteString bsUTFText = wsText.UTF16LE_Encode();
unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str();
- m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, nCharacters, TRUE);
+ m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, nCharacters, true);
pEdit->SetEditNotify(this);
}
@@ -339,25 +339,25 @@ void CFFL_ComboBox::OnKillFocus(CPWL_Wnd* pWnd)
ASSERT(m_pApp != NULL);
}
-FX_BOOL CFFL_ComboBox::CanCopy(CPDFSDK_Document* pDocument)
+bool CFFL_ComboBox::CanCopy(CPDFSDK_Document* pDocument)
{
ASSERT(pDocument != NULL);
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_ComboBox::CanCut(CPDFSDK_Document* pDocument)
+bool CFFL_ComboBox::CanCut(CPDFSDK_Document* pDocument)
{
ASSERT(pDocument != NULL);
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_ComboBox::CanPaste(CPDFSDK_Document* pDocument)
+bool CFFL_ComboBox::CanPaste(CPDFSDK_Document* pDocument)
{
ASSERT(pDocument != NULL);
- return FALSE;
+ return false;
}
void CFFL_ComboBox::OnAddUndo(CPWL_Edit* pEdit)
@@ -371,7 +371,7 @@ CFX_WideString CFFL_ComboBox::GetSelectExportText()
int nExport = -1;
CPDFSDK_PageView *pPageView = GetCurPageView();
- if (CPWL_ComboBox * pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_ComboBox * pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, false))
{
nExport = pComboBox->GetSelect();
}
diff --git a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
index 1811cb0424..34aa17cf06 100644
--- a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
@@ -20,7 +20,7 @@
CFFL_FormFiller::CFFL_FormFiller(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot)
: m_pApp(pApp),
m_pAnnot(pAnnot),
- m_bValid(FALSE),
+ m_bValid(false),
m_ptOldPos(0,0)
{
m_pWidget = (CPDFSDK_Widget*) pAnnot;
@@ -40,15 +40,15 @@ CFFL_FormFiller::~CFFL_FormFiller()
void CFFL_FormFiller::SetWindowRect(CPDFSDK_PageView* pPageView, const CPDF_Rect& rcWindow)
{
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false))
{
- pWnd->Move(CPDF_Rect(rcWindow), TRUE, FALSE);
+ pWnd->Move(CPDF_Rect(rcWindow), true, false);
}
}
CPDF_Rect CFFL_FormFiller::GetWindowRect(CPDFSDK_PageView* pPageView)
{
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false))
{
return pWnd->GetWindowRect();
}
@@ -63,7 +63,7 @@ FX_RECT CFFL_FormFiller::GetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot*
CPDF_Rect rcAnnot = m_pWidget->GetRect();
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false))
{
CPDF_Rect rcWindow = pWnd->GetWindowRect();
rcAnnot = PWLtoFFL(rcWindow);
@@ -86,7 +86,7 @@ void CFFL_FormFiller::OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot,
{
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
{
CPDF_Matrix mt = GetCurMatrix();
mt.Concat(*pUser2Device);
@@ -131,153 +131,153 @@ void CFFL_FormFiller::OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pA
ASSERT(m_pWidget != NULL);
}
-FX_BOOL CFFL_FormFiller::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_FormFiller::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, TRUE))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, true))
{
- m_bValid = TRUE;
+ m_bValid = true;
FX_RECT rect = GetViewBBox(pPageView,pAnnot);
InvalidateRect(rect.left, rect.top, rect.right, rect.bottom);
if(!rect.Contains((int)point.x, (int)point.y))
- return FALSE;
+ return false;
return pWnd->OnLButtonDown(WndtoPWL(pPageView, point),nFlags);
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_FormFiller::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_FormFiller::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
{
FX_RECT rcFFL = GetViewBBox(pPageView, pAnnot);
InvalidateRect(rcFFL.left, rcFFL.top, rcFFL.right, rcFFL.bottom);
pWnd->OnLButtonUp(WndtoPWL(pPageView, point),nFlags);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_FormFiller::OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_FormFiller::OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
{
pWnd->OnLButtonDblClk(WndtoPWL(pPageView, point),nFlags);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_FormFiller::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_FormFiller::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
if ((m_ptOldPos.x != point.x) || (m_ptOldPos.y != point.y))
{
m_ptOldPos = point;
}
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
{
pWnd->OnMouseMove(WndtoPWL(pPageView, point),nFlags);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_FormFiller::OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, short zDelta, const CPDF_Point& point)
+bool CFFL_FormFiller::OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, short zDelta, const CPDF_Point& point)
{
- if (!IsValid()) return FALSE;
+ if (!IsValid()) return false;
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, TRUE))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, true))
{
return pWnd->OnMouseWheel(zDelta, WndtoPWL(pPageView, point),nFlags);
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_FormFiller::OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_FormFiller::OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, TRUE))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, true))
{
pWnd->OnRButtonDown(WndtoPWL(pPageView, point),nFlags);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_FormFiller::OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_FormFiller::OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
{
pWnd->OnRButtonUp(WndtoPWL(pPageView, point),nFlags);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_FormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
+bool CFFL_FormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
{
if (IsValid())
{
CPDFSDK_PageView* pPageView = GetCurPageView();
ASSERT(pPageView != NULL);
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
{
return pWnd->OnKeyDown(nKeyCode,nFlags);
}
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_FormFiller::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+bool CFFL_FormFiller::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
if (IsValid())
{
CPDFSDK_PageView* pPageView = GetCurPageView();
ASSERT(pPageView != NULL);
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
{
return pWnd->OnChar(nChar,nFlags);
}
}
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_FormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag)
+bool CFFL_FormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag)
{
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
CPDF_Page* pPage = pWidget->GetPDFPage();
CPDFSDK_Document* pDoc = m_pApp->GetSDKDocument();
CPDFSDK_PageView* pPageView = pDoc->GetPageView(pPage);
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, true))
pWnd->SetFocus();
- m_bValid = TRUE;
+ m_bValid = true;
FX_RECT rcRect = GetViewBBox(pPageView,pAnnot);
InvalidateRect(rcRect.left, rcRect.top, rcRect.right, rcRect.bottom);
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_FormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag)
+bool CFFL_FormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag)
{
if (!IsValid())
- return TRUE;
+ return true;
CPDFSDK_PageView* pPageView = GetCurPageView();
CommitData(pPageView, nFlag);
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false))
pWnd->KillFocus();
switch (m_pWidget->GetFieldType())
@@ -285,16 +285,16 @@ FX_BOOL CFFL_FormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag)
case FIELDTYPE_PUSHBUTTON:
case FIELDTYPE_CHECKBOX:
case FIELDTYPE_RADIOBUTTON:
- EscapeFiller(pPageView, TRUE);
+ EscapeFiller(pPageView, true);
break;
default:
- EscapeFiller(pPageView, FALSE);
+ EscapeFiller(pPageView, false);
break;
}
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_FormFiller::IsValid() const
+bool CFFL_FormFiller::IsValid() const
{
return m_bValid;
}
@@ -370,7 +370,7 @@ PWL_CREATEPARAM CFFL_FormFiller::GetCreateParam()
return cp;
}
-CPWL_Wnd* CFFL_FormFiller::GetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bNew)
+CPWL_Wnd* CFFL_FormFiller::GetPDFWindow(CPDFSDK_PageView* pPageView, bool bNew)
{
ASSERT(pPageView);
@@ -499,7 +499,7 @@ CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView()
CPDF_Rect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView)
{
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false))
{
CPDF_Rect rcFocus = FFLtoWnd(pPageView, PWLtoFFL(pWnd->GetFocusRect()));
CPDF_Rect rcPage = pPageView->GetPDFPage()->GetPageBBox();
@@ -561,44 +561,44 @@ CPDF_Rect CFFL_FormFiller::FFLtoWnd(CPDFSDK_PageView* pPageView, const CPDF_Rect
return rect;
}
-FX_BOOL CFFL_FormFiller::CommitData(CPDFSDK_PageView* pPageView, FX_UINT nFlag)
+bool CFFL_FormFiller::CommitData(CPDFSDK_PageView* pPageView, FX_UINT nFlag)
{
if (IsDataChanged(pPageView))
{
- FX_BOOL bRC = TRUE;
- FX_BOOL bExit = FALSE;
+ bool bRC = true;
+ bool bExit = false;
CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller();
pIFormFiller->OnKeyStrokeCommit(m_pWidget, pPageView, bRC, bExit, nFlag);
if (bExit)
- return TRUE;
+ return true;
if (!bRC)
{
- ResetPDFWindow(pPageView, FALSE);
- return TRUE;
+ ResetPDFWindow(pPageView, false);
+ return true;
}
pIFormFiller->OnValidate(m_pWidget, pPageView, bRC, bExit, nFlag);
if (bExit)
- return TRUE;
+ return true;
if (!bRC)
{
- ResetPDFWindow(pPageView, FALSE);
- return TRUE;
+ ResetPDFWindow(pPageView, false);
+ return true;
}
SaveData(pPageView);
pIFormFiller->OnCalculate(m_pWidget, pPageView, bExit,nFlag);
if (bExit)
- return TRUE;
+ return true;
pIFormFiller->OnFormat(m_pWidget, pPageView, bExit,nFlag);
}
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_FormFiller::IsDataChanged(CPDFSDK_PageView* pPageView)
+bool CFFL_FormFiller::IsDataChanged(CPDFSDK_PageView* pPageView)
{
- return FALSE;
+ return false;
}
void CFFL_FormFiller::SaveData(CPDFSDK_PageView* pPageView)
@@ -621,10 +621,10 @@ void CFFL_FormFiller::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::A
{
}
-FX_BOOL CFFL_FormFiller::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
+bool CFFL_FormFiller::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
const PDFSDK_FieldAction& faNew)
{
- return FALSE;
+ return false;
}
void CFFL_FormFiller::SaveState(CPDFSDK_PageView* pPageView)
@@ -635,9 +635,9 @@ void CFFL_FormFiller::RestoreState(CPDFSDK_PageView* pPageView)
{
}
-CPWL_Wnd* CFFL_FormFiller::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue)
+CPWL_Wnd* CFFL_FormFiller::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestoreValue)
{
- return GetPDFWindow(pPageView, FALSE);
+ return GetPDFWindow(pPageView, false);
}
void CFFL_FormFiller::TimerProc()
@@ -650,13 +650,13 @@ IFX_SystemHandler* CFFL_FormFiller::GetSystemHandler() const
return m_pApp->GetSysHandler();
}
-void CFFL_FormFiller::OnKeyStroke(FX_BOOL bKeyDown)
+void CFFL_FormFiller::OnKeyStroke(bool bKeyDown)
{
}
-void CFFL_FormFiller::EscapeFiller(CPDFSDK_PageView* pPageView, FX_BOOL bDestroyPDFWindow)
+void CFFL_FormFiller::EscapeFiller(CPDFSDK_PageView* pPageView, bool bDestroyPDFWindow)
{
- m_bValid = FALSE;
+ m_bValid = false;
FX_RECT rcRect = GetViewBBox(pPageView, m_pWidget);
InvalidateRect(rcRect.left, rcRect.top, rcRect.right, rcRect.bottom);
@@ -665,19 +665,19 @@ void CFFL_FormFiller::EscapeFiller(CPDFSDK_PageView* pPageView, FX_BOOL bDestroy
DestroyPDFWindow(pPageView);
}
-FX_BOOL CFFL_FormFiller::CanCopy(CPDFSDK_Document* pDocument)
+bool CFFL_FormFiller::CanCopy(CPDFSDK_Document* pDocument)
{
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_FormFiller::CanCut(CPDFSDK_Document* pDocument)
+bool CFFL_FormFiller::CanCut(CPDFSDK_Document* pDocument)
{
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_FormFiller::CanPaste(CPDFSDK_Document* pDocument)
+bool CFFL_FormFiller::CanPaste(CPDFSDK_Document* pDocument)
{
- return FALSE;
+ return false;
}
void CFFL_FormFiller::DoCopy(CPDFSDK_Document* pDocument)
@@ -702,8 +702,8 @@ void CFFL_FormFiller::InvalidateRect(double left, double top, double right, doub
CFFL_Button::CFFL_Button(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget) :
CFFL_FormFiller(pApp, pWidget),
- m_bMouseIn(FALSE),
- m_bMouseDown(FALSE)
+ m_bMouseIn(false),
+ m_bMouseDown(false)
{
}
@@ -713,14 +713,14 @@ CFFL_Button::~CFFL_Button()
void CFFL_Button::OnMouseEnter(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot)
{
- m_bMouseIn = TRUE;
+ m_bMouseIn = true;
FX_RECT rect = GetViewBBox(pPageView,pAnnot);
InvalidateRect(rect.left, rect.top, rect.right, rect.bottom);
}
void CFFL_Button::OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot)
{
- m_bMouseIn = FALSE;
+ m_bMouseIn = false;
FX_RECT rect = GetViewBBox(pPageView,pAnnot);
InvalidateRect(rect.left, rect.top, rect.right, rect.bottom);
@@ -728,39 +728,39 @@ void CFFL_Button::OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot
ASSERT(m_pWidget != NULL);
}
-FX_BOOL CFFL_Button::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_Button::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
CPDF_Rect rcAnnot = pAnnot->GetRect();
if(!rcAnnot.Contains(point.x, point.y))
- return FALSE;
+ return false;
- m_bMouseDown = TRUE;
- m_bValid = TRUE;
+ m_bMouseDown = true;
+ m_bValid = true;
FX_RECT rect = GetViewBBox(pPageView, pAnnot);
InvalidateRect(rect.left, rect.top, rect.right, rect.bottom);
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_Button::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_Button::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
CPDF_Rect rcAnnot = pAnnot->GetRect();
if(!rcAnnot.Contains(point.x, point.y))
- return FALSE;
+ return false;
- m_bMouseDown = FALSE;
+ m_bMouseDown = false;
m_pWidget->GetPDFPage();
FX_RECT rect = GetViewBBox(pPageView, pAnnot);
InvalidateRect(rect.left, rect.top, rect.right, rect.bottom);
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_Button::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_Button::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(m_pApp != NULL);
- return TRUE;
+ return true;
}
void CFFL_Button::OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot,
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)
diff --git a/fpdfsdk/src/formfiller/FFL_ListBox.cpp b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
index c105cfcbdd..ef113dad96 100644
--- a/fpdfsdk/src/formfiller/FFL_ListBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
@@ -73,7 +73,7 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView
{
m_OriginSelections.clear();
- FX_BOOL bSetCaret = FALSE;
+ bool bSetCaret = false;
for (int32_t i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
{
if (m_pWidget->IsOptionSelected(i))
@@ -81,7 +81,7 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView
if (!bSetCaret)
{
pWnd->SetCaret(i);
- bSetCaret = TRUE;
+ bSetCaret = true;
}
pWnd->Select(i);
m_OriginSelections.insert(i);
@@ -106,23 +106,23 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView
}
-FX_BOOL CFFL_ListBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+bool CFFL_ListBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
-FX_BOOL CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView)
+bool CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView)
{
- CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE);
+ CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false);
if (!pListBox)
- return FALSE;
+ return false;
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT) {
int nSelCount = 0;
for (int32_t i = 0, sz = pListBox->GetCount(); i < sz; ++i) {
if (pListBox->IsItemSelected(i)) {
if (m_OriginSelections.count(i) == 0)
- return TRUE;
+ return true;
nSelCount++;
}
@@ -137,7 +137,7 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false))
{
CFX_IntArray aOldSelect, aNewSelect;
@@ -154,7 +154,7 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView)
int32_t nNewTopIndex = pListBox->GetTopVisibleIndex();
- m_pWidget->ClearSelection(FALSE);
+ m_pWidget->ClearSelection(false);
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT)
{
@@ -162,19 +162,19 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView)
{
if (pListBox->IsItemSelected(i))
{
- m_pWidget->SetOptionSelection(i, TRUE, FALSE);
+ m_pWidget->SetOptionSelection(i, true, false);
aNewSelect.Add(i);
}
}
}
else
{
- m_pWidget->SetOptionSelection(pListBox->GetCurSel(), TRUE, FALSE);
+ m_pWidget->SetOptionSelection(pListBox->GetCurSel(), true, false);
aNewSelect.Add(pListBox->GetCurSel());
}
m_pWidget->SetTopVisibleIndex(nNewTopIndex);
- m_pWidget->ResetFieldAppearance(TRUE);
+ m_pWidget->ResetFieldAppearance(true);
m_pWidget->UpdateField();
SetChangeMark();
}
@@ -192,7 +192,7 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAct
}
else
{
- if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false))
{
ASSERT(m_pWidget != NULL);
int32_t nCurSel = pListBox->GetCurSel();
@@ -230,7 +230,7 @@ void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView)
{
ASSERT(pPageView != NULL);
- if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false))
{
for (int32_t i=0,sz=pListBox->GetCount(); i<sz; i++)
{
@@ -244,14 +244,14 @@ void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView)
void CFFL_ListBox::RestoreState(CPDFSDK_PageView* pPageView)
{
- if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false))
{
for (int i=0,sz=m_State.GetSize(); i<sz; i++)
pListBox->Select(m_State[i]);
}
}
-CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue)
+CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestoreValue)
{
if (bRestoreValue)
SaveState(pPageView);
@@ -263,17 +263,17 @@ CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRes
if (bRestoreValue)
{
RestoreState(pPageView);
- pRet = GetPDFWindow(pPageView, FALSE);
+ pRet = GetPDFWindow(pPageView, false);
}
else
- pRet = GetPDFWindow(pPageView, TRUE);
+ pRet = GetPDFWindow(pPageView, true);
m_pWidget->UpdateField();
return pRet;
}
-void CFFL_ListBox::OnKeyStroke(FX_BOOL bKeyDown, FX_DWORD nFlag)
+void CFFL_ListBox::OnKeyStroke(bool bKeyDown, FX_DWORD nFlag)
{
ASSERT(m_pWidget != NULL);
@@ -289,7 +289,7 @@ void CFFL_ListBox::OnKeyStroke(FX_BOOL bKeyDown, FX_DWORD nFlag)
if (CommitData(pPageView, nFlag))
{
DestroyPDFWindow(pPageView);
- m_bValid = FALSE;
+ m_bValid = false;
}
}
}
diff --git a/fpdfsdk/src/formfiller/FFL_Notify.cpp b/fpdfsdk/src/formfiller/FFL_Notify.cpp
index 58a2202b61..fdc4bcf7b1 100644
--- a/fpdfsdk/src/formfiller/FFL_Notify.cpp
+++ b/fpdfsdk/src/formfiller/FFL_Notify.cpp
@@ -15,7 +15,7 @@
//#pragma warning(disable: 4800)
CFFL_Notify::CFFL_Notify(CFFL_FormFiller * pFormFiller) :
- m_bDoActioning(FALSE),
+ m_bDoActioning(false),
m_nNotifyFlag(0)
{
ASSERT(pFormFiller != NULL);
@@ -36,116 +36,116 @@ void CFFL_Notify::AfterNotify()
m_nNotifyFlag --;
}
-FX_BOOL CFFL_Notify::OnMouseUp(FX_BOOL & bExit)
+bool CFFL_Notify::OnMouseUp(bool & bExit)
{
BeforeNotify();
- FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::ButtonUp, bExit);
+ bool bRet = false;//DoAAction(CPDF_AAction::AActionType::ButtonUp, bExit);
AfterNotify();
return bRet;
}
-FX_BOOL CFFL_Notify::OnMouseDown(FX_BOOL & bExit)
+bool CFFL_Notify::OnMouseDown(bool & bExit)
{
BeforeNotify();
- FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::ButtonDown, bExit);
+ bool bRet = false;//DoAAction(CPDF_AAction::AActionType::ButtonDown, bExit);
AfterNotify();
return bRet;
}
-FX_BOOL CFFL_Notify::OnMouseEnter(FX_BOOL & bExit)
+bool CFFL_Notify::OnMouseEnter(bool & bExit)
{
BeforeNotify();
- FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::CursorEnter, bExit);
+ bool bRet = false;//DoAAction(CPDF_AAction::AActionType::CursorEnter, bExit);
AfterNotify();
return bRet;
}
-FX_BOOL CFFL_Notify::OnMouseExit(FX_BOOL & bExit)
+bool CFFL_Notify::OnMouseExit(bool & bExit)
{
BeforeNotify();
- FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::CursorExit, bExit);
+ bool bRet = false;//DoAAction(CPDF_AAction::AActionType::CursorExit, bExit);
AfterNotify();
return bRet;
}
-FX_BOOL CFFL_Notify::OnSetFocus(FX_BOOL & bExit)
+bool CFFL_Notify::OnSetFocus(bool & bExit)
{
BeforeNotify();
- FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::GetFocus, bExit);
+ bool bRet = false;//DoAAction(CPDF_AAction::AActionType::GetFocus, bExit);
AfterNotify();
return bRet;
}
-FX_BOOL CFFL_Notify::OnKillFocus(FX_BOOL & bExit)
+bool CFFL_Notify::OnKillFocus(bool & bExit)
{
BeforeNotify();
- FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::LoseFocus, bExit);
+ bool bRet = false;//DoAAction(CPDF_AAction::AActionType::LoseFocus, bExit);
AfterNotify();
return bRet;
}
-FX_BOOL CFFL_Notify::OnCalculate()
+bool CFFL_Notify::OnCalculate()
{
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_Notify::OnFormat(int iCommitKey)
+bool CFFL_Notify::OnFormat(int iCommitKey)
{
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_Notify::OnKeyStroke(CPDF_FormField* pFormField, int nCommitKey, CFX_WideString& strValue, CFX_WideString& strChange,
- const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier,
- FX_BOOL bShift, FX_BOOL bWillCommit, FX_BOOL bFieldFull,
- int& nSelStart, int& nSelEnd, FX_BOOL& bRC)
+bool CFFL_Notify::OnKeyStroke(CPDF_FormField* pFormField, int nCommitKey, CFX_WideString& strValue, CFX_WideString& strChange,
+ const CFX_WideString& strChangeEx, bool bKeyDown, bool bModifier,
+ bool bShift, bool bWillCommit, bool bFieldFull,
+ int& nSelStart, int& nSelEnd, bool& bRC)
{
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_Notify::OnValidate(CPDF_FormField* pFormField, CFX_WideString& strValue, CFX_WideString & strChange,
- const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier,
- FX_BOOL bShift, FX_BOOL & bRC)
+bool CFFL_Notify::OnValidate(CPDF_FormField* pFormField, CFX_WideString& strValue, CFX_WideString & strChange,
+ const CFX_WideString& strChangeEx, bool bKeyDown, bool bModifier,
+ bool bShift, bool & bRC)
{
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_Notify::DoAAction(CPDF_AAction::AActionType eAAT, FX_BOOL & bExit)
+bool CFFL_Notify::DoAAction(CPDF_AAction::AActionType eAAT, bool & bExit)
{
if (m_bDoActioning)
- return FALSE;
+ return false;
CPDF_Action action;
if (!FindAAction(eAAT, action))
- return FALSE;
+ return false;
- m_bDoActioning = TRUE;
+ m_bDoActioning = true;
ExecuteActionTree(eAAT,action,bExit);
- m_bDoActioning = FALSE;
- return TRUE;
+ m_bDoActioning = false;
+ return true;
}
-FX_BOOL CFFL_Notify::ExecuteActionTree(CPDF_AAction::AActionType eAAT,CPDF_Action & action, FX_BOOL& bExit)
+bool CFFL_Notify::ExecuteActionTree(CPDF_AAction::AActionType eAAT,CPDF_Action & action, bool& bExit)
{
- if (!ExecuteAction(eAAT,action,bExit)) return FALSE;
- if (bExit) return TRUE;
+ if (!ExecuteAction(eAAT,action,bExit)) return false;
+ if (bExit) return true;
for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
{
CPDF_Action subaction = action.GetSubAction(i);
- if (!ExecuteActionTree(eAAT,subaction,bExit)) return FALSE;
+ if (!ExecuteActionTree(eAAT,subaction,bExit)) return false;
if (bExit) break;
}
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_Notify::FindAAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action)
+bool CFFL_Notify::FindAAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action)
{
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_Notify::FindAAction(CPDF_AAction aaction,CPDF_AAction::AActionType eAAT,CPDF_Action & action)
+bool CFFL_Notify::FindAAction(CPDF_AAction aaction,CPDF_AAction::AActionType eAAT,CPDF_Action & action)
{
CPDF_Action MyAction;
@@ -154,20 +154,20 @@ FX_BOOL CFFL_Notify::FindAAction(CPDF_AAction aaction,CPDF_AAction::AActionType
MyAction = aaction.GetAction(eAAT);
}
else
- return FALSE;
+ return false;
if (MyAction.GetType() == CPDF_Action::Unknown)
- return FALSE;
+ return false;
action = MyAction;
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_Notify::ExecuteAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action,FX_BOOL& bExit)
+bool CFFL_Notify::ExecuteAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action,bool& bExit)
{
- return FALSE;
+ return false;
}
//#pragma warning(default: 4800)
diff --git a/fpdfsdk/src/formfiller/FFL_PushButton.cpp b/fpdfsdk/src/formfiller/FFL_PushButton.cpp
index a5df48840c..44e4ed03f3 100644
--- a/fpdfsdk/src/formfiller/FFL_PushButton.cpp
+++ b/fpdfsdk/src/formfiller/FFL_PushButton.cpp
@@ -28,7 +28,7 @@ CPWL_Wnd* CFFL_PushButton::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageV
}
-FX_BOOL CFFL_PushButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+bool CFFL_PushButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
diff --git a/fpdfsdk/src/formfiller/FFL_RadioButton.cpp b/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
index 1f73e8ccaa..e7b334828a 100644
--- a/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
+++ b/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
@@ -31,19 +31,19 @@ CPWL_Wnd* CFFL_RadioButton::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_Page
return pWnd;
}
-FX_BOOL CFFL_RadioButton::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
+bool CFFL_RadioButton::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
{
switch (nKeyCode)
{
case FWL_VKEY_Return:
case FWL_VKEY_Space:
- return TRUE;
+ return true;
default:
return CFFL_FormFiller::OnKeyDown(pAnnot, nKeyCode, nFlags);
}
}
-FX_BOOL CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+bool CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
switch (nChar)
{
@@ -56,61 +56,61 @@ FX_BOOL CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT n
CPDFSDK_PageView* pPageView = pAnnot->GetPageView();
ASSERT(pPageView != NULL);
- FX_BOOL bReset = FALSE;
- FX_BOOL bExit = FALSE;
+ bool bReset = false;
+ bool bExit = false;
pIFormFiller->OnButtonUp(m_pWidget, pPageView, bReset, bExit,nFlags);
- if (bReset) return TRUE;
- if (bExit) return TRUE;
+ if (bReset) return true;
+ if (bExit) return true;
CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
- if (CPWL_RadioButton * pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, TRUE))
- pWnd->SetCheck(TRUE);
+ if (CPWL_RadioButton * pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, true))
+ pWnd->SetCheck(true);
CommitData(pPageView,nFlags);
- return TRUE;
+ return true;
}
default:
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
}
-FX_BOOL CFFL_RadioButton::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_RadioButton::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
CFFL_Button::OnLButtonUp(pPageView, pAnnot, nFlags, point);
if (IsValid())
{
- if (CPWL_RadioButton * pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, TRUE))
- pWnd->SetCheck(TRUE);
+ if (CPWL_RadioButton * pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, true))
+ pWnd->SetCheck(true);
- if (!CommitData(pPageView,nFlags)) return FALSE;
+ if (!CommitData(pPageView,nFlags)) return false;
}
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_RadioButton::IsDataChanged(CPDFSDK_PageView* pPageView)
+bool CFFL_RadioButton::IsDataChanged(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_RadioButton* pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_RadioButton* pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, false))
{
return pWnd->IsChecked() != m_pWidget->IsChecked();
}
- return FALSE;
+ return false;
}
void CFFL_RadioButton::SaveData(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_RadioButton* pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_RadioButton* pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, false))
{
- FX_BOOL bNewChecked = pWnd->IsChecked();
+ bool bNewChecked = pWnd->IsChecked();
if (bNewChecked)
{
@@ -129,7 +129,7 @@ void CFFL_RadioButton::SaveData(CPDFSDK_PageView* pPageView)
}
}
- m_pWidget->SetCheck(bNewChecked, FALSE);
+ m_pWidget->SetCheck(bNewChecked, false);
m_pWidget->UpdateField();
SetChangeMark();
}
diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/src/formfiller/FFL_TextField.cpp
index a4b87263ed..a8695f4aa5 100644
--- a/fpdfsdk/src/formfiller/FFL_TextField.cpp
+++ b/fpdfsdk/src/formfiller/FFL_TextField.cpp
@@ -129,7 +129,7 @@ CPWL_Wnd* CFFL_TextField::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVi
}
-FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+bool CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
switch (nChar)
{
@@ -144,7 +144,7 @@ FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFl
if (m_bValid)
{
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, true))
pWnd->SetFocus();
}
else
@@ -152,9 +152,9 @@ FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFl
if (CommitData(pPageView, nFlags))
{
DestroyPDFWindow(pPageView);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
}
break;
@@ -162,35 +162,35 @@ FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFl
{
CPDFSDK_PageView* pPageView = GetCurPageView();
ASSERT(pPageView != NULL);
- EscapeFiller(pPageView,TRUE);
- return TRUE;
+ EscapeFiller(pPageView,true);
+ return true;
}
}
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
-FX_BOOL CFFL_TextField::IsDataChanged(CPDFSDK_PageView* pPageView)
+bool CFFL_TextField::IsDataChanged(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_Edit * pEdit = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Edit * pEdit = (CPWL_Edit*)GetPDFWindow(pPageView, false))
return pEdit->GetText() != m_pWidget->GetValue();
- return FALSE;
+ return false;
}
void CFFL_TextField::SaveData(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, false))
{
CFX_WideString sOldValue = m_pWidget->GetValue();
CFX_WideString sNewValue = pWnd->GetText();
- m_pWidget->SetValue(sNewValue, FALSE);
- m_pWidget->ResetFieldAppearance(TRUE);
+ m_pWidget->SetValue(sNewValue, false);
+ m_pWidget->ResetFieldAppearance(true);
m_pWidget->UpdateField();
SetChangeMark();
}
@@ -202,7 +202,7 @@ void CFFL_TextField::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AA
switch (type)
{
case CPDF_AAction::KeyStroke:
- if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, false))
{
fa.bFieldFull = pWnd->IsTextFull();
@@ -216,7 +216,7 @@ void CFFL_TextField::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AA
}
break;
case CPDF_AAction::Validate:
- if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, false))
{
fa.sValue = pWnd->GetText();
}
@@ -237,7 +237,7 @@ void CFFL_TextField::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AA
switch (type)
{
case CPDF_AAction::KeyStroke:
- if (CPWL_Edit * pEdit = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Edit * pEdit = (CPWL_Edit*)GetPDFWindow(pPageView, false))
{
pEdit->SetFocus();
pEdit->SetSel(fa.nSelStart, fa.nSelEnd);
@@ -250,7 +250,7 @@ void CFFL_TextField::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AA
}
-FX_BOOL CFFL_TextField::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
+bool CFFL_TextField::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
const PDFSDK_FieldAction& faNew)
{
switch (type)
@@ -262,14 +262,14 @@ FX_BOOL CFFL_TextField::IsActionDataChanged(CPDF_AAction::AActionType type, cons
break;
}
- return FALSE;
+ return false;
}
void CFFL_TextField::SaveState(CPDFSDK_PageView* pPageView)
{
ASSERT(pPageView != NULL);
- if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, false))
{
pWnd->GetSel(m_State.nStart, m_State.nEnd);
m_State.sValue = pWnd->GetText();
@@ -280,14 +280,14 @@ void CFFL_TextField::RestoreState(CPDFSDK_PageView* pPageView)
{
ASSERT(pPageView != NULL);
- if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, TRUE))
+ if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, true))
{
pWnd->SetText(m_State.sValue.c_str());
pWnd->SetSel(m_State.nStart, m_State.nEnd);
}
}
-CPWL_Wnd* CFFL_TextField::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue)
+CPWL_Wnd* CFFL_TextField::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestoreValue)
{
if (bRestoreValue)
SaveState(pPageView);
@@ -299,10 +299,10 @@ CPWL_Wnd* CFFL_TextField::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bR
if (bRestoreValue)
{
RestoreState(pPageView);
- pRet = GetPDFWindow(pPageView, FALSE);
+ pRet = GetPDFWindow(pPageView, false);
}
else
- pRet = GetPDFWindow(pPageView, TRUE);
+ pRet = GetPDFWindow(pPageView, true);
m_pWidget->UpdateField();
@@ -326,7 +326,7 @@ void CFFL_TextField::OnSetFocus(CPWL_Wnd* pWnd)
int nCharacters = wsText.GetLength();
CFX_ByteString bsUTFText = wsText.UTF16LE_Encode();
unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str();
- m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, nCharacters, TRUE);
+ m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, nCharacters, true);
pEdit->SetEditNotify(this);
//pUndo->BeginEdit(pDocument);
@@ -338,19 +338,19 @@ void CFFL_TextField::OnKillFocus(CPWL_Wnd* pWnd)
}
-FX_BOOL CFFL_TextField::CanCopy(CPDFSDK_Document* pDocument)
+bool CFFL_TextField::CanCopy(CPDFSDK_Document* pDocument)
{
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_TextField::CanCut(CPDFSDK_Document* pDocument)
+bool CFFL_TextField::CanCut(CPDFSDK_Document* pDocument)
{
- return FALSE;
+ return false;
}
-FX_BOOL CFFL_TextField::CanPaste(CPDFSDK_Document* pDocument)
+bool CFFL_TextField::CanPaste(CPDFSDK_Document* pDocument)
{
- return FALSE;
+ return false;
}
void CFFL_TextField::OnAddUndo(CPWL_Edit* pEdit)
diff --git a/fpdfsdk/src/formfiller/FFL_Utils.cpp b/fpdfsdk/src/formfiller/FFL_Utils.cpp
index 8d2d76d73c..0e5022c9c1 100644
--- a/fpdfsdk/src/formfiller/FFL_Utils.cpp
+++ b/fpdfsdk/src/formfiller/FFL_Utils.cpp
@@ -41,9 +41,9 @@ CPDF_Rect CFFL_Utils::DeflateRect(const CPDF_Rect & crRect,const FX_FLOAT & fSiz
return crNew;
}
-FX_BOOL CFFL_Utils::TraceObject(CPDF_Object* pObj)
+bool CFFL_Utils::TraceObject(CPDF_Object* pObj)
{
- if (!pObj) return FALSE;
+ if (!pObj) return false;
FX_DWORD dwObjNum = pObj->GetObjNum();
switch (pObj->GetType())
@@ -71,7 +71,7 @@ FX_BOOL CFFL_Utils::TraceObject(CPDF_Object* pObj)
//TRACE(csKey + "\n");
if (!pElement) break;
TraceObject(pElement);
- }while (TRUE);
+ }while (true);
}
break;
@@ -107,8 +107,8 @@ FX_BOOL CFFL_Utils::TraceObject(CPDF_Object* pObj)
default:
break;
}
- if (dwObjNum == 0) return FALSE;
+ if (dwObjNum == 0) return false;
- return TRUE;
+ return true;
}