summaryrefslogtreecommitdiff
path: root/fpdfsdk/include
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/include
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/include')
-rw-r--r--fpdfsdk/include/formfiller/FFL_CheckBox.h8
-rw-r--r--fpdfsdk/include/formfiller/FFL_ComboBox.h16
-rw-r--r--fpdfsdk/include/formfiller/FFL_FormFiller.h56
-rw-r--r--fpdfsdk/include/formfiller/FFL_IFormFiller.h52
-rw-r--r--fpdfsdk/include/formfiller/FFL_ListBox.h8
-rw-r--r--fpdfsdk/include/formfiller/FFL_Notify.h46
-rw-r--r--fpdfsdk/include/formfiller/FFL_PushButton.h2
-rw-r--r--fpdfsdk/include/formfiller/FFL_RadioButton.h8
-rw-r--r--fpdfsdk/include/formfiller/FFL_TextField.h14
-rw-r--r--fpdfsdk/include/formfiller/FFL_Utils.h2
-rw-r--r--fpdfsdk/include/fsdk_actionhandler.h48
-rw-r--r--fpdfsdk/include/fsdk_annothandler.h100
-rw-r--r--fpdfsdk/include/fsdk_baseannot.h28
-rw-r--r--fpdfsdk/include/fsdk_baseform.h106
-rw-r--r--fpdfsdk/include/fsdk_define.h4
-rw-r--r--fpdfsdk/include/fsdk_mgr.h88
-rw-r--r--fpdfsdk/include/fsdk_rendercontext.h2
-rw-r--r--fpdfsdk/include/fx_systemhandler.h18
-rw-r--r--fpdfsdk/include/fxedit/fx_edit.h164
-rw-r--r--fpdfsdk/include/fxedit/fxet_edit.h224
-rw-r--r--fpdfsdk/include/fxedit/fxet_list.h64
-rw-r--r--fpdfsdk/include/javascript/Document.h162
-rw-r--r--fpdfsdk/include/javascript/Field.h172
-rw-r--r--fpdfsdk/include/javascript/IJavaScript.h58
-rw-r--r--fpdfsdk/include/javascript/Icon.h2
-rw-r--r--fpdfsdk/include/javascript/JS_Context.h62
-rw-r--r--fpdfsdk/include/javascript/JS_Define.h10
-rw-r--r--fpdfsdk/include/javascript/JS_EventHandler.h80
-rw-r--r--fpdfsdk/include/javascript/JS_GlobalData.h6
-rw-r--r--fpdfsdk/include/javascript/JS_Object.h14
-rw-r--r--fpdfsdk/include/javascript/JS_Runtime.h12
-rw-r--r--fpdfsdk/include/javascript/JS_Value.h18
-rw-r--r--fpdfsdk/include/javascript/PublicMethods.h68
-rw-r--r--fpdfsdk/include/javascript/app.h70
-rw-r--r--fpdfsdk/include/javascript/color.h28
-rw-r--r--fpdfsdk/include/javascript/console.h8
-rw-r--r--fpdfsdk/include/javascript/event.h40
-rw-r--r--fpdfsdk/include/javascript/global.h18
-rw-r--r--fpdfsdk/include/javascript/report.h4
-rw-r--r--fpdfsdk/include/javascript/util.h10
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Button.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Caret.h10
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ComboBox.h22
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Edit.h52
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_EditCtrl.h30
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_FontMap.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Icon.h4
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_IconList.h28
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListBox.h26
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListCtrl.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Note.h64
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ScrollBar.h26
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Signature.h12
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_SpecialButton.h20
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Utils.h14
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Wnd.h82
56 files changed, 1152 insertions, 1152 deletions
diff --git a/fpdfsdk/include/formfiller/FFL_CheckBox.h b/fpdfsdk/include/formfiller/FFL_CheckBox.h
index 3deeae8aa7..6880977094 100644
--- a/fpdfsdk/include/formfiller/FFL_CheckBox.h
+++ b/fpdfsdk/include/formfiller/FFL_CheckBox.h
@@ -17,11 +17,11 @@ public:
virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView* pPageView);
- virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags);
- virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
- virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags);
+ virtual bool OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
+ virtual bool OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView);
+ virtual bool IsDataChanged(CPDFSDK_PageView* pPageView);
virtual void SaveData(CPDFSDK_PageView* pPageView);
};
diff --git a/fpdfsdk/include/formfiller/FFL_ComboBox.h b/fpdfsdk/include/formfiller/FFL_ComboBox.h
index e5c65c2715..957fda425f 100644
--- a/fpdfsdk/include/formfiller/FFL_ComboBox.h
+++ b/fpdfsdk/include/formfiller/FFL_ComboBox.h
@@ -31,19 +31,19 @@ public:
virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView* pPageView);
- virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
+ virtual bool OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
- virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView);
+ virtual bool IsDataChanged(CPDFSDK_PageView* pPageView);
virtual void SaveData(CPDFSDK_PageView* pPageView);
virtual void GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, PDFSDK_FieldAction& fa);
virtual void SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, const PDFSDK_FieldAction& fa);
- virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld, const PDFSDK_FieldAction& faNew);
+ virtual bool IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld, const PDFSDK_FieldAction& faNew);
virtual void SaveState(CPDFSDK_PageView* pPageView);
virtual void RestoreState(CPDFSDK_PageView* pPageView);
- virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue);
- virtual void OnKeyStroke(FX_BOOL bKeyDown, FX_UINT nFlag);
+ virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestoreValue);
+ virtual void OnKeyStroke(bool bKeyDown, FX_UINT nFlag);
public:
virtual void OnSetFocus(CPWL_Wnd* pWnd);
@@ -53,9 +53,9 @@ public:
virtual void OnAddUndo(CPWL_Edit* pEdit);
public:
- virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument);
- virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument);
- virtual FX_BOOL CanPaste(CPDFSDK_Document* pDocument);
+ virtual bool CanCopy(CPDFSDK_Document* pDocument);
+ virtual bool CanCut(CPDFSDK_Document* pDocument);
+ virtual bool CanPaste(CPDFSDK_Document* pDocument);
private:
CFX_WideString GetSelectExportText();
diff --git a/fpdfsdk/include/formfiller/FFL_FormFiller.h b/fpdfsdk/include/formfiller/FFL_FormFiller.h
index fc858a8822..98995c1a58 100644
--- a/fpdfsdk/include/formfiller/FFL_FormFiller.h
+++ b/fpdfsdk/include/formfiller/FFL_FormFiller.h
@@ -39,23 +39,23 @@ public:
virtual void OnMouseEnter(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot);
virtual void OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot);
- virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, short zDelta, const CPDF_Point& point);
- virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, short zDelta, const CPDF_Point& point);
+ virtual bool OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags);
- virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
+ virtual bool OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags);
+ virtual bool OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
- virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
- virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
+ virtual bool OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
+ virtual bool OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
- virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument);
- virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument);
- virtual FX_BOOL CanPaste(CPDFSDK_Document* pDocument);
+ virtual bool CanCopy(CPDFSDK_Document* pDocument);
+ virtual bool CanCut(CPDFSDK_Document* pDocument);
+ virtual bool CanPaste(CPDFSDK_Document* pDocument);
virtual void DoCopy(CPDFSDK_Document* pDocument);
virtual void DoCut(CPDFSDK_Document* pDocument);
@@ -72,15 +72,15 @@ public:
PDFSDK_FieldAction& fa);
virtual void SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type,
const PDFSDK_FieldAction& fa);
- virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
+ virtual bool IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
const PDFSDK_FieldAction& faNew);
virtual void SaveState(CPDFSDK_PageView* pPageView);
virtual void RestoreState(CPDFSDK_PageView* pPageView);
- virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue);
+ virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestoreValue);
- virtual void OnKeyStroke(FX_BOOL bKeyDown);
+ virtual void OnKeyStroke(bool bKeyDown);
CPDF_Matrix GetCurMatrix();
@@ -95,19 +95,19 @@ public:
void SetWindowRect(CPDFSDK_PageView* pPageView, const CPDF_Rect& rcWindow);
CPDF_Rect GetWindowRect(CPDFSDK_PageView* pPageView);
- FX_BOOL CommitData(CPDFSDK_PageView* pPageView, FX_UINT nFlag);
- virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView);
+ bool CommitData(CPDFSDK_PageView* pPageView, FX_UINT nFlag);
+ virtual bool IsDataChanged(CPDFSDK_PageView* pPageView);
virtual void SaveData(CPDFSDK_PageView* pPageView);
- CPWL_Wnd* GetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bNew);
+ CPWL_Wnd* GetPDFWindow(CPDFSDK_PageView* pPageView, bool bNew);
void DestroyPDFWindow(CPDFSDK_PageView* pPageView);
- void EscapeFiller(CPDFSDK_PageView* pPageView, FX_BOOL bDestroyPDFWindow);
+ void EscapeFiller(CPDFSDK_PageView* pPageView, bool bDestroyPDFWindow);
virtual PWL_CREATEPARAM GetCreateParam();
virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView* pPageView) = 0;
virtual CPDF_Rect GetFocusBox(CPDFSDK_PageView* pPageView);
- FX_BOOL IsValid() const;
+ bool IsValid() const;
CPDF_Rect GetPDFWindowRect() const;
CPDFSDK_PageView* GetCurPageView();
@@ -124,7 +124,7 @@ protected:
CPDFSDK_Widget* m_pWidget;
CPDFSDK_Annot* m_pAnnot;
- FX_BOOL m_bValid;
+ bool m_bValid;
CFFL_PageView2PDFWindow m_Maps;
CPDF_Point m_ptOldPos;
};
@@ -137,9 +137,9 @@ public:
virtual void OnMouseEnter(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot);
virtual void OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot);
- virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
virtual void OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot,
CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
FX_DWORD dwFlags);
@@ -148,8 +148,8 @@ public:
CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
FX_DWORD dwFlags);
protected:
- FX_BOOL m_bMouseIn;
- FX_BOOL m_bMouseDown;
+ bool m_bMouseIn;
+ bool m_bMouseDown;
};
#endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_
diff --git a/fpdfsdk/include/formfiller/FFL_IFormFiller.h b/fpdfsdk/include/formfiller/FFL_IFormFiller.h
index e553723dc3..51b0279d0a 100644
--- a/fpdfsdk/include/formfiller/FFL_IFormFiller.h
+++ b/fpdfsdk/include/formfiller/FFL_IFormFiller.h
@@ -20,7 +20,7 @@ public:
CFFL_IFormFiller(CPDFDoc_Environment* pApp);
virtual ~CFFL_IFormFiller();
- virtual FX_BOOL Annot_HitTest(CPDFSDK_PageView* pPageView,CPDFSDK_Annot* pAnnot, CPDF_Point point);
+ virtual bool Annot_HitTest(CPDFSDK_PageView* pPageView,CPDFSDK_Annot* pAnnot, CPDF_Point point);
virtual FX_RECT GetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot);
virtual void OnDraw(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot,
CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
@@ -34,41 +34,41 @@ public:
virtual void OnMouseEnter(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
virtual void OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
- virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, short zDelta, const CPDF_Point& point);
- virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, short zDelta, const CPDF_Point& point);
+ virtual bool OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags);
- virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
+ virtual bool OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags);
+ virtual bool OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
- virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag);
- virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
+ virtual bool OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag);
+ virtual bool OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
virtual void QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, int32_t & nRet, FX_FLOAT & fPopupRet);
- virtual void OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode,
+ virtual void 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);
- virtual void OnAfterKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_BOOL & bExit, FX_DWORD nFlag) ;
+ bool bKeyDown, bool & bRC, bool & bExit, FX_DWORD nFlag);
+ virtual void OnAfterKeyStroke(bool bEditOrList, void* pPrivateData, bool & bExit, FX_DWORD nFlag) ;
- CFFL_FormFiller* GetFormFiller(CPDFSDK_Annot* pAnnot, FX_BOOL bRegister);
+ CFFL_FormFiller* GetFormFiller(CPDFSDK_Annot* pAnnot, bool bRegister);
void RemoveFormFiller(CPDFSDK_Annot* pAnnot);
- static FX_BOOL IsVisible(CPDFSDK_Widget* pWidget);
- static FX_BOOL IsReadOnly(CPDFSDK_Widget* pWidget);
- static FX_BOOL IsFillingAllowed(CPDFSDK_Widget* pWidget);
- static FX_BOOL IsValidAnnot(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot);
+ static bool IsVisible(CPDFSDK_Widget* pWidget);
+ static bool IsReadOnly(CPDFSDK_Widget* pWidget);
+ static bool IsFillingAllowed(CPDFSDK_Widget* pWidget);
+ static bool IsValidAnnot(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot);
- void OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bRC, FX_BOOL& bExit, FX_DWORD nFlag);
- void OnValidate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bRC, FX_BOOL& bExit, FX_DWORD nFlag);
+ void OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bRC, bool& bExit, FX_DWORD nFlag);
+ void OnValidate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bRC, bool& bExit, FX_DWORD nFlag);
- void OnCalculate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bExit, FX_DWORD nFlag);
- void OnFormat(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bExit, FX_DWORD nFlag);
- void OnButtonUp(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bReset, FX_BOOL& bExit,FX_UINT nFlag);
+ void OnCalculate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bExit, FX_DWORD nFlag);
+ void OnFormat(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bExit, FX_DWORD nFlag);
+ void OnButtonUp(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bReset, bool& bExit,FX_UINT nFlag);
private:
using CFFL_Widget2Filler = std::map<CPDFSDK_Annot*, CFFL_FormFiller*>;
@@ -77,7 +77,7 @@ private:
CPDFDoc_Environment* m_pApp;
CFFL_Widget2Filler m_Maps;
- FX_BOOL m_bNotifying;
+ bool m_bNotifying;
};
class CFFL_PrivateData
diff --git a/fpdfsdk/include/formfiller/FFL_ListBox.h b/fpdfsdk/include/formfiller/FFL_ListBox.h
index 4c0813f5c8..59e3d6c689 100644
--- a/fpdfsdk/include/formfiller/FFL_ListBox.h
+++ b/fpdfsdk/include/formfiller/FFL_ListBox.h
@@ -23,10 +23,10 @@ public:
virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp,
CPDFSDK_PageView* pPageView);
- virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar,
+ virtual bool OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar,
FX_UINT nFlags);
- virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView);
+ virtual bool IsDataChanged(CPDFSDK_PageView* pPageView);
virtual void SaveData(CPDFSDK_PageView* pPageView);
virtual void GetActionData(CPDFSDK_PageView* pPageView,
@@ -40,8 +40,8 @@ public:
virtual void RestoreState(CPDFSDK_PageView* pPageView);
virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView,
- FX_BOOL bRestoreValue);
- virtual void OnKeyStroke(FX_BOOL bKeyDown, FX_DWORD nFlag);
+ bool bRestoreValue);
+ virtual void OnKeyStroke(bool bKeyDown, FX_DWORD nFlag);
private:
CBA_FontMap* m_pFontMap;
diff --git a/fpdfsdk/include/formfiller/FFL_Notify.h b/fpdfsdk/include/formfiller/FFL_Notify.h
index 961d4b7a79..8a9c04c5df 100644
--- a/fpdfsdk/include/formfiller/FFL_Notify.h
+++ b/fpdfsdk/include/formfiller/FFL_Notify.h
@@ -20,35 +20,35 @@ public:
virtual ~CFFL_Notify();
public:
- FX_BOOL OnSetFocus(FX_BOOL & bExit);
- FX_BOOL OnMouseEnter(FX_BOOL & bExit);
- FX_BOOL OnMouseDown(FX_BOOL & bExit);
- FX_BOOL OnMouseUp(FX_BOOL & bExit);
- FX_BOOL OnMouseExit(FX_BOOL & bExit);
- FX_BOOL OnKillFocus(FX_BOOL & bExit);
-
- FX_BOOL OnCalculate();
- FX_BOOL OnFormat(int iCommitKey);
- FX_BOOL 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);
- FX_BOOL 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 OnSetFocus(bool & bExit);
+ bool OnMouseEnter(bool & bExit);
+ bool OnMouseDown(bool & bExit);
+ bool OnMouseUp(bool & bExit);
+ bool OnMouseExit(bool & bExit);
+ bool OnKillFocus(bool & bExit);
+
+ bool OnCalculate();
+ bool OnFormat(int iCommitKey);
+ bool OnValidate(CPDF_FormField* pFormField, CFX_WideString& strValue, CFX_WideString & strChange,
+ const CFX_WideString& strChangeEx, bool bKeyDown, bool bModifier,
+ bool bShift, bool & bRC);
+ bool 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);
void BeforeNotify();
void AfterNotify();
- FX_BOOL IsNotifying() const {return m_nNotifyFlag > 0;}
+ bool IsNotifying() const {return m_nNotifyFlag > 0;}
private:
- FX_BOOL DoAAction(CPDF_AAction::AActionType eAAT, FX_BOOL & bExit);
- FX_BOOL FindAAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action);
- FX_BOOL FindAAction(CPDF_AAction aaction,CPDF_AAction::AActionType eAAT,CPDF_Action & action);
- FX_BOOL ExecuteActionTree(CPDF_AAction::AActionType eAAT, CPDF_Action & action, FX_BOOL& bExit);
- FX_BOOL ExecuteAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action,FX_BOOL& bExit);
+ bool DoAAction(CPDF_AAction::AActionType eAAT, bool & bExit);
+ bool FindAAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action);
+ bool FindAAction(CPDF_AAction aaction,CPDF_AAction::AActionType eAAT,CPDF_Action & action);
+ bool ExecuteActionTree(CPDF_AAction::AActionType eAAT, CPDF_Action & action, bool& bExit);
+ bool ExecuteAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action,bool& bExit);
- FX_BOOL m_bDoActioning;
+ bool m_bDoActioning;
int32_t m_nNotifyFlag;
};
diff --git a/fpdfsdk/include/formfiller/FFL_PushButton.h b/fpdfsdk/include/formfiller/FFL_PushButton.h
index 3cfaefb9bd..26de7a1b23 100644
--- a/fpdfsdk/include/formfiller/FFL_PushButton.h
+++ b/fpdfsdk/include/formfiller/FFL_PushButton.h
@@ -17,7 +17,7 @@ public:
virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView* pPageView);
- virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
+ virtual bool OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
virtual void OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot,
CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
FX_DWORD dwFlags);
diff --git a/fpdfsdk/include/formfiller/FFL_RadioButton.h b/fpdfsdk/include/formfiller/FFL_RadioButton.h
index 46332e07fd..e858533c6b 100644
--- a/fpdfsdk/include/formfiller/FFL_RadioButton.h
+++ b/fpdfsdk/include/formfiller/FFL_RadioButton.h
@@ -16,10 +16,10 @@ public:
virtual ~CFFL_RadioButton();
virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView* pPageView);
- virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags);
- virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
- virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
- virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView);
+ virtual bool OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags);
+ virtual bool OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
+ virtual bool OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
+ virtual bool IsDataChanged(CPDFSDK_PageView* pPageView);
virtual void SaveData(CPDFSDK_PageView* pPageView);
};
diff --git a/fpdfsdk/include/formfiller/FFL_TextField.h b/fpdfsdk/include/formfiller/FFL_TextField.h
index 10bd5c0e43..105b90cba9 100644
--- a/fpdfsdk/include/formfiller/FFL_TextField.h
+++ b/fpdfsdk/include/formfiller/FFL_TextField.h
@@ -32,21 +32,21 @@ public:
virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView* pPageView);
- virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
+ virtual bool OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
- virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView);
+ virtual bool IsDataChanged(CPDFSDK_PageView* pPageView);
virtual void SaveData(CPDFSDK_PageView* pPageView);
virtual void GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type,
PDFSDK_FieldAction& fa);
virtual void SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type,
const PDFSDK_FieldAction& fa);
- virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
+ virtual bool IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
const PDFSDK_FieldAction& faNew);
virtual void SaveState(CPDFSDK_PageView* pPageView);
virtual void RestoreState(CPDFSDK_PageView* pPageView);
- virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue);
+ virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestoreValue);
public:
virtual void OnSetFocus(CPWL_Wnd* pWnd);
@@ -56,9 +56,9 @@ public:
virtual void OnAddUndo(CPWL_Edit* pEdit);
public:
- virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument);
- virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument);
- virtual FX_BOOL CanPaste(CPDFSDK_Document* pDocument);
+ virtual bool CanCopy(CPDFSDK_Document* pDocument);
+ virtual bool CanCut(CPDFSDK_Document* pDocument);
+ virtual bool CanPaste(CPDFSDK_Document* pDocument);
private:
CBA_FontMap* m_pFontMap;
diff --git a/fpdfsdk/include/formfiller/FFL_Utils.h b/fpdfsdk/include/formfiller/FFL_Utils.h
index fe025eca4b..8dfc64eab0 100644
--- a/fpdfsdk/include/formfiller/FFL_Utils.h
+++ b/fpdfsdk/include/formfiller/FFL_Utils.h
@@ -17,7 +17,7 @@ public:
const FX_FLOAT& fSize);
static CPDF_Rect DeflateRect(const CPDF_Rect& crRect,
const FX_FLOAT& fSize);
- static FX_BOOL TraceObject(CPDF_Object* pObj);
+ static bool TraceObject(CPDF_Object* pObj);
};
#endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_UTILS_H_
diff --git a/fpdfsdk/include/fsdk_actionhandler.h b/fpdfsdk/include/fsdk_actionhandler.h
index 39ec4f41af..7c41a1d0dd 100644
--- a/fpdfsdk/include/fsdk_actionhandler.h
+++ b/fpdfsdk/include/fsdk_actionhandler.h
@@ -23,18 +23,18 @@ class IFXJS_Runtime;
class CPDFSDK_FormActionHandler
{
public:
- FX_BOOL DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument);
- FX_BOOL DoAction_SubmitForm(const CPDF_Action& action, CPDFSDK_Document* pDocument);
- FX_BOOL DoAction_ResetForm(const CPDF_Action& action, CPDFSDK_Document* pDocument);
- FX_BOOL DoAction_ImportData(const CPDF_Action& action, CPDFSDK_Document* pDocument);
+ bool DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument);
+ bool DoAction_SubmitForm(const CPDF_Action& action, CPDFSDK_Document* pDocument);
+ bool DoAction_ResetForm(const CPDF_Action& action, CPDFSDK_Document* pDocument);
+ bool DoAction_ImportData(const CPDF_Action& action, CPDFSDK_Document* pDocument);
};
class CPDFSDK_MediaActionHandler
{
public:
- FX_BOOL DoAction_Rendition(const CPDF_Action& action, CPDFSDK_Document* pDocument);
- FX_BOOL DoAction_Sound(const CPDF_Action& action, CPDFSDK_Document* pDocument);
- FX_BOOL DoAction_Movie(const CPDF_Action& action, CPDFSDK_Document* pDocument);
+ bool DoAction_Rendition(const CPDF_Action& action, CPDFSDK_Document* pDocument);
+ bool DoAction_Sound(const CPDF_Action& action, CPDFSDK_Document* pDocument);
+ bool DoAction_Movie(const CPDF_Action& action, CPDFSDK_Document* pDocument);
};
class CPDFSDK_ActionHandler
@@ -44,31 +44,31 @@ public:
void SetMediaActionHandler(CPDFSDK_MediaActionHandler* pHandler);
- FX_BOOL DoAction_DocOpen(const CPDF_Action& action, CPDFSDK_Document* pDocument);
- FX_BOOL DoAction_JavaScript(const CPDF_Action& JsAction,CFX_WideString csJSName, CPDFSDK_Document* pDocument);
- FX_BOOL DoAction_Page(const CPDF_Action& action, enum CPDF_AAction::AActionType eType, CPDFSDK_Document* pDocument);
- FX_BOOL DoAction_Document(const CPDF_Action& action, enum CPDF_AAction::AActionType eType, CPDFSDK_Document* pDocument);
- FX_BOOL DoAction_BookMark(CPDF_Bookmark *pBookMark, const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument);
- FX_BOOL DoAction_Screen(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDFSDK_Annot* pScreen);
- FX_BOOL DoAction_Link(const CPDF_Action& action, CPDFSDK_Document* pDocument);
- FX_BOOL DoAction_Field(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, PDFSDK_FieldAction& data);
- FX_BOOL DoAction_FieldJavaScript(const CPDF_Action& JsAction, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, PDFSDK_FieldAction& data);
+ bool DoAction_DocOpen(const CPDF_Action& action, CPDFSDK_Document* pDocument);
+ bool DoAction_JavaScript(const CPDF_Action& JsAction,CFX_WideString csJSName, CPDFSDK_Document* pDocument);
+ bool DoAction_Page(const CPDF_Action& action, enum CPDF_AAction::AActionType eType, CPDFSDK_Document* pDocument);
+ bool DoAction_Document(const CPDF_Action& action, enum CPDF_AAction::AActionType eType, CPDFSDK_Document* pDocument);
+ bool DoAction_BookMark(CPDF_Bookmark *pBookMark, const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument);
+ bool DoAction_Screen(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDFSDK_Annot* pScreen);
+ bool DoAction_Link(const CPDF_Action& action, CPDFSDK_Document* pDocument);
+ bool DoAction_Field(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, PDFSDK_FieldAction& data);
+ bool DoAction_FieldJavaScript(const CPDF_Action& JsAction, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, PDFSDK_FieldAction& data);
private:
- FX_BOOL ExecuteDocumentOpenAction(const CPDF_Action& action, CPDFSDK_Document* pDocument, CFX_PtrList& list);
- FX_BOOL ExecuteDocumentPageAction(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CFX_PtrList& list);
- FX_BOOL ExecuteFieldAction(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, PDFSDK_FieldAction& data, CFX_PtrList& list);
- FX_BOOL ExecuteScreenAction(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDFSDK_Annot* pScreen, CFX_PtrList& list);
- FX_BOOL ExecuteBookMark(const CPDF_Action& action, CPDFSDK_Document* pDocument, CPDF_Bookmark* pBookmark, CFX_PtrList& list);
- FX_BOOL ExecuteLinkAction(const CPDF_Action& action, CPDFSDK_Document* pDocument, CFX_PtrList& list);
+ bool ExecuteDocumentOpenAction(const CPDF_Action& action, CPDFSDK_Document* pDocument, CFX_PtrList& list);
+ bool ExecuteDocumentPageAction(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CFX_PtrList& list);
+ bool ExecuteFieldAction(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, PDFSDK_FieldAction& data, CFX_PtrList& list);
+ bool ExecuteScreenAction(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDFSDK_Annot* pScreen, CFX_PtrList& list);
+ bool ExecuteBookMark(const CPDF_Action& action, CPDFSDK_Document* pDocument, CPDF_Bookmark* pBookmark, CFX_PtrList& list);
+ bool ExecuteLinkAction(const CPDF_Action& action, CPDFSDK_Document* pDocument, CFX_PtrList& list);
void DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Document* pDocument);
void RunDocumentPageJavaScript(CPDFSDK_Document* pDocument, CPDF_AAction::AActionType type, const CFX_WideString& script);
void RunDocumentOpenJavaScript(CPDFSDK_Document* pDocument, const CFX_WideString& sScriptName, const CFX_WideString& script);
void RunFieldJavaScript(CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, CPDF_AAction::AActionType type, PDFSDK_FieldAction& data, const CFX_WideString& script);
- FX_BOOL IsValidField(CPDFSDK_Document* pDocument, CPDF_Dictionary* pFieldDict);
- FX_BOOL IsValidDocView(CPDFSDK_Document* pDocument);
+ bool IsValidField(CPDFSDK_Document* pDocument, CPDF_Dictionary* pFieldDict);
+ bool IsValidDocView(CPDFSDK_Document* pDocument);
void DoAction_GoTo(CPDFSDK_Document* pDocument, const CPDF_Action& action);
void DoAction_GoToR(CPDFSDK_Document* pDocument, const CPDF_Action& action);
diff --git a/fpdfsdk/include/fsdk_annothandler.h b/fpdfsdk/include/fsdk_annothandler.h
index b4705699c8..6f3bee5038 100644
--- a/fpdfsdk/include/fsdk_annothandler.h
+++ b/fpdfsdk/include/fsdk_annothandler.h
@@ -29,7 +29,7 @@ public:
virtual CFX_ByteString GetName() = 0;
- virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) = 0;
+ virtual bool CanAnswer(CPDFSDK_Annot* pAnnot) = 0;
virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) = 0;
@@ -41,7 +41,7 @@ public:
virtual CPDF_Rect GetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot) = 0;
- virtual FX_BOOL HitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point) = 0;
+ virtual bool HitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point) = 0;
virtual void OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot,
@@ -68,24 +68,24 @@ public:
virtual void OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0;
- virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
- virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
- virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
- virtual FX_BOOL OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
- virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, short zDelta, const CPDF_Point& point) = 0;
- virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
- virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
- virtual FX_BOOL OnRButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
+ virtual bool OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
+ virtual bool OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
+ virtual bool OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
+ virtual bool OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
+ virtual bool OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, short zDelta, const CPDF_Point& point) = 0;
+ virtual bool OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
+ virtual bool OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
+ virtual bool OnRButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0;
//by wjm.
- virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DWORD nFlags) = 0;
- virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) = 0;
- virtual FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) =0 ;
+ virtual bool OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DWORD nFlags) = 0;
+ virtual bool OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) = 0;
+ virtual bool OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) =0 ;
virtual void OnDeSelected(CPDFSDK_Annot* pAnnot) = 0;
virtual void OnSelected(CPDFSDK_Annot* pAnnot) = 0;
- virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0;
- virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0;
+ virtual bool OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0;
+ virtual bool OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0;
};
@@ -101,7 +101,7 @@ public:
virtual CFX_ByteString GetName() {return CFX_ByteString("WidgetHandler");}
- virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot);
+ virtual bool CanAnswer(CPDFSDK_Annot* pAnnot);
virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage);
@@ -112,7 +112,7 @@ public:
virtual CPDF_Rect GetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot) ;
- virtual FX_BOOL HitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point);
+ virtual bool HitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point);
virtual void OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot,
@@ -137,25 +137,25 @@ public:
virtual void OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) ;
- virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ;
- virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ;
- virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ;
- virtual FX_BOOL OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ;
- virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, short zDelta, const CPDF_Point& point) ;
- virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ;
- virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ;
- virtual FX_BOOL OnRButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) {return FALSE;}
+ virtual bool OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ;
+ virtual bool OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ;
+ virtual bool OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ;
+ virtual bool OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ;
+ virtual bool OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, short zDelta, const CPDF_Point& point) ;
+ virtual bool OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ;
+ virtual bool OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ;
+ virtual bool OnRButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) {return false;}
//by wjm.
- virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DWORD nFlags);
- virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag);
- virtual FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag);
+ virtual bool OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DWORD nFlags);
+ virtual bool OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag);
+ virtual bool OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag);
virtual void OnDeSelected(CPDFSDK_Annot* pAnnot) {}
virtual void OnSelected(CPDFSDK_Annot* pAnnot) {}
- virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
- virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
+ virtual bool OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
+ virtual bool OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
void SetFormFiller(CFFL_IFormFiller* pFiller){m_pFormFiller = pFiller;}
CFFL_IFormFiller* GetFormFiller() {return m_pFormFiller;}
@@ -190,29 +190,29 @@ public:
virtual void Annot_OnMouseEnter(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags);
virtual void Annot_OnMouseExit(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags);
- virtual FX_BOOL Annot_OnLButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point);
- virtual FX_BOOL Annot_OnLButtonUp(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point);
- virtual FX_BOOL Annot_OnLButtonDblClk(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point);
+ virtual bool Annot_OnLButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point);
+ virtual bool Annot_OnLButtonUp(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point);
+ virtual bool Annot_OnLButtonDblClk(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point);
- virtual FX_BOOL Annot_OnMouseMove(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point);
- virtual FX_BOOL Annot_OnMouseWheel(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, short zDelta, const CPDF_Point& point);
- virtual FX_BOOL Annot_OnRButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point);
- virtual FX_BOOL Annot_OnRButtonUp(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point);
+ virtual bool Annot_OnMouseMove(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point);
+ virtual bool Annot_OnMouseWheel(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, short zDelta, const CPDF_Point& point);
+ virtual bool Annot_OnRButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point);
+ virtual bool Annot_OnRButtonUp(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point);
- virtual FX_BOOL Annot_OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DWORD nFlags);
- virtual FX_BOOL Annot_OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag);
- virtual FX_BOOL Annot_OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag);
+ virtual bool Annot_OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DWORD nFlags);
+ virtual bool Annot_OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag);
+ virtual bool Annot_OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag);
- virtual FX_BOOL Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
- virtual FX_BOOL Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
+ virtual bool Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
+ virtual bool Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
virtual CPDF_Rect Annot_OnGetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot);
- virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point);
+ virtual bool Annot_OnHitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point);
private:
IPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const;
- CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot,FX_BOOL bNext);
+ CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot,bool bNext);
private:
CBA_AnnotHandlerArray m_Handlers;
CFX_MapByteStringToPtr m_mapType2Handler;
@@ -224,8 +224,8 @@ typedef int (*AI_COMPARE) (CPDFSDK_Annot* p1, CPDFSDK_Annot* p2);
class CPDFSDK_AnnotIterator
{
public:
- CPDFSDK_AnnotIterator(CPDFSDK_PageView * pPageView, FX_BOOL bReverse,
- FX_BOOL bIgnoreTopmost=FALSE,FX_BOOL bCircle=FALSE,CFX_PtrArray* pList=NULL);
+ CPDFSDK_AnnotIterator(CPDFSDK_PageView * pPageView, bool bReverse,
+ bool bIgnoreTopmost=false,bool bCircle=false,CFX_PtrArray* pList=NULL);
virtual ~CPDFSDK_AnnotIterator() { }
virtual CPDFSDK_Annot* Next (const CPDFSDK_Annot* pCurrent) ;
@@ -234,7 +234,7 @@ public:
virtual CPDFSDK_Annot* Prev(int& index ) ;
virtual int Count(){return m_pIteratorAnnotList.GetSize();}
- virtual FX_BOOL InitIteratorAnnotList(CPDFSDK_PageView * pPageView,CFX_PtrArray* pList=NULL);
+ virtual bool InitIteratorAnnotList(CPDFSDK_PageView * pPageView,CFX_PtrArray* pList=NULL);
void InsertSort(CFX_PtrArray &arrayList, AI_COMPARE pCompare);
@@ -245,9 +245,9 @@ protected:
CPDFSDK_Annot* PrevAnnot(int& index ) ;
CFX_PtrArray m_pIteratorAnnotList;
- FX_BOOL m_bReverse;
- FX_BOOL m_bIgnoreTopmost;
- FX_BOOL m_bCircle;
+ bool m_bReverse;
+ bool m_bIgnoreTopmost;
+ bool m_bCircle;
};
#endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_
diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h
index dcd295de9f..b9f1fcd4b1 100644
--- a/fpdfsdk/include/fsdk_baseannot.h
+++ b/fpdfsdk/include/fsdk_baseannot.h
@@ -38,12 +38,12 @@ public:
CPDFSDK_DateTime& operator = (const CPDFSDK_DateTime& datetime);
CPDFSDK_DateTime& operator = (const FX_SYSTEMTIME& st);
- FX_BOOL operator == (CPDFSDK_DateTime& datetime);
- FX_BOOL operator != (CPDFSDK_DateTime& datetime);
- FX_BOOL operator > (CPDFSDK_DateTime& datetime);
- FX_BOOL operator >= (CPDFSDK_DateTime& datetime);
- FX_BOOL operator < (CPDFSDK_DateTime& datetime);
- FX_BOOL operator <= (CPDFSDK_DateTime& datetime);
+ bool operator == (CPDFSDK_DateTime& datetime);
+ bool operator != (CPDFSDK_DateTime& datetime);
+ bool operator > (CPDFSDK_DateTime& datetime);
+ bool operator >= (CPDFSDK_DateTime& datetime);
+ bool operator < (CPDFSDK_DateTime& datetime);
+ bool operator <= (CPDFSDK_DateTime& datetime);
operator time_t();
CPDFSDK_DateTime& FromPDFDateTimeString(const CFX_ByteString& dtStr);
@@ -92,8 +92,8 @@ public:
void SetTabOrder(int iTabOrder);
// Selection
- FX_BOOL IsSelected();
- void SetSelected(FX_BOOL bSelected);
+ bool IsSelected();
+ void SetSelected(bool bSelected);
CFX_ByteString GetType() const;
virtual CFX_ByteString GetSubType() const;
@@ -146,9 +146,9 @@ public:
void SetColor(FX_COLORREF color);
void RemoveColor();
- FX_BOOL GetColor(FX_COLORREF& color) const;
+ bool GetColor(FX_COLORREF& color) const;
- FX_BOOL IsVisible() const;
+ bool IsVisible() const;
//action
CPDF_Action GetAction() const;
@@ -162,8 +162,8 @@ public:
virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT);
public:
- FX_BOOL IsAppearanceValid();
- FX_BOOL IsAppearanceValid(CPDF_Annot::AppearanceMode mode);
+ bool IsAppearanceValid();
+ bool IsAppearanceValid(CPDF_Annot::AppearanceMode mode);
void DrawAppearance(CFX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device,
CPDF_Annot::AppearanceMode mode, const CPDF_RenderOptions* pOptions);
void DrawBorder(CFX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device,
@@ -181,11 +181,11 @@ public:
private:
- FX_BOOL CreateFormFiller();
+ bool CreateFormFiller();
protected:
CPDF_Annot* m_pAnnot;
CPDFSDK_PageView* m_pPageView;
- FX_BOOL m_bSelected;
+ bool m_bSelected;
int m_nTabOrder;
};
diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h
index edbd5e4efc..6b974c5535 100644
--- a/fpdfsdk/include/fsdk_baseform.h
+++ b/fpdfsdk/include/fsdk_baseform.h
@@ -35,28 +35,28 @@ typedef struct _PDFSDK_FieldAction
{
_PDFSDK_FieldAction()
{
- bModifier = FALSE;
- bShift = FALSE;
+ bModifier = false;
+ bShift = false;
nCommitKey = 0;
- bKeyDown = FALSE;
+ bKeyDown = false;
nSelEnd = nSelStart = 0;
- bWillCommit = FALSE;
- bFieldFull = FALSE;
- bRC = TRUE;
+ bWillCommit = false;
+ bFieldFull = false;
+ bRC = true;
}
- FX_BOOL bModifier; //in
- FX_BOOL bShift; //in
+ bool bModifier; //in
+ bool bShift; //in
int nCommitKey; //in
CFX_WideString sChange; //in[out]
CFX_WideString sChangeEx; //in
- FX_BOOL bKeyDown; //in
+ bool bKeyDown; //in
int nSelEnd; //in[out]
int nSelStart; //in[out]
CFX_WideString sValue; //in[out]
- FX_BOOL bWillCommit; //in
- FX_BOOL bFieldFull; //in
- FX_BOOL bRC; //in[out]
+ bool bWillCommit; //in
+ bool bFieldFull; //in
+ bool bRC; //in[out]
}PDFSDK_FieldAction;
class CPDFSDK_Widget : public CPDFSDK_Annot
{
@@ -80,9 +80,9 @@ public:
int GetFieldFlags() const;
int GetRotate() const;
- FX_BOOL GetFillColor(FX_COLORREF& color) const;
- FX_BOOL GetBorderColor(FX_COLORREF& color) const;
- FX_BOOL GetTextColor(FX_COLORREF& color) const;
+ bool GetFillColor(FX_COLORREF& color) const;
+ bool GetBorderColor(FX_COLORREF& color) const;
+ bool GetTextColor(FX_COLORREF& color) const;
FX_FLOAT GetFontSize() const;
int GetSelectedIndex(int nIndex) const;
@@ -90,9 +90,9 @@ public:
CFX_WideString GetDefaultValue() const;
CFX_WideString GetOptionLabel(int nIndex) const;
int CountOptions() const;
- FX_BOOL IsOptionSelected(int nIndex) const;
+ bool IsOptionSelected(int nIndex) const;
int GetTopVisibleIndex() const;
- FX_BOOL IsChecked() const;
+ bool IsChecked() const;
/*
BF_ALIGN_LEFT
BF_ALIGN_MIDDL
@@ -103,20 +103,20 @@ public:
CFX_WideString GetAlternateName() const;
//Set Properties.
- void SetCheck(FX_BOOL bChecked, FX_BOOL bNotify);
- void SetValue(const CFX_WideString& sValue, FX_BOOL bNotify);
+ void SetCheck(bool bChecked, bool bNotify);
+ void SetValue(const CFX_WideString& sValue, bool bNotify);
void SetDefaultValue(const CFX_WideString& sValue);
- void SetOptionSelection(int index, FX_BOOL bSelected, FX_BOOL bNotify);
- void ClearSelection(FX_BOOL bNotify);
+ void SetOptionSelection(int index, bool bSelected, bool bNotify);
+ void ClearSelection(bool bNotify);
void SetTopVisibleIndex(int index);
- void ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged);
- void ResetFieldAppearance(FX_BOOL bValueChanged);
+ void ResetAppearance(const FX_WCHAR* sValue, bool bValueChanged);
+ void ResetFieldAppearance(bool bValueChanged);
void UpdateField();
- CFX_WideString OnFormat(FX_BOOL& bFormated);
+ CFX_WideString OnFormat(bool& bFormated);
//Message.
- FX_BOOL OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldAction& data,
+ bool OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldAction& data,
CPDFSDK_PageView* pPageView);
CPDFSDK_InterForm* GetInterForm() const {return m_pInterForm;}
@@ -128,7 +128,7 @@ public:
void SetAppModified();
void ClearAppModified();
- FX_BOOL IsAppModified() const;
+ bool IsAppModified() const;
int32_t GetAppearanceAge() const;
int32_t GetValueAge() const;
@@ -155,14 +155,14 @@ private:
void AddImageToAppearance(const CFX_ByteString& sAPType, CPDF_Stream* pImage);
void RemoveAppearance(const CFX_ByteString& sAPType);
public:
- FX_BOOL IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode);
+ bool IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode);
void DrawAppearance(CFX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device,
CPDF_Annot::AppearanceMode mode, const CPDF_RenderOptions* pOptions);
public:
- FX_BOOL HitTest(FX_FLOAT pageX, FX_FLOAT pageY);
+ bool HitTest(FX_FLOAT pageX, FX_FLOAT pageY);
private:
CPDFSDK_InterForm* m_pInterForm;
- FX_BOOL m_bAppModified;
+ bool m_bAppModified;
int32_t m_nAppAge;
int32_t m_nValueAge;
};
@@ -176,9 +176,9 @@ public:
CPDF_InterForm* GetInterForm() const { return m_pInterForm; }
CPDFSDK_Document* GetDocument() const { return m_pDocument; }
- FX_BOOL HighlightWidgets();
+ bool HighlightWidgets();
- CPDFSDK_Widget* GetSibling(CPDFSDK_Widget* pWidget, FX_BOOL bNext) const;
+ CPDFSDK_Widget* GetSibling(CPDFSDK_Widget* pWidget, bool bNext) const;
CPDFSDK_Widget* GetWidget(CPDF_FormControl* pControl) const;
void GetWidgets(const CFX_WideString& sFieldName, CFX_PtrArray& widgets);
void GetWidgets(CPDF_FormField* pField, CFX_PtrArray& widgets);
@@ -186,33 +186,33 @@ public:
void AddMap(CPDF_FormControl* pControl, CPDFSDK_Widget* pWidget);
void RemoveMap(CPDF_FormControl* pControl);
- void EnableCalculate(FX_BOOL bEnabled);
- FX_BOOL IsCalculateEnabled() const;
+ void EnableCalculate(bool bEnabled);
+ bool IsCalculateEnabled() const;
#ifdef _WIN32
CPDF_Stream* LoadImageFromFile(const CFX_WideString& sFile);
#endif
- void OnKeyStrokeCommit(CPDF_FormField* pFormField, CFX_WideString& csValue, FX_BOOL& bRC);
- void OnValidate(CPDF_FormField* pFormField, CFX_WideString& csValue, FX_BOOL& bRC);
+ void OnKeyStrokeCommit(CPDF_FormField* pFormField, CFX_WideString& csValue, bool& bRC);
+ void OnValidate(CPDF_FormField* pFormField, CFX_WideString& csValue, bool& bRC);
void OnCalculate(CPDF_FormField* pFormField = NULL);
- CFX_WideString OnFormat(CPDF_FormField* pFormField, FX_BOOL& bFormated);
+ CFX_WideString OnFormat(CPDF_FormField* pFormField, bool& bFormated);
- void ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, FX_BOOL bValueChanged);
+ void ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, bool bValueChanged);
void UpdateField(CPDF_FormField* pFormField);
- FX_BOOL DoAction_Hide(const CPDF_Action& action);
- FX_BOOL DoAction_SubmitForm(const CPDF_Action& action);
- FX_BOOL DoAction_ResetForm(const CPDF_Action& action);
- FX_BOOL DoAction_ImportData(const CPDF_Action& action);
+ bool DoAction_Hide(const CPDF_Action& action);
+ bool DoAction_SubmitForm(const CPDF_Action& action);
+ bool DoAction_ResetForm(const CPDF_Action& action);
+ bool DoAction_ImportData(const CPDF_Action& action);
void GetFieldFromObjects(const CFX_PtrArray& objects, CFX_PtrArray& fields);
- FX_BOOL IsValidField(CPDF_Dictionary* pFieldDict);
- FX_BOOL SubmitFields(const CFX_WideString& csDestination, const CFX_PtrArray& fields,
- FX_BOOL bIncludeOrExclude, FX_BOOL bUrlEncoded);
- FX_BOOL SubmitForm(const CFX_WideString& sDestination, FX_BOOL bUrlEncoded);
- FX_BOOL ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf);
- FX_BOOL ExportFieldsToFDFTextBuf(const CFX_PtrArray& fields,FX_BOOL bIncludeOrExclude, CFX_ByteTextBuf& textBuf);
+ bool IsValidField(CPDF_Dictionary* pFieldDict);
+ bool SubmitFields(const CFX_WideString& csDestination, const CFX_PtrArray& fields,
+ bool bIncludeOrExclude, bool bUrlEncoded);
+ bool SubmitForm(const CFX_WideString& sDestination, bool bUrlEncoded);
+ bool ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf);
+ bool ExportFieldsToFDFTextBuf(const CFX_PtrArray& fields,bool bIncludeOrExclude, CFX_ByteTextBuf& textBuf);
CFX_WideString GetTemporaryFileName(const CFX_WideString& sFileExt);
private:
@@ -226,8 +226,8 @@ private:
virtual int BeforeFormImportData(const CPDF_InterForm* pForm);
virtual int AfterFormImportData(const CPDF_InterForm* pForm);
- FX_BOOL FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_WideString csTxtFile);
- FX_BOOL FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize);
+ bool FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_WideString csTxtFile);
+ bool FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize);
int GetPageIndexByAnnotDict(CPDF_Document* pDocument, CPDF_Dictionary* pAnnotDict) const;
void DoFDFBuffer(CFX_ByteString sBuffer);
@@ -236,11 +236,11 @@ private:
CPDFSDK_Document* m_pDocument;
CPDF_InterForm* m_pInterForm;
CPDFSDK_WidgetMap m_Map;
- FX_BOOL m_bCalculate;
- FX_BOOL m_bBusy;
+ bool m_bCalculate;
+ bool m_bBusy;
public:
- FX_BOOL IsNeedHighLight(int nFieldType);
+ bool IsNeedHighLight(int nFieldType);
void RemoveAllHighLight();
void SetHighlightAlpha(uint8_t alpha) {m_iHighlightAlpha = alpha;}
uint8_t GetHighlightAlpha() {return m_iHighlightAlpha;}
@@ -249,7 +249,7 @@ public:
private:
FX_COLORREF m_aHighlightColor[6];
uint8_t m_iHighlightAlpha;
- FX_BOOL m_bNeedHightlight[6];
+ bool m_bNeedHightlight[6];
};
#define BAI_STRUCTURE 0
diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h
index 29b265a428..41607929b4 100644
--- a/fpdfsdk/include/fsdk_define.h
+++ b/fpdfsdk/include/fsdk_define.h
@@ -49,7 +49,7 @@ public:
virtual void Release() override { delete this; }
- virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
+ virtual bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
private:
FPDF_FILEACCESS m_FileAccess;
@@ -60,7 +60,7 @@ void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable);
FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy);
void FPDF_RenderPage_Retail(CRenderContext* pContext, FPDF_PAGE page,
int start_x, int start_y, int size_x, int size_y,
- int rotate, int flags, FX_BOOL bNeedToRestore,
+ int rotate, int flags, bool bNeedToRestore,
IFSDK_PAUSE_Adapter* pause);
#endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index d57138b350..1ce57c5687 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -92,24 +92,24 @@ public:
m_pInfo->FFI_OnChange(m_pInfo);
}
- FX_BOOL FFI_IsSHIFTKeyDown(FX_DWORD nFlag) const
+ bool FFI_IsSHIFTKeyDown(FX_DWORD nFlag) const
{
return (nFlag & FWL_EVENTFLAG_ShiftKey) != 0;
}
- FX_BOOL FFI_IsCTRLKeyDown(FX_DWORD nFlag) const
+ bool FFI_IsCTRLKeyDown(FX_DWORD nFlag) const
{
return (nFlag & FWL_EVENTFLAG_ControlKey) != 0;
}
- FX_BOOL FFI_IsALTKeyDown(FX_DWORD nFlag) const
+ bool FFI_IsALTKeyDown(FX_DWORD nFlag) const
{
return (nFlag & FWL_EVENTFLAG_AltKey) != 0;
}
- FX_BOOL FFI_IsINSERTKeyDown(FX_DWORD nFlag) const
+ bool FFI_IsINSERTKeyDown(FX_DWORD nFlag) const
{
- return FALSE;
+ return false;
}
int JS_appAlert(const FX_WCHAR* Msg, const FX_WCHAR* Title, FX_UINT Type, FX_UINT Icon);
@@ -174,7 +174,7 @@ public:
m_pInfo->FFI_ExecuteNamedAction(m_pInfo, namedAction);
}
- void FFI_OnSetFieldInputFocus(void* field,FPDF_WIDESTRING focusText, FPDF_DWORD nTextLen, FX_BOOL bFocus)
+ void FFI_OnSetFieldInputFocus(void* field,FPDF_WIDESTRING focusText, FPDF_DWORD nTextLen, bool bFocus)
{
if (m_pInfo && m_pInfo->FFI_SetTextFieldFocus)
m_pInfo->FFI_SetTextFieldFocus(m_pInfo, focusText, nTextLen, bFocus);
@@ -192,7 +192,7 @@ public:
m_pInfo->FFI_DoGoToAction(m_pInfo, nPageIndex, zoomMode, fPosArray, sizeOfArray);
}
- FX_BOOL IsJSInitiated() const { return m_pInfo && m_pInfo->m_pJsPlatform; }
+ bool IsJSInitiated() const { return m_pInfo && m_pInfo->m_pJsPlatform; }
void SetSDKDocument(CPDFSDK_Document* pFXDoc) { m_pSDKDoc = pFXDoc; }
CPDFSDK_Document* GetSDKDocument() const { return m_pSDKDoc; }
CPDF_Document* GetPDFDocument() const { return m_pPDFDoc; }
@@ -227,7 +227,7 @@ public:
CPDFSDK_InterForm* GetInterForm() ;
CPDF_Document* GetDocument() {return m_pDoc;}
- CPDFSDK_PageView* GetPageView(CPDF_Page* pPDFPage, FX_BOOL ReNew = TRUE);
+ CPDFSDK_PageView* GetPageView(CPDF_Page* pPDFPage, bool ReNew = true);
CPDFSDK_PageView* GetPageView(int nIndex);
CPDFSDK_PageView* GetCurrentView();
void ReMovePageView(CPDF_Page* pPDFPage);
@@ -237,25 +237,25 @@ public:
IFXJS_Runtime * GetJsRuntime();
- FX_BOOL SetFocusAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag = 0);
- FX_BOOL KillFocusAnnot(FX_UINT nFlag = 0);
+ bool SetFocusAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag = 0);
+ bool KillFocusAnnot(FX_UINT nFlag = 0);
- FX_BOOL ExtractPages(const CFX_WordArray &arrExtraPages, CPDF_Document* pDstDoc);
- FX_BOOL InsertPages(int nInsertAt, const CPDF_Document* pSrcDoc, const CFX_WordArray &arrSrcPages);
- FX_BOOL ReplacePages(int nPage, const CPDF_Document* pSrcDoc, const CFX_WordArray &arrSrcPages);
+ bool ExtractPages(const CFX_WordArray &arrExtraPages, CPDF_Document* pDstDoc);
+ bool InsertPages(int nInsertAt, const CPDF_Document* pSrcDoc, const CFX_WordArray &arrSrcPages);
+ bool ReplacePages(int nPage, const CPDF_Document* pSrcDoc, const CFX_WordArray &arrSrcPages);
void OnCloseDocument();
int GetPageCount() {return m_pDoc->GetPageCount();}
- FX_BOOL GetPermissions(int nFlag);
- FX_BOOL GetChangeMark() {return m_bChangeMask;}
- void SetChangeMark() {m_bChangeMask = TRUE;}
- void ClearChangeMark() {m_bChangeMask= FALSE;}
+ bool GetPermissions(int nFlag);
+ bool GetChangeMark() {return m_bChangeMask;}
+ void SetChangeMark() {m_bChangeMask = true;}
+ void ClearChangeMark() {m_bChangeMask= false;}
CFX_WideString GetPath() ;
CPDF_Page* GetPage(int nIndex);
CPDFDoc_Environment * GetEnv() {return m_pEnv; }
void ProcJavascriptFun();
- FX_BOOL ProcOpenAction();
+ bool ProcOpenAction();
CPDF_OCContext* GetOCContext();
private:
std::map<CPDF_Page*, CPDFSDK_PageView*> m_pageMap;
@@ -264,7 +264,7 @@ private:
CPDFSDK_Annot* m_pFocusAnnot;
CPDFDoc_Environment* m_pEnv;
CPDF_OCContext* m_pOccontent;
- FX_BOOL m_bChangeMask;
+ bool m_bChangeMask;
};
class CPDFSDK_PageView final
{
@@ -278,28 +278,28 @@ public:
CPDFSDK_Annot* GetFXWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY);
CPDFSDK_Annot* GetFocusAnnot() ;
void SetFocusAnnot(CPDFSDK_Annot* pSDKAnnot,FX_UINT nFlag = 0) {m_pSDKDoc->SetFocusAnnot(pSDKAnnot, nFlag);}
- FX_BOOL KillFocusAnnot(FX_UINT nFlag = 0) {return m_pSDKDoc->KillFocusAnnot(nFlag);}
- FX_BOOL Annot_HasAppearance(CPDF_Annot* pAnnot);
+ bool KillFocusAnnot(FX_UINT nFlag = 0) {return m_pSDKDoc->KillFocusAnnot(nFlag);}
+ bool Annot_HasAppearance(CPDF_Annot* pAnnot);
CPDFSDK_Annot* AddAnnot(CPDF_Dictionary * pDict);
CPDFSDK_Annot* AddAnnot(const FX_CHAR* lpSubType,CPDF_Dictionary * pDict);
CPDFSDK_Annot* AddAnnot(CPDF_Annot * pPDFAnnot);
- FX_BOOL DeleteAnnot(CPDFSDK_Annot* pAnnot);
+ bool DeleteAnnot(CPDFSDK_Annot* pAnnot);
int CountAnnots();
CPDFSDK_Annot* GetAnnot(int nIndex);
CPDFSDK_Annot* GetAnnotByDict(CPDF_Dictionary * pDict);
CPDF_Page* GetPDFPage(){return m_page;}
CPDF_Document* GetPDFDocument();
CPDFSDK_Document* GetSDKDocument() {return m_pSDKDoc;}
- FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_UINT nFlag);
- FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_UINT nFlag);
- FX_BOOL OnChar(int nChar, FX_UINT nFlag);
- FX_BOOL OnKeyDown(int nKeyCode, int nFlag);
- FX_BOOL OnKeyUp(int nKeyCode, int nFlag);
-
- FX_BOOL OnMouseMove(const CPDF_Point & point, int nFlag);
- FX_BOOL OnMouseWheel(double deltaX, double deltaY,const CPDF_Point& point, int nFlag);
- FX_BOOL IsValidAnnot(void* p);
+ bool OnLButtonDown(const CPDF_Point & point, FX_UINT nFlag);
+ bool OnLButtonUp(const CPDF_Point & point, FX_UINT nFlag);
+ bool OnChar(int nChar, FX_UINT nFlag);
+ bool OnKeyDown(int nKeyCode, int nFlag);
+ bool OnKeyUp(int nKeyCode, int nFlag);
+
+ bool OnMouseMove(const CPDF_Point & point, int nFlag);
+ bool OnMouseWheel(double deltaX, double deltaY,const CPDF_Point& point, int nFlag);
+ bool IsValidAnnot(void* p);
void GetCurrentMatrix(CPDF_Matrix& matrix) {matrix = m_curMatrix;}
void UpdateRects(CFX_RectArray& rects);
void UpdateView(CPDFSDK_Annot* pAnnot);
@@ -308,11 +308,11 @@ public:
int GetPageIndex();
void LoadFXAnnots();
- void SetValid(FX_BOOL bValid) {m_bValid = bValid;}
- FX_BOOL IsValid() {return m_bValid;}
- void SetLock(FX_BOOL bLocked) {m_bLocked= bLocked;}
- FX_BOOL IsLocked() {return m_bLocked;}
- void TakeOverPage() {m_bTakeOverPage = TRUE;}
+ void SetValid(bool bValid) {m_bValid = bValid;}
+ bool IsValid() {return m_bValid;}
+ void SetLock(bool bLocked) {m_bLocked= bLocked;}
+ bool IsLocked() {return m_bLocked;}
+ void TakeOverPage() {m_bTakeOverPage = true;}
private:
void PageView_OnHighlightFormFields(CFX_RenderDevice* pDevice, CPDFSDK_Widget* pWidget);
CPDF_Matrix m_curMatrix;
@@ -322,12 +322,12 @@ private:
CFX_PtrArray m_fxAnnotArray;
CPDFSDK_Document* m_pSDKDoc;
CPDFSDK_Widget* m_CaptureWidget;
- FX_BOOL m_bEnterWidget;
- FX_BOOL m_bExitWidget;
- FX_BOOL m_bOnWidget;
- FX_BOOL m_bValid;
- FX_BOOL m_bLocked;
- FX_BOOL m_bTakeOverPage;
+ bool m_bEnterWidget;
+ bool m_bExitWidget;
+ bool m_bOnWidget;
+ bool m_bValid;
+ bool m_bLocked;
+ bool m_bTakeOverPage;
};
@@ -340,14 +340,14 @@ public:
typedef int (*LP_COMPARE)(TYPE p1, TYPE p2);
- void Sort(LP_COMPARE pCompare, FX_BOOL bAscent = TRUE)
+ void Sort(LP_COMPARE pCompare, bool bAscent = true)
{
int nSize = this->GetSize();
QuickSort(0, nSize -1, bAscent, pCompare);
}
private:
- void QuickSort(FX_UINT nStartPos, FX_UINT nStopPos, FX_BOOL bAscend, LP_COMPARE pCompare)
+ void QuickSort(FX_UINT nStartPos, FX_UINT nStopPos, bool bAscend, LP_COMPARE pCompare)
{
if (nStartPos >= nStopPos) return;
diff --git a/fpdfsdk/include/fsdk_rendercontext.h b/fpdfsdk/include/fsdk_rendercontext.h
index b2bc163b49..8945d181f9 100644
--- a/fpdfsdk/include/fsdk_rendercontext.h
+++ b/fpdfsdk/include/fsdk_rendercontext.h
@@ -34,7 +34,7 @@ class IFSDK_PAUSE_Adapter : public IFX_Pause
{
public:
IFSDK_PAUSE_Adapter(IFSDK_PAUSE* IPause );
- FX_BOOL NeedToPauseNow();
+ bool NeedToPauseNow();
private:
IFSDK_PAUSE* m_IPause;
diff --git a/fpdfsdk/include/fx_systemhandler.h b/fpdfsdk/include/fx_systemhandler.h
index bf59e452ea..30168d48b6 100644
--- a/fpdfsdk/include/fx_systemhandler.h
+++ b/fpdfsdk/include/fx_systemhandler.h
@@ -47,10 +47,10 @@ public:
virtual void InvalidateRect(FX_HWND hWnd, FX_RECT rect) = 0;
virtual void OutputSelectedRect(void* pFormFiller, CPDF_Rect&rect) = 0;
- virtual FX_BOOL IsSelectionImplemented() = 0;
+ virtual bool IsSelectionImplemented() = 0;
virtual CFX_WideString GetClipboardText(FX_HWND hWnd) = 0;
- virtual FX_BOOL SetClipboardText(FX_HWND hWnd, CFX_WideString string) = 0;
+ virtual bool SetClipboardText(FX_HWND hWnd, CFX_WideString string) = 0;
virtual void ClientToScreen(FX_HWND hWnd, int32_t& x, int32_t& y) = 0;
virtual void ScreenToClient(FX_HWND hWnd, int32_t& x, int32_t& y) = 0;
@@ -66,23 +66,23 @@ public:
virtual void SetCursor(int32_t nCursorType) = 0;
virtual FX_HMENU CreatePopupMenu() = 0;
- virtual FX_BOOL AppendMenuItem(FX_HMENU hMenu, int32_t nIDNewItem, CFX_WideString string) = 0;
- virtual FX_BOOL EnableMenuItem(FX_HMENU hMenu, int32_t nIDItem, FX_BOOL bEnabled) = 0;
+ virtual bool AppendMenuItem(FX_HMENU hMenu, int32_t nIDNewItem, CFX_WideString string) = 0;
+ virtual bool EnableMenuItem(FX_HMENU hMenu, int32_t nIDItem, bool bEnabled) = 0;
virtual int32_t TrackPopupMenu(FX_HMENU hMenu, int32_t x, int32_t y, FX_HWND hParent) = 0;
virtual void DestroyMenu(FX_HMENU hMenu) = 0;
virtual CFX_ByteString GetNativeTrueTypeFont(int32_t nCharset) = 0;
- virtual FX_BOOL FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString sFontFaceName) = 0;
+ virtual bool FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString sFontFaceName) = 0;
virtual CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, CFX_ByteString sFontFaceName, uint8_t nCharset) = 0;
virtual int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc) = 0;
virtual void KillTimer(int32_t nID) = 0;
- virtual FX_BOOL IsSHIFTKeyDown(FX_DWORD nFlag) = 0;
- virtual FX_BOOL IsCTRLKeyDown(FX_DWORD nFlag) = 0;
- virtual FX_BOOL IsALTKeyDown(FX_DWORD nFlag) = 0;
- virtual FX_BOOL IsINSERTKeyDown(FX_DWORD nFlag) = 0;
+ virtual bool IsSHIFTKeyDown(FX_DWORD nFlag) = 0;
+ virtual bool IsCTRLKeyDown(FX_DWORD nFlag) = 0;
+ virtual bool IsALTKeyDown(FX_DWORD nFlag) = 0;
+ virtual bool IsINSERTKeyDown(FX_DWORD nFlag) = 0;
virtual FX_SYSTEMTIME GetLocalTime() = 0;
diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h
index bf46e91819..45d2646c19 100644
--- a/fpdfsdk/include/fxedit/fx_edit.h
+++ b/fpdfsdk/include/fxedit/fx_edit.h
@@ -93,7 +93,7 @@ public:
//set the position of vertical scrollbar.
virtual void IOnSetScrollPosY(FX_FLOAT fy) = 0;
//set the caret information.
- virtual void IOnSetCaret(FX_BOOL bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place) = 0;
+ virtual void IOnSetCaret(bool bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place) = 0;
//if the caret position is changed ,send the information of current postion to user.
virtual void IOnCaretChange(const CPVT_SecProps & secProps, const CPVT_WordProps & wordProps) = 0;
//if the text area is changed, send the information to user.
@@ -131,25 +131,25 @@ public:
virtual ~IFX_Edit_Iterator() {}
public:
//move the current position to the next word.
- virtual FX_BOOL NextWord() = 0;
+ virtual bool NextWord() = 0;
//move the current position to the next line.
- virtual FX_BOOL NextLine() = 0;
+ virtual bool NextLine() = 0;
//move the current position to the next section.
- virtual FX_BOOL NextSection() = 0;
+ virtual bool NextSection() = 0;
//move the current position to the previous word.
- virtual FX_BOOL PrevWord() = 0;
+ virtual bool PrevWord() = 0;
//move the current position to the previous line.
- virtual FX_BOOL PrevLine() = 0;
+ virtual bool PrevLine() = 0;
//move the current position to the previous section.
- virtual FX_BOOL PrevSection() = 0;
+ virtual bool PrevSection() = 0;
//get the information of the current word.
- virtual FX_BOOL GetWord(CPVT_Word & word) const = 0;
+ virtual bool GetWord(CPVT_Word & word) const = 0;
//get the information of the current line.
- virtual FX_BOOL GetLine(CPVT_Line & line) const = 0;
+ virtual bool GetLine(CPVT_Line & line) const = 0;
//get the information of the current section.
- virtual FX_BOOL GetSection(CPVT_Section & section) const = 0;
+ virtual bool GetSection(CPVT_Section & section) const = 0;
//set the current position.
virtual void SetAt(int32_t nWordIndex) = 0;
//set the current position.
@@ -195,69 +195,69 @@ public:
virtual void Initialize() = 0;
//set the bounding box of the text area.
- virtual void SetPlateRect(const CPDF_Rect & rect, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetPlateRect(const CPDF_Rect & rect, bool bPaint = true) = 0;
//set the scroll origin
virtual void SetScrollPos(const CPDF_Point & point) = 0;
//set the horizontal text alignment in text box, nFormat (0:left 1:middle 2:right).
- virtual void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetAlignmentH(int32_t nFormat = 0, bool bPaint = true) = 0;
//set the vertical text alignment in text box, nFormat (0:top 1:center 2:bottom).
- virtual void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetAlignmentV(int32_t nFormat = 0, bool bPaint = true) = 0;
//if the text is shown in secret , set a character for substitute.
- virtual void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetPasswordChar(FX_WORD wSubWord = '*', bool bPaint = true) = 0;
//set the maximal count of words of the text.
- virtual void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetLimitChar(int32_t nLimitChar = 0, bool bPaint = true) = 0;
//if set the count of charArray , then all words is shown in equal space.
- virtual void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetCharArray(int32_t nCharArray = 0, bool bPaint = true) = 0;
//set the space of two characters.
- virtual void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, bool bPaint = true) = 0;
//set the horizontal scale of all characters.
- virtual void SetHorzScale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetHorzScale(int32_t nHorzScale = 100, bool bPaint = true) = 0;
//set the leading of all lines
- virtual void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetLineLeading(FX_FLOAT fLineLeading, bool bPaint = true) = 0;
//if set, CRLF is allowed.
- virtual void SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetMultiLine(bool bMultiLine = true, bool bPaint = true) = 0;
//if set, all words auto fit the width of the bounding box.
- virtual void SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetAutoReturn(bool bAuto = true, bool bPaint = true) = 0;
//if set, a font size is calculated to full fit the bounding box.
- virtual void SetAutoFontSize(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetAutoFontSize(bool bAuto = true, bool bPaint = true) = 0;
//is set, the text is allowed to scroll.
- virtual void SetAutoScroll(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetAutoScroll(bool bAuto = true, bool bPaint = true) = 0;
//set the font size of all words.
- virtual void SetFontSize(FX_FLOAT fFontSize, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetFontSize(FX_FLOAT fFontSize, bool bPaint = true) = 0;
//the text is allowed to auto-scroll, allow the text overflow?
- virtual void SetTextOverflow(FX_BOOL bAllowed = FALSE, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetTextOverflow(bool bAllowed = false, bool bPaint = true) = 0;
//query if the edit is richedit.
- virtual FX_BOOL IsRichText() const = 0;
+ virtual bool IsRichText() const = 0;
//set the edit is richedit.
- virtual void SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetRichText(bool bRichText = true, bool bPaint = true) = 0;
//set the fontsize of selected text.
- virtual FX_BOOL SetRichFontSize(FX_FLOAT fFontSize) = 0;
+ virtual bool SetRichFontSize(FX_FLOAT fFontSize) = 0;
//set the fontindex of selected text, user can change the font of selected text.
- virtual FX_BOOL SetRichFontIndex(int32_t nFontIndex) = 0;
+ virtual bool SetRichFontIndex(int32_t nFontIndex) = 0;
//set the textcolor of selected text.
- virtual FX_BOOL SetRichTextColor(FX_COLORREF dwColor) = 0;
+ virtual bool SetRichTextColor(FX_COLORREF dwColor) = 0;
//set the text script type of selected text. (0:normal 1:superscript 2:subscript)
- virtual FX_BOOL SetRichTextScript(int32_t nScriptType) = 0;
+ virtual bool SetRichTextScript(int32_t nScriptType) = 0;
//set the bold font style of selected text.
- virtual FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE) = 0;
+ virtual bool SetRichTextBold(bool bBold = true) = 0;
//set the italic font style of selected text.
- virtual FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE) = 0;
+ virtual bool SetRichTextItalic(bool bItalic = true) = 0;
//set the underline style of selected text.
- virtual FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE) = 0;
+ virtual bool SetRichTextUnderline(bool bUnderline = true) = 0;
//set the crossout style of selected text.
- virtual FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE) = 0;
+ virtual bool SetRichTextCrossout(bool bCrossout = true) = 0;
//set the charspace of selected text, in user coordinate.
- virtual FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace) = 0;
+ virtual bool SetRichTextCharSpace(FX_FLOAT fCharSpace) = 0;
//set the horizontal scale of selected text, default value is 100.
- virtual FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100) = 0;
+ virtual bool SetRichTextHorzScale(int32_t nHorzScale = 100) = 0;
//set the leading of selected section, in user coordinate.
- virtual FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading) = 0;
+ virtual bool SetRichTextLineLeading(FX_FLOAT fLineLeading) = 0;
//set the indent of selected section, in user coordinate.
- virtual FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent) = 0;
+ virtual bool SetRichTextLineIndent(FX_FLOAT fLineIndent) = 0;
//set the alignment of selected section, nAlignment(0:left 1:middle 2:right)
- virtual FX_BOOL SetRichTextAlignment(int32_t nAlignment) = 0;
+ virtual bool SetRichTextAlignment(int32_t nAlignment) = 0;
//set the selected range of text.
//if nStartChar == 0 and nEndChar == -1, select all the text.
@@ -276,7 +276,7 @@ public:
//get the text conent
virtual CFX_WideString GetText() const = 0;
//query if any text is selected.
- virtual FX_BOOL IsSelected() const = 0;
+ virtual bool IsSelected() const = 0;
//get the scroll origin
virtual CPDF_Point GetScrollPos() const = 0;
//get the bounding box of the text area.
@@ -291,44 +291,44 @@ public:
virtual CPVT_WordRange GetSelectWordRange() const = 0;
//send the mousedown message to edit for response.
- //if Shift key is hold, bShift is TRUE, is Ctrl key is hold, bCtrl is TRUE.
- virtual void OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
- //send the mousemove message to edit when mouse down is TRUE.
- virtual void OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
+ //if Shift key is hold, bShift is true, is Ctrl key is hold, bCtrl is true.
+ virtual void OnMouseDown(const CPDF_Point & point,bool bShift,bool bCtrl) = 0;
+ //send the mousemove message to edit when mouse down is true.
+ virtual void OnMouseMove(const CPDF_Point & point,bool bShift,bool bCtrl) = 0;
//send the UP key message to edit.
- virtual void OnVK_UP(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
+ virtual void OnVK_UP(bool bShift,bool bCtrl) = 0;
//send the DOWN key message to edit.
- virtual void OnVK_DOWN(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
+ virtual void OnVK_DOWN(bool bShift,bool bCtrl) = 0;
//send the LEFT key message to edit.
- virtual void OnVK_LEFT(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
+ virtual void OnVK_LEFT(bool bShift,bool bCtrl) = 0;
//send the RIGHT key message to edit.
- virtual void OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
+ virtual void OnVK_RIGHT(bool bShift,bool bCtrl) = 0;
//send the HOME key message to edit.
- virtual void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
+ virtual void OnVK_HOME(bool bShift,bool bCtrl) = 0;
//send the END key message to edit.
- virtual void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
+ virtual void OnVK_END(bool bShift,bool bCtrl) = 0;
//put text into edit.
virtual void SetText(const FX_WCHAR* text,int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//insert a word into the edit.
- virtual FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL) = 0;
+ virtual bool InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL) = 0;
//insert a return into the edit.
- virtual FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
+ virtual bool InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//insert text into the edit.
- virtual FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET,
+ virtual bool InsertText(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//do backspace operation.
- virtual FX_BOOL Backspace() = 0;
+ virtual bool Backspace() = 0;
//do delete operation.
- virtual FX_BOOL Delete() = 0;
+ virtual bool Delete() = 0;
//delete the selected text.
- virtual FX_BOOL Clear() = 0;
+ virtual bool Clear() = 0;
//do Redo operation.
- virtual FX_BOOL Redo() = 0;
+ virtual bool Redo() = 0;
//do Undo operation.
- virtual FX_BOOL Undo() = 0;
+ virtual bool Undo() = 0;
//move caret
virtual void SetCaret(int32_t nPos) = 0;
@@ -336,18 +336,18 @@ public:
virtual void Paint() = 0;
//allow to refresh screen?
- virtual void EnableRefresh(FX_BOOL bRefresh) = 0;
+ virtual void EnableRefresh(bool bRefresh) = 0;
virtual void RefreshWordRange(const CPVT_WordRange& wr) = 0;
//allow undo/redo?
- virtual void EnableUndo(FX_BOOL bUndo) = 0;
+ virtual void EnableUndo(bool bUndo) = 0;
//allow notify?
- virtual void EnableNotify(FX_BOOL bNotify) = 0;
+ virtual void EnableNotify(bool bNotify) = 0;
//allow opr notify?
- virtual void EnableOprNotify(FX_BOOL bNotify) = 0;
+ virtual void EnableOprNotify(bool bNotify) = 0;
//map word place to word index.
virtual int32_t WordPlaceToWordIndex(const CPVT_WordPlace & place) const = 0;
@@ -382,11 +382,11 @@ public:
//get the latin words of specified range
virtual CFX_WideString GetRangeText(const CPVT_WordRange & range) const = 0;
//is the text full in bounding box
- virtual FX_BOOL IsTextFull() const = 0;
- virtual FX_BOOL CanUndo() const = 0;
- virtual FX_BOOL CanRedo() const = 0;
+ virtual bool IsTextFull() const = 0;
+ virtual bool CanUndo() const = 0;
+ virtual bool CanRedo() const = 0;
//if the content is changed after settext?
- virtual FX_BOOL IsModified() const = 0;
+ virtual bool IsModified() const = 0;
//get the total words in edit
virtual int32_t GetTotalWords() const = 0;
@@ -394,7 +394,7 @@ public:
static CFX_ByteString GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset,
const CPVT_WordRange* pRange = NULL,
- FX_BOOL bContinuous = TRUE, FX_WORD SubWord = 0);
+ bool bContinuous = true, FX_WORD SubWord = 0);
static CFX_ByteString GetSelectAppearanceStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange* pRange = NULL);
static void DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit, FX_COLORREF crTextFill, FX_COLORREF crTextStroke,
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, IFX_SystemHandler* pSystemHandler, void* pFFLData);
@@ -451,12 +451,12 @@ public:
virtual FX_FLOAT GetFontSize() const = 0;
virtual IFX_Edit* GetItemEdit(int32_t nIndex) const = 0;
virtual int32_t GetCount() const = 0;
- virtual FX_BOOL IsItemSelected(int32_t nIndex) const = 0;
+ virtual bool IsItemSelected(int32_t nIndex) const = 0;
virtual FX_FLOAT GetFirstHeight() const = 0;
- virtual void SetMultipleSel(FX_BOOL bMultiple) = 0;
- virtual FX_BOOL IsMultipleSel() const = 0;
- virtual FX_BOOL IsValid(int32_t nItemIndex) const = 0;
+ virtual void SetMultipleSel(bool bMultiple) = 0;
+ virtual bool IsMultipleSel() const = 0;
+ virtual bool IsValid(int32_t nItemIndex) const = 0;
virtual int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const = 0;
virtual void SetScrollPos(const CPDF_Point & point) = 0;
@@ -477,16 +477,16 @@ public:
virtual CFX_WideString GetText() const = 0;
- virtual void OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
- virtual void OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
- virtual void OnVK_UP(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
- virtual void OnVK_DOWN(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
- virtual void OnVK_LEFT(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
- virtual void OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
- virtual void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
- virtual void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
- virtual void OnVK(int32_t nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
- virtual FX_BOOL OnChar(FX_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl) = 0;
+ virtual void OnMouseDown(const CPDF_Point & point,bool bShift,bool bCtrl) = 0;
+ virtual void OnMouseMove(const CPDF_Point & point,bool bShift,bool bCtrl) = 0;
+ virtual void OnVK_UP(bool bShift,bool bCtrl) = 0;
+ virtual void OnVK_DOWN(bool bShift,bool bCtrl) = 0;
+ virtual void OnVK_LEFT(bool bShift,bool bCtrl) = 0;
+ virtual void OnVK_RIGHT(bool bShift,bool bCtrl) = 0;
+ virtual void OnVK_HOME(bool bShift,bool bCtrl) = 0;
+ virtual void OnVK_END(bool bShift,bool bCtrl) = 0;
+ virtual void OnVK(int32_t nItemIndex,bool bShift,bool bCtrl) = 0;
+ virtual bool OnChar(FX_WORD nChar,bool bShift,bool bCtrl) = 0;
protected:
~IFX_List() { }
diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h
index 7a2742f0ee..f728d8735e 100644
--- a/fpdfsdk/include/fxedit/fxet_edit.h
+++ b/fpdfsdk/include/fxedit/fxet_edit.h
@@ -68,27 +68,27 @@ struct CFX_Edit_LineRect
{
}
- FX_BOOL operator != (const CFX_Edit_LineRect & linerect) const
+ bool operator != (const CFX_Edit_LineRect & linerect) const
{
return FXSYS_memcmp(this, &linerect, sizeof(CFX_Edit_LineRect)) != 0;
}
- FX_BOOL IsSameHeight(const CFX_Edit_LineRect & linerect) const
+ bool IsSameHeight(const CFX_Edit_LineRect & linerect) const
{
return FX_EDIT_IsFloatZero((m_rcLine.top - m_rcLine.bottom) - (linerect.m_rcLine.top -linerect.m_rcLine.bottom));
}
- FX_BOOL IsSameTop(const CFX_Edit_LineRect & linerect) const
+ bool IsSameTop(const CFX_Edit_LineRect & linerect) const
{
return FX_EDIT_IsFloatZero(m_rcLine.top - linerect.m_rcLine.top);
}
- FX_BOOL IsSameLeft(const CFX_Edit_LineRect & linerect) const
+ bool IsSameLeft(const CFX_Edit_LineRect & linerect) const
{
return FX_EDIT_IsFloatZero(m_rcLine.left - linerect.m_rcLine.left);
}
- FX_BOOL IsSameRight(const CFX_Edit_LineRect & linerect) const
+ bool IsSameRight(const CFX_Edit_LineRect & linerect) const
{
return FX_EDIT_IsFloatZero(m_rcLine.right - linerect.m_rcLine.right);
}
@@ -267,12 +267,12 @@ public:
EndPos = end;
}
- FX_BOOL IsExist() const
+ bool IsExist() const
{
return BeginPos != EndPos;
}
- FX_BOOL operator != (const CPVT_WordRange & wr) const
+ bool operator != (const CPVT_WordRange & wr) const
{
return wr.BeginPos != BeginPos || wr.EndPos != EndPos;
}
@@ -293,10 +293,10 @@ public:
void AddItem(IFX_Edit_UndoItem* pItem);
- FX_BOOL CanUndo() const;
- FX_BOOL CanRedo() const;
- FX_BOOL IsModified() const;
- FX_BOOL IsWorking() const;
+ bool CanUndo() const;
+ bool CanRedo() const;
+ bool IsModified() const;
+ bool IsWorking() const;
void Reset();
@@ -316,26 +316,26 @@ private:
int32_t m_nCurUndoPos;
int32_t m_nBufSize;
- FX_BOOL m_bModified;
- FX_BOOL m_bVirgin;
- FX_BOOL m_bWorking;
+ bool m_bModified;
+ bool m_bVirgin;
+ bool m_bWorking;
};
class CFX_Edit_UndoItem : public IFX_Edit_UndoItem
{
public:
- CFX_Edit_UndoItem() : m_bFirst(TRUE), m_bLast(TRUE) {}
+ CFX_Edit_UndoItem() : m_bFirst(true), m_bLast(true) {}
CFX_WideString GetUndoTitle() override { return L""; }
- void SetFirst(FX_BOOL bFirst){m_bFirst = bFirst;}
- FX_BOOL IsFirst(){return m_bFirst;}
- void SetLast(FX_BOOL bLast){m_bLast = bLast;}
- FX_BOOL IsLast(){return m_bLast;}
+ void SetFirst(bool bFirst){m_bFirst = bFirst;}
+ bool IsFirst(){return m_bFirst;}
+ void SetLast(bool bLast){m_bLast = bLast;}
+ bool IsLast(){return m_bLast;}
private:
- FX_BOOL m_bFirst;
- FX_BOOL m_bLast;
+ bool m_bFirst;
+ bool m_bLast;
};
class CFX_Edit_GroupUndoItem : public IFX_Edit_UndoItem
@@ -424,7 +424,7 @@ class CFXEU_Delete : public CFX_Edit_UndoItem
public:
CFXEU_Delete(CFX_Edit * pEdit, const CPVT_WordPlace & wpOldPlace, const CPVT_WordPlace & wpNewPlace,
FX_WORD word, int32_t charset,
- const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps, FX_BOOL bSecEnd);
+ const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps, bool bSecEnd);
virtual ~CFXEU_Delete();
void Redo();
@@ -439,7 +439,7 @@ private:
int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
- FX_BOOL m_bSecEnd;
+ bool m_bSecEnd;
};
class CFXEU_Clear : public CFX_Edit_UndoItem
@@ -575,61 +575,61 @@ public:
IFX_Edit_FontMap* GetFontMap();
void Initialize();
- void SetPlateRect(const CPDF_Rect & rect, FX_BOOL bPaint = TRUE);
+ void SetPlateRect(const CPDF_Rect & rect, bool bPaint = true);
void SetScrollPos(const CPDF_Point & point);
- void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE);
- void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE);
- void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE);
- void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE);
- void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE);
- void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE);
- void SetHorzScale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE);
- void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE);
- void SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE);
- void SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE);
- void SetAutoFontSize(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE);
- void SetAutoScroll(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE);
- void SetFontSize(FX_FLOAT fFontSize, FX_BOOL bPaint = TRUE);
- void SetTextOverflow(FX_BOOL bAllowed = FALSE, FX_BOOL bPaint = TRUE);
-
- FX_BOOL IsRichText() const;
- void SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE);
- FX_BOOL SetRichFontSize(FX_FLOAT fFontSize);
- FX_BOOL SetRichFontIndex(int32_t nFontIndex);
- FX_BOOL SetRichTextColor(FX_COLORREF dwColor);
- FX_BOOL SetRichTextScript(int32_t nScriptType);
- FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE);
- FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE);
- FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE);
- FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE);
- FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace);
- FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100);
- FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading);
- FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent);
- FX_BOOL SetRichTextAlignment(int32_t nAlignment);
-
- void OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl);
- void OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK_UP(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK_DOWN(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK_LEFT(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl);
+ void SetAlignmentH(int32_t nFormat = 0, bool bPaint = true);
+ void SetAlignmentV(int32_t nFormat = 0, bool bPaint = true);
+ void SetPasswordChar(FX_WORD wSubWord = '*', bool bPaint = true);
+ void SetLimitChar(int32_t nLimitChar = 0, bool bPaint = true);
+ void SetCharArray(int32_t nCharArray = 0, bool bPaint = true);
+ void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, bool bPaint = true);
+ void SetHorzScale(int32_t nHorzScale = 100, bool bPaint = true);
+ void SetLineLeading(FX_FLOAT fLineLeading, bool bPaint = true);
+ void SetMultiLine(bool bMultiLine = true, bool bPaint = true);
+ void SetAutoReturn(bool bAuto = true, bool bPaint = true);
+ void SetAutoFontSize(bool bAuto = true, bool bPaint = true);
+ void SetAutoScroll(bool bAuto = true, bool bPaint = true);
+ void SetFontSize(FX_FLOAT fFontSize, bool bPaint = true);
+ void SetTextOverflow(bool bAllowed = false, bool bPaint = true);
+
+ bool IsRichText() const;
+ void SetRichText(bool bRichText = true, bool bPaint = true);
+ bool SetRichFontSize(FX_FLOAT fFontSize);
+ bool SetRichFontIndex(int32_t nFontIndex);
+ bool SetRichTextColor(FX_COLORREF dwColor);
+ bool SetRichTextScript(int32_t nScriptType);
+ bool SetRichTextBold(bool bBold = true);
+ bool SetRichTextItalic(bool bItalic = true);
+ bool SetRichTextUnderline(bool bUnderline = true);
+ bool SetRichTextCrossout(bool bCrossout = true);
+ bool SetRichTextCharSpace(FX_FLOAT fCharSpace);
+ bool SetRichTextHorzScale(int32_t nHorzScale = 100);
+ bool SetRichTextLineLeading(FX_FLOAT fLineLeading);
+ bool SetRichTextLineIndent(FX_FLOAT fLineIndent);
+ bool SetRichTextAlignment(int32_t nAlignment);
+
+ void OnMouseDown(const CPDF_Point & point,bool bShift,bool bCtrl);
+ void OnMouseMove(const CPDF_Point & point,bool bShift,bool bCtrl);
+ void OnVK_UP(bool bShift,bool bCtrl);
+ void OnVK_DOWN(bool bShift,bool bCtrl);
+ void OnVK_LEFT(bool bShift,bool bCtrl);
+ void OnVK_RIGHT(bool bShift,bool bCtrl);
+ void OnVK_HOME(bool bShift,bool bCtrl);
+ void OnVK_END(bool bShift,bool bCtrl);
void SetText(const FX_WCHAR* text,int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
- FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL);
- FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
- FX_BOOL Backspace();
- FX_BOOL Delete();
- FX_BOOL Clear();
- FX_BOOL Empty();
- FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET,
+ bool InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL);
+ bool InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
+ bool Backspace();
+ bool Delete();
+ bool Clear();
+ bool Empty();
+ bool InsertText(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
- FX_BOOL Redo();
- FX_BOOL Undo();
+ bool Redo();
+ bool Undo();
CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, const FX_WCHAR* text, int32_t charset,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
int32_t GetCharSetFromUnicode(FX_WORD word, int32_t nOldCharset);
@@ -666,7 +666,7 @@ private:
void SelectAll();
void SelectNone();
void SetSel(const CPVT_WordPlace & begin,const CPVT_WordPlace & end);
- FX_BOOL IsSelected() const;
+ bool IsSelected() const;
void RearrangeAll();
void RearrangePart(const CPVT_WordRange & range);
@@ -677,23 +677,23 @@ private:
void SetScrollPosY(FX_FLOAT fy);
void SetScrollLimit();
void SetContentChanged();
- void EnableNotify(FX_BOOL bNotify);
+ void EnableNotify(bool bNotify);
void SetText(const FX_WCHAR* text,int32_t charset,
- const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL Clear(FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset,
- const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint);
- FX_BOOL SetRichTextProps(EDIT_PROPS_E eProps,
+ const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,bool bAddUndo, bool bPaint);
+ bool InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps,bool bAddUndo, bool bPaint);
+ bool InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,bool bAddUndo, bool bPaint);
+ bool Backspace(bool bAddUndo, bool bPaint);
+ bool Delete(bool bAddUndo, bool bPaint);
+ bool Clear(bool bAddUndo, bool bPaint);
+ bool InsertText(const FX_WCHAR* text, int32_t charset,
+ const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,bool bAddUndo, bool bPaint);
+ bool SetRichTextProps(EDIT_PROPS_E eProps,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps);
- FX_BOOL SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
- const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps, const CPVT_WordRange & wr, FX_BOOL bAddUndo);
- FX_BOOL SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
- const CPVT_WordProps * pWordProps, const CPVT_WordRange & wr, FX_BOOL bAddUndo);
+ bool SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
+ const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps, const CPVT_WordRange & wr, bool bAddUndo);
+ bool SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
+ const CPVT_WordProps * pWordProps, const CPVT_WordRange & wr, bool bAddUndo);
void PaintSetProps(EDIT_PROPS_E eProps, const CPVT_WordRange & wr);
void PaintInsertText(const CPVT_WordPlace & wpOld, const CPVT_WordPlace & wpNew);
@@ -702,7 +702,7 @@ private:
inline CPDF_Rect VTToEdit(const CPDF_Rect & rect) const;
inline CPDF_Rect EditToVT(const CPDF_Rect & rect) const;
- void EnableRefresh(FX_BOOL bRefresh);
+ void EnableRefresh(bool bRefresh);
void Refresh(REFRESH_PLAN_E ePlan,const CPVT_WordRange * pRange1 = NULL,const CPVT_WordRange * pRange2 = NULL);
void RefreshPushLineRects(const CPVT_WordRange & wr);
void RefreshPushRandomRects(const CPVT_WordRange & wr);
@@ -720,14 +720,14 @@ private:
CPVT_WordRange CombineWordRange(const CPVT_WordRange & wr1, const CPVT_WordRange & wr2);
CPVT_WordRange GetSelectWordRange() const;
- void EnableUndo(FX_BOOL bUndo);
- void EnableOprNotify(FX_BOOL bNotify);
+ void EnableUndo(bool bUndo);
+ void EnableOprNotify(bool bNotify);
- FX_BOOL IsTextFull() const;
- FX_BOOL IsTextOverflow() const;
- FX_BOOL CanUndo() const;
- FX_BOOL CanRedo() const;
- FX_BOOL IsModified() const;
+ bool IsTextFull() const;
+ bool IsTextOverflow() const;
+ bool CanUndo() const;
+ bool CanRedo() const;
+ bool IsModified() const;
void BeginGroupUndo(const CFX_WideString& sTitle);
void EndGroupUndo();
@@ -751,19 +751,19 @@ private:
CPDF_Point m_ptScrollPos;
CPDF_Point m_ptRefreshScrollPos;
- FX_BOOL m_bEnableScroll;
+ bool m_bEnableScroll;
IFX_Edit_Iterator * m_pIterator;
CFX_Edit_Refresh m_Refresh;
CPDF_Point m_ptCaret;
CFX_Edit_Undo m_Undo;
int32_t m_nAlignment;
- FX_BOOL m_bNotifyFlag;
- FX_BOOL m_bEnableOverflow;
- FX_BOOL m_bEnableRefresh;
+ bool m_bNotifyFlag;
+ bool m_bEnableOverflow;
+ bool m_bEnableRefresh;
CPDF_Rect m_rcOldContent;
- FX_BOOL m_bEnableUndo;
- FX_BOOL m_bNotify;
- FX_BOOL m_bOprNotify;
+ bool m_bEnableUndo;
+ bool m_bNotify;
+ bool m_bOprNotify;
CFX_Edit_GroupUndoItem* m_pGroupUndoItem;
};
@@ -775,16 +775,16 @@ public:
CFX_Edit_Iterator(CFX_Edit * pEdit,IPDF_VariableText_Iterator * pVTIterator);
virtual ~CFX_Edit_Iterator();
- FX_BOOL NextWord();
- FX_BOOL NextLine();
- FX_BOOL NextSection();
- FX_BOOL PrevWord();
- FX_BOOL PrevLine();
- FX_BOOL PrevSection();
+ bool NextWord();
+ bool NextLine();
+ bool NextSection();
+ bool PrevWord();
+ bool PrevLine();
+ bool PrevSection();
- FX_BOOL GetWord(CPVT_Word & word) const;
- FX_BOOL GetLine(CPVT_Line & line) const;
- FX_BOOL GetSection(CPVT_Section & section) const;
+ bool GetWord(CPVT_Word & word) const;
+ bool GetLine(CPVT_Line & line) const;
+ bool GetSection(CPVT_Section & section) const;
void SetAt(int32_t nWordIndex);
void SetAt(const CPVT_WordPlace & place);
const CPVT_WordPlace & GetAt() const;
@@ -808,7 +808,7 @@ public:
int32_t GetTypeDescent(int32_t nFontIndex);
int32_t GetWordFontIndex(FX_WORD word, int32_t charset, int32_t nFontIndex);
int32_t GetDefaultFontIndex();
- FX_BOOL IsLatinWord(FX_WORD word);
+ bool IsLatinWord(FX_WORD word);
private:
IFX_Edit_FontMap* m_pFontMap;
diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h
index fe75b0fc35..07edb46887 100644
--- a/fpdfsdk/include/fxedit/fxet_list.h
+++ b/fpdfsdk/include/fxedit/fxet_list.h
@@ -31,7 +31,7 @@ public:
y = 0.0f;
}
- FX_BOOL operator != (const CLST_Size & size) const
+ bool operator != (const CLST_Size & size) const
{
return FXSYS_memcmp(this, &size, sizeof(CLST_Size)) != 0;
}
@@ -81,12 +81,12 @@ public:
return *this;
}
- FX_BOOL operator == (const CLST_Rect & rect) const
+ bool operator == (const CLST_Rect & rect) const
{
return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) == 0;
}
- FX_BOOL operator != (const CLST_Rect & rect) const
+ bool operator != (const CLST_Rect & rect) const
{
return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) != 0;
}
@@ -162,22 +162,22 @@ public:
public:
void SetRect(const CLST_Rect & rect);
- void SetSelect(FX_BOOL bSelected);
- void SetCaret(FX_BOOL bCaret);
+ void SetSelect(bool bSelected);
+ void SetCaret(bool bCaret);
void SetText(const FX_WCHAR* text);
void SetFontSize(FX_FLOAT fFontSize);
CFX_WideString GetText() const;
CLST_Rect GetRect() const;
- FX_BOOL IsSelected() const;
- FX_BOOL IsCaret() const;
+ bool IsSelected() const;
+ bool IsCaret() const;
FX_FLOAT GetItemHeight() const;
FX_WORD GetFirstChar() const;
private:
IFX_Edit* m_pEdit;
- FX_BOOL m_bSelected;
- FX_BOOL m_bCaret;
+ bool m_bSelected;
+ bool m_bCaret;
CLST_Rect m_rcListItem;
};
@@ -209,7 +209,7 @@ private:
template<class TYPE> class CLST_ArrayTemplate : public CFX_ArrayTemplate<TYPE>
{
public:
- FX_BOOL IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; }
+ bool IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; }
TYPE GetAt(int32_t nIndex) const { if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) return CFX_ArrayTemplate<TYPE>::GetAt(nIndex); return NULL;}
void RemoveAt(int32_t nIndex){if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex);}
};
@@ -230,12 +230,12 @@ public:
virtual FX_FLOAT GetFontSize() const;
virtual IFX_Edit* GetItemEdit(int32_t nIndex) const;
virtual int32_t GetCount() const;
- virtual FX_BOOL IsItemSelected(int32_t nIndex) const;
+ virtual bool IsItemSelected(int32_t nIndex) const;
virtual FX_FLOAT GetFirstHeight() const;
- virtual void SetMultipleSel(FX_BOOL bMultiple);
- virtual FX_BOOL IsMultipleSel() const;
- virtual FX_BOOL IsValid(int32_t nItemIndex) const;
+ virtual void SetMultipleSel(bool bMultiple);
+ virtual bool IsMultipleSel() const;
+ virtual bool IsValid(int32_t nItemIndex) const;
virtual int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const;
protected:
@@ -247,8 +247,8 @@ protected:
virtual CPDF_Rect GetItemRect(int32_t nIndex) const;
CFX_WideString GetItemText(int32_t nIndex) const;
- void SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected);
- void SetItemCaret(int32_t nItemIndex, FX_BOOL bCaret);
+ void SetItemSelect(int32_t nItemIndex, bool bSelected);
+ void SetItemCaret(int32_t nItemIndex, bool bCaret);
virtual int32_t GetItemIndex(const CPDF_Point & point) const;
int32_t GetFirstSelected() const;
@@ -259,7 +259,7 @@ private:
CLST_ArrayTemplate<CFX_ListItem*> m_aListItems;
FX_FLOAT m_fFontSize;
IFX_Edit_FontMap* m_pFontMap;
- FX_BOOL m_bMultiple;
+ bool m_bMultiple;
};
struct CPLST_Select_Item
@@ -285,7 +285,7 @@ public:
void Add(int32_t nBeginIndex, int32_t nEndIndex);
void Sub(int32_t nItemIndex);
void Sub(int32_t nBeginIndex, int32_t nEndIndex);
- FX_BOOL IsExist(int32_t nItemIndex) const;
+ bool IsExist(int32_t nItemIndex) const;
int32_t Find(int32_t nItemIndex) const;
int32_t GetCount() const;
int32_t GetItemIndex(int32_t nIndex) const;
@@ -306,16 +306,16 @@ public:
public:
void SetNotify(IFX_List_Notify * pNotify);
- void OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl);
- void OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK_UP(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK_DOWN(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK_LEFT(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl);
- void OnVK(int32_t nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl);
- FX_BOOL OnChar(FX_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl);
+ void OnMouseDown(const CPDF_Point & point,bool bShift,bool bCtrl);
+ void OnMouseMove(const CPDF_Point & point,bool bShift,bool bCtrl);
+ void OnVK_UP(bool bShift,bool bCtrl);
+ void OnVK_DOWN(bool bShift,bool bCtrl);
+ void OnVK_LEFT(bool bShift,bool bCtrl);
+ void OnVK_RIGHT(bool bShift,bool bCtrl);
+ void OnVK_HOME(bool bShift,bool bCtrl);
+ void OnVK_END(bool bShift,bool bCtrl);
+ void OnVK(int32_t nItemIndex,bool bShift,bool bCtrl);
+ bool OnChar(FX_WORD nChar,bool bShift,bool bCtrl);
virtual CPDF_Point InToOut(const CPDF_Point & point) const;
virtual CPDF_Point OutToIn(const CPDF_Point & point) const;
@@ -341,23 +341,23 @@ public:
CFX_WideString GetText() const;
private:
- void SetMultipleSelect(int32_t nItemIndex, FX_BOOL bSelected);
+ void SetMultipleSelect(int32_t nItemIndex, bool bSelected);
void SetSingleSelect(int32_t nItemIndex);
void InvalidateItem(int32_t nItemIndex);
void SelectItems();
- FX_BOOL IsItemVisible(int32_t nItemIndex) const;
+ bool IsItemVisible(int32_t nItemIndex) const;
void SetScrollInfo();
void SetScrollPosY(FX_FLOAT fy);
virtual void ReArrange(int32_t nItemIndex);
private:
IFX_List_Notify* m_pNotify;
- FX_BOOL m_bNotifyFlag;
+ bool m_bNotifyFlag;
CPDF_Point m_ptScrollPos;
CPLST_Select m_aSelItems; //for multiple
int32_t m_nSelItem; //for single
int32_t m_nFootIndex; //for multiple
- FX_BOOL m_bCtrlSel; //for multiple
+ bool m_bCtrlSel; //for multiple
int32_t m_nCaretIndex; //for multiple
};
diff --git a/fpdfsdk/include/javascript/Document.h b/fpdfsdk/include/javascript/Document.h
index b6447fda2a..eae3e0730d 100644
--- a/fpdfsdk/include/javascript/Document.h
+++ b/fpdfsdk/include/javascript/Document.h
@@ -16,14 +16,14 @@ public:
virtual ~PrintParamsObj(){}
public:
- FX_BOOL bUI;
+ bool bUI;
int nStart;
int nEnd;
- FX_BOOL bSilent;
- FX_BOOL bShrinkToFit;
- FX_BOOL bPrintAsImage;
- FX_BOOL bReverse;
- FX_BOOL bAnnotations;
+ bool bSilent;
+ bool bShrinkToFit;
+ bool bPrintAsImage;
+ bool bReverse;
+ bool bAnnotations;
};
class CJS_PrintParamsObj : public CJS_Object
@@ -85,84 +85,84 @@ public:
virtual ~Document();
public:
- FX_BOOL ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL author(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL bookmarkRoot(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL Collab(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL creationDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL creator(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL dirty(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL external(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL filesize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL keywords(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL layout(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL modDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL mouseX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL mouseY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL numFields(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL numPages(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL pageNum(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL pageWindowRect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL path(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL producer(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL subject(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL title(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL zoom(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL zoomType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool author(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool bookmarkRoot(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool Collab(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool creationDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool creator(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool dirty(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool external(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool filesize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool keywords(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool layout(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool modDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool mouseX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool mouseY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool numFields(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool numPages(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool pageNum(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool pageWindowRect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool path(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool producer(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool subject(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool title(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool zoom(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool zoomType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL addAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL addField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL addLink(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL calculateNow(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL closeDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL createDataObject(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL deletePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL exportAsText(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL exportAsFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL exportAsXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL extractPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getAnnots(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getAnnot3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getAnnots3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getLinks(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getNthFieldName(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getOCGs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getPageBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getPageNthWordQuads(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getPrintParams(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL importAnFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL importAnXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL importTextData(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL insertPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL print(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL removeField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL replacePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL resetForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL saveAs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL removeIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool addAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool addField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool addLink(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool calculateNow(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool closeDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool createDataObject(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool deletePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool exportAsText(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool exportAsFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool exportAsXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool extractPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getAnnots(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getAnnot3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getAnnots3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getLinks(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getNthFieldName(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getOCGs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getPageBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getPageNthWordQuads(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getPrintParams(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool importAnFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool importAnXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool importTextData(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool insertPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool print(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool removeField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool replacePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool resetForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool saveAs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool removeIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
public:
void AttachDoc(CPDFSDK_Document* pDoc);
CPDFSDK_Document* GetReaderDoc();
- static FX_BOOL ExtractFileName(CPDFSDK_Document* pDoc, CFX_ByteString& strFileName);
- static FX_BOOL ExtractFolderName(CPDFSDK_Document* pDoc, CFX_ByteString& strFolderName);
+ static bool ExtractFileName(CPDFSDK_Document* pDoc, CFX_ByteString& strFileName);
+ static bool ExtractFolderName(CPDFSDK_Document* pDoc, CFX_ByteString& strFolderName);
void AddDelayData(CJS_DelayData* pData);
void DoFieldDelay(const CFX_WideString& sFieldName, int nControlIndex);
void AddDelayAnnotData(CJS_AnnotObj *pData);
@@ -176,7 +176,7 @@ private:
bool IsEnclosedInRect(CFX_FloatRect rect, CFX_FloatRect LinkRect);
int CountWords(CPDF_TextObject* pTextObj);
CFX_WideString GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex);
- FX_BOOL ParserParams(JSObject *pObj,CJS_AnnotObj& annotobj);
+ bool ParserParams(JSObject *pObj,CJS_AnnotObj& annotobj);
v8::Isolate* m_isolate;
IconTree* m_pIconTree;
@@ -193,7 +193,7 @@ public:
CJS_Document(JSFXObject pObject) : CJS_Object(pObject) {};
virtual ~CJS_Document(){};
- virtual FX_BOOL InitInstance(IFXJS_Context* cc);
+ virtual bool InitInstance(IFXJS_Context* cc);
DECLARE_JS_CLASS(CJS_Document);
diff --git a/fpdfsdk/include/javascript/Field.h b/fpdfsdk/include/javascript/Field.h
index 70d1d39b48..2a6ba7d1ce 100644
--- a/fpdfsdk/include/javascript/Field.h
+++ b/fpdfsdk/include/javascript/Field.h
@@ -103,85 +103,85 @@ public:
Field(CJS_Object* pJSObject);
virtual ~Field(void);
- FX_BOOL alignment(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL borderStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL buttonAlignX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL buttonAlignY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL buttonFitBounds(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL buttonPosition(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL buttonScaleHow(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL buttonScaleWhen(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL calcOrderIndex(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL charLimit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL comb(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL commitOnSelChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL currentValueIndices(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL defaultStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL defaultValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL doNotScroll(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL doNotSpellCheck(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL display(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL doc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL editable(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL exportValues(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL fileSelect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL fillColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL hidden(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL highlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL lineWidth(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL multiline(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL multipleSelection(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL numItems(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL page(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL password(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL print(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL radiosInUnison(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL readonly(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL rect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL required(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL richText(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL richValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL rotation(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL strokeColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL style(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL submitName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL textColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL textFont(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL textSize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL userName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL valueAsString(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool alignment(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool borderStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool buttonAlignX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool buttonAlignY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool buttonFitBounds(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool buttonPosition(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool buttonScaleHow(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool buttonScaleWhen(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool calcOrderIndex(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool charLimit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool comb(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool commitOnSelChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool currentValueIndices(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool defaultStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool defaultValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool doNotScroll(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool doNotSpellCheck(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool display(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool doc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool editable(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool exportValues(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool fileSelect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool fillColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool hidden(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool highlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool lineWidth(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool multiline(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool multipleSelection(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool numItems(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool page(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool password(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool print(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool radiosInUnison(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool readonly(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool rect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool required(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool richText(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool richValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool rotation(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool strokeColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool style(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool submitName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool textColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool textFont(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool textSize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool userName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool valueAsString(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL browseForFileToSubmit(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL buttonGetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL buttonGetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL buttonImportIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL buttonSetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL buttonSetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL checkThisBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL clearItems(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL defaultIsChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL deleteItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getArray(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL getLock(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL insertItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL isBoxChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL isDefaultChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL setAction(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL setFocus(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL setItems(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL setLock(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL signatureGetModifications(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL signatureGetSeedValue(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL signatureInfo(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL signatureSetSeedValue(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL signatureSign(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL signatureValidate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool browseForFileToSubmit(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool buttonGetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool buttonGetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool buttonImportIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool buttonSetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool buttonSetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool checkThisBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool clearItems(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool defaultIsChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool deleteItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getArray(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool getLock(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool insertItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool isBoxChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool isDefaultChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool setAction(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool setFocus(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool setItems(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool setLock(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool signatureGetModifications(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool signatureGetSeedValue(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool signatureInfo(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool signatureSetSeedValue(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool signatureSign(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool signatureValidate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
public:
static void SetAlignment(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CFX_ByteString& string);
@@ -225,9 +225,9 @@ public:
const CFX_WideString& sName, const CPDF_Rect& rcCoords);
public:
static void UpdateFormField(CPDFSDK_Document* pDocument, CPDF_FormField* pFormField,
- FX_BOOL bChangeMark, FX_BOOL bResetAP, FX_BOOL bRefresh);
+ bool bChangeMark, bool bResetAP, bool bRefresh);
static void UpdateFormControl(CPDFSDK_Document* pDocument, CPDF_FormControl* pFormControl,
- FX_BOOL bChangeMark, FX_BOOL bResetAP, FX_BOOL bRefresh);
+ bool bChangeMark, bool bResetAP, bool bRefresh);
static CPDFSDK_Widget* GetWidget(CPDFSDK_Document* pDocument, CPDF_FormControl* pFormControl);
static void GetFormFields(CPDFSDK_Document* pDocument, const CFX_WideString& csFieldName, CFX_PtrArray& FieldsArray);
@@ -235,14 +235,14 @@ public:
static void DoDelay(CPDFSDK_Document* pDocument, CJS_DelayData* pData);
public:
- FX_BOOL AttachField(Document* pDocument, const CFX_WideString& csFieldName);
- void SetDelay(FX_BOOL bDelay);
+ bool AttachField(Document* pDocument, const CFX_WideString& csFieldName);
+ void SetDelay(bool bDelay);
void SetIsolate(v8::Isolate* isolate) {m_isolate = isolate;}
protected:
void ParseFieldName(const std::wstring &strFieldNameParsed,std::wstring &strFieldName,int & iControlNo);
void GetFormFields(const CFX_WideString& csFieldName, CFX_PtrArray& FieldsArray);
CPDF_FormControl* GetSmartFieldControl(CPDF_FormField* pFormField);
- FX_BOOL ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel);
+ bool ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel);
void AddDelay_Int(enum FIELD_PROP prop, int32_t n);
void AddDelay_Bool(enum FIELD_PROP prop,bool b);
@@ -259,9 +259,9 @@ public:
CPDFSDK_Document* m_pDocument;
CFX_WideString m_FieldName;
int m_nFormControlIndex;
- FX_BOOL m_bCanSet;
+ bool m_bCanSet;
- FX_BOOL m_bDelay;
+ bool m_bDelay;
v8::Isolate* m_isolate;
};
@@ -271,7 +271,7 @@ public:
CJS_Field(JSFXObject pObject) : CJS_Object(pObject) {};
virtual ~CJS_Field(void){};
- virtual FX_BOOL InitInstance(IFXJS_Context* cc);
+ virtual bool InitInstance(IFXJS_Context* cc);
DECLARE_JS_CLASS(CJS_Field);
diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h
index 783b249ff6..37e12dccf8 100644
--- a/fpdfsdk/include/javascript/IJavaScript.h
+++ b/fpdfsdk/include/javascript/IJavaScript.h
@@ -19,8 +19,8 @@ class IFXJS_Context
{
public:
virtual ~IFXJS_Context() { }
- virtual FX_BOOL Compile(const CFX_WideString& script, CFX_WideString& info) = 0;
- virtual FX_BOOL RunScript(const CFX_WideString& script, CFX_WideString& info) = 0;
+ virtual bool Compile(const CFX_WideString& script, CFX_WideString& info) = 0;
+ virtual bool RunScript(const CFX_WideString& script, CFX_WideString& info) = 0;
virtual void OnApp_Init() = 0;
@@ -36,32 +36,32 @@ public:
virtual void OnPage_InView(CPDFSDK_Document* pTarget) = 0;
virtual void OnPage_OutView(CPDFSDK_Document* pTarget) = 0;
- virtual void OnField_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget) = 0;
- virtual void OnField_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget) = 0;
- virtual void OnField_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget) = 0;
- virtual void OnField_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget) = 0;
- virtual void OnField_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, const CFX_WideString& Value) = 0;
- virtual void OnField_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, const CFX_WideString& Value) = 0;
+ virtual void OnField_MouseDown(bool bModifier, bool bShift, CPDF_FormField* pTarget) = 0;
+ virtual void OnField_MouseEnter(bool bModifier, bool bShift, CPDF_FormField* pTarget) = 0;
+ virtual void OnField_MouseExit(bool bModifier, bool bShift, CPDF_FormField* pTarget) = 0;
+ virtual void OnField_MouseUp(bool bModifier, bool bShift, CPDF_FormField* pTarget) = 0;
+ virtual void OnField_Focus(bool bModifier, bool bShift, CPDF_FormField* pTarget, const CFX_WideString& Value) = 0;
+ virtual void OnField_Blur(bool bModifier, bool bShift, CPDF_FormField* pTarget, const CFX_WideString& Value) = 0;
- virtual void OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc) = 0;
- virtual void OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit) = 0;
+ virtual void OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, CFX_WideString& Value, bool& bRc) = 0;
+ virtual void OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, bool bWillCommit) = 0;
virtual void OnField_Keystroke(CFX_WideString& strChange, const CFX_WideString& strChangeEx,
- FX_BOOL KeyDown, FX_BOOL bModifier, int &nSelEnd,int &nSelStart, FX_BOOL bShift,
- CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit,
- FX_BOOL bFieldFull, FX_BOOL &bRc) = 0;
- virtual void OnField_Validate(CFX_WideString& strChange, const CFX_WideString& strChangeEx, FX_BOOL bKeyDown,
- FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc) = 0;
-
- virtual void OnScreen_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen) = 0;
- virtual void OnScreen_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen) = 0;
- virtual void OnScreen_Open(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen) = 0;
- virtual void OnScreen_Close(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen) = 0;
- virtual void OnScreen_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen) = 0;
- virtual void OnScreen_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen) = 0;
- virtual void OnScreen_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen) = 0;
- virtual void OnScreen_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen) = 0;
- virtual void OnScreen_InView(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen) = 0;
- virtual void OnScreen_OutView(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen) = 0;
+ bool KeyDown, bool bModifier, int &nSelEnd,int &nSelStart, bool bShift,
+ CPDF_FormField* pTarget, CFX_WideString& Value, bool bWillCommit,
+ bool bFieldFull, bool &bRc) = 0;
+ virtual void OnField_Validate(CFX_WideString& strChange, const CFX_WideString& strChangeEx, bool bKeyDown,
+ bool bModifier, bool bShift, CPDF_FormField* pTarget, CFX_WideString& Value, bool& bRc) = 0;
+
+ virtual void OnScreen_Focus(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen) = 0;
+ virtual void OnScreen_Blur(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen) = 0;
+ virtual void OnScreen_Open(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen) = 0;
+ virtual void OnScreen_Close(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen) = 0;
+ virtual void OnScreen_MouseDown(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen) = 0;
+ virtual void OnScreen_MouseUp(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen) = 0;
+ virtual void OnScreen_MouseEnter(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen) = 0;
+ virtual void OnScreen_MouseExit(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen) = 0;
+ virtual void OnScreen_InView(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen) = 0;
+ virtual void OnScreen_OutView(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen) = 0;
virtual void OnBookmark_MouseUp(CPDF_Bookmark* pBookMark) = 0;
virtual void OnLink_MouseUp(CPDFSDK_Document* pTarget) = 0;
@@ -71,7 +71,7 @@ public:
virtual void OnConsole_Exec() = 0;
virtual void OnExternal_Exec() = 0;
- virtual void EnableMessageBox(FX_BOOL bEnable) = 0;
+ virtual void EnableMessageBox(bool bEnable) = 0;
};
class IFXJS_Runtime
@@ -94,7 +94,7 @@ class CJS_GlobalData;
class CJS_RuntimeFactory
{
public:
- CJS_RuntimeFactory():m_bInit(FALSE),m_nRef(0),m_pGlobalData(NULL),m_nGlobalDataCount(0) {}
+ CJS_RuntimeFactory():m_bInit(false),m_nRef(0),m_pGlobalData(NULL),m_nGlobalDataCount(0) {}
~CJS_RuntimeFactory();
IFXJS_Runtime* NewJSRuntime(CPDFDoc_Environment* pApp);
void DeleteJSRuntime(IFXJS_Runtime* pRuntime);
@@ -104,7 +104,7 @@ public:
CJS_GlobalData* NewGlobalData(CPDFDoc_Environment* pApp);
void ReleaseGlobalData();
private:
- FX_BOOL m_bInit;
+ bool m_bInit;
int m_nRef;
CJS_GlobalData* m_pGlobalData;
int32_t m_nGlobalDataCount;
diff --git a/fpdfsdk/include/javascript/Icon.h b/fpdfsdk/include/javascript/Icon.h
index 0298005f00..367db7bc49 100644
--- a/fpdfsdk/include/javascript/Icon.h
+++ b/fpdfsdk/include/javascript/Icon.h
@@ -14,7 +14,7 @@ class Icon : public CJS_EmbedObj
public:
Icon(CJS_Object* pJSObject);
virtual ~Icon();
- FX_BOOL name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
void SetStream(CPDF_Stream* pIconStream);
CPDF_Stream* GetStream();
void SetIconName(CFX_WideString name);
diff --git a/fpdfsdk/include/javascript/JS_Context.h b/fpdfsdk/include/javascript/JS_Context.h
index 2e2cf37a5e..79d01a02f8 100644
--- a/fpdfsdk/include/javascript/JS_Context.h
+++ b/fpdfsdk/include/javascript/JS_Context.h
@@ -21,8 +21,8 @@ public:
virtual ~CJS_Context();
public:
- virtual FX_BOOL Compile(const CFX_WideString& script, CFX_WideString& info);
- virtual FX_BOOL RunScript(const CFX_WideString& script, CFX_WideString& info);
+ virtual bool Compile(const CFX_WideString& script, CFX_WideString& info);
+ virtual bool RunScript(const CFX_WideString& script, CFX_WideString& info);
public:
virtual void OnApp_Init();
@@ -39,32 +39,32 @@ public:
virtual void OnPage_InView(CPDFSDK_Document* pTarget);
virtual void OnPage_OutView(CPDFSDK_Document* pTarget);
- virtual void OnField_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget);
- virtual void OnField_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget);
- virtual void OnField_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget);
- virtual void OnField_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget);
- virtual void OnField_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, const CFX_WideString& Value);
- virtual void OnField_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, const CFX_WideString& Value);
+ virtual void OnField_MouseDown(bool bModifier, bool bShift, CPDF_FormField *pTarget);
+ virtual void OnField_MouseEnter(bool bModifier, bool bShift, CPDF_FormField *pTarget);
+ virtual void OnField_MouseExit(bool bModifier, bool bShift, CPDF_FormField *pTarget);
+ virtual void OnField_MouseUp(bool bModifier, bool bShift, CPDF_FormField *pTarget);
+ virtual void OnField_Focus(bool bModifier, bool bShift, CPDF_FormField* pTarget, const CFX_WideString& Value);
+ virtual void OnField_Blur(bool bModifier, bool bShift, CPDF_FormField* pTarget, const CFX_WideString& Value);
- virtual void OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc);
- virtual void OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit);
+ virtual void OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, CFX_WideString& Value, bool& bRc);
+ virtual void OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, bool bWillCommit);
virtual void OnField_Keystroke(CFX_WideString& strChange, const CFX_WideString& strChangeEx,
- FX_BOOL bKeyDown, FX_BOOL bModifier, int &nSelEnd,int &nSelStart, FX_BOOL bShift,
- CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit,
- FX_BOOL bFieldFull, FX_BOOL &bRc);
- virtual void OnField_Validate(CFX_WideString& strChange, const CFX_WideString& strChangeEx, FX_BOOL bKeyDown,
- FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc);
-
- virtual void OnScreen_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- virtual void OnScreen_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- virtual void OnScreen_Open(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- virtual void OnScreen_Close(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- virtual void OnScreen_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- virtual void OnScreen_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- virtual void OnScreen_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- virtual void OnScreen_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- virtual void OnScreen_InView(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- virtual void OnScreen_OutView(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
+ bool bKeyDown, bool bModifier, int &nSelEnd,int &nSelStart, bool bShift,
+ CPDF_FormField* pTarget, CFX_WideString& Value, bool bWillCommit,
+ bool bFieldFull, bool &bRc);
+ virtual void OnField_Validate(CFX_WideString& strChange, const CFX_WideString& strChangeEx, bool bKeyDown,
+ bool bModifier, bool bShift, CPDF_FormField* pTarget, CFX_WideString& Value, bool& bRc);
+
+ virtual void OnScreen_Focus(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ virtual void OnScreen_Blur(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ virtual void OnScreen_Open(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ virtual void OnScreen_Close(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ virtual void OnScreen_MouseDown(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ virtual void OnScreen_MouseUp(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ virtual void OnScreen_MouseEnter(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ virtual void OnScreen_MouseExit(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ virtual void OnScreen_InView(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ virtual void OnScreen_OutView(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
virtual void OnBookmark_MouseUp(CPDF_Bookmark* pBookMark);
virtual void OnLink_MouseUp(CPDFSDK_Document* pTarget);
@@ -74,14 +74,14 @@ public:
virtual void OnConsole_Exec();
virtual void OnExternal_Exec();
- virtual void EnableMessageBox(FX_BOOL bEnable) {m_bMsgBoxEnable = bEnable;}
- FX_BOOL IsMsgBoxEnabled() const {return m_bMsgBoxEnable;}
+ virtual void EnableMessageBox(bool bEnable) {m_bMsgBoxEnable = bEnable;}
+ bool IsMsgBoxEnabled() const {return m_bMsgBoxEnable;}
public:
CPDFDoc_Environment* GetReaderApp();
CJS_Runtime* GetJSRuntime(){return m_pRuntime;}
- FX_BOOL DoJob(int nMode, const CFX_WideString& script, CFX_WideString& info);
+ bool DoJob(int nMode, const CFX_WideString& script, CFX_WideString& info);
CJS_EventHandler* GetEventHandler(){return m_pEventHandler;};
CPDFSDK_Document* GetReaderDocument();
@@ -90,8 +90,8 @@ private:
CJS_Runtime* m_pRuntime;
CJS_EventHandler* m_pEventHandler;
- FX_BOOL m_bBusy;
- FX_BOOL m_bMsgBoxEnable;
+ bool m_bBusy;
+ bool m_bMsgBoxEnable;
};
#endif // FPDFSDK_INCLUDE_JAVASCRIPT_JS_CONTEXT_H_
diff --git a/fpdfsdk/include/javascript/JS_Define.h b/fpdfsdk/include/javascript/JS_Define.h
index f1b36bf3d0..087f489126 100644
--- a/fpdfsdk/include/javascript/JS_Define.h
+++ b/fpdfsdk/include/javascript/JS_Define.h
@@ -51,7 +51,7 @@ struct JSMethodSpec
/* ======================================== PROP CALLBACK ============================================ */
-template <class C, FX_BOOL (C::*M)(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)>
+template <class C, bool (C::*M)(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)>
void JSPropGetter(const char* prop_name_string,
const char* class_name_string,
v8::Local<v8::String> property,
@@ -74,7 +74,7 @@ void JSPropGetter(const char* prop_name_string,
info.GetReturnValue().Set((v8::Local<v8::Value>)value);
}
-template <class C, FX_BOOL (C::*M)(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)>
+template <class C, bool (C::*M)(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)>
void JSPropSetter(const char* prop_name_string,
const char* class_name_string,
v8::Local<v8::String> property,
@@ -113,7 +113,7 @@ void JSPropSetter(const char* prop_name_string,
/* ========================================= METHOD CALLBACK =========================================== */
-template <class C, FX_BOOL (C::*M)(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)>
+template <class C, bool (C::*M)(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)>
void JSMethod(const char* method_name_string,
const char* class_name_string,
const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -240,7 +240,7 @@ void JSSpecialPropQuery(const char *, v8::Local<v8::String> property,const v8::P
CFX_WideString propname = CFX_WideString::FromUTF8(*utf8_value, utf8_value.length());
CJS_Object* pJSObj = reinterpret_cast<CJS_Object*>(JS_GetPrivate(isolate, info.Holder()));
Alt* pObj = reinterpret_cast<Alt*>(pJSObj->GetEmbedObject());
- FX_BOOL bRet = pObj->QueryProperty(propname.c_str());
+ bool bRet = pObj->QueryProperty(propname.c_str());
info.GetReturnValue().Set(bRet ? 4 : 0);
}
@@ -382,7 +382,7 @@ int js_class_name::Init(IJS_Runtime* pRuntime, FXJSOBJTYPE eObjType)\
/* ======================================== GLOBAL METHODS ============================================ */
-template <FX_BOOL (*F)(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)>
+template <bool (*F)(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)>
void JSGlobalFunc(const char *func_name_string,
const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
diff --git a/fpdfsdk/include/javascript/JS_EventHandler.h b/fpdfsdk/include/javascript/JS_EventHandler.h
index 62afb829e7..9977462094 100644
--- a/fpdfsdk/include/javascript/JS_EventHandler.h
+++ b/fpdfsdk/include/javascript/JS_EventHandler.h
@@ -79,32 +79,32 @@ public:
void OnPage_InView(CPDFSDK_Document* pTarget);
void OnPage_OutView(CPDFSDK_Document* pTarget);
- void OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc);
- void OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit);
+ void OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, CFX_WideString& Value, bool& bRc);
+ void OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, bool bWillCommit);
void OnField_Keystroke(CFX_WideString& strChange, const CFX_WideString& strChangeEx,
- FX_BOOL KeyDown, FX_BOOL bModifier, int &nSelEnd,int &nSelStart, FX_BOOL bShift,
- CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit,
- FX_BOOL bFieldFull, FX_BOOL &bRc);
- void OnField_Validate(CFX_WideString& strChange, const CFX_WideString& strChangeEx, FX_BOOL bKeyDown,
- FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc);
-
- void OnField_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget);
- void OnField_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget);
- void OnField_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget);
- void OnField_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget);
- void OnField_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, const CFX_WideString& Value);
- void OnField_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, const CFX_WideString& Value);
-
- void OnScreen_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- void OnScreen_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- void OnScreen_Open(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- void OnScreen_Close(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- void OnScreen_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- void OnScreen_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- void OnScreen_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- void OnScreen_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- void OnScreen_InView(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
- void OnScreen_OutView(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen);
+ bool KeyDown, bool bModifier, int &nSelEnd,int &nSelStart, bool bShift,
+ CPDF_FormField* pTarget, CFX_WideString& Value, bool bWillCommit,
+ bool bFieldFull, bool &bRc);
+ void OnField_Validate(CFX_WideString& strChange, const CFX_WideString& strChangeEx, bool bKeyDown,
+ bool bModifier, bool bShift, CPDF_FormField* pTarget, CFX_WideString& Value, bool& bRc);
+
+ void OnField_MouseDown(bool bModifier, bool bShift, CPDF_FormField *pTarget);
+ void OnField_MouseEnter(bool bModifier, bool bShift, CPDF_FormField *pTarget);
+ void OnField_MouseExit(bool bModifier, bool bShift, CPDF_FormField *pTarget);
+ void OnField_MouseUp(bool bModifier, bool bShift, CPDF_FormField *pTarget);
+ void OnField_Blur(bool bModifier, bool bShift, CPDF_FormField* pTarget, const CFX_WideString& Value);
+ void OnField_Focus(bool bModifier, bool bShift, CPDF_FormField* pTarget, const CFX_WideString& Value);
+
+ void OnScreen_Focus(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ void OnScreen_Blur(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ void OnScreen_Open(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ void OnScreen_Close(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ void OnScreen_MouseDown(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ void OnScreen_MouseUp(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ void OnScreen_MouseEnter(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ void OnScreen_MouseExit(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ void OnScreen_InView(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
+ void OnScreen_OutView(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen);
void OnBookmark_MouseUp(CPDF_Bookmark* pBookMark);
void OnLink_MouseUp(CPDFSDK_Document* pTarget);
@@ -117,25 +117,25 @@ public:
public:
void Initial(JS_EVENT_T type);
void Destroy();
- FX_BOOL IsValid();
+ bool IsValid();
CFX_WideString& Change();
CFX_WideString ChangeEx();
int CommitKey();
- FX_BOOL FieldFull();
- FX_BOOL KeyDown();
- FX_BOOL Modifier();
+ bool FieldFull();
+ bool KeyDown();
+ bool Modifier();
const FX_WCHAR* Name();
const FX_WCHAR* Type();
- FX_BOOL& Rc();
+ bool& Rc();
int& SelEnd();
int& SelStart();
- FX_BOOL Shift();
+ bool Shift();
Field* Source();
Field* Target_Field();
CFX_WideString& Value();
- FX_BOOL WillCommit();
+ bool WillCommit();
CFX_WideString TargetName();
JS_EVENT_T EventType() {return m_eEventType;};
@@ -143,7 +143,7 @@ public:
public:
CJS_Context* m_pJSContext;
JS_EVENT_T m_eEventType;
- FX_BOOL m_bValid;
+ bool m_bValid;
CFX_WideString m_strTargetName;
CFX_WideString m_strSourceName;
@@ -151,18 +151,18 @@ public:
CFX_WideString m_WideStrChangeDu;
CFX_WideString m_WideStrChangeEx;
int m_nCommitKey;
- FX_BOOL m_bKeyDown;
- FX_BOOL m_bModifier;
- FX_BOOL m_bShift;
+ bool m_bKeyDown;
+ bool m_bModifier;
+ bool m_bShift;
int* m_pISelEnd;
int m_nSelEndDu;
int* m_pISelStart;
int m_nSelStartDu;
- FX_BOOL m_bWillCommit;
+ bool m_bWillCommit;
CFX_WideString* m_pValue;
- FX_BOOL m_bFieldFull;
- FX_BOOL* m_pbRc;
- FX_BOOL m_bRcDu;
+ bool m_bFieldFull;
+ bool* m_pbRc;
+ bool m_bRcDu;
CPDFSDK_Document* m_pSourceDoc;
CPDF_Bookmark* m_pTargetBookMark;
diff --git a/fpdfsdk/include/javascript/JS_GlobalData.h b/fpdfsdk/include/javascript/JS_GlobalData.h
index b3637b93d5..987de95666 100644
--- a/fpdfsdk/include/javascript/JS_GlobalData.h
+++ b/fpdfsdk/include/javascript/JS_GlobalData.h
@@ -56,7 +56,7 @@ public:
virtual ~CJS_GlobalData_Element(){}
CJS_KeyValue data;
- FX_BOOL bPersistent;
+ bool bPersistent;
};
class CJS_GlobalData
@@ -72,8 +72,8 @@ public:
void SetGlobalVariableObject(const FX_CHAR* propname, const CJS_GlobalVariableArray& array);
void SetGlobalVariableNull(const FX_CHAR* propname);
- FX_BOOL SetGlobalVariablePersistent(const FX_CHAR* propname, FX_BOOL bPersistent);
- FX_BOOL DeleteGlobalVariable(const FX_CHAR* propname);
+ bool SetGlobalVariablePersistent(const FX_CHAR* propname, bool bPersistent);
+ bool DeleteGlobalVariable(const FX_CHAR* propname);
int32_t GetSize() const;
CJS_GlobalData_Element* GetAt(int index) const;
diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h
index 3898d184d1..f8ec90e3c4 100644
--- a/fpdfsdk/include/javascript/JS_Object.h
+++ b/fpdfsdk/include/javascript/JS_Object.h
@@ -48,11 +48,11 @@ public:
void MakeWeak();
void Dispose();
- virtual FX_BOOL IsType(const FX_CHAR* sClassName){return TRUE;};
+ virtual bool IsType(const FX_CHAR* sClassName){return true;};
virtual CFX_ByteString GetClassName(){return "";};
- virtual FX_BOOL InitInstance(IFXJS_Context* cc){return TRUE;};
- virtual FX_BOOL ExitInstance(){return TRUE;};
+ virtual bool InitInstance(IFXJS_Context* cc){return true;};
+ virtual bool ExitInstance(){return true;};
operator JSFXObject () {return v8::Local<v8::Object>::New(m_pIsolate, m_pObject);}
operator CJS_EmbedObj* (){return m_pEmbedObj;};
@@ -172,7 +172,7 @@ public:
CJS_Timer(CJS_EmbedObj * pObj,CPDFDoc_Environment* pApp):
m_nTimerID(0),
m_pEmbedObj(pObj),
- m_bProcessing(FALSE),
+ m_bProcessing(false),
m_dwStartTime(0),
m_dwTimeOut(0),
m_dwElapse(0),
@@ -265,9 +265,9 @@ public:
{
if (!pTimer->m_bProcessing)
{
- pTimer->m_bProcessing = TRUE;
+ pTimer->m_bProcessing = true;
if (pTimer->m_pEmbedObj) pTimer->m_pEmbedObj->TimerProc(pTimer);
- pTimer->m_bProcessing = FALSE;
+ pTimer->m_bProcessing = false;
}
else
{
@@ -279,7 +279,7 @@ public:
private:
FX_UINT m_nTimerID;
CJS_EmbedObj* m_pEmbedObj;
- FX_BOOL m_bProcessing;
+ bool m_bProcessing;
//data
FX_DWORD m_dwStartTime;
diff --git a/fpdfsdk/include/javascript/JS_Runtime.h b/fpdfsdk/include/javascript/JS_Runtime.h
index 8fdfa8b733..b9ad6efc47 100644
--- a/fpdfsdk/include/javascript/JS_Runtime.h
+++ b/fpdfsdk/include/javascript/JS_Runtime.h
@@ -44,15 +44,15 @@ public:
CPDFDoc_Environment * GetReaderApp(){return m_pApp;}
- FX_BOOL InitJSObjects();
+ bool InitJSObjects();
- FX_BOOL AddEventToLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType);
+ bool AddEventToLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType);
void RemoveEventInLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType);
void RemoveEventsInLoop(CJS_FieldEvent* pStart);
- void BeginBlock(){m_bBlocking = TRUE;}
- void EndBlock(){m_bBlocking = FALSE;}
- FX_BOOL IsBlocking(){return m_bBlocking;}
+ void BeginBlock(){m_bBlocking = true;}
+ void EndBlock(){m_bBlocking = false;}
+ bool IsBlocking(){return m_bBlocking;}
operator IJS_Runtime*() {return (IJS_Runtime*)m_isolate;}
v8::Isolate* GetIsolate(){return m_isolate;};
@@ -63,7 +63,7 @@ protected:
CFX_ArrayTemplate<CJS_Context*> m_ContextArray;
CPDFDoc_Environment* m_pApp;
CPDFSDK_Document* m_pDocument;
- FX_BOOL m_bBlocking;
+ bool m_bBlocking;
CJS_FieldEvent* m_pFieldEventPath;
v8::Isolate* m_isolate;
diff --git a/fpdfsdk/include/javascript/JS_Value.h b/fpdfsdk/include/javascript/JS_Value.h
index 6186817fa5..035cef064d 100644
--- a/fpdfsdk/include/javascript/JS_Value.h
+++ b/fpdfsdk/include/javascript/JS_Value.h
@@ -63,12 +63,12 @@ public:
void operator = (const FX_CHAR* pStr);
void operator = (CJS_Value value);
- FX_BOOL IsArrayObject() const;
- FX_BOOL IsDateObject() const;
+ bool IsArrayObject() const;
+ bool IsDateObject() const;
FXJSVALUETYPE GetType() const;
- FX_BOOL ConvertToArray(CJS_Array &) const;
- FX_BOOL ConvertToDate(CJS_Date &) const;
+ bool ConvertToArray(CJS_Array &) const;
+ bool ConvertToDate(CJS_Date &) const;
v8::Isolate* GetIsolate() {return m_isolate;}
protected:
@@ -95,8 +95,8 @@ public:
CJS_PropValue(v8::Isolate* isolate);
~CJS_PropValue();
public:
- FX_BOOL IsSetting();
- FX_BOOL IsGetting();
+ bool IsSetting();
+ bool IsGetting();
void operator<<(int);
void operator>>(int&) const;
void operator<<(bool);
@@ -122,7 +122,7 @@ public:
void StartSetting();
void StartGetting();
private:
- FX_BOOL m_bIsSetting;
+ bool m_bIsSetting;
};
class CJS_Array
@@ -135,7 +135,7 @@ public:
void GetElement(unsigned index,CJS_Value &value);
void SetElement(unsigned index,CJS_Value value);
int GetLength();
- FX_BOOL IsAttached();
+ bool IsAttached();
operator v8::Local<v8::Array>();
v8::Isolate* GetIsolate() {return m_isolate;}
@@ -179,7 +179,7 @@ public:
static double MakeDate(int year, int mon, int mday,int hour, int min, int sec,int ms);
- FX_BOOL IsValidDate();
+ bool IsValidDate();
protected:
v8::Local<v8::Value> m_pDate;
diff --git a/fpdfsdk/include/javascript/PublicMethods.h b/fpdfsdk/include/javascript/PublicMethods.h
index cff9e11479..7fca363a11 100644
--- a/fpdfsdk/include/javascript/PublicMethods.h
+++ b/fpdfsdk/include/javascript/PublicMethods.h
@@ -16,28 +16,28 @@ public:
virtual ~CJS_PublicMethods(void){};
public:
- static FX_BOOL AFNumber_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFNumber_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFPercent_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFPercent_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFDate_FormatEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFDate_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFDate_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFDate_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFTime_FormatEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); //
- static FX_BOOL AFTime_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFTime_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFTime_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFSpecial_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFSpecial_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFSpecial_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);//
- static FX_BOOL AFSimple(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFMakeNumber(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFSimple_Calculate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFRange_Validate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFMergeChange(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFParseDateEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFExtractNums(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFNumber_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFNumber_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFPercent_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFPercent_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFDate_FormatEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFDate_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFDate_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFDate_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFTime_FormatEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); //
+ static bool AFTime_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFTime_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFTime_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFSpecial_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFSpecial_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFSpecial_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);//
+ static bool AFSimple(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFMakeNumber(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFSimple_Calculate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFRange_Validate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFMergeChange(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFParseDateEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ static bool AFExtractNums(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
public:
JS_STATIC_GLOBAL_FUN(AFNumber_Format);
@@ -68,13 +68,13 @@ public:
public:
static int ParseStringInteger(const CFX_WideString & string,int nStart,int & nSkip, int nMaxStep);
static CFX_WideString ParseStringString(const CFX_WideString& string, int nStart, int& nSkip);
- static double MakeRegularDate(const CFX_WideString & value,const CFX_WideString & format, FX_BOOL& bWrongFormat);
+ static double MakeRegularDate(const CFX_WideString & value,const CFX_WideString & format, bool& bWrongFormat);
static CFX_WideString MakeFormatDate(double dDate,const CFX_WideString & format);
- static FX_BOOL ConvertStringToNumber(const FX_WCHAR* swSource, double & dRet, FX_BOOL & bDot);
+ static bool ConvertStringToNumber(const FX_WCHAR* swSource, double & dRet, bool & bDot);
static double ParseStringToNumber(const FX_WCHAR* swSource);
- static double ParseNormalDate(const CFX_WideString & value, FX_BOOL& bWrongFormat);
+ static double ParseNormalDate(const CFX_WideString & value, bool& bWrongFormat);
static double MakeInterDate(CFX_WideString strValue);
- static double ParseNumber(const FX_WCHAR* swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS);
+ static double ParseNumber(const FX_WCHAR* swSource, bool& bAllDigits, bool& bDot, bool& bSign, bool& bKXJS);
public:
static CFX_WideString StrLTrim(const FX_WCHAR* pStr);
@@ -85,16 +85,16 @@ public:
static CFX_ByteString StrRTrim(const FX_CHAR* pStr);
static CFX_ByteString StrTrim(const FX_CHAR* pStr);
- static FX_BOOL IsNumber(const FX_CHAR* string);
- static FX_BOOL IsNumber(const FX_WCHAR* string);
+ static bool IsNumber(const FX_CHAR* string);
+ static bool IsNumber(const FX_WCHAR* string);
- static FX_BOOL IsDigit(char ch);
- static FX_BOOL IsDigit(wchar_t ch);
- static FX_BOOL IsAlphabetic(wchar_t ch);
- static FX_BOOL IsAlphaNumeric(wchar_t ch);
+ static bool IsDigit(char ch);
+ static bool IsDigit(wchar_t ch);
+ static bool IsAlphabetic(wchar_t ch);
+ static bool IsAlphaNumeric(wchar_t ch);
- static FX_BOOL maskSatisfied(wchar_t c_Change,wchar_t c_Mask);
- static FX_BOOL isReservedMaskChar(wchar_t ch);
+ static bool maskSatisfied(wchar_t c_Change,wchar_t c_Mask);
+ static bool isReservedMaskChar(wchar_t ch);
static double AF_Simple(const FX_WCHAR* sFuction, double dValue1, double dValue2);
static CJS_Array AF_MakeArrayFromList(v8::Isolate* isolate, CJS_Value val);
diff --git a/fpdfsdk/include/javascript/app.h b/fpdfsdk/include/javascript/app.h
index ac90e62b0d..ffd7edb4d4 100644
--- a/fpdfsdk/include/javascript/app.h
+++ b/fpdfsdk/include/javascript/app.h
@@ -110,41 +110,41 @@ public:
virtual ~app();
public:
- FX_BOOL activeDocs(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL formsVersion(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL fs(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL fullscreen(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL language(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL platform(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL runtimeHighlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL viewerType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL viewerVariation(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL viewerVersion(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
-
-
- FX_BOOL alert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL beep(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL browseForDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL clearInterval(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL clearTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL execDialog(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL execMenuItem(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL findComponent(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL goBack(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL goForward(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL launchURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL mailMsg(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL newFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL newDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL openDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL openFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL popUpMenuEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL popUpMenu(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL response(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL setInterval(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL setTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool activeDocs(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool formsVersion(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool fs(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool fullscreen(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool language(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool platform(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool runtimeHighlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool viewerType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool viewerVariation(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool viewerVersion(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+
+
+ bool alert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool beep(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool browseForDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool clearInterval(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool clearTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool execDialog(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool execMenuItem(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool findComponent(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool goBack(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool goForward(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool launchURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool mailMsg(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool newFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool newDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool openDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool openFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool popUpMenuEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool popUpMenu(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool response(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool setInterval(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool setTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
private:
// FX_DWORD AppGetTickCount();
diff --git a/fpdfsdk/include/javascript/color.h b/fpdfsdk/include/javascript/color.h
index df863b552f..ab7bbae088 100644
--- a/fpdfsdk/include/javascript/color.h
+++ b/fpdfsdk/include/javascript/color.h
@@ -16,21 +16,21 @@ public:
color(CJS_Object* pJSObject);
virtual ~color(void);
- FX_BOOL black(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL blue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL cyan(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL dkGray(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL gray(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL green(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL ltGray(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL magenta(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL red(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL transparent(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL white(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL yellow(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool black(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool blue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool cyan(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool dkGray(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool gray(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool green(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool ltGray(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool magenta(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool red(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool transparent(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool white(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool yellow(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL convert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL equal(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool convert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool equal(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
public:
static void ConvertPWLColorToArray(const CPWL_Color& color, CJS_Array& array);
diff --git a/fpdfsdk/include/javascript/console.h b/fpdfsdk/include/javascript/console.h
index 0cbc291b44..424f0e246b 100644
--- a/fpdfsdk/include/javascript/console.h
+++ b/fpdfsdk/include/javascript/console.h
@@ -16,10 +16,10 @@ public:
virtual ~console(void);
public:
- FX_BOOL clear(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL hide(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL println(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL show(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool clear(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool hide(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool println(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool show(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
};
class CJS_Console : public CJS_Object
diff --git a/fpdfsdk/include/javascript/event.h b/fpdfsdk/include/javascript/event.h
index 91a38ba487..e980a96e74 100644
--- a/fpdfsdk/include/javascript/event.h
+++ b/fpdfsdk/include/javascript/event.h
@@ -16,26 +16,26 @@ public:
virtual ~event(void);
public:
- FX_BOOL change(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL changeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL commitKey(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL fieldFull(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL keyDown(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL modifier(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL rc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL richChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL richChangeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL richValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL selEnd(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL selStart(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL shift(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL target(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL targetName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
- FX_BOOL willCommit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool change(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool changeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool commitKey(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool fieldFull(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool keyDown(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool modifier(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool rc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool richChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool richChangeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool richValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool selEnd(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool selStart(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool shift(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool target(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool targetName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ bool willCommit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
};
diff --git a/fpdfsdk/include/javascript/global.h b/fpdfsdk/include/javascript/global.h
index 83e07f67c3..4c6ccd97b0 100644
--- a/fpdfsdk/include/javascript/global.h
+++ b/fpdfsdk/include/javascript/global.h
@@ -19,10 +19,10 @@ struct js_global_data
{
nType = 0;
dData = 0;
- bData = FALSE;
+ bData = false;
sData = "";
- bPersistent = FALSE;
- bDeleted = FALSE;
+ bPersistent = false;
+ bDeleted = false;
}
~js_global_data()
@@ -45,12 +45,12 @@ public:
virtual ~global_alternate();
public:
- FX_BOOL setPersistent(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool setPersistent(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
public:
- FX_BOOL QueryProperty(const FX_WCHAR* propname);
- FX_BOOL DoProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CJS_PropValue & vp, CFX_WideString & sError);
- FX_BOOL DelProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CFX_WideString & sError);
+ bool QueryProperty(const FX_WCHAR* propname);
+ bool DoProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CJS_PropValue & vp, CFX_WideString & sError);
+ bool DelProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CFX_WideString & sError);
void Initial(CPDFDoc_Environment* pApp);
@@ -58,7 +58,7 @@ private:
void UpdateGlobalPersistentVariables();
void CommitGlobalPersisitentVariables();
void DestroyGlobalPersisitentVariables();
- FX_BOOL SetGlobalVariables(const FX_CHAR* propname, int nType,
+ bool SetGlobalVariables(const FX_CHAR* propname, int nType,
double dData, bool bData, const CFX_ByteString& sData, JSObject pData, bool bDefaultPersistent);
void ObjectToArray(v8::Local<v8::Object> pObj, CJS_GlobalVariableArray& array);
@@ -78,7 +78,7 @@ public:
CJS_Global(JSFXObject pObject) : CJS_Object(pObject) {};
virtual ~CJS_Global(void){};
- virtual FX_BOOL InitInstance(IFXJS_Context* cc);
+ virtual bool InitInstance(IFXJS_Context* cc);
DECLARE_SPECIAL_JS_CLASS(CJS_Global);
diff --git a/fpdfsdk/include/javascript/report.h b/fpdfsdk/include/javascript/report.h
index 56f742ce08..e54583385f 100644
--- a/fpdfsdk/include/javascript/report.h
+++ b/fpdfsdk/include/javascript/report.h
@@ -16,8 +16,8 @@ public:
virtual ~Report();
public:
- FX_BOOL save(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL writeText(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool save(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool writeText(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
};
class CJS_Report : public CJS_Object
diff --git a/fpdfsdk/include/javascript/util.h b/fpdfsdk/include/javascript/util.h
index ca4db349da..a2d6749eec 100644
--- a/fpdfsdk/include/javascript/util.h
+++ b/fpdfsdk/include/javascript/util.h
@@ -18,11 +18,11 @@ public:
virtual ~util(void);
public:
- FX_BOOL printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL printf(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL printx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL scand(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- FX_BOOL byteToChar(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool printf(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool printx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool scand(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ bool byteToChar(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
public:
static void printd(const std::wstring &cFormat,CJS_Date Date,bool bXFAPicture, std::wstring &cPurpose);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Button.h b/fpdfsdk/include/pdfwindow/PWL_Button.h
index 2bf2eea865..322b9d4366 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Button.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Button.h
@@ -17,11 +17,11 @@ public:
virtual CFX_ByteString GetClassName() const;
virtual void OnCreate(PWL_CREATEPARAM & cp);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
protected:
- FX_BOOL m_bMouseDown;
+ bool m_bMouseDown;
};
#endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_BUTTON_H_
diff --git a/fpdfsdk/include/pdfwindow/PWL_Caret.h b/fpdfsdk/include/pdfwindow/PWL_Caret.h
index 6838bc49e7..42743657b7 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Caret.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Caret.h
@@ -12,11 +12,11 @@
struct PWL_CARET_INFO
{
public:
- PWL_CARET_INFO() : bVisible(FALSE), ptHead(0,0), ptFoot(0,0)
+ PWL_CARET_INFO() : bVisible(false), ptHead(0,0), ptFoot(0,0)
{
}
- FX_BOOL bVisible;
+ bool bVisible;
CPDF_Point ptHead;
CPDF_Point ptFoot;
};
@@ -32,9 +32,9 @@ public:
virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream);
virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
virtual void InvalidateRect(CPDF_Rect * pRect = NULL);
- virtual void SetVisible(FX_BOOL bVisible) {}
+ virtual void SetVisible(bool bVisible) {}
virtual void TimerProc();
- void SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot);
+ void SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot);
CFX_ByteString GetCaretAppearanceStream(const CPDF_Point & ptOffset);
void SetInvalidRect(CPDF_Rect rc) {m_rcInvalid = rc;}
@@ -42,7 +42,7 @@ private:
void GetCaretApp(CFX_ByteTextBuf & sAppStream,const CPDF_Point & ptOffset);
CPDF_Rect GetCaretRect() const;
- FX_BOOL m_bFlash;
+ bool m_bFlash;
CPDF_Point m_ptHead;
CPDF_Point m_ptFoot;
FX_FLOAT m_fWidth;
diff --git a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
index 3f8604fb62..21d4e4a041 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
@@ -25,10 +25,10 @@ public:
virtual ~CPWL_CBListBox(){};
public:
- virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- FX_BOOL OnKeyDownWithExit(FX_WORD nChar, FX_BOOL & bExit, FX_DWORD nFlag);
- FX_BOOL OnCharWithExit(FX_WORD nChar, FX_BOOL & bExit, FX_DWORD nFlag);
+ bool OnKeyDownWithExit(FX_WORD nChar, bool & bExit, FX_DWORD nFlag);
+ bool OnCharWithExit(FX_WORD nChar, bool & bExit, FX_DWORD nFlag);
};
#define PWL_COMBOBOX_BUTTON_WIDTH 13
@@ -43,8 +43,8 @@ public:
virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream);
virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
};
@@ -58,8 +58,8 @@ public:
virtual CFX_ByteString GetClassName() const;
virtual void OnCreate(PWL_CREATEPARAM & cp);
- virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
@@ -71,7 +71,7 @@ public:
virtual void SetFocus();
virtual void KillFocus();
- FX_BOOL IsModified() const;
+ bool IsModified() const;
public:
void SetFillerNotify(IPWL_Filler_Notify* pNotify);
@@ -87,7 +87,7 @@ public:
void GetEditSel(int32_t & nStartChar, int32_t & nEndChar ) const;
void Clear();
void SelectAll();
- FX_BOOL IsPopup() const;
+ bool IsPopup() const;
void SetSelectText();
@@ -96,14 +96,14 @@ private:
void CreateButton(const PWL_CREATEPARAM & cp);
void CreateListBox(const PWL_CREATEPARAM & cp);
- void SetPopup(FX_BOOL bPopup);
+ void SetPopup(bool bPopup);
private:
CPWL_CBEdit* m_pEdit;
CPWL_CBButton* m_pButton;
CPWL_CBListBox* m_pList;
- FX_BOOL m_bPopup;
+ bool m_bPopup;
CPDF_Rect m_rcOldWindow;
int32_t m_nPopupWhere;
int32_t m_nSelectItem;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Edit.h b/fpdfsdk/include/pdfwindow/PWL_Edit.h
index 97147a964d..50e1ebee3c 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Edit.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Edit.h
@@ -21,11 +21,11 @@ public:
virtual ~IPWL_Filler_Notify() { }
virtual void QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax,
int32_t & nRet, FX_FLOAT & fPopupRet) = 0; //nRet: (0:bottom 1:top)
- virtual void OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode,
+ virtual void 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) = 0;
- virtual void OnAfterKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_BOOL & bExit, FX_DWORD nFlag) = 0;
+ bool bKeyDown, bool & bRC, bool & bExit, FX_DWORD nFlag) = 0;
+ virtual void OnAfterKeyStroke(bool bEditOrList, void* pPrivateData, bool & bExit, FX_DWORD nFlag) = 0;
};
class PWL_CLASS CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify
@@ -44,35 +44,35 @@ public:
virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream);
virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
virtual CPDF_Rect GetFocusRect() const;
public:
- void SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, FX_BOOL bPaint = TRUE); //0:left 1:right 2:middle
- void SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, FX_BOOL bPaint = TRUE); //0:top 1:bottom 2:center
+ void SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, bool bPaint = true); //0:left 1:right 2:middle
+ void SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, bool bPaint = true); //0:top 1:bottom 2:center
void SetCharArray(int32_t nCharArray);
void SetLimitChar(int32_t nLimitChar);
- void SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint = TRUE);
- void SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint = TRUE);
+ void SetHorzScale(int32_t nHorzScale, bool bPaint = true);
+ void SetCharSpace(FX_FLOAT fCharSpace, bool bPaint = true);
- void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE);
+ void SetLineLeading(FX_FLOAT fLineLeading, bool bPaint = true);
- void EnableSpellCheck(FX_BOOL bEnabled);
+ void EnableSpellCheck(bool bEnabled);
- FX_BOOL CanSelectAll() const;
- FX_BOOL CanClear() const;
- FX_BOOL CanCopy() const;
- FX_BOOL CanCut() const;
- FX_BOOL CanPaste() const;
+ bool CanSelectAll() const;
+ bool CanClear() const;
+ bool CanCopy() const;
+ bool CanCut() const;
+ bool CanPaste() const;
virtual void CopyText();
virtual void PasteText();
@@ -85,7 +85,7 @@ public:
CFX_ByteString GetCaretAppearanceStream(const CPDF_Point & ptOffset) const;
CFX_ByteString GetSelectAppearanceStream(const CPDF_Point & ptOffset) const;
- FX_BOOL IsTextFull() const;
+ bool IsTextFull() const;
static FX_FLOAT GetCharArrayAutoFontSize(CPDF_Font* pFont, const CPDF_Rect& rcPlate, int32_t nCharArray);
@@ -112,8 +112,8 @@ protected:
private:
CPVT_WordRange GetSelectWordRange() const;
- virtual void ShowVScrollBar(FX_BOOL bShow);
- FX_BOOL IsVScrollBarVisible() const;
+ virtual void ShowVScrollBar(bool bShow);
+ bool IsVScrollBarVisible() const;
void SetParamByFlag();
FX_FLOAT GetCharArrayAutoFontSize(int32_t nCharArray);
@@ -123,15 +123,15 @@ private:
CPVT_WordRange GetLatinWordsRange(const CPDF_Point & point) const;
CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace & place) const;
CPVT_WordRange GetArabicWordsRange(const CPVT_WordPlace & place) const;
- CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace & place, FX_BOOL bLatin, FX_BOOL bArabic) const;
+ CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace & place, bool bLatin, bool bArabic) const;
void AjustArabicWords(const CPVT_WordRange& wr);
public:
- FX_BOOL IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag);
+ bool IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag);
private:
IPWL_Filler_Notify* m_pFillerNotify;
IPWL_SpellCheck* m_pSpellCheck;
- FX_BOOL m_bFocus;
+ bool m_bFocus;
CPDF_Rect m_rcOldWindow;
public:
void AttachFFLData(void* pData) {m_pFormFiller = pData;}
diff --git a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
index 9b088b1162..e5123fd1b9 100644
--- a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
+++ b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h
@@ -68,11 +68,11 @@ public:
virtual void OnCreate(PWL_CREATEPARAM & cp);
virtual void OnCreated();
- virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);
virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
@@ -89,7 +89,7 @@ public:
CPDF_Rect GetContentRect() const;
void GetCaretPos(int32_t& x, int32_t& y) const;
- FX_BOOL IsModified() const;
+ bool IsModified() const;
CFX_WideString GetText() const;
void SetSel(int32_t nStartChar,int32_t nEndChar);
@@ -105,7 +105,7 @@ public:
void Paint();
- void EnableRefresh(FX_BOOL bRefresh);
+ void EnableRefresh(bool bRefresh);
CPDF_Point GetScrollPos() const;
void SetScrollPos(const CPDF_Point& point);
@@ -120,30 +120,30 @@ public:
CPDF_Font * GetCaretFont() const;
FX_FLOAT GetCaretFontSize() const;
- FX_BOOL CanUndo() const;
- FX_BOOL CanRedo() const;
+ bool CanUndo() const;
+ bool CanRedo() const;
void Redo();
void Undo();
void SetReadyToInput();
protected:
- virtual void ShowVScrollBar(FX_BOOL bShow);
+ virtual void ShowVScrollBar(bool bShow);
virtual void InsertWord(FX_WORD word, int32_t nCharset);
virtual void InsertReturn();
virtual void InsertText(const FX_WCHAR* csText);
virtual void SetCursor();
- FX_BOOL IsWndHorV();
+ bool IsWndHorV();
void Delete();
void Backspace();
protected:
void GetCaretInfo(CPDF_Point & ptHead, CPDF_Point & ptFoot) const;
- void SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot);
+ void SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot);
- void SetEditCaret(FX_BOOL bVisible);
+ void SetEditCaret(bool bVisible);
protected:
virtual void IOnSetScrollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax,
@@ -154,7 +154,7 @@ protected:
FX_FLOAT fSmallStep, FX_FLOAT fBigStep);
virtual void IOnSetScrollPosX(FX_FLOAT fx){}
virtual void IOnSetScrollPosY(FX_FLOAT fy);
- virtual void IOnSetCaret(FX_BOOL bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place);
+ virtual void IOnSetCaret(bool bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place);
virtual void IOnCaretChange(const CPVT_SecProps & secProps, const CPVT_WordProps & wordProps);
virtual void IOnContentChange(const CPDF_Rect& rcContent);
virtual void IOnInvalidateRect(CPDF_Rect * pRect);
@@ -165,7 +165,7 @@ private:
protected:
IFX_Edit* m_pEdit;
CPWL_Caret* m_pEditCaret;
- FX_BOOL m_bMouseDown;
+ bool m_bMouseDown;
IPWL_Edit_Notify* m_pEditNotify;
private:
diff --git a/fpdfsdk/include/pdfwindow/PWL_FontMap.h b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
index d32cc93078..e4bbbf2664 100644
--- a/fpdfsdk/include/pdfwindow/PWL_FontMap.h
+++ b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
@@ -85,7 +85,7 @@ public:
static CFX_ByteString GetDefaultFontByCharset(int32_t nCharset);
CPDF_Font* AddFontToDocument(CPDF_Document* pDoc, CFX_ByteString& sFontName, uint8_t nCharset);
- static FX_BOOL IsStandardFont(const CFX_ByteString& sFontName);
+ static bool IsStandardFont(const CFX_ByteString& sFontName);
CPDF_Font* AddStandardFont(CPDF_Document* pDoc, CFX_ByteString& sFontName);
CPDF_Font* AddSystemFont(CPDF_Document* pDoc, CFX_ByteString& sFontName,
uint8_t nCharset);
@@ -93,12 +93,12 @@ public:
protected:
virtual CPDF_Font* FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset);
virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias);
- FX_BOOL KnowWord(int32_t nFontIndex, FX_WORD word);
+ bool KnowWord(int32_t nFontIndex, FX_WORD word);
virtual CPDF_Document* GetDocument();
void Empty();
- int32_t GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, FX_BOOL bFind);
+ int32_t GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, bool bFind);
int32_t GetPWLFontIndex(FX_WORD word, int32_t nCharset);
int32_t AddFontData(CPDF_Font* pFont, const CFX_ByteString& sFontAlias, int32_t nCharset = DEFAULT_CHARSET);
diff --git a/fpdfsdk/include/pdfwindow/PWL_Icon.h b/fpdfsdk/include/pdfwindow/PWL_Icon.h
index 44a5c0cbaf..b6331b6e09 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Icon.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Icon.h
@@ -46,9 +46,9 @@ public:
virtual void GetImageOffset(FX_FLOAT & x,FX_FLOAT & y);
int32_t GetScaleMethod();
- FX_BOOL IsProportionalScale();
+ bool IsProportionalScale();
void GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom);
- FX_BOOL GetFittingBounds();
+ bool GetFittingBounds();
void SetIconFit(CPDF_IconFit * pIconFit){m_pIconFit = pIconFit;};
diff --git a/fpdfsdk/include/pdfwindow/PWL_IconList.h b/fpdfsdk/include/pdfwindow/PWL_IconList.h
index 2f6b323773..3c71e57b49 100644
--- a/fpdfsdk/include/pdfwindow/PWL_IconList.h
+++ b/fpdfsdk/include/pdfwindow/PWL_IconList.h
@@ -34,8 +34,8 @@ public:
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
virtual void RePosChildWnd();
- void SetSelect(FX_BOOL bSelected);
- FX_BOOL IsSelected() const;
+ void SetSelect(bool bSelected);
+ bool IsSelected() const;
void SetData(void* pData);
void SetIcon(int32_t nIconIndex);
void SetText(const CFX_WideString& str);
@@ -52,7 +52,7 @@ protected:
private:
int32_t m_nIconIndex;
void* m_pData;
- FX_BOOL m_bSelected;
+ bool m_bSelected;
CPWL_Label* m_pText;
CPWL_Color m_crIcon;
};
@@ -66,7 +66,7 @@ public:
void SetSelect(int32_t nIndex);
int32_t GetSelect() const;
void SetNotify(IPWL_IconList_Notify* pNotify);
- void EnableNotify(FX_BOOL bNotify);
+ void EnableNotify(bool bNotify);
void SetListData(int32_t nItemIndex, void* pData);
void SetListIcon(int32_t nItemIndex, int32_t nIconIndex);
void SetListString(int32_t nItemIndex, const CFX_WideString& str);
@@ -77,20 +77,20 @@ public:
protected:
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
private:
CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const;
- void SelectItem(int32_t nItemIndex, FX_BOOL bSelect);
+ void SelectItem(int32_t nItemIndex, bool bSelect);
int32_t FindItemIndex(const CPDF_Point& point);
- FX_BOOL m_nSelectIndex;
+ bool m_nSelectIndex;
IPWL_IconList_Notify* m_pNotify;
- FX_BOOL m_bEnableNotify;
- FX_BOOL m_bMouseDown;
+ bool m_bEnableNotify;
+ bool m_bMouseDown;
int32_t m_nListCount;
};
@@ -100,13 +100,13 @@ public:
CPWL_IconList(int32_t nListCount);
virtual ~CPWL_IconList();
- virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
void SetSelect(int32_t nIndex);
void SetTopItem(int32_t nIndex);
int32_t GetSelect() const;
void SetNotify(IPWL_IconList_Notify* pNotify);
- void EnableNotify(FX_BOOL bNotify);
+ void EnableNotify(bool bNotify);
void SetListData(int32_t nItemIndex, void* pData);
void SetListIcon(int32_t nItemIndex, int32_t nIconIndex);
void SetListString(int32_t nItemIndex, const CFX_WideString& str);
diff --git a/fpdfsdk/include/pdfwindow/PWL_ListBox.h b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
index 97a4529af9..43d60a2f09 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ListBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
@@ -29,7 +29,7 @@ public:
FX_FLOAT fSmallStep, FX_FLOAT fBigStep);
void IOnSetScrollPosX(FX_FLOAT fx){}
void IOnSetScrollPosY(FX_FLOAT fy);
- void IOnSetCaret(FX_BOOL bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place);
+ void IOnSetCaret(bool bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place);
void IOnCaretChange(const CPVT_SecProps & secProps, const CPVT_WordProps & wordProps);
void IOnInvalidateRect(CPDF_Rect * pRect);
@@ -49,12 +49,12 @@ public:
virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream);
virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
- virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
virtual void KillFocus();
virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
@@ -64,7 +64,7 @@ public:
virtual void SetFontSize(FX_FLOAT fFontSize);
virtual FX_FLOAT GetFontSize() const;
- void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL & bExit , FX_DWORD nFlag);
+ void OnNotifySelChanged(bool bKeyDown, bool & bExit , FX_DWORD nFlag);
void AddString(const FX_WCHAR* string);
void SetTopVisibleIndex(int32_t nItemIndex);
@@ -73,13 +73,13 @@ public:
void Reset();
void Select(int32_t nItemIndex);
void SetCaret(int32_t nItemIndex);
- void SetHoverSel(FX_BOOL bHoverSel);
+ void SetHoverSel(bool bHoverSel);
int32_t GetCount() const;
- FX_BOOL IsMultipleSel() const;
+ bool IsMultipleSel() const;
int32_t GetCaretIndex() const;
int32_t GetCurSel() const;
- FX_BOOL IsItemSelected(int32_t nItemIndex) const;
+ bool IsItemSelected(int32_t nItemIndex) const;
int32_t GetTopVisibleIndex() const;
int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const;
CPDF_Rect GetContentRect() const;
@@ -91,8 +91,8 @@ public:
protected:
IFX_List* m_pList;
CPWL_List_Notify* m_pListNotify;
- FX_BOOL m_bMouseDown;
- FX_BOOL m_bHoverSel;
+ bool m_bMouseDown;
+ bool m_bHoverSel;
IPWL_Filler_Notify* m_pFillerNotify;
public:
void AttachFFLData(void* pData) {m_pFormFiller = pData;}
diff --git a/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h b/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
index c107a0cf5e..3beee19230 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h
@@ -35,7 +35,7 @@ protected:
virtual void DrawChildAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
private:
- void ResetAll(FX_BOOL bMove,int32_t nStart);
+ void ResetAll(bool bMove,int32_t nStart);
CPDF_Rect m_rcContent;
CPDF_Point m_ptScroll;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Note.h b/fpdfsdk/include/pdfwindow/PWL_Note.h
index a60eba30dd..b1e61c4aa4 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Note.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Note.h
@@ -33,8 +33,8 @@ class IPWL_NoteNotify
public:
virtual ~IPWL_NoteNotify() { }
virtual void OnNoteMove(const FX_RECT& rtWin) = 0;
- virtual void OnNoteShow(FX_BOOL bShow) = 0;
- virtual void OnNoteActivate(FX_BOOL bActive) = 0;
+ virtual void OnNoteShow(bool bShow) = 0;
+ virtual void OnNoteActivate(bool bActive) = 0;
virtual void OnNoteClose() = 0;
virtual void OnItemCreate(IPWL_NoteItem* pItem) = 0;
virtual void OnItemDelete(IPWL_NoteItem* pItem) = 0;
@@ -107,11 +107,11 @@ public:
protected:
virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
private:
- FX_BOOL m_bMouseDown;
+ bool m_bMouseDown;
};
class CPWL_Note_LBBox : public CPWL_Wnd
@@ -140,7 +140,7 @@ public:
CPWL_Note_Edit();
virtual ~CPWL_Note_Edit();
- void EnableNotify(FX_BOOL bEnable) {m_bEnableNotify = bEnable;}
+ void EnableNotify(bool bEnable) {m_bEnableNotify = bEnable;}
virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth);
FX_FLOAT GetItemLeftMargin();
FX_FLOAT GetItemRightMargin();
@@ -154,9 +154,9 @@ protected:
virtual void OnKillFocus();
private:
- FX_BOOL m_bEnableNotify;
+ bool m_bEnableNotify;
FX_FLOAT m_fOldItemHeight;
- FX_BOOL m_bSizeChanged;
+ bool m_bSizeChanged;
FX_FLOAT m_fOldMin;
FX_FLOAT m_fOldMax;
};
@@ -188,9 +188,9 @@ public:
virtual CFX_ByteString GetClassName() const;
virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- void SetEditFocus(FX_BOOL bLast);
+ void SetEditFocus(bool bLast);
CPWL_Edit* GetEdit() const;
public:
@@ -203,8 +203,8 @@ public:
IPWL_NoteItem* GetSubItems(int32_t index) const;
virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point);
- void EnableRead(FX_BOOL bEnabled);
- void EnableModify(FX_BOOL bEnabled);
+ void EnableRead(bool bEnabled);
+ void EnableModify(bool bEnabled);
protected:
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
@@ -231,7 +231,7 @@ public:
virtual int32_t CountSubItems() const;
virtual IPWL_NoteItem* GetSubItems(int32_t index) const;
virtual void DeleteSubItem(IPWL_NoteItem* pNoteItem);
- virtual void SetFocus(){SetNoteFocus(FALSE);}
+ virtual void SetFocus(){SetNoteFocus(false);}
virtual IPWL_NoteItem* GetParentItem() const;
virtual void* GetPrivateData() const;
@@ -240,19 +240,19 @@ public:
virtual CFX_WideString GetContents() const;
virtual FX_SYSTEMTIME GetDateTime() const;
virtual CFX_WideString GetSubjectName() const;
- virtual FX_BOOL IsTopItem() const { return FALSE;}
+ virtual bool IsTopItem() const { return false;}
virtual CPWL_Edit* GetEdit() const;
public:
- virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- virtual FX_BOOL OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
+ virtual bool OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
virtual CFX_ByteString GetClassName() const;
virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point);
virtual IPWL_NoteItem* GetFocusedNoteItem() const;
virtual void ResetSubjectName(int32_t nItemIndex);
- void EnableRead(FX_BOOL bEnabled);
- void EnableModify(FX_BOOL bEnabled);
+ void EnableRead(bool bEnabled);
+ void EnableModify(bool bEnabled);
protected:
virtual void RePosChildWnd();
@@ -267,7 +267,7 @@ public:
CPWL_NoteItem* CreateNoteItem();
CPWL_NoteItem* GetParentNoteItem() const;
- void SetNoteFocus(FX_BOOL bLast);
+ void SetNoteFocus(bool bLast);
void OnContentsValidate();
void OnCreateNoteItem();
@@ -289,8 +289,8 @@ private:
CFX_WideString m_sAuthor;
FX_FLOAT m_fOldItemHeight;
- FX_BOOL m_bSizeChanged;
- FX_BOOL m_bAllowModify;
+ bool m_bSizeChanged;
+ bool m_bAllowModify;
};
class PWL_CLASS CPWL_Note : public CPWL_NoteItem
@@ -305,17 +305,17 @@ public:
virtual CFX_WideString GetAuthorName() const;
virtual void SetBkColor(const CPWL_Color& color);
virtual void ResetSubjectName(int32_t nItemIndex){}
- virtual FX_BOOL IsTopItem() const {return TRUE;}
+ virtual bool IsTopItem() const {return true;}
virtual const CPWL_Note* GetNote() const;
virtual IPWL_NoteNotify* GetNoteNotify() const;
public:
IPWL_NoteItem* Reply();
- void EnableNotify(FX_BOOL bEnabled);
+ void EnableNotify(bool bEnabled);
void SetIconType(int32_t nType);
void SetOptionsText(const CFX_WideString& sText);
- void EnableRead(FX_BOOL bEnabled);
- void EnableModify(FX_BOOL bEnabled);
+ void EnableRead(bool bEnabled);
+ void EnableModify(bool bEnabled);
CFX_WideString GetReplyString() const;
void SetReplyString(const CFX_WideString& string);
@@ -326,9 +326,9 @@ public:
IPopup_Note* GetPopupNote() const {return m_pPopupNote;}
public:
- virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
protected:
virtual void RePosChildWnd();
@@ -336,9 +336,9 @@ protected:
virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
- FX_BOOL ResetScrollBar();
+ bool ResetScrollBar();
void RePosNoteChildren();
- FX_BOOL ScrollBarShouldVisible();
+ bool ScrollBarShouldVisible();
private:
CPWL_Label* m_pAuthor;
@@ -349,10 +349,10 @@ private:
CPWL_ScrollBar* m_pContentsBar;
CPWL_Note_Options* m_pOptions;
IPWL_NoteNotify* m_pNoteNotify;
- FX_BOOL m_bResizing;
+ bool m_bResizing;
PWL_SCROLL_INFO m_OldScrollInfo;
CPDF_Rect m_rcCaption;
- FX_BOOL m_bEnalbleNotify;
+ bool m_bEnalbleNotify;
IPopup_Note* m_pPopupNote;
CFX_WideString m_sReplyString;
};
diff --git a/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h b/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
index 0390222545..4735922039 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h
@@ -49,15 +49,15 @@ public:
virtual void OnCreate(PWL_CREATEPARAM & cp);
virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream);
virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);
protected:
PWL_SCROLLBAR_TYPE m_eScrollBarType;
PWL_SBBUTTON_TYPE m_eSBButtonType;
- FX_BOOL m_bMouseDown;
+ bool m_bMouseDown;
};
struct PWL_FLOATRANGE
@@ -67,7 +67,7 @@ public:
PWL_FLOATRANGE(FX_FLOAT min,FX_FLOAT max);
void Default();
void Set(FX_FLOAT min,FX_FLOAT max);
- FX_BOOL In(FX_FLOAT x) const;
+ bool In(FX_FLOAT x) const;
FX_FLOAT GetWidth() const;
FX_FLOAT fMin,fMax;
@@ -83,7 +83,7 @@ public:
void SetClientWidth(FX_FLOAT width);
void SetSmallStep(FX_FLOAT step);
void SetBigStep(FX_FLOAT step);
- FX_BOOL SetPos(FX_FLOAT pos);
+ bool SetPos(FX_FLOAT pos);
void AddSmall();
void SubSmall();
@@ -110,8 +110,8 @@ public:
virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream);
virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void CreateChildWnd(const PWL_CREATEPARAM & cp);
@@ -119,12 +119,12 @@ public:
FX_FLOAT GetScrollBarWidth() const;
PWL_SCROLLBAR_TYPE GetScrollBarType() const {return m_sbType;};
- void SetNotifyForever(FX_BOOL bForever) {m_bNotifyForever = bForever;}
+ void SetNotifyForever(bool bForever) {m_bNotifyForever = bForever;}
protected:
void SetScrollRange(FX_FLOAT fMin,FX_FLOAT fMax,FX_FLOAT fClientWidth);
void SetScrollPos(FX_FLOAT fPos);
- void MovePosButton(FX_BOOL bRefresh);
+ void MovePosButton(bool bRefresh);
void SetScrollStep(FX_FLOAT fBigStep,FX_FLOAT fSmallStep);
void NotifyScrollWindow();
CPDF_Rect GetScrollArea() const;
@@ -156,9 +156,9 @@ private:
CPWL_SBButton* m_pMaxButton;
CPWL_SBButton* m_pPosButton;
PWL_SCROLL_PRIVATEDATA m_sData;
- FX_BOOL m_bMouseDown;
- FX_BOOL m_bMinOrMax;
- FX_BOOL m_bNotifyForever;
+ bool m_bMouseDown;
+ bool m_bMinOrMax;
+ bool m_bNotifyForever;
FX_FLOAT m_nOldPos;
FX_FLOAT m_fOldPosButton;
};
diff --git a/fpdfsdk/include/pdfwindow/PWL_Signature.h b/fpdfsdk/include/pdfwindow/PWL_Signature.h
index c94527772e..c5557d6c6e 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Signature.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Signature.h
@@ -43,9 +43,9 @@ public:
void SetImage(CFX_DIBSource* pImage);
void SetImageStream(CPDF_Stream * pStream, const FX_CHAR* sImageAlias);
- void SetTextFlag(FX_BOOL bTextExist);
- void SetImageFlag(FX_BOOL bImageExist);
- void SetFoxitFlag(FX_BOOL bFlagExist);
+ void SetTextFlag(bool bTextExist);
+ void SetImageFlag(bool bImageExist);
+ void SetFoxitFlag(bool bFlagExist);
protected:
virtual void RePosChildWnd();
@@ -59,9 +59,9 @@ private:
CPWL_Label* m_pDescription;
CPWL_Signature_Image* m_pImage;
- FX_BOOL m_bTextExist;
- FX_BOOL m_bImageExist;
- FX_BOOL m_bFlagExist;
+ bool m_bTextExist;
+ bool m_bImageExist;
+ bool m_bFlagExist;
};
#endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_SIGNATURE_H_
diff --git a/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h b/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h
index f6659dfb00..14e576d868 100644
--- a/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h
+++ b/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h
@@ -26,14 +26,14 @@ public:
virtual ~CPWL_CheckBox();
virtual CFX_ByteString GetClassName() const;
- virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
- void SetCheck(FX_BOOL bCheck);
- FX_BOOL IsChecked() const;
+ void SetCheck(bool bCheck);
+ bool IsChecked() const;
private:
- FX_BOOL m_bChecked;
+ bool m_bChecked;
};
class PWL_CLASS CPWL_RadioButton : public CPWL_Button
@@ -43,14 +43,14 @@ public:
virtual ~CPWL_RadioButton();
virtual CFX_ByteString GetClassName() const;
- virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
- void SetCheck(FX_BOOL bCheck);
- FX_BOOL IsChecked() const;
+ void SetCheck(bool bCheck);
+ bool IsChecked() const;
private:
- FX_BOOL m_bChecked;
+ bool m_bChecked;
};
#endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_SPECIALBUTTON_H_
diff --git a/fpdfsdk/include/pdfwindow/PWL_Utils.h b/fpdfsdk/include/pdfwindow/PWL_Utils.h
index 2da0f42180..f1e34c9060 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Utils.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Utils.h
@@ -109,8 +109,8 @@ class PWL_CLASS CPWL_Utils
public:
static CPDF_Rect InflateRect(const CPDF_Rect& rcRect, FX_FLOAT fSize);
static CPDF_Rect DeflateRect(const CPDF_Rect& rcRect, FX_FLOAT fSize);
- static FX_BOOL IntersectRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2);
- static FX_BOOL ContainsRect(const CPDF_Rect& rcParent, const CPDF_Rect& rcChild);
+ static bool IntersectRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2);
+ static bool ContainsRect(const CPDF_Rect& rcParent, const CPDF_Rect& rcChild);
static CPDF_Rect ScaleRect(const CPDF_Rect& rcRect,FX_FLOAT fScale);
static CPVT_WordRange OverlapWordRange(const CPVT_WordRange& wr1, const CPVT_WordRange& wr2);
static CPDF_Rect GetCenterSquare(const CPDF_Rect & rect);
@@ -120,10 +120,10 @@ public:
static CPDF_Rect OffsetRect(const CPDF_Rect & rect,FX_FLOAT x,FX_FLOAT y);
static CPDF_Point OffsetPoint(const CPDF_Point & point,FX_FLOAT x,FX_FLOAT y);
static FX_COLORREF PWLColorToFXColor(const CPWL_Color& color, int32_t nTransparancy = 255);
- static FX_BOOL IsBlackOrWhite(const CPWL_Color& color);
+ static bool IsBlackOrWhite(const CPWL_Color& color);
static CPWL_Color GetReverseColor(const CPWL_Color& color);
- static CFX_ByteString GetColorAppStream(const CPWL_Color & color,const FX_BOOL & bFillOrStroke = TRUE);
+ static CFX_ByteString GetColorAppStream(const CPWL_Color & color,const bool & bFillOrStroke = true);
static CFX_ByteString GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT fWidth,
const CPWL_Color & color, const CPWL_Color & crLeftTop, const CPWL_Color & crRightBottom,
int32_t nStyle, const CPWL_Dash & dash);
@@ -149,7 +149,7 @@ public:
const CPWL_Color & crText);
static CFX_ByteString GetEditAppStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange * pRange = NULL,
- FX_BOOL bContinuous = TRUE, FX_WORD SubWord = 0);
+ bool bContinuous = true, FX_WORD SubWord = 0);
static CFX_ByteString GetEditSelAppStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset,
const CPVT_WordRange * pRange = NULL);
static CFX_ByteString GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellCheck* pSpellCheck,
@@ -157,7 +157,7 @@ public:
const CPVT_WordRange * pRange = NULL);
static CFX_ByteString GetTextAppStream(const CPDF_Rect & rcBBox,IFX_Edit_FontMap * pFontMap,
const CFX_WideString & sText, int32_t nAlignmentH, int32_t nAlignmentV,
- FX_FLOAT fFontSize, FX_BOOL bMultiLine, FX_BOOL bAutoReturn, const CPWL_Color & crText);
+ FX_FLOAT fFontSize, bool bMultiLine, bool bAutoReturn, const CPWL_Color & crText);
static CFX_ByteString GetDropButtonAppStream(const CPDF_Rect & rcBBox);
static void DrawFillRect(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,const CPDF_Rect & rect,
@@ -175,7 +175,7 @@ public:
static void DrawFillArea(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
const CPDF_Point* pPts, int32_t nCount, const FX_COLORREF& color);
static void DrawShadow(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
- FX_BOOL bVertical, FX_BOOL bHorizontal, CPDF_Rect rect,
+ bool bVertical, bool bHorizontal, CPDF_Rect rect,
int32_t nTransparancy, int32_t nStartGray, int32_t nEndGray);
static void DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit,
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange,
diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
index c5b6ca4be1..3b1d299dfb 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
@@ -137,7 +137,7 @@ struct PWL_CLASS CPWL_Color
FX_FLOAT fColor1,fColor2,fColor3,fColor4;
};
-inline FX_BOOL operator == (const CPWL_Color &c1, const CPWL_Color &c2)
+inline bool operator == (const CPWL_Color &c1, const CPWL_Color &c2)
{
return c1.nColorType == c2.nColorType &&
c1.fColor1 - c2.fColor1 < 0.0001 && c1.fColor1 - c2.fColor1 > -0.0001 &&
@@ -146,7 +146,7 @@ inline FX_BOOL operator == (const CPWL_Color &c1, const CPWL_Color &c2)
c1.fColor4 - c2.fColor4 < 0.0001 && c1.fColor4 - c2.fColor4 > -0.0001;
}
-inline FX_BOOL operator != (const CPWL_Color &c1, const CPWL_Color &c2)
+inline bool operator != (const CPWL_Color &c1, const CPWL_Color &c2)
{
return !operator == (c1, c2);
}
@@ -173,7 +173,7 @@ class IPWL_SpellCheck
{
public:
virtual ~IPWL_SpellCheck() { }
- virtual FX_BOOL CheckWord(const FX_CHAR* sWord) = 0;
+ virtual bool CheckWord(const FX_CHAR* sWord) = 0;
virtual void SuggestWords(const FX_CHAR* sWord, CFX_ByteStringArray & sSuggest) = 0;
};
@@ -298,25 +298,25 @@ public:
void Create(const PWL_CREATEPARAM & cp);
virtual CFX_ByteString GetClassName() const;
void Destroy();
- void Move(const CPDF_Rect & rcNew,FX_BOOL bReset,FX_BOOL bRefresh);
+ void Move(const CPDF_Rect & rcNew,bool bReset,bool bRefresh);
virtual void InvalidateRect(CPDF_Rect* pRect = NULL);
void GetAppearanceStream(CFX_ByteString & sAppStream);
void DrawAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
- virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnKeyUp(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnMButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnMButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnMButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnRButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);
- virtual FX_BOOL OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnKeyUp(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual bool OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnRButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual bool OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
virtual void SetFocus();
virtual void KillFocus();
@@ -326,7 +326,7 @@ public:
virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0);
virtual void SetTextColor(const CPWL_Color & color);
virtual void SetTextStrokeColor(const CPWL_Color & color);
- virtual void SetVisible(FX_BOOL bVisible);
+ virtual void SetVisible(bool bVisible);
virtual CPDF_Rect GetFocusRect() const;
virtual CPWL_Color GetBackgroundColor() const;
@@ -338,7 +338,7 @@ public:
virtual CPWL_Color GetBorderLeftTopColor(int32_t nBorderStyle) const;
virtual CPWL_Color GetBorderRightBottomColor(int32_t nBorderStyle) const;
- virtual FX_BOOL IsModified() const {return FALSE;}
+ virtual bool IsModified() const {return false;}
virtual void SetFontSize(FX_FLOAT fFontSize);
@@ -356,8 +356,8 @@ public:
CPDF_Rect GetClientCenterSquare() const;
CPDF_Rect GetWindowCenterSquare() const;
int32_t GetBorderWidth() const;
- FX_BOOL IsVisible() const {return m_bVisible;}
- FX_BOOL HasFlag(FX_DWORD dwFlags) const;
+ bool IsVisible() const {return m_bVisible;}
+ bool HasFlag(FX_DWORD dwFlags) const;
void AddFlag(FX_DWORD dwFlags);
void RemoveFlag(FX_DWORD dwFlags);
CPDF_Rect GetClipRect() const;
@@ -366,13 +366,13 @@ public:
CPWL_Dash GetBorderDash() const;
void* GetAttachedData() const;
- FX_BOOL WndHitTest(const CPDF_Point & point) const;
- FX_BOOL ClientHitTest(const CPDF_Point & point) const;
- FX_BOOL IsCaptureMouse() const;
+ bool WndHitTest(const CPDF_Point & point) const;
+ bool ClientHitTest(const CPDF_Point & point) const;
+ bool IsCaptureMouse() const;
const CPWL_Wnd* GetFocused() const;
- FX_BOOL IsFocused() const;
- FX_BOOL IsReadOnly() const;
+ bool IsFocused() const;
+ bool IsReadOnly() const;
CPWL_ScrollBar* GetVScrollBar() const;
IFX_Edit_FontMap* GetFontMap() const;
@@ -398,8 +398,8 @@ public:
virtual FX_FLOAT GetItemLeftMargin() {return 0;}
virtual FX_FLOAT GetItemRightMargin() {return 0;}
- void EnableWindow(FX_BOOL bEnable);
- FX_BOOL IsEnabled();
+ void EnableWindow(bool bEnable);
+ bool IsEnabled();
virtual void SetCursor();
protected:
@@ -422,11 +422,11 @@ protected:
virtual void OnEnabled();
virtual void OnDisabled();
- void SetNotifyFlag(FX_BOOL bNotifying = TRUE){m_bNotifying = bNotifying;};
+ void SetNotifyFlag(bool bNotifying = true){m_bNotifying = bNotifying;};
- FX_BOOL IsValid() const;
+ bool IsValid() const;
PWL_CREATEPARAM GetCreationParam() const;
- FX_BOOL IsNotifying() const {return m_bNotifying;}
+ bool IsNotifying() const {return m_bNotifying;}
void InvalidateRectMove(const CPDF_Rect & rcOld, const CPDF_Rect & rcNew);
@@ -434,14 +434,14 @@ protected:
FX_RECT PWLtoWnd(const CPDF_Rect & rect) const;
FX_HWND GetAttachedHWnd() const;
- FX_BOOL IsWndCaptureMouse(const CPWL_Wnd * pWnd) const;
- FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const;
+ bool IsWndCaptureMouse(const CPWL_Wnd * pWnd) const;
+ bool IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const;
const CPWL_Wnd* GetRootWnd() const;
- FX_BOOL IsCTRLpressed(FX_DWORD nFlag) const;
- FX_BOOL IsSHIFTpressed(FX_DWORD nFlag) const;
- FX_BOOL IsALTpressed(FX_DWORD nFlag) const;
- FX_BOOL IsINSERTpressed(FX_DWORD nFlag) const;
+ bool IsCTRLpressed(FX_DWORD nFlag) const;
+ bool IsSHIFTpressed(FX_DWORD nFlag) const;
+ bool IsALTpressed(FX_DWORD nFlag) const;
+ bool IsINSERTpressed(FX_DWORD nFlag) const;
private:
void AddChild(CPWL_Wnd * pWnd);
@@ -467,10 +467,10 @@ private:
CPDF_Rect m_rcWindow;
CPDF_Rect m_rcClip;
- FX_BOOL m_bCreated;
- FX_BOOL m_bVisible;
- FX_BOOL m_bNotifying;
- FX_BOOL m_bEnabled;
+ bool m_bCreated;
+ bool m_bVisible;
+ bool m_bNotifying;
+ bool m_bEnabled;
};
#endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_