summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-27 12:08:12 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-27 12:08:12 -0700
commit8d2aae7ee320da3a8ffe01c57e38b3f98443257d (patch)
treee694c6f82ec72fa46e6172b4475996b30d3f6a3a /fpdfsdk
parentff46aaf499edcf153ee2f57c7016587aa96dcfa0 (diff)
downloadpdfium-8d2aae7ee320da3a8ffe01c57e38b3f98443257d.tar.xz
Revert "FX Bool considered harmful, part 3"
This reverts commit ff46aaf499edcf153ee2f57c7016587aa96dcfa0. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1255293002 .
Diffstat (limited to 'fpdfsdk')
-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
-rw-r--r--fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp2
-rw-r--r--fpdfsdk/src/formfiller/FFL_CheckBox.cpp38
-rw-r--r--fpdfsdk/src/formfiller/FFL_ComboBox.cpp66
-rw-r--r--fpdfsdk/src/formfiller/FFL_FormFiller.cpp190
-rw-r--r--fpdfsdk/src/formfiller/FFL_IFormFiller.cpp248
-rw-r--r--fpdfsdk/src/formfiller/FFL_ListBox.cpp40
-rw-r--r--fpdfsdk/src/formfiller/FFL_Notify.cpp90
-rw-r--r--fpdfsdk/src/formfiller/FFL_PushButton.cpp2
-rw-r--r--fpdfsdk/src/formfiller/FFL_RadioButton.cpp42
-rw-r--r--fpdfsdk/src/formfiller/FFL_TextField.cpp58
-rw-r--r--fpdfsdk/src/formfiller/FFL_Utils.cpp10
-rw-r--r--fpdfsdk/src/fpdf_dataavail.cpp4
-rw-r--r--fpdfsdk/src/fpdf_ext.cpp20
-rw-r--r--fpdfsdk/src/fpdf_flatten.cpp24
-rw-r--r--fpdfsdk/src/fpdf_progressive.cpp6
-rw-r--r--fpdfsdk/src/fpdf_sysfontinfo.cpp22
-rw-r--r--fpdfsdk/src/fpdf_transformpage.cpp28
-rw-r--r--fpdfsdk/src/fpdfdoc.cpp22
-rw-r--r--fpdfsdk/src/fpdfeditimg.cpp14
-rw-r--r--fpdfsdk/src/fpdfeditpage.cpp22
-rw-r--r--fpdfsdk/src/fpdfformfill.cpp30
-rw-r--r--fpdfsdk/src/fpdfppo.cpp64
-rw-r--r--fpdfsdk/src/fpdfsave.cpp22
-rw-r--r--fpdfsdk/src/fpdftext.cpp4
-rw-r--r--fpdfsdk/src/fpdfview.cpp54
-rw-r--r--fpdfsdk/src/fsdk_actionhandler.cpp136
-rw-r--r--fpdfsdk/src/fsdk_annothandler.cpp138
-rw-r--r--fpdfsdk/src/fsdk_baseannot.cpp76
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp248
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp166
-rw-r--r--fpdfsdk/src/fsdk_rendercontext.cpp4
-rw-r--r--fpdfsdk/src/fxedit/fxet_ap.cpp2
-rw-r--r--fpdfsdk/src/fxedit/fxet_edit.cpp468
-rw-r--r--fpdfsdk/src/fxedit/fxet_list.cpp106
-rw-r--r--fpdfsdk/src/fxedit/fxet_pageobjs.cpp10
-rw-r--r--fpdfsdk/src/javascript/Document.cpp474
-rw-r--r--fpdfsdk/src/javascript/Field.cpp880
-rw-r--r--fpdfsdk/src/javascript/Icon.cpp6
-rw-r--r--fpdfsdk/src/javascript/JS_Context.cpp64
-rw-r--r--fpdfsdk/src/javascript/JS_EventHandler.cpp102
-rw-r--r--fpdfsdk/src/javascript/JS_GlobalData.cpp24
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime.cpp68
-rw-r--r--fpdfsdk/src/javascript/JS_Value.cpp34
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.cpp376
-rw-r--r--fpdfsdk/src/javascript/app.cpp178
-rw-r--r--fpdfsdk/src/javascript/color.cpp24
-rw-r--r--fpdfsdk/src/javascript/console.cpp18
-rw-r--r--fpdfsdk/src/javascript/event.cpp140
-rw-r--r--fpdfsdk/src/javascript/global.cpp68
-rw-r--r--fpdfsdk/src/javascript/report.cpp8
-rw-r--r--fpdfsdk/src/javascript/util.cpp46
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8.cpp6
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Button.cpp14
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Caret.cpp22
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp100
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Edit.cpp228
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp108
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_FontMap.cpp18
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Icon.cpp8
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_IconList.cpp60
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Label.cpp2
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListBox.cpp80
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp8
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Note.cpp194
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp94
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Signature.cpp20
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp36
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Utils.cpp104
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Wnd.cpp94
125 files changed, 4243 insertions, 4243 deletions
diff --git a/fpdfsdk/include/formfiller/FFL_CheckBox.h b/fpdfsdk/include/formfiller/FFL_CheckBox.h
index 6880977094..3deeae8aa7 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 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 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 IsDataChanged(CPDFSDK_PageView* pPageView);
+ virtual FX_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 957fda425f..e5c65c2715 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 bool OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
+ virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
- virtual bool IsDataChanged(CPDFSDK_PageView* pPageView);
+ virtual FX_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 bool IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld, const PDFSDK_FieldAction& faNew);
+ virtual FX_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, bool bRestoreValue);
- virtual void OnKeyStroke(bool bKeyDown, FX_UINT nFlag);
+ virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue);
+ virtual void OnKeyStroke(FX_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 bool CanCopy(CPDFSDK_Document* pDocument);
- virtual bool CanCut(CPDFSDK_Document* pDocument);
- virtual bool CanPaste(CPDFSDK_Document* pDocument);
+ virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument);
+ virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument);
+ virtual FX_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 98995c1a58..fc858a8822 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 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 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 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 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 OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
- virtual bool OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
+ virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
+ virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
- virtual bool CanCopy(CPDFSDK_Document* pDocument);
- virtual bool CanCut(CPDFSDK_Document* pDocument);
- virtual bool CanPaste(CPDFSDK_Document* pDocument);
+ virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument);
+ virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument);
+ virtual FX_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 bool IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
+ virtual FX_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, bool bRestoreValue);
+ virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue);
- virtual void OnKeyStroke(bool bKeyDown);
+ virtual void OnKeyStroke(FX_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);
- bool CommitData(CPDFSDK_PageView* pPageView, FX_UINT nFlag);
- virtual bool IsDataChanged(CPDFSDK_PageView* pPageView);
+ FX_BOOL CommitData(CPDFSDK_PageView* pPageView, FX_UINT nFlag);
+ virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView);
virtual void SaveData(CPDFSDK_PageView* pPageView);
- CPWL_Wnd* GetPDFWindow(CPDFSDK_PageView* pPageView, bool bNew);
+ CPWL_Wnd* GetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bNew);
void DestroyPDFWindow(CPDFSDK_PageView* pPageView);
- void EscapeFiller(CPDFSDK_PageView* pPageView, bool bDestroyPDFWindow);
+ void EscapeFiller(CPDFSDK_PageView* pPageView, FX_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);
- bool IsValid() const;
+ FX_BOOL IsValid() const;
CPDF_Rect GetPDFWindowRect() const;
CPDFSDK_PageView* GetCurPageView();
@@ -124,7 +124,7 @@ protected:
CPDFSDK_Widget* m_pWidget;
CPDFSDK_Annot* m_pAnnot;
- bool m_bValid;
+ FX_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 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 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 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:
- bool m_bMouseIn;
- bool m_bMouseDown;
+ FX_BOOL m_bMouseIn;
+ FX_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 51b0279d0a..e553723dc3 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 bool Annot_HitTest(CPDFSDK_PageView* pPageView,CPDFSDK_Annot* pAnnot, CPDF_Point point);
+ virtual FX_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 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 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 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 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 OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag);
- virtual bool OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag);
+ virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag);
+ virtual FX_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(bool bEditOrList, void* pPrivateData, int32_t nKeyCode,
+ virtual void OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode,
CFX_WideString & strChange, const CFX_WideString& strChangeEx,
int nSelStart, int nSelEnd,
- bool bKeyDown, bool & bRC, bool & bExit, FX_DWORD nFlag);
- virtual void OnAfterKeyStroke(bool bEditOrList, void* pPrivateData, bool & bExit, FX_DWORD nFlag) ;
+ 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) ;
- CFFL_FormFiller* GetFormFiller(CPDFSDK_Annot* pAnnot, bool bRegister);
+ CFFL_FormFiller* GetFormFiller(CPDFSDK_Annot* pAnnot, FX_BOOL bRegister);
void RemoveFormFiller(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);
+ 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);
- 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 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 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);
+ 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);
private:
using CFFL_Widget2Filler = std::map<CPDFSDK_Annot*, CFFL_FormFiller*>;
@@ -77,7 +77,7 @@ private:
CPDFDoc_Environment* m_pApp;
CFFL_Widget2Filler m_Maps;
- bool m_bNotifying;
+ FX_BOOL m_bNotifying;
};
class CFFL_PrivateData
diff --git a/fpdfsdk/include/formfiller/FFL_ListBox.h b/fpdfsdk/include/formfiller/FFL_ListBox.h
index 59e3d6c689..4c0813f5c8 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 bool OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar,
+ virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar,
FX_UINT nFlags);
- virtual bool IsDataChanged(CPDFSDK_PageView* pPageView);
+ virtual FX_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,
- bool bRestoreValue);
- virtual void OnKeyStroke(bool bKeyDown, FX_DWORD nFlag);
+ FX_BOOL bRestoreValue);
+ virtual void OnKeyStroke(FX_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 8a9c04c5df..961d4b7a79 100644
--- a/fpdfsdk/include/formfiller/FFL_Notify.h
+++ b/fpdfsdk/include/formfiller/FFL_Notify.h
@@ -20,35 +20,35 @@ public:
virtual ~CFFL_Notify();
public:
- 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);
+ 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);
void BeforeNotify();
void AfterNotify();
- bool IsNotifying() const {return m_nNotifyFlag > 0;}
+ FX_BOOL IsNotifying() const {return m_nNotifyFlag > 0;}
private:
- 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 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 m_bDoActioning;
+ FX_BOOL m_bDoActioning;
int32_t m_nNotifyFlag;
};
diff --git a/fpdfsdk/include/formfiller/FFL_PushButton.h b/fpdfsdk/include/formfiller/FFL_PushButton.h
index 26de7a1b23..3cfaefb9bd 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 bool OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
+ virtual FX_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 e858533c6b..46332e07fd 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 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 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 void SaveData(CPDFSDK_PageView* pPageView);
};
diff --git a/fpdfsdk/include/formfiller/FFL_TextField.h b/fpdfsdk/include/formfiller/FFL_TextField.h
index 105b90cba9..10bd5c0e43 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 bool OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
+ virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
- virtual bool IsDataChanged(CPDFSDK_PageView* pPageView);
+ virtual FX_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 bool IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
+ virtual FX_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, bool bRestoreValue);
+ virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue);
public:
virtual void OnSetFocus(CPWL_Wnd* pWnd);
@@ -56,9 +56,9 @@ public:
virtual void OnAddUndo(CPWL_Edit* pEdit);
public:
- virtual bool CanCopy(CPDFSDK_Document* pDocument);
- virtual bool CanCut(CPDFSDK_Document* pDocument);
- virtual bool CanPaste(CPDFSDK_Document* pDocument);
+ virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument);
+ virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument);
+ virtual FX_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 8dfc64eab0..fe025eca4b 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 bool TraceObject(CPDF_Object* pObj);
+ static FX_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 7c41a1d0dd..39ec4f41af 100644
--- a/fpdfsdk/include/fsdk_actionhandler.h
+++ b/fpdfsdk/include/fsdk_actionhandler.h
@@ -23,18 +23,18 @@ class IFXJS_Runtime;
class CPDFSDK_FormActionHandler
{
public:
- 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);
+ 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);
};
class CPDFSDK_MediaActionHandler
{
public:
- 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);
+ 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);
};
class CPDFSDK_ActionHandler
@@ -44,31 +44,31 @@ public:
void SetMediaActionHandler(CPDFSDK_MediaActionHandler* pHandler);
- 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);
+ 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);
private:
- 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);
+ 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);
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);
- bool IsValidField(CPDFSDK_Document* pDocument, CPDF_Dictionary* pFieldDict);
- bool IsValidDocView(CPDFSDK_Document* pDocument);
+ FX_BOOL IsValidField(CPDFSDK_Document* pDocument, CPDF_Dictionary* pFieldDict);
+ FX_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 6f3bee5038..b4705699c8 100644
--- a/fpdfsdk/include/fsdk_annothandler.h
+++ b/fpdfsdk/include/fsdk_annothandler.h
@@ -29,7 +29,7 @@ public:
virtual CFX_ByteString GetName() = 0;
- virtual bool CanAnswer(CPDFSDK_Annot* pAnnot) = 0;
+ virtual FX_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 bool HitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point) = 0;
+ virtual FX_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 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;
+ 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;
//by wjm.
- 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 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 void OnDeSelected(CPDFSDK_Annot* pAnnot) = 0;
virtual void OnSelected(CPDFSDK_Annot* pAnnot) = 0;
- virtual bool OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0;
- virtual bool OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0;
+ virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0;
+ virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0;
};
@@ -101,7 +101,7 @@ public:
virtual CFX_ByteString GetName() {return CFX_ByteString("WidgetHandler");}
- virtual bool CanAnswer(CPDFSDK_Annot* pAnnot);
+ virtual FX_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 bool HitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point);
+ virtual FX_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 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;}
+ 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;}
//by wjm.
- 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 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 void OnDeSelected(CPDFSDK_Annot* pAnnot) {}
virtual void OnSelected(CPDFSDK_Annot* pAnnot) {}
- virtual bool OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
- virtual bool OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
+ virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
+ virtual FX_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 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_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_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_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_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_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_OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
- virtual bool Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
+ virtual FX_BOOL Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
+ virtual FX_BOOL Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
virtual CPDF_Rect Annot_OnGetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot);
- virtual bool Annot_OnHitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point);
+ virtual FX_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,bool bNext);
+ CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot,FX_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, bool bReverse,
- bool bIgnoreTopmost=false,bool bCircle=false,CFX_PtrArray* pList=NULL);
+ CPDFSDK_AnnotIterator(CPDFSDK_PageView * pPageView, FX_BOOL bReverse,
+ FX_BOOL bIgnoreTopmost=FALSE,FX_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 bool InitIteratorAnnotList(CPDFSDK_PageView * pPageView,CFX_PtrArray* pList=NULL);
+ virtual FX_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;
- bool m_bReverse;
- bool m_bIgnoreTopmost;
- bool m_bCircle;
+ FX_BOOL m_bReverse;
+ FX_BOOL m_bIgnoreTopmost;
+ FX_BOOL m_bCircle;
};
#endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_
diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h
index b9f1fcd4b1..dcd295de9f 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);
- 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);
+ 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);
operator time_t();
CPDFSDK_DateTime& FromPDFDateTimeString(const CFX_ByteString& dtStr);
@@ -92,8 +92,8 @@ public:
void SetTabOrder(int iTabOrder);
// Selection
- bool IsSelected();
- void SetSelected(bool bSelected);
+ FX_BOOL IsSelected();
+ void SetSelected(FX_BOOL bSelected);
CFX_ByteString GetType() const;
virtual CFX_ByteString GetSubType() const;
@@ -146,9 +146,9 @@ public:
void SetColor(FX_COLORREF color);
void RemoveColor();
- bool GetColor(FX_COLORREF& color) const;
+ FX_BOOL GetColor(FX_COLORREF& color) const;
- bool IsVisible() const;
+ FX_BOOL IsVisible() const;
//action
CPDF_Action GetAction() const;
@@ -162,8 +162,8 @@ public:
virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT);
public:
- bool IsAppearanceValid();
- bool IsAppearanceValid(CPDF_Annot::AppearanceMode mode);
+ FX_BOOL IsAppearanceValid();
+ FX_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:
- bool CreateFormFiller();
+ FX_BOOL CreateFormFiller();
protected:
CPDF_Annot* m_pAnnot;
CPDFSDK_PageView* m_pPageView;
- bool m_bSelected;
+ FX_BOOL m_bSelected;
int m_nTabOrder;
};
diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h
index 6b974c5535..edbd5e4efc 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;
}
- bool bModifier; //in
- bool bShift; //in
+ FX_BOOL bModifier; //in
+ FX_BOOL bShift; //in
int nCommitKey; //in
CFX_WideString sChange; //in[out]
CFX_WideString sChangeEx; //in
- bool bKeyDown; //in
+ FX_BOOL bKeyDown; //in
int nSelEnd; //in[out]
int nSelStart; //in[out]
CFX_WideString sValue; //in[out]
- bool bWillCommit; //in
- bool bFieldFull; //in
- bool bRC; //in[out]
+ FX_BOOL bWillCommit; //in
+ FX_BOOL bFieldFull; //in
+ FX_BOOL bRC; //in[out]
}PDFSDK_FieldAction;
class CPDFSDK_Widget : public CPDFSDK_Annot
{
@@ -80,9 +80,9 @@ public:
int GetFieldFlags() const;
int GetRotate() const;
- bool GetFillColor(FX_COLORREF& color) const;
- bool GetBorderColor(FX_COLORREF& color) const;
- bool GetTextColor(FX_COLORREF& color) const;
+ FX_BOOL GetFillColor(FX_COLORREF& color) const;
+ FX_BOOL GetBorderColor(FX_COLORREF& color) const;
+ FX_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;
- bool IsOptionSelected(int nIndex) const;
+ FX_BOOL IsOptionSelected(int nIndex) const;
int GetTopVisibleIndex() const;
- bool IsChecked() const;
+ FX_BOOL IsChecked() const;
/*
BF_ALIGN_LEFT
BF_ALIGN_MIDDL
@@ -103,20 +103,20 @@ public:
CFX_WideString GetAlternateName() const;
//Set Properties.
- void SetCheck(bool bChecked, bool bNotify);
- void SetValue(const CFX_WideString& sValue, bool bNotify);
+ void SetCheck(FX_BOOL bChecked, FX_BOOL bNotify);
+ void SetValue(const CFX_WideString& sValue, FX_BOOL bNotify);
void SetDefaultValue(const CFX_WideString& sValue);
- void SetOptionSelection(int index, bool bSelected, bool bNotify);
- void ClearSelection(bool bNotify);
+ void SetOptionSelection(int index, FX_BOOL bSelected, FX_BOOL bNotify);
+ void ClearSelection(FX_BOOL bNotify);
void SetTopVisibleIndex(int index);
- void ResetAppearance(const FX_WCHAR* sValue, bool bValueChanged);
- void ResetFieldAppearance(bool bValueChanged);
+ void ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged);
+ void ResetFieldAppearance(FX_BOOL bValueChanged);
void UpdateField();
- CFX_WideString OnFormat(bool& bFormated);
+ CFX_WideString OnFormat(FX_BOOL& bFormated);
//Message.
- bool OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldAction& data,
+ FX_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();
- bool IsAppModified() const;
+ FX_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:
- bool IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode);
+ FX_BOOL IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode);
void DrawAppearance(CFX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device,
CPDF_Annot::AppearanceMode mode, const CPDF_RenderOptions* pOptions);
public:
- bool HitTest(FX_FLOAT pageX, FX_FLOAT pageY);
+ FX_BOOL HitTest(FX_FLOAT pageX, FX_FLOAT pageY);
private:
CPDFSDK_InterForm* m_pInterForm;
- bool m_bAppModified;
+ FX_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; }
- bool HighlightWidgets();
+ FX_BOOL HighlightWidgets();
- CPDFSDK_Widget* GetSibling(CPDFSDK_Widget* pWidget, bool bNext) const;
+ CPDFSDK_Widget* GetSibling(CPDFSDK_Widget* pWidget, FX_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(bool bEnabled);
- bool IsCalculateEnabled() const;
+ void EnableCalculate(FX_BOOL bEnabled);
+ FX_BOOL IsCalculateEnabled() const;
#ifdef _WIN32
CPDF_Stream* LoadImageFromFile(const CFX_WideString& sFile);
#endif
- void OnKeyStrokeCommit(CPDF_FormField* pFormField, CFX_WideString& csValue, bool& bRC);
- void OnValidate(CPDF_FormField* pFormField, CFX_WideString& csValue, bool& bRC);
+ void OnKeyStrokeCommit(CPDF_FormField* pFormField, CFX_WideString& csValue, FX_BOOL& bRC);
+ void OnValidate(CPDF_FormField* pFormField, CFX_WideString& csValue, FX_BOOL& bRC);
void OnCalculate(CPDF_FormField* pFormField = NULL);
- CFX_WideString OnFormat(CPDF_FormField* pFormField, bool& bFormated);
+ CFX_WideString OnFormat(CPDF_FormField* pFormField, FX_BOOL& bFormated);
- void ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, bool bValueChanged);
+ void ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, FX_BOOL bValueChanged);
void UpdateField(CPDF_FormField* pFormField);
- 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);
+ 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);
void GetFieldFromObjects(const CFX_PtrArray& objects, CFX_PtrArray& fields);
- 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);
+ 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);
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);
- bool FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_WideString csTxtFile);
- bool FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize);
+ FX_BOOL FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_WideString csTxtFile);
+ FX_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;
- bool m_bCalculate;
- bool m_bBusy;
+ FX_BOOL m_bCalculate;
+ FX_BOOL m_bBusy;
public:
- bool IsNeedHighLight(int nFieldType);
+ FX_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;
- bool m_bNeedHightlight[6];
+ FX_BOOL m_bNeedHightlight[6];
};
#define BAI_STRUCTURE 0
diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h
index 41607929b4..29b265a428 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 bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
+ virtual FX_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, bool bNeedToRestore,
+ int rotate, int flags, FX_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 1ce57c5687..d57138b350 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -92,24 +92,24 @@ public:
m_pInfo->FFI_OnChange(m_pInfo);
}
- bool FFI_IsSHIFTKeyDown(FX_DWORD nFlag) const
+ FX_BOOL FFI_IsSHIFTKeyDown(FX_DWORD nFlag) const
{
return (nFlag & FWL_EVENTFLAG_ShiftKey) != 0;
}
- bool FFI_IsCTRLKeyDown(FX_DWORD nFlag) const
+ FX_BOOL FFI_IsCTRLKeyDown(FX_DWORD nFlag) const
{
return (nFlag & FWL_EVENTFLAG_ControlKey) != 0;
}
- bool FFI_IsALTKeyDown(FX_DWORD nFlag) const
+ FX_BOOL FFI_IsALTKeyDown(FX_DWORD nFlag) const
{
return (nFlag & FWL_EVENTFLAG_AltKey) != 0;
}
- bool FFI_IsINSERTKeyDown(FX_DWORD nFlag) const
+ FX_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, bool bFocus)
+ void FFI_OnSetFieldInputFocus(void* field,FPDF_WIDESTRING focusText, FPDF_DWORD nTextLen, FX_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);
}
- bool IsJSInitiated() const { return m_pInfo && m_pInfo->m_pJsPlatform; }
+ FX_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, bool ReNew = true);
+ CPDFSDK_PageView* GetPageView(CPDF_Page* pPDFPage, FX_BOOL ReNew = TRUE);
CPDFSDK_PageView* GetPageView(int nIndex);
CPDFSDK_PageView* GetCurrentView();
void ReMovePageView(CPDF_Page* pPDFPage);
@@ -237,25 +237,25 @@ public:
IFXJS_Runtime * GetJsRuntime();
- bool SetFocusAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag = 0);
- bool KillFocusAnnot(FX_UINT nFlag = 0);
+ FX_BOOL SetFocusAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag = 0);
+ FX_BOOL KillFocusAnnot(FX_UINT nFlag = 0);
- 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);
+ 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);
void OnCloseDocument();
int GetPageCount() {return m_pDoc->GetPageCount();}
- bool GetPermissions(int nFlag);
- bool GetChangeMark() {return m_bChangeMask;}
- void SetChangeMark() {m_bChangeMask = true;}
- void ClearChangeMark() {m_bChangeMask= false;}
+ FX_BOOL GetPermissions(int nFlag);
+ FX_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();
- bool ProcOpenAction();
+ FX_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;
- bool m_bChangeMask;
+ FX_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);}
- bool KillFocusAnnot(FX_UINT nFlag = 0) {return m_pSDKDoc->KillFocusAnnot(nFlag);}
- bool Annot_HasAppearance(CPDF_Annot* pAnnot);
+ FX_BOOL KillFocusAnnot(FX_UINT nFlag = 0) {return m_pSDKDoc->KillFocusAnnot(nFlag);}
+ FX_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);
- bool DeleteAnnot(CPDFSDK_Annot* pAnnot);
+ FX_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;}
- 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);
+ 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);
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(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;}
+ 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;}
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;
- bool m_bEnterWidget;
- bool m_bExitWidget;
- bool m_bOnWidget;
- bool m_bValid;
- bool m_bLocked;
- bool m_bTakeOverPage;
+ FX_BOOL m_bEnterWidget;
+ FX_BOOL m_bExitWidget;
+ FX_BOOL m_bOnWidget;
+ FX_BOOL m_bValid;
+ FX_BOOL m_bLocked;
+ FX_BOOL m_bTakeOverPage;
};
@@ -340,14 +340,14 @@ public:
typedef int (*LP_COMPARE)(TYPE p1, TYPE p2);
- void Sort(LP_COMPARE pCompare, bool bAscent = true)
+ void Sort(LP_COMPARE pCompare, FX_BOOL bAscent = TRUE)
{
int nSize = this->GetSize();
QuickSort(0, nSize -1, bAscent, pCompare);
}
private:
- void QuickSort(FX_UINT nStartPos, FX_UINT nStopPos, bool bAscend, LP_COMPARE pCompare)
+ void QuickSort(FX_UINT nStartPos, FX_UINT nStopPos, FX_BOOL bAscend, LP_COMPARE pCompare)
{
if (nStartPos >= nStopPos) return;
diff --git a/fpdfsdk/include/fsdk_rendercontext.h b/fpdfsdk/include/fsdk_rendercontext.h
index 8945d181f9..b2bc163b49 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 );
- bool NeedToPauseNow();
+ FX_BOOL NeedToPauseNow();
private:
IFSDK_PAUSE* m_IPause;
diff --git a/fpdfsdk/include/fx_systemhandler.h b/fpdfsdk/include/fx_systemhandler.h
index 30168d48b6..bf59e452ea 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 bool IsSelectionImplemented() = 0;
+ virtual FX_BOOL IsSelectionImplemented() = 0;
virtual CFX_WideString GetClipboardText(FX_HWND hWnd) = 0;
- virtual bool SetClipboardText(FX_HWND hWnd, CFX_WideString string) = 0;
+ virtual FX_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 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 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 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 bool FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString sFontFaceName) = 0;
+ virtual FX_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 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_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 FX_SYSTEMTIME GetLocalTime() = 0;
diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h
index 45d2646c19..bf46e91819 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(bool bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place) = 0;
+ virtual void IOnSetCaret(FX_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 bool NextWord() = 0;
+ virtual FX_BOOL NextWord() = 0;
//move the current position to the next line.
- virtual bool NextLine() = 0;
+ virtual FX_BOOL NextLine() = 0;
//move the current position to the next section.
- virtual bool NextSection() = 0;
+ virtual FX_BOOL NextSection() = 0;
//move the current position to the previous word.
- virtual bool PrevWord() = 0;
+ virtual FX_BOOL PrevWord() = 0;
//move the current position to the previous line.
- virtual bool PrevLine() = 0;
+ virtual FX_BOOL PrevLine() = 0;
//move the current position to the previous section.
- virtual bool PrevSection() = 0;
+ virtual FX_BOOL PrevSection() = 0;
//get the information of the current word.
- virtual bool GetWord(CPVT_Word & word) const = 0;
+ virtual FX_BOOL GetWord(CPVT_Word & word) const = 0;
//get the information of the current line.
- virtual bool GetLine(CPVT_Line & line) const = 0;
+ virtual FX_BOOL GetLine(CPVT_Line & line) const = 0;
//get the information of the current section.
- virtual bool GetSection(CPVT_Section & section) const = 0;
+ virtual FX_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, bool bPaint = true) = 0;
+ virtual void SetPlateRect(const CPDF_Rect & rect, FX_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, bool bPaint = true) = 0;
+ virtual void SetAlignmentH(int32_t nFormat = 0, FX_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, bool bPaint = true) = 0;
+ virtual void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) = 0;
//if the text is shown in secret , set a character for substitute.
- virtual void SetPasswordChar(FX_WORD wSubWord = '*', bool bPaint = true) = 0;
+ virtual void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE) = 0;
//set the maximal count of words of the text.
- virtual void SetLimitChar(int32_t nLimitChar = 0, bool bPaint = true) = 0;
+ virtual void SetLimitChar(int32_t nLimitChar = 0, FX_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, bool bPaint = true) = 0;
+ virtual void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE) = 0;
//set the space of two characters.
- virtual void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, bool bPaint = true) = 0;
+ virtual void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE) = 0;
//set the horizontal scale of all characters.
- virtual void SetHorzScale(int32_t nHorzScale = 100, bool bPaint = true) = 0;
+ virtual void SetHorzScale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE) = 0;
//set the leading of all lines
- virtual void SetLineLeading(FX_FLOAT fLineLeading, bool bPaint = true) = 0;
+ virtual void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE) = 0;
//if set, CRLF is allowed.
- virtual void SetMultiLine(bool bMultiLine = true, bool bPaint = true) = 0;
+ virtual void SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE) = 0;
//if set, all words auto fit the width of the bounding box.
- virtual void SetAutoReturn(bool bAuto = true, bool bPaint = true) = 0;
+ virtual void SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0;
//if set, a font size is calculated to full fit the bounding box.
- virtual void SetAutoFontSize(bool bAuto = true, bool bPaint = true) = 0;
+ virtual void SetAutoFontSize(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0;
//is set, the text is allowed to scroll.
- virtual void SetAutoScroll(bool bAuto = true, bool bPaint = true) = 0;
+ virtual void SetAutoScroll(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0;
//set the font size of all words.
- virtual void SetFontSize(FX_FLOAT fFontSize, bool bPaint = true) = 0;
+ virtual void SetFontSize(FX_FLOAT fFontSize, FX_BOOL bPaint = TRUE) = 0;
//the text is allowed to auto-scroll, allow the text overflow?
- virtual void SetTextOverflow(bool bAllowed = false, bool bPaint = true) = 0;
+ virtual void SetTextOverflow(FX_BOOL bAllowed = FALSE, FX_BOOL bPaint = TRUE) = 0;
//query if the edit is richedit.
- virtual bool IsRichText() const = 0;
+ virtual FX_BOOL IsRichText() const = 0;
//set the edit is richedit.
- virtual void SetRichText(bool bRichText = true, bool bPaint = true) = 0;
+ virtual void SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE) = 0;
//set the fontsize of selected text.
- virtual bool SetRichFontSize(FX_FLOAT fFontSize) = 0;
+ virtual FX_BOOL SetRichFontSize(FX_FLOAT fFontSize) = 0;
//set the fontindex of selected text, user can change the font of selected text.
- virtual bool SetRichFontIndex(int32_t nFontIndex) = 0;
+ virtual FX_BOOL SetRichFontIndex(int32_t nFontIndex) = 0;
//set the textcolor of selected text.
- virtual bool SetRichTextColor(FX_COLORREF dwColor) = 0;
+ virtual FX_BOOL SetRichTextColor(FX_COLORREF dwColor) = 0;
//set the text script type of selected text. (0:normal 1:superscript 2:subscript)
- virtual bool SetRichTextScript(int32_t nScriptType) = 0;
+ virtual FX_BOOL SetRichTextScript(int32_t nScriptType) = 0;
//set the bold font style of selected text.
- virtual bool SetRichTextBold(bool bBold = true) = 0;
+ virtual FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE) = 0;
//set the italic font style of selected text.
- virtual bool SetRichTextItalic(bool bItalic = true) = 0;
+ virtual FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE) = 0;
//set the underline style of selected text.
- virtual bool SetRichTextUnderline(bool bUnderline = true) = 0;
+ virtual FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE) = 0;
//set the crossout style of selected text.
- virtual bool SetRichTextCrossout(bool bCrossout = true) = 0;
+ virtual FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE) = 0;
//set the charspace of selected text, in user coordinate.
- virtual bool SetRichTextCharSpace(FX_FLOAT fCharSpace) = 0;
+ virtual FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace) = 0;
//set the horizontal scale of selected text, default value is 100.
- virtual bool SetRichTextHorzScale(int32_t nHorzScale = 100) = 0;
+ virtual FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100) = 0;
//set the leading of selected section, in user coordinate.
- virtual bool SetRichTextLineLeading(FX_FLOAT fLineLeading) = 0;
+ virtual FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading) = 0;
//set the indent of selected section, in user coordinate.
- virtual bool SetRichTextLineIndent(FX_FLOAT fLineIndent) = 0;
+ virtual FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent) = 0;
//set the alignment of selected section, nAlignment(0:left 1:middle 2:right)
- virtual bool SetRichTextAlignment(int32_t nAlignment) = 0;
+ virtual FX_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 bool IsSelected() const = 0;
+ virtual FX_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,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;
+ //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;
//send the UP key message to edit.
- virtual void OnVK_UP(bool bShift,bool bCtrl) = 0;
+ virtual void OnVK_UP(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
//send the DOWN key message to edit.
- virtual void OnVK_DOWN(bool bShift,bool bCtrl) = 0;
+ virtual void OnVK_DOWN(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
//send the LEFT key message to edit.
- virtual void OnVK_LEFT(bool bShift,bool bCtrl) = 0;
+ virtual void OnVK_LEFT(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
//send the RIGHT key message to edit.
- virtual void OnVK_RIGHT(bool bShift,bool bCtrl) = 0;
+ virtual void OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
//send the HOME key message to edit.
- virtual void OnVK_HOME(bool bShift,bool bCtrl) = 0;
+ virtual void OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl) = 0;
//send the END key message to edit.
- virtual void OnVK_END(bool bShift,bool bCtrl) = 0;
+ virtual void OnVK_END(FX_BOOL bShift,FX_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 bool InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL) = 0;
+ virtual FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL) = 0;
//insert a return into the edit.
- virtual bool InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
+ virtual FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0;
//insert text into the edit.
- virtual bool InsertText(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET,
+ virtual FX_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 bool Backspace() = 0;
+ virtual FX_BOOL Backspace() = 0;
//do delete operation.
- virtual bool Delete() = 0;
+ virtual FX_BOOL Delete() = 0;
//delete the selected text.
- virtual bool Clear() = 0;
+ virtual FX_BOOL Clear() = 0;
//do Redo operation.
- virtual bool Redo() = 0;
+ virtual FX_BOOL Redo() = 0;
//do Undo operation.
- virtual bool Undo() = 0;
+ virtual FX_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(bool bRefresh) = 0;
+ virtual void EnableRefresh(FX_BOOL bRefresh) = 0;
virtual void RefreshWordRange(const CPVT_WordRange& wr) = 0;
//allow undo/redo?
- virtual void EnableUndo(bool bUndo) = 0;
+ virtual void EnableUndo(FX_BOOL bUndo) = 0;
//allow notify?
- virtual void EnableNotify(bool bNotify) = 0;
+ virtual void EnableNotify(FX_BOOL bNotify) = 0;
//allow opr notify?
- virtual void EnableOprNotify(bool bNotify) = 0;
+ virtual void EnableOprNotify(FX_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 bool IsTextFull() const = 0;
- virtual bool CanUndo() const = 0;
- virtual bool CanRedo() const = 0;
+ virtual FX_BOOL IsTextFull() const = 0;
+ virtual FX_BOOL CanUndo() const = 0;
+ virtual FX_BOOL CanRedo() const = 0;
//if the content is changed after settext?
- virtual bool IsModified() const = 0;
+ virtual FX_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,
- bool bContinuous = true, FX_WORD SubWord = 0);
+ FX_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 bool IsItemSelected(int32_t nIndex) const = 0;
+ virtual FX_BOOL IsItemSelected(int32_t nIndex) const = 0;
virtual FX_FLOAT GetFirstHeight() const = 0;
- virtual void SetMultipleSel(bool bMultiple) = 0;
- virtual bool IsMultipleSel() const = 0;
- virtual bool IsValid(int32_t nItemIndex) 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 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,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;
+ 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;
protected:
~IFX_List() { }
diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h
index f728d8735e..7a2742f0ee 100644
--- a/fpdfsdk/include/fxedit/fxet_edit.h
+++ b/fpdfsdk/include/fxedit/fxet_edit.h
@@ -68,27 +68,27 @@ struct CFX_Edit_LineRect
{
}
- bool operator != (const CFX_Edit_LineRect & linerect) const
+ FX_BOOL operator != (const CFX_Edit_LineRect & linerect) const
{
return FXSYS_memcmp(this, &linerect, sizeof(CFX_Edit_LineRect)) != 0;
}
- bool IsSameHeight(const CFX_Edit_LineRect & linerect) const
+ FX_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));
}
- bool IsSameTop(const CFX_Edit_LineRect & linerect) const
+ FX_BOOL IsSameTop(const CFX_Edit_LineRect & linerect) const
{
return FX_EDIT_IsFloatZero(m_rcLine.top - linerect.m_rcLine.top);
}
- bool IsSameLeft(const CFX_Edit_LineRect & linerect) const
+ FX_BOOL IsSameLeft(const CFX_Edit_LineRect & linerect) const
{
return FX_EDIT_IsFloatZero(m_rcLine.left - linerect.m_rcLine.left);
}
- bool IsSameRight(const CFX_Edit_LineRect & linerect) const
+ FX_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;
}
- bool IsExist() const
+ FX_BOOL IsExist() const
{
return BeginPos != EndPos;
}
- bool operator != (const CPVT_WordRange & wr) const
+ FX_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);
- bool CanUndo() const;
- bool CanRedo() const;
- bool IsModified() const;
- bool IsWorking() const;
+ FX_BOOL CanUndo() const;
+ FX_BOOL CanRedo() const;
+ FX_BOOL IsModified() const;
+ FX_BOOL IsWorking() const;
void Reset();
@@ -316,26 +316,26 @@ private:
int32_t m_nCurUndoPos;
int32_t m_nBufSize;
- bool m_bModified;
- bool m_bVirgin;
- bool m_bWorking;
+ FX_BOOL m_bModified;
+ FX_BOOL m_bVirgin;
+ FX_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(bool bFirst){m_bFirst = bFirst;}
- bool IsFirst(){return m_bFirst;}
- void SetLast(bool bLast){m_bLast = bLast;}
- bool IsLast(){return m_bLast;}
+ 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;}
private:
- bool m_bFirst;
- bool m_bLast;
+ FX_BOOL m_bFirst;
+ FX_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, bool bSecEnd);
+ const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps, FX_BOOL bSecEnd);
virtual ~CFXEU_Delete();
void Redo();
@@ -439,7 +439,7 @@ private:
int32_t m_nCharset;
CPVT_SecProps m_SecProps;
CPVT_WordProps m_WordProps;
- bool m_bSecEnd;
+ FX_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, bool bPaint = true);
+ void SetPlateRect(const CPDF_Rect & rect, FX_BOOL bPaint = TRUE);
void SetScrollPos(const CPDF_Point & point);
- 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 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 SetText(const FX_WCHAR* text,int32_t charset = DEFAULT_CHARSET,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
- 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,
+ 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,
const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL);
- bool Redo();
- bool Undo();
+ FX_BOOL Redo();
+ FX_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);
- bool IsSelected() const;
+ FX_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(bool bNotify);
+ void EnableNotify(FX_BOOL bNotify);
void SetText(const FX_WCHAR* text,int32_t charset,
- 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 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 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);
+ 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);
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(bool bRefresh);
+ void EnableRefresh(FX_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(bool bUndo);
- void EnableOprNotify(bool bNotify);
+ void EnableUndo(FX_BOOL bUndo);
+ void EnableOprNotify(FX_BOOL bNotify);
- bool IsTextFull() const;
- bool IsTextOverflow() const;
- bool CanUndo() const;
- bool CanRedo() const;
- bool IsModified() const;
+ FX_BOOL IsTextFull() const;
+ FX_BOOL IsTextOverflow() const;
+ FX_BOOL CanUndo() const;
+ FX_BOOL CanRedo() const;
+ FX_BOOL IsModified() const;
void BeginGroupUndo(const CFX_WideString& sTitle);
void EndGroupUndo();
@@ -751,19 +751,19 @@ private:
CPDF_Point m_ptScrollPos;
CPDF_Point m_ptRefreshScrollPos;
- bool m_bEnableScroll;
+ FX_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;
- bool m_bNotifyFlag;
- bool m_bEnableOverflow;
- bool m_bEnableRefresh;
+ FX_BOOL m_bNotifyFlag;
+ FX_BOOL m_bEnableOverflow;
+ FX_BOOL m_bEnableRefresh;
CPDF_Rect m_rcOldContent;
- bool m_bEnableUndo;
- bool m_bNotify;
- bool m_bOprNotify;
+ FX_BOOL m_bEnableUndo;
+ FX_BOOL m_bNotify;
+ FX_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();
- bool NextWord();
- bool NextLine();
- bool NextSection();
- bool PrevWord();
- bool PrevLine();
- bool PrevSection();
+ FX_BOOL NextWord();
+ FX_BOOL NextLine();
+ FX_BOOL NextSection();
+ FX_BOOL PrevWord();
+ FX_BOOL PrevLine();
+ FX_BOOL PrevSection();
- bool GetWord(CPVT_Word & word) const;
- bool GetLine(CPVT_Line & line) const;
- bool GetSection(CPVT_Section & section) const;
+ FX_BOOL GetWord(CPVT_Word & word) const;
+ FX_BOOL GetLine(CPVT_Line & line) const;
+ FX_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();
- bool IsLatinWord(FX_WORD word);
+ FX_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 07edb46887..fe75b0fc35 100644
--- a/fpdfsdk/include/fxedit/fxet_list.h
+++ b/fpdfsdk/include/fxedit/fxet_list.h
@@ -31,7 +31,7 @@ public:
y = 0.0f;
}
- bool operator != (const CLST_Size & size) const
+ FX_BOOL operator != (const CLST_Size & size) const
{
return FXSYS_memcmp(this, &size, sizeof(CLST_Size)) != 0;
}
@@ -81,12 +81,12 @@ public:
return *this;
}
- bool operator == (const CLST_Rect & rect) const
+ FX_BOOL operator == (const CLST_Rect & rect) const
{
return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) == 0;
}
- bool operator != (const CLST_Rect & rect) const
+ FX_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(bool bSelected);
- void SetCaret(bool bCaret);
+ void SetSelect(FX_BOOL bSelected);
+ void SetCaret(FX_BOOL bCaret);
void SetText(const FX_WCHAR* text);
void SetFontSize(FX_FLOAT fFontSize);
CFX_WideString GetText() const;
CLST_Rect GetRect() const;
- bool IsSelected() const;
- bool IsCaret() const;
+ FX_BOOL IsSelected() const;
+ FX_BOOL IsCaret() const;
FX_FLOAT GetItemHeight() const;
FX_WORD GetFirstChar() const;
private:
IFX_Edit* m_pEdit;
- bool m_bSelected;
- bool m_bCaret;
+ FX_BOOL m_bSelected;
+ FX_BOOL m_bCaret;
CLST_Rect m_rcListItem;
};
@@ -209,7 +209,7 @@ private:
template<class TYPE> class CLST_ArrayTemplate : public CFX_ArrayTemplate<TYPE>
{
public:
- bool IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; }
+ FX_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 bool IsItemSelected(int32_t nIndex) const;
+ virtual FX_BOOL IsItemSelected(int32_t nIndex) const;
virtual FX_FLOAT GetFirstHeight() const;
- virtual void SetMultipleSel(bool bMultiple);
- virtual bool IsMultipleSel() const;
- virtual bool IsValid(int32_t nItemIndex) const;
+ virtual void SetMultipleSel(FX_BOOL bMultiple);
+ virtual FX_BOOL IsMultipleSel() const;
+ virtual FX_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, bool bSelected);
- void SetItemCaret(int32_t nItemIndex, bool bCaret);
+ void SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected);
+ void SetItemCaret(int32_t nItemIndex, FX_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;
- bool m_bMultiple;
+ FX_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);
- bool IsExist(int32_t nItemIndex) const;
+ FX_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,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);
+ 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);
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, bool bSelected);
+ void SetMultipleSelect(int32_t nItemIndex, FX_BOOL bSelected);
void SetSingleSelect(int32_t nItemIndex);
void InvalidateItem(int32_t nItemIndex);
void SelectItems();
- bool IsItemVisible(int32_t nItemIndex) const;
+ FX_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;
- bool m_bNotifyFlag;
+ FX_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
- bool m_bCtrlSel; //for multiple
+ FX_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 eae3e0730d..b6447fda2a 100644
--- a/fpdfsdk/include/javascript/Document.h
+++ b/fpdfsdk/include/javascript/Document.h
@@ -16,14 +16,14 @@ public:
virtual ~PrintParamsObj(){}
public:
- bool bUI;
+ FX_BOOL bUI;
int nStart;
int nEnd;
- bool bSilent;
- bool bShrinkToFit;
- bool bPrintAsImage;
- bool bReverse;
- bool bAnnotations;
+ FX_BOOL bSilent;
+ FX_BOOL bShrinkToFit;
+ FX_BOOL bPrintAsImage;
+ FX_BOOL bReverse;
+ FX_BOOL bAnnotations;
};
class CJS_PrintParamsObj : public CJS_Object
@@ -85,84 +85,84 @@ public:
virtual ~Document();
public:
- 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 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 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);
+ 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);
public:
void AttachDoc(CPDFSDK_Document* pDoc);
CPDFSDK_Document* GetReaderDoc();
- static bool ExtractFileName(CPDFSDK_Document* pDoc, CFX_ByteString& strFileName);
- static bool ExtractFolderName(CPDFSDK_Document* pDoc, CFX_ByteString& strFolderName);
+ static FX_BOOL ExtractFileName(CPDFSDK_Document* pDoc, CFX_ByteString& strFileName);
+ static FX_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);
- bool ParserParams(JSObject *pObj,CJS_AnnotObj& annotobj);
+ FX_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 bool InitInstance(IFXJS_Context* cc);
+ virtual FX_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 2a6ba7d1ce..70d1d39b48 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);
- 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 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 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);
+ 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);
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,
- bool bChangeMark, bool bResetAP, bool bRefresh);
+ FX_BOOL bChangeMark, FX_BOOL bResetAP, FX_BOOL bRefresh);
static void UpdateFormControl(CPDFSDK_Document* pDocument, CPDF_FormControl* pFormControl,
- bool bChangeMark, bool bResetAP, bool bRefresh);
+ FX_BOOL bChangeMark, FX_BOOL bResetAP, FX_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:
- bool AttachField(Document* pDocument, const CFX_WideString& csFieldName);
- void SetDelay(bool bDelay);
+ FX_BOOL AttachField(Document* pDocument, const CFX_WideString& csFieldName);
+ void SetDelay(FX_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);
- bool ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel);
+ FX_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;
- bool m_bCanSet;
+ FX_BOOL m_bCanSet;
- bool m_bDelay;
+ FX_BOOL m_bDelay;
v8::Isolate* m_isolate;
};
@@ -271,7 +271,7 @@ public:
CJS_Field(JSFXObject pObject) : CJS_Object(pObject) {};
virtual ~CJS_Field(void){};
- virtual bool InitInstance(IFXJS_Context* cc);
+ virtual FX_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 37e12dccf8..783b249ff6 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 bool Compile(const CFX_WideString& script, CFX_WideString& info) = 0;
- virtual bool RunScript(const CFX_WideString& script, CFX_WideString& info) = 0;
+ 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 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(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_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_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_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_Keystroke(CFX_WideString& strChange, const CFX_WideString& strChangeEx,
- 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;
+ 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;
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(bool bEnable) = 0;
+ virtual void EnableMessageBox(FX_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:
- bool m_bInit;
+ FX_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 367db7bc49..0298005f00 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();
- bool name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
+ FX_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 79d01a02f8..2e2cf37a5e 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 bool Compile(const CFX_WideString& script, CFX_WideString& info);
- virtual bool RunScript(const CFX_WideString& script, CFX_WideString& info);
+ virtual FX_BOOL Compile(const CFX_WideString& script, CFX_WideString& info);
+ virtual FX_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(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_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_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_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_Keystroke(CFX_WideString& strChange, const CFX_WideString& strChangeEx,
- 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);
+ 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);
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(bool bEnable) {m_bMsgBoxEnable = bEnable;}
- bool IsMsgBoxEnabled() const {return m_bMsgBoxEnable;}
+ virtual void EnableMessageBox(FX_BOOL bEnable) {m_bMsgBoxEnable = bEnable;}
+ FX_BOOL IsMsgBoxEnabled() const {return m_bMsgBoxEnable;}
public:
CPDFDoc_Environment* GetReaderApp();
CJS_Runtime* GetJSRuntime(){return m_pRuntime;}
- bool DoJob(int nMode, const CFX_WideString& script, CFX_WideString& info);
+ FX_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;
- bool m_bBusy;
- bool m_bMsgBoxEnable;
+ FX_BOOL m_bBusy;
+ FX_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 087f489126..f1b36bf3d0 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, bool (C::*M)(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)>
+template <class C, FX_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, bool (C::*M)(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)>
+template <class C, FX_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, bool (C::*M)(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)>
+template <class C, FX_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());
- bool bRet = pObj->QueryProperty(propname.c_str());
+ FX_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 <bool (*F)(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)>
+template <FX_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 9977462094..62afb829e7 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, bool& bRc);
- void OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, bool bWillCommit);
+ 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_Keystroke(CFX_WideString& strChange, const CFX_WideString& strChangeEx,
- 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);
+ 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);
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();
- bool IsValid();
+ FX_BOOL IsValid();
CFX_WideString& Change();
CFX_WideString ChangeEx();
int CommitKey();
- bool FieldFull();
- bool KeyDown();
- bool Modifier();
+ FX_BOOL FieldFull();
+ FX_BOOL KeyDown();
+ FX_BOOL Modifier();
const FX_WCHAR* Name();
const FX_WCHAR* Type();
- bool& Rc();
+ FX_BOOL& Rc();
int& SelEnd();
int& SelStart();
- bool Shift();
+ FX_BOOL Shift();
Field* Source();
Field* Target_Field();
CFX_WideString& Value();
- bool WillCommit();
+ FX_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;
- bool m_bValid;
+ FX_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;
- bool m_bKeyDown;
- bool m_bModifier;
- bool m_bShift;
+ FX_BOOL m_bKeyDown;
+ FX_BOOL m_bModifier;
+ FX_BOOL m_bShift;
int* m_pISelEnd;
int m_nSelEndDu;
int* m_pISelStart;
int m_nSelStartDu;
- bool m_bWillCommit;
+ FX_BOOL m_bWillCommit;
CFX_WideString* m_pValue;
- bool m_bFieldFull;
- bool* m_pbRc;
- bool m_bRcDu;
+ FX_BOOL m_bFieldFull;
+ FX_BOOL* m_pbRc;
+ FX_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 987de95666..b3637b93d5 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;
- bool bPersistent;
+ FX_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);
- bool SetGlobalVariablePersistent(const FX_CHAR* propname, bool bPersistent);
- bool DeleteGlobalVariable(const FX_CHAR* propname);
+ FX_BOOL SetGlobalVariablePersistent(const FX_CHAR* propname, FX_BOOL bPersistent);
+ FX_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 f8ec90e3c4..3898d184d1 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 bool IsType(const FX_CHAR* sClassName){return true;};
+ virtual FX_BOOL IsType(const FX_CHAR* sClassName){return TRUE;};
virtual CFX_ByteString GetClassName(){return "";};
- virtual bool InitInstance(IFXJS_Context* cc){return true;};
- virtual bool ExitInstance(){return true;};
+ virtual FX_BOOL InitInstance(IFXJS_Context* cc){return TRUE;};
+ virtual FX_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;
- bool m_bProcessing;
+ FX_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 b9ad6efc47..8fdfa8b733 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;}
- bool InitJSObjects();
+ FX_BOOL InitJSObjects();
- bool AddEventToLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType);
+ FX_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;}
- bool IsBlocking(){return m_bBlocking;}
+ void BeginBlock(){m_bBlocking = TRUE;}
+ void EndBlock(){m_bBlocking = FALSE;}
+ FX_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;
- bool m_bBlocking;
+ FX_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 035cef064d..6186817fa5 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);
- bool IsArrayObject() const;
- bool IsDateObject() const;
+ FX_BOOL IsArrayObject() const;
+ FX_BOOL IsDateObject() const;
FXJSVALUETYPE GetType() const;
- bool ConvertToArray(CJS_Array &) const;
- bool ConvertToDate(CJS_Date &) const;
+ FX_BOOL ConvertToArray(CJS_Array &) const;
+ FX_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:
- bool IsSetting();
- bool IsGetting();
+ FX_BOOL IsSetting();
+ FX_BOOL IsGetting();
void operator<<(int);
void operator>>(int&) const;
void operator<<(bool);
@@ -122,7 +122,7 @@ public:
void StartSetting();
void StartGetting();
private:
- bool m_bIsSetting;
+ FX_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();
- bool IsAttached();
+ FX_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);
- bool IsValidDate();
+ FX_BOOL IsValidDate();
protected:
v8::Local<v8::Value> m_pDate;
diff --git a/fpdfsdk/include/javascript/PublicMethods.h b/fpdfsdk/include/javascript/PublicMethods.h
index 7fca363a11..cff9e11479 100644
--- a/fpdfsdk/include/javascript/PublicMethods.h
+++ b/fpdfsdk/include/javascript/PublicMethods.h
@@ -16,28 +16,28 @@ public:
virtual ~CJS_PublicMethods(void){};
public:
- 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);
+ 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);
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, bool& bWrongFormat);
+ static double MakeRegularDate(const CFX_WideString & value,const CFX_WideString & format, FX_BOOL& bWrongFormat);
static CFX_WideString MakeFormatDate(double dDate,const CFX_WideString & format);
- static bool ConvertStringToNumber(const FX_WCHAR* swSource, double & dRet, bool & bDot);
+ static FX_BOOL ConvertStringToNumber(const FX_WCHAR* swSource, double & dRet, FX_BOOL & bDot);
static double ParseStringToNumber(const FX_WCHAR* swSource);
- static double ParseNormalDate(const CFX_WideString & value, bool& bWrongFormat);
+ static double ParseNormalDate(const CFX_WideString & value, FX_BOOL& bWrongFormat);
static double MakeInterDate(CFX_WideString strValue);
- static double ParseNumber(const FX_WCHAR* swSource, bool& bAllDigits, bool& bDot, bool& bSign, bool& bKXJS);
+ static double ParseNumber(const FX_WCHAR* swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_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 bool IsNumber(const FX_CHAR* string);
- static bool IsNumber(const FX_WCHAR* string);
+ static FX_BOOL IsNumber(const FX_CHAR* string);
+ static FX_BOOL IsNumber(const FX_WCHAR* string);
- 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 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 maskSatisfied(wchar_t c_Change,wchar_t c_Mask);
- static bool isReservedMaskChar(wchar_t ch);
+ static FX_BOOL maskSatisfied(wchar_t c_Change,wchar_t c_Mask);
+ static FX_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 ffd7edb4d4..ac90e62b0d 100644
--- a/fpdfsdk/include/javascript/app.h
+++ b/fpdfsdk/include/javascript/app.h
@@ -110,41 +110,41 @@ public:
virtual ~app();
public:
- 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);
+ 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);
private:
// FX_DWORD AppGetTickCount();
diff --git a/fpdfsdk/include/javascript/color.h b/fpdfsdk/include/javascript/color.h
index ab7bbae088..df863b552f 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);
- 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 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 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);
+ 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);
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 424f0e246b..0cbc291b44 100644
--- a/fpdfsdk/include/javascript/console.h
+++ b/fpdfsdk/include/javascript/console.h
@@ -16,10 +16,10 @@ public:
virtual ~console(void);
public:
- 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);
+ 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);
};
class CJS_Console : public CJS_Object
diff --git a/fpdfsdk/include/javascript/event.h b/fpdfsdk/include/javascript/event.h
index e980a96e74..91a38ba487 100644
--- a/fpdfsdk/include/javascript/event.h
+++ b/fpdfsdk/include/javascript/event.h
@@ -16,26 +16,26 @@ public:
virtual ~event(void);
public:
- 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);
+ 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);
};
diff --git a/fpdfsdk/include/javascript/global.h b/fpdfsdk/include/javascript/global.h
index 4c6ccd97b0..83e07f67c3 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:
- bool setPersistent(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ FX_BOOL setPersistent(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
public:
- 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);
+ 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);
void Initial(CPDFDoc_Environment* pApp);
@@ -58,7 +58,7 @@ private:
void UpdateGlobalPersistentVariables();
void CommitGlobalPersisitentVariables();
void DestroyGlobalPersisitentVariables();
- bool SetGlobalVariables(const FX_CHAR* propname, int nType,
+ FX_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 bool InitInstance(IFXJS_Context* cc);
+ virtual FX_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 e54583385f..56f742ce08 100644
--- a/fpdfsdk/include/javascript/report.h
+++ b/fpdfsdk/include/javascript/report.h
@@ -16,8 +16,8 @@ public:
virtual ~Report();
public:
- 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);
+ 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);
};
class CJS_Report : public CJS_Object
diff --git a/fpdfsdk/include/javascript/util.h b/fpdfsdk/include/javascript/util.h
index a2d6749eec..ca4db349da 100644
--- a/fpdfsdk/include/javascript/util.h
+++ b/fpdfsdk/include/javascript/util.h
@@ -18,11 +18,11 @@ public:
virtual ~util(void);
public:
- 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);
+ 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);
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 322b9d4366..2bf2eea865 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 bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual bool OnLButtonUp(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);
protected:
- bool m_bMouseDown;
+ FX_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 42743657b7..6838bc49e7 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)
{
}
- bool bVisible;
+ FX_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(bool bVisible) {}
+ virtual void SetVisible(FX_BOOL bVisible) {}
virtual void TimerProc();
- void SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot);
+ void SetCaret(FX_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;
- bool m_bFlash;
+ FX_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 21d4e4a041..3f8604fb62 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 bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- bool OnKeyDownWithExit(FX_WORD nChar, bool & bExit, FX_DWORD nFlag);
- bool OnCharWithExit(FX_WORD nChar, bool & bExit, 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);
};
#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 bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual bool OnLButtonUp(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);
};
@@ -58,8 +58,8 @@ public:
virtual CFX_ByteString GetClassName() const;
virtual void OnCreate(PWL_CREATEPARAM & cp);
- virtual bool OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
+ virtual FX_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();
- bool IsModified() const;
+ FX_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();
- bool IsPopup() const;
+ FX_BOOL IsPopup() const;
void SetSelectText();
@@ -96,14 +96,14 @@ private:
void CreateButton(const PWL_CREATEPARAM & cp);
void CreateListBox(const PWL_CREATEPARAM & cp);
- void SetPopup(bool bPopup);
+ void SetPopup(FX_BOOL bPopup);
private:
CPWL_CBEdit* m_pEdit;
CPWL_CBButton* m_pButton;
CPWL_CBListBox* m_pList;
- bool m_bPopup;
+ FX_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 50e1ebee3c..97147a964d 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(bool bEditOrList, void* pPrivateData, int32_t nKeyCode,
+ virtual void OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode,
CFX_WideString & strChange, const CFX_WideString& strChangeEx,
int nSelStart, int nSelEnd,
- bool bKeyDown, bool & bRC, bool & bExit, FX_DWORD nFlag) = 0;
- virtual void OnAfterKeyStroke(bool bEditOrList, void* pPrivateData, bool & bExit, FX_DWORD nFlag) = 0;
+ 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;
};
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 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 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 OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
- virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
+ virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
virtual CPDF_Rect GetFocusRect() const;
public:
- 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 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 SetCharArray(int32_t nCharArray);
void SetLimitChar(int32_t nLimitChar);
- void SetHorzScale(int32_t nHorzScale, bool bPaint = true);
- void SetCharSpace(FX_FLOAT fCharSpace, bool bPaint = true);
+ void SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint = TRUE);
+ void SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint = TRUE);
- void SetLineLeading(FX_FLOAT fLineLeading, bool bPaint = true);
+ void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE);
- void EnableSpellCheck(bool bEnabled);
+ void EnableSpellCheck(FX_BOOL bEnabled);
- bool CanSelectAll() const;
- bool CanClear() const;
- bool CanCopy() const;
- bool CanCut() const;
- bool CanPaste() const;
+ FX_BOOL CanSelectAll() const;
+ FX_BOOL CanClear() const;
+ FX_BOOL CanCopy() const;
+ FX_BOOL CanCut() const;
+ FX_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;
- bool IsTextFull() const;
+ FX_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(bool bShow);
- bool IsVScrollBarVisible() const;
+ virtual void ShowVScrollBar(FX_BOOL bShow);
+ FX_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, bool bLatin, bool bArabic) const;
+ CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace & place, FX_BOOL bLatin, FX_BOOL bArabic) const;
void AjustArabicWords(const CPVT_WordRange& wr);
public:
- bool IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag);
+ FX_BOOL IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag);
private:
IPWL_Filler_Notify* m_pFillerNotify;
IPWL_SpellCheck* m_pSpellCheck;
- bool m_bFocus;
+ FX_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 e5123fd1b9..9b088b1162 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 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 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 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;
- bool IsModified() const;
+ FX_BOOL IsModified() const;
CFX_WideString GetText() const;
void SetSel(int32_t nStartChar,int32_t nEndChar);
@@ -105,7 +105,7 @@ public:
void Paint();
- void EnableRefresh(bool bRefresh);
+ void EnableRefresh(FX_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;
- bool CanUndo() const;
- bool CanRedo() const;
+ FX_BOOL CanUndo() const;
+ FX_BOOL CanRedo() const;
void Redo();
void Undo();
void SetReadyToInput();
protected:
- virtual void ShowVScrollBar(bool bShow);
+ virtual void ShowVScrollBar(FX_BOOL bShow);
virtual void InsertWord(FX_WORD word, int32_t nCharset);
virtual void InsertReturn();
virtual void InsertText(const FX_WCHAR* csText);
virtual void SetCursor();
- bool IsWndHorV();
+ FX_BOOL IsWndHorV();
void Delete();
void Backspace();
protected:
void GetCaretInfo(CPDF_Point & ptHead, CPDF_Point & ptFoot) const;
- void SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot);
+ void SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot);
- void SetEditCaret(bool bVisible);
+ void SetEditCaret(FX_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(bool bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place);
+ virtual void IOnSetCaret(FX_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;
- bool m_bMouseDown;
+ FX_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 e4bbbf2664..d32cc93078 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 bool IsStandardFont(const CFX_ByteString& sFontName);
+ static FX_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);
- bool KnowWord(int32_t nFontIndex, FX_WORD word);
+ FX_BOOL KnowWord(int32_t nFontIndex, FX_WORD word);
virtual CPDF_Document* GetDocument();
void Empty();
- int32_t GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, bool bFind);
+ int32_t GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, FX_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 b6331b6e09..44a5c0cbaf 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();
- bool IsProportionalScale();
+ FX_BOOL IsProportionalScale();
void GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom);
- bool GetFittingBounds();
+ FX_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 3c71e57b49..2f6b323773 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(bool bSelected);
- bool IsSelected() const;
+ void SetSelect(FX_BOOL bSelected);
+ FX_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;
- bool m_bSelected;
+ FX_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(bool bNotify);
+ void EnableNotify(FX_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 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);
+ 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);
private:
CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const;
- void SelectItem(int32_t nItemIndex, bool bSelect);
+ void SelectItem(int32_t nItemIndex, FX_BOOL bSelect);
int32_t FindItemIndex(const CPDF_Point& point);
- bool m_nSelectIndex;
+ FX_BOOL m_nSelectIndex;
IPWL_IconList_Notify* m_pNotify;
- bool m_bEnableNotify;
- bool m_bMouseDown;
+ FX_BOOL m_bEnableNotify;
+ FX_BOOL m_bMouseDown;
int32_t m_nListCount;
};
@@ -100,13 +100,13 @@ public:
CPWL_IconList(int32_t nListCount);
virtual ~CPWL_IconList();
- virtual bool OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag);
+ virtual FX_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(bool bNotify);
+ void EnableNotify(FX_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 43d60a2f09..97a4529af9 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(bool bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_WordPlace& place);
+ void IOnSetCaret(FX_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 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 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 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(bool bKeyDown, bool & bExit , FX_DWORD nFlag);
+ void OnNotifySelChanged(FX_BOOL bKeyDown, FX_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(bool bHoverSel);
+ void SetHoverSel(FX_BOOL bHoverSel);
int32_t GetCount() const;
- bool IsMultipleSel() const;
+ FX_BOOL IsMultipleSel() const;
int32_t GetCaretIndex() const;
int32_t GetCurSel() const;
- bool IsItemSelected(int32_t nItemIndex) const;
+ FX_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;
- bool m_bMouseDown;
- bool m_bHoverSel;
+ FX_BOOL m_bMouseDown;
+ FX_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 3beee19230..c107a0cf5e 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(bool bMove,int32_t nStart);
+ void ResetAll(FX_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 b1e61c4aa4..a60eba30dd 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(bool bShow) = 0;
- virtual void OnNoteActivate(bool bActive) = 0;
+ virtual void OnNoteShow(FX_BOOL bShow) = 0;
+ virtual void OnNoteActivate(FX_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 bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual bool OnLButtonUp(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);
private:
- bool m_bMouseDown;
+ FX_BOOL m_bMouseDown;
};
class CPWL_Note_LBBox : public CPWL_Wnd
@@ -140,7 +140,7 @@ public:
CPWL_Note_Edit();
virtual ~CPWL_Note_Edit();
- void EnableNotify(bool bEnable) {m_bEnableNotify = bEnable;}
+ void EnableNotify(FX_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:
- bool m_bEnableNotify;
+ FX_BOOL m_bEnableNotify;
FX_FLOAT m_fOldItemHeight;
- bool m_bSizeChanged;
+ FX_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 bool OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
+ virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- void SetEditFocus(bool bLast);
+ void SetEditFocus(FX_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(bool bEnabled);
- void EnableModify(bool bEnabled);
+ void EnableRead(FX_BOOL bEnabled);
+ void EnableModify(FX_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 bool IsTopItem() const { return false;}
+ virtual FX_BOOL IsTopItem() const { return FALSE;}
virtual CPWL_Edit* GetEdit() const;
public:
- virtual bool OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
- virtual bool OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
+ virtual FX_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(bool bEnabled);
- void EnableModify(bool bEnabled);
+ void EnableRead(FX_BOOL bEnabled);
+ void EnableModify(FX_BOOL bEnabled);
protected:
virtual void RePosChildWnd();
@@ -267,7 +267,7 @@ public:
CPWL_NoteItem* CreateNoteItem();
CPWL_NoteItem* GetParentNoteItem() const;
- void SetNoteFocus(bool bLast);
+ void SetNoteFocus(FX_BOOL bLast);
void OnContentsValidate();
void OnCreateNoteItem();
@@ -289,8 +289,8 @@ private:
CFX_WideString m_sAuthor;
FX_FLOAT m_fOldItemHeight;
- bool m_bSizeChanged;
- bool m_bAllowModify;
+ FX_BOOL m_bSizeChanged;
+ FX_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 bool IsTopItem() const {return true;}
+ virtual FX_BOOL IsTopItem() const {return TRUE;}
virtual const CPWL_Note* GetNote() const;
virtual IPWL_NoteNotify* GetNoteNotify() const;
public:
IPWL_NoteItem* Reply();
- void EnableNotify(bool bEnabled);
+ void EnableNotify(FX_BOOL bEnabled);
void SetIconType(int32_t nType);
void SetOptionsText(const CFX_WideString& sText);
- void EnableRead(bool bEnabled);
- void EnableModify(bool bEnabled);
+ void EnableRead(FX_BOOL bEnabled);
+ void EnableModify(FX_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 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);
+ 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);
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);
- bool ResetScrollBar();
+ FX_BOOL ResetScrollBar();
void RePosNoteChildren();
- bool ScrollBarShouldVisible();
+ FX_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;
- bool m_bResizing;
+ FX_BOOL m_bResizing;
PWL_SCROLL_INFO m_OldScrollInfo;
CPDF_Rect m_rcCaption;
- bool m_bEnalbleNotify;
+ FX_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 4735922039..0390222545 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 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 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);
protected:
PWL_SCROLLBAR_TYPE m_eScrollBarType;
PWL_SBBUTTON_TYPE m_eSBButtonType;
- bool m_bMouseDown;
+ FX_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);
- bool In(FX_FLOAT x) const;
+ FX_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);
- bool SetPos(FX_FLOAT pos);
+ FX_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 bool OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag);
- virtual bool OnLButtonUp(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 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(bool bForever) {m_bNotifyForever = bForever;}
+ void SetNotifyForever(FX_BOOL bForever) {m_bNotifyForever = bForever;}
protected:
void SetScrollRange(FX_FLOAT fMin,FX_FLOAT fMax,FX_FLOAT fClientWidth);
void SetScrollPos(FX_FLOAT fPos);
- void MovePosButton(bool bRefresh);
+ void MovePosButton(FX_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;
- bool m_bMouseDown;
- bool m_bMinOrMax;
- bool m_bNotifyForever;
+ FX_BOOL m_bMouseDown;
+ FX_BOOL m_bMinOrMax;
+ FX_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 c5557d6c6e..c94527772e 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(bool bTextExist);
- void SetImageFlag(bool bImageExist);
- void SetFoxitFlag(bool bFlagExist);
+ void SetTextFlag(FX_BOOL bTextExist);
+ void SetImageFlag(FX_BOOL bImageExist);
+ void SetFoxitFlag(FX_BOOL bFlagExist);
protected:
virtual void RePosChildWnd();
@@ -59,9 +59,9 @@ private:
CPWL_Label* m_pDescription;
CPWL_Signature_Image* m_pImage;
- bool m_bTextExist;
- bool m_bImageExist;
- bool m_bFlagExist;
+ FX_BOOL m_bTextExist;
+ FX_BOOL m_bImageExist;
+ FX_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 14e576d868..f6659dfb00 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 bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
- void SetCheck(bool bCheck);
- bool IsChecked() const;
+ void SetCheck(FX_BOOL bCheck);
+ FX_BOOL IsChecked() const;
private:
- bool m_bChecked;
+ FX_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 bool OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
- virtual bool OnChar(FX_WORD nChar, FX_DWORD nFlag);
+ virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag);
+ virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
- void SetCheck(bool bCheck);
- bool IsChecked() const;
+ void SetCheck(FX_BOOL bCheck);
+ FX_BOOL IsChecked() const;
private:
- bool m_bChecked;
+ FX_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 f1e34c9060..2da0f42180 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 bool IntersectRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2);
- static bool ContainsRect(const CPDF_Rect& rcParent, const CPDF_Rect& rcChild);
+ 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 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 bool IsBlackOrWhite(const CPWL_Color& color);
+ static FX_BOOL IsBlackOrWhite(const CPWL_Color& color);
static CPWL_Color GetReverseColor(const CPWL_Color& color);
- static CFX_ByteString GetColorAppStream(const CPWL_Color & color,const bool & bFillOrStroke = true);
+ static CFX_ByteString GetColorAppStream(const CPWL_Color & color,const FX_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,
- bool bContinuous = true, FX_WORD SubWord = 0);
+ FX_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, bool bMultiLine, bool bAutoReturn, const CPWL_Color & crText);
+ FX_FLOAT fFontSize, FX_BOOL bMultiLine, FX_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,
- bool bVertical, bool bHorizontal, CPDF_Rect rect,
+ FX_BOOL bVertical, FX_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 3b1d299dfb..c5b6ca4be1 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 bool operator == (const CPWL_Color &c1, const CPWL_Color &c2)
+inline FX_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 bool operator == (const CPWL_Color &c1, const CPWL_Color &c2)
c1.fColor4 - c2.fColor4 < 0.0001 && c1.fColor4 - c2.fColor4 > -0.0001;
}
-inline bool operator != (const CPWL_Color &c1, const CPWL_Color &c2)
+inline FX_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 bool CheckWord(const FX_CHAR* sWord) = 0;
+ virtual FX_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,bool bReset,bool bRefresh);
+ void Move(const CPDF_Rect & rcNew,FX_BOOL bReset,FX_BOOL bRefresh);
virtual void InvalidateRect(CPDF_Rect* pRect = NULL);
void GetAppearanceStream(CFX_ByteString & sAppStream);
void DrawAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device);
- 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 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 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(bool bVisible);
+ virtual void SetVisible(FX_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 bool IsModified() const {return false;}
+ virtual FX_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;
- bool IsVisible() const {return m_bVisible;}
- bool HasFlag(FX_DWORD dwFlags) const;
+ FX_BOOL IsVisible() const {return m_bVisible;}
+ FX_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;
- bool WndHitTest(const CPDF_Point & point) const;
- bool ClientHitTest(const CPDF_Point & point) const;
- bool IsCaptureMouse() const;
+ FX_BOOL WndHitTest(const CPDF_Point & point) const;
+ FX_BOOL ClientHitTest(const CPDF_Point & point) const;
+ FX_BOOL IsCaptureMouse() const;
const CPWL_Wnd* GetFocused() const;
- bool IsFocused() const;
- bool IsReadOnly() const;
+ FX_BOOL IsFocused() const;
+ FX_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(bool bEnable);
- bool IsEnabled();
+ void EnableWindow(FX_BOOL bEnable);
+ FX_BOOL IsEnabled();
virtual void SetCursor();
protected:
@@ -422,11 +422,11 @@ protected:
virtual void OnEnabled();
virtual void OnDisabled();
- void SetNotifyFlag(bool bNotifying = true){m_bNotifying = bNotifying;};
+ void SetNotifyFlag(FX_BOOL bNotifying = TRUE){m_bNotifying = bNotifying;};
- bool IsValid() const;
+ FX_BOOL IsValid() const;
PWL_CREATEPARAM GetCreationParam() const;
- bool IsNotifying() const {return m_bNotifying;}
+ FX_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;
- bool IsWndCaptureMouse(const CPWL_Wnd * pWnd) const;
- bool IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const;
+ FX_BOOL IsWndCaptureMouse(const CPWL_Wnd * pWnd) const;
+ FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const;
const CPWL_Wnd* GetRootWnd() 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;
+ 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;
private:
void AddChild(CPWL_Wnd * pWnd);
@@ -467,10 +467,10 @@ private:
CPDF_Rect m_rcWindow;
CPDF_Rect m_rcClip;
- bool m_bCreated;
- bool m_bVisible;
- bool m_bNotifying;
- bool m_bEnabled;
+ FX_BOOL m_bCreated;
+ FX_BOOL m_bVisible;
+ FX_BOOL m_bNotifying;
+ FX_BOOL m_bEnabled;
};
#endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index 6570b3ee15..699a7e4ffe 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -230,7 +230,7 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString &sAlias)
CPDF_Dictionary* pAcroFormDict = NULL;
- bool bWidget = (m_pAnnotDict->GetString("Subtype") == "Widget");
+ FX_BOOL bWidget = (m_pAnnotDict->GetString("Subtype") == "Widget");
if (bWidget)
{
diff --git a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
index 72ff575c11..55d2d45bc2 100644
--- a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
@@ -31,18 +31,18 @@ CPWL_Wnd* CFFL_CheckBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVie
return pWnd;
}
-bool CFFL_CheckBox::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
+FX_BOOL CFFL_CheckBox::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
{
switch (nKeyCode)
{
case FWL_VKEY_Return:
case FWL_VKEY_Space:
- return true;
+ return TRUE;
default:
return CFFL_FormFiller::OnKeyDown(pAnnot, nKeyCode, nFlags);
}
}
-bool CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+FX_BOOL CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
switch (nChar)
{
@@ -55,57 +55,57 @@ bool CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
CPDFSDK_PageView* pPageView = pAnnot->GetPageView();
ASSERT(pPageView != NULL);
- bool bReset = false;
- bool bExit = false;
+ FX_BOOL bReset = FALSE;
+ FX_BOOL bExit = FALSE;
pIFormFiller->OnButtonUp(m_pWidget, pPageView, bReset, bExit,nFlags);
- if (bReset) return true;
- if (bExit) return true;
+ if (bReset) return TRUE;
+ if (bExit) return TRUE;
CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
- if (CPWL_CheckBox * pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, true))
+ if (CPWL_CheckBox * pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, TRUE))
pWnd->SetCheck(!pWnd->IsChecked());
CommitData(pPageView,nFlags);
- return true;
+ return TRUE;
}
default:
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
}
-bool CFFL_CheckBox::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_CheckBox::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
CFFL_Button::OnLButtonUp(pPageView, pAnnot, nFlags, point);
if (IsValid())
{
- if (CPWL_CheckBox * pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, true))
+ if (CPWL_CheckBox * pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, TRUE))
{
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
pWnd->SetCheck(!pWidget->IsChecked());
// pWnd->SetCheck(!pWnd->IsChecked());
}
- if (!CommitData(pPageView, nFlags)) return false;
+ if (!CommitData(pPageView, nFlags)) return FALSE;
}
- return true;
+ return TRUE;
}
-bool CFFL_CheckBox::IsDataChanged(CPDFSDK_PageView* pPageView)
+FX_BOOL CFFL_CheckBox::IsDataChanged(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, false))
+ if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE))
{
return pWnd->IsChecked() != m_pWidget->IsChecked();
}
- return false;
+ return FALSE;
}
void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView)
@@ -113,10 +113,10 @@ void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView)
ASSERT(m_pWidget != NULL);
- if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, false))
+ if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE))
{
- bool bNewChecked = pWnd->IsChecked();
+ FX_BOOL bNewChecked = pWnd->IsChecked();
if (bNewChecked)
@@ -136,7 +136,7 @@ void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView)
}
}
- m_pWidget->SetCheck(bNewChecked, false);
+ m_pWidget->SetCheck(bNewChecked, FALSE);
m_pWidget->UpdateField();
SetChangeMark();
}
diff --git a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
index d6d4d3da4e..841b45ecba 100644
--- a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
@@ -78,16 +78,16 @@ CPWL_Wnd* CFFL_ComboBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVie
}
-bool CFFL_ComboBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+FX_BOOL CFFL_ComboBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
-bool CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView)
+FX_BOOL CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView)
{
- CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, false);
+ CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE);
if (!pWnd)
- return false;
+ return FALSE;
int32_t nCurSel = pWnd->GetSelect();
if (!(m_pWidget->GetFieldFlags() & FIELDFLAG_EDIT))
@@ -103,28 +103,28 @@ void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, false))
+ if (CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
CFX_WideString swText = pWnd->GetText();
int32_t nCurSel = pWnd->GetSelect();
//mantis:0004157
- bool bSetValue = true;
+ FX_BOOL bSetValue = TRUE;
if (m_pWidget->GetFieldFlags() & FIELDFLAG_EDIT)
{
if (nCurSel >= 0)
{
if (swText != m_pWidget->GetOptionLabel(nCurSel))
- bSetValue = true;
+ bSetValue = TRUE;
else
- bSetValue = false;
+ bSetValue = FALSE;
}
else
- bSetValue = true;
+ bSetValue = TRUE;
}
else
- bSetValue = false;
+ bSetValue = FALSE;
CFX_WideString sOldValue;
@@ -132,15 +132,15 @@ void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView)
if (bSetValue)
{
sOldValue = m_pWidget->GetValue();
- m_pWidget->SetValue(swText, false);
+ m_pWidget->SetValue(swText, FALSE);
}
else
{
m_pWidget->GetSelectedIndex(0);
- m_pWidget->SetOptionSelection(nCurSel, true, false);
+ m_pWidget->SetOptionSelection(nCurSel, TRUE, FALSE);
}
- m_pWidget->ResetFieldAppearance(true);
+ m_pWidget->ResetFieldAppearance(TRUE);
m_pWidget->UpdateField();
SetChangeMark();
@@ -155,7 +155,7 @@ void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView)
switch (type)
{
case CPDF_AAction::KeyStroke:
- if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, false))
+ if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
if (CPWL_Edit* pEdit = (CPWL_Edit*)*pComboBox)
{
@@ -177,7 +177,7 @@ void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView)
}
break;
case CPDF_AAction::Validate:
- if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, false))
+ if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
if (CPWL_Edit* pEdit = (CPWL_Edit*)*pComboBox)
{
@@ -203,7 +203,7 @@ void CFFL_ComboBox::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAc
switch (type)
{
case CPDF_AAction::KeyStroke:
- if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, false))
+ if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
if (CPWL_Edit* pEdit = (CPWL_Edit*)*pComboBox)
{
@@ -217,7 +217,7 @@ void CFFL_ComboBox::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAc
}
}
-bool CFFL_ComboBox::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
+FX_BOOL CFFL_ComboBox::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
const PDFSDK_FieldAction& faNew)
{
switch (type)
@@ -229,14 +229,14 @@ bool CFFL_ComboBox::IsActionDataChanged(CPDF_AAction::AActionType type, const PD
break;
}
- return false;
+ return FALSE;
}
void CFFL_ComboBox::SaveState(CPDFSDK_PageView* pPageView)
{
ASSERT(pPageView != NULL);
- if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, false))
+ if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
m_State.nIndex = pComboBox->GetSelect();
@@ -252,7 +252,7 @@ void CFFL_ComboBox::RestoreState(CPDFSDK_PageView* pPageView)
{
ASSERT(pPageView != NULL);
- if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, true))
+ if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, TRUE))
{
if (m_State.nIndex >= 0)
pComboBox->SetSelect(m_State.nIndex);
@@ -267,7 +267,7 @@ void CFFL_ComboBox::RestoreState(CPDFSDK_PageView* pPageView)
}
}
-CPWL_Wnd* CFFL_ComboBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestoreValue)
+CPWL_Wnd* CFFL_ComboBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue)
{
if (bRestoreValue)
SaveState(pPageView);
@@ -279,17 +279,17 @@ CPWL_Wnd* CFFL_ComboBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bResto
if (bRestoreValue)
{
RestoreState(pPageView);
- pRet = GetPDFWindow(pPageView, false);
+ pRet = GetPDFWindow(pPageView, FALSE);
}
else
- pRet = GetPDFWindow(pPageView, true);
+ pRet = GetPDFWindow(pPageView, TRUE);
m_pWidget->UpdateField();
return pRet;
}
-void CFFL_ComboBox::OnKeyStroke(bool bKeyDown, FX_UINT nFlag)
+void CFFL_ComboBox::OnKeyStroke(FX_BOOL bKeyDown, FX_UINT nFlag)
{
ASSERT(m_pWidget != NULL);
@@ -305,7 +305,7 @@ void CFFL_ComboBox::OnKeyStroke(bool bKeyDown, FX_UINT nFlag)
if (CommitData(pPageView, nFlag))
{
DestroyPDFWindow(pPageView);
- m_bValid = false;
+ m_bValid = FALSE;
}
}
}
@@ -328,7 +328,7 @@ void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd)
int nCharacters = wsText.GetLength();
CFX_ByteString bsUTFText = wsText.UTF16LE_Encode();
unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str();
- m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, nCharacters, true);
+ m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, nCharacters, TRUE);
pEdit->SetEditNotify(this);
}
@@ -339,25 +339,25 @@ void CFFL_ComboBox::OnKillFocus(CPWL_Wnd* pWnd)
ASSERT(m_pApp != NULL);
}
-bool CFFL_ComboBox::CanCopy(CPDFSDK_Document* pDocument)
+FX_BOOL CFFL_ComboBox::CanCopy(CPDFSDK_Document* pDocument)
{
ASSERT(pDocument != NULL);
- return false;
+ return FALSE;
}
-bool CFFL_ComboBox::CanCut(CPDFSDK_Document* pDocument)
+FX_BOOL CFFL_ComboBox::CanCut(CPDFSDK_Document* pDocument)
{
ASSERT(pDocument != NULL);
- return false;
+ return FALSE;
}
-bool CFFL_ComboBox::CanPaste(CPDFSDK_Document* pDocument)
+FX_BOOL CFFL_ComboBox::CanPaste(CPDFSDK_Document* pDocument)
{
ASSERT(pDocument != NULL);
- return false;
+ return FALSE;
}
void CFFL_ComboBox::OnAddUndo(CPWL_Edit* pEdit)
@@ -371,7 +371,7 @@ CFX_WideString CFFL_ComboBox::GetSelectExportText()
int nExport = -1;
CPDFSDK_PageView *pPageView = GetCurPageView();
- if (CPWL_ComboBox * pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, false))
+ if (CPWL_ComboBox * pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
nExport = pComboBox->GetSelect();
}
diff --git a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
index 34aa17cf06..1811cb0424 100644
--- a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
@@ -20,7 +20,7 @@
CFFL_FormFiller::CFFL_FormFiller(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot)
: m_pApp(pApp),
m_pAnnot(pAnnot),
- m_bValid(false),
+ m_bValid(FALSE),
m_ptOldPos(0,0)
{
m_pWidget = (CPDFSDK_Widget*) pAnnot;
@@ -40,15 +40,15 @@ CFFL_FormFiller::~CFFL_FormFiller()
void CFFL_FormFiller::SetWindowRect(CPDFSDK_PageView* pPageView, const CPDF_Rect& rcWindow)
{
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
{
- pWnd->Move(CPDF_Rect(rcWindow), true, false);
+ pWnd->Move(CPDF_Rect(rcWindow), TRUE, FALSE);
}
}
CPDF_Rect CFFL_FormFiller::GetWindowRect(CPDFSDK_PageView* pPageView)
{
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
{
return pWnd->GetWindowRect();
}
@@ -63,7 +63,7 @@ FX_RECT CFFL_FormFiller::GetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot*
CPDF_Rect rcAnnot = m_pWidget->GetRect();
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
{
CPDF_Rect rcWindow = pWnd->GetWindowRect();
rcAnnot = PWLtoFFL(rcWindow);
@@ -86,7 +86,7 @@ void CFFL_FormFiller::OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot,
{
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
{
CPDF_Matrix mt = GetCurMatrix();
mt.Concat(*pUser2Device);
@@ -131,153 +131,153 @@ void CFFL_FormFiller::OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pA
ASSERT(m_pWidget != NULL);
}
-bool CFFL_FormFiller::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_FormFiller::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, true))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, TRUE))
{
- m_bValid = true;
+ m_bValid = TRUE;
FX_RECT rect = GetViewBBox(pPageView,pAnnot);
InvalidateRect(rect.left, rect.top, rect.right, rect.bottom);
if(!rect.Contains((int)point.x, (int)point.y))
- return false;
+ return FALSE;
return pWnd->OnLButtonDown(WndtoPWL(pPageView, point),nFlags);
}
- return false;
+ return FALSE;
}
-bool CFFL_FormFiller::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_FormFiller::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
{
FX_RECT rcFFL = GetViewBBox(pPageView, pAnnot);
InvalidateRect(rcFFL.left, rcFFL.top, rcFFL.right, rcFFL.bottom);
pWnd->OnLButtonUp(WndtoPWL(pPageView, point),nFlags);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CFFL_FormFiller::OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_FormFiller::OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
{
pWnd->OnLButtonDblClk(WndtoPWL(pPageView, point),nFlags);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CFFL_FormFiller::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_FormFiller::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
if ((m_ptOldPos.x != point.x) || (m_ptOldPos.y != point.y))
{
m_ptOldPos = point;
}
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
{
pWnd->OnMouseMove(WndtoPWL(pPageView, point),nFlags);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CFFL_FormFiller::OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, short zDelta, const CPDF_Point& point)
+FX_BOOL CFFL_FormFiller::OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, short zDelta, const CPDF_Point& point)
{
- if (!IsValid()) return false;
+ if (!IsValid()) return FALSE;
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, true))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, TRUE))
{
return pWnd->OnMouseWheel(zDelta, WndtoPWL(pPageView, point),nFlags);
}
- return false;
+ return FALSE;
}
-bool CFFL_FormFiller::OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_FormFiller::OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, true))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, TRUE))
{
pWnd->OnRButtonDown(WndtoPWL(pPageView, point),nFlags);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CFFL_FormFiller::OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_FormFiller::OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
{
pWnd->OnRButtonUp(WndtoPWL(pPageView, point),nFlags);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CFFL_FormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
+FX_BOOL CFFL_FormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
{
if (IsValid())
{
CPDFSDK_PageView* pPageView = GetCurPageView();
ASSERT(pPageView != NULL);
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
{
return pWnd->OnKeyDown(nKeyCode,nFlags);
}
}
- return false;
+ return FALSE;
}
-bool CFFL_FormFiller::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+FX_BOOL CFFL_FormFiller::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
if (IsValid())
{
CPDFSDK_PageView* pPageView = GetCurPageView();
ASSERT(pPageView != NULL);
- if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, false))
+ if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
{
return pWnd->OnChar(nChar,nFlags);
}
}
- return false;
+ return FALSE;
}
-bool CFFL_FormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag)
+FX_BOOL CFFL_FormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag)
{
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
CPDF_Page* pPage = pWidget->GetPDFPage();
CPDFSDK_Document* pDoc = m_pApp->GetSDKDocument();
CPDFSDK_PageView* pPageView = pDoc->GetPageView(pPage);
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, true))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE))
pWnd->SetFocus();
- m_bValid = true;
+ m_bValid = TRUE;
FX_RECT rcRect = GetViewBBox(pPageView,pAnnot);
InvalidateRect(rcRect.left, rcRect.top, rcRect.right, rcRect.bottom);
- return true;
+ return TRUE;
}
-bool CFFL_FormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag)
+FX_BOOL CFFL_FormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag)
{
if (!IsValid())
- return true;
+ return TRUE;
CPDFSDK_PageView* pPageView = GetCurPageView();
CommitData(pPageView, nFlag);
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
pWnd->KillFocus();
switch (m_pWidget->GetFieldType())
@@ -285,16 +285,16 @@ bool CFFL_FormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag)
case FIELDTYPE_PUSHBUTTON:
case FIELDTYPE_CHECKBOX:
case FIELDTYPE_RADIOBUTTON:
- EscapeFiller(pPageView, true);
+ EscapeFiller(pPageView, TRUE);
break;
default:
- EscapeFiller(pPageView, false);
+ EscapeFiller(pPageView, FALSE);
break;
}
- return true;
+ return TRUE;
}
-bool CFFL_FormFiller::IsValid() const
+FX_BOOL CFFL_FormFiller::IsValid() const
{
return m_bValid;
}
@@ -370,7 +370,7 @@ PWL_CREATEPARAM CFFL_FormFiller::GetCreateParam()
return cp;
}
-CPWL_Wnd* CFFL_FormFiller::GetPDFWindow(CPDFSDK_PageView* pPageView, bool bNew)
+CPWL_Wnd* CFFL_FormFiller::GetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bNew)
{
ASSERT(pPageView);
@@ -499,7 +499,7 @@ CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView()
CPDF_Rect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView)
{
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
{
CPDF_Rect rcFocus = FFLtoWnd(pPageView, PWLtoFFL(pWnd->GetFocusRect()));
CPDF_Rect rcPage = pPageView->GetPDFPage()->GetPageBBox();
@@ -561,44 +561,44 @@ CPDF_Rect CFFL_FormFiller::FFLtoWnd(CPDFSDK_PageView* pPageView, const CPDF_Rect
return rect;
}
-bool CFFL_FormFiller::CommitData(CPDFSDK_PageView* pPageView, FX_UINT nFlag)
+FX_BOOL CFFL_FormFiller::CommitData(CPDFSDK_PageView* pPageView, FX_UINT nFlag)
{
if (IsDataChanged(pPageView))
{
- bool bRC = true;
- bool bExit = false;
+ FX_BOOL bRC = TRUE;
+ FX_BOOL bExit = FALSE;
CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller();
pIFormFiller->OnKeyStrokeCommit(m_pWidget, pPageView, bRC, bExit, nFlag);
if (bExit)
- return true;
+ return TRUE;
if (!bRC)
{
- ResetPDFWindow(pPageView, false);
- return true;
+ ResetPDFWindow(pPageView, FALSE);
+ return TRUE;
}
pIFormFiller->OnValidate(m_pWidget, pPageView, bRC, bExit, nFlag);
if (bExit)
- return true;
+ return TRUE;
if (!bRC)
{
- ResetPDFWindow(pPageView, false);
- return true;
+ ResetPDFWindow(pPageView, FALSE);
+ return TRUE;
}
SaveData(pPageView);
pIFormFiller->OnCalculate(m_pWidget, pPageView, bExit,nFlag);
if (bExit)
- return true;
+ return TRUE;
pIFormFiller->OnFormat(m_pWidget, pPageView, bExit,nFlag);
}
- return true;
+ return TRUE;
}
-bool CFFL_FormFiller::IsDataChanged(CPDFSDK_PageView* pPageView)
+FX_BOOL CFFL_FormFiller::IsDataChanged(CPDFSDK_PageView* pPageView)
{
- return false;
+ return FALSE;
}
void CFFL_FormFiller::SaveData(CPDFSDK_PageView* pPageView)
@@ -621,10 +621,10 @@ void CFFL_FormFiller::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::A
{
}
-bool CFFL_FormFiller::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
+FX_BOOL CFFL_FormFiller::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
const PDFSDK_FieldAction& faNew)
{
- return false;
+ return FALSE;
}
void CFFL_FormFiller::SaveState(CPDFSDK_PageView* pPageView)
@@ -635,9 +635,9 @@ void CFFL_FormFiller::RestoreState(CPDFSDK_PageView* pPageView)
{
}
-CPWL_Wnd* CFFL_FormFiller::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestoreValue)
+CPWL_Wnd* CFFL_FormFiller::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue)
{
- return GetPDFWindow(pPageView, false);
+ return GetPDFWindow(pPageView, FALSE);
}
void CFFL_FormFiller::TimerProc()
@@ -650,13 +650,13 @@ IFX_SystemHandler* CFFL_FormFiller::GetSystemHandler() const
return m_pApp->GetSysHandler();
}
-void CFFL_FormFiller::OnKeyStroke(bool bKeyDown)
+void CFFL_FormFiller::OnKeyStroke(FX_BOOL bKeyDown)
{
}
-void CFFL_FormFiller::EscapeFiller(CPDFSDK_PageView* pPageView, bool bDestroyPDFWindow)
+void CFFL_FormFiller::EscapeFiller(CPDFSDK_PageView* pPageView, FX_BOOL bDestroyPDFWindow)
{
- m_bValid = false;
+ m_bValid = FALSE;
FX_RECT rcRect = GetViewBBox(pPageView, m_pWidget);
InvalidateRect(rcRect.left, rcRect.top, rcRect.right, rcRect.bottom);
@@ -665,19 +665,19 @@ void CFFL_FormFiller::EscapeFiller(CPDFSDK_PageView* pPageView, bool bDestroyPDF
DestroyPDFWindow(pPageView);
}
-bool CFFL_FormFiller::CanCopy(CPDFSDK_Document* pDocument)
+FX_BOOL CFFL_FormFiller::CanCopy(CPDFSDK_Document* pDocument)
{
- return false;
+ return FALSE;
}
-bool CFFL_FormFiller::CanCut(CPDFSDK_Document* pDocument)
+FX_BOOL CFFL_FormFiller::CanCut(CPDFSDK_Document* pDocument)
{
- return false;
+ return FALSE;
}
-bool CFFL_FormFiller::CanPaste(CPDFSDK_Document* pDocument)
+FX_BOOL CFFL_FormFiller::CanPaste(CPDFSDK_Document* pDocument)
{
- return false;
+ return FALSE;
}
void CFFL_FormFiller::DoCopy(CPDFSDK_Document* pDocument)
@@ -702,8 +702,8 @@ void CFFL_FormFiller::InvalidateRect(double left, double top, double right, doub
CFFL_Button::CFFL_Button(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget) :
CFFL_FormFiller(pApp, pWidget),
- m_bMouseIn(false),
- m_bMouseDown(false)
+ m_bMouseIn(FALSE),
+ m_bMouseDown(FALSE)
{
}
@@ -713,14 +713,14 @@ CFFL_Button::~CFFL_Button()
void CFFL_Button::OnMouseEnter(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot)
{
- m_bMouseIn = true;
+ m_bMouseIn = TRUE;
FX_RECT rect = GetViewBBox(pPageView,pAnnot);
InvalidateRect(rect.left, rect.top, rect.right, rect.bottom);
}
void CFFL_Button::OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot)
{
- m_bMouseIn = false;
+ m_bMouseIn = FALSE;
FX_RECT rect = GetViewBBox(pPageView,pAnnot);
InvalidateRect(rect.left, rect.top, rect.right, rect.bottom);
@@ -728,39 +728,39 @@ void CFFL_Button::OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot
ASSERT(m_pWidget != NULL);
}
-bool CFFL_Button::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_Button::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
CPDF_Rect rcAnnot = pAnnot->GetRect();
if(!rcAnnot.Contains(point.x, point.y))
- return false;
+ return FALSE;
- m_bMouseDown = true;
- m_bValid = true;
+ m_bMouseDown = TRUE;
+ m_bValid = TRUE;
FX_RECT rect = GetViewBBox(pPageView, pAnnot);
InvalidateRect(rect.left, rect.top, rect.right, rect.bottom);
- return true;
+ return TRUE;
}
-bool CFFL_Button::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_Button::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
CPDF_Rect rcAnnot = pAnnot->GetRect();
if(!rcAnnot.Contains(point.x, point.y))
- return false;
+ return FALSE;
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
m_pWidget->GetPDFPage();
FX_RECT rect = GetViewBBox(pPageView, pAnnot);
InvalidateRect(rect.left, rect.top, rect.right, rect.bottom);
- return true;
+ return TRUE;
}
-bool CFFL_Button::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_Button::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(m_pApp != NULL);
- return true;
+ return TRUE;
}
void CFFL_Button::OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot,
diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
index 922d8c037e..7ce811e85b 100644
--- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
@@ -22,7 +22,7 @@
CFFL_IFormFiller::CFFL_IFormFiller(CPDFDoc_Environment* pApp) :
m_pApp(pApp),
- m_bNotifying(false)
+ m_bNotifying(FALSE)
{
}
@@ -33,17 +33,17 @@ CFFL_IFormFiller::~CFFL_IFormFiller()
m_Maps.clear();
}
-bool CFFL_IFormFiller::Annot_HitTest(CPDFSDK_PageView* pPageView,CPDFSDK_Annot* pAnnot, CPDF_Point point)
+FX_BOOL CFFL_IFormFiller::Annot_HitTest(CPDFSDK_PageView* pPageView,CPDFSDK_Annot* pAnnot, CPDF_Point point)
{
CPDF_Rect rc = pAnnot->GetRect();
if(rc.Contains(point.x, point.y))
- return true;
- return false;
+ return TRUE;
+ return FALSE;
}
FX_RECT CFFL_IFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot)
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
return pFormFiller->GetViewBBox(pPageView, pAnnot);
ASSERT(pPageView != NULL);
@@ -65,7 +65,7 @@ void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView, /*HDC hDC,*/ CPDFSDK_
if (IsVisible(pWidget))
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
if (pFormFiller->IsValid())
{
@@ -98,7 +98,7 @@ void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView, /*HDC hDC,*/ CPDFSDK_
}
}
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
pFormFiller->OnDrawDeactive(pPageView, pAnnot, pDevice, pUser2Device, dwFlags);
else
pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
@@ -110,7 +110,7 @@ void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView, /*HDC hDC,*/ CPDFSDK_
void CFFL_IFormFiller::OnCreate(CPDFSDK_Annot* pAnnot)
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
pFormFiller->OnCreate(pAnnot);
}
@@ -118,7 +118,7 @@ void CFFL_IFormFiller::OnCreate(CPDFSDK_Annot* pAnnot)
void CFFL_IFormFiller::OnLoad(CPDFSDK_Annot* pAnnot)
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
pFormFiller->OnLoad(pAnnot);
}
@@ -126,7 +126,7 @@ void CFFL_IFormFiller::OnLoad(CPDFSDK_Annot* pAnnot)
void CFFL_IFormFiller::OnDelete(CPDFSDK_Annot* pAnnot)
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
pFormFiller->OnDelete(pAnnot);
}
@@ -144,7 +144,7 @@ void CFFL_IFormFiller::OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot*
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (pWidget->GetAAction(CPDF_AAction::CursorEnter))
{
- m_bNotifying = true;
+ m_bNotifying = TRUE;
int nValueAge = pWidget->GetValueAge();
@@ -158,13 +158,13 @@ void CFFL_IFormFiller::OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot*
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::CursorEnter, fa, pPageView );
- m_bNotifying = false;
+ m_bNotifying = FALSE;
//if ( !IsValidAnnot(pPageView, pAnnot) ) return;
if (pWidget->IsAppModified())
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE))
{
pFormFiller->ResetPDFWindow(pPageView, pWidget->GetValueAge() == nValueAge);
}
@@ -172,7 +172,7 @@ void CFFL_IFormFiller::OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot*
}
}
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, true))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE))
{
pFormFiller->OnMouseEnter(pPageView, pAnnot);
}
@@ -188,7 +188,7 @@ void CFFL_IFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* p
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (pWidget->GetAAction(CPDF_AAction::CursorExit))
{
- m_bNotifying = true;
+ m_bNotifying = TRUE;
pWidget->GetAppearanceAge();
int nValueAge = pWidget->GetValueAge();
pWidget->ClearAppModified();
@@ -202,13 +202,13 @@ void CFFL_IFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* p
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::CursorExit, fa, pPageView);
- m_bNotifying = false;
+ m_bNotifying = FALSE;
//if (!IsValidAnnot(pPageView, pAnnot)) return;
if (pWidget->IsAppModified())
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE))
{
pFormFiller->ResetPDFWindow(pPageView, nValueAge == pWidget->GetValueAge());
}
@@ -216,13 +216,13 @@ void CFFL_IFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* p
}
}
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
pFormFiller->OnMouseExit(pPageView, pAnnot);
}
}
-bool CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
@@ -232,7 +232,7 @@ bool CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot*
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (Annot_HitTest(pPageView, pAnnot, point) && pWidget->GetAAction(CPDF_AAction::ButtonDown))
{
- m_bNotifying = true;
+ m_bNotifying = TRUE;
pWidget->GetAppearanceAge();
int nValueAge = pWidget->GetValueAge();
pWidget->ClearAppModified();
@@ -245,13 +245,13 @@ bool CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot*
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlags);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlags);
pWidget->OnAAction(CPDF_AAction::ButtonDown, fa, pPageView);
- m_bNotifying = false;
+ m_bNotifying = FALSE;
- if (!IsValidAnnot(pPageView, pAnnot)) return true;
+ if (!IsValidAnnot(pPageView, pAnnot)) return TRUE;
if (pWidget->IsAppModified())
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE))
{
pFormFiller->ResetPDFWindow(pPageView, nValueAge == pWidget->GetValueAge());
}
@@ -259,15 +259,15 @@ bool CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot*
}
}
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
return pFormFiller->OnLButtonDown(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CFFL_IFormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_IFormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
@@ -286,24 +286,24 @@ bool CFFL_IFormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* p
break;
}
- bool bRet = false;
+ FX_BOOL bRet = FALSE;
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
bRet = pFormFiller->OnLButtonUp(pPageView, pAnnot, nFlags, point);
}
if (pDocument->GetFocusAnnot() == pAnnot)
{
- bool bExit = false;
- bool bReset = false;
+ FX_BOOL bExit = FALSE;
+ FX_BOOL bReset = FALSE;
OnButtonUp(pWidget, pPageView, bReset, bExit,nFlags);
- if (bExit) return true;
+ if (bExit) return TRUE;
}
return bRet;
}
-void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bReset, bool& bExit,FX_UINT nFlag)
+void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bReset, FX_BOOL& bExit,FX_UINT nFlag)
{
ASSERT(pWidget != NULL);
@@ -311,7 +311,7 @@ void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPa
{
if (pWidget->GetAAction(CPDF_AAction::ButtonUp))
{
- m_bNotifying = true;
+ m_bNotifying = TRUE;
int nAge = pWidget->GetAppearanceAge();
int nValueAge = pWidget->GetValueAge();
@@ -326,122 +326,122 @@ void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPa
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::ButtonUp, fa, pPageView);
- m_bNotifying = false;
+ m_bNotifying = FALSE;
if (!IsValidAnnot(pPageView, pWidget))
{
- bExit = true;
+ bExit = TRUE;
return;
}
if (nAge != pWidget->GetAppearanceAge())
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE))
{
pFormFiller->ResetPDFWindow(pPageView, nValueAge == pWidget->GetValueAge());
}
- bReset = true;
+ bReset = TRUE;
}
}
}
}
-bool CFFL_IFormFiller::OnLButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_IFormFiller::OnLButtonDblClk(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
return pFormFiller->OnLButtonDblClk(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CFFL_IFormFiller::OnMouseMove(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_IFormFiller::OnMouseMove(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
//change cursor
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, true))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE))
{
return pFormFiller->OnMouseMove(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CFFL_IFormFiller::OnMouseWheel(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, short zDelta, const CPDF_Point& point)
+FX_BOOL CFFL_IFormFiller::OnMouseWheel(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, short zDelta, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
return pFormFiller->OnMouseWheel(pPageView, pAnnot, nFlags, zDelta, point);
}
- return false;
+ return FALSE;
}
-bool CFFL_IFormFiller::OnRButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_IFormFiller::OnRButtonDown(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
return pFormFiller->OnRButtonDown(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CFFL_IFormFiller::OnRButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_IFormFiller::OnRButtonUp(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
return pFormFiller->OnRButtonUp(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CFFL_IFormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
+FX_BOOL CFFL_IFormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
{
ASSERT(pAnnot != NULL);
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
return pFormFiller->OnKeyDown(pAnnot, nKeyCode, nFlags);
}
- return false;
+ return FALSE;
}
-bool CFFL_IFormFiller::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+FX_BOOL CFFL_IFormFiller::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
if (nChar == FWL_VKEY_Tab)
- return true;
+ return TRUE;
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
return pFormFiller->OnChar(pAnnot, nChar, nFlags);
- return false;
+ return FALSE;
}
-bool CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
+FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
{
if (!pAnnot)
- return false;
+ return FALSE;
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
@@ -450,7 +450,7 @@ bool CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (pWidget->GetAAction(CPDF_AAction::GetFocus))
{
- m_bNotifying = true;
+ m_bNotifying = TRUE;
pWidget->GetAppearanceAge();
int nValueAge = pWidget->GetValueAge();
@@ -463,15 +463,15 @@ bool CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, true);
- if(!pFormFiller) return false;
+ CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, TRUE);
+ if(!pFormFiller) return FALSE;
pFormFiller->GetActionData(pPageView, CPDF_AAction::GetFocus, fa);
pWidget->OnAAction(CPDF_AAction::GetFocus, fa, pPageView);
- m_bNotifying = false;
+ m_bNotifying = FALSE;
if (pWidget->IsAppModified())
{
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE))
{
pFormFiller->ResetPDFWindow(pPageView, nValueAge == pWidget->GetValueAge());
}
@@ -479,18 +479,18 @@ bool CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
}
}
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, true))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE))
return pFormFiller->OnSetFocus(pAnnot, nFlag);
- return true;
+ return TRUE;
}
-bool CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
+FX_BOOL CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
{
- if(!pAnnot) return false;
+ if(!pAnnot) return FALSE;
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, false))
+ if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
{
if (pFormFiller->OnKillFocus(pAnnot, nFlag))
{
@@ -499,7 +499,7 @@ bool CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (pWidget->GetAAction(CPDF_AAction::LoseFocus))
{
- m_bNotifying = true;
+ m_bNotifying = TRUE;
pWidget->ClearAppModified();
CPDFSDK_PageView* pPageView = pWidget->GetPageView();
@@ -512,24 +512,24 @@ bool CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
pFormFiller->GetActionData(pPageView, CPDF_AAction::LoseFocus, fa);
pWidget->OnAAction(CPDF_AAction::LoseFocus, fa, pPageView);
- m_bNotifying = false;
+ m_bNotifying = FALSE;
}
}
}
else
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
-bool CFFL_IFormFiller::IsVisible(CPDFSDK_Widget* pWidget)
+FX_BOOL CFFL_IFormFiller::IsVisible(CPDFSDK_Widget* pWidget)
{
return pWidget->IsVisible();
}
-bool CFFL_IFormFiller::IsReadOnly(CPDFSDK_Widget* pWidget)
+FX_BOOL CFFL_IFormFiller::IsReadOnly(CPDFSDK_Widget* pWidget)
{
ASSERT(pWidget != NULL);
@@ -538,12 +538,12 @@ bool CFFL_IFormFiller::IsReadOnly(CPDFSDK_Widget* pWidget)
return (nFieldFlags & FIELDFLAG_READONLY) == FIELDFLAG_READONLY;
}
-bool CFFL_IFormFiller::IsFillingAllowed(CPDFSDK_Widget* pWidget)
+FX_BOOL CFFL_IFormFiller::IsFillingAllowed(CPDFSDK_Widget* pWidget)
{
ASSERT(pWidget != NULL);
if (pWidget->GetFieldType() == FIELDTYPE_PUSHBUTTON)
- return true;
+ return TRUE;
else
{
CPDF_Page* pPage = pWidget->GetPDFPage();
@@ -557,10 +557,10 @@ bool CFFL_IFormFiller::IsFillingAllowed(CPDFSDK_Widget* pWidget)
(dwPermissions&FPDFPERM_ANNOT_FORM) ||
(dwPermissions&FPDFPERM_MODIFY);
}
- return true;
+ return TRUE;
}
-CFFL_FormFiller* CFFL_IFormFiller::GetFormFiller(CPDFSDK_Annot* pAnnot, bool bRegister)
+CFFL_FormFiller* CFFL_IFormFiller::GetFormFiller(CPDFSDK_Annot* pAnnot, FX_BOOL bRegister)
{
auto it = m_Maps.find(pAnnot);
if (it != m_Maps.end())
@@ -666,7 +666,7 @@ void CFFL_IFormFiller::QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX
}
FX_FLOAT fFactHeight = 0;
- bool bBottom = true;
+ FX_BOOL bBottom = TRUE;
FX_FLOAT fMaxListBoxHeight = 0;
if (fPopupMax > FFL_MAXLISTBOXHEIGHT)
{
@@ -685,26 +685,26 @@ void CFFL_IFormFiller::QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX
if (fBottom > fMaxListBoxHeight)
{
fFactHeight = fMaxListBoxHeight;
- bBottom = true;
+ bBottom = TRUE;
}
else
{
if (fTop > fMaxListBoxHeight)
{
fFactHeight = fMaxListBoxHeight;
- bBottom = false;
+ bBottom = FALSE;
}
else
{
if (fTop > fBottom)
{
fFactHeight = fTop;
- bBottom = false;
+ bBottom = FALSE;
}
else
{
fFactHeight = fBottom;
- bBottom = true;
+ bBottom = TRUE;
}
}
}
@@ -713,14 +713,14 @@ void CFFL_IFormFiller::QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX
fPopupRet = fFactHeight;
}
-void CFFL_IFormFiller::OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bRC, bool& bExit, FX_DWORD nFlag)
+void CFFL_IFormFiller::OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bRC, FX_BOOL& bExit, FX_DWORD nFlag)
{
if (!m_bNotifying)
{
ASSERT(pWidget != NULL);
if (pWidget->GetAAction(CPDF_AAction::KeyStroke))
{
- m_bNotifying = true;
+ m_bNotifying = TRUE;
pWidget->ClearAppModified();
ASSERT(pPageView != NULL);
@@ -728,11 +728,11 @@ void CFFL_IFormFiller::OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, CPDFSDK_PageVi
PDFSDK_FieldAction fa;
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
- fa.bWillCommit = true;
- fa.bKeyDown = true;
- fa.bRC = true;
+ fa.bWillCommit = TRUE;
+ fa.bKeyDown = TRUE;
+ fa.bRC = TRUE;
- CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false);
+ CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE);
ASSERT(pFormFiller != NULL);
pFormFiller->GetActionData(pPageView, CPDF_AAction::KeyStroke, fa);
@@ -744,19 +744,19 @@ void CFFL_IFormFiller::OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, CPDFSDK_PageVi
bRC = fa.bRC;
// bExit = !IsValidAnnot(m_pApp, pDocument, pDocView, pPageView, pWidget);
- m_bNotifying = false;
+ m_bNotifying = FALSE;
}
}
}
-void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bRC, bool& bExit, FX_DWORD nFlag)
+void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bRC, FX_BOOL& bExit, FX_DWORD nFlag)
{
if (!m_bNotifying)
{
ASSERT(pWidget != NULL);
if (pWidget->GetAAction(CPDF_AAction::Validate))
{
- m_bNotifying = true;
+ m_bNotifying = TRUE;
pWidget->ClearAppModified();
ASSERT(pPageView != NULL);
@@ -768,10 +768,10 @@ void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPa
PDFSDK_FieldAction fa;
fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
- fa.bKeyDown = true;
- fa.bRC = true;
+ fa.bKeyDown = TRUE;
+ fa.bRC = TRUE;
- CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false);
+ CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE);
ASSERT(pFormFiller != NULL);
pFormFiller->GetActionData(pPageView, CPDF_AAction::Validate, fa);
@@ -783,12 +783,12 @@ void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPa
bRC = fa.bRC;
// bExit = !IsValidAnnot(m_pApp, pDocument, pDocView, pPageView, pWidget);
- m_bNotifying = false;
+ m_bNotifying = FALSE;
}
}
}
-void CFFL_IFormFiller::OnCalculate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bExit, FX_DWORD nFlag)
+void CFFL_IFormFiller::OnCalculate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bExit, FX_DWORD nFlag)
{
if (!m_bNotifying)
{
@@ -806,11 +806,11 @@ void CFFL_IFormFiller::OnCalculate(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pP
// bExit = !IsValidAnnot(m_pApp, pDocument, pDocView, pPageView, pWidget);
- m_bNotifying = false;
+ m_bNotifying = FALSE;
}
}
-void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, bool& bExit, FX_DWORD nFlag)
+void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPageView, FX_BOOL& bExit, FX_DWORD nFlag)
{
if (!m_bNotifying)
{
@@ -824,7 +824,7 @@ void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPage
CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)pDocument->GetInterForm();
ASSERT(pInterForm != NULL);
- bool bFormated = false;
+ FX_BOOL bFormated = FALSE;
CFX_WideString sValue = pInterForm->OnFormat(pWidget->GetFormField(), bFormated);
// bExit = !IsValidAnnot(m_pApp, pDocument, pDocView, pPageView, pWidget);
@@ -833,15 +833,15 @@ void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget, CPDFSDK_PageView* pPage
if (bFormated)
{
- pInterForm->ResetFieldAppearance(pWidget->GetFormField(), sValue.c_str(), true);
+ pInterForm->ResetFieldAppearance(pWidget->GetFormField(), sValue.c_str(), TRUE);
pInterForm->UpdateField(pWidget->GetFormField());
}
- m_bNotifying = false;
+ m_bNotifying = FALSE;
}
}
-bool CFFL_IFormFiller::IsValidAnnot(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot)
+FX_BOOL CFFL_IFormFiller::IsValidAnnot(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot)
{
ASSERT(pPageView != NULL);
@@ -850,26 +850,26 @@ bool CFFL_IFormFiller::IsValidAnnot(CPDFSDK_PageView* pPageView, CPDFSDK_Annot*
if(pPageView)
return pPageView->IsValidAnnot(pAnnot->GetPDFAnnot());
else
- return false;
+ return FALSE;
}
-void CFFL_IFormFiller::OnBeforeKeyStroke(bool bEditOrList, void* pPrivateData, int32_t nKeyCode,
+void CFFL_IFormFiller::OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode,
CFX_WideString & strChange, const CFX_WideString& strChangeEx,
int nSelStart, int nSelEnd,
- bool bKeyDown, bool & bRC, bool & bExit, FX_DWORD nFlag)
+ FX_BOOL bKeyDown, FX_BOOL & bRC, FX_BOOL & bExit, FX_DWORD nFlag)
{
ASSERT(pPrivateData != NULL);
CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData;
ASSERT(pData->pWidget != NULL);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pData->pWidget, false);
+ CFFL_FormFiller* pFormFiller = GetFormFiller(pData->pWidget, FALSE);
ASSERT(pFormFiller != NULL);
if (!m_bNotifying)
{
if (pData->pWidget->GetAAction(CPDF_AAction::KeyStroke))
{
- m_bNotifying = true;
+ m_bNotifying = TRUE;
int nAge = pData->pWidget->GetAppearanceAge();
int nValueAge = pData->pWidget->GetValueAge();
@@ -882,8 +882,8 @@ void CFFL_IFormFiller::OnBeforeKeyStroke(bool bEditOrList, void* pPrivateData, i
fa.sChange = strChange;
fa.sChangeEx = strChangeEx;
fa.bKeyDown = bKeyDown;
- fa.bWillCommit = false;
- fa.bRC = true;
+ fa.bWillCommit = FALSE;
+ fa.bRC = TRUE;
fa.nSelStart = nSelStart;
fa.nSelEnd = nSelEnd;
@@ -895,8 +895,8 @@ void CFFL_IFormFiller::OnBeforeKeyStroke(bool bEditOrList, void* pPrivateData, i
{
if (!IsValidAnnot(pData->pPageView, pData->pWidget))
{
- bExit = true;
- m_bNotifying = false;
+ bExit = TRUE;
+ m_bNotifying = FALSE;
return;
}
@@ -904,48 +904,48 @@ void CFFL_IFormFiller::OnBeforeKeyStroke(bool bEditOrList, void* pPrivateData, i
{
CPWL_Wnd* pWnd = pFormFiller->ResetPDFWindow(pData->pPageView, nValueAge == pData->pWidget->GetValueAge());
pData = (CFFL_PrivateData*)pWnd->GetAttachedData();
- bExit = true;
+ bExit = TRUE;
}
if (fa.bRC)
{
pFormFiller->SetActionData(pData->pPageView, CPDF_AAction::KeyStroke, fa);
- bRC = false;
+ bRC = FALSE;
}
else
{
pFormFiller->RestoreState(pData->pPageView);
- bRC = false;
+ bRC = FALSE;
}
if (pDocument->GetFocusAnnot() != pData->pWidget)
{
pFormFiller->CommitData(pData->pPageView,nFlag);
- bExit = true;
+ bExit = TRUE;
}
}
else
{
if (!IsValidAnnot(pData->pPageView, pData->pWidget))
{
- bExit = true;
- m_bNotifying = false;
+ bExit = TRUE;
+ m_bNotifying = FALSE;
return;
}
}
- m_bNotifying = false;
+ m_bNotifying = FALSE;
}
}
}
-void CFFL_IFormFiller::OnAfterKeyStroke(bool bEditOrList, void* pPrivateData, bool & bExit,FX_DWORD nFlag)
+void CFFL_IFormFiller::OnAfterKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_BOOL & bExit,FX_DWORD nFlag)
{
ASSERT(pPrivateData != NULL);
CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData;
ASSERT(pData->pWidget != NULL);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pData->pWidget, false);
+ CFFL_FormFiller* pFormFiller = GetFormFiller(pData->pWidget, FALSE);
ASSERT(pFormFiller != NULL);
if (!bEditOrList)
diff --git a/fpdfsdk/src/formfiller/FFL_ListBox.cpp b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
index ef113dad96..c105cfcbdd 100644
--- a/fpdfsdk/src/formfiller/FFL_ListBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
@@ -73,7 +73,7 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView
{
m_OriginSelections.clear();
- bool bSetCaret = false;
+ FX_BOOL bSetCaret = FALSE;
for (int32_t i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
{
if (m_pWidget->IsOptionSelected(i))
@@ -81,7 +81,7 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView
if (!bSetCaret)
{
pWnd->SetCaret(i);
- bSetCaret = true;
+ bSetCaret = TRUE;
}
pWnd->Select(i);
m_OriginSelections.insert(i);
@@ -106,23 +106,23 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView
}
-bool CFFL_ListBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+FX_BOOL CFFL_ListBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
-bool CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView)
+FX_BOOL CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView)
{
- CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false);
+ CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE);
if (!pListBox)
- return false;
+ return FALSE;
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT) {
int nSelCount = 0;
for (int32_t i = 0, sz = pListBox->GetCount(); i < sz; ++i) {
if (pListBox->IsItemSelected(i)) {
if (m_OriginSelections.count(i) == 0)
- return true;
+ return TRUE;
nSelCount++;
}
@@ -137,7 +137,7 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false))
+ if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
{
CFX_IntArray aOldSelect, aNewSelect;
@@ -154,7 +154,7 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView)
int32_t nNewTopIndex = pListBox->GetTopVisibleIndex();
- m_pWidget->ClearSelection(false);
+ m_pWidget->ClearSelection(FALSE);
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT)
{
@@ -162,19 +162,19 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView)
{
if (pListBox->IsItemSelected(i))
{
- m_pWidget->SetOptionSelection(i, true, false);
+ m_pWidget->SetOptionSelection(i, TRUE, FALSE);
aNewSelect.Add(i);
}
}
}
else
{
- m_pWidget->SetOptionSelection(pListBox->GetCurSel(), true, false);
+ m_pWidget->SetOptionSelection(pListBox->GetCurSel(), TRUE, FALSE);
aNewSelect.Add(pListBox->GetCurSel());
}
m_pWidget->SetTopVisibleIndex(nNewTopIndex);
- m_pWidget->ResetFieldAppearance(true);
+ m_pWidget->ResetFieldAppearance(TRUE);
m_pWidget->UpdateField();
SetChangeMark();
}
@@ -192,7 +192,7 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAct
}
else
{
- if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false))
+ if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
{
ASSERT(m_pWidget != NULL);
int32_t nCurSel = pListBox->GetCurSel();
@@ -230,7 +230,7 @@ void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView)
{
ASSERT(pPageView != NULL);
- if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false))
+ if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
{
for (int32_t i=0,sz=pListBox->GetCount(); i<sz; i++)
{
@@ -244,14 +244,14 @@ void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView)
void CFFL_ListBox::RestoreState(CPDFSDK_PageView* pPageView)
{
- if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false))
+ if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
{
for (int i=0,sz=m_State.GetSize(); i<sz; i++)
pListBox->Select(m_State[i]);
}
}
-CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestoreValue)
+CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue)
{
if (bRestoreValue)
SaveState(pPageView);
@@ -263,17 +263,17 @@ CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestor
if (bRestoreValue)
{
RestoreState(pPageView);
- pRet = GetPDFWindow(pPageView, false);
+ pRet = GetPDFWindow(pPageView, FALSE);
}
else
- pRet = GetPDFWindow(pPageView, true);
+ pRet = GetPDFWindow(pPageView, TRUE);
m_pWidget->UpdateField();
return pRet;
}
-void CFFL_ListBox::OnKeyStroke(bool bKeyDown, FX_DWORD nFlag)
+void CFFL_ListBox::OnKeyStroke(FX_BOOL bKeyDown, FX_DWORD nFlag)
{
ASSERT(m_pWidget != NULL);
@@ -289,7 +289,7 @@ void CFFL_ListBox::OnKeyStroke(bool bKeyDown, FX_DWORD nFlag)
if (CommitData(pPageView, nFlag))
{
DestroyPDFWindow(pPageView);
- m_bValid = false;
+ m_bValid = FALSE;
}
}
}
diff --git a/fpdfsdk/src/formfiller/FFL_Notify.cpp b/fpdfsdk/src/formfiller/FFL_Notify.cpp
index fdc4bcf7b1..58a2202b61 100644
--- a/fpdfsdk/src/formfiller/FFL_Notify.cpp
+++ b/fpdfsdk/src/formfiller/FFL_Notify.cpp
@@ -15,7 +15,7 @@
//#pragma warning(disable: 4800)
CFFL_Notify::CFFL_Notify(CFFL_FormFiller * pFormFiller) :
- m_bDoActioning(false),
+ m_bDoActioning(FALSE),
m_nNotifyFlag(0)
{
ASSERT(pFormFiller != NULL);
@@ -36,116 +36,116 @@ void CFFL_Notify::AfterNotify()
m_nNotifyFlag --;
}
-bool CFFL_Notify::OnMouseUp(bool & bExit)
+FX_BOOL CFFL_Notify::OnMouseUp(FX_BOOL & bExit)
{
BeforeNotify();
- bool bRet = false;//DoAAction(CPDF_AAction::AActionType::ButtonUp, bExit);
+ FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::ButtonUp, bExit);
AfterNotify();
return bRet;
}
-bool CFFL_Notify::OnMouseDown(bool & bExit)
+FX_BOOL CFFL_Notify::OnMouseDown(FX_BOOL & bExit)
{
BeforeNotify();
- bool bRet = false;//DoAAction(CPDF_AAction::AActionType::ButtonDown, bExit);
+ FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::ButtonDown, bExit);
AfterNotify();
return bRet;
}
-bool CFFL_Notify::OnMouseEnter(bool & bExit)
+FX_BOOL CFFL_Notify::OnMouseEnter(FX_BOOL & bExit)
{
BeforeNotify();
- bool bRet = false;//DoAAction(CPDF_AAction::AActionType::CursorEnter, bExit);
+ FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::CursorEnter, bExit);
AfterNotify();
return bRet;
}
-bool CFFL_Notify::OnMouseExit(bool & bExit)
+FX_BOOL CFFL_Notify::OnMouseExit(FX_BOOL & bExit)
{
BeforeNotify();
- bool bRet = false;//DoAAction(CPDF_AAction::AActionType::CursorExit, bExit);
+ FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::CursorExit, bExit);
AfterNotify();
return bRet;
}
-bool CFFL_Notify::OnSetFocus(bool & bExit)
+FX_BOOL CFFL_Notify::OnSetFocus(FX_BOOL & bExit)
{
BeforeNotify();
- bool bRet = false;//DoAAction(CPDF_AAction::AActionType::GetFocus, bExit);
+ FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::GetFocus, bExit);
AfterNotify();
return bRet;
}
-bool CFFL_Notify::OnKillFocus(bool & bExit)
+FX_BOOL CFFL_Notify::OnKillFocus(FX_BOOL & bExit)
{
BeforeNotify();
- bool bRet = false;//DoAAction(CPDF_AAction::AActionType::LoseFocus, bExit);
+ FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::LoseFocus, bExit);
AfterNotify();
return bRet;
}
-bool CFFL_Notify::OnCalculate()
+FX_BOOL CFFL_Notify::OnCalculate()
{
- return true;
+ return TRUE;
}
-bool CFFL_Notify::OnFormat(int iCommitKey)
+FX_BOOL CFFL_Notify::OnFormat(int iCommitKey)
{
- return true;
+ return TRUE;
}
-bool CFFL_Notify::OnKeyStroke(CPDF_FormField* pFormField, int nCommitKey, CFX_WideString& strValue, CFX_WideString& strChange,
- const CFX_WideString& strChangeEx, bool bKeyDown, bool bModifier,
- bool bShift, bool bWillCommit, bool bFieldFull,
- int& nSelStart, int& nSelEnd, bool& bRC)
+FX_BOOL CFFL_Notify::OnKeyStroke(CPDF_FormField* pFormField, int nCommitKey, CFX_WideString& strValue, CFX_WideString& strChange,
+ const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier,
+ FX_BOOL bShift, FX_BOOL bWillCommit, FX_BOOL bFieldFull,
+ int& nSelStart, int& nSelEnd, FX_BOOL& bRC)
{
- return true;
+ return TRUE;
}
-bool CFFL_Notify::OnValidate(CPDF_FormField* pFormField, CFX_WideString& strValue, CFX_WideString & strChange,
- const CFX_WideString& strChangeEx, bool bKeyDown, bool bModifier,
- bool bShift, bool & bRC)
+FX_BOOL CFFL_Notify::OnValidate(CPDF_FormField* pFormField, CFX_WideString& strValue, CFX_WideString & strChange,
+ const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier,
+ FX_BOOL bShift, FX_BOOL & bRC)
{
- return true;
+ return TRUE;
}
-bool CFFL_Notify::DoAAction(CPDF_AAction::AActionType eAAT, bool & bExit)
+FX_BOOL CFFL_Notify::DoAAction(CPDF_AAction::AActionType eAAT, FX_BOOL & bExit)
{
if (m_bDoActioning)
- return false;
+ return FALSE;
CPDF_Action action;
if (!FindAAction(eAAT, action))
- return false;
+ return FALSE;
- m_bDoActioning = true;
+ m_bDoActioning = TRUE;
ExecuteActionTree(eAAT,action,bExit);
- m_bDoActioning = false;
- return true;
+ m_bDoActioning = FALSE;
+ return TRUE;
}
-bool CFFL_Notify::ExecuteActionTree(CPDF_AAction::AActionType eAAT,CPDF_Action & action, bool& bExit)
+FX_BOOL CFFL_Notify::ExecuteActionTree(CPDF_AAction::AActionType eAAT,CPDF_Action & action, FX_BOOL& bExit)
{
- if (!ExecuteAction(eAAT,action,bExit)) return false;
- if (bExit) return true;
+ if (!ExecuteAction(eAAT,action,bExit)) return FALSE;
+ if (bExit) return TRUE;
for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
{
CPDF_Action subaction = action.GetSubAction(i);
- if (!ExecuteActionTree(eAAT,subaction,bExit)) return false;
+ if (!ExecuteActionTree(eAAT,subaction,bExit)) return FALSE;
if (bExit) break;
}
- return true;
+ return TRUE;
}
-bool CFFL_Notify::FindAAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action)
+FX_BOOL CFFL_Notify::FindAAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action)
{
- return false;
+ return FALSE;
}
-bool CFFL_Notify::FindAAction(CPDF_AAction aaction,CPDF_AAction::AActionType eAAT,CPDF_Action & action)
+FX_BOOL CFFL_Notify::FindAAction(CPDF_AAction aaction,CPDF_AAction::AActionType eAAT,CPDF_Action & action)
{
CPDF_Action MyAction;
@@ -154,20 +154,20 @@ bool CFFL_Notify::FindAAction(CPDF_AAction aaction,CPDF_AAction::AActionType eAA
MyAction = aaction.GetAction(eAAT);
}
else
- return false;
+ return FALSE;
if (MyAction.GetType() == CPDF_Action::Unknown)
- return false;
+ return FALSE;
action = MyAction;
- return true;
+ return TRUE;
}
-bool CFFL_Notify::ExecuteAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action,bool& bExit)
+FX_BOOL CFFL_Notify::ExecuteAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action,FX_BOOL& bExit)
{
- return false;
+ return FALSE;
}
//#pragma warning(default: 4800)
diff --git a/fpdfsdk/src/formfiller/FFL_PushButton.cpp b/fpdfsdk/src/formfiller/FFL_PushButton.cpp
index 44e4ed03f3..a5df48840c 100644
--- a/fpdfsdk/src/formfiller/FFL_PushButton.cpp
+++ b/fpdfsdk/src/formfiller/FFL_PushButton.cpp
@@ -28,7 +28,7 @@ CPWL_Wnd* CFFL_PushButton::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageV
}
-bool CFFL_PushButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+FX_BOOL CFFL_PushButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
diff --git a/fpdfsdk/src/formfiller/FFL_RadioButton.cpp b/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
index e7b334828a..1f73e8ccaa 100644
--- a/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
+++ b/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
@@ -31,19 +31,19 @@ CPWL_Wnd* CFFL_RadioButton::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_Page
return pWnd;
}
-bool CFFL_RadioButton::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
+FX_BOOL CFFL_RadioButton::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
{
switch (nKeyCode)
{
case FWL_VKEY_Return:
case FWL_VKEY_Space:
- return true;
+ return TRUE;
default:
return CFFL_FormFiller::OnKeyDown(pAnnot, nKeyCode, nFlags);
}
}
-bool CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+FX_BOOL CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
switch (nChar)
{
@@ -56,61 +56,61 @@ bool CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFla
CPDFSDK_PageView* pPageView = pAnnot->GetPageView();
ASSERT(pPageView != NULL);
- bool bReset = false;
- bool bExit = false;
+ FX_BOOL bReset = FALSE;
+ FX_BOOL bExit = FALSE;
pIFormFiller->OnButtonUp(m_pWidget, pPageView, bReset, bExit,nFlags);
- if (bReset) return true;
- if (bExit) return true;
+ if (bReset) return TRUE;
+ if (bExit) return TRUE;
CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
- if (CPWL_RadioButton * pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, true))
- pWnd->SetCheck(true);
+ if (CPWL_RadioButton * pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, TRUE))
+ pWnd->SetCheck(TRUE);
CommitData(pPageView,nFlags);
- return true;
+ return TRUE;
}
default:
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
}
-bool CFFL_RadioButton::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+FX_BOOL CFFL_RadioButton::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
CFFL_Button::OnLButtonUp(pPageView, pAnnot, nFlags, point);
if (IsValid())
{
- if (CPWL_RadioButton * pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, true))
- pWnd->SetCheck(true);
+ if (CPWL_RadioButton * pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, TRUE))
+ pWnd->SetCheck(TRUE);
- if (!CommitData(pPageView,nFlags)) return false;
+ if (!CommitData(pPageView,nFlags)) return FALSE;
}
- return true;
+ return TRUE;
}
-bool CFFL_RadioButton::IsDataChanged(CPDFSDK_PageView* pPageView)
+FX_BOOL CFFL_RadioButton::IsDataChanged(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_RadioButton* pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, false))
+ if (CPWL_RadioButton* pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, FALSE))
{
return pWnd->IsChecked() != m_pWidget->IsChecked();
}
- return false;
+ return FALSE;
}
void CFFL_RadioButton::SaveData(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_RadioButton* pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, false))
+ if (CPWL_RadioButton* pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, FALSE))
{
- bool bNewChecked = pWnd->IsChecked();
+ FX_BOOL bNewChecked = pWnd->IsChecked();
if (bNewChecked)
{
@@ -129,7 +129,7 @@ void CFFL_RadioButton::SaveData(CPDFSDK_PageView* pPageView)
}
}
- m_pWidget->SetCheck(bNewChecked, false);
+ m_pWidget->SetCheck(bNewChecked, FALSE);
m_pWidget->UpdateField();
SetChangeMark();
}
diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/src/formfiller/FFL_TextField.cpp
index a8695f4aa5..a4b87263ed 100644
--- a/fpdfsdk/src/formfiller/FFL_TextField.cpp
+++ b/fpdfsdk/src/formfiller/FFL_TextField.cpp
@@ -129,7 +129,7 @@ CPWL_Wnd* CFFL_TextField::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVi
}
-bool CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
switch (nChar)
{
@@ -144,7 +144,7 @@ bool CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags
if (m_bValid)
{
- if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, true))
+ if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE))
pWnd->SetFocus();
}
else
@@ -152,9 +152,9 @@ bool CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags
if (CommitData(pPageView, nFlags))
{
DestroyPDFWindow(pPageView);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
}
break;
@@ -162,35 +162,35 @@ bool CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags
{
CPDFSDK_PageView* pPageView = GetCurPageView();
ASSERT(pPageView != NULL);
- EscapeFiller(pPageView,true);
- return true;
+ EscapeFiller(pPageView,TRUE);
+ return TRUE;
}
}
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
-bool CFFL_TextField::IsDataChanged(CPDFSDK_PageView* pPageView)
+FX_BOOL CFFL_TextField::IsDataChanged(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_Edit * pEdit = (CPWL_Edit*)GetPDFWindow(pPageView, false))
+ if (CPWL_Edit * pEdit = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
return pEdit->GetText() != m_pWidget->GetValue();
- return false;
+ return FALSE;
}
void CFFL_TextField::SaveData(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, false))
+ if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
{
CFX_WideString sOldValue = m_pWidget->GetValue();
CFX_WideString sNewValue = pWnd->GetText();
- m_pWidget->SetValue(sNewValue, false);
- m_pWidget->ResetFieldAppearance(true);
+ m_pWidget->SetValue(sNewValue, FALSE);
+ m_pWidget->ResetFieldAppearance(TRUE);
m_pWidget->UpdateField();
SetChangeMark();
}
@@ -202,7 +202,7 @@ void CFFL_TextField::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AA
switch (type)
{
case CPDF_AAction::KeyStroke:
- if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, false))
+ if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
{
fa.bFieldFull = pWnd->IsTextFull();
@@ -216,7 +216,7 @@ void CFFL_TextField::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AA
}
break;
case CPDF_AAction::Validate:
- if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, false))
+ if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
{
fa.sValue = pWnd->GetText();
}
@@ -237,7 +237,7 @@ void CFFL_TextField::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AA
switch (type)
{
case CPDF_AAction::KeyStroke:
- if (CPWL_Edit * pEdit = (CPWL_Edit*)GetPDFWindow(pPageView, false))
+ if (CPWL_Edit * pEdit = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
{
pEdit->SetFocus();
pEdit->SetSel(fa.nSelStart, fa.nSelEnd);
@@ -250,7 +250,7 @@ void CFFL_TextField::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AA
}
-bool CFFL_TextField::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
+FX_BOOL CFFL_TextField::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
const PDFSDK_FieldAction& faNew)
{
switch (type)
@@ -262,14 +262,14 @@ bool CFFL_TextField::IsActionDataChanged(CPDF_AAction::AActionType type, const P
break;
}
- return false;
+ return FALSE;
}
void CFFL_TextField::SaveState(CPDFSDK_PageView* pPageView)
{
ASSERT(pPageView != NULL);
- if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, false))
+ if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
{
pWnd->GetSel(m_State.nStart, m_State.nEnd);
m_State.sValue = pWnd->GetText();
@@ -280,14 +280,14 @@ void CFFL_TextField::RestoreState(CPDFSDK_PageView* pPageView)
{
ASSERT(pPageView != NULL);
- if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, true))
+ if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, TRUE))
{
pWnd->SetText(m_State.sValue.c_str());
pWnd->SetSel(m_State.nStart, m_State.nEnd);
}
}
-CPWL_Wnd* CFFL_TextField::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestoreValue)
+CPWL_Wnd* CFFL_TextField::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue)
{
if (bRestoreValue)
SaveState(pPageView);
@@ -299,10 +299,10 @@ CPWL_Wnd* CFFL_TextField::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRest
if (bRestoreValue)
{
RestoreState(pPageView);
- pRet = GetPDFWindow(pPageView, false);
+ pRet = GetPDFWindow(pPageView, FALSE);
}
else
- pRet = GetPDFWindow(pPageView, true);
+ pRet = GetPDFWindow(pPageView, TRUE);
m_pWidget->UpdateField();
@@ -326,7 +326,7 @@ void CFFL_TextField::OnSetFocus(CPWL_Wnd* pWnd)
int nCharacters = wsText.GetLength();
CFX_ByteString bsUTFText = wsText.UTF16LE_Encode();
unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str();
- m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, nCharacters, true);
+ m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, nCharacters, TRUE);
pEdit->SetEditNotify(this);
//pUndo->BeginEdit(pDocument);
@@ -338,19 +338,19 @@ void CFFL_TextField::OnKillFocus(CPWL_Wnd* pWnd)
}
-bool CFFL_TextField::CanCopy(CPDFSDK_Document* pDocument)
+FX_BOOL CFFL_TextField::CanCopy(CPDFSDK_Document* pDocument)
{
- return false;
+ return FALSE;
}
-bool CFFL_TextField::CanCut(CPDFSDK_Document* pDocument)
+FX_BOOL CFFL_TextField::CanCut(CPDFSDK_Document* pDocument)
{
- return false;
+ return FALSE;
}
-bool CFFL_TextField::CanPaste(CPDFSDK_Document* pDocument)
+FX_BOOL CFFL_TextField::CanPaste(CPDFSDK_Document* pDocument)
{
- return false;
+ return FALSE;
}
void CFFL_TextField::OnAddUndo(CPWL_Edit* pEdit)
diff --git a/fpdfsdk/src/formfiller/FFL_Utils.cpp b/fpdfsdk/src/formfiller/FFL_Utils.cpp
index 0e5022c9c1..8d2d76d73c 100644
--- a/fpdfsdk/src/formfiller/FFL_Utils.cpp
+++ b/fpdfsdk/src/formfiller/FFL_Utils.cpp
@@ -41,9 +41,9 @@ CPDF_Rect CFFL_Utils::DeflateRect(const CPDF_Rect & crRect,const FX_FLOAT & fSiz
return crNew;
}
-bool CFFL_Utils::TraceObject(CPDF_Object* pObj)
+FX_BOOL CFFL_Utils::TraceObject(CPDF_Object* pObj)
{
- if (!pObj) return false;
+ if (!pObj) return FALSE;
FX_DWORD dwObjNum = pObj->GetObjNum();
switch (pObj->GetType())
@@ -71,7 +71,7 @@ bool CFFL_Utils::TraceObject(CPDF_Object* pObj)
//TRACE(csKey + "\n");
if (!pElement) break;
TraceObject(pElement);
- }while (true);
+ }while (TRUE);
}
break;
@@ -107,8 +107,8 @@ bool CFFL_Utils::TraceObject(CPDF_Object* pObj)
default:
break;
}
- if (dwObjNum == 0) return false;
+ if (dwObjNum == 0) return FALSE;
- return true;
+ return TRUE;
}
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp
index 85eba55212..b26d2af10a 100644
--- a/fpdfsdk/src/fpdf_dataavail.cpp
+++ b/fpdfsdk/src/fpdf_dataavail.cpp
@@ -21,7 +21,7 @@ public:
m_pfileAvail = pfileAvail;
}
- virtual bool IsDataAvail( FX_FILESIZE offset, FX_DWORD size)
+ virtual FX_BOOL IsDataAvail( FX_FILESIZE offset, FX_DWORD size)
{
return m_pfileAvail->IsDataAvail(m_pfileAvail, offset, size);
}
@@ -48,7 +48,7 @@ public:
return m_pFileAccess->m_FileLen;
}
- virtual bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
+ virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
{
return m_pFileAccess->m_GetBlock(m_pFileAccess->m_Param, offset, (uint8_t*)buffer, size);
}
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index 741347474c..0d8db417ac 100644
--- a/fpdfsdk/src/fpdf_ext.cpp
+++ b/fpdfsdk/src/fpdf_ext.cpp
@@ -14,7 +14,7 @@ class CFSDK_UnsupportInfo_Adapter
{
public:
CFSDK_UnsupportInfo_Adapter(UNSUPPORT_INFO* unsp_info){ m_unsp_info = unsp_info;}
-// bool NeedToPauseNow();
+// FX_BOOL NeedToPauseNow();
void ReportError(int nErrorType);
private:
@@ -35,25 +35,25 @@ void FreeUnsupportInfo(void* pData)
delete pAdapter;
}
-bool FPDF_UnSupportError(int nError)
+FX_BOOL FPDF_UnSupportError(int nError)
{
CFSDK_UnsupportInfo_Adapter * pAdapter = (CFSDK_UnsupportInfo_Adapter *)CPDF_ModuleMgr::Get()->GetPrivateData((void *)FPDFSDK_UNSUPPORT_CALL);
if(!pAdapter)
- return false;
+ return FALSE;
pAdapter->ReportError(nError);
- return true;
+ return TRUE;
}
DLLEXPORT FPDF_BOOL STDCALL FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info)
{
if (!unsp_info || unsp_info->version!=1)
- return false;
+ return FALSE;
CFSDK_UnsupportInfo_Adapter * pAdapter = new CFSDK_UnsupportInfo_Adapter(unsp_info);
CPDF_ModuleMgr::Get()->SetPrivateData((void *)FPDFSDK_UNSUPPORT_CALL,pAdapter, &FreeUnsupportInfo);
- return true;
+ return TRUE;
}
void CheckUnSupportAnnot(CPDF_Document * pDoc, CPDF_Annot* pPDFAnnot)
@@ -104,7 +104,7 @@ void CheckUnSupportAnnot(CPDF_Document * pDoc, CPDF_Annot* pPDFAnnot)
}
-bool CheckSharedForm(CXML_Element * pElement, CFX_ByteString cbName)
+FX_BOOL CheckSharedForm(CXML_Element * pElement, CFX_ByteString cbName)
{
int count = pElement->CountAttrs();
int i=0;
@@ -143,10 +143,10 @@ bool CheckSharedForm(CXML_Element * pElement, CFX_ByteString cbName)
{
CXML_Element * pChild = pElement->GetElement(i);
if(CheckSharedForm(pChild, cbName))
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code)
@@ -206,7 +206,7 @@ void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code)
CheckSharedForm(pElement, "workflowType");
// XFA Forms
- CPDF_InterForm * pInterForm = new CPDF_InterForm(pDoc,false);
+ CPDF_InterForm * pInterForm = new CPDF_InterForm(pDoc,FALSE);
if (pInterForm->HasXFAForm())
{
FPDF_UnSupportError(FPDF_UNSP_DOC_XFAFORM);
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp
index 3dbb0a1e69..988d7f46b5 100644
--- a/fpdfsdk/src/fpdf_flatten.cpp
+++ b/fpdfsdk/src/fpdf_flatten.cpp
@@ -13,17 +13,17 @@ typedef CFX_ArrayTemplate<CPDF_Rect> CPDF_RectArray;
enum FPDF_TYPE { MAX, MIN };
enum FPDF_VALUE { TOP, LEFT, RIGHT, BOTTOM };
-bool IsValiableRect(CPDF_Rect rect, CPDF_Rect rcPage)
+FX_BOOL IsValiableRect(CPDF_Rect rect, CPDF_Rect rcPage)
{
if ( rect.left - rect.right > 0.000001f ||
rect.bottom - rect.top > 0.000001f)
- return false;
+ return FALSE;
if (rect.left == 0.0f &&
rect.top == 0.0f &&
rect.right == 0.0f &&
rect.bottom == 0.0f)
- return false;
+ return FALSE;
if (!rcPage.IsEmpty())
{
@@ -31,17 +31,17 @@ bool IsValiableRect(CPDF_Rect rect, CPDF_Rect rcPage)
rect.right - rcPage.right > 10.000001f ||
rect.top - rcPage.top > 10.000001f ||
rect.bottom - rcPage.bottom < -10.000001f)
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
-bool GetContentsRect( CPDF_Document * pDoc, CPDF_Dictionary* pDict, CPDF_RectArray * pRectArray )
+FX_BOOL GetContentsRect( CPDF_Document * pDoc, CPDF_Dictionary* pDict, CPDF_RectArray * pRectArray )
{
CPDF_Page* pPDFPage = new CPDF_Page;
- pPDFPage->Load( pDoc, pDict, false );
+ pPDFPage->Load( pDoc, pDict, FALSE );
pPDFPage->ParseContent();
FX_POSITION pos = pPDFPage->GetFirstObjectPosition();
@@ -64,7 +64,7 @@ bool GetContentsRect( CPDF_Document * pDoc, CPDF_Dictionary* pDict, CPDF_RectArr
}
delete pPDFPage;
- return true;
+ return TRUE;
}
@@ -217,7 +217,7 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document*
CFX_ByteString sStream;
sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str());
- pNewContents->SetData((const uint8_t*)sStream, sStream.GetLength(), false, false);
+ pNewContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE);
}
return;
}
@@ -237,7 +237,7 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document*
CFX_ByteString sStream = "q\n";
CFX_ByteString sBody = CFX_ByteString((const FX_CHAR*)acc.GetData(), acc.GetSize());
sStream = sStream + sBody + "\nQ";
- pContents->SetData((const uint8_t*)sStream, sStream.GetLength(), false, false);
+ pContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE);
pContentsArray->AddReference(pDocument, dwObjNum);
break;
}
@@ -264,7 +264,7 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document*
CFX_ByteString sStream;
sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str());
- pNewContents->SetData((const uint8_t*)sStream, sStream.GetLength(), false, false);
+ pNewContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE);
}
}
@@ -538,7 +538,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten( FPDF_PAGE page, int nFlag)
sTemp.Format("q %f 0 0 %f %f %f cm /%s Do Q\n", m.a, m.d, m.e, m.f, sFormName.c_str());
sStream += sTemp;
- pNewXObject->SetData((const uint8_t*)sStream, sStream.GetLength(), false, false);
+ pNewXObject->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE);
}
pPageDict->RemoveAt( "Annots" );
diff --git a/fpdfsdk/src/fpdf_progressive.cpp b/fpdfsdk/src/fpdf_progressive.cpp
index 0c49df6c84..4ec73ac2ba 100644
--- a/fpdfsdk/src/fpdf_progressive.cpp
+++ b/fpdfsdk/src/fpdf_progressive.cpp
@@ -29,20 +29,20 @@ DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start( FPDF_BITMAP bitmap, FPDF_PAGE
#ifdef _SKIA_SUPPORT_
pContext->m_pDevice = new CFX_SkiaDevice;
if (flags & FPDF_REVERSE_BYTE_ORDER)
- ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,true);
+ ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,TRUE);
else
((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap);
#else
pContext->m_pDevice = new CFX_FxgeDevice;
if (flags & FPDF_REVERSE_BYTE_ORDER)
- ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,true);
+ ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,TRUE);
else
((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap);
#endif
IFSDK_PAUSE_Adapter IPauseAdapter(pause);
FPDF_RenderPage_Retail(pContext, page, start_x, start_y, size_x, size_y,
- rotate, flags,false, &IPauseAdapter);
+ rotate, flags,FALSE, &IPauseAdapter);
if (pContext->m_pRenderer)
return CPDF_ProgressiveRenderer::ToFPDFStatus(pContext->m_pRenderer->GetStatus());
diff --git a/fpdfsdk/src/fpdf_sysfontinfo.cpp b/fpdfsdk/src/fpdf_sysfontinfo.cpp
index 691710798c..cf0cdd915b 100644
--- a/fpdfsdk/src/fpdf_sysfontinfo.cpp
+++ b/fpdfsdk/src/fpdf_sysfontinfo.cpp
@@ -20,16 +20,16 @@ public:
delete this;
}
- virtual bool EnumFontList(CFX_FontMapper* pMapper) override
+ virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override
{
if (m_pInfo->EnumFonts) {
m_pInfo->EnumFonts(m_pInfo, pMapper);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
- virtual void* MapFont(int weight, bool bItalic, int charset, int pitch_family, const FX_CHAR* family, int& iExact) override
+ virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, int& iExact) override
{
if (m_pInfo->MapFont)
return m_pInfo->MapFont(m_pInfo, weight, bItalic, charset, pitch_family, family, &iExact);
@@ -50,25 +50,25 @@ public:
return 0;
}
- virtual bool GetFaceName(void* hFont, CFX_ByteString& name) override
+ virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override
{
- if (m_pInfo->GetFaceName == NULL) return false;
+ if (m_pInfo->GetFaceName == NULL) return FALSE;
FX_DWORD size = m_pInfo->GetFaceName(m_pInfo, hFont, NULL, 0);
- if (size == 0) return false;
+ if (size == 0) return FALSE;
char* buffer = FX_Alloc(char, size);
size = m_pInfo->GetFaceName(m_pInfo, hFont, buffer, size);
name = CFX_ByteString(buffer, size);
FX_Free(buffer);
- return true;
+ return TRUE;
}
- virtual bool GetFontCharset(void* hFont, int& charset) override
+ virtual FX_BOOL GetFontCharset(void* hFont, int& charset) override
{
if (m_pInfo->GetFontCharset) {
charset = m_pInfo->GetFontCharset(m_pInfo, hFont);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
virtual void DeleteFont(void* hFont) override
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp
index cf17f20ddc..a29db5a9dc 100644
--- a/fpdfsdk/src/fpdf_transformpage.cpp
+++ b/fpdfsdk/src/fpdf_transformpage.cpp
@@ -42,7 +42,7 @@ DLLEXPORT void STDCALL FPDFPage_SetCropBox(FPDF_PAGE page, float left, float bot
DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetMediaBox(FPDF_PAGE page, float* left, float* bottom, float* right, float* top)
{
if(!page)
- return false;
+ return FALSE;
CPDF_Page* pPage = (CPDF_Page*)page;
CPDF_Dictionary* pPageDict = pPage->m_pFormDict;
CPDF_Array* pArray = pPageDict->GetArray("MediaBox");
@@ -52,15 +52,15 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetMediaBox(FPDF_PAGE page, float* left, fl
*bottom = pArray->GetFloat(1);
*right = pArray->GetFloat(2);
*top = pArray->GetFloat(3);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetCropBox(FPDF_PAGE page, float* left, float* bottom, float* right, float* top)
{
if(!page)
- return false;
+ return FALSE;
CPDF_Page* pPage = (CPDF_Page*)page;
CPDF_Dictionary* pPageDict = pPage->m_pFormDict;
CPDF_Array* pArray = pPageDict->GetArray("CropBox");
@@ -70,15 +70,15 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetCropBox(FPDF_PAGE page, float* left, flo
*bottom = pArray->GetFloat(1);
*right = pArray->GetFloat(2);
*top = pArray->GetFloat(3);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX* matrix, FS_RECTF* clipRect)
{
if(!page)
- return false;
+ return FALSE;
CFX_ByteTextBuf textBuf;
textBuf<<"q ";
@@ -99,19 +99,19 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX
if(!pContentObj)
pContentObj = pPageDic ? pPageDic->GetArray("Contents") : NULL;
if(!pContentObj)
- return false;
+ return FALSE;
CPDF_Dictionary* pDic = new CPDF_Dictionary;
CPDF_Stream* pStream = new CPDF_Stream(NULL,0, pDic);
- pStream->SetData(textBuf.GetBuffer(), textBuf.GetSize(), false, false);
+ pStream->SetData(textBuf.GetBuffer(), textBuf.GetSize(), FALSE, FALSE);
CPDF_Document* pDoc = pPage->m_pDocument;
if(!pDoc)
- return false;
+ return FALSE;
pDoc->AddIndirectObject(pStream);
pDic = new CPDF_Dictionary;
CPDF_Stream* pEndStream = new CPDF_Stream(NULL,0, pDic);
- pEndStream->SetData((const uint8_t*)" Q", 2, false, false);
+ pEndStream->SetData((const uint8_t*)" Q", 2, FALSE, FALSE);
pDoc->AddIndirectObject(pEndStream);
CPDF_Array* pContentArray = NULL;
@@ -181,7 +181,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX
}
}
- return true;
+ return TRUE;
}
DLLEXPORT void STDCALL FPDFPageObj_TransformClipPath(FPDF_PAGEOBJECT page_object,double a, double b, double c, double d, double e, double f)
@@ -205,7 +205,7 @@ DLLEXPORT FPDF_CLIPPATH STDCALL FPDF_CreateClipPath(float left, float bottom, fl
CPDF_Path Path;
Path.GetModify();
Path.AppendRect(left, bottom, right, top);
- pNewClipPath->AppendPath(Path, FXFILL_ALTERNATE, false);
+ pNewClipPath->AppendPath(Path, FXFILL_ALTERNATE, FALSE);
return pNewClipPath;
}
@@ -282,7 +282,7 @@ DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page,FPDF_CLIPPATH clip
}
CPDF_Dictionary* pDic = new CPDF_Dictionary;
CPDF_Stream* pStream = new CPDF_Stream(NULL,0, pDic);
- pStream->SetData(strClip.GetBuffer(), strClip.GetSize(), false, false);
+ pStream->SetData(strClip.GetBuffer(), strClip.GetSize(), FALSE, FALSE);
CPDF_Document* pDoc = pPage->m_pDocument;
if(!pDoc)
return;
diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp
index e2640697bb..f75197bdbf 100644
--- a/fpdfsdk/src/fpdfdoc.cpp
+++ b/fpdfsdk/src/fpdfdoc.cpp
@@ -208,13 +208,13 @@ DLLEXPORT FPDF_ACTION STDCALL FPDFLink_GetAction(FPDF_LINK pDict)
DLLEXPORT FPDF_BOOL STDCALL FPDFLink_Enumerate(FPDF_PAGE page, int* startPos, FPDF_LINK* linkAnnot)
{
if(!page || !startPos || !linkAnnot)
- return false;
+ return FALSE;
CPDF_Page* pPage = (CPDF_Page*)page;
if(!pPage->m_pFormDict)
- return false;
+ return FALSE;
CPDF_Array* pAnnots = pPage->m_pFormDict->GetArray("Annots");
if(!pAnnots)
- return false;
+ return FALSE;
for (int i = *startPos; i < (int)pAnnots->GetCount(); i++) {
CPDF_Dictionary* pDict = (CPDF_Dictionary*)pAnnots->GetElementValue(i);
if (!pDict || pDict->GetType() != PDFOBJ_DICTIONARY)
@@ -222,23 +222,23 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFLink_Enumerate(FPDF_PAGE page, int* startPos, FP
if(pDict->GetString(FX_BSTRC("Subtype")).Equal(FX_BSTRC("Link"))) {
*startPos = i + 1;
*linkAnnot = (FPDF_LINK)pDict;
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetAnnotRect(FPDF_LINK linkAnnot, FS_RECTF* rect)
{
if(!linkAnnot || !rect)
- return false;
+ return FALSE;
CPDF_Dictionary* pAnnotDict = (CPDF_Dictionary*)linkAnnot;
CPDF_Rect rt = pAnnotDict->GetRect(FX_BSTRC("Rect"));
rect->left = rt.left;
rect->bottom = rt.bottom;
rect->right = rt.right;
rect->top = rt.top;
- return true;
+ return TRUE;
}
DLLEXPORT int STDCALL FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot)
@@ -255,12 +255,12 @@ DLLEXPORT int STDCALL FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot)
DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot, int quadIndex, FS_QUADPOINTSF* quadPoints)
{
if(!linkAnnot || !quadPoints)
- return false;
+ return FALSE;
CPDF_Dictionary* pAnnotDict = (CPDF_Dictionary*)linkAnnot;
CPDF_Array* pArray = pAnnotDict->GetArray(FX_BSTRC("QuadPoints"));
if (pArray) {
if (quadIndex < 0 || quadIndex >= (int)pArray->GetCount()/8 || ((quadIndex*8+7) >= (int)pArray->GetCount()))
- return false;
+ return FALSE;
quadPoints->x1 = pArray->GetNumber(quadIndex*8);
quadPoints->y1 = pArray->GetNumber(quadIndex*8+1);
quadPoints->x2 = pArray->GetNumber(quadIndex*8+2);
@@ -269,9 +269,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot, int quad
quadPoints->y3 = pArray->GetNumber(quadIndex*8+5);
quadPoints->x4 = pArray->GetNumber(quadIndex*8+6);
quadPoints->y4 = pArray->GetNumber(quadIndex*8+7);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, FPDF_BYTESTRING tag,
diff --git a/fpdfsdk/src/fpdfeditimg.cpp b/fpdfsdk/src/fpdfeditimg.cpp
index cec3e2296d..96cfba4194 100644
--- a/fpdfsdk/src/fpdfeditimg.cpp
+++ b/fpdfsdk/src/fpdfeditimg.cpp
@@ -21,7 +21,7 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_NewImgeObj(FPDF_DOCUMENT document)
DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages, int nCount,FPDF_PAGEOBJECT image_object, FPDF_FILEACCESS* fileAccess)
{
if (!image_object || !fileAccess)
- return false;
+ return FALSE;
IFX_FileRead* pFile = new CPDF_CustomAccess(fileAccess);
CPDF_ImageObject* pImgObj = (CPDF_ImageObject*)image_object;
@@ -33,7 +33,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages, int nCou
}
pImgObj->m_pImage->SetJpegImage(pFile);
- return true;
+ return TRUE;
}
@@ -41,7 +41,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetMatrix (FPDF_PAGEOBJECT image_object
double a, double b, double c, double d, double e, double f)
{
if (!image_object)
- return false;
+ return FALSE;
CPDF_ImageObject* pImgObj = (CPDF_ImageObject*)image_object;
pImgObj->m_Matrix.a = (FX_FLOAT)a;
pImgObj->m_Matrix.b = (FX_FLOAT)b;
@@ -50,13 +50,13 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetMatrix (FPDF_PAGEOBJECT image_object
pImgObj->m_Matrix.e = (FX_FLOAT)e;
pImgObj->m_Matrix.f = (FX_FLOAT)f;
pImgObj->CalcBoundingBox();
- return true;
+ return TRUE;
}
DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages,int nCount,FPDF_PAGEOBJECT image_object,FPDF_BITMAP bitmap)
{
if (!image_object || !bitmap)
- return false;
+ return FALSE;
CFX_DIBitmap* pBmp = NULL;
pBmp = (CFX_DIBitmap*)bitmap;
CPDF_ImageObject* pImgObj = (CPDF_ImageObject*)image_object;
@@ -66,8 +66,8 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages,int nCount,F
CPDF_Page* pPage = (CPDF_Page*)pages[index];
pImgObj->m_pImage->ResetCache(pPage,NULL);
}
- pImgObj->m_pImage->SetImage(pBmp,false);
+ pImgObj->m_pImage->SetImage(pBmp,FALSE);
pImgObj->CalcBoundingBox();
- return true;
+ return TRUE;
}
diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/src/fpdfeditpage.cpp
index 8236cb206d..12c2cce1e2 100644
--- a/fpdfsdk/src/fpdfeditpage.cpp
+++ b/fpdfsdk/src/fpdfeditpage.cpp
@@ -215,7 +215,7 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPage_GetObject(FPDF_PAGE page, int index)
DLLEXPORT FPDF_BOOL STDCALL FPDFPage_HasTransparency(FPDF_PAGE page)
{
- if(!page) return false;
+ if(!page) return FALSE;
CPDF_Page* pPage = (CPDF_Page*)page;
return pPage->BackgroundAlphaNeeded();
@@ -223,34 +223,34 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_HasTransparency(FPDF_PAGE page)
DLLEXPORT FPDF_BOOL STDCALL FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject)
{
- if(!pageObject) return false;
+ if(!pageObject) return FALSE;
CPDF_PageObject* pPageObj = (CPDF_PageObject*)pageObject;
const CPDF_GeneralStateData* pGeneralState = pPageObj->m_GeneralState;
int blend_type = pGeneralState ? pGeneralState->m_BlendType : FXDIB_BLEND_NORMAL;
- if (blend_type != FXDIB_BLEND_NORMAL) return true;
+ if (blend_type != FXDIB_BLEND_NORMAL) return TRUE;
CPDF_Dictionary* pSMaskDict = pGeneralState ? (CPDF_Dictionary*)pGeneralState->m_pSoftMask : NULL;
- if(pSMaskDict) return true;
+ if(pSMaskDict) return TRUE;
if(pGeneralState && pGeneralState->m_FillAlpha != 1.0f)
- return true;
+ return TRUE;
if(pPageObj->m_Type == PDFPAGE_PATH)
{
if(pGeneralState && pGeneralState->m_StrokeAlpha != 1.0f)
- return true;
+ return TRUE;
}
if(pPageObj->m_Type == PDFPAGE_FORM)
{
CPDF_FormObject* pFormObj = (CPDF_FormObject*)pPageObj;
if(pFormObj->m_pForm && (pFormObj->m_pForm->m_Transparency & PDFTRANS_ISOLATED))
- return true;
+ return TRUE;
if(pFormObj->m_pForm && (!(pFormObj->m_pForm->m_Transparency & PDFTRANS_ISOLATED) && (pFormObj->m_pForm->m_Transparency & PDFTRANS_GROUP)))
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page)
@@ -259,12 +259,12 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page)
if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") || !pPage->m_pFormDict->GetElement("Type")->GetDirect()
|| pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare("Page"))
{
- return false;
+ return FALSE;
}
CPDF_PageContentGenerate CG(pPage);
CG.GenerateContent();
- return true;
+ return TRUE;
}
DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object,
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp
index 21a441ca57..d21d5d209d 100644
--- a/fpdfsdk/src/fpdfformfill.cpp
+++ b/fpdfsdk/src/fpdfformfill.cpp
@@ -28,7 +28,7 @@ CPDFSDK_InterForm* FormHandleToInterForm(FPDF_FORMHANDLE hHandle)
CPDFSDK_PageView* FormHandleToPageView(FPDF_FORMHANDLE hHandle, FPDF_PAGE page)
{
CPDFSDK_Document* pSDKDoc = FormHandleToSDKDoc(hHandle);
- return pSDKDoc ? pSDKDoc->GetPageView((CPDF_Page*)page, true) : nullptr;
+ return pSDKDoc ? pSDKDoc->GetPageView((CPDF_Page*)page, TRUE) : nullptr;
}
} // namespace
@@ -41,7 +41,7 @@ DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(
CPDF_Page* pPage = (CPDF_Page*) page;
nonstd::unique_ptr<CPDF_InterForm> pInterForm(
- new CPDF_InterForm(pPage->m_pDocument, false));
+ new CPDF_InterForm(pPage->m_pDocument, FALSE));
CPDF_FormControl* pFormCtrl = pInterForm->GetControlAtPoint(
pPage, (FX_FLOAT)page_x, (FX_FLOAT)page_y);
if (!pFormCtrl)
@@ -84,7 +84,7 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_OnMouseMove(FPDF_FORMHANDLE hHandle, FPDF_PAGE
{
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
- return false;
+ return FALSE;
CPDF_Point pt((FX_FLOAT)page_x, (FX_FLOAT)page_y);
return pPageView->OnMouseMove(pt, modifier);
@@ -94,7 +94,7 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonDown(FPDF_FORMHANDLE hHandle, FPDF_PAG
{
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
- return false;
+ return FALSE;
CPDF_Point pt((FX_FLOAT)page_x, (FX_FLOAT)page_y);
return pPageView->OnLButtonDown(pt, modifier);
@@ -104,7 +104,7 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle, FPDF_PAGE
{
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
- return false;
+ return FALSE;
CPDF_Point pt((FX_FLOAT)page_x, (FX_FLOAT)page_y);
return pPageView->OnLButtonUp(pt, modifier);
@@ -114,7 +114,7 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyDown(FPDF_FORMHANDLE hHandle, FPDF_PAGE pa
{
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
- return false;
+ return FALSE;
return pPageView->OnKeyDown(nKeyCode, modifier);
}
@@ -123,7 +123,7 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyUp(FPDF_FORMHANDLE hHandle, FPDF_PAGE page
{
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
- return false;
+ return FALSE;
return pPageView->OnKeyUp(nKeyCode, modifier);
}
@@ -132,7 +132,7 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_OnChar(FPDF_FORMHANDLE hHandle, FPDF_PAGE page,
{
CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page);
if (!pPageView)
- return false;
+ return FALSE;
return pPageView->OnChar(nChar, modifier);
}
@@ -141,7 +141,7 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle)
{
CPDFSDK_Document* pSDKDoc = FormHandleToSDKDoc(hHandle);
if (!pSDKDoc)
- return false;
+ return FALSE;
return pSDKDoc->KillFocusAnnot(0);
}
@@ -216,7 +216,7 @@ DLLEXPORT void STDCALL FPDF_RemoveFormFieldHighlight(FPDF_FORMHANDLE hHandle)
DLLEXPORT void STDCALL FORM_OnAfterLoadPage(FPDF_PAGE page, FPDF_FORMHANDLE hHandle)
{
if (CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, page))
- pPageView->SetValid(true);
+ pPageView->SetValid(TRUE);
}
DLLEXPORT void STDCALL FORM_OnBeforeClosePage(FPDF_PAGE page, FPDF_FORMHANDLE hHandle)
@@ -229,10 +229,10 @@ DLLEXPORT void STDCALL FORM_OnBeforeClosePage(FPDF_PAGE page, FPDF_FORMHANDLE hH
return;
CPDF_Page* pPage = (CPDF_Page*)page;
- CPDFSDK_PageView* pPageView = pSDKDoc->GetPageView(pPage, false);
+ CPDFSDK_PageView* pPageView = pSDKDoc->GetPageView(pPage, FALSE);
if (pPageView)
{
- pPageView->SetValid(false);
+ pPageView->SetValid(FALSE);
// ReMovePageView() takes care of the delete for us.
pSDKDoc->ReMovePageView(pPage);
}
@@ -279,7 +279,7 @@ DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page, FPDF_FORMHANDLE hHandl
return;
CPDFSDK_Document* pSDKDoc = ((CPDFDoc_Environment*)hHandle)->GetSDKDocument();
CPDF_Page* pPage = (CPDF_Page*)page;
- CPDFSDK_PageView* pPageView = pSDKDoc->GetPageView(pPage, false);
+ CPDFSDK_PageView* pPageView = pSDKDoc->GetPageView(pPage, FALSE);
if(pPageView)
{
CPDFDoc_Environment *pEnv = pSDKDoc->GetEnv();
@@ -293,8 +293,8 @@ DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page, FPDF_FORMHANDLE hHandl
CPDF_AAction aa = pPageDict->GetDict(FX_BSTRC("AA"));
- bool bExistOAAction = false;
- bool bExistCAAction = false;
+ FX_BOOL bExistOAAction = FALSE;
+ FX_BOOL bExistCAAction = FALSE;
if (FPDFPAGE_AACTION_OPEN == aaType)
{
bExistOAAction = aa.ActionExist(CPDF_AAction::OpenPage);
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index 1ef69bf032..40d56b304d 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -15,14 +15,14 @@ public:
CPDF_PageOrganizer();
~CPDF_PageOrganizer();
- bool PDFDocInit(CPDF_Document* pDestPDFDoc, CPDF_Document* pSrcPDFDoc);
- bool ExportPage(CPDF_Document* pSrcPDFDoc,
+ FX_BOOL PDFDocInit(CPDF_Document* pDestPDFDoc, CPDF_Document* pSrcPDFDoc);
+ FX_BOOL ExportPage(CPDF_Document* pSrcPDFDoc,
CFX_WordArray* nPageNum,
CPDF_Document* pDestPDFDoc,
int nIndex);
CPDF_Object* PageDictGetInheritableTag(CPDF_Dictionary* pDict,
CFX_ByteString nSrctag);
- bool UpdateReference(CPDF_Object* pObj,
+ FX_BOOL UpdateReference(CPDF_Object* pObj,
CPDF_Document* pDoc,
ObjectNumberMap* pObjNumberMap);
FX_DWORD GetNewObjId(CPDF_Document* pDoc,
@@ -39,21 +39,21 @@ CPDF_PageOrganizer::~CPDF_PageOrganizer()
{
}
-bool CPDF_PageOrganizer::PDFDocInit(CPDF_Document* pDestPDFDoc,
+FX_BOOL CPDF_PageOrganizer::PDFDocInit(CPDF_Document* pDestPDFDoc,
CPDF_Document* pSrcPDFDoc)
{
if (!pDestPDFDoc || !pSrcPDFDoc)
- return false;
+ return FALSE;
CPDF_Dictionary* pNewRoot = pDestPDFDoc->GetRoot();
if (!pNewRoot)
- return false;
+ return FALSE;
//Set the document information////////////////////////////////////////////
CPDF_Dictionary* DInfoDict = pDestPDFDoc->GetInfo();
if (!DInfoDict)
- return false;
+ return FALSE;
CFX_ByteString producerstr;
producerstr.Format("PDFium");
@@ -89,10 +89,10 @@ bool CPDF_PageOrganizer::PDFDocInit(CPDF_Document* pDestPDFDoc,
pNewPages->SetAt("Count", new CPDF_Number(0));
}
- return true;
+ return TRUE;
}
-bool CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc,
+FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc,
CFX_WordArray* nPageNum,
CPDF_Document* pDestPDFDoc,
int nIndex)
@@ -106,7 +106,7 @@ bool CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc,
CPDF_Dictionary* pSrcPageDict =
pSrcPDFDoc->GetPage(nPageNum->GetAt(i) - 1);
if (!pSrcPageDict || !pCurPageDict)
- return false;
+ return FALSE;
// Clone the page dictionary///////////
FX_POSITION SrcPos = pSrcPageDict->GetStartPos();
@@ -151,7 +151,7 @@ bool CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc,
if (!pCurPageDict->KeyExist("Resources")) {
pInheritable = PageDictGetInheritableTag(pSrcPageDict, "Resources");
if (!pInheritable)
- return false;
+ return FALSE;
pCurPageDict->SetAt("Resources", pInheritable->Clone());
}
//3 CropBox //Optional
@@ -178,7 +178,7 @@ bool CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc,
++curpage;
}
- return true;
+ return TRUE;
}
CPDF_Object* CPDF_PageOrganizer::PageDictGetInheritableTag(
@@ -220,7 +220,7 @@ CPDF_Object* CPDF_PageOrganizer::PageDictGetInheritableTag(
return nullptr;
}
-bool CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj,
+FX_BOOL CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj,
CPDF_Document* pDoc,
ObjectNumberMap* pObjNumberMap)
{
@@ -229,7 +229,7 @@ bool CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj,
CPDF_Reference* pReference = (CPDF_Reference*)pObj;
FX_DWORD newobjnum = GetNewObjId(pDoc, pObjNumberMap, pReference);
if (newobjnum == 0)
- return false;
+ return FALSE;
pReference->SetRef(pDoc, newobjnum);
break;
}
@@ -249,7 +249,7 @@ bool CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj,
if (!UpdateReference(pNextObj, pDoc, pObjNumberMap))
pDict->RemoveAt(key);
} else {
- return false;
+ return FALSE;
}
}
break;
@@ -260,9 +260,9 @@ bool CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj,
for (FX_DWORD i = 0; i < count; ++i) {
CPDF_Object* pNextObj = pArray->GetElement(i);
if (!pNextObj)
- return false;
+ return FALSE;
if (!UpdateReference(pNextObj, pDoc, pObjNumberMap))
- return false;
+ return FALSE;
}
break;
}
@@ -271,9 +271,9 @@ bool CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj,
CPDF_Dictionary* pDict = pStream->GetDict();
if (pDict) {
if (!UpdateReference(pDict, pDoc, pObjNumberMap))
- return false;
+ return FALSE;
} else {
- return false;
+ return FALSE;
}
break;
}
@@ -281,7 +281,7 @@ bool CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj,
break;
}
- return true;
+ return TRUE;
}
FX_DWORD CPDF_PageOrganizer::GetNewObjId(CPDF_Document* pDoc,
@@ -341,7 +341,7 @@ FPDF_BOOL ParserPageRangeString(CFX_ByteString rangstring,
CFX_ByteString cbCompareString("0123456789-,");
for (int i = 0; i < nLength; ++i) {
if (cbCompareString.Find(rangstring[i]) == -1)
- return false;
+ return FALSE;
}
CFX_ByteString cbMidRange;
int nStringFrom = 0;
@@ -355,23 +355,23 @@ FPDF_BOOL ParserPageRangeString(CFX_ByteString rangstring,
if (nMid == -1) {
long lPageNum = atol(cbMidRange);
if (lPageNum <= 0 || lPageNum > nCount)
- return false;
+ return FALSE;
pageArray->Add((FX_WORD)lPageNum);
} else {
int nStartPageNum = atol(cbMidRange.Mid(0, nMid));
if (nStartPageNum == 0)
- return false;
+ return FALSE;
++nMid;
int nEnd = cbMidRange.GetLength() - nMid;
if (nEnd == 0)
- return false;
+ return FALSE;
int nEndPageNum = atol(cbMidRange.Mid(nMid, nEnd));
if (nStartPageNum < 0 ||
nStartPageNum >nEndPageNum ||
nEndPageNum > nCount) {
- return false;
+ return FALSE;
}
for (int i = nStartPageNum; i <= nEndPageNum; ++i) {
pageArray->Add(i);
@@ -380,7 +380,7 @@ FPDF_BOOL ParserPageRangeString(CFX_ByteString rangstring,
nStringFrom = nStringTo + 1;
}
}
- return true;
+ return TRUE;
}
DLLEXPORT FPDF_BOOL STDCALL FPDF_ImportPages(FPDF_DOCUMENT dest_doc,
@@ -389,14 +389,14 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_ImportPages(FPDF_DOCUMENT dest_doc,
int index)
{
if (!dest_doc || !src_doc)
- return false;
+ return FALSE;
CFX_WordArray pageArray;
CPDF_Document* pSrcDoc = (CPDF_Document*)src_doc;
int nCount = pSrcDoc->GetPageCount();
if (pagerange) {
if (!ParserPageRangeString(pagerange,&pageArray,nCount))
- return false;
+ return FALSE;
} else {
for (int i = 1; i <= nCount; ++i) {
pageArray.Add(i);
@@ -421,12 +421,12 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_CopyViewerPreferences(FPDF_DOCUMENT dest_doc,
CPDF_Dictionary* pSrcDict = pSrcDoc->GetRoot();
pSrcDict = pSrcDict->GetDict(FX_BSTRC("ViewerPreferences"));;
if (!pSrcDict)
- return false;
+ return FALSE;
CPDF_Document* pDstDoc = (CPDF_Document*)dest_doc;
CPDF_Dictionary* pDstDict = pDstDoc->GetRoot();
if (!pDstDict)
- return false;
- pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(true));
- return true;
+ return FALSE;
+ pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE));
+ return TRUE;
}
diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp
index 8e5e476ca2..ddd6f6e90e 100644
--- a/fpdfsdk/src/fpdfsave.cpp
+++ b/fpdfsdk/src/fpdfsave.cpp
@@ -19,8 +19,8 @@ class CFX_IFileWrite final : public IFX_StreamWrite
public:
CFX_IFileWrite();
- bool Init( FPDF_FILEWRITE * pFileWriteStruct );
- virtual bool WriteBlock(const void* pData, size_t size) override;
+ FX_BOOL Init( FPDF_FILEWRITE * pFileWriteStruct );
+ virtual FX_BOOL WriteBlock(const void* pData, size_t size) override;
virtual void Release() override {}
protected:
@@ -32,22 +32,22 @@ CFX_IFileWrite::CFX_IFileWrite()
m_pFileWriteStruct = NULL;
}
-bool CFX_IFileWrite::Init( FPDF_FILEWRITE * pFileWriteStruct )
+FX_BOOL CFX_IFileWrite::Init( FPDF_FILEWRITE * pFileWriteStruct )
{
if (!pFileWriteStruct)
- return false;
+ return FALSE;
m_pFileWriteStruct = pFileWriteStruct;
- return true;
+ return TRUE;
}
-bool CFX_IFileWrite::WriteBlock(const void* pData, size_t size)
+FX_BOOL CFX_IFileWrite::WriteBlock(const void* pData, size_t size)
{
if (!m_pFileWriteStruct)
- return false;
+ return FALSE;
m_pFileWriteStruct->WriteBlock( m_pFileWriteStruct, pData, size );
- return true;
+ return TRUE;
}
FPDF_BOOL _FPDF_Doc_Save(FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,FPDF_DWORD flags, FPDF_BOOL bSetVersion,
@@ -71,7 +71,7 @@ FPDF_BOOL _FPDF_Doc_Save(FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,FPDF
FileMaker.RemoveSecurity();
}
CFX_IFileWrite* pStreamWrite = NULL;
- bool bRet;
+ FX_BOOL bRet;
pStreamWrite = new CFX_IFileWrite;
pStreamWrite->Init( pFileWrite );
bRet = FileMaker.Create(pStreamWrite, flags);
@@ -82,12 +82,12 @@ FPDF_BOOL _FPDF_Doc_Save(FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,FPDF
DLLEXPORT FPDF_BOOL STDCALL FPDF_SaveAsCopy( FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,
FPDF_DWORD flags )
{
- return _FPDF_Doc_Save(document, pFileWrite, flags, false , 0);
+ return _FPDF_Doc_Save(document, pFileWrite, flags, FALSE , 0);
}
DLLEXPORT FPDF_BOOL STDCALL FPDF_SaveWithVersion( FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,
FPDF_DWORD flags, int fileVersion)
{
- return _FPDF_Doc_Save(document, pFileWrite, flags, true , fileVersion);
+ return _FPDF_Doc_Save(document, pFileWrite, flags, TRUE , fileVersion);
}
diff --git a/fpdfsdk/src/fpdftext.cpp b/fpdfsdk/src/fpdftext.cpp
index 4fecef4452..4a6571531c 100644
--- a/fpdfsdk/src/fpdftext.cpp
+++ b/fpdfsdk/src/fpdftext.cpp
@@ -154,13 +154,13 @@ DLLEXPORT FPDF_SCHHANDLE STDCALL FPDFText_FindStart(FPDF_TEXTPAGE text_page,FPDF
}
DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindNext(FPDF_SCHHANDLE handle)
{
- if (!handle) return false;
+ if (!handle) return FALSE;
IPDF_TextPageFind* textpageFind=(IPDF_TextPageFind*)handle;
return textpageFind->FindNext();
}
DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindPrev(FPDF_SCHHANDLE handle)
{
- if (!handle) return false;
+ if (!handle) return FALSE;
IPDF_TextPageFind* textpageFind=(IPDF_TextPageFind*)handle;
return textpageFind->FindPrev();
}
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 5a72e8ff14..9edd5d90ec 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -21,15 +21,15 @@ CPDF_CustomAccess::CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess)
m_FileAccess = *pFileAccess;
}
-bool CPDF_CustomAccess::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
+FX_BOOL CPDF_CustomAccess::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
{
if (offset < 0) {
- return false;
+ return FALSE;
}
FX_SAFE_FILESIZE newPos = pdfium::base::checked_cast<FX_FILESIZE, size_t>(size);
newPos += offset;
if (!newPos.IsValid() || newPos.ValueOrDie() > m_FileAccess.m_FileLen) {
- return false;
+ return FALSE;
}
return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, offset,(uint8_t*) buffer, size);
}
@@ -59,9 +59,9 @@ FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy)
switch(policy)
{
case FPDF_POLICY_MACHINETIME_ACCESS:
- return (foxit_sandbox_policy & 0x01) ? true : false;
+ return (foxit_sandbox_policy & 0x01) ? TRUE : FALSE;
default:
- return false;
+ return FALSE;
}
}
@@ -81,11 +81,11 @@ public:
virtual FT_Face FindSubstFont(
CPDF_Document* pDoc, // [IN] The PDF document
const CFX_ByteString& face_name, // [IN] Original name
- bool bTrueType, // [IN] TrueType or Type1
+ FX_BOOL bTrueType, // [IN] TrueType or Type1
FX_DWORD flags, // [IN] PDF font flags (see PDF Reference section 5.7.1)
int font_weight, // [IN] original font weight. 0 for not specified
int CharsetCP, // [IN] code page for charset (see Win32 GetACP())
- bool bVertical,
+ FX_BOOL bVertical,
CPDF_SubstFont* pSubstFont // [OUT] Subst font data
);
@@ -191,18 +191,18 @@ public:
virtual void Release() {delete this;}
virtual FX_FILESIZE GetSize() {return m_size;}
- virtual bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
+ virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
{
if (offset < 0) {
- return false;
+ return FALSE;
}
FX_SAFE_FILESIZE newPos = pdfium::base::checked_cast<FX_FILESIZE, size_t>(size);
newPos += offset;
if (!newPos.IsValid() || newPos.ValueOrDie() > (FX_DWORD)m_size) {
- return false;
+ return FALSE;
}
FXSYS_memcpy(buffer, m_pBuf+offset, size);
- return true;
+ return TRUE;
}
private:
uint8_t* m_pBuf;
@@ -244,14 +244,14 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadCustomDocument(FPDF_FILEACCESS* pFileAc
DLLEXPORT FPDF_BOOL STDCALL FPDF_GetFileVersion(FPDF_DOCUMENT doc, int* fileVersion)
{
- if(!doc||!fileVersion) return false;
+ if(!doc||!fileVersion) return FALSE;
*fileVersion = 0;
CPDF_Document* pDoc = (CPDF_Document*)doc;
CPDF_Parser* pParser = (CPDF_Parser*)pDoc->GetParser();
if(!pParser)
- return false;
+ return FALSE;
*fileVersion = pParser->GetFileVersion();
- return true;
+ return TRUE;
}
// jabdelmalek: changed return type from FX_DWORD to build on Linux (and match header).
@@ -332,7 +332,7 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int
#ifndef _WIN32_WCE
CFX_DIBitmap* pBitmap = NULL;
- bool bBackgroundAlphaNeeded=false;
+ FX_BOOL bBackgroundAlphaNeeded=FALSE;
bBackgroundAlphaNeeded = pPage->BackgroundAlphaNeeded();
if (bBackgroundAlphaNeeded)
{
@@ -352,7 +352,7 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int
pContext->m_pDevice = new CFX_WindowsDevice(dc);
FPDF_RenderPage_Retail(pContext, page, start_x, start_y, size_x, size_y,
- rotate, flags, true, NULL);
+ rotate, flags, TRUE, NULL);
if (bBackgroundAlphaNeeded)
{
@@ -366,7 +366,7 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int
int pitch = pBitmap->GetPitch();
pDst->Create(size_x, size_y, FXDIB_Rgb32);
FXSYS_memset(pDst->GetBuffer(), -1, pitch*size_y);
- pDst->CompositeBitmap(0, 0, size_x, size_y, pBitmap, 0, 0, FXDIB_BLEND_NORMAL, NULL, false, NULL);
+ pDst->CompositeBitmap(0, 0, size_x, size_y, pBitmap, 0, 0, FXDIB_BLEND_NORMAL, NULL, FALSE, NULL);
WinDC.StretchDIBits(pDst,0,0,size_x,size_y);
delete pDst;
}
@@ -492,20 +492,20 @@ DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page,
pContext->m_pDevice = new CFX_SkiaDevice;
if (flags & FPDF_REVERSE_BYTE_ORDER)
- ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,true);
+ ((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,TRUE);
else
((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap);
#else
pContext->m_pDevice = new CFX_FxgeDevice;
if (flags & FPDF_REVERSE_BYTE_ORDER)
- ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,true);
+ ((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap,0,TRUE);
else
((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap);
#endif
FPDF_RenderPage_Retail(pContext, page, start_x, start_y, size_x, size_y,
- rotate, flags, true, NULL);
+ rotate, flags, TRUE, NULL);
delete pContext;
pPage->RemovePrivateData((void*)1);
@@ -653,7 +653,7 @@ DLLEXPORT void STDCALL FPDFBitmap_Destroy(FPDF_BITMAP bitmap)
}
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,bool bNeedToRestore, IFSDK_PAUSE_Adapter * pause )
+ int rotate, int flags,FX_BOOL bNeedToRestore, IFSDK_PAUSE_Adapter * pause )
{
CPDF_Page* pPage = (CPDF_Page*)page;
if (pPage == NULL) return;
@@ -705,8 +705,8 @@ void FPDF_RenderPage_Retail(CRenderContext* pContext, FPDF_PAGE page, int start_
if (flags & FPDF_ANNOT) {
pContext->m_pAnnots = new CPDF_AnnotList(pPage);
- bool bPrinting = pContext->m_pDevice->GetDeviceClass() != FXDC_DISPLAY;
- pContext->m_pAnnots->DisplayAnnots(pPage, pContext->m_pContext, bPrinting, &matrix, true, NULL);
+ FX_BOOL bPrinting = pContext->m_pDevice->GetDeviceClass() != FXDC_DISPLAY;
+ pContext->m_pAnnots->DisplayAnnots(pPage, pContext->m_pContext, bPrinting, &matrix, TRUE, NULL);
}
pContext->m_pRenderer = new CPDF_ProgressiveRenderer(
@@ -720,23 +720,23 @@ DLLEXPORT int STDCALL FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document, int page_i
{
CPDF_Document* pDoc = (CPDF_Document*)document;
if(pDoc == NULL)
- return false;
+ return FALSE;
CPDF_Dictionary* pDict = pDoc->GetPage(page_index);
- if (pDict == NULL) return false;
+ if (pDict == NULL) return FALSE;
CPDF_Page page;
page.Load(pDoc, pDict);
*width = page.GetPageWidth();
*height = page.GetPageHeight();
- return true;
+ return TRUE;
}
DLLEXPORT FPDF_BOOL STDCALL FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT document)
{
CPDF_Document* pDoc = (CPDF_Document*)document;
- if (!pDoc) return true;
+ if (!pDoc) return TRUE;
CPDF_ViewerPreferences viewRef(pDoc);
return viewRef.PrintScaling();
}
diff --git a/fpdfsdk/src/fsdk_actionhandler.cpp b/fpdfsdk/src/fsdk_actionhandler.cpp
index 7ba227f0c2..145559e057 100644
--- a/fpdfsdk/src/fsdk_actionhandler.cpp
+++ b/fpdfsdk/src/fsdk_actionhandler.cpp
@@ -24,14 +24,14 @@ void CPDFSDK_ActionHandler::SetMediaActionHandler(CPDFSDK_MediaActionHandler* pH
}
//document open
-bool CPDFSDK_ActionHandler::DoAction_DocOpen(const CPDF_Action& action, CPDFSDK_Document* pDocument)
+FX_BOOL CPDFSDK_ActionHandler::DoAction_DocOpen(const CPDF_Action& action, CPDFSDK_Document* pDocument)
{
CFX_PtrList list;
return ExecuteDocumentOpenAction(action, pDocument, list);
}
//document open
-bool CPDFSDK_ActionHandler::DoAction_JavaScript(const CPDF_Action& JsAction,CFX_WideString csJSName,
+FX_BOOL CPDFSDK_ActionHandler::DoAction_JavaScript(const CPDF_Action& JsAction,CFX_WideString csJSName,
CPDFSDK_Document* pDocument)
{
if (JsAction.GetType() == CPDF_Action::JavaScript)
@@ -40,14 +40,14 @@ bool CPDFSDK_ActionHandler::DoAction_JavaScript(const CPDF_Action& JsAction,CFX_
if (!swJS.IsEmpty())
{
RunDocumentOpenJavaScript(pDocument, csJSName, swJS);
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_ActionHandler::DoAction_FieldJavaScript(const CPDF_Action& JsAction, CPDF_AAction::AActionType type,
+FX_BOOL CPDFSDK_ActionHandler::DoAction_FieldJavaScript(const CPDF_Action& JsAction, CPDF_AAction::AActionType type,
CPDFSDK_Document* pDocument, CPDF_FormField* pFormField,
PDFSDK_FieldAction& data)
{
@@ -59,48 +59,48 @@ bool CPDFSDK_ActionHandler::DoAction_FieldJavaScript(const CPDF_Action& JsAction
if (!swJS.IsEmpty())
{
RunFieldJavaScript(pDocument, pFormField, type, data, swJS);
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_ActionHandler::DoAction_Page(const CPDF_Action& action, enum CPDF_AAction::AActionType eType,
+FX_BOOL CPDFSDK_ActionHandler::DoAction_Page(const CPDF_Action& action, enum CPDF_AAction::AActionType eType,
CPDFSDK_Document* pDocument)
{
CFX_PtrList list;
return ExecuteDocumentPageAction(action, eType, pDocument, list);
}
-bool CPDFSDK_ActionHandler::DoAction_Document(const CPDF_Action& action, enum CPDF_AAction::AActionType eType,
+FX_BOOL CPDFSDK_ActionHandler::DoAction_Document(const CPDF_Action& action, enum CPDF_AAction::AActionType eType,
CPDFSDK_Document* pDocument)
{
CFX_PtrList list;
return ExecuteDocumentPageAction(action, eType, pDocument, list);
}
-bool CPDFSDK_ActionHandler::DoAction_BookMark(CPDF_Bookmark *pBookMark, const CPDF_Action& action, CPDF_AAction::AActionType type,
+FX_BOOL CPDFSDK_ActionHandler::DoAction_BookMark(CPDF_Bookmark *pBookMark, const CPDF_Action& action, CPDF_AAction::AActionType type,
CPDFSDK_Document* pDocument)
{
CFX_PtrList list;
return ExecuteBookMark(action, pDocument, pBookMark, list);
}
-bool CPDFSDK_ActionHandler::DoAction_Screen(const CPDF_Action& action, CPDF_AAction::AActionType type,
+FX_BOOL CPDFSDK_ActionHandler::DoAction_Screen(const CPDF_Action& action, CPDF_AAction::AActionType type,
CPDFSDK_Document* pDocument, CPDFSDK_Annot* pScreen)
{
CFX_PtrList list;
return ExecuteScreenAction(action, type, pDocument, pScreen, list);
}
-bool CPDFSDK_ActionHandler::DoAction_Link(const CPDF_Action& action,
+FX_BOOL CPDFSDK_ActionHandler::DoAction_Link(const CPDF_Action& action,
CPDFSDK_Document* pDocument)
{
CFX_PtrList list;
return ExecuteLinkAction(action, pDocument, list);
}
-bool CPDFSDK_ActionHandler::DoAction_Field(const CPDF_Action& action, CPDF_AAction::AActionType type,
+FX_BOOL CPDFSDK_ActionHandler::DoAction_Field(const CPDF_Action& action, CPDF_AAction::AActionType type,
CPDFSDK_Document* pDocument,
CPDF_FormField* pFormField, PDFSDK_FieldAction& data)
{
@@ -108,12 +108,12 @@ bool CPDFSDK_ActionHandler::DoAction_Field(const CPDF_Action& action, CPDF_AActi
return ExecuteFieldAction(action, type, pDocument, pFormField, data, list);
}
-bool CPDFSDK_ActionHandler::ExecuteDocumentOpenAction(const CPDF_Action& action, CPDFSDK_Document* pDocument,
+FX_BOOL CPDFSDK_ActionHandler::ExecuteDocumentOpenAction(const CPDF_Action& action, CPDFSDK_Document* pDocument,
CFX_PtrList& list)
{
CPDF_Dictionary* pDict = action.GetDict();
if (list.Find(pDict))
- return false;
+ return FALSE;
list.AddTail(pDict);
@@ -138,20 +138,20 @@ bool CPDFSDK_ActionHandler::ExecuteDocumentOpenAction(const CPDF_Action& action,
for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
{
CPDF_Action subaction = action.GetSubAction(i);
- if (!ExecuteDocumentOpenAction(subaction, pDocument, list)) return false;
+ if (!ExecuteDocumentOpenAction(subaction, pDocument, list)) return FALSE;
}
- return true;
+ return TRUE;
}
-bool CPDFSDK_ActionHandler::ExecuteLinkAction(const CPDF_Action& action, CPDFSDK_Document* pDocument,
+FX_BOOL CPDFSDK_ActionHandler::ExecuteLinkAction(const CPDF_Action& action, CPDFSDK_Document* pDocument,
CFX_PtrList& list)
{
ASSERT(pDocument != NULL);
CPDF_Dictionary* pDict = action.GetDict();
if (list.Find(pDict))
- return false;
+ return FALSE;
list.AddTail(pDict);
@@ -175,7 +175,7 @@ bool CPDFSDK_ActionHandler::ExecuteLinkAction(const CPDF_Action& action, CPDFSDK
pContext->OnLink_MouseUp(pDocument);
CFX_WideString csInfo;
- bool bRet = pContext->RunScript(swJS, csInfo);
+ FX_BOOL bRet = pContext->RunScript(swJS, csInfo);
if (!bRet)
{
// FIXME: return error.
@@ -193,20 +193,20 @@ bool CPDFSDK_ActionHandler::ExecuteLinkAction(const CPDF_Action& action, CPDFSDK
for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
{
CPDF_Action subaction = action.GetSubAction(i);
- if (!ExecuteLinkAction(subaction, pDocument, list)) return false;
+ if (!ExecuteLinkAction(subaction, pDocument, list)) return FALSE;
}
- return true;
+ return TRUE;
}
-bool CPDFSDK_ActionHandler::ExecuteDocumentPageAction(const CPDF_Action& action, CPDF_AAction::AActionType type,
+FX_BOOL CPDFSDK_ActionHandler::ExecuteDocumentPageAction(const CPDF_Action& action, CPDF_AAction::AActionType type,
CPDFSDK_Document* pDocument, CFX_PtrList& list)
{
ASSERT(pDocument != NULL);
CPDF_Dictionary* pDict = action.GetDict();
if (list.Find(pDict))
- return false;
+ return FALSE;
list.AddTail(pDict);
@@ -229,18 +229,18 @@ bool CPDFSDK_ActionHandler::ExecuteDocumentPageAction(const CPDF_Action& action,
}
if (!IsValidDocView(pDocument))
- return false;
+ return FALSE;
for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
{
CPDF_Action subaction = action.GetSubAction(i);
- if (!ExecuteDocumentPageAction(subaction, type, pDocument, list)) return false;
+ if (!ExecuteDocumentPageAction(subaction, type, pDocument, list)) return FALSE;
}
- return true;
+ return TRUE;
}
-bool CPDFSDK_ActionHandler::IsValidField(CPDFSDK_Document* pDocument, CPDF_Dictionary* pFieldDict)
+FX_BOOL CPDFSDK_ActionHandler::IsValidField(CPDFSDK_Document* pDocument, CPDF_Dictionary* pFieldDict)
{
ASSERT(pDocument != NULL);
ASSERT(pFieldDict != NULL);
@@ -254,7 +254,7 @@ bool CPDFSDK_ActionHandler::IsValidField(CPDFSDK_Document* pDocument, CPDF_Dicti
return pPDFInterForm->GetFieldByDict(pFieldDict) != NULL;
}
-bool CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPDF_AAction::AActionType type,
+FX_BOOL CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPDF_AAction::AActionType type,
CPDFSDK_Document* pDocument, CPDF_FormField* pFormField,
PDFSDK_FieldAction& data, CFX_PtrList& list)
{
@@ -262,7 +262,7 @@ bool CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPDF_A
CPDF_Dictionary* pDict = action.GetDict();
if (list.Find(pDict))
- return false;
+ return FALSE;
list.AddTail(pDict);
@@ -277,7 +277,7 @@ bool CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPDF_A
{
RunFieldJavaScript(pDocument, pFormField, type, data, swJS);
if (!IsValidField(pDocument, pFormField->GetFieldDict()))
- return false;
+ return FALSE;
}
}
}
@@ -289,20 +289,20 @@ bool CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPDF_A
for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
{
CPDF_Action subaction = action.GetSubAction(i);
- if (!ExecuteFieldAction(subaction, type, pDocument, pFormField, data, list)) return false;
+ if (!ExecuteFieldAction(subaction, type, pDocument, pFormField, data, list)) return FALSE;
}
- return true;
+ return TRUE;
}
-bool CPDFSDK_ActionHandler::ExecuteScreenAction(const CPDF_Action& action, CPDF_AAction::AActionType type,
+FX_BOOL CPDFSDK_ActionHandler::ExecuteScreenAction(const CPDF_Action& action, CPDF_AAction::AActionType type,
CPDFSDK_Document* pDocument, CPDFSDK_Annot* pScreen, CFX_PtrList& list)
{
ASSERT(pDocument != NULL);
CPDF_Dictionary* pDict = action.GetDict();
if (list.Find(pDict))
- return false;
+ return FALSE;
list.AddTail(pDict);
@@ -356,12 +356,12 @@ bool CPDFSDK_ActionHandler::ExecuteScreenAction(const CPDF_Action& action, CPDF_
// pContext->OnScreen_OutView(IsCTRLpressed(), IsSHIFTpressed(), pScreen);
// break;
// default:
- // ASSERT(false);
+ // ASSERT(FALSE);
// break;
// }
CFX_WideString csInfo;
- bool bRet = pContext->RunScript(swJS, csInfo);
+ FX_BOOL bRet = pContext->RunScript(swJS, csInfo);
if (!bRet)
{
//CBCL_FormNotify::MsgBoxJSError(pPageView->GetPageViewWnd(), csInfo);
@@ -379,20 +379,20 @@ bool CPDFSDK_ActionHandler::ExecuteScreenAction(const CPDF_Action& action, CPDF_
for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
{
CPDF_Action subaction = action.GetSubAction(i);
- if (!ExecuteScreenAction(subaction, type, pDocument, pScreen, list)) return false;
+ if (!ExecuteScreenAction(subaction, type, pDocument, pScreen, list)) return FALSE;
}
- return true;
+ return TRUE;
}
-bool CPDFSDK_ActionHandler::ExecuteBookMark(const CPDF_Action& action, CPDFSDK_Document* pDocument,
+FX_BOOL CPDFSDK_ActionHandler::ExecuteBookMark(const CPDF_Action& action, CPDFSDK_Document* pDocument,
CPDF_Bookmark* pBookmark, CFX_PtrList& list)
{
ASSERT(pDocument != NULL);
CPDF_Dictionary* pDict = action.GetDict();
if (list.Find(pDict))
- return false;
+ return FALSE;
list.AddTail(pDict);
@@ -416,7 +416,7 @@ bool CPDFSDK_ActionHandler::ExecuteBookMark(const CPDF_Action& action, CPDFSDK_D
pContext->OnBookmark_MouseUp(pBookmark);
CFX_WideString csInfo;
- bool bRet = pContext->RunScript(swJS, csInfo);
+ FX_BOOL bRet = pContext->RunScript(swJS, csInfo);
if (!bRet)
{
//CBCL_FormNotify::MsgBoxJSError(pPageView->GetPageViewWnd(), csInfo);
@@ -434,10 +434,10 @@ bool CPDFSDK_ActionHandler::ExecuteBookMark(const CPDF_Action& action, CPDFSDK_D
for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
{
CPDF_Action subaction = action.GetSubAction(i);
- if (!ExecuteBookMark(subaction, pDocument, pBookmark, list)) return false;
+ if (!ExecuteBookMark(subaction, pDocument, pBookmark, list)) return FALSE;
}
- return true;
+ return TRUE;
}
void CPDFSDK_ActionHandler::DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Document* pDocument)
@@ -502,7 +502,7 @@ void CPDFSDK_ActionHandler::DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Doc
}
break;
case CPDF_Action::JavaScript:
- ASSERT(false);
+ ASSERT(FALSE);
break;
case CPDF_Action::SetOCGState:
DoAction_SetOCGState(pDocument, action);
@@ -522,10 +522,10 @@ void CPDFSDK_ActionHandler::DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Doc
}
}
-bool CPDFSDK_ActionHandler::IsValidDocView(CPDFSDK_Document* pDocument)
+FX_BOOL CPDFSDK_ActionHandler::IsValidDocView(CPDFSDK_Document* pDocument)
{
ASSERT(pDocument != NULL);
- return true;
+ return TRUE;
}
void CPDFSDK_ActionHandler::DoAction_GoTo(CPDFSDK_Document* pDocument,
@@ -639,12 +639,12 @@ void CPDFSDK_ActionHandler::RunFieldJavaScript(CPDFSDK_Document* pDocument, CPDF
data.bShift, pFormField, data.sValue, data.bRC);
break;
default:
- ASSERT(false);
+ ASSERT(FALSE);
break;
}
CFX_WideString csInfo;
- bool bRet = pContext->RunScript(script, csInfo);
+ FX_BOOL bRet = pContext->RunScript(script, csInfo);
if (!bRet)
{
//CBCL_FormNotify::MsgBoxJSError(pPageView->GetPageViewWnd(), csInfo);
@@ -668,7 +668,7 @@ void CPDFSDK_ActionHandler::RunDocumentOpenJavaScript(CPDFSDK_Document* pDocumen
pContext->OnDoc_Open(pDocument, sScriptName);
CFX_WideString csInfo;
- bool bRet = pContext->RunScript(script, csInfo);
+ FX_BOOL bRet = pContext->RunScript(script, csInfo);
if (!bRet)
{
//CBCL_FormNotify::MsgBoxJSError(pPageView->GetPageViewWnd(), csInfo);
@@ -719,12 +719,12 @@ void CPDFSDK_ActionHandler::RunDocumentPageJavaScript(CPDFSDK_Document* pDocumen
pContext->OnPage_OutView(pDocument);
break;
default:
- ASSERT(false);
+ ASSERT(FALSE);
break;
}
CFX_WideString csInfo;
- bool bRet = pContext->RunScript(script, csInfo);
+ FX_BOOL bRet = pContext->RunScript(script, csInfo);
if (!bRet)
{
//CBCL_FormNotify::MsgBoxJSError(pPageView->GetPageViewWnd(), csInfo);
@@ -734,7 +734,7 @@ void CPDFSDK_ActionHandler::RunDocumentPageJavaScript(CPDFSDK_Document* pDocumen
}
-bool CPDFSDK_FormActionHandler::DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument)
+FX_BOOL CPDFSDK_FormActionHandler::DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument)
{
ASSERT(pDocument != NULL);
@@ -744,13 +744,13 @@ bool CPDFSDK_FormActionHandler::DoAction_Hide(const CPDF_Action& action, CPDFSDK
if (pInterForm->DoAction_Hide(action))
{
pDocument->SetChangeMark();
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_FormActionHandler::DoAction_SubmitForm(const CPDF_Action& action, CPDFSDK_Document* pDocument)
+FX_BOOL CPDFSDK_FormActionHandler::DoAction_SubmitForm(const CPDF_Action& action, CPDFSDK_Document* pDocument)
{
ASSERT(pDocument != NULL);
@@ -760,7 +760,7 @@ bool CPDFSDK_FormActionHandler::DoAction_SubmitForm(const CPDF_Action& action, C
return pInterForm->DoAction_SubmitForm(action);
}
-bool CPDFSDK_FormActionHandler::DoAction_ResetForm(const CPDF_Action& action, CPDFSDK_Document* pDocument)
+FX_BOOL CPDFSDK_FormActionHandler::DoAction_ResetForm(const CPDF_Action& action, CPDFSDK_Document* pDocument)
{
ASSERT(pDocument != NULL);
@@ -769,13 +769,13 @@ bool CPDFSDK_FormActionHandler::DoAction_ResetForm(const CPDF_Action& action, CP
if (pInterForm->DoAction_ResetForm(action))
{
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_FormActionHandler::DoAction_ImportData(const CPDF_Action& action, CPDFSDK_Document* pDocument)
+FX_BOOL CPDFSDK_FormActionHandler::DoAction_ImportData(const CPDF_Action& action, CPDFSDK_Document* pDocument)
{
ASSERT(pDocument != NULL);
@@ -785,23 +785,23 @@ bool CPDFSDK_FormActionHandler::DoAction_ImportData(const CPDF_Action& action, C
if (pInterForm->DoAction_ImportData(action))
{
pDocument->SetChangeMark();
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_MediaActionHandler::DoAction_Rendition(const CPDF_Action& action, CPDFSDK_Document* pDocument)
+FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Rendition(const CPDF_Action& action, CPDFSDK_Document* pDocument)
{
- return false;
+ return FALSE;
}
-bool CPDFSDK_MediaActionHandler::DoAction_Sound(const CPDF_Action& action, CPDFSDK_Document* pDocument)
+FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Sound(const CPDF_Action& action, CPDFSDK_Document* pDocument)
{
- return false;
+ return FALSE;
}
-bool CPDFSDK_MediaActionHandler::DoAction_Movie(const CPDF_Action& action, CPDFSDK_Document* pDocument)
+FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Movie(const CPDF_Action& action, CPDFSDK_Document* pDocument)
{
- return false;
+ return FALSE;
}
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp
index 6695fe0c89..9b008cd762 100644
--- a/fpdfsdk/src/fsdk_annothandler.cpp
+++ b/fpdfsdk/src/fsdk_annothandler.cpp
@@ -144,7 +144,7 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnDraw(CPDFSDK_PageView* pPageView, CPDFSDK_
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
@@ -152,9 +152,9 @@ bool CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDown(CPDFSDK_PageView * pPageView,
{
return pAnnotHandler->OnLButtonDown(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonUp(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonUp(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
@@ -162,9 +162,9 @@ bool CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonUp(CPDFSDK_PageView * pPageView, CP
{
return pAnnotHandler->OnLButtonUp(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDblClk(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDblClk(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
@@ -172,9 +172,9 @@ bool CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDblClk(CPDFSDK_PageView * pPageView
{
return pAnnotHandler->OnLButtonDblClk(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnMouseMove(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnMouseMove(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
@@ -182,9 +182,9 @@ bool CPDFSDK_AnnotHandlerMgr::Annot_OnMouseMove(CPDFSDK_PageView * pPageView, CP
{
return pAnnotHandler->OnMouseMove(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnMouseWheel(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, short zDelta, const CPDF_Point& point)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnMouseWheel(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, short zDelta, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
@@ -192,9 +192,9 @@ bool CPDFSDK_AnnotHandlerMgr::Annot_OnMouseWheel(CPDFSDK_PageView * pPageView, C
{
return pAnnotHandler->OnMouseWheel(pPageView, pAnnot,nFlags,zDelta, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
@@ -202,9 +202,9 @@ bool CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonDown(CPDFSDK_PageView * pPageView,
{
return pAnnotHandler->OnRButtonDown(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonUp(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonUp(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
@@ -212,7 +212,7 @@ bool CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonUp(CPDFSDK_PageView * pPageView, CP
{
return pAnnotHandler->OnRButtonUp(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseEnter(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlag)
@@ -237,18 +237,18 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseExit(CPDFSDK_PageView * pPageView, CP
return;
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DWORD nFlags)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DWORD nFlags)
{
if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot))
{
return pAnnotHandler->OnChar(pAnnot,nChar, nFlags);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag)
{
if (!m_pApp->FFI_IsCTRLKeyDown(nFlag) && !m_pApp->FFI_IsALTKeyDown(nFlag))
@@ -263,7 +263,7 @@ bool CPDFSDK_AnnotHandlerMgr::Annot_OnKeyDown(CPDFSDK_Annot* pAnnot, int
{
CPDFSDK_Document* pDocument = pPage->GetSDKDocument();
pDocument->SetFocusAnnot(pNext);
- return true;
+ return TRUE;
}
}
}
@@ -272,14 +272,14 @@ bool CPDFSDK_AnnotHandlerMgr::Annot_OnKeyDown(CPDFSDK_Annot* pAnnot, int
{
return pAnnotHandler->OnKeyDown(pAnnot,nKeyCode, nFlag);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag)
{
- return false;
+ return FALSE;
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag)
{
ASSERT(pAnnot != NULL);
@@ -289,19 +289,19 @@ bool CPDFSDK_AnnotHandlerMgr::Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, FX
{
CPDFSDK_PageView* pPage = pAnnot->GetPageView();
pPage->GetSDKDocument();
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag)
{
ASSERT(pAnnot);
if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot))
return pAnnotHandler->OnKillFocus(pAnnot, nFlag);
- return false;
+ return FALSE;
}
CPDF_Rect CPDFSDK_AnnotHandlerMgr::Annot_OnGetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot)
@@ -313,7 +313,7 @@ CPDF_Rect CPDFSDK_AnnotHandlerMgr::Annot_OnGetViewBBox(CPDFSDK_PageView *pPage
return pAnnot->GetRect();
}
-bool CPDFSDK_AnnotHandlerMgr::Annot_OnHitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point)
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnHitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point)
{
ASSERT(pAnnot);
if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot))
@@ -321,31 +321,31 @@ bool CPDFSDK_AnnotHandlerMgr::Annot_OnHitTest(CPDFSDK_PageView *pPageView, CPDFS
if (pAnnotHandler->CanAnswer(pAnnot))
return pAnnotHandler->HitTest(pPageView, pAnnot, point);
}
- return false;
+ return FALSE;
}
-CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::GetNextAnnot(CPDFSDK_Annot* pSDKAnnot,bool bNext)
+CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::GetNextAnnot(CPDFSDK_Annot* pSDKAnnot,FX_BOOL bNext)
{
CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), "Widget", "");
return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot);
}
-bool CPDFSDK_BFAnnotHandler::CanAnswer(CPDFSDK_Annot* pAnnot)
+FX_BOOL CPDFSDK_BFAnnotHandler::CanAnswer(CPDFSDK_Annot* pAnnot)
{
ASSERT(pAnnot->GetType() == "Widget");
if (pAnnot->GetSubType() == BFFT_SIGNATURE)
- return false;
+ return FALSE;
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (!pWidget->IsVisible())
- return false;
+ return FALSE;
int nFieldFlags = pWidget->GetFieldFlags();
if ((nFieldFlags & FIELDFLAG_READONLY) == FIELDFLAG_READONLY)
- return false;
+ return FALSE;
if (pWidget->GetFieldType() == FIELDTYPE_PUSHBUTTON)
- return true;
+ return TRUE;
CPDF_Page* pPage = pWidget->GetPDFPage();
CPDF_Document* pDocument = pPage->m_pDocument;
@@ -366,7 +366,7 @@ CPDFSDK_Annot* CPDFSDK_BFAnnotHandler::NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_Page
pInterForm->AddMap(pCtrl, pWidget);
CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm();
if (pPDFInterForm && pPDFInterForm->NeedConstructAP())
- pWidget->ResetAppearance(nullptr, false);
+ pWidget->ResetAppearance(nullptr, FALSE);
return pWidget;
}
@@ -439,7 +439,7 @@ void CPDFSDK_BFAnnotHandler::OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_An
}
}
-bool CPDFSDK_BFAnnotHandler::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
+FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
CFX_ByteString sSubType = pAnnot->GetSubType();
@@ -453,10 +453,10 @@ bool CPDFSDK_BFAnnotHandler::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_
return m_pFormFiller->OnLButtonDown(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_BFAnnotHandler::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
+FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
CFX_ByteString sSubType = pAnnot->GetSubType();
@@ -470,10 +470,10 @@ bool CPDFSDK_BFAnnotHandler::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_An
return m_pFormFiller->OnLButtonUp(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_BFAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
+FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
CFX_ByteString sSubType = pAnnot->GetSubType();
@@ -487,10 +487,10 @@ bool CPDFSDK_BFAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSD
return m_pFormFiller->OnLButtonDblClk(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_BFAnnotHandler::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
+FX_BOOL CPDFSDK_BFAnnotHandler::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
CFX_ByteString sSubType = pAnnot->GetSubType();
@@ -504,12 +504,12 @@ bool CPDFSDK_BFAnnotHandler::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_An
return m_pFormFiller->OnMouseMove(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_BFAnnotHandler::OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, short zDelta, const CPDF_Point& point)
+FX_BOOL CPDFSDK_BFAnnotHandler::OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, short zDelta, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
CFX_ByteString sSubType = pAnnot->GetSubType();
@@ -523,10 +523,10 @@ bool CPDFSDK_BFAnnotHandler::OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_A
return m_pFormFiller->OnMouseWheel(pPageView, pAnnot, nFlags, zDelta,point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_BFAnnotHandler::OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
+FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
CFX_ByteString sSubType = pAnnot->GetSubType();
@@ -540,9 +540,9 @@ bool CPDFSDK_BFAnnotHandler::OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_
return m_pFormFiller->OnRButtonDown(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_BFAnnotHandler::OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
+FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point)
{
ASSERT(pAnnot != NULL);
CFX_ByteString sSubType = pAnnot->GetSubType();
@@ -556,10 +556,10 @@ bool CPDFSDK_BFAnnotHandler::OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_An
return m_pFormFiller->OnRButtonUp(pPageView, pAnnot, nFlags, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_BFAnnotHandler::OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DWORD nFlags)
+FX_BOOL CPDFSDK_BFAnnotHandler::OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DWORD nFlags)
{
ASSERT(pAnnot != NULL);
CFX_ByteString sSubType = pAnnot->GetSubType();
@@ -573,10 +573,10 @@ bool CPDFSDK_BFAnnotHandler::OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DW
return m_pFormFiller->OnChar(pAnnot,nChar, nFlags);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_BFAnnotHandler::OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag)
+FX_BOOL CPDFSDK_BFAnnotHandler::OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag)
{
ASSERT(pAnnot != NULL);
CFX_ByteString sSubType = pAnnot->GetSubType();
@@ -590,13 +590,13 @@ bool CPDFSDK_BFAnnotHandler::OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int
return m_pFormFiller->OnKeyDown(pAnnot,nKeyCode, nFlag);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_BFAnnotHandler::OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag)
+FX_BOOL CPDFSDK_BFAnnotHandler::OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag)
{
- return false;
+ return FALSE;
}
void CPDFSDK_BFAnnotHandler::OnCreate(CPDFSDK_Annot* pAnnot)
{
@@ -626,16 +626,16 @@ void CPDFSDK_BFAnnotHandler::OnLoad(CPDFSDK_Annot* pAnnot)
{
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
if (!pWidget->IsAppearanceValid())
- pWidget->ResetAppearance(NULL, false);
+ pWidget->ResetAppearance(NULL, FALSE);
int nFieldType = pWidget->GetFieldType();
if (nFieldType == FIELDTYPE_TEXTFIELD || nFieldType == FIELDTYPE_COMBOBOX)
{
- bool bFormated = false;
+ FX_BOOL bFormated = FALSE;
CFX_WideString sValue = pWidget->OnFormat(bFormated);
if (bFormated && nFieldType == FIELDTYPE_COMBOBOX)
{
- pWidget->ResetAppearance(sValue.c_str(), false);
+ pWidget->ResetAppearance(sValue.c_str(), FALSE);
}
}
@@ -644,7 +644,7 @@ void CPDFSDK_BFAnnotHandler::OnLoad(CPDFSDK_Annot* pAnnot)
}
}
-bool CPDFSDK_BFAnnotHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag)
+FX_BOOL CPDFSDK_BFAnnotHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag)
{
ASSERT(pAnnot != NULL);
CFX_ByteString sSubType = pAnnot->GetSubType();
@@ -658,9 +658,9 @@ bool CPDFSDK_BFAnnotHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag)
return m_pFormFiller->OnSetFocus(pAnnot,nFlag);
}
- return true;
+ return TRUE;
}
-bool CPDFSDK_BFAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag)
+FX_BOOL CPDFSDK_BFAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag)
{
ASSERT(pAnnot != NULL);
CFX_ByteString sSubType = pAnnot->GetSubType();
@@ -674,7 +674,7 @@ bool CPDFSDK_BFAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag)
return m_pFormFiller->OnKillFocus(pAnnot,nFlag);
}
- return true;
+ return TRUE;
}
CPDF_Rect CPDFSDK_BFAnnotHandler::GetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot)
@@ -695,7 +695,7 @@ CPDF_Rect CPDFSDK_BFAnnotHandler::GetViewBBox(CPDFSDK_PageView *pPageView, CPDFS
return CPDF_Rect(0,0,0,0);
}
-bool CPDFSDK_BFAnnotHandler::HitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point)
+FX_BOOL CPDFSDK_BFAnnotHandler::HitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point)
{
ASSERT(pPageView);
ASSERT(pAnnot);
@@ -706,9 +706,9 @@ bool CPDFSDK_BFAnnotHandler::HitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot*
//CReader_AnnotIteratorEx
-CPDFSDK_AnnotIterator::CPDFSDK_AnnotIterator(CPDFSDK_PageView * pPageView,bool bReverse,
- bool bIgnoreTopmost/*=false*/,
- bool bCircle/*=false*/,
+CPDFSDK_AnnotIterator::CPDFSDK_AnnotIterator(CPDFSDK_PageView * pPageView,FX_BOOL bReverse,
+ FX_BOOL bIgnoreTopmost/*=FALSE*/,
+ FX_BOOL bCircle/*=FALSE*/,
CFX_PtrArray *pList/*=NULL*/)
{
ASSERT(pPageView);
@@ -850,7 +850,7 @@ int LyOrderCompare(CPDFSDK_Annot* p1, CPDFSDK_Annot* p2)
return 0;
}
-bool CPDFSDK_AnnotIterator::InitIteratorAnnotList(CPDFSDK_PageView* pPageView,CFX_PtrArray * pAnnotList)
+FX_BOOL CPDFSDK_AnnotIterator::InitIteratorAnnotList(CPDFSDK_PageView* pPageView,CFX_PtrArray * pAnnotList)
{
ASSERT(pPageView);
@@ -859,7 +859,7 @@ bool CPDFSDK_AnnotIterator::InitIteratorAnnotList(CPDFSDK_PageView* pPageView,CF
}
m_pIteratorAnnotList.RemoveAll();
- if(!pAnnotList) return false;
+ if(!pAnnotList) return FALSE;
CPDFSDK_Annot * pTopMostAnnot= (m_bIgnoreTopmost) ? NULL : pPageView->GetFocusAnnot();
@@ -888,5 +888,5 @@ bool CPDFSDK_AnnotIterator::InitIteratorAnnotList(CPDFSDK_PageView* pPageView,CF
}
}
- return true;
+ return TRUE;
}
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp
index bbdfc19323..d0dc4ef738 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/src/fsdk_baseannot.cpp
@@ -17,14 +17,14 @@ int _gAfxGetTimeZoneInSeconds(FX_CHAR tzhour, uint8_t tzminute)
return (int)tzhour * 3600 + (int)tzminute * (tzhour >= 0 ? 60 : -60);
}
-bool _gAfxIsLeapYear(int16_t year)
+FX_BOOL _gAfxIsLeapYear(int16_t year)
{
return ((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0)));
}
FX_WORD _gAfxGetYearDays(int16_t year)
{
- return (_gAfxIsLeapYear(year) == true ? 366 : 365);
+ return (_gAfxIsLeapYear(year) == TRUE ? 366 : 365);
}
uint8_t _gAfxGetMonthDays(int16_t year, uint8_t month)
@@ -50,7 +50,7 @@ uint8_t _gAfxGetMonthDays(int16_t year, uint8_t month)
break;
case 2:
- if (_gAfxIsLeapYear(year) == true)
+ if (_gAfxIsLeapYear(year) == TRUE)
mDays = 29;
else
mDays = 28;
@@ -128,17 +128,17 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::operator = (const FX_SYSTEMTIME& st)
return *this;
}
-bool CPDFSDK_DateTime::operator == (CPDFSDK_DateTime& datetime)
+FX_BOOL CPDFSDK_DateTime::operator == (CPDFSDK_DateTime& datetime)
{
return (FXSYS_memcmp(&dt, &datetime.dt, sizeof(FX_DATETIME)) == 0);
}
-bool CPDFSDK_DateTime::operator != (CPDFSDK_DateTime& datetime)
+FX_BOOL CPDFSDK_DateTime::operator != (CPDFSDK_DateTime& datetime)
{
return (FXSYS_memcmp(&dt, &datetime.dt, sizeof(FX_DATETIME)) != 0);
}
-bool CPDFSDK_DateTime::operator > (CPDFSDK_DateTime& datetime)
+FX_BOOL CPDFSDK_DateTime::operator > (CPDFSDK_DateTime& datetime)
{
CPDFSDK_DateTime dt1 = ToGMT();
CPDFSDK_DateTime dt2 = datetime.ToGMT();
@@ -147,12 +147,12 @@ bool CPDFSDK_DateTime::operator > (CPDFSDK_DateTime& datetime)
int d3 = (((int)dt2.dt.year) << 16) | (((int)dt2.dt.month) << 8) | (int)dt2.dt.day;
int d4 = (((int)dt2.dt.hour) << 16) | (((int)dt2.dt.minute) << 8) | (int)dt2.dt.second;
- if (d1 > d3) return true;
- if (d2 > d4) return true;
- return false;
+ if (d1 > d3) return TRUE;
+ if (d2 > d4) return TRUE;
+ return FALSE;
}
-bool CPDFSDK_DateTime::operator >= (CPDFSDK_DateTime& datetime)
+FX_BOOL CPDFSDK_DateTime::operator >= (CPDFSDK_DateTime& datetime)
{
CPDFSDK_DateTime dt1 = ToGMT();
CPDFSDK_DateTime dt2 = datetime.ToGMT();
@@ -161,12 +161,12 @@ bool CPDFSDK_DateTime::operator >= (CPDFSDK_DateTime& datetime)
int d3 = (((int)dt2.dt.year) << 16) | (((int)dt2.dt.month) << 8) | (int)dt2.dt.day;
int d4 = (((int)dt2.dt.hour) << 16) | (((int)dt2.dt.minute) << 8) | (int)dt2.dt.second;
- if (d1 >= d3) return true;
- if (d2 >= d4) return true;
- return false;
+ if (d1 >= d3) return TRUE;
+ if (d2 >= d4) return TRUE;
+ return FALSE;
}
-bool CPDFSDK_DateTime::operator < (CPDFSDK_DateTime& datetime)
+FX_BOOL CPDFSDK_DateTime::operator < (CPDFSDK_DateTime& datetime)
{
CPDFSDK_DateTime dt1 = ToGMT();
CPDFSDK_DateTime dt2 = datetime.ToGMT();
@@ -175,12 +175,12 @@ bool CPDFSDK_DateTime::operator < (CPDFSDK_DateTime& datetime)
int d3 = (((int)dt2.dt.year) << 16) | (((int)dt2.dt.month) << 8) | (int)dt2.dt.day;
int d4 = (((int)dt2.dt.hour) << 16) | (((int)dt2.dt.minute) << 8) | (int)dt2.dt.second;
- if (d1 < d3) return true;
- if (d2 < d4) return true;
- return false;
+ if (d1 < d3) return TRUE;
+ if (d2 < d4) return TRUE;
+ return FALSE;
}
-bool CPDFSDK_DateTime::operator <= (CPDFSDK_DateTime& datetime)
+FX_BOOL CPDFSDK_DateTime::operator <= (CPDFSDK_DateTime& datetime)
{
CPDFSDK_DateTime dt1 = ToGMT();
CPDFSDK_DateTime dt2 = datetime.ToGMT();
@@ -189,9 +189,9 @@ bool CPDFSDK_DateTime::operator <= (CPDFSDK_DateTime& datetime)
int d3 = (((int)dt2.dt.year) << 16) | (((int)dt2.dt.month) << 8) | (int)dt2.dt.day;
int d4 = (((int)dt2.dt.hour) << 16) | (((int)dt2.dt.minute) << 8) | (int)dt2.dt.second;
- if (d1 <= d3) return true;
- if (d2 <= d4) return true;
- return false;
+ if (d1 <= d3) return TRUE;
+ if (d2 <= d4) return TRUE;
+ return FALSE;
}
CPDFSDK_DateTime::operator time_t()
@@ -506,7 +506,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::AddSeconds(int seconds)
CPDFSDK_Annot::CPDFSDK_Annot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView) :
m_pAnnot(pAnnot),
m_pPageView(pPageView),
-m_bSelected(false),
+m_bSelected(FALSE),
m_nTabOrder(-1)
{
}
@@ -539,12 +539,12 @@ CPDFSDK_PageView* CPDFSDK_Annot::GetPageView()
return m_pPageView;
}
-bool CPDFSDK_Annot::IsSelected()
+FX_BOOL CPDFSDK_Annot::IsSelected()
{
return m_bSelected;
}
-void CPDFSDK_Annot::SetSelected(bool bSelected)
+void CPDFSDK_Annot::SetSelected(FX_BOOL bSelected)
{
m_bSelected = bSelected;
}
@@ -606,15 +606,15 @@ void CPDFSDK_Annot::DrawAppearance(CFX_RenderDevice* pDevice, const CPDF_Matrix*
m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, mode, pOptions);
}
-bool CPDFSDK_Annot::IsAppearanceValid()
+FX_BOOL CPDFSDK_Annot::IsAppearanceValid()
{
return m_pAnnot->GetAnnotDict()->GetDict("AP") != NULL;
}
-bool CPDFSDK_Annot::IsAppearanceValid(CPDF_Annot::AppearanceMode mode)
+FX_BOOL CPDFSDK_Annot::IsAppearanceValid(CPDF_Annot::AppearanceMode mode)
{
CPDF_Dictionary* pAP = m_pAnnot->GetAnnotDict()->GetDict("AP");
- if (pAP == NULL) return false;
+ if (pAP == NULL) return FALSE;
// Choose the right sub-ap
const FX_CHAR* ap_entry = "N";
@@ -627,9 +627,9 @@ bool CPDFSDK_Annot::IsAppearanceValid(CPDF_Annot::AppearanceMode mode)
// Get the AP stream or subdirectory
CPDF_Object* psub = pAP->GetElementValue(ap_entry);
- if (psub == NULL) return false;
+ if (psub == NULL) return FALSE;
- return true;
+ return TRUE;
}
void CPDFSDK_Annot::DrawBorder(CFX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device,
@@ -875,7 +875,7 @@ void CPDFSDK_Annot::RemoveColor()
m_pAnnot->GetAnnotDict()->RemoveAt("C");
}
-bool CPDFSDK_Annot::GetColor(FX_COLORREF& color) const
+FX_BOOL CPDFSDK_Annot::GetColor(FX_COLORREF& color) const
{
if (CPDF_Array* pEntry = m_pAnnot->GetAnnotDict()->GetArray("C"))
{
@@ -886,7 +886,7 @@ bool CPDFSDK_Annot::GetColor(FX_COLORREF& color) const
color = FXSYS_RGB((int)g, (int)g, (int)g);
- return true;
+ return TRUE;
}
else if (nCount == 3)
{
@@ -896,7 +896,7 @@ bool CPDFSDK_Annot::GetColor(FX_COLORREF& color) const
color = FXSYS_RGB((int)r, (int)g, (int)b);
- return true;
+ return TRUE;
}
else if (nCount == 4)
{
@@ -911,11 +911,11 @@ bool CPDFSDK_Annot::GetColor(FX_COLORREF& color) const
color = FXSYS_RGB((int)(r * 255), (int)(g * 255), (int)(b * 255));
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
@@ -976,7 +976,7 @@ void CPDFSDK_Annot::WriteAppearance(const CFX_ByteString& sAPType, const CPDF_Re
pStreamDict->SetAtRect("BBox", rcBBox);
}
- pStream->SetData((uint8_t*)sContents.c_str(), sContents.GetLength(), false, false);
+ pStream->SetData((uint8_t*)sContents.c_str(), sContents.GetLength(), FALSE, FALSE);
}
#define BA_ANNOT_MINWIDTH 1
@@ -992,11 +992,11 @@ FX_FLOAT CPDFSDK_Annot::GetMinHeight() const
return BA_ANNOT_MINHEIGHT;
}
-bool CPDFSDK_Annot::CreateFormFiller()
+FX_BOOL CPDFSDK_Annot::CreateFormFiller()
{
- return true;
+ return TRUE;
}
-bool CPDFSDK_Annot::IsVisible() const
+FX_BOOL CPDFSDK_Annot::IsVisible() const
{
int nFlags = GetFlags();
return !((nFlags & ANNOTFLAG_INVISIBLE) || (nFlags & ANNOTFLAG_HIDDEN) || (nFlags & ANNOTFLAG_NOVIEW));
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 4933a05c24..ee16212f46 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -37,10 +37,10 @@ CPDFSDK_Widget::~CPDFSDK_Widget()
}
-bool CPDFSDK_Widget::IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode)
+FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode)
{
CPDF_Dictionary* pAP = m_pAnnot->GetAnnotDict()->GetDict("AP");
- if (pAP == NULL) return false;
+ if (pAP == NULL) return FALSE;
// Choose the right sub-ap
const FX_CHAR* ap_entry = "N";
@@ -53,7 +53,7 @@ bool CPDFSDK_Widget::IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode
// Get the AP stream or subdirectory
CPDF_Object* psub = pAP->GetElementValue(ap_entry);
- if (psub == NULL) return false;
+ if (psub == NULL) return FALSE;
int nFieldType = GetFieldType();
switch (nFieldType)
@@ -70,10 +70,10 @@ bool CPDFSDK_Widget::IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode
CPDF_Dictionary* pSubDict = (CPDF_Dictionary*)psub;
return pSubDict->GetStream(GetAppState()) != NULL;
}
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
int CPDFSDK_Widget::GetFieldType() const
@@ -141,7 +141,7 @@ int CPDFSDK_Widget::GetRotate() const
return pCtrl->GetRotation() % 360;
}
-bool CPDFSDK_Widget::GetFillColor(FX_COLORREF& color) const
+FX_BOOL CPDFSDK_Widget::GetFillColor(FX_COLORREF& color) const
{
CPDF_FormControl* pFormCtrl = GetFormControl();
ASSERT(pFormCtrl != NULL);
@@ -152,7 +152,7 @@ bool CPDFSDK_Widget::GetFillColor(FX_COLORREF& color) const
return iColorType != COLORTYPE_TRANSPARENT;
}
-bool CPDFSDK_Widget::GetBorderColor(FX_COLORREF& color) const
+FX_BOOL CPDFSDK_Widget::GetBorderColor(FX_COLORREF& color) const
{
CPDF_FormControl* pFormCtrl = GetFormControl();
ASSERT(pFormCtrl != NULL);
@@ -163,7 +163,7 @@ bool CPDFSDK_Widget::GetBorderColor(FX_COLORREF& color) const
return iColorType != COLORTYPE_TRANSPARENT;
}
-bool CPDFSDK_Widget::GetTextColor(FX_COLORREF& color) const
+FX_BOOL CPDFSDK_Widget::GetTextColor(FX_COLORREF& color) const
{
CPDF_FormControl* pFormCtrl = GetFormControl();
ASSERT(pFormCtrl != NULL);
@@ -179,7 +179,7 @@ bool CPDFSDK_Widget::GetTextColor(FX_COLORREF& color) const
return iColorType != COLORTYPE_TRANSPARENT;
}
- return false;
+ return FALSE;
}
FX_FLOAT CPDFSDK_Widget::GetFontSize() const
@@ -235,7 +235,7 @@ int CPDFSDK_Widget::CountOptions() const
return pFormField->CountOptions();
}
-bool CPDFSDK_Widget::IsOptionSelected(int nIndex) const
+FX_BOOL CPDFSDK_Widget::IsOptionSelected(int nIndex) const
{
CPDF_FormField* pFormField = GetFormField();
ASSERT(pFormField != NULL);
@@ -251,7 +251,7 @@ int CPDFSDK_Widget::GetTopVisibleIndex() const
return pFormField->GetTopVisibleIndex();
}
-bool CPDFSDK_Widget::IsChecked() const
+FX_BOOL CPDFSDK_Widget::IsChecked() const
{
CPDF_FormControl* pFormCtrl = GetFormControl();
ASSERT(pFormCtrl != NULL);
@@ -275,7 +275,7 @@ int CPDFSDK_Widget::GetMaxLen() const
return pFormField->GetMaxLen();
}
-void CPDFSDK_Widget::SetCheck(bool bChecked, bool bNotify)
+void CPDFSDK_Widget::SetCheck(FX_BOOL bChecked, FX_BOOL bNotify)
{
CPDF_FormControl* pFormCtrl = GetFormControl();
ASSERT(pFormCtrl != NULL);
@@ -286,7 +286,7 @@ void CPDFSDK_Widget::SetCheck(bool bChecked, bool bNotify)
pFormField->CheckControl(pFormField->GetControlIndex(pFormCtrl), bChecked, bNotify);
}
-void CPDFSDK_Widget::SetValue(const CFX_WideString& sValue, bool bNotify)
+void CPDFSDK_Widget::SetValue(const CFX_WideString& sValue, FX_BOOL bNotify)
{
CPDF_FormField* pFormField = GetFormField();
ASSERT(pFormField != NULL);
@@ -297,7 +297,7 @@ void CPDFSDK_Widget::SetValue(const CFX_WideString& sValue, bool bNotify)
void CPDFSDK_Widget::SetDefaultValue(const CFX_WideString& sValue)
{
}
-void CPDFSDK_Widget::SetOptionSelection(int index, bool bSelected, bool bNotify)
+void CPDFSDK_Widget::SetOptionSelection(int index, FX_BOOL bSelected, FX_BOOL bNotify)
{
CPDF_FormField* pFormField = GetFormField();
ASSERT(pFormField != NULL);
@@ -305,7 +305,7 @@ void CPDFSDK_Widget::SetOptionSelection(int index, bool bSelected, bool bNotify)
pFormField->SetItemSelection(index, bSelected, bNotify);
}
-void CPDFSDK_Widget::ClearSelection(bool bNotify)
+void CPDFSDK_Widget::ClearSelection(FX_BOOL bNotify)
{
CPDF_FormField* pFormField = GetFormField();
ASSERT(pFormField != NULL);
@@ -319,20 +319,20 @@ void CPDFSDK_Widget::SetTopVisibleIndex(int index)
void CPDFSDK_Widget::SetAppModified()
{
- m_bAppModified = true;
+ m_bAppModified = TRUE;
}
void CPDFSDK_Widget::ClearAppModified()
{
- m_bAppModified = false;
+ m_bAppModified = FALSE;
}
-bool CPDFSDK_Widget::IsAppModified() const
+FX_BOOL CPDFSDK_Widget::IsAppModified() const
{
return m_bAppModified;
}
-void CPDFSDK_Widget::ResetAppearance(const FX_WCHAR* sValue, bool bValueChanged)
+void CPDFSDK_Widget::ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged)
{
SetAppModified();
@@ -370,14 +370,14 @@ void CPDFSDK_Widget::ResetAppearance(const FX_WCHAR* sValue, bool bValueChanged)
m_pAnnot->ClearCachedAP();
}
-CFX_WideString CPDFSDK_Widget::OnFormat(bool& bFormated)
+CFX_WideString CPDFSDK_Widget::OnFormat(FX_BOOL& bFormated)
{
CPDF_FormField* pFormField = GetFormField();
ASSERT(pFormField != NULL);
return m_pInterForm->OnFormat(pFormField, bFormated);
}
-void CPDFSDK_Widget::ResetFieldAppearance(bool bValueChanged)
+void CPDFSDK_Widget::ResetFieldAppearance(FX_BOOL bValueChanged)
{
CPDF_FormField* pFormField = GetFormField();
ASSERT(pFormField != NULL);
@@ -1017,7 +1017,7 @@ void CPDFSDK_Widget::ResetAppearance_ComboBox(const FX_WCHAR* sValue)
if (IFX_Edit * pEdit = IFX_Edit::NewEdit())
{
- pEdit->EnableRefresh(false);
+ pEdit->EnableRefresh(FALSE);
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
ASSERT(pDoc != NULL);
@@ -1035,7 +1035,7 @@ void CPDFSDK_Widget::ResetAppearance_ComboBox(const FX_WCHAR* sValue)
FX_FLOAT fFontSize = GetFontSize();
if (IsFloatZero(fFontSize))
- pEdit->SetAutoFontSize(true);
+ pEdit->SetAutoFontSize(TRUE);
else
pEdit->SetFontSize(fFontSize);
@@ -1093,7 +1093,7 @@ void CPDFSDK_Widget::ResetAppearance_ListBox()
if (IFX_Edit * pEdit = IFX_Edit::NewEdit())
{
- pEdit->EnableRefresh(false);
+ pEdit->EnableRefresh(FALSE);
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
ASSERT(pDoc != NULL);
@@ -1123,12 +1123,12 @@ void CPDFSDK_Widget::ResetAppearance_ListBox()
for (int32_t i=nTop; i<nCount; i++)
{
- bool bSelected = false;
+ FX_BOOL bSelected = FALSE;
for (int32_t j=0; j<nSelCount; j++)
{
if (pField->GetSelectedIndex(j) == i)
{
- bSelected = true;
+ bSelected = TRUE;
break;
}
}
@@ -1141,16 +1141,16 @@ void CPDFSDK_Widget::ResetAppearance_ListBox()
if (bSelected)
{
CPDF_Rect rcItem = CPDF_Rect(rcClient.left,fy-fItemHeight,rcClient.right,fy);
- sList << "q\n" << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_RGB,0,51.0f/255.0f,113.0f/255.0f),true)
+ sList << "q\n" << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_RGB,0,51.0f/255.0f,113.0f/255.0f),TRUE)
<< rcItem.left << " " << rcItem.bottom << " " << rcItem.Width() << " " << rcItem.Height() << " re f\n" << "Q\n";
- sList << "BT\n" << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_GRAY,1),true) <<
+ sList << "BT\n" << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_GRAY,1),TRUE) <<
CPWL_Utils::GetEditAppStream(pEdit,CPDF_Point(0.0f,fy)) << "ET\n";
}
else
{
CPWL_Color crText = GetTextPWLColor();
- sList << "BT\n" << CPWL_Utils::GetColorAppStream(crText,true) <<
+ sList << "BT\n" << CPWL_Utils::GetColorAppStream(crText,TRUE) <<
CPWL_Utils::GetEditAppStream(pEdit,CPDF_Point(0.0f,fy)) << "ET\n";
}
@@ -1183,7 +1183,7 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue)
if (IFX_Edit * pEdit = IFX_Edit::NewEdit())
{
- pEdit->EnableRefresh(false);
+ pEdit->EnableRefresh(FALSE);
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
ASSERT(pDoc != NULL);
@@ -1198,12 +1198,12 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue)
pEdit->SetAlignmentH(pControl->GetControlAlignment());
FX_DWORD dwFieldFlags = pField->GetFieldFlags();
- bool bMultiLine = (dwFieldFlags >> 12) & 1;
+ FX_BOOL bMultiLine = (dwFieldFlags >> 12) & 1;
if (bMultiLine)
{
- pEdit->SetMultiLine(true);
- pEdit->SetAutoReturn(true);
+ pEdit->SetMultiLine(TRUE);
+ pEdit->SetAutoReturn(TRUE);
}
else
{
@@ -1218,7 +1218,7 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue)
}
int nMaxLen = pField->GetMaxLen();
- bool bCharArray = (dwFieldFlags >> 24) & 1;
+ FX_BOOL bCharArray = (dwFieldFlags >> 24) & 1;
FX_FLOAT fFontSize = GetFontSize();
if (nMaxLen > 0)
@@ -1241,7 +1241,7 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue)
}
if (IsFloatZero(fFontSize))
- pEdit->SetAutoFontSize(true);
+ pEdit->SetAutoFontSize(TRUE);
else
pEdit->SetFontSize(fFontSize);
@@ -1276,11 +1276,11 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue)
{
case BBS_SOLID:
{
- CFX_ByteString sColor = CPWL_Utils::GetColorAppStream(GetBorderPWLColor(),false);
+ CFX_ByteString sColor = CPWL_Utils::GetColorAppStream(GetBorderPWLColor(),FALSE);
if (sColor.GetLength() > 0)
{
sLines << "q\n" << GetBorderWidth() << " w\n"
- << CPWL_Utils::GetColorAppStream(GetBorderPWLColor(),false) << " 2 J 0 j\n";
+ << CPWL_Utils::GetColorAppStream(GetBorderPWLColor(),FALSE) << " 2 J 0 j\n";
for (int32_t i=1;i<nMaxLen;i++)
{
@@ -1296,13 +1296,13 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue)
break;
case BBS_DASH:
{
- CFX_ByteString sColor = CPWL_Utils::GetColorAppStream(GetBorderPWLColor(),false);
+ CFX_ByteString sColor = CPWL_Utils::GetColorAppStream(GetBorderPWLColor(),FALSE);
if (sColor.GetLength() > 0)
{
CPWL_Dash dsBorder = CPWL_Dash(3, 3, 0);
sLines << "q\n" << GetBorderWidth() << " w\n"
- << CPWL_Utils::GetColorAppStream(GetBorderPWLColor(),false)
+ << CPWL_Utils::GetColorAppStream(GetBorderPWLColor(),FALSE)
<< "[" << dsBorder.nDash << " "
<< dsBorder.nGap << "] "
<< dsBorder.nPhase << " d\n";
@@ -1549,7 +1549,7 @@ void CPDFSDK_Widget::RemoveAppearance(const CFX_ByteString& sAPType)
}
}
-bool CPDFSDK_Widget::OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldAction& data, CPDFSDK_PageView* pPageView)
+FX_BOOL CPDFSDK_Widget::OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldAction& data, CPDFSDK_PageView* pPageView)
{
CPDF_Action action = GetAAction(type);
@@ -1567,7 +1567,7 @@ bool CPDFSDK_Widget::OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldActio
return pActionHandler->DoAction_Field(action, type, pDocument, GetFormField(), data);
}
- return false;
+ return FALSE;
}
CPDF_Action CPDFSDK_Widget::GetAAction(CPDF_AAction::AActionType eAAT)
@@ -1624,37 +1624,37 @@ int32_t CPDFSDK_Widget::GetValueAge() const
}
-bool CPDFSDK_Widget::HitTest(FX_FLOAT pageX, FX_FLOAT pageY)
+FX_BOOL CPDFSDK_Widget::HitTest(FX_FLOAT pageX, FX_FLOAT pageY)
{
CPDF_Annot* pAnnot = GetPDFAnnot();
CFX_FloatRect annotRect;
pAnnot->GetRect(annotRect);
if(annotRect.Contains(pageX, pageY))
{
- if (!IsVisible()) return false;
+ if (!IsVisible()) return FALSE;
int nFieldFlags = GetFieldFlags();
if ((nFieldFlags & FIELDFLAG_READONLY) == FIELDFLAG_READONLY)
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
CPDFSDK_InterForm::CPDFSDK_InterForm(CPDFSDK_Document* pDocument)
:m_pDocument(pDocument),
m_pInterForm(NULL),
- m_bCalculate(true),
- m_bBusy(false)
+ m_bCalculate(TRUE),
+ m_bBusy(FALSE)
{
ASSERT(m_pDocument != NULL);
- m_pInterForm = new CPDF_InterForm(m_pDocument->GetDocument(), false);
+ m_pInterForm = new CPDF_InterForm(m_pDocument->GetDocument(), FALSE);
ASSERT(m_pInterForm != NULL);
m_pInterForm->SetFormNotify(this);
for(int i=0; i<6; i++)
- m_bNeedHightlight[i] = false;
+ m_bNeedHightlight[i] = FALSE;
m_iHighlightAlpha = 0;
}
@@ -1665,12 +1665,12 @@ CPDFSDK_InterForm::~CPDFSDK_InterForm()
m_Map.clear();
}
-bool CPDFSDK_InterForm::HighlightWidgets()
+FX_BOOL CPDFSDK_InterForm::HighlightWidgets()
{
- return false;
+ return FALSE;
}
-CPDFSDK_Widget* CPDFSDK_InterForm::GetSibling(CPDFSDK_Widget* pWidget, bool bNext) const
+CPDFSDK_Widget* CPDFSDK_InterForm::GetSibling(CPDFSDK_Widget* pWidget, FX_BOOL bNext) const
{
nonstd::unique_ptr<CBA_AnnotIterator> pIterator(
new CBA_AnnotIterator(pWidget->GetPageView(), "Widget", ""));
@@ -1782,12 +1782,12 @@ void CPDFSDK_InterForm::RemoveMap(CPDF_FormControl* pControl)
m_Map.erase(pControl);
}
-void CPDFSDK_InterForm::EnableCalculate(bool bEnabled)
+void CPDFSDK_InterForm::EnableCalculate(FX_BOOL bEnabled)
{
m_bCalculate = bEnabled;
}
-bool CPDFSDK_InterForm::IsCalculateEnabled() const
+FX_BOOL CPDFSDK_InterForm::IsCalculateEnabled() const
{
return m_bCalculate;
}
@@ -1807,7 +1807,7 @@ CPDF_Stream* CPDFSDK_InterForm::LoadImageFromFile(const CFX_WideString& sFile)
int nHeight = pBmp->GetHeight();
CPDF_Image Image(pDocument);
- Image.SetImage(pBmp, false);
+ Image.SetImage(pBmp, FALSE);
CPDF_Stream* pImageStream = Image.GetStream();
if (pImageStream)
{
@@ -1867,7 +1867,7 @@ void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField)
if (m_bBusy) return;
- m_bBusy = true;
+ m_bBusy = TRUE;
if (IsCalculateEnabled())
{
@@ -1899,11 +1899,11 @@ void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField)
CFX_WideString sOldValue = pField->GetValue();
CFX_WideString sValue = sOldValue;
- bool bRC = true;
+ FX_BOOL bRC = TRUE;
pContext->OnField_Calculate(pFormField, pField, sValue, bRC);
CFX_WideString sInfo;
- bool bRet = pContext->RunScript(csJS, sInfo);
+ FX_BOOL bRet = pContext->RunScript(csJS, sInfo);
pRuntime->ReleaseContext(pContext);
if (bRet)
@@ -1911,7 +1911,7 @@ void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField)
if (bRC)
{
if (sValue.Compare(sOldValue) != 0)
- pField->SetValue(sValue, true);
+ pField->SetValue(sValue, TRUE);
}
}
}
@@ -1924,10 +1924,10 @@ void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField)
}
- m_bBusy = false;
+ m_bBusy = FALSE;
}
-CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, bool& bFormated)
+CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, FX_BOOL& bFormated)
{
ASSERT(m_pDocument != NULL);
ASSERT(pFormField != NULL);
@@ -1937,7 +1937,7 @@ CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, bool& bFo
ASSERT(pEnv);
if(!pEnv->IsJSInitiated())
{
- bFormated = false;
+ bFormated = FALSE;
return sValue;
}
@@ -1956,7 +1956,7 @@ CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, bool& bFo
}
}
- bFormated = false;
+ bFormated = FALSE;
CPDF_AAction aAction = pFormField->GetAdditionalAction();
if (aAction != NULL && aAction.ActionExist(CPDF_AAction::Format))
@@ -1972,16 +1972,16 @@ CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, bool& bFo
IFXJS_Context* pContext = pRuntime->NewContext();
ASSERT(pContext != NULL);
- pContext->OnField_Format(pFormField, Value, true);
+ pContext->OnField_Format(pFormField, Value, TRUE);
CFX_WideString sInfo;
- bool bRet = pContext->RunScript(script, sInfo);
+ FX_BOOL bRet = pContext->RunScript(script, sInfo);
pRuntime->ReleaseContext(pContext);
if (bRet)
{
sValue = Value;
- bFormated = true;
+ bFormated = TRUE;
}
}
}
@@ -1990,7 +1990,7 @@ CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, bool& bFo
return sValue;
}
-void CPDFSDK_InterForm::ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, bool bValueChanged)
+void CPDFSDK_InterForm::ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, FX_BOOL bValueChanged)
{
ASSERT(pFormField != NULL);
@@ -2020,7 +2020,7 @@ void CPDFSDK_InterForm::UpdateField(CPDF_FormField* pFormField)
CFFL_IFormFiller* pIFormFiller = pEnv->GetIFormFiller();
CPDF_Page * pPage = pWidget->GetPDFPage();
- CPDFSDK_PageView * pPageView = m_pDocument->GetPageView(pPage,false);
+ CPDFSDK_PageView * pPageView = m_pDocument->GetPageView(pPage,FALSE);
FX_RECT rcBBox = pIFormFiller->GetViewBBox(pPageView, pWidget);
@@ -2029,7 +2029,7 @@ void CPDFSDK_InterForm::UpdateField(CPDF_FormField* pFormField)
}
}
-void CPDFSDK_InterForm::OnKeyStrokeCommit(CPDF_FormField* pFormField, CFX_WideString& csValue, bool& bRC)
+void CPDFSDK_InterForm::OnKeyStrokeCommit(CPDF_FormField* pFormField, CFX_WideString& csValue, FX_BOOL& bRC)
{
ASSERT(pFormField != NULL);
@@ -2058,7 +2058,7 @@ void CPDFSDK_InterForm::OnKeyStrokeCommit(CPDF_FormField* pFormField, CFX_WideSt
}
}
-void CPDFSDK_InterForm::OnValidate(CPDF_FormField* pFormField, CFX_WideString& csValue, bool& bRC)
+void CPDFSDK_InterForm::OnValidate(CPDF_FormField* pFormField, CFX_WideString& csValue, FX_BOOL& bRC)
{
ASSERT(pFormField != NULL);
@@ -2089,7 +2089,7 @@ void CPDFSDK_InterForm::OnValidate(CPDF_FormField* pFormField, CFX_WideString& c
/* ----------------------------- action ----------------------------- */
-bool CPDFSDK_InterForm::DoAction_Hide(const CPDF_Action& action)
+FX_BOOL CPDFSDK_InterForm::DoAction_Hide(const CPDF_Action& action)
{
ASSERT(action);
@@ -2100,9 +2100,9 @@ bool CPDFSDK_InterForm::DoAction_Hide(const CPDF_Action& action)
CFX_PtrArray fields;
GetFieldFromObjects(fieldObjects, fields);
- bool bHide = action.GetHideStatus();
+ FX_BOOL bHide = action.GetHideStatus();
- bool bChanged = false;
+ FX_BOOL bChanged = FALSE;
for (int i=0, sz=fields.GetSize(); i<sz; i++)
{
@@ -2137,7 +2137,7 @@ bool CPDFSDK_InterForm::DoAction_Hide(const CPDF_Action& action)
pPageView->UpdateView(pWidget);
- bChanged = true;
+ bChanged = TRUE;
}
}
}
@@ -2145,12 +2145,12 @@ bool CPDFSDK_InterForm::DoAction_Hide(const CPDF_Action& action)
return bChanged;
}
-bool CPDFSDK_InterForm::DoAction_SubmitForm(const CPDF_Action& action)
+FX_BOOL CPDFSDK_InterForm::DoAction_SubmitForm(const CPDF_Action& action)
{
ASSERT(m_pInterForm != NULL);
CFX_WideString sDestination = action.GetFilePath();
if (sDestination.IsEmpty())
- return false;
+ return FALSE;
CPDF_Dictionary* pActionDict = action.GetDict();
if (pActionDict->KeyExist("Fields"))
@@ -2164,21 +2164,21 @@ bool CPDFSDK_InterForm::DoAction_SubmitForm(const CPDF_Action& action)
GetFieldFromObjects(fieldObjects, fields);
if (fields.GetSize() != 0)
{
- bool bIncludeOrExclude = !(dwFlags & 0x01);
+ FX_BOOL bIncludeOrExclude = !(dwFlags & 0x01);
if (m_pInterForm->CheckRequiredFields(&fields, bIncludeOrExclude))
- return false;
+ return FALSE;
- return SubmitFields(sDestination, fields, bIncludeOrExclude, false);
+ return SubmitFields(sDestination, fields, bIncludeOrExclude, FALSE);
}
}
if (m_pInterForm->CheckRequiredFields())
- return false;
+ return FALSE;
- return SubmitForm(sDestination, false);
+ return SubmitForm(sDestination, FALSE);
}
-bool CPDFSDK_InterForm::SubmitFields(const CFX_WideString& csDestination, const CFX_PtrArray& fields,
- bool bIncludeOrExclude, bool bUrlEncoded)
+FX_BOOL CPDFSDK_InterForm::SubmitFields(const CFX_WideString& csDestination, const CFX_PtrArray& fields,
+ FX_BOOL bIncludeOrExclude, FX_BOOL bUrlEncoded)
{
CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
ASSERT(pEnv != NULL);
@@ -2192,12 +2192,12 @@ bool CPDFSDK_InterForm::SubmitFields(const CFX_WideString& csDestination, const
if (bUrlEncoded)
{
if(!FDFToURLEncodedData(pBuffer, nBufSize))
- return false;
+ return FALSE;
}
pEnv->JS_docSubmitForm(pBuffer, nBufSize, csDestination.c_str());
- return true;
+ return TRUE;
}
void CPDFSDK_InterForm::DoFDFBuffer(CFX_ByteString sBuffer)
@@ -2236,22 +2236,22 @@ void CPDFSDK_InterForm::DoFDFBuffer(CFX_ByteString sBuffer)
sBuffer.ReleaseBuffer();
}
-bool CPDFSDK_InterForm::FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_WideString csTxtFile)
+FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_WideString csTxtFile)
{
- return true;
+ return TRUE;
}
-bool CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize)
+FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize)
{
CFDF_Document* pFDF = CFDF_Document::ParseMemory(pBuf, nBufSize);
if (pFDF)
{
CPDF_Dictionary* pMainDict = pFDF->GetRoot()->GetDict("FDF");
- if (pMainDict == NULL) return false;
+ if (pMainDict == NULL) return FALSE;
// Get fields
CPDF_Array* pFields = pMainDict->GetArray("Fields");
- if (pFields == NULL) return false;
+ if (pFields == NULL) return FALSE;
CFX_ByteTextBuf fdfEncodedData;
@@ -2279,17 +2279,17 @@ bool CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize
pBuf = FX_Alloc(uint8_t, nBufSize);
FXSYS_memcpy(pBuf, fdfEncodedData.GetBuffer(), nBufSize);
}
- return true;
+ return TRUE;
}
-bool CPDFSDK_InterForm::ExportFieldsToFDFTextBuf(const CFX_PtrArray& fields,bool bIncludeOrExclude, CFX_ByteTextBuf& textBuf)
+FX_BOOL CPDFSDK_InterForm::ExportFieldsToFDFTextBuf(const CFX_PtrArray& fields,FX_BOOL bIncludeOrExclude, CFX_ByteTextBuf& textBuf)
{
ASSERT(m_pDocument != NULL);
ASSERT(m_pInterForm != NULL);
CFDF_Document* pFDF = m_pInterForm->ExportToFDF(m_pDocument->GetPath(),(CFX_PtrArray&)fields, bIncludeOrExclude);
- if (!pFDF) return false;
- bool bRet = pFDF->WriteBuf(textBuf); // = false;//
+ if (!pFDF) return FALSE;
+ FX_BOOL bRet = pFDF->WriteBuf(textBuf); // = FALSE;//
delete pFDF;
return bRet;
@@ -2301,24 +2301,24 @@ CFX_WideString CPDFSDK_InterForm::GetTemporaryFileName(const CFX_WideString& sFi
return L"";
}
-bool CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination, bool bUrlEncoded)
+FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination, FX_BOOL bUrlEncoded)
{
- if (sDestination.IsEmpty()) return false;
+ if (sDestination.IsEmpty()) return FALSE;
CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
ASSERT(pEnv != NULL);
- if(NULL == m_pDocument) return false;
+ if(NULL == m_pDocument) return FALSE;
CFX_WideString wsPDFFilePath = m_pDocument->GetPath();
- if(NULL == m_pInterForm) return false;
+ if(NULL == m_pInterForm) return FALSE;
CFDF_Document* pFDFDoc = m_pInterForm->ExportToFDF(wsPDFFilePath);
- if (NULL == pFDFDoc) return false;
+ if (NULL == pFDFDoc) return FALSE;
CFX_ByteTextBuf FdfBuffer;
- bool bRet = pFDFDoc->WriteBuf(FdfBuffer);
+ FX_BOOL bRet = pFDFDoc->WriteBuf(FdfBuffer);
delete pFDFDoc;
- if (!bRet) return false;
+ if (!bRet) return FALSE;
uint8_t* pBuffer = FdfBuffer.GetBuffer();
FX_STRSIZE nBufSize = FdfBuffer.GetLength();
@@ -2326,7 +2326,7 @@ bool CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination, bool bUrl
if (bUrlEncoded)
{
if(!FDFToURLEncodedData(pBuffer, nBufSize))
- return false;
+ return FALSE;
}
pEnv->JS_docSubmitForm(pBuffer, nBufSize, sDestination.c_str());
@@ -2337,26 +2337,26 @@ bool CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination, bool bUrl
pBuffer = NULL;
}
- return true;
+ return TRUE;
}
-bool CPDFSDK_InterForm::ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf)
+FX_BOOL CPDFSDK_InterForm::ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf)
{
ASSERT(m_pInterForm != NULL);
ASSERT(m_pDocument != NULL);
CFDF_Document* pFDF = m_pInterForm->ExportToFDF(m_pDocument->GetPath());
- if (!pFDF) return false;
+ if (!pFDF) return FALSE;
- bool bRet = pFDF->WriteBuf(textBuf);
+ FX_BOOL bRet = pFDF->WriteBuf(textBuf);
delete pFDF;
return bRet;
}
-bool CPDFSDK_InterForm::DoAction_ResetForm(const CPDF_Action& action)
+FX_BOOL CPDFSDK_InterForm::DoAction_ResetForm(const CPDF_Action& action)
{
ASSERT(action);
@@ -2370,15 +2370,15 @@ bool CPDFSDK_InterForm::DoAction_ResetForm(const CPDF_Action& action)
af.GetAllFields(fieldObjects);
CFX_PtrArray fields;
GetFieldFromObjects(fieldObjects, fields);
- return m_pInterForm->ResetForm(fields, !(dwFlags & 0x01), true);
+ return m_pInterForm->ResetForm(fields, !(dwFlags & 0x01), TRUE);
}
- return m_pInterForm->ResetForm(true);
+ return m_pInterForm->ResetForm(TRUE);
}
-bool CPDFSDK_InterForm::DoAction_ImportData(const CPDF_Action& action)
+FX_BOOL CPDFSDK_InterForm::DoAction_ImportData(const CPDF_Action& action)
{
- return false;
+ return FALSE;
}
void CPDFSDK_InterForm::GetFieldFromObjects(const CFX_PtrArray& objects, CFX_PtrArray& fields)
@@ -2415,7 +2415,7 @@ int CPDFSDK_InterForm::BeforeValueChange(const CPDF_FormField* pField, CFX_WideS
int nType = pFormField->GetFieldType();
if (nType == FIELDTYPE_COMBOBOX || nType == FIELDTYPE_TEXTFIELD)
{
- bool bRC = true;
+ FX_BOOL bRC = TRUE;
OnKeyStrokeCommit(pFormField, csValue, bRC);
if (bRC)
{
@@ -2434,12 +2434,12 @@ int CPDFSDK_InterForm::AfterValueChange(const CPDF_FormField* pField)
if (nType == FIELDTYPE_COMBOBOX || nType == FIELDTYPE_TEXTFIELD)
{
OnCalculate(pFormField);
- bool bFormated = false;
+ FX_BOOL bFormated = FALSE;
CFX_WideString sValue = OnFormat(pFormField, bFormated);
if (bFormated)
- ResetFieldAppearance(pFormField, sValue.c_str(), true);
+ ResetFieldAppearance(pFormField, sValue.c_str(), TRUE);
else
- ResetFieldAppearance(pFormField, NULL, true);
+ ResetFieldAppearance(pFormField, NULL, TRUE);
UpdateField(pFormField);
}
return 0;
@@ -2451,7 +2451,7 @@ int CPDFSDK_InterForm::BeforeSelectionChange(const CPDF_FormField* pField, CFX_W
if (pFormField->GetFieldType() != FIELDTYPE_LISTBOX)
return 0;
- bool bRC = true;
+ FX_BOOL bRC = TRUE;
OnKeyStrokeCommit(pFormField, csValue, bRC);
if (!bRC)
return -1;
@@ -2469,7 +2469,7 @@ int CPDFSDK_InterForm::AfterSelectionChange(const CPDF_FormField* pField)
if (pFormField->GetFieldType() == FIELDTYPE_LISTBOX)
{
OnCalculate(pFormField);
- ResetFieldAppearance(pFormField, NULL, true);
+ ResetFieldAppearance(pFormField, NULL, TRUE);
UpdateField(pFormField);
}
return 0;
@@ -2509,16 +2509,16 @@ int CPDFSDK_InterForm::AfterFormImportData(const CPDF_InterForm* pForm)
return 0;
}
-bool CPDFSDK_InterForm::IsNeedHighLight(int nFieldType)
+FX_BOOL CPDFSDK_InterForm::IsNeedHighLight(int nFieldType)
{
if(nFieldType <1 || nFieldType > 6)
- return false;
+ return FALSE;
return m_bNeedHightlight[nFieldType-1];
}
void CPDFSDK_InterForm::RemoveAllHighLight()
{
- memset((void*)m_bNeedHightlight, 0, 6*sizeof(bool));
+ memset((void*)m_bNeedHightlight, 0, 6*sizeof(FX_BOOL));
}
void CPDFSDK_InterForm::SetHighlightColor(FX_COLORREF clr, int nFieldType)
{
@@ -2530,14 +2530,14 @@ void CPDFSDK_InterForm::SetHighlightColor(FX_COLORREF clr, int nFieldType)
for(int i=0; i<6; i++)
{
m_aHighlightColor[i] = clr;
- m_bNeedHightlight[i] = true;
+ m_bNeedHightlight[i] = TRUE;
}
break;
}
default:
{
m_aHighlightColor[nFieldType-1] = clr;
- m_bNeedHightlight[nFieldType-1] = true;
+ m_bNeedHightlight[nFieldType-1] = TRUE;
break;
}
}
@@ -2783,7 +2783,7 @@ void CBA_AnnotIterator::GenerateResults()
if (sa.GetSize() > 0)
{
- sa.Sort(CBA_AnnotIterator::CompareByTop, false);
+ sa.Sort(CBA_AnnotIterator::CompareByTop, FALSE);
}
while (sa.GetSize() > 0)
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index da405cd8ef..05c1a3dd89 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -26,10 +26,10 @@ public:
virtual void InvalidateRect(FX_HWND hWnd, FX_RECT rect) ;
virtual void OutputSelectedRect(void* pFormFiller, CPDF_Rect& rect);
- virtual bool IsSelectionImplemented();
+ virtual FX_BOOL IsSelectionImplemented();
virtual CFX_WideString GetClipboardText(FX_HWND hWnd){return L"";}
- virtual bool SetClipboardText(FX_HWND hWnd, CFX_WideString string) {return false;}
+ virtual FX_BOOL SetClipboardText(FX_HWND hWnd, CFX_WideString string) {return FALSE;}
virtual void ClientToScreen(FX_HWND hWnd, int32_t& x, int32_t& y) {}
virtual void ScreenToClient(FX_HWND hWnd, int32_t& x, int32_t& y) {}
@@ -45,23 +45,23 @@ public:
virtual void SetCursor(int32_t nCursorType);
virtual FX_HMENU CreatePopupMenu() {return NULL;}
- virtual bool AppendMenuItem(FX_HMENU hMenu, int32_t nIDNewItem, CFX_WideString string) {return false;}
- virtual bool EnableMenuItem(FX_HMENU hMenu, int32_t nIDItem, bool bEnabled) {return false;}
+ virtual FX_BOOL AppendMenuItem(FX_HMENU hMenu, int32_t nIDNewItem, CFX_WideString string) {return FALSE;}
+ virtual FX_BOOL EnableMenuItem(FX_HMENU hMenu, int32_t nIDItem, FX_BOOL bEnabled) {return FALSE;}
virtual int32_t TrackPopupMenu(FX_HMENU hMenu, int32_t x, int32_t y, FX_HWND hParent) {return -1;}
virtual void DestroyMenu(FX_HMENU hMenu) {}
virtual CFX_ByteString GetNativeTrueTypeFont(int32_t nCharset);
- virtual bool FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString sFontFaceName);
+ virtual FX_BOOL FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString sFontFaceName);
virtual CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, CFX_ByteString sFontFaceName, uint8_t nCharset);
virtual int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc) ;
virtual void KillTimer(int32_t nID) ;
- virtual bool IsSHIFTKeyDown(FX_DWORD nFlag) {return m_pEnv->FFI_IsSHIFTKeyDown(nFlag);}
- virtual bool IsCTRLKeyDown(FX_DWORD nFlag) {return m_pEnv->FFI_IsCTRLKeyDown(nFlag);}
- virtual bool IsALTKeyDown(FX_DWORD nFlag) {return m_pEnv->FFI_IsALTKeyDown(nFlag);}
- virtual bool IsINSERTKeyDown(FX_DWORD nFlag) {return m_pEnv->FFI_IsINSERTKeyDown(nFlag);}
+ virtual FX_BOOL IsSHIFTKeyDown(FX_DWORD nFlag) {return m_pEnv->FFI_IsSHIFTKeyDown(nFlag);}
+ virtual FX_BOOL IsCTRLKeyDown(FX_DWORD nFlag) {return m_pEnv->FFI_IsCTRLKeyDown(nFlag);}
+ virtual FX_BOOL IsALTKeyDown(FX_DWORD nFlag) {return m_pEnv->FFI_IsALTKeyDown(nFlag);}
+ virtual FX_BOOL IsINSERTKeyDown(FX_DWORD nFlag) {return m_pEnv->FFI_IsINSERTKeyDown(nFlag);}
virtual FX_SYSTEMTIME GetLocalTime();
@@ -122,15 +122,15 @@ void CFX_SystemHandler::OutputSelectedRect(void* pFormFiller, CPDF_Rect& rect)
}
-bool CFX_SystemHandler::IsSelectionImplemented()
+FX_BOOL CFX_SystemHandler::IsSelectionImplemented()
{
if(m_pEnv)
{
FPDF_FORMFILLINFO* pInfo = m_pEnv->GetFormFillInfo();
if(pInfo && pInfo->FFI_OutputSelectedRect)
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
CFX_ByteString CFX_SystemHandler::GetNativeTrueTypeFont(int32_t nCharset)
@@ -138,7 +138,7 @@ CFX_ByteString CFX_SystemHandler::GetNativeTrueTypeFont(int32_t nCharset)
return "";
}
-bool CFX_SystemHandler::FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString sFontFaceName)
+FX_BOOL CFX_SystemHandler::FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString sFontFaceName)
{
CFX_FontMgr* pFontMgr = CFX_GEModule::Get()->GetFontMgr();
if(pFontMgr)
@@ -156,13 +156,13 @@ bool CFX_SystemHandler::FindNativeTrueTypeFont(int32_t nCharset, CFX_ByteString
for(int i=0; i<nSize; i++)
{
if(pFontMapper->m_InstalledTTFonts[i].Compare(sFontFaceName))
- return true;
+ return TRUE;
}
}
}
- return false;
+ return FALSE;
}
static int CharSet2CP(int charset)
@@ -183,8 +183,8 @@ CPDF_Font* CFX_SystemHandler::AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, CF
if(pDoc)
{
CFX_Font* pFXFont = new CFX_Font();
- pFXFont->LoadSubst(sFontFaceName,true,0,0,0,CharSet2CP(nCharset),false);
- CPDF_Font* pFont = pDoc->AddFont(pFXFont,nCharset,false);
+ pFXFont->LoadSubst(sFontFaceName,TRUE,0,0,0,CharSet2CP(nCharset),FALSE);
+ CPDF_Font* pFont = pDoc->AddFont(pFXFont,nCharset,FALSE);
delete pFXFont;
return pFont;
}
@@ -409,7 +409,7 @@ CPDFSDK_Document::CPDFSDK_Document(CPDF_Document* pDoc,CPDFDoc_Environment* pEnv
m_pFocusAnnot(nullptr),
m_pEnv(pEnv),
m_pOccontent(nullptr),
- m_bChangeMask(false)
+ m_bChangeMask(FALSE)
{
}
@@ -426,7 +426,7 @@ CPDFSDK_Document::~CPDFSDK_Document()
m_pOccontent = nullptr;
}
-CPDFSDK_PageView* CPDFSDK_Document::GetPageView(CPDF_Page* pPDFPage, bool ReNew)
+CPDFSDK_PageView* CPDFSDK_Document::GetPageView(CPDF_Page* pPDFPage, FX_BOOL ReNew)
{
auto it = m_pageMap.find(pPDFPage);
if (it != m_pageMap.end())
@@ -445,7 +445,7 @@ CPDFSDK_PageView* CPDFSDK_Document::GetPageView(CPDF_Page* pPDFPage, bool ReNew)
CPDFSDK_PageView* CPDFSDK_Document::GetCurrentView()
{
CPDF_Page* pPage = (CPDF_Page*)m_pEnv->FFI_GetCurrentPage(m_pDoc);
- return pPage ? GetPageView(pPage, true) : nullptr;
+ return pPage ? GetPageView(pPage, TRUE) : nullptr;
}
CPDFSDK_PageView* CPDFSDK_Document::GetPageView(int nIndex)
@@ -474,24 +474,24 @@ void CPDFSDK_Document:: ProcJavascriptFun()
}
-bool CPDFSDK_Document::ProcOpenAction()
+FX_BOOL CPDFSDK_Document::ProcOpenAction()
{
if(!m_pDoc)
- return false;
+ return FALSE;
CPDF_Dictionary* pRoot = m_pDoc->GetRoot();
if (!pRoot)
- return false;
+ return FALSE;
CPDF_Object* pOpenAction = pRoot->GetDict("OpenAction");
if(!pOpenAction)
pOpenAction = pRoot->GetArray("OpenAction");
if(!pOpenAction)
- return false;
+ return FALSE;
if(pOpenAction->GetType()==PDFOBJ_ARRAY)
- return true;
+ return TRUE;
if(pOpenAction->GetType()==PDFOBJ_DICTIONARY)
{
@@ -499,9 +499,9 @@ bool CPDFSDK_Document::ProcOpenAction()
CPDF_Action action(pDict);
if(m_pEnv->GetActionHander())
m_pEnv->GetActionHander()->DoAction_DocOpen(action, this);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
CPDF_OCContext* CPDFSDK_Document::GetOCContext()
@@ -555,14 +555,14 @@ CPDFSDK_Annot* CPDFSDK_Document::GetFocusAnnot()
return m_pFocusAnnot;
}
-bool CPDFSDK_Document::SetFocusAnnot(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
+FX_BOOL CPDFSDK_Document::SetFocusAnnot(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
{
- if(m_pFocusAnnot==pAnnot) return true;
+ if(m_pFocusAnnot==pAnnot) return TRUE;
if(m_pFocusAnnot)
{
- if(!KillFocusAnnot(nFlag) ) return false;
+ if(!KillFocusAnnot(nFlag) ) return FALSE;
}
CPDFSDK_PageView* pPageView = pAnnot->GetPageView();
if(pAnnot && pPageView->IsValid())
@@ -572,18 +572,18 @@ bool CPDFSDK_Document::SetFocusAnnot(CPDFSDK_Annot* pAnnot,FX_UINT nFlag)
if(pAnnotHandler&&!m_pFocusAnnot)
{
if (!pAnnotHandler->Annot_OnSetFocus(pAnnot,nFlag))
- return false;
+ return FALSE;
if(!m_pFocusAnnot)
{
m_pFocusAnnot=pAnnot;
- return true;
+ return TRUE;
}
}
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_Document::KillFocusAnnot(FX_UINT nFlag)
+FX_BOOL CPDFSDK_Document::KillFocusAnnot(FX_UINT nFlag)
{
if(m_pFocusAnnot)
{
@@ -600,11 +600,11 @@ bool CPDFSDK_Document::KillFocusAnnot(FX_UINT nFlag)
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pFocusAnnot;
int nFieldType = pWidget->GetFieldType();
if(FIELDTYPE_TEXTFIELD == nFieldType || FIELDTYPE_COMBOBOX == nFieldType)
- m_pEnv->FFI_OnSetFieldInputFocus(NULL, NULL, 0, false);
+ m_pEnv->FFI_OnSetFieldInputFocus(NULL, NULL, 0, FALSE);
}
if(!m_pFocusAnnot)
- return true;
+ return TRUE;
}
else
{
@@ -612,7 +612,7 @@ bool CPDFSDK_Document::KillFocusAnnot(FX_UINT nFlag)
}
}
}
- return false;
+ return FALSE;
}
void CPDFSDK_Document::OnCloseDocument()
@@ -620,7 +620,7 @@ void CPDFSDK_Document::OnCloseDocument()
KillFocusAnnot();
}
-bool CPDFSDK_Document::GetPermissions(int nFlag)
+FX_BOOL CPDFSDK_Document::GetPermissions(int nFlag)
{
FX_DWORD dwPermissions = m_pDoc->GetUserPermissions();
return dwPermissions&nFlag;
@@ -650,13 +650,13 @@ CPDFSDK_PageView::CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc,CPDF_Page* page):m_
m_page->SetPrivateData((void*)m_page, (void*)this, NULL);
m_fxAnnotArray.RemoveAll();
- m_bEnterWidget = false;
- m_bExitWidget = false;
- m_bOnWidget = false;
+ m_bEnterWidget = FALSE;
+ m_bExitWidget = FALSE;
+ m_bOnWidget = FALSE;
m_CaptureWidget = NULL;
- m_bValid = false;
- m_bLocked = false;
- m_bTakeOverPage = false;
+ m_bValid = FALSE;
+ m_bLocked = FALSE;
+ m_bTakeOverPage = FALSE;
}
CPDFSDK_PageView::~CPDFSDK_PageView()
@@ -690,7 +690,7 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice, CPDF_Matrix* p
m_curMatrix = *pUser2Device;
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
- CPDFSDK_AnnotIterator annotIterator(this, true);
+ CPDFSDK_AnnotIterator annotIterator(this, TRUE);
CPDFSDK_Annot* pSDKAnnot = nullptr;
int index = -1;
while ((pSDKAnnot = annotIterator.Next(index))) {
@@ -737,7 +737,7 @@ CPDF_Annot* CPDFSDK_PageView::GetPDFWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY
CPDFSDK_Annot* CPDFSDK_PageView::GetFXAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY)
{
- CPDFSDK_AnnotIterator annotIterator(this, false);
+ CPDFSDK_AnnotIterator annotIterator(this, FALSE);
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotMgr = pEnv->GetAnnotHandlerMgr();
CPDFSDK_Annot* pSDKAnnot = NULL;
@@ -755,7 +755,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetFXAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT page
CPDFSDK_Annot* CPDFSDK_PageView::GetFXWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY)
{
- CPDFSDK_AnnotIterator annotIterator(this, false);
+ CPDFSDK_AnnotIterator annotIterator(this, FALSE);
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotMgr = pEnv->GetAnnotHandlerMgr();
CPDFSDK_Annot* pSDKAnnot = NULL;
@@ -775,12 +775,12 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetFXWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pag
}
-bool CPDFSDK_PageView::Annot_HasAppearance(CPDF_Annot* pAnnot)
+FX_BOOL CPDFSDK_PageView::Annot_HasAppearance(CPDF_Annot* pAnnot)
{
CPDF_Dictionary* pAnnotDic = pAnnot->GetAnnotDict();
if(pAnnotDic)
return pAnnotDic->KeyExist("AS");
- return false;
+ return FALSE;
}
CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Annot * pPDFAnnot)
@@ -819,9 +819,9 @@ CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(const FX_CHAR* lpSubType,CPDF_Dictiona
return NULL;
}
-bool CPDFSDK_PageView::DeleteAnnot(CPDFSDK_Annot* pAnnot)
+FX_BOOL CPDFSDK_PageView::DeleteAnnot(CPDFSDK_Annot* pAnnot)
{
- return false;
+ return FALSE;
}
CPDF_Document* CPDFSDK_PageView::GetPDFDocument()
@@ -861,7 +861,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByDict(CPDF_Dictionary * pDict)
return NULL;
}
-bool CPDFSDK_PageView::OnLButtonDown(const CPDF_Point & point, FX_UINT nFlag)
+FX_BOOL CPDFSDK_PageView::OnLButtonDown(const CPDF_Point & point, FX_UINT nFlag)
{
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
ASSERT(pEnv);
@@ -875,18 +875,18 @@ bool CPDFSDK_PageView::OnLButtonDown(const CPDF_Point & point, FX_UINT nFlag)
CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr();
ASSERT(pAnnotHandlerMgr);
- bool bRet = pAnnotHandlerMgr->Annot_OnLButtonDown(this, pFXAnnot, nFlag,point);
+ FX_BOOL bRet = pAnnotHandlerMgr->Annot_OnLButtonDown(this, pFXAnnot, nFlag,point);
if(bRet)
{
SetFocusAnnot(pFXAnnot);
}
return bRet;
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_PageView::OnLButtonUp(const CPDF_Point & point, FX_UINT nFlag)
+FX_BOOL CPDFSDK_PageView::OnLButtonUp(const CPDF_Point & point, FX_UINT nFlag)
{
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
ASSERT(pEnv);
@@ -894,7 +894,7 @@ bool CPDFSDK_PageView::OnLButtonUp(const CPDF_Point & point, FX_UINT nFlag)
ASSERT(pAnnotHandlerMgr);
CPDFSDK_Annot* pFXAnnot = GetFXWidgetAtPoint(point.x, point.y);
CPDFSDK_Annot* pFocusAnnot = GetFocusAnnot();
- bool bRet = false;
+ FX_BOOL bRet = FALSE;
if(pFocusAnnot && pFocusAnnot != pFXAnnot)
{
//Last focus Annot gets a chance to handle the event.
@@ -908,7 +908,7 @@ bool CPDFSDK_PageView::OnLButtonUp(const CPDF_Point & point, FX_UINT nFlag)
return bRet;
}
-bool CPDFSDK_PageView::OnMouseMove(const CPDF_Point & point, int nFlag)
+FX_BOOL CPDFSDK_PageView::OnMouseMove(const CPDF_Point & point, int nFlag)
{
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
@@ -918,36 +918,36 @@ bool CPDFSDK_PageView::OnMouseMove(const CPDF_Point & point, int nFlag)
{
if(m_CaptureWidget && m_CaptureWidget != pFXAnnot)
{
- m_bExitWidget = true;
- m_bEnterWidget = false;
+ m_bExitWidget = TRUE;
+ m_bEnterWidget = FALSE;
pAnnotHandlerMgr->Annot_OnMouseExit(this, m_CaptureWidget, nFlag);
}
m_CaptureWidget = (CPDFSDK_Widget*)pFXAnnot;
- m_bOnWidget = true;
+ m_bOnWidget = TRUE;
if(!m_bEnterWidget)
{
- m_bEnterWidget = true;
- m_bExitWidget = false;
+ m_bEnterWidget = TRUE;
+ m_bExitWidget = FALSE;
pAnnotHandlerMgr->Annot_OnMouseEnter(this, pFXAnnot,nFlag);
}
pAnnotHandlerMgr->Annot_OnMouseMove(this, pFXAnnot, nFlag, point);
- return true;
+ return TRUE;
}
if(m_bOnWidget)
{
- m_bOnWidget = false;
- m_bExitWidget = true;
- m_bEnterWidget = false;
+ m_bOnWidget = FALSE;
+ m_bExitWidget = TRUE;
+ m_bEnterWidget = FALSE;
if(m_CaptureWidget)
{
pAnnotHandlerMgr->Annot_OnMouseExit(this, m_CaptureWidget, nFlag);
m_CaptureWidget = NULL;
}
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_PageView::OnMouseWheel(double deltaX, double deltaY,const CPDF_Point& point, int nFlag)
+FX_BOOL CPDFSDK_PageView::OnMouseWheel(double deltaX, double deltaY,const CPDF_Point& point, int nFlag)
{
if(CPDFSDK_Annot* pAnnot = GetFXWidgetAtPoint(point.x, point.y))
{
@@ -956,11 +956,11 @@ bool CPDFSDK_PageView::OnMouseWheel(double deltaX, double deltaY,const CPDF_Poin
ASSERT(pAnnotHandlerMgr);
return pAnnotHandlerMgr->Annot_OnMouseWheel(this, pAnnot, nFlag, (int)deltaY, point);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_PageView::OnChar(int nChar, FX_UINT nFlag)
+FX_BOOL CPDFSDK_PageView::OnChar(int nChar, FX_UINT nFlag)
{
if(CPDFSDK_Annot* pAnnot = GetFocusAnnot())
{
@@ -970,10 +970,10 @@ bool CPDFSDK_PageView::OnChar(int nChar, FX_UINT nFlag)
return pAnnotHandlerMgr->Annot_OnChar(pAnnot, nChar, nFlag);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_PageView::OnKeyDown(int nKeyCode, int nFlag)
+FX_BOOL CPDFSDK_PageView::OnKeyDown(int nKeyCode, int nFlag)
{
if(CPDFSDK_Annot* pAnnot = GetFocusAnnot())
{
@@ -982,17 +982,17 @@ bool CPDFSDK_PageView::OnKeyDown(int nKeyCode, int nFlag)
ASSERT(pAnnotHandlerMgr);
return pAnnotHandlerMgr->Annot_OnKeyDown(pAnnot, nKeyCode, nFlag);
}
- return false;
+ return FALSE;
}
-bool CPDFSDK_PageView::OnKeyUp(int nKeyCode, int nFlag)
+FX_BOOL CPDFSDK_PageView::OnKeyUp(int nKeyCode, int nFlag)
{
// if(CPDFSDK_Annot* pAnnot = GetFocusAnnot())
// {
// CFFL_IFormFiller* pIFormFiller = g_pFormFillApp->GetIFormFiller();
// return pIFormFiller->OnKeyUp(pAnnot, nKeyCode, nFlag);
// }
- return false;
+ return FALSE;
}
extern void CheckUnSupportAnnot(CPDF_Document * pDoc, CPDF_Annot* pPDFAnnot);
@@ -1001,13 +1001,13 @@ void CPDFSDK_PageView::LoadFXAnnots()
{
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
- bool enableAPUpdate = CPDF_InterForm::UpdatingAPEnabled();
+ FX_BOOL enableAPUpdate = CPDF_InterForm::UpdatingAPEnabled();
//Disable the default AP construction.
- CPDF_InterForm::EnableUpdateAP(false);
+ CPDF_InterForm::EnableUpdateAP(FALSE);
m_pAnnotList = new CPDF_AnnotList(m_page);
CPDF_InterForm::EnableUpdateAP(enableAPUpdate);
int nCount = m_pAnnotList->Count();
- SetLock(true);
+ SetLock(TRUE);
for(int i=0; i<nCount; i++)
{
CPDF_Annot* pPDFAnnot = m_pAnnotList->GetAt(i);
@@ -1029,7 +1029,7 @@ void CPDFSDK_PageView::LoadFXAnnots()
}
}
- SetLock(false);
+ SetLock(FALSE);
}
void CPDFSDK_PageView::UpdateRects(CFX_RectArray& rects)
@@ -1064,16 +1064,16 @@ int CPDFSDK_PageView::GetPageIndex()
return -1;
}
-bool CPDFSDK_PageView::IsValidAnnot(void* p)
+FX_BOOL CPDFSDK_PageView::IsValidAnnot(void* p)
{
- if (p == NULL) return false;
+ if (p == NULL) return FALSE;
int iCount = m_pAnnotList->Count();
for (int i = 0; i < iCount; i++)
{
if (m_pAnnotList->GetAt(i) == p)
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
diff --git a/fpdfsdk/src/fsdk_rendercontext.cpp b/fpdfsdk/src/fsdk_rendercontext.cpp
index 2bc3ea812b..f96db94150 100644
--- a/fpdfsdk/src/fsdk_rendercontext.cpp
+++ b/fpdfsdk/src/fsdk_rendercontext.cpp
@@ -38,10 +38,10 @@ IFSDK_PAUSE_Adapter::IFSDK_PAUSE_Adapter(IFSDK_PAUSE* IPause )
m_IPause = IPause;
}
-bool IFSDK_PAUSE_Adapter::NeedToPauseNow()
+FX_BOOL IFSDK_PAUSE_Adapter::NeedToPauseNow()
{
if (m_IPause->NeedToPauseNow) {
return m_IPause->NeedToPauseNow(m_IPause);
}
- return false;
+ return FALSE;
}
diff --git a/fpdfsdk/src/fxedit/fxet_ap.cpp b/fpdfsdk/src/fxedit/fxet_ap.cpp
index 7f2843cc29..309a98f41e 100644
--- a/fpdfsdk/src/fxedit/fxet_ap.cpp
+++ b/fpdfsdk/src/fxedit/fxet_ap.cpp
@@ -66,7 +66,7 @@ static CFX_ByteString GetFontSetString(IFX_Edit_FontMap * pFontMap, int32_t nFon
}
CFX_ByteString IFX_Edit::GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset,
- const CPVT_WordRange * pRange /* = NULL*/, bool bContinuous/* = true*/, FX_WORD SubWord/* = 0*/)
+ const CPVT_WordRange * pRange /* = NULL*/, FX_BOOL bContinuous/* = TRUE*/, FX_WORD SubWord/* = 0*/)
{
CFX_ByteTextBuf sEditStream, sWords;
diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp
index b1ad59dedb..63115c2626 100644
--- a/fpdfsdk/src/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/src/fxedit/fxet_edit.cpp
@@ -21,70 +21,70 @@ CFX_Edit_Iterator::~CFX_Edit_Iterator()
{
}
-bool CFX_Edit_Iterator::NextWord()
+FX_BOOL CFX_Edit_Iterator::NextWord()
{
return m_pVTIterator->NextWord();
}
-bool CFX_Edit_Iterator::NextLine()
+FX_BOOL CFX_Edit_Iterator::NextLine()
{
return m_pVTIterator->NextLine();
}
-bool CFX_Edit_Iterator::NextSection()
+FX_BOOL CFX_Edit_Iterator::NextSection()
{
return m_pVTIterator->NextSection();
}
-bool CFX_Edit_Iterator::PrevWord()
+FX_BOOL CFX_Edit_Iterator::PrevWord()
{
return m_pVTIterator->PrevWord();
}
-bool CFX_Edit_Iterator::PrevLine()
+FX_BOOL CFX_Edit_Iterator::PrevLine()
{
return m_pVTIterator->PrevLine();
}
-bool CFX_Edit_Iterator::PrevSection()
+FX_BOOL CFX_Edit_Iterator::PrevSection()
{
return m_pVTIterator->PrevSection();
}
-bool CFX_Edit_Iterator::GetWord(CPVT_Word & word) const
+FX_BOOL CFX_Edit_Iterator::GetWord(CPVT_Word & word) const
{
ASSERT(m_pEdit);
if (m_pVTIterator->GetWord(word))
{
word.ptWord = m_pEdit->VTToEdit(word.ptWord);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CFX_Edit_Iterator::GetLine(CPVT_Line & line) const
+FX_BOOL CFX_Edit_Iterator::GetLine(CPVT_Line & line) const
{
ASSERT(m_pEdit);
if (m_pVTIterator->GetLine(line))
{
line.ptLine = m_pEdit->VTToEdit(line.ptLine);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CFX_Edit_Iterator::GetSection(CPVT_Section & section) const
+FX_BOOL CFX_Edit_Iterator::GetSection(CPVT_Section & section) const
{
ASSERT(m_pEdit);
if (m_pVTIterator->GetSection(section))
{
section.rcSection = m_pEdit->VTToEdit(section.rcSection);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void CFX_Edit_Iterator::SetAt(int32_t nWordIndex)
@@ -167,7 +167,7 @@ int32_t CFX_Edit_Provider::GetDefaultFontIndex()
return 0;
}
-bool CFX_Edit_Provider::IsLatinWord(FX_WORD word)
+FX_BOOL CFX_Edit_Provider::IsLatinWord(FX_WORD word)
{
return FX_EDIT_ISLATINWORD(word);
}
@@ -210,7 +210,7 @@ void CFX_Edit_Refresh::NoAnalyse()
void CFX_Edit_Refresh::Analyse(int32_t nAlignment)
{
- bool bLineTopChanged = false;
+ FX_BOOL bLineTopChanged = FALSE;
CPDF_Rect rcResult;
FX_FLOAT fWidthDiff;
@@ -238,7 +238,7 @@ void CFX_Edit_Refresh::Analyse(int32_t nAlignment)
{
if (!pNewRect->IsSameTop(*pOldRect) || !pNewRect->IsSameHeight(*pOldRect))
{
- bLineTopChanged = true;
+ bLineTopChanged = TRUE;
continue;
}
@@ -324,9 +324,9 @@ void CFX_Edit_Refresh::EndRefresh()
CFX_Edit_Undo::CFX_Edit_Undo(int32_t nBufsize) : m_nCurUndoPos(0),
m_nBufSize(nBufsize),
- m_bModified(false),
- m_bVirgin(true),
- m_bWorking(false)
+ m_bModified(FALSE),
+ m_bVirgin(TRUE),
+ m_bWorking(FALSE)
{
}
@@ -335,14 +335,14 @@ CFX_Edit_Undo::~CFX_Edit_Undo()
Reset();
}
-bool CFX_Edit_Undo::CanUndo() const
+FX_BOOL CFX_Edit_Undo::CanUndo() const
{
return m_nCurUndoPos > 0;
}
void CFX_Edit_Undo::Undo()
{
- m_bWorking = true;
+ m_bWorking = TRUE;
if (m_nCurUndoPos > 0)
{
@@ -355,17 +355,17 @@ void CFX_Edit_Undo::Undo()
m_bModified = (m_nCurUndoPos != 0);
}
- m_bWorking = false;
+ m_bWorking = FALSE;
}
-bool CFX_Edit_Undo::CanRedo() const
+FX_BOOL CFX_Edit_Undo::CanRedo() const
{
return m_nCurUndoPos < m_UndoItemStack.GetSize();
}
void CFX_Edit_Undo::Redo()
{
- m_bWorking = true;
+ m_bWorking = TRUE;
int32_t nStackSize = m_UndoItemStack.GetSize();
@@ -380,10 +380,10 @@ void CFX_Edit_Undo::Redo()
m_bModified = (m_nCurUndoPos != 0);
}
- m_bWorking = false;
+ m_bWorking = FALSE;
}
-bool CFX_Edit_Undo::IsWorking() const
+FX_BOOL CFX_Edit_Undo::IsWorking() const
{
return m_bWorking;
}
@@ -400,7 +400,7 @@ void CFX_Edit_Undo::AddItem(IFX_Edit_UndoItem* pItem)
if (m_UndoItemStack.GetSize() >= m_nBufSize)
{
RemoveHeads();
- m_bVirgin = false;
+ m_bVirgin = FALSE;
}
m_UndoItemStack.Add(pItem);
@@ -409,9 +409,9 @@ void CFX_Edit_Undo::AddItem(IFX_Edit_UndoItem* pItem)
m_bModified = (m_nCurUndoPos != 0);
}
-bool CFX_Edit_Undo::IsModified() const
+FX_BOOL CFX_Edit_Undo::IsModified() const
{
- return m_bVirgin ? m_bModified : true;
+ return m_bVirgin ? m_bModified : TRUE;
}
IFX_Edit_UndoItem* CFX_Edit_Undo::GetItem(int32_t nIndex)
@@ -469,8 +469,8 @@ void CFX_Edit_GroupUndoItem::AddUndoItem(CFX_Edit_UndoItem* pUndoItem)
{
ASSERT(pUndoItem != NULL);
- pUndoItem->SetFirst(false);
- pUndoItem->SetLast(false);
+ pUndoItem->SetFirst(FALSE);
+ pUndoItem->SetLast(FALSE);
m_Items.Add(pUndoItem);
@@ -484,11 +484,11 @@ void CFX_Edit_GroupUndoItem::UpdateItems()
{
CFX_Edit_UndoItem* pFirstItem = m_Items[0];
ASSERT(pFirstItem != NULL);
- pFirstItem->SetFirst(true);
+ pFirstItem->SetFirst(TRUE);
CFX_Edit_UndoItem* pLastItem = m_Items[m_Items.GetSize() - 1];
ASSERT(pLastItem != NULL);
- pLastItem->SetLast(true);
+ pLastItem->SetLast(TRUE);
}
}
@@ -539,7 +539,7 @@ void CFXEU_InsertWord::Redo()
{
m_pEdit->SelectNone();
m_pEdit->SetCaret(m_wpOld);
- m_pEdit->InsertWord(m_Word,m_nCharset,&m_WordProps,false,true);
+ m_pEdit->InsertWord(m_Word,m_nCharset,&m_WordProps,FALSE,TRUE);
}
}
@@ -549,7 +549,7 @@ void CFXEU_InsertWord::Undo()
{
m_pEdit->SelectNone();
m_pEdit->SetCaret(m_wpNew);
- m_pEdit->Backspace(false,true);
+ m_pEdit->Backspace(FALSE,TRUE);
}
}
@@ -579,7 +579,7 @@ void CFXEU_InsertReturn::Redo()
{
m_pEdit->SelectNone();
m_pEdit->SetCaret(m_wpOld);
- m_pEdit->InsertReturn(&m_SecProps,&m_WordProps,false,true);
+ m_pEdit->InsertReturn(&m_SecProps,&m_WordProps,FALSE,TRUE);
}
}
@@ -589,7 +589,7 @@ void CFXEU_InsertReturn::Undo()
{
m_pEdit->SelectNone();
m_pEdit->SetCaret(m_wpNew);
- m_pEdit->Backspace(false,true);
+ m_pEdit->Backspace(FALSE,TRUE);
}
}
@@ -619,7 +619,7 @@ void CFXEU_Backspace::Redo()
{
m_pEdit->SelectNone();
m_pEdit->SetCaret(m_wpOld);
- m_pEdit->Backspace(false,true);
+ m_pEdit->Backspace(FALSE,TRUE);
}
}
@@ -631,11 +631,11 @@ void CFXEU_Backspace::Undo()
m_pEdit->SetCaret(m_wpNew);
if (m_wpNew.SecCmp(m_wpOld) != 0)
{
- m_pEdit->InsertReturn(&m_SecProps,&m_WordProps,false,true);
+ m_pEdit->InsertReturn(&m_SecProps,&m_WordProps,FALSE,TRUE);
}
else
{
- m_pEdit->InsertWord(m_Word,m_nCharset,&m_WordProps,false,true);
+ m_pEdit->InsertWord(m_Word,m_nCharset,&m_WordProps,FALSE,TRUE);
}
}
}
@@ -645,7 +645,7 @@ void CFXEU_Backspace::Undo()
CFXEU_Delete::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, bool bSecEnd) :
+ const CPVT_SecProps & SecProps, const CPVT_WordProps & WordProps, FX_BOOL bSecEnd) :
m_pEdit(pEdit),
m_wpOld(wpOldPlace),
m_wpNew(wpNewPlace),
@@ -667,7 +667,7 @@ void CFXEU_Delete::Redo()
{
m_pEdit->SelectNone();
m_pEdit->SetCaret(m_wpOld);
- m_pEdit->Delete(false,true);
+ m_pEdit->Delete(FALSE,TRUE);
}
}
@@ -679,11 +679,11 @@ void CFXEU_Delete::Undo()
m_pEdit->SetCaret(m_wpNew);
if (m_bSecEnd)
{
- m_pEdit->InsertReturn(&m_SecProps,&m_WordProps,false,true);
+ m_pEdit->InsertReturn(&m_SecProps,&m_WordProps,FALSE,TRUE);
}
else
{
- m_pEdit->InsertWord(m_Word,m_nCharset,&m_WordProps,false,true);
+ m_pEdit->InsertWord(m_Word,m_nCharset,&m_WordProps,FALSE,TRUE);
}
}
}
@@ -708,7 +708,7 @@ void CFXEU_Clear::Redo()
{
m_pEdit->SelectNone();
m_pEdit->SetSel(m_wrSel.BeginPos,m_wrSel.EndPos);
- m_pEdit->Clear(false,true);
+ m_pEdit->Clear(FALSE,TRUE);
}
}
@@ -718,7 +718,7 @@ void CFXEU_Clear::Undo()
{
m_pEdit->SelectNone();
m_pEdit->SetCaret(m_wrSel.BeginPos);
- m_pEdit->InsertText(m_swText.c_str(), DEFAULT_CHARSET, NULL, NULL, false, true);
+ m_pEdit->InsertText(m_swText.c_str(), DEFAULT_CHARSET, NULL, NULL, FALSE, TRUE);
m_pEdit->SetSel(m_wrSel.BeginPos,m_wrSel.EndPos);
}
}
@@ -750,7 +750,7 @@ void CFXEU_ClearRich::Redo()
{
m_pEdit->SelectNone();
m_pEdit->SetSel(m_wrSel.BeginPos,m_wrSel.EndPos);
- m_pEdit->Clear(false,true);
+ m_pEdit->Clear(FALSE,TRUE);
}
}
@@ -762,11 +762,11 @@ void CFXEU_ClearRich::Undo()
m_pEdit->SetCaret(m_wpOld);
if (m_wpNew.SecCmp(m_wpOld) != 0)
{
- m_pEdit->InsertReturn(&m_SecProps,&m_WordProps,false,false);
+ m_pEdit->InsertReturn(&m_SecProps,&m_WordProps,FALSE,FALSE);
}
else
{
- m_pEdit->InsertWord(m_Word,m_nCharset,&m_WordProps,false,false);
+ m_pEdit->InsertWord(m_Word,m_nCharset,&m_WordProps,FALSE,FALSE);
}
if (IsFirst())
@@ -806,7 +806,7 @@ void CFXEU_InsertText::Redo()
{
m_pEdit->SelectNone();
m_pEdit->SetCaret(m_wpOld);
- m_pEdit->InsertText(m_swText.c_str(), m_nCharset, &m_SecProps, &m_WordProps, false, true);
+ m_pEdit->InsertText(m_swText.c_str(), m_nCharset, &m_SecProps, &m_WordProps, FALSE, TRUE);
}
}
@@ -816,7 +816,7 @@ void CFXEU_InsertText::Undo()
{
m_pEdit->SelectNone();
m_pEdit->SetSel(m_wpOld,m_wpNew);
- m_pEdit->Clear(false,true);
+ m_pEdit->Clear(FALSE,TRUE);
}
}
@@ -844,7 +844,7 @@ void CFXEU_SetSecProps::Redo()
{
if (m_pEdit)
{
- m_pEdit->SetSecProps(m_eProps,m_wpPlace,&m_NewSecProps,&m_NewWordProps,m_wrPlace,false);
+ m_pEdit->SetSecProps(m_eProps,m_wpPlace,&m_NewSecProps,&m_NewWordProps,m_wrPlace,FALSE);
if (IsLast())
{
m_pEdit->SelectNone();
@@ -858,7 +858,7 @@ void CFXEU_SetSecProps::Undo()
{
if (m_pEdit)
{
- m_pEdit->SetSecProps(m_eProps,m_wpPlace,&m_OldSecProps,&m_OldWordProps,m_wrPlace,false);
+ m_pEdit->SetSecProps(m_eProps,m_wpPlace,&m_OldSecProps,&m_OldWordProps,m_wrPlace,FALSE);
if (IsFirst())
{
m_pEdit->SelectNone();
@@ -889,7 +889,7 @@ void CFXEU_SetWordProps::Redo()
{
if (m_pEdit)
{
- m_pEdit->SetWordProps(m_eProps,m_wpPlace,&m_NewWordProps,m_wrPlace,false);
+ m_pEdit->SetWordProps(m_eProps,m_wpPlace,&m_NewWordProps,m_wrPlace,FALSE);
if (IsLast())
{
m_pEdit->SelectNone();
@@ -903,7 +903,7 @@ void CFXEU_SetWordProps::Undo()
{
if (m_pEdit)
{
- m_pEdit->SetWordProps(m_eProps,m_wpPlace,&m_OldWordProps,m_wrPlace,false);
+ m_pEdit->SetWordProps(m_eProps,m_wpPlace,&m_OldWordProps,m_wrPlace,FALSE);
if (IsFirst())
{
m_pEdit->SelectNone();
@@ -925,18 +925,18 @@ CFX_Edit::CFX_Edit(IPDF_VariableText * pVT) :
m_SelState(),
m_ptScrollPos(0,0),
m_ptRefreshScrollPos(0,0),
- m_bEnableScroll(false),
+ m_bEnableScroll(FALSE),
m_pIterator(NULL),
m_ptCaret(0.0f,0.0f),
m_Undo(FX_EDIT_UNDO_MAXITEM),
m_nAlignment(0),
- m_bNotifyFlag(false),
- m_bEnableOverflow(false),
- m_bEnableRefresh(true),
+ m_bNotifyFlag(FALSE),
+ m_bEnableOverflow(FALSE),
+ m_bEnableRefresh(TRUE),
m_rcOldContent(0.0f,0.0f,0.0f,0.0f),
- m_bEnableUndo(true),
- m_bNotify(true),
- m_bOprNotify(false),
+ m_bEnableUndo(TRUE),
+ m_bNotify(TRUE),
+ m_bOprNotify(FALSE),
m_pGroupUndoItem(NULL)
{
ASSERT(pVT != NULL);
@@ -1002,92 +1002,92 @@ IFX_Edit_FontMap* CFX_Edit::GetFontMap()
return NULL;
}
-void CFX_Edit::SetPlateRect(const CPDF_Rect & rect, bool bPaint/* = true*/)
+void CFX_Edit::SetPlateRect(const CPDF_Rect & rect, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetPlateRect(rect);
m_ptScrollPos = CPDF_Point(rect.left,rect.top);
if (bPaint) Paint();
}
-void CFX_Edit::SetAlignmentH(int32_t nFormat/* =0 */, bool bPaint/* = true*/)
+void CFX_Edit::SetAlignmentH(int32_t nFormat/* =0 */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetAlignment(nFormat);
if (bPaint) Paint();
}
-void CFX_Edit::SetAlignmentV(int32_t nFormat/* =0 */, bool bPaint/* = true*/)
+void CFX_Edit::SetAlignmentV(int32_t nFormat/* =0 */, FX_BOOL bPaint/* = TRUE*/)
{
m_nAlignment = nFormat;
if (bPaint) Paint();
}
-void CFX_Edit::SetPasswordChar(FX_WORD wSubWord/* ='*' */, bool bPaint/* = true*/)
+void CFX_Edit::SetPasswordChar(FX_WORD wSubWord/* ='*' */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetPasswordChar(wSubWord);
if (bPaint) Paint();
}
-void CFX_Edit::SetLimitChar(int32_t nLimitChar/* =0 */, bool bPaint/* = true*/)
+void CFX_Edit::SetLimitChar(int32_t nLimitChar/* =0 */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetLimitChar(nLimitChar);
if (bPaint) Paint();
}
-void CFX_Edit::SetCharArray(int32_t nCharArray/* =0 */, bool bPaint/* = true*/)
+void CFX_Edit::SetCharArray(int32_t nCharArray/* =0 */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetCharArray(nCharArray);
if (bPaint) Paint();
}
-void CFX_Edit::SetCharSpace(FX_FLOAT fCharSpace/* =0.0f */, bool bPaint/* = true*/)
+void CFX_Edit::SetCharSpace(FX_FLOAT fCharSpace/* =0.0f */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetCharSpace(fCharSpace);
if (bPaint) Paint();
}
-void CFX_Edit::SetHorzScale(int32_t nHorzScale/* =100 */, bool bPaint/* = true*/)
+void CFX_Edit::SetHorzScale(int32_t nHorzScale/* =100 */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetHorzScale(nHorzScale);
if (bPaint) Paint();
}
-void CFX_Edit::SetMultiLine(bool bMultiLine/* =true */, bool bPaint/* = true*/)
+void CFX_Edit::SetMultiLine(FX_BOOL bMultiLine/* =TRUE */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetMultiLine(bMultiLine);
if (bPaint) Paint();
}
-void CFX_Edit::SetAutoReturn(bool bAuto/* =true */, bool bPaint/* = true*/)
+void CFX_Edit::SetAutoReturn(FX_BOOL bAuto/* =TRUE */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetAutoReturn(bAuto);
if (bPaint) Paint();
}
-void CFX_Edit::SetLineLeading(FX_FLOAT fLineLeading/* =true */, bool bPaint/* = true*/)
+void CFX_Edit::SetLineLeading(FX_FLOAT fLineLeading/* =TRUE */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetLineLeading(fLineLeading);
if (bPaint) Paint();
}
-void CFX_Edit::SetAutoFontSize(bool bAuto/* =true */, bool bPaint/* = true*/)
+void CFX_Edit::SetAutoFontSize(FX_BOOL bAuto/* =TRUE */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetAutoFontSize(bAuto);
if (bPaint) Paint();
}
-void CFX_Edit::SetFontSize(FX_FLOAT fFontSize, bool bPaint/* = true*/)
+void CFX_Edit::SetFontSize(FX_FLOAT fFontSize, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetFontSize(fFontSize);
if (bPaint) Paint();
}
-void CFX_Edit::SetAutoScroll(bool bAuto/* =true */, bool bPaint/* = true*/)
+void CFX_Edit::SetAutoScroll(FX_BOOL bAuto/* =TRUE */, FX_BOOL bPaint/* = TRUE*/)
{
m_bEnableScroll = bAuto;
if (bPaint) Paint();
}
-void CFX_Edit::SetTextOverflow(bool bAllowed /*= false*/, bool bPaint/* = true*/)
+void CFX_Edit::SetTextOverflow(FX_BOOL bAllowed /*= FALSE*/, FX_BOOL bPaint/* = TRUE*/)
{
m_bEnableOverflow = bAllowed;
if (bPaint) Paint();
@@ -1193,7 +1193,7 @@ CFX_WideString CFX_Edit::GetText() const
{
if (IPDF_VariableText_Iterator * pIterator = m_pVT->GetIterator())
{
- bool bRich = m_pVT->IsRichText();
+ FX_BOOL bRich = m_pVT->IsRichText();
pIterator->SetAt(0);
@@ -1235,7 +1235,7 @@ CFX_WideString CFX_Edit::GetRangeText(const CPVT_WordRange & range) const
if (m_pVT->IsValid())
{
- bool bRich = m_pVT->IsRichText();
+ FX_BOOL bRich = m_pVT->IsRichText();
if (IPDF_VariableText_Iterator * pIterator = m_pVT->GetIterator())
{
@@ -1331,46 +1331,46 @@ CPVT_WordRange CFX_Edit::CombineWordRange(const CPVT_WordRange & wr1, const CPVT
return wrRet;
}
-bool CFX_Edit::IsRichText() const
+FX_BOOL CFX_Edit::IsRichText() const
{
return m_pVT->IsRichText();
}
-void CFX_Edit::SetRichText(bool bRichText/* =true */, bool bPaint/* = true*/)
+void CFX_Edit::SetRichText(FX_BOOL bRichText/* =TRUE */, FX_BOOL bPaint/* = TRUE*/)
{
m_pVT->SetRichText(bRichText);
if (bPaint) Paint();
}
-bool CFX_Edit::SetRichFontIndex(int32_t nFontIndex)
+FX_BOOL CFX_Edit::SetRichFontIndex(int32_t nFontIndex)
{
CPVT_WordProps WordProps;
WordProps.nFontIndex = nFontIndex;
return SetRichTextProps(EP_FONTINDEX,NULL,&WordProps);
}
-bool CFX_Edit::SetRichFontSize(FX_FLOAT fFontSize)
+FX_BOOL CFX_Edit::SetRichFontSize(FX_FLOAT fFontSize)
{
CPVT_WordProps WordProps;
WordProps.fFontSize = fFontSize;
return SetRichTextProps(EP_FONTSIZE,NULL,&WordProps);
}
-bool CFX_Edit::SetRichTextColor(FX_COLORREF dwColor)
+FX_BOOL CFX_Edit::SetRichTextColor(FX_COLORREF dwColor)
{
CPVT_WordProps WordProps;
WordProps.dwWordColor = dwColor;
return SetRichTextProps(EP_WORDCOLOR,NULL,&WordProps);
}
-bool CFX_Edit::SetRichTextScript(int32_t nScriptType)
+FX_BOOL CFX_Edit::SetRichTextScript(int32_t nScriptType)
{
CPVT_WordProps WordProps;
WordProps.nScriptType = nScriptType;
return SetRichTextProps(EP_SCRIPTTYPE,NULL,&WordProps);
}
-bool CFX_Edit::SetRichTextBold(bool bBold)
+FX_BOOL CFX_Edit::SetRichTextBold(FX_BOOL bBold)
{
CPVT_WordProps WordProps;
if (bBold)
@@ -1378,7 +1378,7 @@ bool CFX_Edit::SetRichTextBold(bool bBold)
return SetRichTextProps(EP_BOLD,NULL,&WordProps);
}
-bool CFX_Edit::SetRichTextItalic(bool bItalic)
+FX_BOOL CFX_Edit::SetRichTextItalic(FX_BOOL bItalic)
{
CPVT_WordProps WordProps;
if (bItalic)
@@ -1386,7 +1386,7 @@ bool CFX_Edit::SetRichTextItalic(bool bItalic)
return SetRichTextProps(EP_ITALIC,NULL,&WordProps);
}
-bool CFX_Edit::SetRichTextUnderline(bool bUnderline)
+FX_BOOL CFX_Edit::SetRichTextUnderline(FX_BOOL bUnderline)
{
CPVT_WordProps WordProps;
if (bUnderline)
@@ -1394,7 +1394,7 @@ bool CFX_Edit::SetRichTextUnderline(bool bUnderline)
return SetRichTextProps(EP_UNDERLINE,NULL,&WordProps);
}
-bool CFX_Edit::SetRichTextCrossout(bool bCrossout)
+FX_BOOL CFX_Edit::SetRichTextCrossout(FX_BOOL bCrossout)
{
CPVT_WordProps WordProps;
if (bCrossout)
@@ -1402,45 +1402,45 @@ bool CFX_Edit::SetRichTextCrossout(bool bCrossout)
return SetRichTextProps(EP_CROSSOUT,NULL,&WordProps);
}
-bool CFX_Edit::SetRichTextCharSpace(FX_FLOAT fCharSpace)
+FX_BOOL CFX_Edit::SetRichTextCharSpace(FX_FLOAT fCharSpace)
{
CPVT_WordProps WordProps;
WordProps.fCharSpace = fCharSpace;
return SetRichTextProps(EP_CHARSPACE,NULL,&WordProps);
}
-bool CFX_Edit::SetRichTextHorzScale(int32_t nHorzScale /*= 100*/)
+FX_BOOL CFX_Edit::SetRichTextHorzScale(int32_t nHorzScale /*= 100*/)
{
CPVT_WordProps WordProps;
WordProps.nHorzScale = nHorzScale;
return SetRichTextProps(EP_HORZSCALE,NULL,&WordProps);
}
-bool CFX_Edit::SetRichTextLineLeading(FX_FLOAT fLineLeading)
+FX_BOOL CFX_Edit::SetRichTextLineLeading(FX_FLOAT fLineLeading)
{
CPVT_SecProps SecProps;
SecProps.fLineLeading = fLineLeading;
return SetRichTextProps(EP_LINELEADING,&SecProps,NULL);
}
-bool CFX_Edit::SetRichTextLineIndent(FX_FLOAT fLineIndent)
+FX_BOOL CFX_Edit::SetRichTextLineIndent(FX_FLOAT fLineIndent)
{
CPVT_SecProps SecProps;
SecProps.fLineIndent = fLineIndent;
return SetRichTextProps(EP_LINEINDENT,&SecProps,NULL);
}
-bool CFX_Edit::SetRichTextAlignment(int32_t nAlignment)
+FX_BOOL CFX_Edit::SetRichTextAlignment(int32_t nAlignment)
{
CPVT_SecProps SecProps;
SecProps.nAlignment = nAlignment;
return SetRichTextProps(EP_ALIGNMENT,&SecProps,NULL);
}
-bool CFX_Edit::SetRichTextProps(EDIT_PROPS_E eProps, const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps)
+FX_BOOL CFX_Edit::SetRichTextProps(EDIT_PROPS_E eProps, const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps)
{
- bool bSet = false;
- bool bSet1,bSet2;
+ FX_BOOL bSet = FALSE;
+ FX_BOOL bSet1,bSet2;
if (m_pVT->IsValid() && m_pVT->IsRichText())
{
if (IPDF_VariableText_Iterator * pIterator = m_pVT->GetIterator())
@@ -1453,14 +1453,14 @@ bool CFX_Edit::SetRichTextProps(EDIT_PROPS_E eProps, const CPVT_SecProps * pSecP
BeginGroupUndo(L"");;
- bSet = SetSecProps(eProps,wrTemp.BeginPos,pSecProps,pWordProps,wrTemp,true);
+ bSet = SetSecProps(eProps,wrTemp.BeginPos,pSecProps,pWordProps,wrTemp,TRUE);
while (pIterator->NextWord())
{
CPVT_WordPlace place = pIterator->GetAt();
if (place.WordCmp(wrTemp.EndPos) > 0) break;
- bSet1 = SetSecProps(eProps,place,pSecProps,pWordProps,wrTemp,true);
- bSet2 = SetWordProps(eProps,place,pWordProps,wrTemp,true);
+ bSet1 = SetSecProps(eProps,place,pSecProps,pWordProps,wrTemp,TRUE);
+ bSet2 = SetWordProps(eProps,place,pWordProps,wrTemp,TRUE);
if (!bSet)
bSet = (bSet1 || bSet2);
@@ -1516,15 +1516,15 @@ void CFX_Edit::PaintSetProps(EDIT_PROPS_E eProps, const CPVT_WordRange & wr)
}
}
-bool CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
+FX_BOOL CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps,
- const CPVT_WordRange & wr, bool bAddUndo)
+ const CPVT_WordRange & wr, FX_BOOL bAddUndo)
{
if (m_pVT->IsValid() && m_pVT->IsRichText())
{
if (IPDF_VariableText_Iterator * pIterator = m_pVT->GetIterator())
{
- bool bSet = false;
+ FX_BOOL bSet = FALSE;
CPVT_Section secinfo;
CPVT_Section OldSecinfo;
@@ -1545,21 +1545,21 @@ bool CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if (!FX_EDIT_IsFloatEqual(secinfo.SecProps.fLineLeading,pSecProps->fLineLeading))
{
secinfo.SecProps.fLineLeading = pSecProps->fLineLeading;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_LINEINDENT:
if (!FX_EDIT_IsFloatEqual(secinfo.SecProps.fLineIndent,pSecProps->fLineIndent))
{
secinfo.SecProps.fLineIndent = pSecProps->fLineIndent;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_ALIGNMENT:
if (secinfo.SecProps.nAlignment != pSecProps->nAlignment)
{
secinfo.SecProps.nAlignment = pSecProps->nAlignment;
- bSet = true;
+ bSet = TRUE;
}
break;
default:
@@ -1583,42 +1583,42 @@ bool CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if (secinfo.WordProps.nFontIndex != pWordProps->nFontIndex)
{
secinfo.WordProps.nFontIndex = pWordProps->nFontIndex;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_FONTSIZE:
if (!FX_EDIT_IsFloatEqual(secinfo.WordProps.fFontSize,pWordProps->fFontSize))
{
secinfo.WordProps.fFontSize = pWordProps->fFontSize;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_WORDCOLOR:
if (secinfo.WordProps.dwWordColor != pWordProps->dwWordColor)
{
secinfo.WordProps.dwWordColor = pWordProps->dwWordColor;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_SCRIPTTYPE:
if (secinfo.WordProps.nScriptType != pWordProps->nScriptType)
{
secinfo.WordProps.nScriptType = pWordProps->nScriptType;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_CHARSPACE:
if (!FX_EDIT_IsFloatEqual(secinfo.WordProps.fCharSpace,pWordProps->fCharSpace))
{
secinfo.WordProps.fCharSpace = pWordProps->fCharSpace;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_HORZSCALE:
if (secinfo.WordProps.nHorzScale != pWordProps->nHorzScale)
{
secinfo.WordProps.nHorzScale = pWordProps->nHorzScale;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_UNDERLINE:
@@ -1627,7 +1627,7 @@ bool CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((secinfo.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) == 0)
{
secinfo.WordProps.nWordStyle |= PVTWORD_STYLE_UNDERLINE;
- bSet = true;
+ bSet = TRUE;
}
}
else
@@ -1635,7 +1635,7 @@ bool CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((secinfo.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) != 0)
{
secinfo.WordProps.nWordStyle &= ~PVTWORD_STYLE_UNDERLINE;
- bSet = true;
+ bSet = TRUE;
}
}
break;
@@ -1645,7 +1645,7 @@ bool CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((secinfo.WordProps.nWordStyle & PVTWORD_STYLE_CROSSOUT) == 0)
{
secinfo.WordProps.nWordStyle |= PVTWORD_STYLE_CROSSOUT;
- bSet = true;
+ bSet = TRUE;
}
}
else
@@ -1653,7 +1653,7 @@ bool CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((secinfo.WordProps.nWordStyle & PVTWORD_STYLE_CROSSOUT) != 0)
{
secinfo.WordProps.nWordStyle &= ~PVTWORD_STYLE_CROSSOUT;
- bSet = true;
+ bSet = TRUE;
}
}
break;
@@ -1663,7 +1663,7 @@ bool CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((secinfo.WordProps.nWordStyle & PVTWORD_STYLE_BOLD) == 0)
{
secinfo.WordProps.nWordStyle |= PVTWORD_STYLE_BOLD;
- bSet = true;
+ bSet = TRUE;
}
}
else
@@ -1671,7 +1671,7 @@ bool CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((secinfo.WordProps.nWordStyle & PVTWORD_STYLE_BOLD) != 0)
{
secinfo.WordProps.nWordStyle &= ~PVTWORD_STYLE_BOLD;
- bSet = true;
+ bSet = TRUE;
}
}
break;
@@ -1681,7 +1681,7 @@ bool CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((secinfo.WordProps.nWordStyle & PVTWORD_STYLE_ITALIC) == 0)
{
secinfo.WordProps.nWordStyle |= PVTWORD_STYLE_ITALIC;
- bSet = true;
+ bSet = TRUE;
}
}
else
@@ -1689,7 +1689,7 @@ bool CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((secinfo.WordProps.nWordStyle & PVTWORD_STYLE_ITALIC) != 0)
{
secinfo.WordProps.nWordStyle &= ~PVTWORD_STYLE_ITALIC;
- bSet = true;
+ bSet = TRUE;
}
}
break;
@@ -1717,17 +1717,17 @@ bool CFX_Edit::SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
}
}
- return false;
+ return FALSE;
}
-bool CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
- const CPVT_WordProps * pWordProps, const CPVT_WordRange & wr, bool bAddUndo)
+FX_BOOL CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
+ const CPVT_WordProps * pWordProps, const CPVT_WordRange & wr, FX_BOOL bAddUndo)
{
if (m_pVT->IsValid() && m_pVT->IsRichText())
{
if (IPDF_VariableText_Iterator * pIterator = m_pVT->GetIterator())
{
- bool bSet = false;
+ FX_BOOL bSet = FALSE;
CPVT_Word wordinfo;
CPVT_Word OldWordinfo;
@@ -1749,42 +1749,42 @@ bool CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
{
wordinfo.WordProps.nFontIndex = pFontMap->GetWordFontIndex(wordinfo.Word,wordinfo.nCharset,pWordProps->nFontIndex);
}
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_FONTSIZE:
if (!FX_EDIT_IsFloatEqual(wordinfo.WordProps.fFontSize,pWordProps->fFontSize))
{
wordinfo.WordProps.fFontSize = pWordProps->fFontSize;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_WORDCOLOR:
if (wordinfo.WordProps.dwWordColor != pWordProps->dwWordColor)
{
wordinfo.WordProps.dwWordColor = pWordProps->dwWordColor;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_SCRIPTTYPE:
if (wordinfo.WordProps.nScriptType != pWordProps->nScriptType)
{
wordinfo.WordProps.nScriptType = pWordProps->nScriptType;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_CHARSPACE:
if (!FX_EDIT_IsFloatEqual(wordinfo.WordProps.fCharSpace,pWordProps->fCharSpace))
{
wordinfo.WordProps.fCharSpace = pWordProps->fCharSpace;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_HORZSCALE:
if (wordinfo.WordProps.nHorzScale != pWordProps->nHorzScale)
{
wordinfo.WordProps.nHorzScale = pWordProps->nHorzScale;
- bSet = true;
+ bSet = TRUE;
}
break;
case EP_UNDERLINE:
@@ -1793,7 +1793,7 @@ bool CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((wordinfo.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) == 0)
{
wordinfo.WordProps.nWordStyle |= PVTWORD_STYLE_UNDERLINE;
- bSet = true;
+ bSet = TRUE;
}
}
else
@@ -1801,7 +1801,7 @@ bool CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((wordinfo.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) != 0)
{
wordinfo.WordProps.nWordStyle &= ~PVTWORD_STYLE_UNDERLINE;
- bSet = true;
+ bSet = TRUE;
}
}
break;
@@ -1811,7 +1811,7 @@ bool CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((wordinfo.WordProps.nWordStyle & PVTWORD_STYLE_CROSSOUT) == 0)
{
wordinfo.WordProps.nWordStyle |= PVTWORD_STYLE_CROSSOUT;
- bSet = true;
+ bSet = TRUE;
}
}
else
@@ -1819,7 +1819,7 @@ bool CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((wordinfo.WordProps.nWordStyle & PVTWORD_STYLE_CROSSOUT) != 0)
{
wordinfo.WordProps.nWordStyle &= ~PVTWORD_STYLE_CROSSOUT;
- bSet = true;
+ bSet = TRUE;
}
}
break;
@@ -1829,7 +1829,7 @@ bool CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((wordinfo.WordProps.nWordStyle & PVTWORD_STYLE_BOLD) == 0)
{
wordinfo.WordProps.nWordStyle |= PVTWORD_STYLE_BOLD;
- bSet = true;
+ bSet = TRUE;
}
}
else
@@ -1837,7 +1837,7 @@ bool CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((wordinfo.WordProps.nWordStyle & PVTWORD_STYLE_BOLD) != 0)
{
wordinfo.WordProps.nWordStyle &= ~PVTWORD_STYLE_BOLD;
- bSet = true;
+ bSet = TRUE;
}
}
break;
@@ -1847,7 +1847,7 @@ bool CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((wordinfo.WordProps.nWordStyle & PVTWORD_STYLE_ITALIC) == 0)
{
wordinfo.WordProps.nWordStyle |= PVTWORD_STYLE_ITALIC;
- bSet = true;
+ bSet = TRUE;
}
}
else
@@ -1855,7 +1855,7 @@ bool CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
if ((wordinfo.WordProps.nWordStyle & PVTWORD_STYLE_ITALIC) != 0)
{
wordinfo.WordProps.nWordStyle &= ~PVTWORD_STYLE_ITALIC;
- bSet = true;
+ bSet = TRUE;
}
}
break;
@@ -1881,44 +1881,44 @@ bool CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place,
}
}
- return false;
+ return FALSE;
}
void CFX_Edit::SetText(const FX_WCHAR* text,int32_t charset /*= DEFAULT_CHARSET*/,
const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/)
{
- SetText(text,charset,pSecProps,pWordProps,true,true);
+ SetText(text,charset,pSecProps,pWordProps,TRUE,TRUE);
}
-bool CFX_Edit::InsertWord(FX_WORD word, int32_t charset /*= DEFAULT_CHARSET*/, const CPVT_WordProps * pWordProps /*= NULL*/)
+FX_BOOL CFX_Edit::InsertWord(FX_WORD word, int32_t charset /*= DEFAULT_CHARSET*/, const CPVT_WordProps * pWordProps /*= NULL*/)
{
- return InsertWord(word,charset,pWordProps,true,true);
+ return InsertWord(word,charset,pWordProps,TRUE,TRUE);
}
-bool CFX_Edit::InsertReturn(const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/)
+FX_BOOL CFX_Edit::InsertReturn(const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/)
{
- return InsertReturn(pSecProps,pWordProps,true,true);
+ return InsertReturn(pSecProps,pWordProps,TRUE,TRUE);
}
-bool CFX_Edit::Backspace()
+FX_BOOL CFX_Edit::Backspace()
{
- return Backspace(true,true);
+ return Backspace(TRUE,TRUE);
}
-bool CFX_Edit::Delete()
+FX_BOOL CFX_Edit::Delete()
{
- return Delete(true,true);
+ return Delete(TRUE,TRUE);
}
-bool CFX_Edit::Clear()
+FX_BOOL CFX_Edit::Clear()
{
- return Clear(true,true);
+ return Clear(TRUE,TRUE);
}
-bool CFX_Edit::InsertText(const FX_WCHAR* text, int32_t charset /*= DEFAULT_CHARSET*/,
+FX_BOOL CFX_Edit::InsertText(const FX_WCHAR* text, int32_t charset /*= DEFAULT_CHARSET*/,
const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/)
{
- return InsertText(text,charset,pSecProps,pWordProps,true,true);
+ return InsertText(text,charset,pSecProps,pWordProps,TRUE,TRUE);
}
FX_FLOAT CFX_Edit::GetFontSize() const
@@ -2039,9 +2039,9 @@ void CFX_Edit::SetContentChanged()
{
if (!m_bNotifyFlag)
{
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
m_pNotify->IOnContentChange(rcContent);
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
m_rcOldContent = rcContent;
}
@@ -2075,7 +2075,7 @@ void CFX_Edit::SelectNone()
}
}
-bool CFX_Edit::IsSelected() const
+FX_BOOL CFX_Edit::IsSelected() const
{
return m_SelState.IsExist();
}
@@ -2153,13 +2153,13 @@ void CFX_Edit::SetScrollInfo()
if (!m_bNotifyFlag)
{
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
m_pNotify->IOnSetScrollInfoX(rcPlate.left, rcPlate.right,
rcContent.left, rcContent.right, rcPlate.Width() / 3, rcPlate.Width());
m_pNotify->IOnSetScrollInfoY(rcPlate.bottom, rcPlate.top,
rcContent.bottom, rcContent.top, rcPlate.Height() / 3, rcPlate.Height());
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
}
}
@@ -2179,9 +2179,9 @@ void CFX_Edit::SetScrollPosX(FX_FLOAT fx)
{
if (!m_bNotifyFlag)
{
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
m_pNotify->IOnSetScrollPosX(fx);
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
}
}
@@ -2203,9 +2203,9 @@ void CFX_Edit::SetScrollPosY(FX_FLOAT fy)
{
if (!m_bNotifyFlag)
{
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
m_pNotify->IOnSetScrollPosY(fy);
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
}
}
@@ -2373,13 +2373,13 @@ void CFX_Edit::Refresh(REFRESH_PLAN_E ePlan,const CPVT_WordRange * pRange1,const
{
if (!m_bNotifyFlag)
{
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
if (const CFX_Edit_RectArray * pRects = m_Refresh.GetRefreshRects())
{
for (int32_t i = 0, sz = pRects->GetSize(); i < sz; i++)
m_pNotify->IOnInvalidateRect(pRects->GetAt(i));
}
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
}
@@ -2499,10 +2499,10 @@ void CFX_Edit::RefreshWordRange(const CPVT_WordRange& wr)
{
if (!m_bNotifyFlag)
{
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
CPDF_Rect rcRefresh = VTToEdit(rcWord);
m_pNotify->IOnInvalidateRect(&rcRefresh);
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
}
}
@@ -2517,10 +2517,10 @@ void CFX_Edit::RefreshWordRange(const CPVT_WordRange& wr)
{
if (!m_bNotifyFlag)
{
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
CPDF_Rect rcRefresh = VTToEdit(rcLine);
m_pNotify->IOnInvalidateRect(&rcRefresh);
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
}
@@ -2565,9 +2565,9 @@ void CFX_Edit::SetCaretInfo()
}
}
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
m_pNotify->IOnSetCaret(!m_SelState.IsExist(),VTToEdit(ptHead),VTToEdit(ptFoot), m_wpCaret);
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
}
@@ -2603,9 +2603,9 @@ void CFX_Edit::SetCaretChange()
if (!m_bNotifyFlag)
{
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
m_pNotify->IOnCaretChange(SecProps,WordProps);
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
}
}
@@ -2624,7 +2624,7 @@ void CFX_Edit::SetCaret(int32_t nPos)
}
}
-void CFX_Edit::OnMouseDown(const CPDF_Point & point,bool bShift,bool bCtrl)
+void CFX_Edit::OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl)
{
if (m_pVT->IsValid())
{
@@ -2638,7 +2638,7 @@ void CFX_Edit::OnMouseDown(const CPDF_Point & point,bool bShift,bool bCtrl)
}
}
-void CFX_Edit::OnMouseMove(const CPDF_Point & point,bool bShift,bool bCtrl)
+void CFX_Edit::OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl)
{
if (m_pVT->IsValid())
{
@@ -2657,7 +2657,7 @@ void CFX_Edit::OnMouseMove(const CPDF_Point & point,bool bShift,bool bCtrl)
}
}
-void CFX_Edit::OnVK_UP(bool bShift,bool bCtrl)
+void CFX_Edit::OnVK_UP(FX_BOOL bShift,FX_BOOL bCtrl)
{
if (m_pVT->IsValid())
{
@@ -2688,7 +2688,7 @@ void CFX_Edit::OnVK_UP(bool bShift,bool bCtrl)
}
}
-void CFX_Edit::OnVK_DOWN(bool bShift,bool bCtrl)
+void CFX_Edit::OnVK_DOWN(FX_BOOL bShift,FX_BOOL bCtrl)
{
if (m_pVT->IsValid())
{
@@ -2719,7 +2719,7 @@ void CFX_Edit::OnVK_DOWN(bool bShift,bool bCtrl)
}
}
-void CFX_Edit::OnVK_LEFT(bool bShift,bool bCtrl)
+void CFX_Edit::OnVK_LEFT(FX_BOOL bShift,FX_BOOL bCtrl)
{
if (m_pVT->IsValid())
{
@@ -2773,7 +2773,7 @@ void CFX_Edit::OnVK_LEFT(bool bShift,bool bCtrl)
}
}
-void CFX_Edit::OnVK_RIGHT(bool bShift,bool bCtrl)
+void CFX_Edit::OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl)
{
if (m_pVT->IsValid())
{
@@ -2827,7 +2827,7 @@ void CFX_Edit::OnVK_RIGHT(bool bShift,bool bCtrl)
}
}
-void CFX_Edit::OnVK_HOME(bool bShift,bool bCtrl)
+void CFX_Edit::OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl)
{
if (m_pVT->IsValid())
{
@@ -2876,7 +2876,7 @@ void CFX_Edit::OnVK_HOME(bool bShift,bool bCtrl)
}
}
-void CFX_Edit::OnVK_END(bool bShift,bool bCtrl)
+void CFX_Edit::OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl)
{
if (m_pVT->IsValid())
{
@@ -2926,7 +2926,7 @@ void CFX_Edit::OnVK_END(bool bShift,bool bCtrl)
}
void CFX_Edit::SetText(const FX_WCHAR* text,int32_t charset,
- const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps, bool bAddUndo, bool bPaint)
+ const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
Empty();
DoInsertText(CPVT_WordPlace(0,0,-1), text, charset, pSecProps, pWordProps);
@@ -2936,9 +2936,9 @@ void CFX_Edit::SetText(const FX_WCHAR* text,int32_t charset,
//if (bAddUndo)
}
-bool CFX_Edit::InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps, bool bAddUndo, bool bPaint)
+FX_BOOL CFX_Edit::InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
- if (IsTextOverflow()) return false;
+ if (IsTextOverflow()) return FALSE;
if (m_pVT->IsValid())
{
@@ -2960,17 +2960,17 @@ bool CFX_Edit::InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps *
if (m_bOprNotify && m_pOprNotify)
m_pOprNotify->OnInsertWord(m_wpCaret, m_wpOldCaret);
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
-bool CFX_Edit::InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,
- bool bAddUndo, bool bPaint)
+FX_BOOL CFX_Edit::InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,
+ FX_BOOL bAddUndo, FX_BOOL bPaint)
{
- if (IsTextOverflow()) return false;
+ if (IsTextOverflow()) return FALSE;
if (m_pVT->IsValid())
{
@@ -2998,18 +2998,18 @@ bool CFX_Edit::InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps
if (m_bOprNotify && m_pOprNotify)
m_pOprNotify->OnInsertReturn(m_wpCaret, m_wpOldCaret);
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
-bool CFX_Edit::Backspace(bool bAddUndo, bool bPaint)
+FX_BOOL CFX_Edit::Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint)
{
if (m_pVT->IsValid())
{
- if (m_wpCaret == m_pVT->GetBeginWordPlace()) return false;
+ if (m_wpCaret == m_pVT->GetBeginWordPlace()) return FALSE;
CPVT_Section section;
CPVT_Word word;
@@ -3062,18 +3062,18 @@ bool CFX_Edit::Backspace(bool bAddUndo, bool bPaint)
if (m_bOprNotify && m_pOprNotify)
m_pOprNotify->OnBackSpace(m_wpCaret, m_wpOldCaret);
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
-bool CFX_Edit::Delete(bool bAddUndo, bool bPaint)
+FX_BOOL CFX_Edit::Delete(FX_BOOL bAddUndo, FX_BOOL bPaint)
{
if (m_pVT->IsValid())
{
- if (m_wpCaret == m_pVT->GetEndWordPlace()) return false;
+ if (m_wpCaret == m_pVT->GetEndWordPlace()) return FALSE;
CPVT_Section section;
CPVT_Word word;
@@ -3089,7 +3089,7 @@ bool CFX_Edit::Delete(bool bAddUndo, bool bPaint)
}
m_pVT->UpdateWordPlace(m_wpCaret);
- bool bSecEnd = (m_wpCaret == m_pVT->GetSectionEndPlace(m_wpCaret));
+ FX_BOOL bSecEnd = (m_wpCaret == m_pVT->GetSectionEndPlace(m_wpCaret));
SetCaret(m_pVT->DeleteWord(m_wpCaret));
m_SelState.Set(m_wpCaret,m_wpCaret);
@@ -3126,26 +3126,26 @@ bool CFX_Edit::Delete(bool bAddUndo, bool bPaint)
if (m_bOprNotify && m_pOprNotify)
m_pOprNotify->OnDelete(m_wpCaret, m_wpOldCaret);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CFX_Edit::Empty()
+FX_BOOL CFX_Edit::Empty()
{
if (m_pVT->IsValid())
{
m_pVT->DeleteWords(GetWholeWordRange());
SetCaret(m_pVT->GetBeginWordPlace());
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CFX_Edit::Clear(bool bAddUndo, bool bPaint)
+FX_BOOL CFX_Edit::Clear(FX_BOOL bAddUndo, FX_BOOL bPaint)
{
if (m_pVT->IsValid())
{
@@ -3184,8 +3184,8 @@ bool CFX_Edit::Clear(bool bAddUndo, bool bPaint)
{
if (pIterator->GetWord(wordinfo))
{
- oldplace = m_pVT->AjustLineHeader(oldplace,true);
- place = m_pVT->AjustLineHeader(place,true);
+ oldplace = m_pVT->AjustLineHeader(oldplace,TRUE);
+ place = m_pVT->AjustLineHeader(place,TRUE);
AddEditUndoItem(new CFXEU_ClearRich(this,oldplace,place,range,wordinfo.Word,
wordinfo.nCharset,secinfo.SecProps,wordinfo.WordProps));
@@ -3220,17 +3220,17 @@ bool CFX_Edit::Clear(bool bAddUndo, bool bPaint)
if (m_bOprNotify && m_pOprNotify)
m_pOprNotify->OnClear(m_wpCaret, m_wpOldCaret);
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
-bool CFX_Edit::InsertText(const FX_WCHAR* text, int32_t charset,
- const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps, bool bAddUndo, bool bPaint)
+FX_BOOL CFX_Edit::InsertText(const FX_WCHAR* text, int32_t charset,
+ const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint)
{
- if (IsTextOverflow()) return false;
+ if (IsTextOverflow()) return FALSE;
m_pVT->UpdateWordPlace(m_wpCaret);
SetCaret(DoInsertText(m_wpCaret, text, charset, pSecProps, pWordProps));
@@ -3249,9 +3249,9 @@ bool CFX_Edit::InsertText(const FX_WCHAR* text, int32_t charset,
if (m_bOprNotify && m_pOprNotify)
m_pOprNotify->OnInsertText(m_wpCaret, m_wpOldCaret);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void CFX_Edit::PaintInsertText(const CPVT_WordPlace & wpOld, const CPVT_WordPlace & wpNew)
@@ -3272,32 +3272,32 @@ void CFX_Edit::PaintInsertText(const CPVT_WordPlace & wpOld, const CPVT_WordPlac
}
}
-bool CFX_Edit::Redo()
+FX_BOOL CFX_Edit::Redo()
{
if (m_bEnableUndo)
{
if (m_Undo.CanRedo())
{
m_Undo.Redo();
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
-bool CFX_Edit::Undo()
+FX_BOOL CFX_Edit::Undo()
{
if (m_bEnableUndo)
{
if (m_Undo.CanUndo())
{
m_Undo.Undo();
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
void CFX_Edit::SetCaretOrigin()
@@ -3339,7 +3339,7 @@ CPVT_WordPlace CFX_Edit::WordIndexToWordPlace(int32_t index) const
return CPVT_WordPlace();
}
-bool CFX_Edit::IsTextFull() const
+FX_BOOL CFX_Edit::IsTextFull() const
{
int32_t nTotalWords = m_pVT->GetTotalWords();
int32_t nLimitChar = m_pVT->GetLimitChar();
@@ -3349,7 +3349,7 @@ bool CFX_Edit::IsTextFull() const
|| (nCharArray>0 && nTotalWords >= nCharArray);
}
-bool CFX_Edit::IsTextOverflow() const
+FX_BOOL CFX_Edit::IsTextOverflow() const
{
if (!m_bEnableScroll && !m_bEnableOverflow)
{
@@ -3358,13 +3358,13 @@ bool CFX_Edit::IsTextOverflow() const
if (m_pVT->IsMultiLine() && GetTotalLines() > 1)
{
- if (FX_EDIT_IsFloatBigger(rcContent.Height(),rcPlate.Height())) return true;
+ if (FX_EDIT_IsFloatBigger(rcContent.Height(),rcPlate.Height())) return TRUE;
}
- if (FX_EDIT_IsFloatBigger(rcContent.Width(),rcPlate.Width())) return true;
+ if (FX_EDIT_IsFloatBigger(rcContent.Width(),rcPlate.Width())) return TRUE;
}
- return false;
+ return FALSE;
}
CPVT_WordPlace CFX_Edit::GetLineBeginPlace(const CPVT_WordPlace & place) const
@@ -3387,52 +3387,52 @@ CPVT_WordPlace CFX_Edit::GetSectionEndPlace(const CPVT_WordPlace & place) const
return m_pVT->GetSectionEndPlace(place);
}
-bool CFX_Edit::CanUndo() const
+FX_BOOL CFX_Edit::CanUndo() const
{
if (m_bEnableUndo)
{
return m_Undo.CanUndo();
}
- return false;
+ return FALSE;
}
-bool CFX_Edit::CanRedo() const
+FX_BOOL CFX_Edit::CanRedo() const
{
if (m_bEnableUndo)
{
return m_Undo.CanRedo();
}
- return false;
+ return FALSE;
}
-bool CFX_Edit::IsModified() const
+FX_BOOL CFX_Edit::IsModified() const
{
if (m_bEnableUndo)
{
return m_Undo.IsModified();
}
- return false;
+ return FALSE;
}
-void CFX_Edit::EnableRefresh(bool bRefresh)
+void CFX_Edit::EnableRefresh(FX_BOOL bRefresh)
{
m_bEnableRefresh = bRefresh;
}
-void CFX_Edit::EnableUndo(bool bUndo)
+void CFX_Edit::EnableUndo(FX_BOOL bUndo)
{
m_bEnableUndo = bUndo;
}
-void CFX_Edit::EnableNotify(bool bNotify)
+void CFX_Edit::EnableNotify(FX_BOOL bNotify)
{
m_bNotify = bNotify;
}
-void CFX_Edit::EnableOprNotify(bool bNotify)
+void CFX_Edit::EnableOprNotify(FX_BOOL bNotify)
{
m_bOprNotify = bNotify;
}
diff --git a/fpdfsdk/src/fxedit/fxet_list.cpp b/fpdfsdk/src/fxedit/fxet_list.cpp
index c84db4d029..d94cc16c86 100644
--- a/fpdfsdk/src/fxedit/fxet_list.cpp
+++ b/fpdfsdk/src/fxedit/fxet_list.cpp
@@ -11,8 +11,8 @@
/* ------------------------------- CFX_ListItem ---------------------------------- */
CFX_ListItem::CFX_ListItem() : m_pEdit(NULL),
- m_bSelected(false),
- m_bCaret(false),
+ m_bSelected(FALSE),
+ m_bCaret(FALSE),
m_rcListItem(0.0f,0.0f,0.0f,0.0f)
{
m_pEdit = IFX_Edit::NewEdit();
@@ -56,22 +56,22 @@ CLST_Rect CFX_ListItem::GetRect() const
return m_rcListItem;
}
-bool CFX_ListItem::IsSelected() const
+FX_BOOL CFX_ListItem::IsSelected() const
{
return m_bSelected;
}
-void CFX_ListItem::SetSelect(bool bSelected)
+void CFX_ListItem::SetSelect(FX_BOOL bSelected)
{
m_bSelected = bSelected;
}
-bool CFX_ListItem::IsCaret() const
+FX_BOOL CFX_ListItem::IsCaret() const
{
return m_bCaret;
}
-void CFX_ListItem::SetCaret(bool bCaret)
+void CFX_ListItem::SetCaret(FX_BOOL bCaret)
{
m_bCaret = bCaret;
}
@@ -119,7 +119,7 @@ CFX_WideString CFX_ListItem::GetText() const
/* ------------------------------------ CFX_List --------------------------------- */
-CFX_List::CFX_List() : m_fFontSize(0.0f), m_pFontMap(NULL), m_bMultiple(false)
+CFX_List::CFX_List() : m_fFontSize(0.0f), m_pFontMap(NULL), m_bMultiple(FALSE)
{
}
@@ -211,8 +211,8 @@ int32_t CFX_List::GetItemIndex(const CPDF_Point & point) const
{
CPDF_Point pt = OuterToInner(point);
- bool bFirst = true;
- bool bLast = true;
+ FX_BOOL bFirst = TRUE;
+ FX_BOOL bLast = TRUE;
for (int32_t i=0,sz=m_aListItems.GetSize(); i<sz; i++)
{
@@ -222,12 +222,12 @@ int32_t CFX_List::GetItemIndex(const CPDF_Point & point) const
if (FX_EDIT_IsFloatBigger(pt.y, rcListItem.top))
{
- bFirst = false;
+ bFirst = FALSE;
}
if (FX_EDIT_IsFloatSmaller(pt.y, rcListItem.bottom))
{
- bLast = false;
+ bLast = FALSE;
}
if (pt.y >= rcListItem.top && pt.y < rcListItem.bottom)
@@ -318,17 +318,17 @@ CPDF_Rect CFX_List::GetItemRect(int32_t nIndex) const
return CPDF_Rect();
}
-bool CFX_List::IsItemSelected(int32_t nIndex) const
+FX_BOOL CFX_List::IsItemSelected(int32_t nIndex) const
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nIndex))
{
return pListItem->IsSelected();
}
- return false;
+ return FALSE;
}
-void CFX_List::SetItemSelect(int32_t nItemIndex, bool bSelected)
+void CFX_List::SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nItemIndex))
{
@@ -336,7 +336,7 @@ void CFX_List::SetItemSelect(int32_t nItemIndex, bool bSelected)
}
}
-void CFX_List::SetItemCaret(int32_t nItemIndex, bool bCaret)
+void CFX_List::SetItemCaret(int32_t nItemIndex, FX_BOOL bCaret)
{
if (CFX_ListItem * pListItem = m_aListItems.GetAt(nItemIndex))
{
@@ -344,17 +344,17 @@ void CFX_List::SetItemCaret(int32_t nItemIndex, bool bCaret)
}
}
-void CFX_List::SetMultipleSel(bool bMultiple)
+void CFX_List::SetMultipleSel(FX_BOOL bMultiple)
{
m_bMultiple = bMultiple;
}
-bool CFX_List::IsMultipleSel() const
+FX_BOOL CFX_List::IsMultipleSel() const
{
return m_bMultiple;
}
-bool CFX_List::IsValid(int32_t nItemIndex) const
+FX_BOOL CFX_List::IsValid(int32_t nItemIndex) const
{
return nItemIndex >= 0 && nItemIndex < m_aListItems.GetSize();
}
@@ -446,7 +446,7 @@ int32_t CPLST_Select::Find(int32_t nItemIndex) const
return -1;
}
-bool CPLST_Select::IsExist(int32_t nItemIndex) const
+FX_BOOL CPLST_Select::IsExist(int32_t nItemIndex) const
{
return Find(nItemIndex) >= 0;
}
@@ -507,11 +507,11 @@ void CPLST_Select::Done()
/* ------------------------------------ CFX_ListCtrl --------------------------------- */
CFX_ListCtrl::CFX_ListCtrl() : m_pNotify(NULL),
- m_bNotifyFlag(false),
+ m_bNotifyFlag(FALSE),
m_ptScrollPos(0.0f,0.0f),
m_nSelItem(-1),
m_nFootIndex(-1),
- m_bCtrlSel(false),
+ m_bCtrlSel(FALSE),
m_nCaretIndex(-1)
{
}
@@ -557,7 +557,7 @@ CPDF_Rect CFX_ListCtrl::OutToIn(const CPDF_Rect & rect) const
return CPDF_Rect(ptLeftBottom.x,ptLeftBottom.y,ptRightTop.x,ptRightTop.y);
}
-void CFX_ListCtrl::OnMouseDown(const CPDF_Point & point,bool bShift,bool bCtrl)
+void CFX_ListCtrl::OnMouseDown(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl)
{
int32_t nHitIndex = GetItemIndex(point);
@@ -569,13 +569,13 @@ void CFX_ListCtrl::OnMouseDown(const CPDF_Point & point,bool bShift,bool bCtrl)
{
m_aSelItems.Sub(nHitIndex);
SelectItems();
- m_bCtrlSel = false;
+ m_bCtrlSel = FALSE;
}
else
{
m_aSelItems.Add(nHitIndex);
SelectItems();
- m_bCtrlSel = true;
+ m_bCtrlSel = TRUE;
}
m_nFootIndex = nHitIndex;
@@ -606,7 +606,7 @@ void CFX_ListCtrl::OnMouseDown(const CPDF_Point & point,bool bShift,bool bCtrl)
ScrollToListItem(nHitIndex);
}
-void CFX_ListCtrl::OnMouseMove(const CPDF_Point & point,bool bShift,bool bCtrl)
+void CFX_ListCtrl::OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl)
{
int32_t nHitIndex = GetItemIndex(point);
@@ -639,7 +639,7 @@ void CFX_ListCtrl::OnMouseMove(const CPDF_Point & point,bool bShift,bool bCtrl)
ScrollToListItem(nHitIndex);
}
-void CFX_ListCtrl::OnVK(int32_t nItemIndex,bool bShift,bool bCtrl)
+void CFX_ListCtrl::OnVK(int32_t nItemIndex,FX_BOOL bShift,FX_BOOL bCtrl)
{
if (IsMultipleSel())
{
@@ -674,37 +674,37 @@ void CFX_ListCtrl::OnVK(int32_t nItemIndex,bool bShift,bool bCtrl)
ScrollToListItem(nItemIndex);
}
-void CFX_ListCtrl::OnVK_UP(bool bShift,bool bCtrl)
+void CFX_ListCtrl::OnVK_UP(FX_BOOL bShift,FX_BOOL bCtrl)
{
OnVK(IsMultipleSel() ? GetCaret()-1 : GetSelect()-1, bShift, bCtrl);
}
-void CFX_ListCtrl::OnVK_DOWN(bool bShift,bool bCtrl)
+void CFX_ListCtrl::OnVK_DOWN(FX_BOOL bShift,FX_BOOL bCtrl)
{
OnVK(IsMultipleSel() ? GetCaret()+1 : GetSelect()+1, bShift, bCtrl);
}
-void CFX_ListCtrl::OnVK_LEFT(bool bShift,bool bCtrl)
+void CFX_ListCtrl::OnVK_LEFT(FX_BOOL bShift,FX_BOOL bCtrl)
{
OnVK(0, bShift, bCtrl);
}
-void CFX_ListCtrl::OnVK_RIGHT(bool bShift,bool bCtrl)
+void CFX_ListCtrl::OnVK_RIGHT(FX_BOOL bShift,FX_BOOL bCtrl)
{
OnVK(GetCount()-1, bShift, bCtrl);
}
-void CFX_ListCtrl::OnVK_HOME(bool bShift,bool bCtrl)
+void CFX_ListCtrl::OnVK_HOME(FX_BOOL bShift,FX_BOOL bCtrl)
{
OnVK(0, bShift, bCtrl);
}
-void CFX_ListCtrl::OnVK_END(bool bShift,bool bCtrl)
+void CFX_ListCtrl::OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl)
{
OnVK(GetCount()-1, bShift, bCtrl);
}
-bool CFX_ListCtrl::OnChar(FX_WORD nChar,bool bShift,bool bCtrl)
+FX_BOOL CFX_ListCtrl::OnChar(FX_WORD nChar,FX_BOOL bShift,FX_BOOL bCtrl)
{
int32_t nIndex = GetLastSelected();
int32_t nFindIndex = FindNext(nIndex,nChar);
@@ -712,9 +712,9 @@ bool CFX_ListCtrl::OnChar(FX_WORD nChar,bool bShift,bool bCtrl)
if (nFindIndex != nIndex)
{
OnVK(nFindIndex, bShift, bCtrl);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
/* -------- inner methods ------- */
@@ -739,7 +739,7 @@ void CFX_ListCtrl::AddString(const FX_WCHAR* string)
ReArrange(GetCount() - 1);
}
-void CFX_ListCtrl::SetMultipleSelect(int32_t nItemIndex, bool bSelected)
+void CFX_ListCtrl::SetMultipleSelect(int32_t nItemIndex, FX_BOOL bSelected)
{
if (!IsValid(nItemIndex)) return;
@@ -747,12 +747,12 @@ void CFX_ListCtrl::SetMultipleSelect(int32_t nItemIndex, bool bSelected)
{
if (bSelected)
{
- SetItemSelect(nItemIndex,true);
+ SetItemSelect(nItemIndex,TRUE);
InvalidateItem(nItemIndex);
}
else
{
- SetItemSelect(nItemIndex,false);
+ SetItemSelect(nItemIndex,FALSE);
InvalidateItem(nItemIndex);
}
}
@@ -766,11 +766,11 @@ void CFX_ListCtrl::SetSingleSelect(int32_t nItemIndex)
{
if (m_nSelItem >= 0)
{
- SetItemSelect(m_nSelItem,false);
+ SetItemSelect(m_nSelItem,FALSE);
InvalidateItem(m_nSelItem);
}
- SetItemSelect(nItemIndex,true);
+ SetItemSelect(nItemIndex,TRUE);
InvalidateItem(nItemIndex);
m_nSelItem = nItemIndex;
}
@@ -788,8 +788,8 @@ void CFX_ListCtrl::SetCaret(int32_t nItemIndex)
{
m_nCaretIndex = nItemIndex;
- SetItemCaret(nOldIndex, false);
- SetItemCaret(nItemIndex,true);
+ SetItemCaret(nOldIndex, FALSE);
+ SetItemCaret(nItemIndex,TRUE);
InvalidateItem(nOldIndex);
InvalidateItem(nItemIndex);
@@ -805,17 +805,17 @@ void CFX_ListCtrl::InvalidateItem(int32_t nItemIndex)
{
if (!m_bNotifyFlag)
{
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
CPDF_Rect rcRefresh = GetPlateRect();
m_pNotify->IOnInvalidateRect(&rcRefresh);
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
}
else
{
if (!m_bNotifyFlag)
{
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
CPDF_Rect rcRefresh = GetItemRect(nItemIndex);
rcRefresh.left -= 1.0f;
rcRefresh.right += 1.0f;
@@ -823,7 +823,7 @@ void CFX_ListCtrl::InvalidateItem(int32_t nItemIndex)
rcRefresh.top += 1.0f;
m_pNotify->IOnInvalidateRect(&rcRefresh);
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
}
}
@@ -839,10 +839,10 @@ void CFX_ListCtrl::SelectItems()
switch(nState)
{
case 1:
- SetMultipleSelect(nItemIndex, true);
+ SetMultipleSelect(nItemIndex, TRUE);
break;
case -1:
- SetMultipleSelect(nItemIndex, false);
+ SetMultipleSelect(nItemIndex, FALSE);
break;
}
}
@@ -863,7 +863,7 @@ void CFX_ListCtrl::Select(int32_t nItemIndex)
SetSingleSelect(nItemIndex);
}
-bool CFX_ListCtrl::IsItemVisible(int32_t nItemIndex) const
+FX_BOOL CFX_ListCtrl::IsItemVisible(int32_t nItemIndex) const
{
CPDF_Rect rcPlate = GetPlateRect();
CPDF_Rect rcItem = GetItemRect(nItemIndex);
@@ -904,10 +904,10 @@ void CFX_ListCtrl::SetScrollInfo()
if (!m_bNotifyFlag)
{
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
m_pNotify->IOnSetScrollInfoY(rcPlate.bottom, rcPlate.top,
rcContent.bottom, rcContent.top, GetFirstHeight(), rcPlate.Height());
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
}
}
@@ -947,9 +947,9 @@ void CFX_ListCtrl::SetScrollPosY(FX_FLOAT fy)
{
if (!m_bNotifyFlag)
{
- m_bNotifyFlag = true;
+ m_bNotifyFlag = TRUE;
m_pNotify->IOnSetScrollPosY(fy);
- m_bNotifyFlag = false;
+ m_bNotifyFlag = FALSE;
}
}
}
diff --git a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp
index 04809a46f1..1c0269b682 100644
--- a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp
+++ b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp
@@ -132,9 +132,9 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IF
const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, IFX_SystemHandler* pSystemHandler, void* pFFLData)
{
- bool bContinuous = pEdit->GetCharArray() == 0;
+ FX_BOOL bContinuous = pEdit->GetCharArray() == 0;
if (pEdit->GetCharSpace() > 0.0f)
- bContinuous = false;
+ bContinuous = FALSE;
FX_WORD SubWord = pEdit->GetPasswordChar();
FX_FLOAT fFontSize = pEdit->GetFontSize();
@@ -144,7 +144,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IF
FX_COLORREF crCurFill = crTextFill;
FX_COLORREF crOldFill = crCurFill;
- bool bSelect = false;
+ FX_BOOL bSelect = FALSE;
const FX_COLORREF crWhite = ArgbEncode(255,255,255,255);
const FX_COLORREF crSelBK = ArgbEncode(255,0,51,113);
@@ -278,7 +278,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device
FX_COLORREF crCurText = ArgbEncode(255, 0,0,0);
FX_COLORREF crOld = crCurText;
- bool bSelect = false;
+ FX_BOOL bSelect = FALSE;
const FX_COLORREF crWhite = ArgbEncode(255,255,255,255);
const FX_COLORREF crSelBK = ArgbEncode(255,0,51,113);
@@ -410,7 +410,7 @@ static void AddRectToPageObjects(CPDF_PageObjects* pPageObjs, FX_COLORREF crFill
pPathObj->m_ColorState.SetFillColor(CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3);
pPathObj->m_FillType = FXFILL_ALTERNATE;
- pPathObj->m_bStroke = false;
+ pPathObj->m_bStroke = FALSE;
pPageObjs->InsertObject(pPageObjs->GetLastObjectPosition(),pPathObj);
}
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp
index 668032dcba..59816f091f 100644
--- a/fpdfsdk/src/javascript/Document.cpp
+++ b/fpdfsdk/src/javascript/Document.cpp
@@ -45,14 +45,14 @@ IMPLEMENT_JS_CLASS(CJS_PrintParamsObj, PrintParamsObj)
PrintParamsObj::PrintParamsObj(CJS_Object* pJSObject)
: CJS_EmbedObj(pJSObject)
{
- bUI = true;
+ bUI = TRUE;
nStart = 0;
nEnd = 0;
- bSilent = false;
- bShrinkToFit = false;
- bPrintAsImage = false;
- bReverse = false;
- bAnnotations = true;
+ bSilent = FALSE;
+ bShrinkToFit = FALSE;
+ bPrintAsImage = FALSE;
+ bReverse = FALSE;
+ bAnnotations = TRUE;
}
/* ---------------------- Document ---------------------- */
@@ -142,7 +142,7 @@ END_JS_STATIC_METHOD()
IMPLEMENT_JS_CLASS(CJS_Document, Document)
-bool CJS_Document::InitInstance(IFXJS_Context* cc)
+FX_BOOL CJS_Document::InitInstance(IFXJS_Context* cc)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -152,7 +152,7 @@ bool CJS_Document::InitInstance(IFXJS_Context* cc)
pDoc->AttachDoc(pContext->GetReaderDocument());
pDoc->SetIsolate(pContext->GetJSRuntime()->GetIsolate());
- return true;
+ return TRUE;
};
/* --------------------------------- Document --------------------------------- */
@@ -162,7 +162,7 @@ Document::Document(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject),
m_pIconTree(NULL),
m_pDocument(NULL),
m_cwBaseURL(L""),
- m_bDelay(false)
+ m_bDelay(FALSE)
{
}
@@ -190,20 +190,20 @@ Document::~Document()
}
//the total number of fileds in document.
-bool Document::numFields(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::numFields(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting()) {
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY);
- return false;
+ return FALSE;
}
CPDFSDK_InterForm *pInterForm = m_pDocument->GetInterForm();
CPDF_InterForm *pPDFForm = pInterForm->GetInterForm();
vp << (int)pPDFForm->CountFields();
- return true;
+ return TRUE;
}
-bool Document::dirty(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::dirty(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
@@ -226,10 +226,10 @@ bool Document::dirty(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
m_pDocument->ClearChangeMark();
}
- return true;
+ return TRUE;
}
-bool Document::ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
@@ -241,10 +241,10 @@ bool Document::ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError
{
}
- return true;
+ return TRUE;
}
-bool Document::pageNum(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::pageNum(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
@@ -276,55 +276,55 @@ bool Document::pageNum(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
}
}
- return true;
+ return TRUE;
}
-bool Document::ParserParams(JSObject* pObj,CJS_AnnotObj& annotobj)
+FX_BOOL Document::ParserParams(JSObject* pObj,CJS_AnnotObj& annotobj)
{
// Not supported.
- return true;
+ return TRUE;
}
-bool Document::addAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::addAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Not supported.
- return true;
+ return TRUE;
}
-bool Document::addField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::addField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Not supported.
- return true;
+ return TRUE;
}
-bool Document::exportAsText(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::exportAsText(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
-bool Document::exportAsFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::exportAsFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
-bool Document::exportAsXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::exportAsXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
//Maps a field object in PDF document to a JavaScript variable
//comment:
//note: the paremter cName, this is clue how to treat if the cName is not a valiable filed name in this document
-bool Document::getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
if (params.size() < 1) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
CFX_WideString wideName = params[0].ToCFXWideString();
@@ -334,7 +334,7 @@ bool Document::getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
if (pPDFForm->CountFields(wideName) <= 0)
{
vRet.SetNull();
- return true;
+ return TRUE;
}
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
@@ -346,66 +346,66 @@ bool Document::getField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
pField->AttachField(this, wideName);
vRet = pJSField;
- return true;
+ return TRUE;
}
//Gets the name of the nth field in the document
-bool Document::getNthFieldName(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getNthFieldName(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
if (params.size() != 1) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
int nIndex = params[0].ToInt();
if (nIndex < 0) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSVALUEERROR);
- return false;
+ return FALSE;
}
CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
CPDF_InterForm* pPDFForm = pInterForm->GetInterForm();
CPDF_FormField* pField = pPDFForm->GetField(nIndex);
if (!pField)
- return false;
+ return FALSE;
vRet = pField->GetFullName().c_str();
- return true;
+ return TRUE;
}
-bool Document::importAnFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::importAnFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
-bool Document::importAnXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::importAnXFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
-bool Document::importTextData(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::importTextData(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
//exports the form data and mails the resulting fdf file as an attachment to all recipients.
//comment: need reader supports
//note:
-//int CPDFSDK_Document::mailForm(bool bUI,String cto,string ccc,string cbcc,string cSubject,string cms);
+//int CPDFSDK_Document::mailForm(FX_BOOL bUI,String cto,string ccc,string cbcc,string cSubject,string cms);
-bool Document::mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
- if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return false;
+ if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return FALSE;
int iLength = params.size();
- bool bUI = iLength > 0 ? params[0].ToBool() : true;
+ FX_BOOL bUI = iLength > 0 ? params[0].ToBool() : TRUE;
CFX_WideString cTo = iLength > 1 ? params[1].ToCFXWideString() : L"";
CFX_WideString cCc = iLength > 2 ? params[2].ToCFXWideString() : L"";
CFX_WideString cBcc = iLength > 3 ? params[3].ToCFXWideString() : L"";
@@ -417,7 +417,7 @@ bool Document::mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
CFX_ByteTextBuf textBuf;
if (!pInterForm->ExportFormToFDFTextBuf(textBuf))
- return false;
+ return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -429,24 +429,24 @@ bool Document::mailForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
pRuntime->BeginBlock();
pEnv->JS_docmailForm(textBuf.GetBuffer(), textBuf.GetLength(), bUI, cTo.c_str(), cSubject.c_str(), cCc.c_str(), cBcc.c_str(), cMsg.c_str());
pRuntime->EndBlock();
- return true;
+ return TRUE;
}
-bool Document::print(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::print(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
ASSERT(pRuntime != NULL);
- bool bUI = true;
+ FX_BOOL bUI = TRUE;
int nStart = 0;
int nEnd = 0;
- bool bSilent = false;
- bool bShrinkToFit = false;
- bool bPrintAsImage = false;
- bool bReverse = false;
- bool bAnnotations = false;
+ FX_BOOL bSilent = FALSE;
+ FX_BOOL bShrinkToFit = FALSE;
+ FX_BOOL bPrintAsImage = FALSE;
+ FX_BOOL bReverse = FALSE;
+ FX_BOOL bAnnotations = FALSE;
int nlength = params.size();
if(nlength ==9)
@@ -500,26 +500,26 @@ bool Document::print(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
if (CPDFDoc_Environment* pEnv = m_pDocument->GetEnv())
{
pEnv->JS_docprint(bUI, nStart, nEnd, bSilent, bShrinkToFit, bPrintAsImage, bReverse, bAnnotations);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
//removes the specified field from the document.
//comment:
//note: if the filed name is not retional, adobe is dumb for it.
-bool Document::removeField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::removeField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (!(m_pDocument->GetPermissions(FPDFPERM_MODIFY) ||
- m_pDocument->GetPermissions(FPDFPERM_ANNOT_FORM))) return false;
+ m_pDocument->GetPermissions(FPDFPERM_ANNOT_FORM))) return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
if (params.size() != 1) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
CFX_WideString sFieldName = params[0].ToCFXWideString();
@@ -558,20 +558,20 @@ bool Document::removeField(IFXJS_Context* cc, const CJS_Parameters& params, CJS_
m_pDocument->SetChangeMark();
}
- return true;
+ return TRUE;
}
//reset filed values within a document.
//comment:
//note: if the fields names r not rational, aodbe is dumb for it.
-bool Document::resetForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::resetForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (!(m_pDocument->GetPermissions(FPDFPERM_MODIFY) ||
m_pDocument->GetPermissions(FPDFPERM_ANNOT_FORM) ||
- m_pDocument->GetPermissions(FPDFPERM_FILL_FORM))) return false;
+ m_pDocument->GetPermissions(FPDFPERM_FILL_FORM))) return FALSE;
CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInterForm();
ASSERT(pInterForm != NULL);
@@ -610,42 +610,42 @@ bool Document::resetForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
if (aFields.GetSize() > 0)
{
- pPDFForm->ResetForm(aFields, true, true);
+ pPDFForm->ResetForm(aFields, TRUE, TRUE);
m_pDocument->SetChangeMark();
}
}
else
{
- pPDFForm->ResetForm(true);
+ pPDFForm->ResetForm(TRUE);
m_pDocument->SetChangeMark();
}
- return true;
+ return TRUE;
}
-bool Document::saveAs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::saveAs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
-bool Document::submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
CJS_Context* pContext = (CJS_Context*)cc;
int nSize = params.size();
if (nSize < 1) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
CFX_WideString strURL;
- bool bFDF = true;
- bool bEmpty = false;
+ FX_BOOL bFDF = TRUE;
+ FX_BOOL bEmpty = FALSE;
v8::Isolate* isolate = GetIsolate(cc);
CJS_Array aFields(isolate);
@@ -677,16 +677,16 @@ bool Document::submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInterForm();
CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm();
- bool bAll = (aFields.GetLength() == 0);
+ FX_BOOL bAll = (aFields.GetLength() == 0);
if (bAll && bEmpty)
{
if (pPDFInterForm->CheckRequiredFields())
{
pRuntime->BeginBlock();
- pInterForm->SubmitForm(strURL, false);
+ pInterForm->SubmitForm(strURL, FALSE);
pRuntime->EndBlock();
}
- return true;
+ return TRUE;
}
CFX_PtrArray fieldObjects;
@@ -707,13 +707,13 @@ bool Document::submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V
}
}
- if (pPDFInterForm->CheckRequiredFields(&fieldObjects, true))
+ if (pPDFInterForm->CheckRequiredFields(&fieldObjects, TRUE))
{
pRuntime->BeginBlock();
- pInterForm->SubmitFields(strURL, fieldObjects, true, !bFDF);
+ pInterForm->SubmitFields(strURL, fieldObjects, TRUE, !bFDF);
pRuntime->EndBlock();
}
- return true;
+ return TRUE;
}
//////////////////////////////////////////////////////////////////////////////////////////////
@@ -728,26 +728,26 @@ CPDFSDK_Document * Document::GetReaderDoc()
return m_pDocument;
}
-bool Document::ExtractFileName(CPDFSDK_Document *pDoc,CFX_ByteString &strFileName)
+FX_BOOL Document::ExtractFileName(CPDFSDK_Document *pDoc,CFX_ByteString &strFileName)
{
- return false;
+ return FALSE;
}
-bool Document::ExtractFolderName(CPDFSDK_Document *pDoc,CFX_ByteString &strFolderName)
+FX_BOOL Document::ExtractFolderName(CPDFSDK_Document *pDoc,CFX_ByteString &strFolderName)
{
- return false;
+ return FALSE;
}
-bool Document::bookmarkRoot(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::bookmarkRoot(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Document::mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
- bool bUI = true;
+ FX_BOOL bUI = TRUE;
CFX_WideString cTo = L"";
CFX_WideString cCc = L"";
CFX_WideString cBcc = L"";
@@ -803,40 +803,40 @@ bool Document::mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu
pEnv->JS_docmailForm(NULL, 0, bUI, cTo.c_str(), cSubject.c_str(), cCc.c_str(), cBcc.c_str(), cMsg.c_str());
pRuntime->EndBlock();
- return true;
+ return TRUE;
}
-bool Document::author(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::author(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
- if (!pDictionary)return false;
+ if (!pDictionary)return FALSE;
if (vp.IsGetting())
{
vp << pDictionary->GetUnicodeText("Author");
- return true;
+ return TRUE;
}
else
{
- if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) return false;
+ if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY)) return FALSE;
CFX_WideString csAuthor;
vp >> csAuthor;
pDictionary->SetAtString("Author", PDF_EncodeText(csAuthor));
m_pDocument->SetChangeMark();
- return true;
+ return TRUE;
}
}
-bool Document::info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
if (!pDictionary)
- return false;
+ return FALSE;
CFX_WideString cwAuthor = pDictionary->GetUnicodeText("Author");
CFX_WideString cwTitle = pDictionary->GetUnicodeText("Title");
@@ -880,14 +880,14 @@ bool Document::info(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError
}
vp << pObj;
}
- return true;
+ return TRUE;
}
-bool Document::creationDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::creationDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
if (!pDictionary)
- return false;
+ return FALSE;
if (vp.IsGetting())
{
@@ -896,21 +896,21 @@ bool Document::creationDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString
else
{
if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY))
- return false;
+ return FALSE;
CFX_WideString csCreationDate;
vp >> csCreationDate;
pDictionary->SetAtString("CreationDate", PDF_EncodeText(csCreationDate));
m_pDocument->SetChangeMark();
}
- return true;
+ return TRUE;
}
-bool Document::creator(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::creator(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
if (!pDictionary)
- return false;
+ return FALSE;
if (vp.IsGetting())
{
@@ -919,17 +919,17 @@ bool Document::creator(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
else
{
if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY))
- return false;
+ return FALSE;
CFX_WideString csCreator;
vp >> csCreator;
pDictionary->SetAtString("Creator", PDF_EncodeText(csCreator));
m_pDocument->SetChangeMark();
}
- return true;
+ return TRUE;
}
-bool Document::delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsGetting())
{
@@ -938,7 +938,7 @@ bool Document::delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
else
{
if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY))
- return false;
+ return FALSE;
vp >> m_bDelay;
if (m_bDelay)
@@ -969,14 +969,14 @@ bool Document::delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
}
}
}
- return true;
+ return TRUE;
}
-bool Document::keywords(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::keywords(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
if (!pDictionary)
- return false;
+ return FALSE;
if (vp.IsGetting())
{
@@ -985,21 +985,21 @@ bool Document::keywords(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
else
{
if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY))
- return false;
+ return FALSE;
CFX_WideString csKeywords;
vp >> csKeywords;
pDictionary->SetAtString("Keywords", PDF_EncodeText(csKeywords));
m_pDocument->SetChangeMark();
}
- return true;
+ return TRUE;
}
-bool Document::modDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::modDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
if (!pDictionary)
- return false;
+ return FALSE;
if (vp.IsGetting())
{
@@ -1008,21 +1008,21 @@ bool Document::modDate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
else
{
if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY))
- return false;
+ return FALSE;
CFX_WideString csmodDate;
vp >> csmodDate;
pDictionary->SetAtString("ModDate", PDF_EncodeText(csmodDate));
m_pDocument->SetChangeMark();
}
- return true;
+ return TRUE;
}
-bool Document::producer(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::producer(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
if (!pDictionary)
- return false;
+ return FALSE;
if (vp.IsGetting())
{
@@ -1031,21 +1031,21 @@ bool Document::producer(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
else
{
if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY))
- return false;
+ return FALSE;
CFX_WideString csproducer;
vp >> csproducer;
pDictionary->SetAtString("Producer", PDF_EncodeText(csproducer));
m_pDocument->SetChangeMark();
}
- return true;
+ return TRUE;
}
-bool Document::subject(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::subject(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
if (!pDictionary)
- return false;
+ return FALSE;
if (vp.IsGetting())
{
@@ -1054,24 +1054,24 @@ bool Document::subject(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
else
{
if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY))
- return false;
+ return FALSE;
CFX_WideString cssubject;
vp >> cssubject;
pDictionary->SetAtString("Subject", PDF_EncodeText(cssubject));
m_pDocument->SetChangeMark();
}
- return true;
+ return TRUE;
}
-bool Document::title(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::title(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (m_pDocument == NULL || m_pDocument->GetDocument() == NULL)
- return false;
+ return FALSE;
CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
if (!pDictionary)
- return false;
+ return FALSE;
if (vp.IsGetting())
{
@@ -1080,58 +1080,58 @@ bool Document::title(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
else
{
if (!m_pDocument->GetPermissions(FPDFPERM_MODIFY))
- return false;
+ return FALSE;
CFX_WideString cstitle;
vp >> cstitle;
pDictionary->SetAtString("Title", PDF_EncodeText(cstitle));
m_pDocument->SetChangeMark();
}
- return true;
+ return TRUE;
}
-bool Document::numPages(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::numPages(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting()) {
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY);
- return false;
+ return FALSE;
}
vp << m_pDocument->GetPageCount();
- return true;
+ return TRUE;
}
-bool Document::external(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::external(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
//In Chrome case,should always return true.
if (vp.IsGetting()) {
vp << true;
}
- return true;
+ return TRUE;
}
-bool Document::filesize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::filesize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting()) {
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY);
- return false;
+ return FALSE;
}
vp << 0;
- return true;
+ return TRUE;
}
-bool Document::mouseX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::mouseX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Document::mouseY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::mouseY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Document::baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsGetting())
{
@@ -1141,10 +1141,10 @@ bool Document::baseURL(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
{
vp >> m_cwBaseURL;
}
- return true;
+ return TRUE;
}
-bool Document::calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
@@ -1166,15 +1166,15 @@ bool Document::calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
pInterForm->EnableCalculate(bCalculate);
}
- return true;
+ return TRUE;
}
-bool Document::documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting()) {
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY);
- return false;
+ return FALSE;
}
CFX_WideString wsFilePath = m_pDocument->GetPath();
int32_t i = wsFilePath.GetLength() - 1;
@@ -1189,7 +1189,7 @@ bool Document::documentFileName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideSt
}else{
vp << L"";
}
- return true;
+ return TRUE;
}
CFX_WideString Document::ReversalStr(CFX_WideString cbFrom)
@@ -1239,74 +1239,74 @@ CFX_WideString Document::CutString(CFX_WideString cbFrom)
return cbRet;
}
-bool Document::path(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::path(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting()) {
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY);
- return false;
+ return FALSE;
}
vp << app::SysPathToPDFPath(m_pDocument->GetPath());
- return true;
+ return TRUE;
}
-bool Document::pageWindowRect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::pageWindowRect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Document::layout(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::layout(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Document::addLink(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::addLink(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Document::closeDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::closeDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
- return true;
+ return TRUE;
}
-bool Document::getPageBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getPageBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Document::getAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getAnnot(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Document::getAnnots(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getAnnots(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
vRet.SetNull();
- return true;
+ return TRUE;
}
-bool Document::getAnnot3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getAnnot3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
vRet.SetNull();
- return true;
+ return TRUE;
}
-bool Document::getAnnots3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getAnnots3D(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
vRet = VT_undefined;
- return true;
+ return TRUE;
}
-bool Document::getOCGs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getOCGs(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Document::getLinks(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getLinks(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
bool Document::IsEnclosedInRect(CFX_FloatRect rect, CFX_FloatRect LinkRect)
@@ -1370,12 +1370,12 @@ IconElement* IconTree::operator [](int iIndex)
return NULL;
}
-bool Document::addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
if (params.size() != 2) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
CFX_WideString swIconName = params[0].ToCFXWideString();
@@ -1384,13 +1384,13 @@ bool Document::addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
if (JS_GetObjDefnID(pJSIcon) != JS_GetObjDefnID(*pRuntime, L"Icon")) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSTYPEERROR);
- return false;
+ return FALSE;
}
CJS_EmbedObj* pEmbedObj = params[1].ToCJSObject()->GetEmbedObject();
if (!pEmbedObj) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSTYPEERROR);
- return false;
+ return FALSE;
}
Icon* pIcon = (Icon*)pEmbedObj;
@@ -1402,21 +1402,21 @@ bool Document::addIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu
pNewIcon->NextIcon = NULL;
pNewIcon->IconStream = pIcon;
m_pIconTree->InsertIconElement(pNewIcon);
- return true;
+ return TRUE;
}
-bool Document::icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting()) {
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY);
- return false;
+ return FALSE;
}
if (!m_pIconTree)
{
vp.SetNull();
- return true;
+ return TRUE;
}
CJS_Array Icons(m_isolate);
@@ -1431,13 +1431,13 @@ bool Document::icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
pIconElement = (*m_pIconTree)[i];
JSFXObject pObj = JS_NewFxDynamicObj(*pRuntime, pContext, JS_GetObjDefnID(*pRuntime, L"Icon"));
- if (pObj.IsEmpty()) return false;
+ if (pObj.IsEmpty()) return FALSE;
CJS_Icon * pJS_Icon = (CJS_Icon *)JS_GetPrivate(pObj);
- if (!pJS_Icon) return false;
+ if (!pJS_Icon) return FALSE;
Icon* pIcon = (Icon*)pJS_Icon->GetEmbedObject();
- if (!pIcon)return false;
+ if (!pIcon)return FALSE;
pIcon->SetStream(pIconElement->IconStream->GetStream());
pIcon->SetIconName(pIconElement->IconName);
@@ -1445,19 +1445,19 @@ bool Document::icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
}
vp << Icons;
- return true;
+ return TRUE;
}
-bool Document::getIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context *)cc;
if (params.size() != 1) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
if(!m_pIconTree)
- return false;
+ return FALSE;
CFX_WideString swIconName = params[0].ToCFXWideString();
int iIconCounts = m_pIconTree->GetLength();
@@ -1470,82 +1470,82 @@ bool Document::getIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu
Icon* pRetIcon = (*m_pIconTree)[i]->IconStream;
JSFXObject pObj = JS_NewFxDynamicObj(*pRuntime, pContext, JS_GetObjDefnID(*pRuntime, L"Icon"));
- if (pObj.IsEmpty()) return false;
+ if (pObj.IsEmpty()) return FALSE;
CJS_Icon * pJS_Icon = (CJS_Icon *)JS_GetPrivate(pObj);
- if (!pJS_Icon) return false;
+ if (!pJS_Icon) return FALSE;
Icon* pIcon = (Icon*)pJS_Icon->GetEmbedObject();
- if (!pIcon)return false;
+ if (!pIcon)return FALSE;
pIcon->SetIconName(swIconName);
pIcon->SetStream(pRetIcon->GetStream());
vRet = pJS_Icon;
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
-bool Document::removeIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::removeIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, no supported.
- return true;
+ return TRUE;
}
-bool Document::createDataObject(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::createDataObject(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not implemented.
- return true;
+ return TRUE;
}
-bool Document::media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Document::calculateNow(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::calculateNow(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (!(m_pDocument->GetPermissions(FPDFPERM_MODIFY) ||
m_pDocument->GetPermissions(FPDFPERM_ANNOT_FORM) ||
- m_pDocument->GetPermissions(FPDFPERM_FILL_FORM))) return false;
+ m_pDocument->GetPermissions(FPDFPERM_FILL_FORM))) return FALSE;
CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInterForm();
ASSERT(pInterForm != NULL);
pInterForm->OnCalculate();
- return true;
+ return TRUE;
}
-bool Document::Collab(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::Collab(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Document::getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
- if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return false;
+ if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return FALSE;
int nPageNo = params.GetSize() > 0 ? params[0].ToInt() : 0;
int nWordNo = params.GetSize() > 1 ? params[1].ToInt() : 0;
bool bStrip = params.GetSize() > 2 ? params[2].ToBool() : true;
CPDF_Document* pDocument = m_pDocument->GetDocument();
- if (!pDocument) return false;
+ if (!pDocument) return FALSE;
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
if (nPageNo < 0 || nPageNo >= pDocument->GetPageCount())
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSVALUEERROR);
- return false;
+ return FALSE;
}
CPDF_Dictionary* pPageDict = pDocument->GetPage(nPageNo);
- if (!pPageDict) return false;
+ if (!pPageDict) return FALSE;
CPDF_Page page;
page.Load(pDocument, pPageDict);
@@ -1584,23 +1584,23 @@ bool Document::getPageNthWord(IFXJS_Context* cc, const CJS_Parameters& params, C
}
vRet = swRet.c_str();
- return true;
+ return TRUE;
}
-bool Document::getPageNthWordQuads(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getPageNthWordQuads(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
- if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return false;
+ if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return FALSE;
- return false;
+ return FALSE;
}
-bool Document::getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
- if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return false;
+ if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return FALSE;
int nPageNo = params.GetSize() > 0 ? params[0].ToInt() : 0;
@@ -1611,11 +1611,11 @@ bool Document::getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params,
if (nPageNo < 0 || nPageNo >= pDocument->GetPageCount())
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSVALUEERROR);
- return false;
+ return FALSE;
}
CPDF_Dictionary* pPageDict = pDocument->GetPage(nPageNo);
- if (!pPageDict) return false;
+ if (!pPageDict) return FALSE;
CPDF_Page page;
page.Load(pDocument, pPageDict);
@@ -1640,10 +1640,10 @@ bool Document::getPageNumWords(IFXJS_Context* cc, const CJS_Parameters& params,
vRet = nWords;
- return true;
+ return TRUE;
}
-bool Document::getPrintParams(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getPrintParams(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
@@ -1652,7 +1652,7 @@ bool Document::getPrintParams(IFXJS_Context* cc, const CJS_Parameters& params, C
// Not implemented yet.
vRet = pRetObj;
- return true;
+ return TRUE;
}
#define ISLATINWORD(u) (u != 0x20 && u <= 0x28FF)
@@ -1666,7 +1666,7 @@ int Document::CountWords(CPDF_TextObject* pTextObj)
CPDF_Font* pFont = pTextObj->GetFont();
if (!pFont) return 0;
- bool bIsLatin = false;
+ FX_BOOL bIsLatin = FALSE;
for (int i=0, sz=pTextObj->CountChars(); i<sz; i++)
{
@@ -1701,7 +1701,7 @@ CFX_WideString Document::GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex
if (!pFont) return L"";
int nWords = 0;
- bool bIsLatin = false;
+ FX_BOOL bIsLatin = FALSE;
for (int i=0, sz=pTextObj->CountChars(); i<sz; i++)
{
@@ -1732,10 +1732,10 @@ CFX_WideString Document::GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex
return swRet;
}
-bool Document::zoom(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::zoom(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
/**
@@ -1748,39 +1748,39 @@ bool Document::zoom(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError
(refW, ReflowWidth)
*/
-bool Document::zoomType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Document::zoomType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Document::deletePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::deletePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, no supported.
- return true;
+ return TRUE;
}
-bool Document::extractPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::extractPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
-bool Document::insertPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::insertPages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
-bool Document::replacePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::replacePages(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
-bool Document::getURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Document::getURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
void Document::AddDelayData(CJS_DelayData* pData)
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index ca16c90c01..614843426e 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -110,7 +110,7 @@ END_JS_STATIC_METHOD()
IMPLEMENT_JS_CLASS(CJS_Field, Field)
-bool CJS_Field::InitInstance(IFXJS_Context* cc)
+FX_BOOL CJS_Field::InitInstance(IFXJS_Context* cc)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -120,15 +120,15 @@ bool CJS_Field::InitInstance(IFXJS_Context* cc)
pField->SetIsolate(pContext->GetJSRuntime()->GetIsolate());
- return true;
+ return TRUE;
};
Field::Field(CJS_Object* pJSObject): CJS_EmbedObj(pJSObject),
m_pJSDoc(NULL),
m_pDocument(NULL),
m_nFormControlIndex(-1),
- m_bCanSet(false),
- m_bDelay(false),
+ m_bCanSet(FALSE),
+ m_bDelay(FALSE),
m_isolate(NULL)
{
}
@@ -168,7 +168,7 @@ void Field::ParseFieldName(const std::wstring &strFieldNameParsed,std::wstring &
strFieldName = strFieldNameParsed.substr(0,iStart);
}
-bool Field::AttachField(Document* pDocument, const CFX_WideString& csFieldName)
+FX_BOOL Field::AttachField(Document* pDocument, const CFX_WideString& csFieldName)
{
ASSERT(pDocument != NULL);
m_pJSDoc = pDocument;
@@ -194,17 +194,17 @@ bool Field::AttachField(Document* pDocument, const CFX_WideString& csFieldName)
std::wstring strFieldName;
int iControlNo = -1;
ParseFieldName(swFieldNameTemp.c_str(), strFieldName, iControlNo);
- if (iControlNo == -1) return false;
+ if (iControlNo == -1) return FALSE;
m_FieldName = strFieldName.c_str();
m_nFormControlIndex = iControlNo;
- return true;
+ return TRUE;
}
m_FieldName = swFieldNameTemp;
m_nFormControlIndex = -1;
- return true;
+ return TRUE;
}
void Field::GetFormFields(CPDFSDK_Document* pDocument, const CFX_WideString& csFieldName, CFX_PtrArray& FieldArray)
@@ -234,7 +234,7 @@ void Field::GetFormFields(const CFX_WideString& csFieldName, CFX_PtrArray& Field
}
void Field::UpdateFormField(CPDFSDK_Document* pDocument, CPDF_FormField* pFormField,
- bool bChangeMark, bool bResetAP, bool bRefresh)
+ FX_BOOL bChangeMark, FX_BOOL bResetAP, FX_BOOL bRefresh)
{
ASSERT(pDocument != NULL);
ASSERT(pFormField != NULL);
@@ -255,12 +255,12 @@ void Field::UpdateFormField(CPDFSDK_Document* pDocument, CPDF_FormField* pFormFi
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)widgets.GetAt(i);
ASSERT(pWidget != NULL);
- bool bFormated = false;
+ FX_BOOL bFormated = FALSE;
CFX_WideString sValue = pWidget->OnFormat(bFormated);
if (bFormated)
- pWidget->ResetAppearance(sValue.c_str(), false);
+ pWidget->ResetAppearance(sValue.c_str(), FALSE);
else
- pWidget->ResetAppearance(NULL, false);
+ pWidget->ResetAppearance(NULL, FALSE);
}
}
else
@@ -270,7 +270,7 @@ void Field::UpdateFormField(CPDFSDK_Document* pDocument, CPDF_FormField* pFormFi
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)widgets.GetAt(i);
ASSERT(pWidget != NULL);
- pWidget->ResetAppearance(NULL, false);
+ pWidget->ResetAppearance(NULL, FALSE);
}
}
}
@@ -295,7 +295,7 @@ void Field::UpdateFormField(CPDFSDK_Document* pDocument, CPDF_FormField* pFormFi
}
void Field::UpdateFormControl(CPDFSDK_Document* pDocument, CPDF_FormControl* pFormControl,
- bool bChangeMark, bool bResetAP, bool bRefresh)
+ FX_BOOL bChangeMark, FX_BOOL bResetAP, FX_BOOL bRefresh)
{
ASSERT(pDocument != NULL);
ASSERT(pFormControl != NULL);
@@ -312,16 +312,16 @@ void Field::UpdateFormControl(CPDFSDK_Document* pDocument, CPDF_FormControl* pFo
int nFieldType = pWidget->GetFieldType();
if (nFieldType == FIELDTYPE_COMBOBOX || nFieldType == FIELDTYPE_TEXTFIELD)
{
- bool bFormated = false;
+ FX_BOOL bFormated = FALSE;
CFX_WideString sValue = pWidget->OnFormat(bFormated);
if (bFormated)
- pWidget->ResetAppearance(sValue.c_str(), false);
+ pWidget->ResetAppearance(sValue.c_str(), FALSE);
else
- pWidget->ResetAppearance(NULL, false);
+ pWidget->ResetAppearance(NULL, FALSE);
}
else
{
- pWidget->ResetAppearance(NULL, false);
+ pWidget->ResetAppearance(NULL, FALSE);
}
}
@@ -350,17 +350,17 @@ CPDFSDK_Widget* Field::GetWidget(CPDFSDK_Document* pDocument, CPDF_FormControl*
return pInterForm->GetWidget(pFormControl);
}
-bool Field::ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel)
+FX_BOOL Field::ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel)
{
ASSERT(pFormField != NULL);
for (int i=0,sz = pFormField->CountOptions(); i < sz; i++)
{
if (csOptLabel.Compare(pFormField->GetOptionLabel(i)) == 0)
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
CPDF_FormControl* Field::GetSmartFieldControl(CPDF_FormField* pFormField)
@@ -376,13 +376,13 @@ CPDF_FormControl* Field::GetSmartFieldControl(CPDF_FormField* pFormField)
/* ---------------------------------------- property ---------------------------------------- */
-bool Field::alignment(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::alignment(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
CFX_ByteString alignStr;
vp >> alignStr;
@@ -400,16 +400,16 @@ bool Field::alignment(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_TEXTFIELD)
- return false;
+ return FALSE;
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
switch (pFormControl->GetControlAlignment())
{
@@ -427,7 +427,7 @@ bool Field::alignment(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
}
}
- return true;
+ return TRUE;
}
void Field::SetAlignment(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex,
@@ -436,13 +436,13 @@ void Field::SetAlignment(CPDFSDK_Document* pDocument, const CFX_WideString& swFi
//Not supported.
}
-bool Field::borderStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::borderStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
CFX_ByteString strType = "";
vp >> strType;
@@ -460,13 +460,13 @@ bool Field::borderStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
- if (!pFormField) return false;
+ if (!pFormField) return FALSE;
CPDFSDK_Widget* pWidget = GetWidget(m_pDocument, GetSmartFieldControl(pFormField));
- if (!pWidget) return false;
+ if (!pWidget) return FALSE;
int nBorderstyle = pWidget->GetBorderStyle();
@@ -493,7 +493,7 @@ bool Field::borderStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
}
}
- return true;
+ return TRUE;
}
void Field::SetBorderStyle(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex,
@@ -525,7 +525,7 @@ void Field::SetBorderStyle(CPDFSDK_Document* pDocument, const CFX_WideString& sw
if (nControlIndex < 0)
{
- bool bSet = false;
+ FX_BOOL bSet = FALSE;
for (int j=0,jsz = pFormField->CountControls(); j<jsz; j++)
{
if (CPDFSDK_Widget* pWidget = GetWidget(pDocument, pFormField->GetControl(j)))
@@ -533,11 +533,11 @@ void Field::SetBorderStyle(CPDFSDK_Document* pDocument, const CFX_WideString& sw
if (pWidget->GetBorderStyle() != nBorderStyle)
{
pWidget->SetBorderStyle(nBorderStyle);
- bSet = true;
+ bSet = TRUE;
}
}
}
- if (bSet) UpdateFormField(pDocument, pFormField, true, true, true);
+ if (bSet) UpdateFormField(pDocument, pFormField, TRUE, TRUE, TRUE);
}
else
{
@@ -549,7 +549,7 @@ void Field::SetBorderStyle(CPDFSDK_Document* pDocument, const CFX_WideString& sw
if (pWidget->GetBorderStyle() != nBorderStyle)
{
pWidget->SetBorderStyle(nBorderStyle);
- UpdateFormControl(pDocument, pFormControl, true, true, true);
+ UpdateFormControl(pDocument, pFormControl, TRUE, TRUE, TRUE);
}
}
}
@@ -557,13 +557,13 @@ void Field::SetBorderStyle(CPDFSDK_Document* pDocument, const CFX_WideString& sw
}
}
-bool Field::buttonAlignX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::buttonAlignX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int nVP;
vp >> nVP;
@@ -581,16 +581,16 @@ bool Field::buttonAlignX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_PUSHBUTTON)
- return false;
+ return FALSE;
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
CPDF_IconFit IconFit = pFormControl->GetIconFit();
@@ -600,7 +600,7 @@ bool Field::buttonAlignX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
vp << (int32_t)fLeft;
}
- return true;
+ return TRUE;
}
void Field::SetButtonAlignX(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
@@ -608,13 +608,13 @@ void Field::SetButtonAlignX(CPDFSDK_Document* pDocument, const CFX_WideString& s
//Not supported.
}
-bool Field::buttonAlignY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::buttonAlignY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int nVP;
vp >> nVP;
@@ -632,16 +632,16 @@ bool Field::buttonAlignY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_PUSHBUTTON)
- return false;
+ return FALSE;
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
CPDF_IconFit IconFit = pFormControl->GetIconFit();
@@ -651,7 +651,7 @@ bool Field::buttonAlignY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
vp << (int32_t)fBottom;
}
- return true;
+ return TRUE;
}
void Field::SetButtonAlignY(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
@@ -659,13 +659,13 @@ void Field::SetButtonAlignY(CPDFSDK_Document* pDocument, const CFX_WideString& s
//Not supported.
}
-bool Field::buttonFitBounds(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::buttonFitBounds(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -683,22 +683,22 @@ bool Field::buttonFitBounds(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_PUSHBUTTON)
- return false;
+ return FALSE;
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
CPDF_IconFit IconFit = pFormControl->GetIconFit();
vp << IconFit.GetFittingBounds();
}
- return true;
+ return TRUE;
}
void Field::SetButtonFitBounds(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b)
@@ -706,13 +706,13 @@ void Field::SetButtonFitBounds(CPDFSDK_Document* pDocument, const CFX_WideString
//Not supported.
}
-bool Field::buttonPosition(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::buttonPosition(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int nVP;
vp >> nVP;
@@ -730,20 +730,20 @@ bool Field::buttonPosition(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_PUSHBUTTON)
- return false;
+ return FALSE;
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
vp << pFormControl->GetTextPosition();
}
- return true;
+ return TRUE;
}
void Field::SetButtonPosition(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
@@ -751,13 +751,13 @@ void Field::SetButtonPosition(CPDFSDK_Document* pDocument, const CFX_WideString&
//Not supported.
}
-bool Field::buttonScaleHow(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::buttonScaleHow(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int nVP;
vp >> nVP;
@@ -775,16 +775,16 @@ bool Field::buttonScaleHow(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_PUSHBUTTON)
- return false;
+ return FALSE;
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
CPDF_IconFit IconFit = pFormControl->GetIconFit();
if (IconFit.IsProportionalScale())
@@ -793,7 +793,7 @@ bool Field::buttonScaleHow(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
vp << (int32_t)1;
}
- return true;
+ return TRUE;
}
void Field::SetButtonScaleHow(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
@@ -801,13 +801,13 @@ void Field::SetButtonScaleHow(CPDFSDK_Document* pDocument, const CFX_WideString&
//Not supported.
}
-bool Field::buttonScaleWhen(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::buttonScaleWhen(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int nVP;
vp >> nVP;
@@ -825,16 +825,16 @@ bool Field::buttonScaleWhen(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*) FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_PUSHBUTTON)
- return false;
+ return FALSE;
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl) return false;
+ if (!pFormControl) return FALSE;
CPDF_IconFit IconFit = pFormControl->GetIconFit();
int ScaleM = IconFit.GetScaleMethod();
@@ -855,7 +855,7 @@ bool Field::buttonScaleWhen(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString
}
}
- return true;
+ return TRUE;
}
void Field::SetButtonScaleWhen(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
@@ -863,13 +863,13 @@ void Field::SetButtonScaleWhen(CPDFSDK_Document* pDocument, const CFX_WideString
//Not supported.
}
-bool Field::calcOrderIndex(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::calcOrderIndex(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int nVP;
vp >> nVP;
@@ -887,13 +887,13 @@ bool Field::calcOrderIndex(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_COMBOBOX && pFormField->GetFieldType() != FIELDTYPE_TEXTFIELD)
- return false;
+ return FALSE;
CPDFSDK_InterForm* pRDInterForm = m_pDocument->GetInterForm();
ASSERT(pRDInterForm != NULL);
@@ -904,7 +904,7 @@ bool Field::calcOrderIndex(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
vp << (int32_t)pInterForm->FindFieldInCalculationOrder(pFormField);
}
- return true;
+ return TRUE;
}
void Field::SetCalcOrderIndex(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
@@ -912,13 +912,13 @@ void Field::SetCalcOrderIndex(CPDFSDK_Document* pDocument, const CFX_WideString&
//Not supported.
}
-bool Field::charLimit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::charLimit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int nVP;
vp >> nVP;
@@ -936,17 +936,17 @@ bool Field::charLimit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_TEXTFIELD)
- return false;
+ return FALSE;
vp << (int32_t)pFormField->GetMaxLen();
}
- return true;
+ return TRUE;
}
void Field::SetCharLimit(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
@@ -954,13 +954,13 @@ void Field::SetCharLimit(CPDFSDK_Document* pDocument, const CFX_WideString& swFi
//Not supported.
}
-bool Field::comb(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::comb(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -978,13 +978,13 @@ bool Field::comb(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_TEXTFIELD)
- return false;
+ return FALSE;
if (pFormField->GetFieldFlags() & FIELDFLAG_COMB)
vp << true;
@@ -992,7 +992,7 @@ bool Field::comb(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
vp << false;
}
- return true;
+ return TRUE;
}
void Field::SetComb(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b)
@@ -1000,13 +1000,13 @@ void Field::SetComb(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldNa
//Not supported.
}
-bool Field::commitOnSelChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::commitOnSelChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -1024,13 +1024,13 @@ bool Field::commitOnSelChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStri
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_COMBOBOX && pFormField->GetFieldType() != FIELDTYPE_LISTBOX)
- return false;
+ return FALSE;
if (pFormField->GetFieldFlags() & FIELDFLAG_COMMITONSELCHANGE)
vp << true;
@@ -1038,7 +1038,7 @@ bool Field::commitOnSelChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStri
vp << false;
}
- return true;
+ return TRUE;
}
void Field::SetCommitOnSelChange(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b)
@@ -1046,13 +1046,13 @@ void Field::SetCommitOnSelChange(CPDFSDK_Document* pDocument, const CFX_WideStri
//Not supported.
}
-bool Field::currentValueIndices(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::currentValueIndices(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
CFX_DWordArray array;
@@ -1089,13 +1089,13 @@ bool Field::currentValueIndices(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideSt
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_COMBOBOX && pFormField->GetFieldType() != FIELDTYPE_LISTBOX)
- return false;
+ return FALSE;
if (pFormField->CountSelectedItems() == 1)
vp << pFormField->GetSelectedIndex(0);
@@ -1112,7 +1112,7 @@ bool Field::currentValueIndices(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideSt
vp << -1;
}
- return true;
+ return TRUE;
}
void Field::SetCurrentValueIndices(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex,
@@ -1132,7 +1132,7 @@ void Field::SetCurrentValueIndices(CPDFSDK_Document* pDocument, const CFX_WideSt
if (nFieldType == FIELDTYPE_COMBOBOX || nFieldType == FIELDTYPE_LISTBOX)
{
FX_DWORD dwFieldFlags = pFormField->GetFieldFlags();
- pFormField->ClearSelection(true);
+ pFormField->ClearSelection(TRUE);
for (int i=0,sz=array.GetSize(); i<sz; i++)
{
@@ -1143,22 +1143,22 @@ void Field::SetCurrentValueIndices(CPDFSDK_Document* pDocument, const CFX_WideSt
int iSelecting = (int32_t)array.GetAt(i);
if (iSelecting < pFormField->CountOptions() && !pFormField->IsItemSelected(iSelecting))
- pFormField->SetItemSelection(iSelecting, true);
+ pFormField->SetItemSelection(iSelecting, TRUE);
}
- UpdateFormField(pDocument, pFormField, true, true, true);
+ UpdateFormField(pDocument, pFormField, TRUE, TRUE, TRUE);
}
}
}
-bool Field::defaultStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::defaultStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
// MQG sError = JSGetStringFromID(IDS_STRING_NOTSUPPORT);
- return false;
+ return FALSE;
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
;
}
@@ -1166,7 +1166,7 @@ bool Field::defaultStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
{
;
}
- return true;
+ return TRUE;
}
void Field::SetDefaultStyle(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex)
@@ -1174,13 +1174,13 @@ void Field::SetDefaultStyle(CPDFSDK_Document* pDocument, const CFX_WideString& s
//Not supported.
}
-bool Field::defaultValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::defaultValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
CFX_WideString WideStr;
vp >> WideStr;
@@ -1198,18 +1198,18 @@ bool Field::defaultValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() == FIELDTYPE_PUSHBUTTON ||
pFormField->GetFieldType() == FIELDTYPE_SIGNATURE)
- return false;
+ return FALSE;
vp << pFormField->GetDefaultValue();
}
- return true;
+ return TRUE;
}
void Field::SetDefaultValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex,
@@ -1218,13 +1218,13 @@ void Field::SetDefaultValue(CPDFSDK_Document* pDocument, const CFX_WideString& s
//Not supported.
}
-bool Field::doNotScroll(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::doNotScroll(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -1242,13 +1242,13 @@ bool Field::doNotScroll(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_TEXTFIELD)
- return false;
+ return FALSE;
if (pFormField->GetFieldFlags() & FIELDFLAG_DONOTSCROLL)
vp << true;
@@ -1256,7 +1256,7 @@ bool Field::doNotScroll(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
vp << false;
}
- return true;
+ return TRUE;
}
void Field::SetDoNotScroll(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b)
@@ -1264,13 +1264,13 @@ void Field::SetDoNotScroll(CPDFSDK_Document* pDocument, const CFX_WideString& sw
//Not supported.
}
-bool Field::doNotSpellCheck(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::doNotSpellCheck(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -1279,14 +1279,14 @@ bool Field::doNotSpellCheck(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_TEXTFIELD &&
pFormField->GetFieldType() != FIELDTYPE_COMBOBOX)
- return false;
+ return FALSE;
if (pFormField->GetFieldFlags() & FIELDFLAG_DONOTSPELLCHECK)
vp << true;
@@ -1294,10 +1294,10 @@ bool Field::doNotSpellCheck(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString
vp << false;
}
- return true;
+ return TRUE;
}
-void Field::SetDelay(bool bDelay)
+void Field::SetDelay(FX_BOOL bDelay)
{
m_bDelay = bDelay;
@@ -1308,11 +1308,11 @@ void Field::SetDelay(bool bDelay)
}
}
-bool Field::delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -1323,16 +1323,16 @@ bool Field::delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
vp << m_bDelay;
}
- return true;
+ return TRUE;
}
-bool Field::display(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::display(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int nVP;
vp >> nVP;
@@ -1350,7 +1350,7 @@ bool Field::display(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
@@ -1359,7 +1359,7 @@ bool Field::display(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError
ASSERT(pInterForm != NULL);
CPDFSDK_Widget* pWidget = pInterForm->GetWidget(GetSmartFieldControl(pFormField));
- if (!pWidget)return false;
+ if (!pWidget)return FALSE;
FX_DWORD dwFlag = pWidget->GetFlags();
@@ -1387,7 +1387,7 @@ bool Field::display(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError
}
}
- return true;
+ return TRUE;
}
void Field::SetDisplay(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
@@ -1407,7 +1407,7 @@ void Field::SetDisplay(CPDFSDK_Document* pDocument, const CFX_WideString& swFiel
if (nControlIndex < 0)
{
- bool bSet = false;
+ FX_BOOL bSet = FALSE;
for (int j=0,jsz = pFormField->CountControls(); j<jsz; j++)
{
CPDF_FormControl* pFormControl = pFormField->GetControl(j);
@@ -1445,12 +1445,12 @@ void Field::SetDisplay(CPDFSDK_Document* pDocument, const CFX_WideString& swFiel
if (dwFlag != pWidget->GetFlags())
{
pWidget->SetFlags(dwFlag);
- bSet = true;
+ bSet = TRUE;
}
}
}
- if (bSet) UpdateFormField(pDocument, pFormField, true, false, true);
+ if (bSet) UpdateFormField(pDocument, pFormField, TRUE, FALSE, TRUE);
}
else
{
@@ -1489,7 +1489,7 @@ void Field::SetDisplay(CPDFSDK_Document* pDocument, const CFX_WideString& swFiel
if (dwFlag != pWidget->GetFlags())
{
pWidget->SetFlags(dwFlag);
- UpdateFormControl(pDocument, pFormControl, true, false, true);
+ UpdateFormControl(pDocument, pFormControl, TRUE, FALSE, TRUE);
}
}
}
@@ -1497,21 +1497,21 @@ void Field::SetDisplay(CPDFSDK_Document* pDocument, const CFX_WideString& swFiel
}
}
-bool Field::doc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::doc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (!vp.IsGetting()) {
- return false;
+ return FALSE;
}
vp << m_pJSDoc->GetCJSDoc();
- return true;
+ return TRUE;
}
-bool Field::editable(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::editable(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -1520,13 +1520,13 @@ bool Field::editable(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_COMBOBOX)
- return false;
+ return FALSE;
if (pFormField->GetFieldFlags() & FIELDFLAG_EDIT)
vp << true;
@@ -1534,30 +1534,30 @@ bool Field::editable(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
vp << false;
}
- return true;
+ return TRUE;
}
-bool Field::exportValues(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::exportValues(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
if (FieldArray.GetSize() <= 0)
- return false;
+ return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
if (pFormField->GetFieldType() != FIELDTYPE_CHECKBOX &&
pFormField->GetFieldType() != FIELDTYPE_RADIOBUTTON)
- return false;
+ return FALSE;
if (vp.IsSetting())
{
if (!m_bCanSet)
- return false;
+ return FALSE;
if (!vp.IsArrayObject())
- return false;
+ return FALSE;
}
else
{
@@ -1573,36 +1573,36 @@ bool Field::exportValues(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
else
{
if (m_nFormControlIndex >= pFormField->CountControls())
- return false;
+ return FALSE;
CPDF_FormControl* pFormControl = pFormField->GetControl(m_nFormControlIndex);
if (!pFormControl)
- return false;
+ return FALSE;
ExportValusArray.SetElement(0, CJS_Value(m_isolate,pFormControl->GetExportValue().c_str()));
}
vp << ExportValusArray;
}
- return true;
+ return TRUE;
}
-bool Field::fileSelect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::fileSelect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
if (FieldArray.GetSize() <= 0)
- return false;
+ return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
if (pFormField->GetFieldType() != FIELDTYPE_TEXTFIELD)
- return false;
+ return FALSE;
if (vp.IsSetting())
{
if (!m_bCanSet)
- return false;
+ return FALSE;
bool bVP;
vp >> bVP;
@@ -1614,10 +1614,10 @@ bool Field::fileSelect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
else
vp << false;
}
- return true;
+ return TRUE;
}
-bool Field::fillColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::fillColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
@@ -1626,15 +1626,15 @@ bool Field::fillColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
if (FieldArray.GetSize() <= 0)
- return false;
+ return FALSE;
if (vp.IsSetting())
{
if (!m_bCanSet)
- return false;
+ return FALSE;
if (!vp.IsArrayObject())
- return false;
+ return FALSE;
vp >> crArray;
@@ -1656,7 +1656,7 @@ bool Field::fillColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
if (!pFormControl)
- return false;
+ return FALSE;
int iColorType;
pFormControl->GetBackgroundColor(iColorType);
@@ -1684,13 +1684,13 @@ bool Field::fillColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
pFormControl->GetOriginalBackgroundColor(3));
}
else
- return false;
+ return FALSE;
color::ConvertPWLColorToArray(color, crArray);
vp << crArray;
}
- return true;
+ return TRUE;
}
void Field::SetFillColor(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CPWL_Color& color)
@@ -1698,13 +1698,13 @@ void Field::SetFillColor(CPDFSDK_Document* pDocument, const CFX_WideString& swFi
//Not supported.
}
-bool Field::hidden(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::hidden(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -1722,7 +1722,7 @@ bool Field::hidden(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
@@ -1731,7 +1731,7 @@ bool Field::hidden(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
ASSERT(pInterForm != NULL);
CPDFSDK_Widget* pWidget = pInterForm->GetWidget(GetSmartFieldControl(pFormField));
- if (!pWidget) return false;
+ if (!pWidget) return FALSE;
FX_DWORD dwFlags = pWidget->GetFlags();
@@ -1743,7 +1743,7 @@ bool Field::hidden(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
vp << false;
}
- return true;
+ return TRUE;
}
void Field::SetHidden(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b)
@@ -1763,7 +1763,7 @@ void Field::SetHidden(CPDFSDK_Document* pDocument, const CFX_WideString& swField
if (nControlIndex < 0)
{
- bool bSet = false;
+ FX_BOOL bSet = FALSE;
for (int j=0,jsz = pFormField->CountControls(); j<jsz; j++)
{
if (CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormField->GetControl(j)))
@@ -1787,13 +1787,13 @@ void Field::SetHidden(CPDFSDK_Document* pDocument, const CFX_WideString& swField
if (dwFlags != pWidget->GetFlags())
{
pWidget->SetFlags(dwFlags);
- bSet = true;
+ bSet = TRUE;
}
}
}
if (bSet)
- UpdateFormField(pDocument, pFormField, true, false, true);
+ UpdateFormField(pDocument, pFormField, TRUE, FALSE, TRUE);
}
else
{
@@ -1821,7 +1821,7 @@ void Field::SetHidden(CPDFSDK_Document* pDocument, const CFX_WideString& swField
if (dwFlags != pWidget->GetFlags())
{
pWidget->SetFlags(dwFlags);
- UpdateFormControl(pDocument, pFormControl, true, false, true);
+ UpdateFormControl(pDocument, pFormControl, TRUE, FALSE, TRUE);
}
}
}
@@ -1829,13 +1829,13 @@ void Field::SetHidden(CPDFSDK_Document* pDocument, const CFX_WideString& swField
}
}
-bool Field::highlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::highlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
CFX_ByteString strMode;
vp >> strMode;
@@ -1853,16 +1853,16 @@ bool Field::highlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_PUSHBUTTON)
- return false;
+ return FALSE;
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl) return false;
+ if (!pFormControl) return FALSE;
int eHM = pFormControl->GetHighlightingMode();
switch (eHM)
@@ -1885,7 +1885,7 @@ bool Field::highlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
}
}
- return true;
+ return TRUE;
}
void Field::SetHighlight(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CFX_ByteString& string)
@@ -1893,13 +1893,13 @@ void Field::SetHighlight(CPDFSDK_Document* pDocument, const CFX_WideString& swFi
//Not supported.
}
-bool Field::lineWidth(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::lineWidth(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int iWidth;
vp >> iWidth;
@@ -1917,26 +1917,26 @@ bool Field::lineWidth(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl) return false;
+ if (!pFormControl) return FALSE;
CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInterForm();
ASSERT(pInterForm != NULL);
- if(!pFormField->CountControls()) return false;
+ if(!pFormField->CountControls()) return FALSE;
CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormField->GetControl(0));
- if (!pWidget) return false;
+ if (!pWidget) return FALSE;
vp << (int32_t)pWidget->GetBorderWidth();
}
- return true;
+ return TRUE;
}
void Field::SetLineWidth(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
@@ -1956,7 +1956,7 @@ void Field::SetLineWidth(CPDFSDK_Document* pDocument, const CFX_WideString& swFi
if (nControlIndex < 0)
{
- bool bSet = false;
+ FX_BOOL bSet = FALSE;
for (int j=0,jsz=pFormField->CountControls(); j<jsz; j++)
{
CPDF_FormControl* pFormControl = pFormField->GetControl(j);
@@ -1967,11 +1967,11 @@ void Field::SetLineWidth(CPDFSDK_Document* pDocument, const CFX_WideString& swFi
if (number != pWidget->GetBorderWidth())
{
pWidget->SetBorderWidth(number);
- bSet = true;
+ bSet = TRUE;
}
}
}
- if (bSet) UpdateFormField(pDocument, pFormField, true, true, true);
+ if (bSet) UpdateFormField(pDocument, pFormField, TRUE, TRUE, TRUE);
}
else
{
@@ -1983,7 +1983,7 @@ void Field::SetLineWidth(CPDFSDK_Document* pDocument, const CFX_WideString& swFi
if (number != pWidget->GetBorderWidth())
{
pWidget->SetBorderWidth(number);
- UpdateFormControl(pDocument, pFormControl, true, true, true);
+ UpdateFormControl(pDocument, pFormControl, TRUE, TRUE, TRUE);
}
}
}
@@ -1991,13 +1991,13 @@ void Field::SetLineWidth(CPDFSDK_Document* pDocument, const CFX_WideString& swFi
}
}
-bool Field::multiline(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::multiline(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -2015,13 +2015,13 @@ bool Field::multiline(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_TEXTFIELD)
- return false;
+ return FALSE;
if (pFormField->GetFieldFlags() & FIELDFLAG_MULTILINE)
vp << true;
@@ -2029,7 +2029,7 @@ bool Field::multiline(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
vp << false;
}
- return true;
+ return TRUE;
}
void Field::SetMultiline(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b)
@@ -2037,13 +2037,13 @@ void Field::SetMultiline(CPDFSDK_Document* pDocument, const CFX_WideString& swFi
//Not supported.
}
-bool Field::multipleSelection(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::multipleSelection(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -2061,13 +2061,13 @@ bool Field::multipleSelection(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStri
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_LISTBOX)
- return false;
+ return FALSE;
if (pFormField->GetFieldFlags() & FIELDFLAG_MULTISELECT)
vp << true;
@@ -2075,7 +2075,7 @@ bool Field::multipleSelection(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideStri
vp << false;
}
- return true;
+ return TRUE;
}
void Field::SetMultipleSelection(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b)
@@ -2083,49 +2083,49 @@ void Field::SetMultipleSelection(CPDFSDK_Document* pDocument, const CFX_WideStri
//Not supported.
}
-bool Field::name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting()) return false;
+ if (!vp.IsGetting()) return FALSE;
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
vp << m_FieldName;
- return true;
+ return TRUE;
}
-bool Field::numItems(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::numItems(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_COMBOBOX &&
pFormField->GetFieldType() != FIELDTYPE_LISTBOX)
- return false;
+ return FALSE;
- if (!vp.IsGetting()) return false;
+ if (!vp.IsGetting()) return FALSE;
vp << (int32_t)pFormField->CountOptions();
- return true;
+ return TRUE;
}
-bool Field::page(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::page(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting()) return false;
+ if (!vp.IsGetting()) return FALSE;
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
- if (!pFormField) return false;
+ if (!pFormField) return FALSE;
ASSERT(m_pDocument != NULL);
@@ -2146,7 +2146,7 @@ bool Field::page(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
CPDFSDK_PageView* pPageView = pWidget->GetPageView();
if(!pPageView)
- return false;
+ return FALSE;
PageArray.SetElement(i, CJS_Value(m_isolate,(int32_t)pPageView->GetPageIndex()));
}
@@ -2158,16 +2158,16 @@ bool Field::page(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
vp << (int32_t) -1;
}
- return true;
+ return TRUE;
}
-bool Field::password(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::password(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -2185,13 +2185,13 @@ bool Field::password(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_TEXTFIELD)
- return false;
+ return FALSE;
if (pFormField->GetFieldFlags() & FIELDFLAG_PASSWORD)
vp << true;
@@ -2199,7 +2199,7 @@ bool Field::password(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
vp << false;
}
- return true;
+ return TRUE;
}
void Field::SetPassword(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b)
@@ -2207,7 +2207,7 @@ void Field::SetPassword(CPDFSDK_Document* pDocument, const CFX_WideString& swFie
//Not supported.
}
-bool Field::print(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::print(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
@@ -2216,11 +2216,11 @@ bool Field::print(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -2232,7 +2232,7 @@ bool Field::print(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
if (m_nFormControlIndex < 0)
{
- bool bSet = false;
+ FX_BOOL bSet = FALSE;
for (int j=0,jsz = pFormField->CountControls(); j<jsz; j++)
{
if (CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormField->GetControl(j)))
@@ -2246,17 +2246,17 @@ bool Field::print(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
if (dwFlags != pWidget->GetFlags())
{
pWidget->SetFlags(dwFlags);
- bSet = true;
+ bSet = TRUE;
}
}
}
if (bSet)
- UpdateFormField(m_pDocument, pFormField, true, false, true);
+ UpdateFormField(m_pDocument, pFormField, TRUE, FALSE, TRUE);
}
else
{
- if(m_nFormControlIndex >= pFormField->CountControls()) return false;
+ if(m_nFormControlIndex >= pFormField->CountControls()) return FALSE;
if (CPDF_FormControl* pFormControl = pFormField->GetControl(m_nFormControlIndex))
{
if (CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormControl))
@@ -2270,7 +2270,7 @@ bool Field::print(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
if (dwFlags != pWidget->GetFlags())
{
pWidget->SetFlags(dwFlags);
- UpdateFormControl(m_pDocument, pFormField->GetControl(m_nFormControlIndex), true, false, true);
+ UpdateFormControl(m_pDocument, pFormField->GetControl(m_nFormControlIndex), TRUE, FALSE, TRUE);
}
}
}
@@ -2283,7 +2283,7 @@ bool Field::print(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
ASSERT(pFormField != NULL);
CPDFSDK_Widget* pWidget = pInterForm->GetWidget(GetSmartFieldControl(pFormField));
- if (!pWidget) return false;
+ if (!pWidget) return FALSE;
if (pWidget->GetFlags() & ANNOTFLAG_PRINT)
vp << true;
@@ -2291,20 +2291,20 @@ bool Field::print(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
vp << false;
}
- return true;
+ return TRUE;
}
-bool Field::radiosInUnison(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::radiosInUnison(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -2316,7 +2316,7 @@ bool Field::radiosInUnison(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_RADIOBUTTON)
- return false;
+ return FALSE;
if (pFormField->GetFieldFlags() & FIELDFLAG_RADIOSINUNISON)
vp << true;
@@ -2324,20 +2324,20 @@ bool Field::radiosInUnison(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
vp << false;
}
- return true;
+ return TRUE;
}
-bool Field::readonly(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::readonly(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -2354,17 +2354,17 @@ bool Field::readonly(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
vp << false;
}
- return true;
+ return TRUE;
}
-bool Field::rect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::rect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
- if (!vp.IsArrayObject())return false;
+ if (!m_bCanSet) return FALSE;
+ if (!vp.IsArrayObject())return FALSE;
CJS_Array rcArray(m_isolate);
vp >> rcArray;
@@ -2395,7 +2395,7 @@ bool Field::rect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
@@ -2404,7 +2404,7 @@ bool Field::rect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
ASSERT(pInterForm != NULL);
CPDFSDK_Widget* pWidget = pInterForm->GetWidget(GetSmartFieldControl(pFormField));
- if (!pWidget) return false;
+ if (!pWidget) return FALSE;
CFX_FloatRect crRect = pWidget->GetRect();
CJS_Value Upper_Leftx(m_isolate),Upper_Lefty(m_isolate),Lower_Rightx(m_isolate),Lower_Righty(m_isolate);
@@ -2422,7 +2422,7 @@ bool Field::rect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
vp << rcArray;
}
- return true;
+ return TRUE;
}
void Field::SetRect(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CPDF_Rect& rect)
@@ -2442,7 +2442,7 @@ void Field::SetRect(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldNa
if (nControlIndex < 0)
{
- bool bSet = false;
+ FX_BOOL bSet = FALSE;
for (int i=0, sz=pFormField->CountControls(); i<sz; i++)
{
CPDF_FormControl* pFormControl = pFormField->GetControl(i);
@@ -2469,13 +2469,13 @@ void Field::SetRect(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldNa
crRect.bottom != rcOld.bottom)
{
pWidget->SetRect(crRect);
- bSet = true;
+ bSet = TRUE;
}
}
}
}
- if (bSet) UpdateFormField(pDocument, pFormField, true, true, true);
+ if (bSet) UpdateFormField(pDocument, pFormField, TRUE, TRUE, TRUE);
}
else
{
@@ -2503,7 +2503,7 @@ void Field::SetRect(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldNa
crRect.bottom != rcOld.bottom)
{
pWidget->SetRect(crRect);
- UpdateFormControl(pDocument, pFormControl, true, true, true);
+ UpdateFormControl(pDocument, pFormControl, TRUE, TRUE, TRUE);
}
}
}
@@ -2512,17 +2512,17 @@ void Field::SetRect(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldNa
}
}
-bool Field::required(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::required(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
@@ -2535,7 +2535,7 @@ bool Field::required(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() == FIELDTYPE_PUSHBUTTON)
- return false;
+ return FALSE;
if (pFormField->GetFieldFlags() & FIELDFLAG_REQUIRED)
vp << true;
@@ -2543,16 +2543,16 @@ bool Field::required(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
vp << false;
}
- return true;
+ return TRUE;
}
-bool Field::richText(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::richText(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
bool bVP;
vp >> bVP;
@@ -2570,13 +2570,13 @@ bool Field::richText(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_TEXTFIELD)
- return false;
+ return FALSE;
if (pFormField->GetFieldFlags() & FIELDFLAG_RICHTEXT)
vp << true;
@@ -2584,7 +2584,7 @@ bool Field::richText(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
vp << false;
}
- return true;
+ return TRUE;
}
void Field::SetRichText(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b)
@@ -2592,19 +2592,19 @@ void Field::SetRichText(CPDFSDK_Document* pDocument, const CFX_WideString& swFie
//Not supported.
}
-bool Field::richValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::richValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
;
}
else
{
;
}
- return true;
+ return TRUE;
}
void Field::SetRichValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex)
@@ -2612,13 +2612,13 @@ void Field::SetRichValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFi
//Not supported.
}
-bool Field::rotation(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::rotation(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int nVP;
vp >> nVP;
@@ -2636,18 +2636,18 @@ bool Field::rotation(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
vp << (int32_t)pFormControl->GetRotation();
}
- return true;
+ return TRUE;
}
void Field::SetRotation(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
@@ -2655,15 +2655,15 @@ void Field::SetRotation(CPDFSDK_Document* pDocument, const CFX_WideString& swFie
//Not supported.
}
-bool Field::strokeColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::strokeColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
- if (!vp.IsArrayObject())return false;
+ if (!vp.IsArrayObject())return FALSE;
CJS_Array crArray(m_isolate);
vp >> crArray;
@@ -2684,13 +2684,13 @@ bool Field::strokeColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
int iColorType;
pFormControl->GetBorderColor(iColorType);
@@ -2719,14 +2719,14 @@ bool Field::strokeColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sE
pFormControl->GetOriginalBorderColor(3));
}
else
- return false;
+ return FALSE;
CJS_Array crArray(m_isolate);
color::ConvertPWLColorToArray(color, crArray);
vp << crArray;
}
- return true;
+ return TRUE;
}
void Field::SetStrokeColor(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CPWL_Color& color)
@@ -2734,13 +2734,13 @@ void Field::SetStrokeColor(CPDFSDK_Document* pDocument, const CFX_WideString& sw
//Not supported.
}
-bool Field::style(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::style(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
CFX_ByteString csBCaption;
vp >> csBCaption;
@@ -2758,17 +2758,17 @@ bool Field::style(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_RADIOBUTTON &&
pFormField->GetFieldType() != FIELDTYPE_CHECKBOX)
- return false;
+ return FALSE;
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl) return false;
+ if (!pFormControl) return FALSE;
CFX_WideString csWCaption = pFormControl->GetNormalCaption();
CFX_ByteString csBCaption;
@@ -2797,7 +2797,7 @@ bool Field::style(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
vp << csBCaption;
}
- return true;
+ return TRUE;
}
void Field::SetStyle(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex,
@@ -2806,21 +2806,21 @@ void Field::SetStyle(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldN
//Not supported.
}
-bool Field::submitName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::submitName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Field::textColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::textColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
CJS_Array crArray(m_isolate);
- if (!vp.IsArrayObject())return false;
+ if (!vp.IsArrayObject())return FALSE;
vp >> crArray;
CPWL_Color color;
@@ -2839,13 +2839,13 @@ bool Field::textColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
int iColorType;
FX_ARGB color;
@@ -2866,7 +2866,7 @@ bool Field::textColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
vp << crArray;
}
- return true;
+ return TRUE;
}
void Field::SetTextColor(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CPWL_Color& color)
@@ -2874,17 +2874,17 @@ void Field::SetTextColor(CPDFSDK_Document* pDocument, const CFX_WideString& swFi
//Not supported.
}
-bool Field::textFont(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::textFont(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
CFX_ByteString csFontName;
vp >> csFontName;
- if (csFontName.IsEmpty()) return false;
+ if (csFontName.IsEmpty()) return FALSE;
if (m_bDelay)
{
@@ -2899,13 +2899,13 @@ bool Field::textFont(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
int nFieldType = pFormField->GetFieldType();
@@ -2915,15 +2915,15 @@ bool Field::textFont(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
nFieldType == FIELDTYPE_TEXTFIELD)
{
CPDF_Font * pFont = pFormControl->GetDefaultControlFont();
- if (!pFont) return false;
+ if (!pFont) return FALSE;
vp << pFont->GetBaseFont();
}
else
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
void Field::SetTextFont(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CFX_ByteString& string)
@@ -2931,13 +2931,13 @@ void Field::SetTextFont(CPDFSDK_Document* pDocument, const CFX_WideString& swFie
//Not supported.
}
-bool Field::textSize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::textSize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int nVP;
vp >> nVP;
@@ -2955,13 +2955,13 @@ bool Field::textSize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
CPDF_DefaultAppearance FieldAppearance = pFormControl->GetDefaultAppearance();
@@ -2972,7 +2972,7 @@ bool Field::textSize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
vp << (int)fFontSize;
}
- return true;
+ return TRUE;
}
void Field::SetTextSize(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
@@ -2980,15 +2980,15 @@ void Field::SetTextSize(CPDFSDK_Document* pDocument, const CFX_WideString& swFie
//Not supported.
}
-bool Field::type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
- if (!vp.IsGetting()) return false;
+ if (!vp.IsGetting()) return FALSE;
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
@@ -3024,16 +3024,16 @@ bool Field::type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
break;
}
- return true;
+ return TRUE;
}
-bool Field::userName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::userName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
CFX_WideString swName;
vp >> swName;
@@ -3051,7 +3051,7 @@ bool Field::userName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
@@ -3059,7 +3059,7 @@ bool Field::userName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
vp << (CFX_WideString)pFormField->GetAlternateName();
}
- return true;
+ return TRUE;
}
void Field::SetUserName(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CFX_WideString& string)
@@ -3067,13 +3067,13 @@ void Field::SetUserName(CPDFSDK_Document* pDocument, const CFX_WideString& swFie
//Not supported.
}
-bool Field::value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsSetting())
{
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
CJS_WideStringArray strArray;
@@ -3109,7 +3109,7 @@ bool Field::value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
@@ -3119,14 +3119,14 @@ bool Field::value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
switch (pFormField->GetFieldType())
{
case FIELDTYPE_PUSHBUTTON:
- return false;
+ return FALSE;
case FIELDTYPE_COMBOBOX:
case FIELDTYPE_TEXTFIELD:
{
CFX_WideString swValue = pFormField->GetValue();
double dRet;
- bool bDot;
+ FX_BOOL bDot;
if (CJS_PublicMethods::ConvertStringToNumber(swValue.c_str(), dRet, bDot))
{
if (bDot)
@@ -3160,7 +3160,7 @@ bool Field::value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
CFX_WideString swValue = pFormField->GetValue();
double dRet;
- bool bDot;
+ FX_BOOL bDot;
if (CJS_PublicMethods::ConvertStringToNumber(swValue.c_str(), dRet, bDot))
{
if (bDot)
@@ -3176,14 +3176,14 @@ bool Field::value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
case FIELDTYPE_CHECKBOX:
case FIELDTYPE_RADIOBUTTON:
{
- bool bFind = false;
+ FX_BOOL bFind = FALSE;
for (int i = 0 , sz = pFormField->CountControls(); i < sz; i++)
{
if (pFormField->GetControl(i)->IsChecked())
{
CFX_WideString swValue = pFormField->GetControl(i)->GetExportValue();
double dRet;
- bool bDot;
+ FX_BOOL bDot;
if (CJS_PublicMethods::ConvertStringToNumber(swValue.c_str(), dRet, bDot))
{
if (bDot)
@@ -3194,7 +3194,7 @@ bool Field::value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
else
vp << swValue;
- bFind = true;
+ bFind = TRUE;
break;
}
else
@@ -3210,7 +3210,7 @@ bool Field::value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
}
}
- return true;
+ return TRUE;
}
void Field::SetValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName,
@@ -3238,8 +3238,8 @@ void Field::SetValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldN
if (pFormField->GetValue() != strArray.GetAt(0))
{
CFX_WideString WideString = strArray.GetAt(0);
- pFormField->SetValue(strArray.GetAt(0), true);
- UpdateFormField(pDocument, pFormField, true, false, true);
+ pFormField->SetValue(strArray.GetAt(0), TRUE);
+ UpdateFormField(pDocument, pFormField, TRUE, FALSE, TRUE);
}
break;
case FIELDTYPE_CHECKBOX: //mantis: 0004493
@@ -3247,14 +3247,14 @@ void Field::SetValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldN
{
if (pFormField->GetValue() != strArray.GetAt(0))
{
- pFormField->SetValue(strArray.GetAt(0), true);
- UpdateFormField(pDocument, pFormField, true, false, true);
+ pFormField->SetValue(strArray.GetAt(0), TRUE);
+ UpdateFormField(pDocument, pFormField, TRUE, FALSE, TRUE);
}
}
break;
case FIELDTYPE_LISTBOX:
{
- bool bModified = false;
+ FX_BOOL bModified = FALSE;
for (int i=0,sz=strArray.GetSize(); i<sz; i++)
{
@@ -3262,21 +3262,21 @@ void Field::SetValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldN
if (!pFormField->IsItemSelected(iIndex))
{
- bModified = true;
+ bModified = TRUE;
break;
}
}
if (bModified)
{
- pFormField->ClearSelection(true);
+ pFormField->ClearSelection(TRUE);
for (int i=0,sz=strArray.GetSize(); i<sz; i++)
{
int iIndex = pFormField->FindOption(strArray.GetAt(i));
- pFormField->SetItemSelection(iIndex, true, true);
+ pFormField->SetItemSelection(iIndex, TRUE, TRUE);
}
- UpdateFormField(pDocument, pFormField, true, false, true);
+ UpdateFormField(pDocument, pFormField, TRUE, FALSE, TRUE);
}
}
break;
@@ -3286,25 +3286,25 @@ void Field::SetValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldN
}
}
-bool Field::valueAsString(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::valueAsString(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
- if (!vp.IsGetting()) return false;
+ if (!vp.IsGetting()) return FALSE;
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() == FIELDTYPE_PUSHBUTTON)
- return false;
+ return FALSE;
if (pFormField->GetFieldType() == FIELDTYPE_CHECKBOX)
{
- if(!pFormField->CountControls()) return false;
+ if(!pFormField->CountControls()) return FALSE;
if (pFormField->GetControl(0)->IsChecked())
vp << L"Yes";
@@ -3331,18 +3331,18 @@ bool Field::valueAsString(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
else
vp << pFormField->GetValue().c_str();
- return true;
+ return TRUE;
}
/* --------------------------------- methods --------------------------------- */
-bool Field::browseForFileToSubmit(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::browseForFileToSubmit(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName, FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
@@ -3357,17 +3357,17 @@ bool Field::browseForFileToSubmit(IFXJS_Context* cc, const CJS_Parameters& param
if(!wsFileName.IsEmpty())
{
pFormField->SetValue(wsFileName);
- UpdateFormField(m_pDocument, pFormField, true, true, true);
+ UpdateFormField(m_pDocument, pFormField, TRUE, TRUE, TRUE);
}
}
else
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
-bool Field::buttonGetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::buttonGetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
@@ -3378,16 +3378,16 @@ bool Field::buttonGetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJ
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_PUSHBUTTON)
- return false;
+ return FALSE;
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
if (nface == 0)
vRet = pFormControl->GetNormalCaption().c_str();
@@ -3396,14 +3396,14 @@ bool Field::buttonGetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJ
else if (nface == 2)
vRet = pFormControl->GetRolloverCaption().c_str();
else
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
//#pragma warning(disable: 4800)
-bool Field::buttonGetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::buttonGetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
@@ -3414,16 +3414,16 @@ bool Field::buttonGetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_PUSHBUTTON)
- return false;
+ return FALSE;
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -3432,7 +3432,7 @@ bool Field::buttonGetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V
ASSERT(pRuntime != NULL);
JSFXObject pObj = JS_NewFxDynamicObj(*pRuntime, pContext, JS_GetObjDefnID(*pRuntime, L"Icon"));
- ASSERT(pObj.IsEmpty() == false);
+ ASSERT(pObj.IsEmpty() == FALSE);
CJS_Icon* pJS_Icon = (CJS_Icon*)JS_GetPrivate(pObj);
ASSERT(pJS_Icon != NULL);
@@ -3448,27 +3448,27 @@ bool Field::buttonGetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V
else if (nface == 2)
pIconStream = pFormControl->GetRolloverIcon();
else
- return false;
+ return FALSE;
pIcon->SetStream(pIconStream);
vRet = pJS_Icon;
- return true;
+ return TRUE;
}
//#pragma warning(default: 4800)
-bool Field::buttonImportIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::buttonImportIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
#if 0
ASSERT(m_pDocument != NULL);
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
- if (!pFormField)return false;
+ if (!pFormField)return FALSE;
CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
ASSERT(pEnv);
@@ -3477,7 +3477,7 @@ bool Field::buttonImportIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJ
if (sIconFileName.IsEmpty())
{
vRet = 1;
- return true;
+ return TRUE;
}
CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInterForm();
@@ -3487,110 +3487,110 @@ bool Field::buttonImportIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJ
if (!pStream)
{
vRet = -1;
- return true;
+ return TRUE;
}
CPDF_FormControl* pFormControl = GetSmartFieldControl(pFormField);
- if (!pFormControl)return false;
+ if (!pFormControl)return FALSE;
pFormControl->SetNormalIcon(pStream);
- UpdateFormControl(m_pDocument, pFormControl, true, true, true);
+ UpdateFormControl(m_pDocument, pFormControl, TRUE, TRUE, TRUE);
vRet = 0;
#endif // 0
- return true;
+ return TRUE;
}
-bool Field::buttonSetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::buttonSetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool Field::buttonSetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::buttonSetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool Field::checkThisBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::checkThisBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int iSize = params.size();
if (iSize < 1)
- return false;
+ return FALSE;
int nWidget = params[0].ToInt();
- bool bCheckit = true;
+ FX_BOOL bCheckit = TRUE;
if (iSize >= 2)
bCheckit = params[1].ToBool();
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if (pFormField->GetFieldType() != FIELDTYPE_CHECKBOX && pFormField->GetFieldType() != FIELDTYPE_RADIOBUTTON)
- return false;
+ return FALSE;
if(nWidget <0 || nWidget >= pFormField->CountControls())
- return false;
+ return FALSE;
if (pFormField->GetFieldType() == FIELDTYPE_RADIOBUTTON)
- pFormField->CheckControl(nWidget, bCheckit, true);
+ pFormField->CheckControl(nWidget, bCheckit, TRUE);
else
- pFormField->CheckControl(nWidget, bCheckit, true);
+ pFormField->CheckControl(nWidget, bCheckit, TRUE);
- UpdateFormField(m_pDocument, pFormField, true, true, true);
- return true;
+ UpdateFormField(m_pDocument, pFormField, TRUE, TRUE, TRUE);
+ return TRUE;
}
-bool Field::clearItems(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::clearItems(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Field::defaultIsChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::defaultIsChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
- if (!m_bCanSet) return false;
+ if (!m_bCanSet) return FALSE;
int iSize = params.size();
if (iSize < 1)
- return false;
+ return FALSE;
int nWidget = params[0].ToInt();
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if(nWidget <0 || nWidget >= pFormField->CountControls())
{
- vRet = false;
- return false;
+ vRet = FALSE;
+ return FALSE;
}
if ((pFormField->GetFieldType() == FIELDTYPE_CHECKBOX)
|| (pFormField->GetFieldType() == FIELDTYPE_RADIOBUTTON))
{
- vRet = true;
+ vRet = TRUE;
}
else
- vRet = false;
+ vRet = FALSE;
- return true;
+ return TRUE;
}
-bool Field::deleteItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::deleteItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
int JS_COMPARESTRING(CFX_WideString* ps1, CFX_WideString* ps2)
@@ -3602,13 +3602,13 @@ int JS_COMPARESTRING(CFX_WideString* ps1, CFX_WideString* ps2)
}
-bool Field::getArray(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::getArray(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CGW_ArrayTemplate<CFX_WideString*> swSort;
@@ -3633,7 +3633,7 @@ bool Field::getArray(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
CFX_WideString* pStr = swSort.GetAt(j);
JSFXObject pObj = JS_NewFxDynamicObj(*pRuntime, pContext, JS_GetObjDefnID(*pRuntime, L"Field"));
- ASSERT(pObj.IsEmpty() == false);
+ ASSERT(pObj.IsEmpty() == FALSE);
CJS_Field* pJSField = (CJS_Field*)JS_GetPrivate(pObj);
ASSERT(pJSField != NULL);
@@ -3652,10 +3652,10 @@ bool Field::getArray(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
vRet = FormFieldArray;
swSort.RemoveAll();
- return true;
+ return TRUE;
}
-bool Field::getItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::getItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
int iSize = params.size();
@@ -3664,13 +3664,13 @@ bool Field::getItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value
if (iSize >= 1)
nIdx = params[0].ToInt();
- bool bExport = true;
+ FX_BOOL bExport = TRUE;
if (iSize >= 2)
bExport = params[1].ToBool();
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
@@ -3692,22 +3692,22 @@ bool Field::getItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value
vRet = pFormField->GetOptionLabel(nIdx).c_str();
}
else
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
-bool Field::getLock(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::getLock(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool Field::insertItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::insertItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Field::isBoxChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::isBoxChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
@@ -3717,32 +3717,32 @@ bool Field::isBoxChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if(nIndex <0 || nIndex >= pFormField->CountControls())
{
- vRet = false;
- return false;
+ vRet = FALSE;
+ return FALSE;
}
if ((pFormField->GetFieldType() == FIELDTYPE_CHECKBOX)
|| (pFormField->GetFieldType() == FIELDTYPE_RADIOBUTTON))
{
if (pFormField->GetControl(nIndex)->IsChecked() !=0 )
- vRet = true;
+ vRet = TRUE;
else
- vRet = false;
+ vRet = FALSE;
}
else
- vRet = false;
+ vRet = FALSE;
- return true;
+ return TRUE;
}
-bool Field::isDefaultChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::isDefaultChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
@@ -3752,49 +3752,49 @@ bool Field::isDefaultChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJ
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
if(nIndex <0 || nIndex >= pFormField->CountControls())
{
- vRet = false;
- return false;
+ vRet = FALSE;
+ return FALSE;
}
if ((pFormField->GetFieldType() == FIELDTYPE_CHECKBOX)
|| (pFormField->GetFieldType() == FIELDTYPE_RADIOBUTTON))
{
if (pFormField->GetControl(nIndex)->IsDefaultChecked() != 0)
- vRet = true;
+ vRet = TRUE;
else
- vRet = false;
+ vRet = FALSE;
}
else
- vRet = false;
+ vRet = FALSE;
- return true;
+ return TRUE;
}
-bool Field::setAction(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::setAction(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Field::setFocus(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::setFocus(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
CFX_PtrArray FieldArray;
GetFormFields(m_FieldName,FieldArray);
- if (FieldArray.GetSize() <= 0) return false;
+ if (FieldArray.GetSize() <= 0) return FALSE;
CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
ASSERT(pFormField != NULL);
int32_t nCount = pFormField->CountControls();
- if (nCount < 1) return false;
+ if (nCount < 1) return FALSE;
CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInterForm();
ASSERT(pInterForm != NULL);
@@ -3810,7 +3810,7 @@ bool Field::setFocus(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
ASSERT(pEnv);
CPDF_Page* pPage = (CPDF_Page*)pEnv->FFI_GetCurrentPage(m_pDocument->GetDocument());
if(!pPage)
- return false;
+ return FALSE;
if (CPDFSDK_PageView* pCurPageView = m_pDocument->GetPageView(pPage))
{
for (int32_t i=0; i<nCount; i++)
@@ -3832,57 +3832,57 @@ bool Field::setFocus(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
m_pDocument->SetFocusAnnot(pWidget);
}
- return true;
+ return TRUE;
}
-bool Field::setItems(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::setItems(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool Field::setLock(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::setLock(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool Field::signatureGetModifications(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::signatureGetModifications(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool Field::signatureGetSeedValue(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::signatureGetSeedValue(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool Field::signatureInfo(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::signatureInfo(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool Field::signatureSetSeedValue(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::signatureSetSeedValue(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool Field::signatureSign(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::signatureSign(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool Field::signatureValidate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Field::signatureValidate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool Field::source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Field::source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsGetting())
{
vp << (CJS_Object*)NULL;
}
- return true;
+ return TRUE;
}
/////////////////////////////////////////// delay /////////////////////////////////////////////
diff --git a/fpdfsdk/src/javascript/Icon.cpp b/fpdfsdk/src/javascript/Icon.cpp
index 27a9773235..6b3e02e1ec 100644
--- a/fpdfsdk/src/javascript/Icon.cpp
+++ b/fpdfsdk/src/javascript/Icon.cpp
@@ -57,11 +57,11 @@ CFX_WideString Icon::GetIconName()
return m_swIconName;
}
-bool Icon::name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL Icon::name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if(!vp.IsGetting())return false;
+ if(!vp.IsGetting())return FALSE;
vp << m_swIconName;
- return true;
+ return TRUE;
}
diff --git a/fpdfsdk/src/javascript/JS_Context.cpp b/fpdfsdk/src/javascript/JS_Context.cpp
index 0edbf0d0e5..72be34d751 100644
--- a/fpdfsdk/src/javascript/JS_Context.cpp
+++ b/fpdfsdk/src/javascript/JS_Context.cpp
@@ -16,8 +16,8 @@
CJS_Context::CJS_Context(CJS_Runtime* pRuntime) :
m_pRuntime(pRuntime),
- m_bBusy(false),
- m_bMsgBoxEnable(true)
+ m_bBusy(FALSE),
+ m_bMsgBoxEnable(TRUE)
{
m_pEventHandler = new CJS_EventHandler(this);
}
@@ -41,15 +41,15 @@ CPDFDoc_Environment* CJS_Context::GetReaderApp()
return m_pRuntime->GetReaderApp();
}
-bool CJS_Context::DoJob(int nMode, const CFX_WideString& script, CFX_WideString& info)
+FX_BOOL CJS_Context::DoJob(int nMode, const CFX_WideString& script, CFX_WideString& info)
{
if (m_bBusy)
{
info = JSGetStringFromID(this, IDS_STRING_JSBUSY);
- return false;
+ return FALSE;
}
- m_bBusy = true;
+ m_bBusy = TRUE;
ASSERT(m_pRuntime != NULL);
ASSERT(m_pEventHandler != NULL);
@@ -58,7 +58,7 @@ bool CJS_Context::DoJob(int nMode, const CFX_WideString& script, CFX_WideString&
if (!m_pRuntime->AddEventToLoop(m_pEventHandler->TargetName(), m_pEventHandler->EventType()))
{
info = JSGetStringFromID(this, IDS_STRING_JSEVENT);
- return false;
+ return FALSE;
}
FXJSErr error ={NULL,NULL, 0};
@@ -95,12 +95,12 @@ bool CJS_Context::DoJob(int nMode, const CFX_WideString& script, CFX_WideString&
m_pRuntime->RemoveEventInLoop(m_pEventHandler->TargetName(), m_pEventHandler->EventType());
m_pEventHandler->Destroy();
- m_bBusy = false;
+ m_bBusy = FALSE;
return nRet >= 0;
}
-bool CJS_Context::RunScript(const CFX_WideString& script, CFX_WideString& info)
+FX_BOOL CJS_Context::RunScript(const CFX_WideString& script, CFX_WideString& info)
{
v8::Isolate::Scope isolate_scope(m_pRuntime->GetIsolate());
v8::HandleScope handle_scope(m_pRuntime->GetIsolate());
@@ -110,7 +110,7 @@ bool CJS_Context::RunScript(const CFX_WideString& script, CFX_WideString& info)
return DoJob(0, script, info);
}
-bool CJS_Context::Compile(const CFX_WideString& script, CFX_WideString& info)
+FX_BOOL CJS_Context::Compile(const CFX_WideString& script, CFX_WideString& info)
{
v8::Isolate::Scope isolate_scope(m_pRuntime->GetIsolate());
v8::HandleScope handle_scope(m_pRuntime->GetIsolate());
@@ -186,58 +186,58 @@ void CJS_Context::OnPage_OutView(CPDFSDK_Document* pTarget)
m_pEventHandler->OnPage_OutView(pTarget);
}
-void CJS_Context::OnField_MouseDown(bool bModifier, bool bShift, CPDF_FormField *pTarget)
+void CJS_Context::OnField_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_MouseDown(bModifier, bShift, pTarget);
}
-void CJS_Context::OnField_MouseEnter(bool bModifier, bool bShift, CPDF_FormField *pTarget)
+void CJS_Context::OnField_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_MouseEnter(bModifier, bShift, pTarget);
}
-void CJS_Context::OnField_MouseExit(bool bModifier, bool bShift, CPDF_FormField *pTarget)
+void CJS_Context::OnField_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_MouseExit(bModifier, bShift, pTarget);
}
-void CJS_Context::OnField_MouseUp(bool bModifier, bool bShift, CPDF_FormField *pTarget)
+void CJS_Context::OnField_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_MouseUp(bModifier, bShift, pTarget);
}
-void CJS_Context::OnField_Focus(bool bModifier, bool bShift, CPDF_FormField* pTarget, const CFX_WideString& Value)
+void CJS_Context::OnField_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, const CFX_WideString& Value)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_Focus(bModifier, bShift, pTarget, Value);
}
-void CJS_Context::OnField_Blur(bool bModifier, bool bShift, CPDF_FormField* pTarget, const CFX_WideString& Value)
+void CJS_Context::OnField_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, const CFX_WideString& Value)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_Blur(bModifier, bShift, pTarget, Value);
}
-void CJS_Context::OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, CFX_WideString& Value, bool& bRc)
+void CJS_Context::OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_Calculate(pSource, pTarget, Value, bRc);
}
-void CJS_Context::OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, bool bWillCommit)
+void CJS_Context::OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit)
{
m_pEventHandler->OnField_Format(pTarget, Value, bWillCommit);
}
void CJS_Context::OnField_Keystroke(CFX_WideString& strChange, const CFX_WideString& strChangeEx,
- bool bKeyDown, bool bModifier, int &nSelEnd,int &nSelStart,
- bool bShift, CPDF_FormField* pTarget, CFX_WideString& Value,
- bool bWillCommit, bool bFieldFull, bool& bRc)
+ 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)
{
m_pEventHandler->OnField_Keystroke(
strChange, strChangeEx, bKeyDown, bModifier, nSelEnd, nSelStart,
@@ -245,68 +245,68 @@ void CJS_Context::OnField_Keystroke(CFX_WideString& strChange, const CFX_WideStr
}
void CJS_Context::OnField_Validate(CFX_WideString& strChange,const CFX_WideString& strChangeEx,
- bool bKeyDown, bool bModifier, bool bShift, CPDF_FormField* pTarget,
- CFX_WideString& Value, bool& bRc)
+ FX_BOOL bKeyDown, FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget,
+ CFX_WideString& Value, FX_BOOL& bRc)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnField_Validate(strChange, strChangeEx, bKeyDown, bModifier, bShift, pTarget, Value, bRc);
}
-void CJS_Context::OnScreen_Focus(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_Focus(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_Blur(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_Blur(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_Open(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_Open(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_Open(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_Close(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_Close(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_Close(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_MouseDown(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_MouseDown(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_MouseUp(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_MouseUp(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_MouseEnter(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_MouseEnter(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_MouseExit(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_MouseExit(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_InView(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_InView(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_InView(bModifier, bShift, pScreen);
}
-void CJS_Context::OnScreen_OutView(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_Context::OnScreen_OutView(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
ASSERT(m_pEventHandler != NULL);
m_pEventHandler->OnScreen_OutView(bModifier, bShift, pScreen);
diff --git a/fpdfsdk/src/javascript/JS_EventHandler.cpp b/fpdfsdk/src/javascript/JS_EventHandler.cpp
index 1056c446f4..1769e3053f 100644
--- a/fpdfsdk/src/javascript/JS_EventHandler.cpp
+++ b/fpdfsdk/src/javascript/JS_EventHandler.cpp
@@ -20,21 +20,21 @@
CJS_EventHandler::CJS_EventHandler(CJS_Context * pContext) :
m_pJSContext(pContext),
m_eEventType(JET_UNKNOWN),
- m_bValid(false),
+ m_bValid(FALSE),
m_pWideStrChange(NULL),
m_nCommitKey(-1),
- m_bKeyDown(false),
- m_bModifier(false),
- m_bShift(false),
+ m_bKeyDown(FALSE),
+ m_bModifier(FALSE),
+ m_bShift(FALSE),
m_pISelEnd(NULL),
m_nSelEndDu(0),
m_pISelStart(NULL),
m_nSelStartDu(0),
- m_bWillCommit(false),
+ m_bWillCommit(FALSE),
m_pValue(NULL),
- m_bFieldFull(false),
+ m_bFieldFull(FALSE),
m_pbRc(NULL),
- m_bRcDu(false),
+ m_bRcDu(FALSE),
m_pSourceDoc(NULL),
m_pTargetBookMark(NULL),
m_pTargetDoc(NULL),
@@ -121,7 +121,7 @@ void CJS_EventHandler::OnPage_OutView(CPDFSDK_Document* pDoc)
m_pTargetDoc = pDoc;
}
-void CJS_EventHandler::OnField_MouseEnter(bool bModifier, bool bShift, CPDF_FormField* pTarget)
+void CJS_EventHandler::OnField_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget)
{
Initial(JET_FIELD_MOUSEENTER);
@@ -132,7 +132,7 @@ void CJS_EventHandler::OnField_MouseEnter(bool bModifier, bool bShift, CPDF_Form
m_strTargetName = pTarget->GetFullName();
}
-void CJS_EventHandler::OnField_MouseExit(bool bModifier, bool bShift, CPDF_FormField* pTarget)
+void CJS_EventHandler::OnField_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget)
{
Initial(JET_FIELD_MOUSEEXIT);
@@ -142,7 +142,7 @@ void CJS_EventHandler::OnField_MouseExit(bool bModifier, bool bShift, CPDF_FormF
m_strTargetName = pTarget->GetFullName();
}
-void CJS_EventHandler::OnField_MouseDown(bool bModifier, bool bShift, CPDF_FormField* pTarget)
+void CJS_EventHandler::OnField_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget)
{
Initial(JET_FIELD_MOUSEDOWN);
m_eEventType = JET_FIELD_MOUSEDOWN;
@@ -153,7 +153,7 @@ void CJS_EventHandler::OnField_MouseDown(bool bModifier, bool bShift, CPDF_FormF
m_strTargetName = pTarget->GetFullName();
}
-void CJS_EventHandler::OnField_MouseUp(bool bModifier, bool bShift, CPDF_FormField* pTarget)
+void CJS_EventHandler::OnField_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget)
{
Initial(JET_FIELD_MOUSEUP);
@@ -163,7 +163,7 @@ void CJS_EventHandler::OnField_MouseUp(bool bModifier, bool bShift, CPDF_FormFie
m_strTargetName = pTarget->GetFullName();
}
-void CJS_EventHandler::OnField_Focus(bool bModifier, bool bShift, CPDF_FormField* pTarget,
+void CJS_EventHandler::OnField_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget,
const CFX_WideString& Value)
{
Initial(JET_FIELD_FOCUS);
@@ -175,7 +175,7 @@ void CJS_EventHandler::OnField_Focus(bool bModifier, bool bShift, CPDF_FormField
m_pValue = (CFX_WideString*)&Value;
}
-void CJS_EventHandler::OnField_Blur(bool bModifier, bool bShift, CPDF_FormField* pTarget,
+void CJS_EventHandler::OnField_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget,
const CFX_WideString& Value)
{
Initial(JET_FIELD_BLUR);
@@ -188,11 +188,11 @@ void CJS_EventHandler::OnField_Blur(bool bModifier, bool bShift, CPDF_FormField*
}
void CJS_EventHandler::OnField_Keystroke(CFX_WideString &strChange,
- const CFX_WideString& strChangeEx, bool KeyDown,
- bool bModifier, int& nSelEnd, int& nSelStart,
- bool bShift, CPDF_FormField* pTarget,
- CFX_WideString& Value, bool bWillCommit,
- bool bFieldFull, bool& bRc)
+ 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)
{
Initial(JET_FIELD_KEYSTROKE);
@@ -213,8 +213,8 @@ void CJS_EventHandler::OnField_Keystroke(CFX_WideString &strChange,
}
void CJS_EventHandler::OnField_Validate(CFX_WideString& strChange, const CFX_WideString& strChangeEx,
- bool bKeyDown, bool bModifier, bool bShift,
- CPDF_FormField* pTarget, CFX_WideString& Value, bool& bRc)
+ FX_BOOL bKeyDown, FX_BOOL bModifier, FX_BOOL bShift,
+ CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc)
{
Initial(JET_FIELD_VALIDATE);
@@ -230,7 +230,7 @@ void CJS_EventHandler::OnField_Validate(CFX_WideString& strChange, const CFX_Wid
}
void CJS_EventHandler::OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget,
- CFX_WideString& Value, bool& bRc)
+ CFX_WideString& Value, FX_BOOL& bRc)
{
Initial(JET_FIELD_CALCULATE);
@@ -244,7 +244,7 @@ void CJS_EventHandler::OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField
void CJS_EventHandler::OnField_Format(CPDF_FormField* pTarget,
CFX_WideString& Value,
- bool bWillCommit)
+ FX_BOOL bWillCommit)
{
Initial(JET_FIELD_FORMAT);
@@ -255,7 +255,7 @@ void CJS_EventHandler::OnField_Format(CPDF_FormField* pTarget,
m_bWillCommit = bWillCommit;
}
-void CJS_EventHandler::OnScreen_Focus(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_EventHandler::OnScreen_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
Initial(JET_SCREEN_FOCUS);
@@ -264,7 +264,7 @@ void CJS_EventHandler::OnScreen_Focus(bool bModifier, bool bShift, CPDFSDK_Annot
m_pTargetAnnot = pScreen;
}
-void CJS_EventHandler::OnScreen_Blur(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_EventHandler::OnScreen_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
Initial(JET_SCREEN_BLUR);
@@ -273,7 +273,7 @@ void CJS_EventHandler::OnScreen_Blur(bool bModifier, bool bShift, CPDFSDK_Annot*
m_pTargetAnnot = pScreen;
}
-void CJS_EventHandler::OnScreen_Open(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_EventHandler::OnScreen_Open(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
Initial(JET_SCREEN_OPEN);
@@ -282,7 +282,7 @@ void CJS_EventHandler::OnScreen_Open(bool bModifier, bool bShift, CPDFSDK_Annot*
m_pTargetAnnot = pScreen;
}
-void CJS_EventHandler::OnScreen_Close(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_EventHandler::OnScreen_Close(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
Initial(JET_SCREEN_CLOSE);
@@ -291,7 +291,7 @@ void CJS_EventHandler::OnScreen_Close(bool bModifier, bool bShift, CPDFSDK_Annot
m_pTargetAnnot = pScreen;
}
-void CJS_EventHandler::OnScreen_MouseDown(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_EventHandler::OnScreen_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
Initial(JET_SCREEN_MOUSEDOWN);
@@ -300,7 +300,7 @@ void CJS_EventHandler::OnScreen_MouseDown(bool bModifier, bool bShift, CPDFSDK_A
m_pTargetAnnot = pScreen;
}
-void CJS_EventHandler::OnScreen_MouseUp(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_EventHandler::OnScreen_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
Initial(JET_SCREEN_MOUSEUP);
@@ -309,7 +309,7 @@ void CJS_EventHandler::OnScreen_MouseUp(bool bModifier, bool bShift, CPDFSDK_Ann
m_pTargetAnnot = pScreen;
}
-void CJS_EventHandler::OnScreen_MouseEnter(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_EventHandler::OnScreen_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
Initial(JET_SCREEN_MOUSEENTER);
@@ -318,7 +318,7 @@ void CJS_EventHandler::OnScreen_MouseEnter(bool bModifier, bool bShift, CPDFSDK_
m_pTargetAnnot = pScreen;
}
-void CJS_EventHandler::OnScreen_MouseExit(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_EventHandler::OnScreen_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
Initial(JET_SCREEN_MOUSEEXIT);
@@ -327,7 +327,7 @@ void CJS_EventHandler::OnScreen_MouseExit(bool bModifier, bool bShift, CPDFSDK_A
m_pTargetAnnot = pScreen;
}
-void CJS_EventHandler::OnScreen_InView(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_EventHandler::OnScreen_InView(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
Initial(JET_SCREEN_INVIEW);
@@ -336,7 +336,7 @@ void CJS_EventHandler::OnScreen_InView(bool bModifier, bool bShift, CPDFSDK_Anno
m_pTargetAnnot = pScreen;
}
-void CJS_EventHandler::OnScreen_OutView(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen)
+void CJS_EventHandler::OnScreen_OutView(FX_BOOL bModifier, FX_BOOL bShift, CPDFSDK_Annot* pScreen)
{
Initial(JET_SCREEN_OUTVIEW);
@@ -395,33 +395,33 @@ void CJS_EventHandler::Initial(JS_EVENT_T type)
m_WideStrChangeDu = L"";
m_WideStrChangeEx = L"";
m_nCommitKey = -1;
- m_bKeyDown = false;
- m_bModifier = false;
- m_bShift = false;
+ m_bKeyDown = FALSE;
+ m_bModifier = FALSE;
+ m_bShift = FALSE;
m_pISelEnd = NULL;
m_nSelEndDu = 0;
m_pISelStart = NULL;
m_nSelStartDu = 0;
- m_bWillCommit = false;
+ m_bWillCommit = FALSE;
m_pValue = NULL;
- m_bFieldFull = false;
+ m_bFieldFull = FALSE;
m_pbRc = NULL;
- m_bRcDu = false;
+ m_bRcDu = FALSE;
m_pSourceDoc = NULL;
m_pTargetBookMark = NULL;
m_pTargetDoc = NULL;
m_pTargetAnnot = NULL;
- m_bValid = true;
+ m_bValid = TRUE;
}
void CJS_EventHandler::Destroy()
{
- m_bValid = false;
+ m_bValid = FALSE;
}
-bool CJS_EventHandler::IsValid()
+FX_BOOL CJS_EventHandler::IsValid()
{
return m_bValid;
}
@@ -444,17 +444,17 @@ int CJS_EventHandler::CommitKey()
return m_nCommitKey;
}
-bool CJS_EventHandler::FieldFull()
+FX_BOOL CJS_EventHandler::FieldFull()
{
return m_bFieldFull;
}
-bool CJS_EventHandler::KeyDown()
+FX_BOOL CJS_EventHandler::KeyDown()
{
return m_bKeyDown;
}
-bool CJS_EventHandler::Modifier()
+FX_BOOL CJS_EventHandler::Modifier()
{
return m_bModifier;
}
@@ -555,7 +555,7 @@ const FX_WCHAR* CJS_EventHandler::Type()
return L"";
}
-bool& CJS_EventHandler::Rc()
+FX_BOOL& CJS_EventHandler::Rc()
{
if (m_pbRc) {
return *m_pbRc;
@@ -579,7 +579,7 @@ int & CJS_EventHandler::SelStart()
return m_nSelStartDu;
}
-bool CJS_EventHandler::Shift()
+FX_BOOL CJS_EventHandler::Shift()
{
return m_bShift;
}
@@ -591,9 +591,9 @@ Field* CJS_EventHandler::Source()
CJS_Runtime* pRuntime = m_pJSContext->GetJSRuntime();
JSFXObject pDocObj = JS_NewFxDynamicObj(*pRuntime, m_pJSContext, JS_GetObjDefnID(*pRuntime, L"Document"));
- ASSERT(pDocObj.IsEmpty() == false);
+ ASSERT(pDocObj.IsEmpty() == FALSE);
JSFXObject pFieldObj = JS_NewFxDynamicObj(*pRuntime, m_pJSContext, JS_GetObjDefnID(*pRuntime, L"Field"));
- ASSERT(pFieldObj.IsEmpty() == false);
+ ASSERT(pFieldObj.IsEmpty() == FALSE);
CJS_Document* pJSDocument = (CJS_Document*)JS_GetPrivate(pDocObj);
ASSERT(pJSDocument != NULL);
@@ -625,9 +625,9 @@ Field* CJS_EventHandler::Target_Field()
CJS_Runtime* pRuntime = m_pJSContext->GetJSRuntime();
JSFXObject pDocObj = JS_NewFxDynamicObj(*pRuntime, m_pJSContext, JS_GetObjDefnID(*pRuntime, L"Document"));
- ASSERT(pDocObj.IsEmpty() == false);
+ ASSERT(pDocObj.IsEmpty() == FALSE);
JSFXObject pFieldObj = JS_NewFxDynamicObj(*pRuntime, m_pJSContext, JS_GetObjDefnID(*pRuntime, L"Field"));
- ASSERT(pFieldObj.IsEmpty() == false);
+ ASSERT(pFieldObj.IsEmpty() == FALSE);
CJS_Document* pJSDocument = (CJS_Document*)JS_GetPrivate(pDocObj);
ASSERT(pJSDocument != NULL);
@@ -653,7 +653,7 @@ CFX_WideString& CJS_EventHandler::Value()
return *m_pValue;
}
-bool CJS_EventHandler::WillCommit()
+FX_BOOL CJS_EventHandler::WillCommit()
{
return m_bWillCommit;
}
diff --git a/fpdfsdk/src/javascript/JS_GlobalData.cpp b/fpdfsdk/src/javascript/JS_GlobalData.cpp
index 71e3a50a60..8c7bd7150e 100644
--- a/fpdfsdk/src/javascript/JS_GlobalData.cpp
+++ b/fpdfsdk/src/javascript/JS_GlobalData.cpp
@@ -296,7 +296,7 @@ void CJS_GlobalData::SetGlobalVariableNull(const FX_CHAR* propname)
}
}
-bool CJS_GlobalData::SetGlobalVariablePersistent(const FX_CHAR* propname, bool bPersistent)
+FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(const FX_CHAR* propname, FX_BOOL bPersistent)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -304,18 +304,18 @@ bool CJS_GlobalData::SetGlobalVariablePersistent(const FX_CHAR* propname, bool b
sPropName.TrimLeft();
sPropName.TrimRight();
- if (sPropName.GetLength() == 0) return false;
+ if (sPropName.GetLength() == 0) return FALSE;
if (CJS_GlobalData_Element* pData = GetGlobalVariable(sPropName))
{
pData->bPersistent = bPersistent;
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname)
+FX_BOOL CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -323,7 +323,7 @@ bool CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname)
sPropName.TrimLeft();
sPropName.TrimRight();
- if (sPropName.GetLength() == 0) return false;
+ if (sPropName.GetLength() == 0) return FALSE;
int nFind = FindGlobalVariable(sPropName);
@@ -331,10 +331,10 @@ bool CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname)
{
delete m_arrayGlobalData.GetAt(nFind);
m_arrayGlobalData.RemoveAt(nFind);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
int32_t CJS_GlobalData::GetSize() const
@@ -417,7 +417,7 @@ void CJS_GlobalData::LoadGlobalPersistentVariables()
break;
}
SetGlobalVariableNumber(sEntry, dData);
- SetGlobalVariablePersistent(sEntry, true);
+ SetGlobalVariablePersistent(sEntry, TRUE);
}
break;
case JS_GLOBALDATA_TYPE_BOOLEAN:
@@ -425,7 +425,7 @@ void CJS_GlobalData::LoadGlobalPersistentVariables()
FX_WORD wData = *((FX_WORD*)p);
p += sizeof(FX_WORD);
SetGlobalVariableBoolean(sEntry, (bool)(wData == 1));
- SetGlobalVariablePersistent(sEntry, true);
+ SetGlobalVariablePersistent(sEntry, TRUE);
}
break;
case JS_GLOBALDATA_TYPE_STRING:
@@ -437,14 +437,14 @@ void CJS_GlobalData::LoadGlobalPersistentVariables()
break;
SetGlobalVariableString(sEntry, CFX_ByteString(p, dwLength));
- SetGlobalVariablePersistent(sEntry, true);
+ SetGlobalVariablePersistent(sEntry, TRUE);
p += sizeof(char) * dwLength;
}
break;
case JS_GLOBALDATA_TYPE_NULL:
{
SetGlobalVariableNull(sEntry);
- SetGlobalVariablePersistent(sEntry, true);
+ SetGlobalVariablePersistent(sEntry, TRUE);
}
}
}
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index 7333e88cd2..485cd27813 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp
@@ -40,7 +40,7 @@ IFXJS_Runtime* CJS_RuntimeFactory::NewJSRuntime(CPDFDoc_Environ
embedderDataSlot = pApp->GetFormFillInfo()->m_pJsPlatform->m_v8EmbedderSlot;
}
JS_Initial(embedderDataSlot);
- m_bInit = true;
+ m_bInit = TRUE;
}
return new CJS_Runtime(pApp);
}
@@ -58,7 +58,7 @@ void CJS_RuntimeFactory::Release()
{
JS_Release();
ReleaseGlobalData();
- m_bInit = false;
+ m_bInit = FALSE;
}
}
}
@@ -108,7 +108,7 @@ void CJS_ArrayBufferAllocator::Free(void* data, size_t length) {
CJS_Runtime::CJS_Runtime(CPDFDoc_Environment * pApp) :
m_pApp(pApp),
m_pDocument(NULL),
- m_bBlocking(false),
+ m_bBlocking(FALSE),
m_pFieldEventPath(NULL),
m_isolate(NULL)
{
@@ -150,46 +150,46 @@ CJS_Runtime::~CJS_Runtime()
m_isolate->Dispose();
}
-bool CJS_Runtime::InitJSObjects()
+FX_BOOL CJS_Runtime::InitJSObjects()
{
v8::Isolate::Scope isolate_scope(GetIsolate());
v8::HandleScope handle_scope(GetIsolate());
v8::Local<v8::Context> context = v8::Context::New(GetIsolate());
v8::Context::Scope context_scope(context);
//0 - 8
- if (CJS_Border::Init(*this, JS_STATIC) < 0) return false;
- if (CJS_Display::Init(*this, JS_STATIC) < 0) return false;
- if (CJS_Font::Init(*this, JS_STATIC) < 0) return false;
- if (CJS_Highlight::Init(*this, JS_STATIC) < 0) return false;
- if (CJS_Position::Init(*this, JS_STATIC) < 0) return false;
- if (CJS_ScaleHow::Init(*this, JS_STATIC) < 0) return false;
- if (CJS_ScaleWhen::Init(*this, JS_STATIC) < 0) return false;
- if (CJS_Style::Init(*this, JS_STATIC) < 0) return false;
- if (CJS_Zoomtype::Init(*this, JS_STATIC) < 0) return false;
+ if (CJS_Border::Init(*this, JS_STATIC) < 0) return FALSE;
+ if (CJS_Display::Init(*this, JS_STATIC) < 0) return FALSE;
+ if (CJS_Font::Init(*this, JS_STATIC) < 0) return FALSE;
+ if (CJS_Highlight::Init(*this, JS_STATIC) < 0) return FALSE;
+ if (CJS_Position::Init(*this, JS_STATIC) < 0) return FALSE;
+ if (CJS_ScaleHow::Init(*this, JS_STATIC) < 0) return FALSE;
+ if (CJS_ScaleWhen::Init(*this, JS_STATIC) < 0) return FALSE;
+ if (CJS_Style::Init(*this, JS_STATIC) < 0) return FALSE;
+ if (CJS_Zoomtype::Init(*this, JS_STATIC) < 0) return FALSE;
//9 - 11
- if (CJS_App::Init(*this, JS_STATIC) < 0) return false;
- if (CJS_Color::Init(*this, JS_STATIC) < 0) return false;
- if (CJS_Console::Init(*this, JS_STATIC) < 0) return false;
+ if (CJS_App::Init(*this, JS_STATIC) < 0) return FALSE;
+ if (CJS_Color::Init(*this, JS_STATIC) < 0) return FALSE;
+ if (CJS_Console::Init(*this, JS_STATIC) < 0) return FALSE;
//12 - 14
- if (CJS_Document::Init(*this, JS_DYNAMIC) < 0) return false;
- if (CJS_Event::Init(*this, JS_STATIC) < 0) return false;
- if (CJS_Field::Init(*this, JS_DYNAMIC) < 0) return false;
+ if (CJS_Document::Init(*this, JS_DYNAMIC) < 0) return FALSE;
+ if (CJS_Event::Init(*this, JS_STATIC) < 0) return FALSE;
+ if (CJS_Field::Init(*this, JS_DYNAMIC) < 0) return FALSE;
//15 - 17
- if (CJS_Global::Init(*this, JS_STATIC) < 0) return false;
- if (CJS_Icon::Init(*this, JS_DYNAMIC) < 0) return false;
- if (CJS_Util::Init(*this, JS_STATIC) < 0) return false;
+ if (CJS_Global::Init(*this, JS_STATIC) < 0) return FALSE;
+ if (CJS_Icon::Init(*this, JS_DYNAMIC) < 0) return FALSE;
+ if (CJS_Util::Init(*this, JS_STATIC) < 0) return FALSE;
- if (CJS_PublicMethods::Init(*this) < 0) return false;
- if (CJS_GlobalConsts::Init(*this) < 0) return false;
- if (CJS_GlobalArrays::Init(*this) < 0) return false;
+ if (CJS_PublicMethods::Init(*this) < 0) return FALSE;
+ if (CJS_GlobalConsts::Init(*this) < 0) return FALSE;
+ if (CJS_GlobalArrays::Init(*this) < 0) return FALSE;
- if (CJS_TimerObj::Init(*this, JS_DYNAMIC) < 0) return false;
- if (CJS_PrintParamsObj::Init(*this, JS_DYNAMIC) <0) return false;
+ if (CJS_TimerObj::Init(*this, JS_DYNAMIC) < 0) return FALSE;
+ if (CJS_PrintParamsObj::Init(*this, JS_DYNAMIC) <0) return FALSE;
- return true;
+ return TRUE;
}
IFXJS_Context* CJS_Runtime::NewContext()
@@ -255,7 +255,7 @@ void CJS_Runtime::SetReaderDocument(CPDFSDK_Document* pReaderDoc)
}
}
-bool CJS_Runtime::AddEventToLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType)
+FX_BOOL CJS_Runtime::AddEventToLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType)
{
if (m_pFieldEventPath == NULL)
{
@@ -264,7 +264,7 @@ bool CJS_Runtime::AddEventToLoop(const CFX_WideString& sTargetName, JS_EVENT_T e
m_pFieldEventPath->eEventType = eEventType;
m_pFieldEventPath->pNext = NULL;
- return true;
+ return TRUE;
}
//to search
@@ -273,7 +273,7 @@ bool CJS_Runtime::AddEventToLoop(const CFX_WideString& sTargetName, JS_EVENT_T e
while (p)
{
if (p->eEventType == eEventType && p->sTargetName == sTargetName)
- return false;
+ return FALSE;
pLast = p;
p = p->pNext;
@@ -287,12 +287,12 @@ bool CJS_Runtime::AddEventToLoop(const CFX_WideString& sTargetName, JS_EVENT_T e
pLast->pNext = pNew;
- return true;
+ return TRUE;
}
void CJS_Runtime::RemoveEventInLoop(const CFX_WideString& sTargetName, JS_EVENT_T eEventType)
{
- bool bFind = false;
+ FX_BOOL bFind = FALSE;
CJS_FieldEvent* p = m_pFieldEventPath;
CJS_FieldEvent* pLast = NULL;
@@ -300,7 +300,7 @@ void CJS_Runtime::RemoveEventInLoop(const CFX_WideString& sTargetName, JS_EVENT_
{
if (p->eEventType == eEventType && p->sTargetName == sTargetName)
{
- bFind = true;
+ bFind = TRUE;
break;
}
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp
index 611b1112a0..058f2eaf45 100644
--- a/fpdfsdk/src/javascript/JS_Value.cpp
+++ b/fpdfsdk/src/javascript/JS_Value.cpp
@@ -256,45 +256,45 @@ FXJSVALUETYPE CJS_Value::GetType() const
return VT_unknown;
}
-bool CJS_Value::IsArrayObject() const
+FX_BOOL CJS_Value::IsArrayObject() const
{
- if(m_pValue.IsEmpty()) return false;
+ if(m_pValue.IsEmpty()) return FALSE;
return m_pValue->IsArray();
}
-bool CJS_Value::IsDateObject() const
+FX_BOOL CJS_Value::IsDateObject() const
{
- if(m_pValue.IsEmpty()) return false;
+ if(m_pValue.IsEmpty()) return FALSE;
return m_pValue->IsDate();
}
//CJS_Value::operator CJS_Array()
-bool CJS_Value::ConvertToArray(CJS_Array &array) const
+FX_BOOL CJS_Value::ConvertToArray(CJS_Array &array) const
{
if (IsArrayObject())
{
array.Attach(JS_ToArray(m_isolate, m_pValue));
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CJS_Value::ConvertToDate(CJS_Date &date) const
+FX_BOOL CJS_Value::ConvertToDate(CJS_Date &date) const
{
// if (GetType() == VT_date)
// {
// date = (double)(*this);
-// return true;
+// return TRUE;
// }
if (IsDateObject())
{
date.Attach(m_pValue);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
/* ---------------------------- CJS_PropValue ---------------------------- */
@@ -314,12 +314,12 @@ CJS_PropValue::~CJS_PropValue()
{
}
-bool CJS_PropValue::IsSetting()
+FX_BOOL CJS_PropValue::IsSetting()
{
return m_bIsSetting;
}
-bool CJS_PropValue::IsGetting()
+FX_BOOL CJS_PropValue::IsGetting()
{
return !m_bIsSetting;
}
@@ -480,9 +480,9 @@ void CJS_Array::Attach(v8::Local<v8::Array> pArray)
m_pArray = pArray;
}
-bool CJS_Array::IsAttached()
+FX_BOOL CJS_Array::IsAttached()
{
- return false;
+ return FALSE;
}
void CJS_Array::GetElement(unsigned index,CJS_Value &value)
@@ -543,9 +543,9 @@ CJS_Date::~CJS_Date()
{
}
-bool CJS_Date::IsValidDate()
+FX_BOOL CJS_Date::IsValidDate()
{
- if(m_pDate.IsEmpty()) return false;
+ if(m_pDate.IsEmpty()) return FALSE;
return !JS_PortIsNan(JS_ToNumber(m_isolate, m_pDate));
}
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index 0aa23d16a9..daecdbec89 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -72,76 +72,76 @@ static const FX_WCHAR* fullmonths[] =
L"January", L"February", L"March", L"April", L"May", L"June", L"July", L"August", L"September", L"October", L"November", L"December"
};
-bool CJS_PublicMethods::IsNumber(const FX_WCHAR* string)
+FX_BOOL CJS_PublicMethods::IsNumber(const FX_WCHAR* string)
{
CFX_WideString sTrim = StrTrim(string);
const FX_WCHAR* pTrim = sTrim.c_str();
const FX_WCHAR* p = pTrim;
- bool bDot = false;
- bool bKXJS = false;
+ FX_BOOL bDot = FALSE;
+ FX_BOOL bKXJS = FALSE;
wchar_t c;
while ((c = *p))
{
if (c == '.' || c == ',')
{
- if (bDot) return false;
- bDot = true;
+ if (bDot) return FALSE;
+ bDot = TRUE;
}
else if (c == '-' || c == '+')
{
if (p != pTrim)
- return false;
+ return FALSE;
}
else if (c == 'e' || c == 'E')
{
if (bKXJS)
- return false;
+ return FALSE;
p++;
c = *p;
if (c == '+' || c == '-')
{
- bKXJS = true;
+ bKXJS = TRUE;
}
else
{
- return false;
+ return FALSE;
}
}
else if (!IsDigit(c))
{
- return false;
+ return FALSE;
}
p++;
}
- return true;
+ return TRUE;
}
-bool CJS_PublicMethods::IsDigit(wchar_t ch)
+FX_BOOL CJS_PublicMethods::IsDigit(wchar_t ch)
{
return (ch >= L'0' && ch <= L'9');
}
-bool CJS_PublicMethods::IsDigit(char ch)
+FX_BOOL CJS_PublicMethods::IsDigit(char ch)
{
return (ch >= '0' && ch <= '9');
}
-bool CJS_PublicMethods::IsAlphabetic(wchar_t ch)
+FX_BOOL CJS_PublicMethods::IsAlphabetic(wchar_t ch)
{
return ((ch >= L'a' && ch <= L'z') || (ch >= L'A' && ch <= L'Z'));
}
-bool CJS_PublicMethods::IsAlphaNumeric(wchar_t ch)
+FX_BOOL CJS_PublicMethods::IsAlphaNumeric(wchar_t ch)
{
return (IsDigit(ch) || IsAlphabetic(ch));
}
-bool CJS_PublicMethods::maskSatisfied(wchar_t c_Change,wchar_t c_Mask)
+FX_BOOL CJS_PublicMethods::maskSatisfied(wchar_t c_Change,wchar_t c_Mask)
{
switch (c_Mask)
{
@@ -152,13 +152,13 @@ bool CJS_PublicMethods::maskSatisfied(wchar_t c_Change,wchar_t c_Mask)
case L'O':
return IsAlphaNumeric(c_Change);
case L'X':
- return true;
+ return TRUE;
default:
return (c_Change == c_Mask);
}
}
-bool CJS_PublicMethods::isReservedMaskChar(wchar_t ch)
+FX_BOOL CJS_PublicMethods::isReservedMaskChar(wchar_t ch)
{
return ch == L'9' || ch == L'A' || ch == L'O' || ch == L'X';
}
@@ -226,13 +226,13 @@ CFX_ByteString CJS_PublicMethods::StrTrim(const FX_CHAR* pStr)
return StrRTrim(StrLTrim(pStr));
}
-double CJS_PublicMethods::ParseNumber(const FX_WCHAR* swSource, bool& bAllDigits, bool& bDot, bool& bSign, bool& bKXJS)
+double CJS_PublicMethods::ParseNumber(const FX_WCHAR* swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS)
{
- bDot = false;
- bSign = false;
- bKXJS = false;
+ bDot = FALSE;
+ bSign = FALSE;
+ bKXJS = FALSE;
- bool bDigitExist = false;
+ FX_BOOL bDigitExist = FALSE;
const FX_WCHAR* p = swSource;
wchar_t c;
@@ -253,7 +253,7 @@ double CJS_PublicMethods::ParseNumber(const FX_WCHAR* swSource, bool& bAllDigits
if (!pStart)
{
- bAllDigits = false;
+ bAllDigits = FALSE;
return 0;
}
@@ -267,7 +267,7 @@ double CJS_PublicMethods::ParseNumber(const FX_WCHAR* swSource, bool& bAllDigits
double dRet = 0;
p = pStart;
- bAllDigits = true;
+ bAllDigits = TRUE;
CFX_WideString swDigits;
while (p <= pEnd)
@@ -277,14 +277,14 @@ double CJS_PublicMethods::ParseNumber(const FX_WCHAR* swSource, bool& bAllDigits
if (IsDigit(c))
{
swDigits += c;
- bDigitExist = true;
+ bDigitExist = TRUE;
}
else
{
switch (c)
{
case L' ':
- bAllDigits = false;
+ bAllDigits = FALSE;
break;
case L'.':
case L',':
@@ -298,10 +298,10 @@ double CJS_PublicMethods::ParseNumber(const FX_WCHAR* swSource, bool& bAllDigits
{
swDigits += L'0';
swDigits += L'.';
- bDigitExist = true;
+ bDigitExist = TRUE;
}
- bDot = true;
+ bDot = TRUE;
break;
}
case 'e':
@@ -312,7 +312,7 @@ double CJS_PublicMethods::ParseNumber(const FX_WCHAR* swSource, bool& bAllDigits
c = *p;
if (c == '+' || c == '-')
{
- bKXJS = true;
+ bKXJS = TRUE;
swDigits += 'e';
swDigits += c;
}
@@ -322,21 +322,21 @@ double CJS_PublicMethods::ParseNumber(const FX_WCHAR* swSource, bool& bAllDigits
if (!bDigitExist && !bSign)
{
swDigits += c;
- bSign = true;
+ bSign = TRUE;
break;
}
default:
- bAllDigits = false;
+ bAllDigits = FALSE;
if (p != pStart && !bDot && bDigitExist)
{
swDigits += L'.';
- bDot = true;
+ bDot = TRUE;
}
else
{
- bDot = false;
- bDigitExist = false;
+ bDot = FALSE;
+ bDigitExist = FALSE;
swDigits = L"";
}
break;
@@ -374,19 +374,19 @@ double CJS_PublicMethods::ParseNumber(const FX_WCHAR* swSource, bool& bAllDigits
double CJS_PublicMethods::ParseStringToNumber(const FX_WCHAR* swSource)
{
- bool bAllDigits = false;
- bool bDot = false;
- bool bSign = false;
- bool bKXJS = false;
+ FX_BOOL bAllDigits = FALSE;
+ FX_BOOL bDot = FALSE;
+ FX_BOOL bSign = FALSE;
+ FX_BOOL bKXJS = FALSE;
return ParseNumber(swSource, bAllDigits, bDot, bSign, bKXJS);
}
-bool CJS_PublicMethods::ConvertStringToNumber(const FX_WCHAR* swSource, double & dRet, bool & bDot)
+FX_BOOL CJS_PublicMethods::ConvertStringToNumber(const FX_WCHAR* swSource, double & dRet, FX_BOOL & bDot)
{
- bool bAllDigits = false;
- bool bSign = false;
- bool bKXJS = false;
+ FX_BOOL bAllDigits = FALSE;
+ FX_BOOL bSign = FALSE;
+ FX_BOOL bKXJS = FALSE;
dRet = ParseNumber(swSource, bAllDigits, bDot, bSign, bKXJS);
@@ -477,7 +477,7 @@ CFX_WideString CJS_PublicMethods::ParseStringString(const CFX_WideString& string
return swRet;
}
-double CJS_PublicMethods::ParseNormalDate(const CFX_WideString & value, bool& bWrongFormat)
+double CJS_PublicMethods::ParseNormalDate(const CFX_WideString & value, FX_BOOL& bWrongFormat)
{
double dt = JS_GetDateTime();
@@ -525,7 +525,7 @@ double CJS_PublicMethods::ParseNormalDate(const CFX_WideString & value, bool& bW
nMonth = number[1];
}
- bWrongFormat = false;
+ bWrongFormat = FALSE;
}
else if (nIndex == 3)
{
@@ -552,11 +552,11 @@ double CJS_PublicMethods::ParseNormalDate(const CFX_WideString & value, bool& bW
nYear = number[2];
}
- bWrongFormat = false;
+ bWrongFormat = FALSE;
}
else
{
- bWrongFormat = true;
+ bWrongFormat = TRUE;
return dt;
}
@@ -565,7 +565,7 @@ double CJS_PublicMethods::ParseNormalDate(const CFX_WideString & value, bool& bW
return JS_DateParse(swTemp.c_str());
}
-double CJS_PublicMethods::MakeRegularDate(const CFX_WideString & value, const CFX_WideString & format, bool& bWrongFormat)
+double CJS_PublicMethods::MakeRegularDate(const CFX_WideString & value, const CFX_WideString & format, FX_BOOL& bWrongFormat)
{
double dt = JS_GetDateTime();
@@ -581,9 +581,9 @@ double CJS_PublicMethods::MakeRegularDate(const CFX_WideString & value, const CF
int nYearSub = 99; //nYear - 2000;
- bool bPm = false;
- bool bExit = false;
- bWrongFormat = false;
+ FX_BOOL bPm = FALSE;
+ FX_BOOL bExit = FALSE;
+ bWrongFormat = FALSE;
int i=0;
int j=0;
@@ -715,7 +715,7 @@ double CJS_PublicMethods::MakeRegularDate(const CFX_WideString & value, const CF
case 'm':
{
CFX_WideString sMonth = ParseStringString(value, j, nSkip);
- bool bFind = false;
+ FX_BOOL bFind = FALSE;
for (int m = 0; m < 12; m++)
{
if (sMonth.CompareNoCase(months[m]) == 0)
@@ -723,7 +723,7 @@ double CJS_PublicMethods::MakeRegularDate(const CFX_WideString & value, const CF
nMonth = m + 1;
i+=3;
j+=nSkip;
- bFind = true;
+ bFind = TRUE;
break;
}
}
@@ -757,7 +757,7 @@ double CJS_PublicMethods::MakeRegularDate(const CFX_WideString & value, const CF
break;
case 'm':
{
- bool bFind = false;
+ FX_BOOL bFind = FALSE;
CFX_WideString sMonth = ParseStringString(value, j, nSkip);
sMonth.MakeLower();
@@ -772,7 +772,7 @@ double CJS_PublicMethods::MakeRegularDate(const CFX_WideString & value, const CF
nMonth = m + 1;
i += 4;
j += nSkip;
- bFind = true;
+ bFind = TRUE;
break;
}
}
@@ -795,8 +795,8 @@ double CJS_PublicMethods::MakeRegularDate(const CFX_WideString & value, const CF
{
if (j >= value.GetLength() || format.GetAt(i) != value.GetAt(j))
{
- bWrongFormat = true;
- bExit = true;
+ bWrongFormat = TRUE;
+ bExit = TRUE;
}
i++;
j++;
@@ -804,8 +804,8 @@ double CJS_PublicMethods::MakeRegularDate(const CFX_WideString & value, const CF
if (oldj == j)
{
- bWrongFormat = true;
- bExit = true;
+ bWrongFormat = TRUE;
+ bExit = TRUE;
}
}
@@ -813,12 +813,12 @@ double CJS_PublicMethods::MakeRegularDate(const CFX_WideString & value, const CF
default:
if (value.GetLength() <= j)
{
- bExit = true;
+ bExit = TRUE;
}
else if (format.GetAt(i) != value.GetAt(j))
{
- bWrongFormat = true;
- bExit = true;
+ bWrongFormat = TRUE;
+ bExit = TRUE;
}
i++;
@@ -833,19 +833,19 @@ double CJS_PublicMethods::MakeRegularDate(const CFX_WideString & value, const CF
nYear += 2000;
if (nMonth < 1 || nMonth > 12)
- bWrongFormat = true;
+ bWrongFormat = TRUE;
if (nDay < 1 || nDay > 31)
- bWrongFormat = true;
+ bWrongFormat = TRUE;
if (nHour < 0 || nHour > 24)
- bWrongFormat = true;
+ bWrongFormat = TRUE;
if (nMin < 0 || nMin > 60)
- bWrongFormat = true;
+ bWrongFormat = TRUE;
if (nSec < 0 || nSec > 60)
- bWrongFormat = true;
+ bWrongFormat = TRUE;
double dRet = 0;
@@ -1021,7 +1021,7 @@ CFX_WideString CJS_PublicMethods::MakeFormatDate(double dDate, const CFX_WideStr
/* -------------------------------------------------------------------------- */
//function AFNumber_Format(nDec, sepStyle, negStyle, currStyle, strCurrency, bCurrencyPrepend)
-bool CJS_PublicMethods::AFNumber_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFNumber_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
#if _FX_OS_ != _FX_ANDROID_
v8::Isolate* isolate = ::GetIsolate(cc);
@@ -1033,21 +1033,21 @@ bool CJS_PublicMethods::AFNumber_Format(IFXJS_Context* cc, const CJS_Parameters&
if (params.size() != 6)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
if(!pEvent->m_pValue)
- return false;
+ return FALSE;
CFX_WideString& Value = pEvent->Value();
CFX_ByteString strValue = StrTrim(CFX_ByteString::FromUnicode(Value));
- if (strValue.IsEmpty()) return true;
+ if (strValue.IsEmpty()) return TRUE;
int iDec = params[0].ToInt();
int iSepStyle = params[1].ToInt();
int iNegStyle = params[2].ToInt();
// params[3] is iCurrStyle, it's not used.
std::wstring wstrCurrency(params[4].ToCFXWideString().c_str());
- bool bCurrencyPrepend = params[5].ToBool();
+ FX_BOOL bCurrencyPrepend = params[5].ToBool();
if (iDec < 0) iDec = -iDec;
@@ -1224,11 +1224,11 @@ bool CJS_PublicMethods::AFNumber_Format(IFXJS_Context* cc, const CJS_Parameters&
}
Value = strValue2.c_str();
#endif
- return true;
+ return TRUE;
}
//function AFNumber_Keystroke(nDec, sepStyle, negStyle, currStyle, strCurrency, bCurrencyPrepend)
-bool CJS_PublicMethods::AFNumber_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFNumber_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context *)cc;
ASSERT(pContext != NULL);
@@ -1236,13 +1236,13 @@ bool CJS_PublicMethods::AFNumber_Keystroke(IFXJS_Context* cc, const CJS_Paramete
ASSERT(pEvent != NULL);
if(params.size() < 2)
- return false;
+ return FALSE;
int iSepStyle = params[1].ToInt();
if (iSepStyle < 0 || iSepStyle > 3)
iSepStyle = 0;
if(!pEvent->m_pValue)
- return false;
+ return FALSE;
CFX_WideString & val = pEvent->Value();
CFX_WideString & w_strChange = pEvent->Change();
CFX_WideString w_strValue = val;
@@ -1252,18 +1252,18 @@ bool CJS_PublicMethods::AFNumber_Keystroke(IFXJS_Context* cc, const CJS_Paramete
CFX_WideString wstrChange = w_strChange;
CFX_WideString wstrValue = StrLTrim(w_strValue.c_str());
if (wstrValue.IsEmpty())
- return true;
+ return TRUE;
CFX_WideString swTemp = wstrValue;
swTemp.Replace(L",", L".");
if (!IsNumber(swTemp.c_str()))
{
- pEvent->Rc() = false;
+ pEvent->Rc() = FALSE;
sError = JSGetStringFromID(pContext, IDS_STRING_JSAFNUMBER_KEYSTROKE);
Alert(pContext, sError.c_str());
- return true;
+ return TRUE;
}
- return true; // it happens after the last keystroke and before validating,
+ return TRUE; // it happens after the last keystroke and before validating,
}
std::wstring w_strValue2 = w_strValue.c_str();
@@ -1271,15 +1271,15 @@ bool CJS_PublicMethods::AFNumber_Keystroke(IFXJS_Context* cc, const CJS_Paramete
std::wstring w_strSelected;
if(-1 != pEvent->SelStart())
w_strSelected = w_strValue2.substr(pEvent->SelStart(),(pEvent->SelEnd() - pEvent->SelStart()));
- bool bHasSign = (w_strValue2.find('-') != -1) && (w_strSelected.find('-') == -1);
+ FX_BOOL bHasSign = (w_strValue2.find('-') != -1) && (w_strSelected.find('-') == -1);
if (bHasSign)
{
//can't insert "change" in front to sign postion.
if (pEvent->SelStart() == 0)
{
- bool &bRc = pEvent->Rc();
- bRc = false;
- return true;
+ FX_BOOL &bRc = pEvent->Rc();
+ bRc = FALSE;
+ return TRUE;
}
}
@@ -1297,49 +1297,49 @@ bool CJS_PublicMethods::AFNumber_Keystroke(IFXJS_Context* cc, const CJS_Paramete
break;
}
- bool bHasSep = (w_strValue2.find(cSep) != -1);
+ FX_BOOL bHasSep = (w_strValue2.find(cSep) != -1);
for (std::wstring::iterator it = w_strChange2.begin(); it != w_strChange2.end(); it++)
{
if (*it == cSep)
{
if (bHasSep)
{
- bool &bRc = pEvent->Rc();
- bRc = false;
- return true;
+ FX_BOOL &bRc = pEvent->Rc();
+ bRc = FALSE;
+ return TRUE;
}
- bHasSep = true;
+ bHasSep = TRUE;
continue;
}
if (*it == L'-')
{
if (bHasSign)
{
- bool &bRc = pEvent->Rc();
- bRc = false;
- return true;
+ FX_BOOL &bRc = pEvent->Rc();
+ bRc = FALSE;
+ return TRUE;
}
if (it != w_strChange2.begin()) //sign's position is not correct
{
- bool &bRc = pEvent->Rc();
- bRc = false;
- return true;
+ FX_BOOL &bRc = pEvent->Rc();
+ bRc = FALSE;
+ return TRUE;
}
if (pEvent->SelStart() != 0)
{
- bool &bRc = pEvent->Rc();
- bRc = false;
- return true;
+ FX_BOOL &bRc = pEvent->Rc();
+ bRc = FALSE;
+ return TRUE;
}
- bHasSign = true;
+ bHasSign = TRUE;
continue;
}
if (!IsDigit(*it))
{
- bool &bRc = pEvent->Rc();
- bRc = false;
- return true;
+ FX_BOOL &bRc = pEvent->Rc();
+ bRc = FALSE;
+ return TRUE;
}
}
@@ -1351,12 +1351,12 @@ bool CJS_PublicMethods::AFNumber_Keystroke(IFXJS_Context* cc, const CJS_Paramete
w_strValue2 = w_prefix + w_strChange2 + w_postfix;
w_strValue = w_strValue2.c_str();
val = w_strValue;
- return true;
+ return TRUE;
}
//function AFPercent_Format(nDec, sepStyle)
-bool CJS_PublicMethods::AFPercent_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFPercent_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
#if _FX_OS_ != _FX_ANDROID_
CJS_Context* pContext = (CJS_Context *)cc;
@@ -1367,15 +1367,15 @@ bool CJS_PublicMethods::AFPercent_Format(IFXJS_Context* cc, const CJS_Parameters
if (params.size() != 2)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
if(!pEvent->m_pValue)
- return false;
+ return FALSE;
CFX_WideString& Value = pEvent->Value();
CFX_ByteString strValue = StrTrim(CFX_ByteString::FromUnicode(Value));
if (strValue.IsEmpty())
- return true;
+ return TRUE;
int iDec = params[0].ToInt();
if (iDec < 0)
@@ -1461,16 +1461,16 @@ bool CJS_PublicMethods::AFPercent_Format(IFXJS_Context* cc, const CJS_Parameters
strValue += "%";
Value = CFX_WideString::FromLocal(strValue);
#endif
- return true;
+ return TRUE;
}
//AFPercent_Keystroke(nDec, sepStyle)
-bool CJS_PublicMethods::AFPercent_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFPercent_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
return AFNumber_Keystroke(cc,params,vRet,sError);
}
//function AFDate_FormatEx(cFormat)
-bool CJS_PublicMethods::AFDate_FormatEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFDate_FormatEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context *)cc;
ASSERT(pContext != NULL);
@@ -1480,18 +1480,18 @@ bool CJS_PublicMethods::AFDate_FormatEx(IFXJS_Context* cc, const CJS_Parameters&
if (params.size() != 1)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
if(!pEvent->m_pValue)
- return false;
+ return FALSE;
CFX_WideString& val = pEvent->Value();
CFX_WideString strValue = val;
if (strValue.IsEmpty())
- return true;
+ return TRUE;
CFX_WideString sFormat = params[0].ToCFXWideString();
- bool bWrongFormat = false;
+ FX_BOOL bWrongFormat = FALSE;
double dDate = 0.0f;
if(strValue.Find(L"GMT") != -1)
@@ -1510,11 +1510,11 @@ bool CJS_PublicMethods::AFDate_FormatEx(IFXJS_Context* cc, const CJS_Parameters&
CFX_WideString swMsg;
swMsg.Format(JSGetStringFromID(pContext, IDS_STRING_JSPARSEDATE).c_str(), sFormat.c_str());
Alert(pContext, swMsg.c_str());
- return false;
+ return FALSE;
}
val = MakeFormatDate(dDate,sFormat);
- return true;
+ return TRUE;
}
double CJS_PublicMethods::MakeInterDate(CFX_WideString strValue)
@@ -1578,7 +1578,7 @@ double CJS_PublicMethods::MakeInterDate(CFX_WideString strValue)
}
//AFDate_KeystrokeEx(cFormat)
-bool CJS_PublicMethods::AFDate_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFDate_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context *)cc;
ASSERT(pContext != NULL);
@@ -1588,33 +1588,33 @@ bool CJS_PublicMethods::AFDate_KeystrokeEx(IFXJS_Context* cc, const CJS_Paramete
if (params.size() != 1)
{
sError = L"AFDate_KeystrokeEx's parameters' size r not correct";
- return false;
+ return FALSE;
}
if (pEvent->WillCommit())
{
if(!pEvent->m_pValue)
- return false;
+ return FALSE;
CFX_WideString strValue = pEvent->Value();
if (strValue.IsEmpty())
- return true;
+ return TRUE;
CFX_WideString sFormat = params[0].ToCFXWideString();
- bool bWrongFormat = false;
+ FX_BOOL bWrongFormat = FALSE;
double dRet = MakeRegularDate(strValue,sFormat,bWrongFormat);
if (bWrongFormat || JS_PortIsNan(dRet))
{
CFX_WideString swMsg;
swMsg.Format(JSGetStringFromID(pContext, IDS_STRING_JSPARSEDATE).c_str(), sFormat.c_str());
Alert(pContext, swMsg.c_str());
- pEvent->Rc() = false;
- return true;
+ pEvent->Rc() = FALSE;
+ return TRUE;
}
}
- return true;
+ return TRUE;
}
-bool CJS_PublicMethods::AFDate_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFDate_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
v8::Isolate* isolate = ::GetIsolate(cc);
@@ -1624,7 +1624,7 @@ bool CJS_PublicMethods::AFDate_Format(IFXJS_Context* cc, const CJS_Parameters& p
ASSERT(pContext != NULL);
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
int iIndex = params[0].ToInt();
@@ -1645,7 +1645,7 @@ bool CJS_PublicMethods::AFDate_Format(IFXJS_Context* cc, const CJS_Parameters& p
}
//AFDate_KeystrokeEx(cFormat)
-bool CJS_PublicMethods::AFDate_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFDate_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
v8::Isolate* isolate = ::GetIsolate(cc);
@@ -1655,7 +1655,7 @@ bool CJS_PublicMethods::AFDate_Keystroke(IFXJS_Context* cc, const CJS_Parameters
ASSERT(pContext != NULL);
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
int iIndex = params[0].ToInt();
@@ -1676,7 +1676,7 @@ bool CJS_PublicMethods::AFDate_Keystroke(IFXJS_Context* cc, const CJS_Parameters
}
//function AFTime_Format(ptf)
-bool CJS_PublicMethods::AFTime_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFTime_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
v8::Isolate* isolate = ::GetIsolate(cc);
@@ -1685,7 +1685,7 @@ bool CJS_PublicMethods::AFTime_Format(IFXJS_Context* cc, const CJS_Parameters& p
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
int iIndex = params[0].ToInt();
@@ -1703,7 +1703,7 @@ bool CJS_PublicMethods::AFTime_Format(IFXJS_Context* cc, const CJS_Parameters& p
return AFDate_FormatEx(cc,newParams,vRet,sError);
}
-bool CJS_PublicMethods::AFTime_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFTime_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
v8::Isolate* isolate = ::GetIsolate(cc);
if (params.size() != 1)
@@ -1711,7 +1711,7 @@ bool CJS_PublicMethods::AFTime_Keystroke(IFXJS_Context* cc, const CJS_Parameters
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
int iIndex = params[0].ToInt();
@@ -1729,18 +1729,18 @@ bool CJS_PublicMethods::AFTime_Keystroke(IFXJS_Context* cc, const CJS_Parameters
return AFDate_KeystrokeEx(cc,newParams,vRet,sError);
}
-bool CJS_PublicMethods::AFTime_FormatEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFTime_FormatEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
return AFDate_FormatEx(cc,params,vRet,sError);
}
-bool CJS_PublicMethods::AFTime_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFTime_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
return AFDate_KeystrokeEx(cc,params,vRet,sError);
}
//function AFSpecial_Format(psf)
-bool CJS_PublicMethods::AFSpecial_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFSpecial_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context *)cc;
ASSERT(pContext != NULL);
@@ -1748,7 +1748,7 @@ bool CJS_PublicMethods::AFSpecial_Format(IFXJS_Context* cc, const CJS_Parameters
if (params.size() != 1)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
std::string cFormat;
@@ -1758,7 +1758,7 @@ bool CJS_PublicMethods::AFSpecial_Format(IFXJS_Context* cc, const CJS_Parameters
ASSERT(pEvent != NULL);
if(!pEvent->m_pValue)
- return false;
+ return FALSE;
CFX_WideString& Value = pEvent->Value();
std::string strSrc = CFX_ByteString::FromUnicode(Value).c_str();
@@ -1788,12 +1788,12 @@ bool CJS_PublicMethods::AFSpecial_Format(IFXJS_Context* cc, const CJS_Parameters
std::string strDes;
util::printx(cFormat,strSrc,strDes);
Value = CFX_WideString::FromLocal(strDes.c_str());
- return true;
+ return TRUE;
}
//function AFSpecial_KeystrokeEx(mask)
-bool CJS_PublicMethods::AFSpecial_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFSpecial_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context *)cc;
ASSERT(pContext != NULL);
@@ -1804,23 +1804,23 @@ bool CJS_PublicMethods::AFSpecial_KeystrokeEx(IFXJS_Context* cc, const CJS_Param
if (params.size() < 1)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
if(!pEvent->m_pValue)
- return false;
+ return FALSE;
CFX_WideString& valEvent = pEvent->Value();
CFX_WideString wstrMask = params[0].ToCFXWideString();
if (wstrMask.IsEmpty())
- return true;
+ return TRUE;
std::wstring wstrValue = valEvent.c_str();
if (pEvent->WillCommit())
{
if (wstrValue.empty())
- return true;
+ return TRUE;
int iIndexMask = 0;
for (std::wstring::iterator it = wstrValue.begin(); it != wstrValue.end(); it++)
{
@@ -1833,30 +1833,30 @@ bool CJS_PublicMethods::AFSpecial_KeystrokeEx(IFXJS_Context* cc, const CJS_Param
if (iIndexMask != wstrMask.GetLength() || (iIndexMask != wstrValue.size() && wstrMask.GetLength() != 0))
{
Alert(pContext, JSGetStringFromID(pContext, IDS_STRING_JSAFNUMBER_KEYSTROKE).c_str());
- pEvent->Rc() = false;
+ pEvent->Rc() = FALSE;
}
- return true;
+ return TRUE;
}
CFX_WideString &wideChange = pEvent->Change();
std::wstring wChange = wideChange.c_str();
if (wChange.empty())
- return true;
+ return TRUE;
int iIndexMask = pEvent->SelStart();
if (wstrValue.length() - (pEvent->SelEnd()-pEvent->SelStart()) + wChange.length() > (FX_DWORD)wstrMask.GetLength())
{
Alert(pContext, JSGetStringFromID(pContext, IDS_STRING_JSPARAM_TOOLONG).c_str());
- pEvent->Rc() = false;
- return true;
+ pEvent->Rc() = FALSE;
+ return TRUE;
}
if (iIndexMask >= wstrMask.GetLength() && (!wChange.empty()))
{
Alert(pContext, JSGetStringFromID(pContext, IDS_STRING_JSPARAM_TOOLONG).c_str());
- pEvent->Rc() = false;
- return true;
+ pEvent->Rc() = FALSE;
+ return TRUE;
}
for (std::wstring::iterator it = wChange.begin(); it != wChange.end(); it++)
@@ -1864,8 +1864,8 @@ bool CJS_PublicMethods::AFSpecial_KeystrokeEx(IFXJS_Context* cc, const CJS_Param
if (iIndexMask >= wstrMask.GetLength())
{
Alert(pContext, JSGetStringFromID(pContext, IDS_STRING_JSPARAM_TOOLONG).c_str());
- pEvent->Rc() = false;
- return true;
+ pEvent->Rc() = FALSE;
+ return TRUE;
}
wchar_t w_Mask = wstrMask[iIndexMask];
if (!isReservedMaskChar(w_Mask))
@@ -1875,19 +1875,19 @@ bool CJS_PublicMethods::AFSpecial_KeystrokeEx(IFXJS_Context* cc, const CJS_Param
wchar_t w_Change = *it;
if (!maskSatisfied(w_Change,w_Mask))
{
- pEvent->Rc() = false;
- return true;
+ pEvent->Rc() = FALSE;
+ return TRUE;
}
iIndexMask++;
}
wideChange = wChange.c_str();
- return true;
+ return TRUE;
}
//function AFSpecial_Keystroke(psf)
-bool CJS_PublicMethods::AFSpecial_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFSpecial_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
v8::Isolate* isolate = ::GetIsolate(cc);
@@ -1899,14 +1899,14 @@ bool CJS_PublicMethods::AFSpecial_Keystroke(IFXJS_Context* cc, const CJS_Paramet
if (params.size() != 1)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
std::string cFormat;
int iIndex = params[0].ToInt();
if(!pEvent->m_pValue)
- return false;
+ return FALSE;
//CJS_Value val = pEvent->Value();
CFX_WideString& val = pEvent->Value();
std::string strSrc = CFX_ByteString::FromUnicode(val).c_str();
@@ -1946,7 +1946,7 @@ bool CJS_PublicMethods::AFSpecial_Keystroke(IFXJS_Context* cc, const CJS_Paramet
return AFSpecial_KeystrokeEx(cc,params2,vRet,sError);
}
-bool CJS_PublicMethods::AFMergeChange(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFMergeChange(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context *)cc;
ASSERT(pContext != NULL);
@@ -1956,7 +1956,7 @@ bool CJS_PublicMethods::AFMergeChange(IFXJS_Context* cc, const CJS_Parameters& p
if (params.size() != 1)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
CFX_WideString swValue;
@@ -1966,7 +1966,7 @@ bool CJS_PublicMethods::AFMergeChange(IFXJS_Context* cc, const CJS_Parameters& p
if (pEventHandler->WillCommit())
{
vRet = swValue.c_str();
- return true;
+ return TRUE;
}
CFX_WideString prefix,postfix;
@@ -1983,10 +1983,10 @@ bool CJS_PublicMethods::AFMergeChange(IFXJS_Context* cc, const CJS_Parameters& p
vRet = (prefix + pEventHandler->Change() + postfix).c_str();
- return true;
+ return TRUE;
}
-bool CJS_PublicMethods::AFParseDateEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFParseDateEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context *)cc;
ASSERT(pContext != NULL);
@@ -1994,13 +1994,13 @@ bool CJS_PublicMethods::AFParseDateEx(IFXJS_Context* cc, const CJS_Parameters& p
if (params.size() != 2)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
CFX_WideString sValue = params[0].ToCFXWideString();
CFX_WideString sFormat = params[1].ToCFXWideString();
- bool bWrongFormat = false;
+ FX_BOOL bWrongFormat = FALSE;
double dDate = MakeRegularDate(sValue,sFormat,bWrongFormat);
if (JS_PortIsNan(dDate))
@@ -2008,14 +2008,14 @@ bool CJS_PublicMethods::AFParseDateEx(IFXJS_Context* cc, const CJS_Parameters& p
CFX_WideString swMsg;
swMsg.Format(JSGetStringFromID(pContext, IDS_STRING_JSPARSEDATE).c_str(), sFormat.c_str());
Alert((CJS_Context *)cc, swMsg.c_str());
- return false;
+ return FALSE;
}
vRet = dDate;
- return true;
+ return TRUE;
}
-bool CJS_PublicMethods::AFSimple(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFSimple(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
if (params.size() != 3)
{
@@ -2023,14 +2023,14 @@ bool CJS_PublicMethods::AFSimple(IFXJS_Context* cc, const CJS_Parameters& params
ASSERT(pContext != NULL);
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
vRet = (double)AF_Simple(params[0].ToCFXWideString().c_str(), params[1].ToDouble(), params[2].ToDouble());
- return true;
+ return TRUE;
}
-bool CJS_PublicMethods::AFMakeNumber(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFMakeNumber(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
if (params.size() != 1)
{
@@ -2038,13 +2038,13 @@ bool CJS_PublicMethods::AFMakeNumber(IFXJS_Context* cc, const CJS_Parameters& pa
ASSERT(pContext != NULL);
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
vRet = ParseStringToNumber(params[0].ToCFXWideString().c_str());
- return true;
+ return TRUE;
}
-bool CJS_PublicMethods::AFSimple_Calculate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFSimple_Calculate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
v8::Isolate* isolate = ::GetIsolate(cc);
@@ -2054,7 +2054,7 @@ bool CJS_PublicMethods::AFSimple_Calculate(IFXJS_Context* cc, const CJS_Paramete
if (params.size() != 2)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
CJS_Value params1 = params[1];
@@ -2062,7 +2062,7 @@ bool CJS_PublicMethods::AFSimple_Calculate(IFXJS_Context* cc, const CJS_Paramete
if (!params1.IsArrayObject() && params1.GetType() != VT_string)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
CPDFSDK_Document* pReaderDoc = pContext->GetReaderDocument();
@@ -2162,13 +2162,13 @@ bool CJS_PublicMethods::AFSimple_Calculate(IFXJS_Context* cc, const CJS_Paramete
if((CJS_EventHandler*)pContext->GetEventHandler()->m_pValue)
((CJS_EventHandler*)pContext->GetEventHandler())->Value() = jsValue.ToCFXWideString();
- return true;
+ return TRUE;
}
/* This function validates the current event to ensure that its value is
** within the specified range. */
-bool CJS_PublicMethods::AFRange_Validate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFRange_Validate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context *)cc;
ASSERT(pContext != NULL);
@@ -2178,17 +2178,17 @@ bool CJS_PublicMethods::AFRange_Validate(IFXJS_Context* cc, const CJS_Parameters
if (params.size() != 4)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
if(!pEvent->m_pValue)
- return false;
+ return FALSE;
if (pEvent->Value().IsEmpty() )
- return true;
+ return TRUE;
double dEentValue = atof(CFX_ByteString::FromUnicode(pEvent->Value()));
- bool bGreaterThan = params[0].ToBool();
+ FX_BOOL bGreaterThan = params[0].ToBool();
double dGreaterThan = params[1].ToDouble();
- bool bLessThan = params[2].ToBool();
+ FX_BOOL bLessThan = params[2].ToBool();
double dLessThan = params[3].ToDouble();
CFX_WideString swMsg;
@@ -2215,12 +2215,12 @@ bool CJS_PublicMethods::AFRange_Validate(IFXJS_Context* cc, const CJS_Parameters
if (!swMsg.IsEmpty())
{
Alert(pContext, swMsg.c_str());
- pEvent->Rc() = false;
+ pEvent->Rc() = FALSE;
}
- return true;
+ return TRUE;
}
-bool CJS_PublicMethods::AFExtractNums(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL CJS_PublicMethods::AFExtractNums(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
v8::Isolate* isolate = ::GetIsolate(cc);
CJS_Context* pContext = (CJS_Context*)cc;
@@ -2229,7 +2229,7 @@ bool CJS_PublicMethods::AFExtractNums(IFXJS_Context* cc, const CJS_Parameters& p
if (params.size() != 1)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
CJS_Array nums(isolate);
@@ -2269,5 +2269,5 @@ bool CJS_PublicMethods::AFExtractNums(IFXJS_Context* cc, const CJS_Parameters& p
else
vRet.SetNull();
- return true;
+ return TRUE;
}
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp
index 0f35297485..af329655fd 100644
--- a/fpdfsdk/src/javascript/app.cpp
+++ b/fpdfsdk/src/javascript/app.cpp
@@ -134,10 +134,10 @@ app::~app(void)
m_aTimer.RemoveAll();
}
-bool app::activeDocs(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL app::activeDocs(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (!vp.IsGetting())
- return false;
+ return FALSE;
CJS_Context* pContext = (CJS_Context *)cc;
CPDFDoc_Environment* pApp = pContext->GetReaderApp();
@@ -166,120 +166,120 @@ bool app::activeDocs(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
else
vp.SetNull();
- return true;
+ return TRUE;
}
-bool app::calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL app::calculate(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting())
{
bool bVP;
vp >> bVP;
- m_bCalculate = (bool)bVP;
+ m_bCalculate = (FX_BOOL)bVP;
CJS_Context* pContext = (CJS_Context*)cc;
CPDFDoc_Environment* pApp = pContext->GetReaderApp();
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
CJS_Array aDocs(pRuntime->GetIsolate());
if (CPDFSDK_Document* pDoc = pApp->GetSDKDocument())
- pDoc->GetInterForm()->EnableCalculate((bool)m_bCalculate);
+ pDoc->GetInterForm()->EnableCalculate((FX_BOOL)m_bCalculate);
}
else
{
vp << (bool)m_bCalculate;
}
- return true;
+ return TRUE;
}
-bool app::formsVersion(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL app::formsVersion(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsGetting())
{
vp << JS_NUM_FORMSVERSION;
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool app::viewerType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL app::viewerType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsGetting())
{
vp << L"unknown";
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool app::viewerVariation(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL app::viewerVariation(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsGetting())
{
vp << JS_STR_VIEWERVARIATION;
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool app::viewerVersion(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL app::viewerVersion(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsGetting())
{
vp << JS_STR_VIEWERVERSION;
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool app::platform(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL app::platform(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsGetting())
{
vp << JS_STR_PLATFORM;
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool app::language(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL app::language(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsGetting())
{
vp << JS_STR_LANGUANGE;
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
//creates a new fdf object that contains no data
//comment: need reader support
//note:
//CFDF_Document * CPDFDoc_Environment::NewFDF();
-bool app::newFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::newFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
//opens a specified pdf document and returns its document object
//comment:need reader support
//note: as defined in js reference, the proto of this function's fourth parmeters, how old an fdf document while do not show it.
//CFDF_Document * CPDFDoc_Environment::OpenFDF(string strPath,bool bUserConv);
-bool app::openFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::openFDF(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool app::alert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::alert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
int iSize = params.size();
if (iSize < 1)
- return false;
+ return FALSE;
CFX_WideString swMsg = L"";
CFX_WideString swTitle = L"";
@@ -336,7 +336,7 @@ bool app::alert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet
}
else if (params[0].GetType() == VT_boolean)
{
- bool bGet = params[0].ToBool();
+ FX_BOOL bGet = params[0].ToBool();
if (bGet)
swMsg = L"true";
else
@@ -354,7 +354,7 @@ bool app::alert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet
{
if (params[0].GetType() == VT_boolean)
{
- bool bGet = params[0].ToBool();
+ FX_BOOL bGet = params[0].ToBool();
if (bGet)
swMsg = L"true";
else
@@ -386,11 +386,11 @@ bool app::alert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet
vRet = MsgBox(pRuntime->GetReaderApp(), JSGetPageView(cc), swMsg.c_str(), swTitle.c_str(), iType, iIcon);
pRuntime->EndBlock();
- return true;
+ return TRUE;
}
-bool app::beep(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::beep(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
if (params.size() == 1)
{
@@ -398,42 +398,42 @@ bool app::beep(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet,
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
CPDFDoc_Environment * pEnv = pRuntime->GetReaderApp();
pEnv->JS_appBeep(params[0].ToInt());
- return true;
+ return TRUE;
}
sError = JSGetStringFromID((CJS_Context*)cc, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
-bool app::findComponent(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::findComponent(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool app::popUpMenuEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::popUpMenuEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool app::fs(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL app::fs(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool app::setInterval(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::setInterval(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
if (params.size() > 2 || params.size() == 0)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
CFX_WideString script = params.size() > 0 ? params[0].ToCFXWideString() : L"";
if (script.IsEmpty())
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSAFNUMBER_KEYSTROKE);
- return true;
+ return TRUE;
}
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
@@ -463,15 +463,15 @@ bool app::setInterval(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value
vRet = pRetObj;
- return true;
+ return TRUE;
}
-bool app::setTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::setTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
if (params.size() > 2 || params.size() == 0)
{
sError = JSGetStringFromID((CJS_Context*)cc, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
CJS_Context* pContext = (CJS_Context*)cc;
@@ -483,7 +483,7 @@ bool app::setTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
if (script.IsEmpty())
{
sError = JSGetStringFromID((CJS_Context*)cc, IDS_STRING_JSAFNUMBER_KEYSTROKE);
- return true;
+ return TRUE;
}
FX_DWORD dwTimeOut = params.size() > 1 ? params[1].ToInt() : 1000;
@@ -512,10 +512,10 @@ bool app::setTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
vRet = pRetObj;
- return true;
+ return TRUE;
}
-bool app::clearTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::clearTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -525,7 +525,7 @@ bool app::clearTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu
if (params.size() != 1)
{
sError = JSGetStringFromID((CJS_Context*)cc, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
if (params[0].GetType() == VT_fxobject)
@@ -560,10 +560,10 @@ bool app::clearTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu
}
}
- return true;
+ return TRUE;
}
-bool app::clearInterval(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::clearInterval(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -573,7 +573,7 @@ bool app::clearInterval(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
if (params.size() != 1)
{
sError = JSGetStringFromID((CJS_Context*)cc, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
if (params[0].GetType() == VT_fxobject)
@@ -608,12 +608,12 @@ bool app::clearInterval(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
}
}
- return true;
+ return TRUE;
}
-bool app::execMenuItem(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::execMenuItem(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
void app::TimerProc(CJS_Timer* pTimer)
@@ -651,24 +651,24 @@ void app::RunJsScript(CJS_Runtime* pRuntime,const CFX_WideString& wsScript)
}
}
-bool app::goBack(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::goBack(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Not supported.
- return true;
+ return TRUE;
}
-bool app::goForward(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::goForward(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Not supported.
- return true;
+ return TRUE;
}
-bool app::mailMsg(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::mailMsg(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
v8::Isolate* isolate = GetIsolate(cc);
- bool bUI = true;
+ FX_BOOL bUI = TRUE;
CFX_WideString cTo = L"";
CFX_WideString cCc = L"";
CFX_WideString cBcc = L"";
@@ -676,7 +676,7 @@ bool app::mailMsg(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vR
CFX_WideString cMsg = L"";
if (params.size() < 1)
- return false;
+ return FALSE;
if (params[0].GetType() == VT_object)
{
@@ -701,7 +701,7 @@ bool app::mailMsg(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vR
cMsg = CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString();
} else {
if (params.size() < 2)
- return false;
+ return FALSE;
bUI = params[0].ToBool();
cTo = params[1].ToCFXWideString();
@@ -726,16 +726,16 @@ bool app::mailMsg(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vR
pApp->JS_docmailForm(NULL, 0, bUI, cTo.c_str(), cSubject.c_str(), cCc.c_str(), cBcc.c_str(), cMsg.c_str());
pRuntime->EndBlock();
- return false;
+ return FALSE;
}
-bool app::launchURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::launchURL(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
-bool app::runtimeHighlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL app::runtimeHighlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting())
{
@@ -746,24 +746,24 @@ bool app::runtimeHighlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString&
vp<<m_bRuntimeHighLight;
}
- return true;
+ return TRUE;
}
-bool app::fullscreen(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL app::fullscreen(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool app::popUpMenu(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::popUpMenu(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool app::browseForDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::browseForDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
CFX_WideString app::SysPathToPDFPath(const CFX_WideString& sOldPath)
@@ -792,17 +792,17 @@ CFX_WideString app::SysPathToPDFPath(const CFX_WideString& sOldPath)
return sRet;
}
-bool app::newDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::newDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool app::openDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::openDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool app::response(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::response(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CFX_WideString swQuestion = L"";
CFX_WideString swLabel = L"";
@@ -873,7 +873,7 @@ bool app::response(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& v
MAX_INPUT_BYTES);
if (nLengthBytes <= 0) {
vRet.SetNull();
- return false;
+ return FALSE;
}
nLengthBytes = std::min(nLengthBytes, MAX_INPUT_BYTES);
@@ -881,15 +881,15 @@ bool app::response(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& v
CFX_WideString::FromUTF16LE((unsigned short*)pBuff.get(),
nLengthBytes / sizeof(unsigned short));
vRet = ret_string.c_str();
- return true;
+ return TRUE;
}
-bool app::media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL app::media(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return false;
+ return FALSE;
}
-bool app::execDialog(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL app::execDialog(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
diff --git a/fpdfsdk/src/javascript/color.cpp b/fpdfsdk/src/javascript/color.cpp
index 7c3c1374b2..a2bbadcd51 100644
--- a/fpdfsdk/src/javascript/color.cpp
+++ b/fpdfsdk/src/javascript/color.cpp
@@ -155,7 +155,7 @@ void color::ConvertArrayToPWLColor(CJS_Array& array, CPWL_Color& color)
}
#define JS_IMPLEMENT_COLORPROP(prop, var)\
-bool color::prop(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)\
+FX_BOOL color::prop(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)\
{\
CJS_Context* pContext = (CJS_Context*)cc;\
v8::Isolate* isolate = pContext->GetJSRuntime()->GetIsolate();\
@@ -168,10 +168,10 @@ bool color::prop(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)\
else\
{\
CJS_Array array(isolate);\
- if (!vp.ConvertToArray(array)) return false;\
+ if (!vp.ConvertToArray(array)) return FALSE;\
ConvertArrayToPWLColor(array, var);\
}\
- return true;\
+ return TRUE;\
}
JS_IMPLEMENT_COLORPROP(transparent, m_crTransparent)
@@ -187,13 +187,13 @@ JS_IMPLEMENT_COLORPROP(dkGray, m_crDKGray)
JS_IMPLEMENT_COLORPROP(gray, m_crGray)
JS_IMPLEMENT_COLORPROP(ltGray, m_crLTGray)
-bool color::convert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL color::convert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
v8::Isolate* isolate = GetIsolate(cc);
int iSize = params.size();
- if (iSize < 2) return false;
+ if (iSize < 2) return FALSE;
CJS_Array aSource(isolate);
- if (!params[0].ConvertToArray(aSource)) return false;
+ if (!params[0].ConvertToArray(aSource)) return FALSE;
CPWL_Color crSource;
ConvertArrayToPWLColor(aSource, crSource);
@@ -224,18 +224,18 @@ bool color::convert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
ConvertPWLColorToArray(crDest, aDest);
vRet = aDest;
- return true;
+ return TRUE;
}
-bool color::equal(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL color::equal(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
v8::Isolate* isolate = GetIsolate(cc);
- if (params.size() < 2) return false;
+ if (params.size() < 2) return FALSE;
CJS_Array array1(isolate), array2(isolate);
- if (!params[0].ConvertToArray(array1)) return false;
- if (!params[1].ConvertToArray(array2)) return false;
+ if (!params[0].ConvertToArray(array1)) return FALSE;
+ if (!params[1].ConvertToArray(array2)) return FALSE;
CPWL_Color color1;
CPWL_Color color2;
@@ -246,6 +246,6 @@ bool color::equal(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vR
color1.ConvertColorType(color2.nColorType);
vRet = color1 == color2;
- return true;
+ return TRUE;
}
diff --git a/fpdfsdk/src/javascript/console.cpp b/fpdfsdk/src/javascript/console.cpp
index 4d8067110a..ed9b1fbc56 100644
--- a/fpdfsdk/src/javascript/console.cpp
+++ b/fpdfsdk/src/javascript/console.cpp
@@ -38,28 +38,28 @@ console::~console()
{
}
-bool console::clear(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL console::clear(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool console::hide(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL console::hide(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
-bool console::println(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL console::println(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
if (params.size() < 1)
{
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
-bool console::show(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL console::show(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
- return true;
+ return TRUE;
}
diff --git a/fpdfsdk/src/javascript/event.cpp b/fpdfsdk/src/javascript/event.cpp
index ee73e42311..f57b1fb607 100644
--- a/fpdfsdk/src/javascript/event.cpp
+++ b/fpdfsdk/src/javascript/event.cpp
@@ -56,7 +56,7 @@ event::~event(void)
{
}
-bool event::change(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::change(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -73,12 +73,12 @@ bool event::change(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
vp << wChange;
}
- return true;
+ return TRUE;
}
-bool event::changeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::changeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting())return false;
+ if (!vp.IsGetting())return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -86,12 +86,12 @@ bool event::changeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
ASSERT(pEvent != NULL);
vp << pEvent->ChangeEx();
- return true;
+ return TRUE;
}
-bool event::commitKey(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::commitKey(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting())return false;
+ if (!vp.IsGetting())return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -99,10 +99,10 @@ bool event::commitKey(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
ASSERT(pEvent != NULL);
vp << pEvent->CommitKey();
- return true;
+ return TRUE;
}
-bool event::fieldFull(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::fieldFull(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -110,18 +110,18 @@ bool event::fieldFull(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
ASSERT(pEvent != NULL);
if (!vp.IsGetting() && wcscmp((const wchar_t*)pEvent->Name(),L"Keystroke") != 0)
- return false;
+ return FALSE;
if (pEvent->FieldFull())
- vp << true;
+ vp << TRUE;
else
- vp << false;
- return true;
+ vp << FALSE;
+ return TRUE;
}
-bool event::keyDown(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::keyDown(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting())return false;
+ if (!vp.IsGetting())return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -129,15 +129,15 @@ bool event::keyDown(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError
ASSERT(pEvent != NULL);
if (pEvent->KeyDown())
- vp << true;
+ vp << TRUE;
else
- vp << false;
- return true;
+ vp << FALSE;
+ return TRUE;
}
-bool event::modifier(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::modifier(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting())return false;
+ if (!vp.IsGetting())return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -145,15 +145,15 @@ bool event::modifier(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
ASSERT(pEvent != NULL);
if (pEvent->Modifier())
- vp << true;
+ vp << TRUE;
else
- vp << false;
- return true;
+ vp << FALSE;
+ return TRUE;
}
-bool event::name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting())return false;
+ if (!vp.IsGetting())return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -161,17 +161,17 @@ bool event::name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
ASSERT(pEvent != NULL);
vp << pEvent->Name();
- return true;
+ return TRUE;
}
-bool event::rc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::rc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
ASSERT(pEvent != NULL);
- bool &bRc = pEvent->Rc();
+ FX_BOOL &bRc = pEvent->Rc();
if (vp.IsSetting())
{
vp>>bRc;
@@ -180,12 +180,12 @@ bool event::rc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
vp<<bRc;
}
- return true;
+ return TRUE;
}
-bool event::richChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::richChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
if (vp.IsSetting())
{
}
@@ -193,12 +193,12 @@ bool event::richChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
{
;
}
- return true;
+ return TRUE;
}
-bool event::richChangeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::richChangeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
if (vp.IsSetting())
{
}
@@ -206,13 +206,13 @@ bool event::richChangeEx(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& s
{
;
}
- return true;
+ return TRUE;
}
-bool event::richValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::richValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- return true;
+ return TRUE;
if (vp.IsSetting())
{
}
@@ -220,10 +220,10 @@ bool event::richValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErr
{
;
}
- return true;
+ return TRUE;
}
-bool event::selEnd(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::selEnd(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -232,7 +232,7 @@ bool event::selEnd(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
if (wcscmp((const wchar_t*)pEvent->Name(),L"Keystroke") != 0)
{
- return true;
+ return TRUE;
}
int &iSelEnd = pEvent->SelEnd();
@@ -244,10 +244,10 @@ bool event::selEnd(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
vp << iSelEnd;
}
- return true;
+ return TRUE;
}
-bool event::selStart(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::selStart(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -256,7 +256,7 @@ bool event::selStart(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
if (wcscmp((const wchar_t*)pEvent->Name(),L"Keystroke") != 0)
{
- return true;
+ return TRUE;
}
int &iSelStart = pEvent->SelStart();
if (vp.IsSetting())
@@ -267,12 +267,12 @@ bool event::selStart(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sErro
{
vp << iSelStart;
}
- return true;
+ return TRUE;
}
-bool event::shift(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::shift(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting())return false;
+ if (!vp.IsGetting())return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -280,15 +280,15 @@ bool event::shift(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
ASSERT(pEvent != NULL);
if (pEvent->Shift())
- vp << true;
+ vp << TRUE;
else
- vp << false;
- return true;
+ vp << FALSE;
+ return TRUE;
}
-bool event::source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting())return false;
+ if (!vp.IsGetting())return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -296,12 +296,12 @@ bool event::source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
ASSERT(pEvent != NULL);
vp << pEvent->Source()->GetJSObject();
- return true;
+ return TRUE;
}
-bool event::target(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::target(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting())return false;
+ if (!vp.IsGetting())return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -309,12 +309,12 @@ bool event::target(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
ASSERT(pEvent != NULL);
vp<<pEvent->Target_Field()->GetJSObject();
- return true;
+ return TRUE;
}
-bool event::targetName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::targetName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting())return false;
+ if (!vp.IsGetting())return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -322,12 +322,12 @@ bool event::targetName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
ASSERT(pEvent != NULL);
vp << pEvent->TargetName();
- return true;
+ return TRUE;
}
-bool event::type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting())return false;
+ if (!vp.IsGetting())return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -335,10 +335,10 @@ bool event::type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
ASSERT(pEvent != NULL);
vp << pEvent->Type();
- return true;
+ return TRUE;
}
-bool event::value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -346,9 +346,9 @@ bool event::value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
ASSERT(pEvent != NULL);
if (wcscmp((const wchar_t*)pEvent->Type(),L"Field") != 0)
- return false;
+ return FALSE;
if(!pEvent->m_pValue)
- return false;
+ return FALSE;
CFX_WideString & val = pEvent->Value();
if (vp.IsSetting())
{
@@ -358,12 +358,12 @@ bool event::value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
vp << val;
}
- return true;
+ return TRUE;
}
-bool event::willCommit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL event::willCommit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
- if (!vp.IsGetting())return false;
+ if (!vp.IsGetting())return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -371,9 +371,9 @@ bool event::willCommit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sEr
ASSERT(pEvent != NULL);
if (pEvent->WillCommit())
- vp << true;
+ vp << TRUE;
else
- vp << false;
- return true;
+ vp << FALSE;
+ return TRUE;
}
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp
index 98a3cd6cb5..6965c8c884 100644
--- a/fpdfsdk/src/javascript/global.cpp
+++ b/fpdfsdk/src/javascript/global.cpp
@@ -96,7 +96,7 @@ END_JS_STATIC_METHOD()
IMPLEMENT_SPECIAL_JS_CLASS(CJS_Global, global_alternate, global);
-bool CJS_Global::InitInstance(IFXJS_Context* cc)
+FX_BOOL CJS_Global::InitInstance(IFXJS_Context* cc)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -106,7 +106,7 @@ bool CJS_Global::InitInstance(IFXJS_Context* cc)
pGlobal->Initial(pContext->GetReaderApp());
- return true;
+ return TRUE;
};
global_alternate::global_alternate(CJS_Object* pJSObject)
@@ -128,26 +128,26 @@ void global_alternate::Initial(CPDFDoc_Environment* pApp)
UpdateGlobalPersistentVariables();
}
-bool global_alternate::QueryProperty(const FX_WCHAR* propname)
+FX_BOOL global_alternate::QueryProperty(const FX_WCHAR* propname)
{
return CFX_WideString(propname) != L"setPersistent";
}
-bool global_alternate::DelProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CFX_WideString& sError)
+FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CFX_WideString& sError)
{
js_global_data* pData = NULL;
CFX_ByteString sPropName = CFX_ByteString::FromUnicode(propname);
if (m_mapGlobal.Lookup(sPropName, (void*&)pData))
{
- pData->bDeleted = true;
- return true;
+ pData->bDeleted = TRUE;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool global_alternate::DoProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting())
{
@@ -158,34 +158,34 @@ bool global_alternate::DoProperty(IFXJS_Context* cc, const FX_WCHAR* propname, C
{
double dData;
vp >> dData;
- return SetGlobalVariables(sPropName, JS_GLOBALDATA_TYPE_NUMBER, dData, false, "", v8::Local<v8::Object>(), false);
+ return SetGlobalVariables(sPropName, JS_GLOBALDATA_TYPE_NUMBER, dData, false, "", v8::Local<v8::Object>(), FALSE);
}
case VT_boolean:
{
bool bData;
vp >> bData;
- return SetGlobalVariables(sPropName, JS_GLOBALDATA_TYPE_BOOLEAN, 0, bData, "", v8::Local<v8::Object>(), false);
+ return SetGlobalVariables(sPropName, JS_GLOBALDATA_TYPE_BOOLEAN, 0, bData, "", v8::Local<v8::Object>(), FALSE);
}
case VT_string:
{
CFX_ByteString sData;
vp >> sData;
- return SetGlobalVariables(sPropName, JS_GLOBALDATA_TYPE_STRING, 0, false, sData, v8::Local<v8::Object>(), false);
+ return SetGlobalVariables(sPropName, JS_GLOBALDATA_TYPE_STRING, 0, false, sData, v8::Local<v8::Object>(), FALSE);
}
case VT_object:
{
JSObject pData;
vp >> pData;
- return SetGlobalVariables(sPropName, JS_GLOBALDATA_TYPE_OBJECT, 0, false, "", pData, false);
+ return SetGlobalVariables(sPropName, JS_GLOBALDATA_TYPE_OBJECT, 0, false, "", pData, FALSE);
}
case VT_null:
{
- return SetGlobalVariables(sPropName, JS_GLOBALDATA_TYPE_NULL, 0, false, "", v8::Local<v8::Object>(), false);
+ return SetGlobalVariables(sPropName, JS_GLOBALDATA_TYPE_NULL, 0, false, "", v8::Local<v8::Object>(), FALSE);
}
case VT_undefined:
{
DelProperty(cc, propname, sError);
- return true;
+ return TRUE;
}
default:
break;
@@ -197,51 +197,51 @@ bool global_alternate::DoProperty(IFXJS_Context* cc, const FX_WCHAR* propname, C
if (!m_mapGlobal.Lookup(CFX_ByteString::FromUnicode(propname), pVoid))
{
vp.SetNull();
- return true;
+ return TRUE;
}
if (!pVoid)
{
vp.SetNull();
- return true;
+ return TRUE;
}
js_global_data* pData = (js_global_data*)pVoid;
if (pData->bDeleted)
- return true;
+ return TRUE;
switch (pData->nType)
{
case JS_GLOBALDATA_TYPE_NUMBER:
vp << pData->dData;
- return true;
+ return TRUE;
case JS_GLOBALDATA_TYPE_BOOLEAN:
vp << pData->bData;
- return true;
+ return TRUE;
case JS_GLOBALDATA_TYPE_STRING:
vp << pData->sData;
- return true;
+ return TRUE;
case JS_GLOBALDATA_TYPE_OBJECT:
{
v8::Local<v8::Object> obj = v8::Local<v8::Object>::New(vp.GetIsolate(),pData->pData);
vp << obj;
- return true;
+ return TRUE;
}
case JS_GLOBALDATA_TYPE_NULL:
vp.SetNull();
- return true;
+ return TRUE;
default:
break;
}
}
- return false;
+ return FALSE;
}
-bool global_alternate::setPersistent(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL global_alternate::setPersistent(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
if (params.size() != 2)
{
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
- return false;
+ return FALSE;
}
CFX_ByteString sName = params[0].ToCFXByteString();
@@ -252,12 +252,12 @@ bool global_alternate::setPersistent(IFXJS_Context* cc, const CJS_Parameters& pa
if (pData && !pData->bDeleted)
{
pData->bPersistent = params[1].ToBool();
- return true;
+ return TRUE;
}
}
sError = JSGetStringFromID(pContext, IDS_STRING_JSNOGLOBAL);
- return false;
+ return FALSE;
}
void global_alternate::UpdateGlobalPersistentVariables()
@@ -480,10 +480,10 @@ void global_alternate::DestroyGlobalPersisitentVariables()
}
-bool global_alternate::SetGlobalVariables(const FX_CHAR* propname, int nType,
+FX_BOOL global_alternate::SetGlobalVariables(const FX_CHAR* propname, int nType,
double dData, bool bData, const CFX_ByteString& sData, JSObject pData, bool bDefaultPersistent)
{
- if (propname == NULL) return false;
+ if (propname == NULL) return FALSE;
js_global_data* pTemp = NULL;
m_mapGlobal.Lookup(propname, (void*&)pTemp);
@@ -498,7 +498,7 @@ bool global_alternate::SetGlobalVariables(const FX_CHAR* propname, int nType,
pTemp->nType = nType;
}
- pTemp->bDeleted = false;
+ pTemp->bDeleted = FALSE;
switch (nType)
{
@@ -525,10 +525,10 @@ bool global_alternate::SetGlobalVariables(const FX_CHAR* propname, int nType,
case JS_GLOBALDATA_TYPE_NULL:
break;
default:
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
js_global_data* pNewData = NULL;
@@ -575,12 +575,12 @@ bool global_alternate::SetGlobalVariables(const FX_CHAR* propname, int nType,
}
break;
default:
- return false;
+ return FALSE;
}
m_mapGlobal.SetAt(propname, (void*)pNewData);
- return true;
+ return TRUE;
}
FXJSVALUETYPE GET_VALUE_TYPE(v8::Local<v8::Value> p)
diff --git a/fpdfsdk/src/javascript/report.cpp b/fpdfsdk/src/javascript/report.cpp
index 820e7301d3..1478feb1fa 100644
--- a/fpdfsdk/src/javascript/report.cpp
+++ b/fpdfsdk/src/javascript/report.cpp
@@ -36,14 +36,14 @@ Report::~Report()
}
-bool Report::writeText(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Report::writeText(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
-bool Report::save(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL Report::save(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
// Unsafe, not supported.
- return true;
+ return TRUE;
}
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp
index 21a7cb83ff..4083ed58da 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/src/javascript/util.cpp
@@ -98,7 +98,7 @@ const stru_TbConvert fcTable[] = {
int util::ParstDataType(std::wstring* sFormat)
{
- bool bPercent = false;
+ bool bPercent = FALSE;
for (size_t i = 0; i < sFormat->length(); ++i)
{
wchar_t c = (*sFormat)[i];
@@ -136,11 +136,11 @@ int util::ParstDataType(std::wstring* sFormat)
return -1;
}
-bool util::printf(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL util::printf(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
int iSize = params.size();
if (iSize < 1)
- return false;
+ return FALSE;
std::wstring c_ConvChar(params[0].ToCFXWideString().c_str());
std::vector<std::wstring> c_strConvers;
int iOffset = 0;
@@ -198,16 +198,16 @@ bool util::printf(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vR
c_strResult.erase(c_strResult.begin());
vRet = c_strResult.c_str();
- return true;
+ return TRUE;
}
-bool util::printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL util::printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
v8::Isolate* isolate = GetIsolate(cc);
int iSize = params.size();
if (iSize < 2)
- return false;
+ return FALSE;
CJS_Value p1(isolate);
p1 = params[0];
@@ -217,13 +217,13 @@ bool util::printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vR
if (!p2.ConvertToDate(jsDate))
{
sError = JSGetStringFromID((CJS_Context*)cc, IDS_STRING_JSPRINT1);
- return false;
+ return FALSE;
}
if (!jsDate.IsValidDate())
{
sError = JSGetStringFromID((CJS_Context*)cc, IDS_STRING_JSPRINT2);
- return false;
+ return FALSE;
}
if (p1.GetType() == VT_number)
@@ -261,11 +261,11 @@ bool util::printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vR
jsDate.GetSeconds());
break;
default:
- return false;
+ return FALSE;
}
vRet = swResult.c_str();
- return true;
+ return TRUE;
}
if (p1.GetType() == VT_string)
{
@@ -279,7 +279,7 @@ bool util::printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vR
if (bXFAPicture)
{
- return false; //currently, it doesn't support XFAPicture.
+ return FALSE; //currently, it doesn't support XFAPicture.
}
int iIndex;
@@ -355,9 +355,9 @@ bool util::printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vR
strFormat = wcsftime(buf, 64, cFormat.c_str(), &time);
cFormat = buf;
vRet = cFormat.c_str();
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void util::printd(const std::wstring &cFormat2, CJS_Date jsDate, bool bXFAPicture, std::wstring &cPurpose)
@@ -450,11 +450,11 @@ void util::printd(const std::wstring &cFormat2, CJS_Date jsDate, bool bXFAPictur
cPurpose = cFormat;
}
-bool util::printx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL util::printx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
int iSize = params.size();
if (iSize<2)
- return false;
+ return FALSE;
CFX_WideString sFormat = params[0].ToCFXWideString();
CFX_WideString sSource = params[1].ToCFXWideString();
std::string cFormat = CFX_ByteString::FromUnicode(sFormat).c_str();
@@ -462,7 +462,7 @@ bool util::printx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vR
std::string cDest;
printx(cFormat,cSource,cDest);
vRet = cDest.c_str();
- return true;
+ return TRUE;
}
void util::printx(const std::string &cFormat,const std::string &cSource2,std::string &cPurpose)
@@ -564,19 +564,19 @@ void util::printx(const std::string &cFormat,const std::string &cSource2,std::st
}
}
-bool util::scand(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL util::scand(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
v8::Isolate* isolate = GetIsolate(cc);
int iSize = params.size();
if (iSize < 2)
- return false;
+ return FALSE;
CFX_WideString sFormat = params[0].ToCFXWideString();
CFX_WideString sDate = params[1].ToCFXWideString();
double dDate = JS_GetDateTime();
if (sDate.GetLength() > 0)
{
- bool bWrongFormat = false;
+ FX_BOOL bWrongFormat = FALSE;
dDate = CJS_PublicMethods::MakeRegularDate(sDate,sFormat,bWrongFormat);
}
@@ -590,7 +590,7 @@ bool util::scand(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRe
vRet.SetNull();
}
- return true;
+ return TRUE;
}
int64_t FX_atoi64(const char *nptr)
@@ -618,15 +618,15 @@ int64_t FX_atoi64(const char *nptr)
return sign == '-' ? -total : total;
}
-bool util::byteToChar(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
+FX_BOOL util::byteToChar(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)
{
int iSize = params.size();
if (iSize == 0)
- return false;
+ return FALSE;
int nByte = params[0].ToInt();
unsigned char cByte = (unsigned char)nByte;
CFX_WideString csValue;
csValue.Format(L"%c", cByte);
vRet = csValue.c_str();
- return true;
+ return TRUE;
}
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index e1232803e8..c4811bf096 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -42,7 +42,7 @@ class CJS_ObjDefintion
{
public:
CJS_ObjDefintion(v8::Isolate* isolate, const wchar_t* sObjName, FXJSOBJTYPE eObjType, LP_CONSTRUCTOR pConstructor, LP_DESTRUCTOR pDestructor):
- objName(sObjName), objType(eObjType), m_pConstructor(pConstructor), m_pDestructor(pDestructor),m_bSetAsGlobalObject(false)
+ objName(sObjName), objType(eObjType), m_pConstructor(pConstructor), m_pDestructor(pDestructor),m_bSetAsGlobalObject(FALSE)
{
v8::Isolate::Scope isolate_scope(isolate);
v8::HandleScope handle_scope(isolate);
@@ -54,7 +54,7 @@ public:
//Document as the global object.
if(FXSYS_wcscmp(sObjName, L"Document") == 0)
{
- m_bSetAsGlobalObject = true;
+ m_bSetAsGlobalObject = TRUE;
}
}
@@ -68,7 +68,7 @@ public:
FXJSOBJTYPE objType;
LP_CONSTRUCTOR m_pConstructor;
LP_DESTRUCTOR m_pDestructor;
- bool m_bSetAsGlobalObject;
+ FX_BOOL m_bSetAsGlobalObject;
v8::Global<v8::ObjectTemplate> m_objTemplate;
v8::Global<v8::Object> m_StaticObj;
diff --git a/fpdfsdk/src/pdfwindow/PWL_Button.cpp b/fpdfsdk/src/pdfwindow/PWL_Button.cpp
index 1712bd24fc..84962285c4 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Button.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Button.cpp
@@ -12,7 +12,7 @@
/* ------------------------------- CPWL_Button ---------------------------------- */
CPWL_Button::CPWL_Button() :
- m_bMouseDown(false)
+ m_bMouseDown(FALSE)
{
}
@@ -31,23 +31,23 @@ void CPWL_Button::OnCreate(PWL_CREATEPARAM & cp)
cp.eCursorType = FXCT_HAND;
}
-bool CPWL_Button::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Button::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point, nFlag);
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
SetCapture();
- return true;
+ return TRUE;
}
-bool CPWL_Button::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Button::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point, nFlag);
ReleaseCapture();
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
- return true;
+ return TRUE;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Caret.cpp b/fpdfsdk/src/pdfwindow/PWL_Caret.cpp
index deccf06449..84a8b3d186 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Caret.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Caret.cpp
@@ -16,7 +16,7 @@
//////////////////////////////////////////////////////////////////////
CPWL_Caret::CPWL_Caret() :
- m_bFlash(false),
+ m_bFlash(FALSE),
m_ptHead(0,0),
m_ptFoot(0,0),
m_fWidth(0.4f),
@@ -135,7 +135,7 @@ CPDF_Rect CPWL_Caret::GetCaretRect() const
m_ptHead.y);
}
-void CPWL_Caret::SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot)
+void CPWL_Caret::SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot)
{
if (bVisible)
{
@@ -147,9 +147,9 @@ void CPWL_Caret::SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_P
m_ptHead = ptHead;
m_ptFoot = ptFoot;
- m_bFlash = true;
- //Move(GetCaretRect(),false,true);
- Move(m_rcInvalid, false, true);
+ m_bFlash = TRUE;
+ //Move(GetCaretRect(),FALSE,TRUE);
+ Move(m_rcInvalid, FALSE, TRUE);
}
}
else
@@ -160,11 +160,11 @@ void CPWL_Caret::SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_P
EndTimer();
BeginTimer(PWL_CARET_FLASHINTERVAL);
- CPWL_Wnd::SetVisible(true);
- m_bFlash = true;
+ CPWL_Wnd::SetVisible(TRUE);
+ m_bFlash = TRUE;
- //Move(GetCaretRect(),false,true);
- Move(m_rcInvalid, false, true);
+ //Move(GetCaretRect(),FALSE,TRUE);
+ Move(m_rcInvalid, FALSE, TRUE);
}
}
else
@@ -172,11 +172,11 @@ void CPWL_Caret::SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_P
m_ptHead = CPDF_Point(0, 0);
m_ptFoot = CPDF_Point(0, 0);
- m_bFlash = false;
+ m_bFlash = FALSE;
if (IsVisible())
{
EndTimer();
- CPWL_Wnd::SetVisible(false);
+ CPWL_Wnd::SetVisible(FALSE);
}
}
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
index 6c5dd5516e..f5c8a815d4 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
@@ -22,14 +22,14 @@
/* ---------------------------- CPWL_CBListBox ---------------------------- */
-bool CPWL_CBListBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_CBListBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point,nFlag);
if (m_bMouseDown)
{
ReleaseCapture();
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
if (ClientHitTest(point))
{
@@ -38,23 +38,23 @@ bool CPWL_CBListBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
pParent->OnNotify(this,PNM_LBUTTONUP,0,PWL_MAKEDWORD(point.x,point.y));
}
- bool bExit = false;
- OnNotifySelChanged(false,bExit, nFlag);
- if (bExit) return false;
+ FX_BOOL bExit = FALSE;
+ OnNotifySelChanged(FALSE,bExit, nFlag);
+ if (bExit) return FALSE;
}
}
- return true;
+ return TRUE;
}
-bool CPWL_CBListBox::OnKeyDownWithExit(FX_WORD nChar, bool & bExit, FX_DWORD nFlag)
+FX_BOOL CPWL_CBListBox::OnKeyDownWithExit(FX_WORD nChar, FX_BOOL & bExit, FX_DWORD nFlag)
{
- if (!m_pList) return false;
+ if (!m_pList) return FALSE;
switch (nChar)
{
default:
- return false;
+ return FALSE;
case FWL_VKEY_Up:
case FWL_VKEY_Down:
case FWL_VKEY_Home:
@@ -88,25 +88,25 @@ bool CPWL_CBListBox::OnKeyDownWithExit(FX_WORD nChar, bool & bExit, FX_DWORD nFl
break;
}
- OnNotifySelChanged(true,bExit, nFlag);
+ OnNotifySelChanged(TRUE,bExit, nFlag);
- return true;
+ return TRUE;
}
-bool CPWL_CBListBox::OnCharWithExit(FX_WORD nChar, bool & bExit, FX_DWORD nFlag)
+FX_BOOL CPWL_CBListBox::OnCharWithExit(FX_WORD nChar, FX_BOOL & bExit, FX_DWORD nFlag)
{
- if (!m_pList) return false;
+ if (!m_pList) return FALSE;
- if (!m_pList->OnChar(nChar,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag))) return false;
+ if (!m_pList->OnChar(nChar,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag))) return FALSE;
if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetParentWindow())
{
pComboBox->SetSelectText();
}
- OnNotifySelChanged(true,bExit,nFlag);
+ OnNotifySelChanged(TRUE,bExit,nFlag);
- return true;
+ return TRUE;
}
/* ---------------------------- CPWL_CBButton ---------------------------- */
@@ -177,7 +177,7 @@ void CPWL_CBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* p
}
}
-bool CPWL_CBButton::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_CBButton::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point,nFlag);
@@ -188,16 +188,16 @@ bool CPWL_CBButton::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
pParent->OnNotify(this,PNM_LBUTTONDOWN,0,PWL_MAKEDWORD(point.x,point.y));
}
- return true;
+ return TRUE;
}
-bool CPWL_CBButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_CBButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point, nFlag);
ReleaseCapture();
- return true;
+ return TRUE;
}
/* ---------------------------- CPWL_ComboBox ---------------------------- */
@@ -205,7 +205,7 @@ bool CPWL_CBButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
CPWL_ComboBox::CPWL_ComboBox() : m_pEdit(NULL),
m_pButton(NULL),
m_pList(NULL),
- m_bPopup(false),
+ m_bPopup(FALSE),
m_nPopupWhere(0),
m_nSelectItem(-1),
m_pFillerNotify(NULL)
@@ -231,7 +231,7 @@ void CPWL_ComboBox::SetFocus()
void CPWL_ComboBox::KillFocus()
{
- SetPopup(false);
+ SetPopup(FALSE);
CPWL_Wnd::KillFocus();
}
@@ -439,15 +439,15 @@ void CPWL_ComboBox::RePosChildWnd()
}
if (m_pButton)
- m_pButton->Move(rcButton,true,false);
+ m_pButton->Move(rcButton,TRUE,FALSE);
if (m_pEdit)
- m_pEdit->Move(rcEdit,true,false);
+ m_pEdit->Move(rcEdit,TRUE,FALSE);
if (m_pList)
{
- m_pList->SetVisible(true);
- m_pList->Move(rcList,true,false);
+ m_pList->SetVisible(TRUE);
+ m_pList->Move(rcList,TRUE,FALSE);
m_pList->ScrollToListItem(m_nSelectItem);
}
}
@@ -461,7 +461,7 @@ void CPWL_ComboBox::RePosChildWnd()
rcButton.left = rcClient.left;
if (m_pButton)
- m_pButton->Move(rcButton,true,false);
+ m_pButton->Move(rcButton,TRUE,FALSE);
CPDF_Rect rcEdit = rcClient;
rcEdit.right = rcButton.left - 1.0f;
@@ -473,10 +473,10 @@ void CPWL_ComboBox::RePosChildWnd()
rcEdit.right = rcEdit.left;
if (m_pEdit)
- m_pEdit->Move(rcEdit,true,false);
+ m_pEdit->Move(rcEdit,TRUE,FALSE);
if (m_pList)
- m_pList->SetVisible(false);
+ m_pList->SetVisible(FALSE);
}
}
@@ -491,7 +491,7 @@ CPDF_Rect CPWL_ComboBox::GetFocusRect() const
return CPDF_Rect();
}
-void CPWL_ComboBox::SetPopup(bool bPopup)
+void CPWL_ComboBox::SetPopup(FX_BOOL bPopup)
{
if (!m_pList) return;
if (bPopup == m_bPopup) return;
@@ -528,21 +528,21 @@ void CPWL_ComboBox::SetPopup(bool bPopup)
}
m_nPopupWhere = nWhere;
- Move(rcWindow, true, true);
+ Move(rcWindow, TRUE, TRUE);
}
}
}
else
{
m_bPopup = bPopup;
- Move(m_rcOldWindow, true, true);
+ Move(m_rcOldWindow, TRUE, TRUE);
}
}
-bool CPWL_ComboBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_ComboBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
{
- if (!m_pList) return false;
- if (!m_pEdit) return false;
+ if (!m_pList) return FALSE;
+ if (!m_pEdit) return FALSE;
m_nSelectItem = -1;
@@ -551,47 +551,47 @@ bool CPWL_ComboBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
case FWL_VKEY_Up:
if (m_pList->GetCurSel() > 0)
{
- bool bExit = false;
+ FX_BOOL bExit = FALSE;
if (m_pList->OnKeyDownWithExit(nChar,bExit,nFlag))
{
- if (bExit) return false;
+ if (bExit) return FALSE;
SetSelectText();
}
}
- return true;
+ return TRUE;
case FWL_VKEY_Down:
if (m_pList->GetCurSel() < m_pList->GetCount() - 1)
{
- bool bExit = false;
+ FX_BOOL bExit = FALSE;
if (m_pList->OnKeyDownWithExit(nChar,bExit,nFlag))
{
- if (bExit) return false;
+ if (bExit) return FALSE;
SetSelectText();
}
}
- return true;
+ return TRUE;
}
if (HasFlag(PCBS_ALLOWCUSTOMTEXT))
return m_pEdit->OnKeyDown(nChar,nFlag);
- return false;
+ return FALSE;
}
-bool CPWL_ComboBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_ComboBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
if (!m_pList)
- return false;
+ return FALSE;
if (!m_pEdit)
- return false;
+ return FALSE;
m_nSelectItem = -1;
if (HasFlag(PCBS_ALLOWCUSTOMTEXT))
return m_pEdit->OnChar(nChar,nFlag);
- bool bExit = false;
- return m_pList->OnCharWithExit(nChar,bExit,nFlag) ? bExit : false;
+ FX_BOOL bExit = FALSE;
+ return m_pList->OnCharWithExit(nChar,bExit,nFlag) ? bExit : FALSE;
}
void CPWL_ComboBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
@@ -613,7 +613,7 @@ void CPWL_ComboBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
SetSelectText();
SelectAll();
m_pEdit->SetFocus();
- SetPopup(false);
+ SetPopup(FALSE);
return;
}
}
@@ -622,7 +622,7 @@ void CPWL_ComboBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
CPWL_Wnd::OnNotify(pWnd,msg,wParam,lParam);
}
-bool CPWL_ComboBox::IsPopup() const
+FX_BOOL CPWL_ComboBox::IsPopup() const
{
return m_bPopup;
}
@@ -637,7 +637,7 @@ void CPWL_ComboBox::SetSelectText()
m_nSelectItem = m_pList->GetCurSel();
}
-bool CPWL_ComboBox::IsModified() const
+FX_BOOL CPWL_ComboBox::IsModified() const
{
return m_pEdit->IsModified();
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
index 303ae963f4..58d8a79da1 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
@@ -19,14 +19,14 @@
CPWL_Edit::CPWL_Edit() : m_pFillerNotify(NULL),
m_pSpellCheck(NULL),
- m_bFocus(false)
+ m_bFocus(FALSE)
{
m_pFormFiller = NULL;
}
CPWL_Edit::~CPWL_Edit()
{
- ASSERT(m_bFocus == false);
+ ASSERT(m_bFocus == FALSE);
}
CFX_ByteString CPWL_Edit::GetClassName() const
@@ -49,7 +49,7 @@ void CPWL_Edit::SetText(const FX_WCHAR* csText)
if (CXML_Element * pXML = CXML_Element::Parse(sValue.c_str(), sValue.GetLength()))
{
int32_t nCount = pXML->CountChildren();
- bool bFirst = true;
+ FX_BOOL bFirst = TRUE;
swText.Empty();
@@ -67,7 +67,7 @@ void CPWL_Edit::SetText(const FX_WCHAR* csText)
swSection += pSubElement->GetContent(j);
}
- if (bFirst)bFirst = false;
+ if (bFirst)bFirst = FALSE;
else
swText += FWL_VKEY_Return;
swText += swSection;
@@ -90,7 +90,7 @@ void CPWL_Edit::RePosChildWnd()
rcWindow.bottom,
rcWindow.right + PWL_SCROLLBAR_WIDTH,
rcWindow.top);
- pVSB->Move(rcVScroll, true, false);
+ pVSB->Move(rcVScroll, TRUE, FALSE);
}
if (m_pEditCaret && !HasFlag(PES_TEXTOVERFLOW))
@@ -114,39 +114,39 @@ CPDF_Rect CPWL_Edit::GetClientRect() const
return rcClient;
}
-void CPWL_Edit::SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat, bool bPaint/* = true*/)
+void CPWL_Edit::SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat, FX_BOOL bPaint/* = TRUE*/)
{
m_pEdit->SetAlignmentH((int32_t)nFormat, bPaint);
}
-void CPWL_Edit::SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat, bool bPaint/* = true*/)
+void CPWL_Edit::SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat, FX_BOOL bPaint/* = TRUE*/)
{
m_pEdit->SetAlignmentV((int32_t)nFormat, bPaint);
}
-bool CPWL_Edit::CanSelectAll() const
+FX_BOOL CPWL_Edit::CanSelectAll() const
{
return GetSelectWordRange() != m_pEdit->GetWholeWordRange();
}
-bool CPWL_Edit::CanClear() const
+FX_BOOL CPWL_Edit::CanClear() const
{
return !IsReadOnly() && m_pEdit->IsSelected();
}
-bool CPWL_Edit::CanCopy() const
+FX_BOOL CPWL_Edit::CanCopy() const
{
return !HasFlag(PES_PASSWORD) && !HasFlag(PES_NOREAD) && m_pEdit->IsSelected();
}
-bool CPWL_Edit::CanCut() const
+FX_BOOL CPWL_Edit::CanCut() const
{
return CanCopy() && !IsReadOnly();
}
-bool CPWL_Edit::CanPaste() const
+FX_BOOL CPWL_Edit::CanPaste() const
{
- if (IsReadOnly()) return false;
+ if (IsReadOnly()) return FALSE;
CFX_WideString swClipboard;
if (IFX_SystemHandler* pSH = GetSystemHandler())
@@ -175,13 +175,13 @@ void CPWL_Edit::PasteText()
if (m_pFillerNotify)
{
- bool bRC = true;
- bool bExit = false;
+ FX_BOOL bRC = TRUE;
+ FX_BOOL bExit = FALSE;
CFX_WideString strChangeEx;
int nSelStart = 0;
int nSelEnd = 0;
GetSel(nSelStart, nSelEnd);
- m_pFillerNotify->OnBeforeKeyStroke(true, GetAttachedData(), 0 , swClipboard, strChangeEx, nSelStart, nSelEnd, true, bRC, bExit, 0);
+ m_pFillerNotify->OnBeforeKeyStroke(TRUE, GetAttachedData(), 0 , swClipboard, strChangeEx, nSelStart, nSelEnd, TRUE, bRC, bExit, 0);
if (!bRC) return;
if (bExit) return;
}
@@ -194,8 +194,8 @@ void CPWL_Edit::PasteText()
if (m_pFillerNotify)
{
- bool bExit = false;
- m_pFillerNotify->OnAfterKeyStroke(true, GetAttachedData(), bExit,0);
+ FX_BOOL bExit = FALSE;
+ m_pFillerNotify->OnAfterKeyStroke(TRUE, GetAttachedData(), bExit,0);
if (bExit) return;
}
}
@@ -227,52 +227,52 @@ void CPWL_Edit::OnCreated()
m_rcOldWindow = GetWindowRect();
m_pEdit->SetOprNotify(this);
- m_pEdit->EnableOprNotify(true);
+ m_pEdit->EnableOprNotify(TRUE);
}
void CPWL_Edit::SetParamByFlag()
{
if (HasFlag(PES_RIGHT))
{
- m_pEdit->SetAlignmentH(2, false);
+ m_pEdit->SetAlignmentH(2, FALSE);
}
else if (HasFlag(PES_MIDDLE))
{
- m_pEdit->SetAlignmentH(1, false);
+ m_pEdit->SetAlignmentH(1, FALSE);
}
else
{
- m_pEdit->SetAlignmentH(0, false);
+ m_pEdit->SetAlignmentH(0, FALSE);
}
if (HasFlag(PES_BOTTOM))
{
- m_pEdit->SetAlignmentV(2, false);
+ m_pEdit->SetAlignmentV(2, FALSE);
}
else if (HasFlag(PES_CENTER))
{
- m_pEdit->SetAlignmentV(1, false);
+ m_pEdit->SetAlignmentV(1, FALSE);
}
else
{
- m_pEdit->SetAlignmentV(0, false);
+ m_pEdit->SetAlignmentV(0, FALSE);
}
if (HasFlag(PES_PASSWORD))
{
- m_pEdit->SetPasswordChar('*', false);
+ m_pEdit->SetPasswordChar('*', FALSE);
}
- m_pEdit->SetMultiLine(HasFlag(PES_MULTILINE), false);
- m_pEdit->SetAutoReturn(HasFlag(PES_AUTORETURN), false);
- m_pEdit->SetAutoFontSize(HasFlag(PWS_AUTOFONTSIZE), false);
- m_pEdit->SetAutoScroll(HasFlag(PES_AUTOSCROLL), false);
+ m_pEdit->SetMultiLine(HasFlag(PES_MULTILINE), FALSE);
+ m_pEdit->SetAutoReturn(HasFlag(PES_AUTORETURN), FALSE);
+ m_pEdit->SetAutoFontSize(HasFlag(PWS_AUTOFONTSIZE), FALSE);
+ m_pEdit->SetAutoScroll(HasFlag(PES_AUTOSCROLL), FALSE);
m_pEdit->EnableUndo(HasFlag(PES_UNDO));
if (HasFlag(PES_TEXTOVERFLOW))
{
SetClipRect(CPDF_Rect(0.0f,0.0f,0.0f,0.0f));
- m_pEdit->SetTextOverflow(true, false);
+ m_pEdit->SetTextOverflow(TRUE, FALSE);
}
else
{
@@ -304,7 +304,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
case PBS_SOLID:
{
sLine << "q\n" << GetBorderWidth() << " w\n"
- << CPWL_Utils::GetColorAppStream(GetBorderColor(),false) << " 2 J 0 j\n";
+ << CPWL_Utils::GetColorAppStream(GetBorderColor(),FALSE) << " 2 J 0 j\n";
for (int32_t i=1;i<nCharArray;i++)
{
@@ -320,7 +320,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
case PBS_DASH:
{
sLine << "q\n" << GetBorderWidth() << " w\n"
- << CPWL_Utils::GetColorAppStream(GetBorderColor(),false) << " 2 J 0 j\n"
+ << CPWL_Utils::GetColorAppStream(GetBorderColor(),FALSE) << " 2 J 0 j\n"
<< "[" << GetBorderDash().nDash << " "
<< GetBorderDash().nGap << "] "
<< GetBorderDash().nPhase << " d\n";
@@ -383,7 +383,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
{
CFX_ByteString sSpellCheck = CPWL_Utils::GetSpellCheckAppStream(m_pEdit, m_pSpellCheck, ptOffset, &wrVisible);
if (sSpellCheck.GetLength() > 0)
- sText << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_RGB,1,0,0),false) << sSpellCheck;
+ sText << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_RGB,1,0,0),FALSE) << sSpellCheck;
}
if (sText.GetLength() > 0)
@@ -487,7 +487,7 @@ IFX_SystemHandler* pSysHandler = GetSystemHandler();
}
}
-bool CPWL_Edit::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point,nFlag);
@@ -496,16 +496,16 @@ bool CPWL_Edit::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
if (m_bMouseDown)
InvalidateRect();
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
SetCapture();
m_pEdit->OnMouseDown(point,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
}
- return true;
+ return TRUE;
}
-bool CPWL_Edit::OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDblClk(point, nFlag);
@@ -514,7 +514,7 @@ bool CPWL_Edit::OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag)
m_pEdit->SelectAll();
}
- return true;
+ return TRUE;
}
#define WM_PWLEDIT_UNDO 0x01
@@ -526,16 +526,16 @@ bool CPWL_Edit::OnLButtonDblClk(const CPDF_Point & point, FX_DWORD nFlag)
#define WM_PWLEDIT_SELECTALL 0x07
#define WM_PWLEDIT_SUGGEST 0x08
-bool CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
- if (m_bMouseDown) return false;
+ if (m_bMouseDown) return FALSE;
CPWL_Wnd::OnRButtonUp(point, nFlag);
- if (!HasFlag(PES_TEXTOVERFLOW) && !ClientHitTest(point)) return true;
+ if (!HasFlag(PES_TEXTOVERFLOW) && !ClientHitTest(point)) return TRUE;
IFX_SystemHandler* pSH = GetSystemHandler();
- if (!pSH) return false;
+ if (!pSH) return FALSE;
SetFocus();
@@ -543,7 +543,7 @@ bool CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
CFX_WideString swLatin = m_pEdit->GetRangeText(wrLatin);
FX_HMENU hPopup = pSH->CreatePopupMenu();
- if (!hPopup) return false;
+ if (!hPopup) return FALSE;
CFX_ByteStringArray sSuggestWords;
CPDF_Point ptPopup = point;
@@ -587,9 +587,9 @@ bool CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
pSH->AppendMenuItem(hPopup, 0, L"");
if (!m_pEdit->CanUndo())
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_UNDO, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_UNDO, FALSE);
if (!m_pEdit->CanRedo())
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_REDO, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_REDO, FALSE);
}
pSH->AppendMenuItem(hPopup, WM_PWLEDIT_CUT,
@@ -603,32 +603,32 @@ bool CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
CFX_WideString swText = pSH->GetClipboardText(GetAttachedHWnd());
if (swText.IsEmpty())
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_PASTE, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_PASTE, FALSE);
if (!m_pEdit->IsSelected())
{
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, false);
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_COPY, false);
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_DELETE, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, FALSE);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_COPY, FALSE);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_DELETE, FALSE);
}
if (IsReadOnly())
{
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, false);
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_DELETE, false);
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_PASTE, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, FALSE);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_DELETE, FALSE);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_PASTE, FALSE);
}
if (HasFlag(PES_PASSWORD))
{
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, false);
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_COPY, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, FALSE);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_COPY, FALSE);
}
if (HasFlag(PES_NOREAD))
{
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, false);
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_COPY, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_CUT, FALSE);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_COPY, FALSE);
}
pSH->AppendMenuItem(hPopup, 0, L"");
@@ -637,7 +637,7 @@ bool CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
if (m_pEdit->GetTotalWords() == 0)
{
- pSH->EnableMenuItem(hPopup, WM_PWLEDIT_SELECTALL, false);
+ pSH->EnableMenuItem(hPopup, WM_PWLEDIT_SELECTALL, FALSE);
}
int32_t x, y;
@@ -699,12 +699,12 @@ bool CPWL_Edit::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
pSH->DestroyMenu(hPopup);
- return true;
+ return TRUE;
}
void CPWL_Edit::OnSetFocus()
{
- SetEditCaret(true);
+ SetEditCaret(TRUE);
if (!IsReadOnly())
{
@@ -712,15 +712,15 @@ void CPWL_Edit::OnSetFocus()
pFocusHandler->OnSetFocus(this);
}
- m_bFocus = true;
+ m_bFocus = TRUE;
}
void CPWL_Edit::OnKillFocus()
{
- ShowVScrollBar(false);
+ ShowVScrollBar(FALSE);
m_pEdit->SelectNone();
- SetCaret(false, CPDF_Point(0.0f,0.0f), CPDF_Point(0.0f,0.0f));
+ SetCaret(FALSE, CPDF_Point(0.0f,0.0f), CPDF_Point(0.0f,0.0f));
SetCharSet(0);
@@ -730,20 +730,20 @@ void CPWL_Edit::OnKillFocus()
pFocusHandler->OnKillFocus(this);
}
- m_bFocus = false;
+ m_bFocus = FALSE;
}
-void CPWL_Edit::SetHorzScale(int32_t nHorzScale, bool bPaint/* = true*/)
+void CPWL_Edit::SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint/* = TRUE*/)
{
m_pEdit->SetHorzScale(nHorzScale, bPaint);
}
-void CPWL_Edit::SetCharSpace(FX_FLOAT fCharSpace, bool bPaint/* = true*/)
+void CPWL_Edit::SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint/* = TRUE*/)
{
m_pEdit->SetCharSpace(fCharSpace, bPaint);
}
-void CPWL_Edit::SetLineLeading(FX_FLOAT fLineLeading, bool bPaint/* = true*/)
+void CPWL_Edit::SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint/* = TRUE*/)
{
m_pEdit->SetLineLeading(fLineLeading, bPaint);
}
@@ -813,7 +813,7 @@ CPDF_Point CPWL_Edit::GetWordRightBottomPoint(const CPVT_WordPlace& wpWord)
return pt;
}
-bool CPWL_Edit::IsTextFull() const
+FX_BOOL CPWL_Edit::IsTextFull() const
{
return m_pEdit->IsTextFull();
}
@@ -840,7 +840,7 @@ void CPWL_Edit::SetCharArray(int32_t nCharArray)
if (HasFlag(PES_CHARARRAY) && nCharArray > 0)
{
m_pEdit->SetCharArray(nCharArray);
- m_pEdit->SetTextOverflow(true);
+ m_pEdit->SetTextOverflow(TRUE);
if (HasFlag(PWS_AUTOFONTSIZE))
{
@@ -849,7 +849,7 @@ void CPWL_Edit::SetCharArray(int32_t nCharArray)
FX_FLOAT fFontSize = GetCharArrayAutoFontSize(pFontMap->GetPDFFont(0), GetClientRect(), nCharArray);
if (fFontSize > 0.0f)
{
- m_pEdit->SetAutoFontSize(false);
+ m_pEdit->SetAutoFontSize(FALSE);
m_pEdit->SetFontSize(fFontSize);
}
}
@@ -873,7 +873,7 @@ CPDF_Rect CPWL_Edit::GetFocusRect() const
return CPDF_Rect();
}
-void CPWL_Edit::ShowVScrollBar(bool bShow)
+void CPWL_Edit::ShowVScrollBar(FX_BOOL bShow)
{
if (CPWL_ScrollBar * pScroll = GetVScrollBar())
{
@@ -881,35 +881,35 @@ void CPWL_Edit::ShowVScrollBar(bool bShow)
{
if (!pScroll->IsVisible())
{
- pScroll->SetVisible(true);
+ pScroll->SetVisible(TRUE);
CPDF_Rect rcWindow = GetWindowRect();
m_rcOldWindow = rcWindow;
rcWindow.right += PWL_SCROLLBAR_WIDTH;
- Move(rcWindow, true, true);
+ Move(rcWindow, TRUE, TRUE);
}
}
else
{
if (pScroll->IsVisible())
{
- pScroll->SetVisible(false);
- Move(m_rcOldWindow, true, true);
+ pScroll->SetVisible(FALSE);
+ Move(m_rcOldWindow, TRUE, TRUE);
}
}
}
}
-bool CPWL_Edit::IsVScrollBarVisible() const
+FX_BOOL CPWL_Edit::IsVScrollBarVisible() const
{
if (CPWL_ScrollBar * pScroll = GetVScrollBar())
{
return pScroll->IsVisible();
}
- return false;
+ return FALSE;
}
-void CPWL_Edit::EnableSpellCheck(bool bEnabled)
+void CPWL_Edit::EnableSpellCheck(FX_BOOL bEnabled)
{
if (bEnabled)
AddFlag(PES_SPELLCHECK);
@@ -917,16 +917,16 @@ void CPWL_Edit::EnableSpellCheck(bool bEnabled)
RemoveFlag(PES_SPELLCHECK);
}
-bool CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
{
- if (m_bMouseDown) return true;
+ if (m_bMouseDown) return TRUE;
if (nChar == FWL_VKEY_Delete)
{
if (m_pFillerNotify)
{
- bool bRC = true;
- bool bExit = false;
+ FX_BOOL bRC = TRUE;
+ FX_BOOL bExit = FALSE;
CFX_WideString strChange;
CFX_WideString strChangeEx;
@@ -936,27 +936,27 @@ bool CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
if (nSelStart == nSelEnd)
nSelEnd = nSelStart + 1;
- m_pFillerNotify->OnBeforeKeyStroke(true, GetAttachedData(), FWL_VKEY_Delete, strChange, strChangeEx, nSelStart, nSelEnd, true, bRC, bExit, nFlag);
- if (!bRC) return false;
- if (bExit) return false;
+ m_pFillerNotify->OnBeforeKeyStroke(TRUE, GetAttachedData(), FWL_VKEY_Delete, strChange, strChangeEx, nSelStart, nSelEnd, TRUE, bRC, bExit, nFlag);
+ if (!bRC) return FALSE;
+ if (bExit) return FALSE;
}
}
- bool bRet = CPWL_EditCtrl::OnKeyDown(nChar, nFlag);
+ FX_BOOL bRet = CPWL_EditCtrl::OnKeyDown(nChar, nFlag);
if (nChar == FWL_VKEY_Delete)
{
if (m_pFillerNotify)
{
- bool bExit = false;
- m_pFillerNotify->OnAfterKeyStroke(true, GetAttachedData(), bExit,nFlag);
- if (bExit) return false;
+ FX_BOOL bExit = FALSE;
+ m_pFillerNotify->OnAfterKeyStroke(TRUE, GetAttachedData(), bExit,nFlag);
+ if (bExit) return FALSE;
}
}
//In case of implementation swallow the OnKeyDown event.
if(IsProceedtoOnChar(nChar, nFlag))
- return true;
+ return TRUE;
return bRet;
}
@@ -965,11 +965,11 @@ bool CPWL_Edit::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
*In case of implementation swallow the OnKeyDown event.
*If the event is swallowed, implementation may do other unexpected things, which is not the control means to do.
*/
-bool CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag)
{
- bool bCtrl = IsCTRLpressed(nFlag);
- bool bAlt = IsALTpressed(nFlag);
+ FX_BOOL bCtrl = IsCTRLpressed(nFlag);
+ FX_BOOL bAlt = IsALTpressed(nFlag);
if(bCtrl && !bAlt)
{
//hot keys for edit control.
@@ -980,7 +980,7 @@ bool CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag)
case 'X':
case 'A':
case 'Z':
- return true;
+ return TRUE;
default:
break;
}
@@ -992,22 +992,22 @@ bool CPWL_Edit::IsProceedtoOnChar(FX_WORD nKeyCode, FX_DWORD nFlag)
case FWL_VKEY_Back:
case FWL_VKEY_Return:
case FWL_VKEY_Space:
- return true;
+ return TRUE;
default:
break;
}
- return false;
+ return FALSE;
}
-bool CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
- if (m_bMouseDown) return true;
+ if (m_bMouseDown) return TRUE;
- bool bRC = true;
- bool bExit = false;
+ FX_BOOL bRC = TRUE;
+ FX_BOOL bExit = FALSE;
- bool bCtrl = IsCTRLpressed(nFlag);
+ FX_BOOL bCtrl = IsCTRLpressed(nFlag);
if (!bCtrl)
{
if (m_pFillerNotify)
@@ -1036,12 +1036,12 @@ bool CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag)
}
CFX_WideString strChangeEx;
- m_pFillerNotify->OnBeforeKeyStroke(true, GetAttachedData(), nKeyCode, swChange, strChangeEx, nSelStart, nSelEnd, true, bRC, bExit, nFlag);
+ m_pFillerNotify->OnBeforeKeyStroke(TRUE, GetAttachedData(), nKeyCode, swChange, strChangeEx, nSelStart, nSelEnd, TRUE, bRC, bExit, nFlag);
}
}
- if (!bRC) return true;
- if (bExit) return false;
+ if (!bRC) return TRUE;
+ if (bExit) return FALSE;
if (IFX_Edit_FontMap * pFontMap = GetFontMap())
{
@@ -1052,21 +1052,21 @@ bool CPWL_Edit::OnChar(FX_WORD nChar, FX_DWORD nFlag)
SetCharSet(nNewCharSet);
}
}
- bool bRet = CPWL_EditCtrl::OnChar(nChar,nFlag);
+ FX_BOOL bRet = CPWL_EditCtrl::OnChar(nChar,nFlag);
if (!bCtrl)
{
if (m_pFillerNotify)
{
- m_pFillerNotify->OnAfterKeyStroke(true, GetAttachedData(), bExit,nFlag);
- if (bExit) return false;
+ m_pFillerNotify->OnAfterKeyStroke(TRUE, GetAttachedData(), bExit,nFlag);
+ if (bExit) return FALSE;
}
}
return bRet;
}
-bool CPWL_Edit::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Edit::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
{
if (HasFlag(PES_MULTILINE))
{
@@ -1082,10 +1082,10 @@ bool CPWL_Edit::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nF
}
SetScrollPos(ptScroll);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void CPWL_Edit::OnInsertReturn(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace)
@@ -1205,22 +1205,22 @@ CPVT_WordRange CPWL_Edit::CombineWordRange(const CPVT_WordRange& wr1, const CPVT
CPVT_WordRange CPWL_Edit::GetLatinWordsRange(const CPDF_Point& point) const
{
- return GetSameWordsRange(m_pEdit->SearchWordPlace(point), true, false);
+ return GetSameWordsRange(m_pEdit->SearchWordPlace(point), TRUE, FALSE);
}
CPVT_WordRange CPWL_Edit::GetLatinWordsRange(const CPVT_WordPlace & place) const
{
- return GetSameWordsRange(place, true, false);
+ return GetSameWordsRange(place, TRUE, FALSE);
}
CPVT_WordRange CPWL_Edit::GetArabicWordsRange(const CPVT_WordPlace & place) const
{
- return GetSameWordsRange(place, false, true);
+ return GetSameWordsRange(place, FALSE, TRUE);
}
#define PWL_ISARABICWORD(word) ((word >= 0x0600 && word <= 0x06FF) || (word >= 0xFB50 && word <= 0xFEFC))
-CPVT_WordRange CPWL_Edit::GetSameWordsRange(const CPVT_WordPlace & place, bool bLatin, bool bArabic) const
+CPVT_WordRange CPWL_Edit::GetSameWordsRange(const CPVT_WordPlace & place, FX_BOOL bLatin, FX_BOOL bArabic) const
{
CPVT_WordRange range;
diff --git a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
index 11e1fe7d37..0d14587f66 100644
--- a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
@@ -22,7 +22,7 @@
CPWL_EditCtrl::CPWL_EditCtrl() :
m_pEdit(NULL),
m_pEditCaret(NULL),
- m_bMouseDown(false),
+ m_bMouseDown(FALSE),
m_pEditNotify(NULL),
m_nCharSet(DEFAULT_CHARSET),
m_nCodePage(0)
@@ -50,7 +50,7 @@ void CPWL_EditCtrl::OnCreated()
m_pEdit->Initialize();
}
-bool CPWL_EditCtrl::IsWndHorV()
+FX_BOOL CPWL_EditCtrl::IsWndHorV()
{
CPDF_Matrix mt = GetWindowMatrix();
CPDF_Point point1(0,1);
@@ -167,17 +167,17 @@ FX_FLOAT CPWL_EditCtrl::GetFontSize() const
return m_pEdit->GetFontSize();
}
-bool CPWL_EditCtrl::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_EditCtrl::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
{
- if (m_bMouseDown) return true;
+ if (m_bMouseDown) return TRUE;
- bool bRet = CPWL_Wnd::OnKeyDown(nChar,nFlag);
+ FX_BOOL bRet = CPWL_Wnd::OnKeyDown(nChar,nFlag);
//FILTER
switch (nChar)
{
default:
- return false;
+ return FALSE;
case FWL_VKEY_Delete:
case FWL_VKEY_Up:
case FWL_VKEY_Down:
@@ -209,35 +209,35 @@ bool CPWL_EditCtrl::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
{
case FWL_VKEY_Delete:
Delete();
- return true;
+ return TRUE;
case FWL_VKEY_Insert:
if (IsSHIFTpressed(nFlag))
PasteText();
- return true;
+ return TRUE;
case FWL_VKEY_Up:
- m_pEdit->OnVK_UP(IsSHIFTpressed(nFlag),false);
- return true;
+ m_pEdit->OnVK_UP(IsSHIFTpressed(nFlag),FALSE);
+ return TRUE;
case FWL_VKEY_Down:
- m_pEdit->OnVK_DOWN(IsSHIFTpressed(nFlag),false);
- return true;
+ m_pEdit->OnVK_DOWN(IsSHIFTpressed(nFlag),FALSE);
+ return TRUE;
case FWL_VKEY_Left:
- m_pEdit->OnVK_LEFT(IsSHIFTpressed(nFlag),false);
- return true;
+ m_pEdit->OnVK_LEFT(IsSHIFTpressed(nFlag),FALSE);
+ return TRUE;
case FWL_VKEY_Right:
- m_pEdit->OnVK_RIGHT(IsSHIFTpressed(nFlag),false);
- return true;
+ m_pEdit->OnVK_RIGHT(IsSHIFTpressed(nFlag),FALSE);
+ return TRUE;
case FWL_VKEY_Home:
m_pEdit->OnVK_HOME(IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
- return true;
+ return TRUE;
case FWL_VKEY_End:
m_pEdit->OnVK_END(IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
- return true;
+ return TRUE;
case FWL_VKEY_Unknown:
if (!IsSHIFTpressed(nFlag))
Clear();
else
CutText();
- return true;
+ return TRUE;
default:
break;
}
@@ -245,9 +245,9 @@ bool CPWL_EditCtrl::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
return bRet;
}
-bool CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
- if (m_bMouseDown) return true;
+ if (m_bMouseDown) return TRUE;
CPWL_Wnd::OnChar(nChar,nFlag);
@@ -256,14 +256,14 @@ bool CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
case 0x0A:
case 0x1B:
- return false;
+ return FALSE;
default:
break;
}
- bool bCtrl = IsCTRLpressed(nFlag);
- bool bAlt = IsALTpressed(nFlag);
- bool bShift = IsSHIFTpressed(nFlag);
+ FX_BOOL bCtrl = IsCTRLpressed(nFlag);
+ FX_BOOL bAlt = IsALTpressed(nFlag);
+ FX_BOOL bShift = IsSHIFTpressed(nFlag);
FX_WORD word = nChar;
@@ -273,29 +273,29 @@ bool CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
case 'C' - 'A' + 1:
CopyText();
- return true;
+ return TRUE;
case 'V' - 'A' + 1:
PasteText();
- return true;
+ return TRUE;
case 'X' - 'A' + 1:
CutText();
- return true;
+ return TRUE;
case 'A' - 'A' + 1:
SelectAll();
- return true;
+ return TRUE;
case 'Z' - 'A' + 1:
if (bShift)
Redo();
else
Undo();
- return true;
+ return TRUE;
default:
if (nChar < 32)
- return false;
+ return FALSE;
}
}
- if (IsReadOnly()) return true;
+ if (IsReadOnly()) return TRUE;
if (m_pEdit->IsSelected() && word == FWL_VKEY_Back)
word = FWL_VKEY_Unknown;
@@ -319,10 +319,10 @@ bool CPWL_EditCtrl::OnChar(FX_WORD nChar, FX_DWORD nFlag)
break;
}
- return true;
+ return TRUE;
}
-bool CPWL_EditCtrl::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_EditCtrl::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point,nFlag);
@@ -331,16 +331,16 @@ bool CPWL_EditCtrl::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
if (m_bMouseDown)
InvalidateRect();
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
SetCapture();
m_pEdit->OnMouseDown(point,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
}
- return true;
+ return TRUE;
}
-bool CPWL_EditCtrl::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_EditCtrl::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point,nFlag);
@@ -351,20 +351,20 @@ bool CPWL_EditCtrl::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
SetFocus();
ReleaseCapture();
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
}
- return true;
+ return TRUE;
}
-bool CPWL_EditCtrl::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_EditCtrl::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnMouseMove(point,nFlag);
if (m_bMouseDown)
- m_pEdit->OnMouseMove(point,false,false);
+ m_pEdit->OnMouseMove(point,FALSE,FALSE);
- return true;
+ return TRUE;
}
CPDF_Rect CPWL_EditCtrl::GetContentRect() const
@@ -372,7 +372,7 @@ CPDF_Rect CPWL_EditCtrl::GetContentRect() const
return m_pEdit->GetContentRect();
}
-void CPWL_EditCtrl::SetEditCaret(bool bVisible)
+void CPWL_EditCtrl::SetEditCaret(FX_BOOL bVisible)
{
CPDF_Point ptHead(0,0),ptFoot(0,0);
@@ -418,18 +418,18 @@ void CPWL_EditCtrl::GetCaretPos(int32_t& x, int32_t& y) const
PWLtoWnd(ptHead, x, y);
}
-void CPWL_EditCtrl::SetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot)
+void CPWL_EditCtrl::SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot)
{
if (m_pEditCaret)
{
if (!IsFocused() || m_pEdit->IsSelected())
- bVisible = false;
+ bVisible = FALSE;
m_pEditCaret->SetCaret(bVisible, ptHead, ptFoot);
}
}
-bool CPWL_EditCtrl::IsModified() const
+FX_BOOL CPWL_EditCtrl::IsModified() const
{
return m_pEdit->IsModified();
}
@@ -466,7 +466,7 @@ void CPWL_EditCtrl::Paint()
m_pEdit->Paint();
}
-void CPWL_EditCtrl::EnableRefresh(bool bRefresh)
+void CPWL_EditCtrl::EnableRefresh(FX_BOOL bRefresh)
{
if (m_pEdit)
m_pEdit->EnableRefresh(bRefresh);
@@ -578,7 +578,7 @@ void CPWL_EditCtrl::CutText()
{
}
-void CPWL_EditCtrl::ShowVScrollBar(bool bShow)
+void CPWL_EditCtrl::ShowVScrollBar(FX_BOOL bShow)
{
}
@@ -612,12 +612,12 @@ void CPWL_EditCtrl::Backspace()
m_pEdit->Backspace();
}
-bool CPWL_EditCtrl::CanUndo() const
+FX_BOOL CPWL_EditCtrl::CanUndo() const
{
return !IsReadOnly() && m_pEdit->CanUndo();
}
-bool CPWL_EditCtrl::CanRedo() const
+FX_BOOL CPWL_EditCtrl::CanRedo() const
{
return !IsReadOnly() && m_pEdit->CanRedo();
}
@@ -651,11 +651,11 @@ void CPWL_EditCtrl::IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax,
if (IsFloatBigger(Info.fPlateWidth,Info.fContentMax-Info.fContentMin)
|| IsFloatEqual(Info.fPlateWidth,Info.fContentMax-Info.fContentMin))
{
- ShowVScrollBar(false);
+ ShowVScrollBar(FALSE);
}
else
{
- ShowVScrollBar(true);
+ ShowVScrollBar(TRUE);
}
}
@@ -664,7 +664,7 @@ void CPWL_EditCtrl::IOnSetScrollPosY(FX_FLOAT fy)
OnNotify(this, PNM_SETSCROLLPOS,SBT_VSCROLL, (intptr_t)&fy);
}
-void CPWL_EditCtrl::IOnSetCaret(bool bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot, const CPVT_WordPlace& place)
+void CPWL_EditCtrl::IOnSetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot, const CPVT_WordPlace& place)
{
PWL_CARET_INFO cInfo;
cInfo.bVisible = bVisible;
@@ -717,6 +717,6 @@ void CPWL_EditCtrl::SetReadyToInput()
if (m_bMouseDown)
{
ReleaseCapture();
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
}
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
index 2f02973f82..50b321dfac 100644
--- a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
@@ -72,7 +72,7 @@ CFX_ByteString CPWL_FontMap::GetPDFFontAlias(int32_t nFontIndex)
return "";
}
-bool CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word)
+FX_BOOL CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word)
{
if (nFontIndex >=0 && nFontIndex < m_aData.GetSize())
{
@@ -82,7 +82,7 @@ bool CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word)
}
}
- return false;
+ return FALSE;
}
int32_t CPWL_FontMap::GetWordFontIndex(FX_WORD word, int32_t nCharset, int32_t nFontIndex)
@@ -106,13 +106,13 @@ int32_t CPWL_FontMap::GetWordFontIndex(FX_WORD word, int32_t nCharset, int32_t n
}
}
- int32_t nNewFontIndex = GetFontIndex(GetNativeFontName(nCharset), nCharset, true);
+ int32_t nNewFontIndex = GetFontIndex(GetNativeFontName(nCharset), nCharset, TRUE);
if (nNewFontIndex >= 0)
{
if (KnowWord(nNewFontIndex, word))
return nNewFontIndex;
}
- nNewFontIndex = GetFontIndex("Arial Unicode MS", DEFAULT_CHARSET, false);
+ nNewFontIndex = GetFontIndex("Arial Unicode MS", DEFAULT_CHARSET, FALSE);
if (nNewFontIndex >= 0)
{
if (KnowWord(nNewFontIndex, word))
@@ -189,7 +189,7 @@ void CPWL_FontMap::Initial(const FX_CHAR* fontname)
if (sFontName.IsEmpty())
sFontName = DEFAULT_FONT_NAME;
- GetFontIndex(sFontName, ANSI_CHARSET, false);
+ GetFontIndex(sFontName, ANSI_CHARSET, FALSE);
}
@@ -206,15 +206,15 @@ const char* g_sDEStandardFontName[] = {"Courier", "Courier-Bold", "Courier-BoldO
"Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic",
"Symbol", "ZapfDingbats"};
-bool CPWL_FontMap::IsStandardFont(const CFX_ByteString& sFontName)
+FX_BOOL CPWL_FontMap::IsStandardFont(const CFX_ByteString& sFontName)
{
for (int32_t i=0; i<14; i++)
{
if (sFontName == g_sDEStandardFontName[i])
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
int32_t CPWL_FontMap::FindFont(const CFX_ByteString& sFontName, int32_t nCharset)
@@ -234,7 +234,7 @@ int32_t CPWL_FontMap::FindFont(const CFX_ByteString& sFontName, int32_t nCharset
return -1;
}
-int32_t CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, bool bFind)
+int32_t CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, FX_BOOL bFind)
{
int32_t nFontIndex = FindFont(EncodeFontAlias(sFontName, nCharset), nCharset);
if (nFontIndex >= 0)
diff --git a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
index 85c4bc06c9..71174dfb0a 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp
@@ -145,12 +145,12 @@ int32_t CPWL_Icon::GetScaleMethod()
return 0;
}
-bool CPWL_Icon::IsProportionalScale()
+FX_BOOL CPWL_Icon::IsProportionalScale()
{
if (m_pIconFit)
return m_pIconFit->IsProportionalScale();
- return false;
+ return FALSE;
}
void CPWL_Icon::GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom)
@@ -175,12 +175,12 @@ void CPWL_Icon::GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom)
}
}
-bool CPWL_Icon::GetFittingBounds()
+FX_BOOL CPWL_Icon::GetFittingBounds()
{
if (m_pIconFit)
return m_pIconFit->GetFittingBounds();
- return false;
+ return FALSE;
}
void CPWL_Icon::GetScale(FX_FLOAT & fHScale,FX_FLOAT & fVScale)
diff --git a/fpdfsdk/src/pdfwindow/PWL_IconList.cpp b/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
index ecbb0fd3c0..157eba633d 100644
--- a/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_IconList.cpp
@@ -22,7 +22,7 @@
CPWL_IconList_Item::CPWL_IconList_Item() :
m_nIconIndex(-1),
m_pData(NULL),
- m_bSelected(false),
+ m_bSelected(FALSE),
m_pText(NULL)
{
}
@@ -67,7 +67,7 @@ void CPWL_IconList_Item::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matr
m_crIcon, m_pText->GetTextColor(), GetTransparency());
}
-void CPWL_IconList_Item::SetSelect(bool bSelected)
+void CPWL_IconList_Item::SetSelect(FX_BOOL bSelected)
{
m_bSelected = bSelected;
@@ -78,7 +78,7 @@ void CPWL_IconList_Item::SetSelect(bool bSelected)
}
-bool CPWL_IconList_Item::IsSelected() const
+FX_BOOL CPWL_IconList_Item::IsSelected() const
{
return m_bSelected;
}
@@ -121,7 +121,7 @@ void CPWL_IconList_Item::RePosChildWnd()
rcClient.left += (PWL_IconList_ITEM_ICON_LEFTMARGIN + PWL_IconList_ITEM_WIDTH + PWL_IconList_ITEM_ICON_LEFTMARGIN);
- m_pText->Move(rcClient, true, false);
+ m_pText->Move(rcClient, TRUE, FALSE);
}
void CPWL_IconList_Item::SetIconFillColor(const CPWL_Color& color)
@@ -151,8 +151,8 @@ void CPWL_IconList_Item::OnDisabled()
CPWL_IconList_Content::CPWL_IconList_Content(int32_t nListCount) :
m_nSelectIndex(-1),
m_pNotify(NULL),
- m_bEnableNotify(true),
- m_bMouseDown(false),
+ m_bEnableNotify(TRUE),
+ m_bMouseDown(FALSE),
m_nListCount(nListCount)
{
}
@@ -192,29 +192,29 @@ void CPWL_IconList_Content::CreateChildWnd(const PWL_CREATEPARAM & cp)
}
}
-bool CPWL_IconList_Content::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_IconList_Content::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
SetFocus();
SetCapture();
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
int32_t nItemIndex = FindItemIndex(point);
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
- return true;
+ return TRUE;
}
-bool CPWL_IconList_Content::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_IconList_Content::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
ReleaseCapture();
- return true;
+ return TRUE;
}
-bool CPWL_IconList_Content::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_IconList_Content::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
{
if (m_bMouseDown)
{
@@ -223,10 +223,10 @@ bool CPWL_IconList_Content::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag
ScrollToItem(nItemIndex);
}
- return true;
+ return TRUE;
}
-bool CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
{
switch (nChar)
{
@@ -237,7 +237,7 @@ bool CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
}
- return true;
+ return TRUE;
case FWL_VKEY_Down:
if (m_nSelectIndex < m_nListCount-1)
{
@@ -245,10 +245,10 @@ bool CPWL_IconList_Content::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
SetSelect(nItemIndex);
ScrollToItem(nItemIndex);
}
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
int32_t CPWL_IconList_Content::FindItemIndex(const CPDF_Point& point)
@@ -307,8 +307,8 @@ void CPWL_IconList_Content::SetSelect(int32_t nIndex)
{
if (m_nSelectIndex != nIndex)
{
- SelectItem(m_nSelectIndex, false);
- SelectItem(nIndex, true);
+ SelectItem(m_nSelectIndex, FALSE);
+ SelectItem(nIndex, TRUE);
m_nSelectIndex = nIndex;
if (IPWL_IconList_Notify* pNotify = GetNotify())
@@ -333,12 +333,12 @@ void CPWL_IconList_Content::SetNotify(IPWL_IconList_Notify* pNotify)
m_pNotify = pNotify;
}
-void CPWL_IconList_Content::EnableNotify(bool bNotify)
+void CPWL_IconList_Content::EnableNotify(FX_BOOL bNotify)
{
m_bEnableNotify = bNotify;
}
-void CPWL_IconList_Content::SelectItem(int32_t nItemIndex, bool bSelect)
+void CPWL_IconList_Content::SelectItem(int32_t nItemIndex, FX_BOOL bSelect)
{
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex))
{
@@ -423,7 +423,7 @@ void CPWL_IconList::RePosChildWnd()
CPWL_Wnd::RePosChildWnd();
if (m_pListContent)
- m_pListContent->Move(GetClientRect(), true, false);
+ m_pListContent->Move(GetClientRect(), TRUE, FALSE);
}
void CPWL_IconList::CreateChildWnd(const PWL_CREATEPARAM & cp)
@@ -442,7 +442,7 @@ void CPWL_IconList::OnCreated()
{
pScrollBar->RemoveFlag(PWS_AUTOTRANSPARENT);
pScrollBar->SetTransparency(255);
- pScrollBar->SetNotifyForever(true);
+ pScrollBar->SetNotifyForever(TRUE);
}
}
@@ -463,7 +463,7 @@ void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
{
if (!pScrollBar->IsVisible())
{
- pScrollBar->SetVisible(true);
+ pScrollBar->SetVisible(TRUE);
RePosChildWnd();
}
else
@@ -474,7 +474,7 @@ void CPWL_IconList::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
{
if (pScrollBar->IsVisible())
{
- pScrollBar->SetVisible(false);
+ pScrollBar->SetVisible(FALSE);
RePosChildWnd();
}
@@ -522,7 +522,7 @@ void CPWL_IconList::SetNotify(IPWL_IconList_Notify* pNotify)
m_pListContent->SetNotify(pNotify);
}
-void CPWL_IconList::EnableNotify(bool bNotify)
+void CPWL_IconList::EnableNotify(FX_BOOL bNotify)
{
m_pListContent->EnableNotify(bNotify);
}
@@ -552,7 +552,7 @@ void CPWL_IconList::SetIconFillColor(const CPWL_Color& color)
m_pListContent->SetIconFillColor(color);
}
-bool CPWL_IconList::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_IconList::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
{
CPDF_Point ptScroll = m_pListContent->GetScrollPos();
CPDF_Rect rcScroll = m_pListContent->GetScrollArea();
@@ -583,10 +583,10 @@ bool CPWL_IconList::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWOR
if (CPWL_ScrollBar* pScrollBar = GetVScrollBar())
pScrollBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptNew.y);
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Label.cpp b/fpdfsdk/src/pdfwindow/PWL_Label.cpp
index 3e231d5244..e1780c69a8 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Label.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Label.cpp
@@ -39,7 +39,7 @@ void CPWL_Label::OnCreated()
if (HasFlag(PES_TEXTOVERFLOW))
{
SetClipRect(CPDF_Rect(0.0f,0.0f,0.0f,0.0f));
- m_pEdit->SetTextOverflow(true);
+ m_pEdit->SetTextOverflow(TRUE);
}
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
index d0e9cc6dfd..48fb409b7b 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
@@ -49,7 +49,7 @@ void CPWL_List_Notify::IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax,
{
if (pScroll->IsVisible())
{
- pScroll->SetVisible(false);
+ pScroll->SetVisible(FALSE);
m_pList->RePosChildWnd();
}
}
@@ -57,7 +57,7 @@ void CPWL_List_Notify::IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax,
{
if (!pScroll->IsVisible())
{
- pScroll->SetVisible(true);
+ pScroll->SetVisible(TRUE);
m_pList->RePosChildWnd();
}
}
@@ -79,8 +79,8 @@ void CPWL_List_Notify::IOnInvalidateRect(CPDF_Rect * pRect)
CPWL_ListBox::CPWL_ListBox() :
m_pList(NULL),
m_pListNotify(NULL),
- m_bMouseDown(false),
- m_bHoverSel(false),
+ m_bMouseDown(FALSE),
+ m_bHoverSel(FALSE),
m_pFillerNotify(NULL)
{
m_pList = IFX_List::NewList();
@@ -229,16 +229,16 @@ void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pU
}
}
-bool CPWL_ListBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_ListBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
{
CPWL_Wnd::OnKeyDown(nChar, nFlag);
- if (!m_pList) return false;
+ if (!m_pList) return FALSE;
switch (nChar)
{
default:
- return false;
+ return FALSE;
case FWL_VKEY_Up:
case FWL_VKEY_Down:
case FWL_VKEY_Home:
@@ -272,33 +272,33 @@ bool CPWL_ListBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag)
break;
}
- bool bExit = false;
- OnNotifySelChanged(true,bExit,nFlag);
+ FX_BOOL bExit = FALSE;
+ OnNotifySelChanged(TRUE,bExit,nFlag);
- return true;
+ return TRUE;
}
-bool CPWL_ListBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_ListBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
CPWL_Wnd::OnChar(nChar,nFlag);
- if (!m_pList) return false;
+ if (!m_pList) return FALSE;
- if (!m_pList->OnChar(nChar,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag))) return false;
+ if (!m_pList->OnChar(nChar,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag))) return FALSE;
- bool bExit = false;
- OnNotifySelChanged(true,bExit, nFlag);
+ FX_BOOL bExit = FALSE;
+ OnNotifySelChanged(TRUE,bExit, nFlag);
- return true;
+ return TRUE;
}
-bool CPWL_ListBox::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_ListBox::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point,nFlag);
if (ClientHitTest(point))
{
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
SetFocus();
SetCapture();
@@ -306,31 +306,31 @@ bool CPWL_ListBox::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
m_pList->OnMouseDown(point,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
}
- return true;
+ return TRUE;
}
-bool CPWL_ListBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_ListBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point,nFlag);
if (m_bMouseDown)
{
ReleaseCapture();
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
}
- bool bExit = false;
- OnNotifySelChanged(false,bExit,nFlag);
+ FX_BOOL bExit = FALSE;
+ OnNotifySelChanged(FALSE,bExit,nFlag);
- return true;
+ return TRUE;
}
-void CPWL_ListBox::SetHoverSel(bool bHoverSel)
+void CPWL_ListBox::SetHoverSel(FX_BOOL bHoverSel)
{
m_bHoverSel = bHoverSel;
}
-bool CPWL_ListBox::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_ListBox::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnMouseMove(point, nFlag);
@@ -346,7 +346,7 @@ bool CPWL_ListBox::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
m_pList->OnMouseMove(point,IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
}
- return true;
+ return TRUE;
}
void CPWL_ListBox::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
@@ -405,19 +405,19 @@ void CPWL_ListBox::RePosChildWnd()
m_pList->SetPlateRect(GetListRect());
}
-void CPWL_ListBox::OnNotifySelChanged(bool bKeyDown, bool & bExit, FX_DWORD nFlag)
+void CPWL_ListBox::OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL & bExit, FX_DWORD nFlag)
{
if (m_pFillerNotify)
{
- bool bRC = true;
+ FX_BOOL bRC = TRUE;
CFX_WideString swChange = GetText();
CFX_WideString strChangeEx;
int nSelStart = 0;
int nSelEnd = swChange.GetLength();
- m_pFillerNotify->OnBeforeKeyStroke(false, GetAttachedData(), 0, swChange, strChangeEx, nSelStart, nSelEnd, bKeyDown, bRC, bExit, nFlag);
+ m_pFillerNotify->OnBeforeKeyStroke(FALSE, GetAttachedData(), 0, swChange, strChangeEx, nSelStart, nSelEnd, bKeyDown, bRC, bExit, nFlag);
if (bExit) return;
- m_pFillerNotify->OnAfterKeyStroke(false, GetAttachedData(), bExit,nFlag);
+ m_pFillerNotify->OnAfterKeyStroke(FALSE, GetAttachedData(), bExit,nFlag);
}
}
@@ -498,12 +498,12 @@ void CPWL_ListBox::Reset()
m_pList->Cancel();
}
-bool CPWL_ListBox::IsMultipleSel() const
+FX_BOOL CPWL_ListBox::IsMultipleSel() const
{
if (m_pList)
return m_pList->IsMultipleSel();
- return false;
+ return FALSE;
}
int32_t CPWL_ListBox::GetCaretIndex() const
@@ -522,12 +522,12 @@ int32_t CPWL_ListBox::GetCurSel() const
return -1;
}
-bool CPWL_ListBox::IsItemSelected(int32_t nItemIndex) const
+FX_BOOL CPWL_ListBox::IsItemSelected(int32_t nItemIndex) const
{
if (m_pList)
return m_pList->IsItemSelected(nItemIndex);
- return false;
+ return FALSE;
}
int32_t CPWL_ListBox::GetTopVisibleIndex() const
@@ -578,9 +578,9 @@ CPDF_Rect CPWL_ListBox::GetListRect() const
return CPWL_Utils::DeflateRect(GetWindowRect(),(FX_FLOAT)(GetBorderWidth()+GetInnerBorderWidth()));
}
-bool CPWL_ListBox::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_ListBox::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
{
- if (!m_pList) return false;
+ if (!m_pList) return FALSE;
if (zDelta < 0)
{
@@ -591,8 +591,8 @@ bool CPWL_ListBox::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD
m_pList->OnVK_UP(IsSHIFTpressed(nFlag),IsCTRLpressed(nFlag));
}
- bool bExit = false;
- OnNotifySelChanged(false,bExit, nFlag);
- return true;
+ FX_BOOL bExit = FALSE;
+ OnNotifySelChanged(FALSE,bExit, nFlag);
+ return TRUE;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
index d2deacb4d2..3077e6293f 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
@@ -52,7 +52,7 @@ CPDF_Rect CPWL_ListCtrl::GetScrollArea() const
void CPWL_ListCtrl::ResetFace()
{
- ResetAll(false, 0);
+ ResetAll(FALSE, 0);
}
void CPWL_ListCtrl::ResetContent(int32_t nStart)
@@ -60,7 +60,7 @@ void CPWL_ListCtrl::ResetContent(int32_t nStart)
if (nStart < 0)
nStart = 0;
if (nStart >= 0 && nStart < m_aChildren.GetSize())
- ResetAll(true, nStart);
+ ResetAll(TRUE, nStart);
}
FX_FLOAT CPWL_ListCtrl::GetContentsHeight(FX_FLOAT fLimitWidth)
@@ -91,7 +91,7 @@ FX_FLOAT CPWL_ListCtrl::GetContentsHeight(FX_FLOAT fLimitWidth)
return fRet;
}
-void CPWL_ListCtrl::ResetAll(bool bMove, int32_t nStart)
+void CPWL_ListCtrl::ResetAll(FX_BOOL bMove, int32_t nStart)
{
CPDF_Rect rcClient = GetClientRect();
@@ -119,7 +119,7 @@ void CPWL_ListCtrl::ResetAll(bool bMove, int32_t nStart)
if (bMove)
{
FX_FLOAT fItemHeight = pChild->GetItemHeight(fWidth - fLeft - fRight);
- pChild->Move(CPDF_Rect(fLeft, fy-fItemHeight, fWidth - fRight, fy), true, false);
+ pChild->Move(CPDF_Rect(fLeft, fy-fItemHeight, fWidth - fRight, fy), TRUE, FALSE);
fy -= fItemHeight;
fy -= m_fItemSpace;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Note.cpp b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
index f3c5816c8d..7ed1115a82 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Note.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
@@ -60,13 +60,13 @@ void CPWL_Note_Options::RePosChildWnd()
if (rcClient.Width() > 15.0f)
{
rcClient.right -= 15.0f;
- m_pText->Move(rcClient, true, false);
- m_pText->SetVisible(true);
+ m_pText->Move(rcClient, TRUE, FALSE);
+ m_pText->SetVisible(TRUE);
}
else
{
- m_pText->Move(CPDF_Rect(0,0,0,0), true, false);
- m_pText->SetVisible(false);
+ m_pText->Move(CPDF_Rect(0,0,0,0), TRUE, FALSE);
+ m_pText->SetVisible(FALSE);
}
}
}
@@ -122,9 +122,9 @@ CPDF_Rect CPWL_Note_Options::GetContentRect() const
/* ------------------------------- CPWL_Note_Edit ------------------------------ */
-CPWL_Note_Edit::CPWL_Note_Edit() : m_bEnableNotify(true),
+CPWL_Note_Edit::CPWL_Note_Edit() : m_bEnableNotify(TRUE),
m_fOldItemHeight(0.0f),
- m_bSizeChanged(false),
+ m_bSizeChanged(FALSE),
m_fOldMin(0.0f),
m_fOldMax(0.0f)
{
@@ -136,33 +136,33 @@ CPWL_Note_Edit::~CPWL_Note_Edit()
void CPWL_Note_Edit::RePosChildWnd()
{
- m_bEnableNotify = false;
+ m_bEnableNotify = FALSE;
CPWL_Edit::RePosChildWnd();
- m_bEnableNotify = true;
+ m_bEnableNotify = TRUE;
m_fOldItemHeight = GetContentRect().Height();
}
void CPWL_Note_Edit::SetText(const FX_WCHAR* csText)
{
- m_bEnableNotify = false;
+ m_bEnableNotify = FALSE;
CPWL_Edit::SetText(csText);
- m_bEnableNotify = true;
+ m_bEnableNotify = TRUE;
m_fOldItemHeight = GetContentRect().Height();
}
void CPWL_Note_Edit::OnSetFocus()
{
- m_bEnableNotify = false;
+ m_bEnableNotify = FALSE;
CPWL_Edit::OnSetFocus();
- m_bEnableNotify = true;
+ m_bEnableNotify = TRUE;
- EnableSpellCheck(true);
+ EnableSpellCheck(TRUE);
}
void CPWL_Note_Edit::OnKillFocus()
{
- EnableSpellCheck(false);
+ EnableSpellCheck(FALSE);
if (CPWL_Wnd* pParent = GetParentWindow())
{
@@ -193,7 +193,7 @@ void CPWL_Note_Edit::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, int
if (!IsFloatEqual(pInfo->fContentMax, m_fOldMax) ||
!IsFloatEqual(pInfo->fContentMin, m_fOldMin))
{
- m_bSizeChanged = true;
+ m_bSizeChanged = TRUE;
if (CPWL_Wnd * pParent = GetParentWindow())
{
pParent->OnNotify(this, PNM_NOTEEDITCHANGED, 0, 0);
@@ -218,7 +218,7 @@ void CPWL_Note_Edit::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, int
if (PWL_CARET_INFO * pInfo = (PWL_CARET_INFO*)wParam)
{
PWL_CARET_INFO newInfo = *pInfo;
- newInfo.bVisible = true;
+ newInfo.bVisible = TRUE;
newInfo.ptHead = ChildToParent(pInfo->ptHead);
newInfo.ptFoot = ChildToParent(pInfo->ptFoot);
@@ -239,18 +239,18 @@ FX_FLOAT CPWL_Note_Edit::GetItemHeight(FX_FLOAT fLimitWidth)
if (!m_bSizeChanged)
return m_fOldItemHeight;
- m_bSizeChanged = false;
+ m_bSizeChanged = FALSE;
- EnableNotify(false);
- EnableRefresh(false);
- m_pEdit->EnableNotify(false);
+ EnableNotify(FALSE);
+ EnableRefresh(FALSE);
+ m_pEdit->EnableNotify(FALSE);
- Move(CPDF_Rect(0,0,fLimitWidth,0), true, false);
+ Move(CPDF_Rect(0,0,fLimitWidth,0), TRUE, FALSE);
FX_FLOAT fRet = GetContentRect().Height();
- m_pEdit->EnableNotify(true);
- EnableNotify(true);
- EnableRefresh(true);
+ m_pEdit->EnableNotify(TRUE);
+ EnableNotify(TRUE);
+ EnableRefresh(TRUE);
return fRet;
}
@@ -349,7 +349,7 @@ void CPWL_Note_Icon::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix*
/* --------------------------------- CPWL_Note_CloseBox ---------------------------------- */
-CPWL_Note_CloseBox::CPWL_Note_CloseBox() : m_bMouseDown(false)
+CPWL_Note_CloseBox::CPWL_Note_CloseBox() : m_bMouseDown(FALSE)
{
}
@@ -387,19 +387,19 @@ void CPWL_Note_CloseBox::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matr
0, CPWL_Utils::PWLColorToFXColor(GetTextColor(), GetTransparency()), FXFILL_ALTERNATE);
}
-bool CPWL_Note_CloseBox::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Note_CloseBox::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
SetBorderStyle(PBS_INSET);
InvalidateRect(NULL);
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
return CPWL_Button::OnLButtonDown(point,nFlag);
}
-bool CPWL_Note_CloseBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Note_CloseBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
SetBorderStyle(PBS_BEVELED);
InvalidateRect(NULL);
@@ -429,18 +429,18 @@ void CPWL_Note_Contents::CreateChildWnd(const PWL_CREATEPARAM & cp)
ecp.pParentWnd = this;
ecp.dwFlags = PWS_VISIBLE | PWS_CHILD | PES_MULTILINE | PES_AUTORETURN | PES_TEXTOVERFLOW | PES_UNDO | PES_SPELLCHECK;
- m_pEdit->EnableNotify(false);
+ m_pEdit->EnableNotify(FALSE);
m_pEdit->Create(ecp);
- m_pEdit->EnableNotify(true);
+ m_pEdit->EnableNotify(TRUE);
}
void CPWL_Note_Contents::SetText(const CFX_WideString& sText)
{
if (m_pEdit)
{
- m_pEdit->EnableNotify(false);
+ m_pEdit->EnableNotify(FALSE);
m_pEdit->SetText(sText.c_str());
- m_pEdit->EnableNotify(true);
+ m_pEdit->EnableNotify(TRUE);
OnNotify(m_pEdit, PNM_NOTEEDITCHANGED, 0, 0);
}
}
@@ -551,9 +551,9 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam,
int32_t nIndex = GetItemIndex(pWnd);
if (nIndex < 0) nIndex = 0;
- m_pEdit->EnableNotify(false);
+ m_pEdit->EnableNotify(FALSE);
ResetContent(nIndex);
- m_pEdit->EnableNotify(true);
+ m_pEdit->EnableNotify(TRUE);
for (int32_t i=nIndex+1, sz=m_aChildren.GetSize(); i<sz; i++)
{
@@ -576,7 +576,7 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam,
if (PWL_CARET_INFO * pInfo = (PWL_CARET_INFO*)wParam)
{
PWL_CARET_INFO newInfo = *pInfo;
- newInfo.bVisible = true;
+ newInfo.bVisible = TRUE;
newInfo.ptHead = ChildToParent(pInfo->ptHead);
newInfo.ptFoot = ChildToParent(pInfo->ptFoot);
@@ -588,9 +588,9 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam,
return;
case PNM_NOTERESET:
{
- m_pEdit->EnableNotify(false);
+ m_pEdit->EnableNotify(FALSE);
ResetContent(0);
- m_pEdit->EnableNotify(true);
+ m_pEdit->EnableNotify(TRUE);
for (int32_t i=1, sz=m_aChildren.GetSize(); i<sz; i++)
{
@@ -598,9 +598,9 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam,
pChild->OnNotify(this, PNM_NOTERESET, 0, 0);
}
- m_pEdit->EnableNotify(false);
+ m_pEdit->EnableNotify(FALSE);
ResetContent(0);
- m_pEdit->EnableNotify(true);
+ m_pEdit->EnableNotify(TRUE);
}
return;
}
@@ -608,19 +608,19 @@ void CPWL_Note_Contents::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam,
CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam);
}
-bool CPWL_Note_Contents::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Note_Contents::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
- if (CPWL_Wnd::OnLButtonDown(point,nFlag)) return true;
+ if (CPWL_Wnd::OnLButtonDown(point,nFlag)) return TRUE;
if (!m_pEdit->IsFocused())
{
m_pEdit->SetFocus();
}
- return true;
+ return TRUE;
}
-void CPWL_Note_Contents::SetEditFocus(bool bLast)
+void CPWL_Note_Contents::SetEditFocus(FX_BOOL bLast)
{
if (!m_pEdit->IsFocused())
{
@@ -634,7 +634,7 @@ CPWL_Edit* CPWL_Note_Contents::GetEdit() const
return m_pEdit;
}
-void CPWL_Note_Contents::EnableModify(bool bEnabled)
+void CPWL_Note_Contents::EnableModify(FX_BOOL bEnabled)
{
if (!bEnabled)
m_pEdit->AddFlag(PWS_READONLY);
@@ -654,7 +654,7 @@ void CPWL_Note_Contents::EnableModify(bool bEnabled)
}
}
-void CPWL_Note_Contents::EnableRead(bool bEnabled)
+void CPWL_Note_Contents::EnableRead(FX_BOOL bEnabled)
{
if (!bEnabled)
m_pEdit->AddFlag(PES_NOREAD);
@@ -683,8 +683,8 @@ CPWL_NoteItem::CPWL_NoteItem() :
m_pPrivateData(NULL),
m_sAuthor(L""),
m_fOldItemHeight(0.0f),
- m_bSizeChanged(false),
- m_bAllowModify(true)
+ m_bSizeChanged(FALSE),
+ m_bAllowModify(TRUE)
{
}
@@ -748,7 +748,7 @@ void CPWL_NoteItem::RePosChildWnd()
rcSubject.right = PWL_MIN(rcSubject.left + m_pSubject->GetContentRect().Width() + 1.0f, rcClient.right);
rcSubject.bottom = rcSubject.top - m_pSubject->GetContentRect().Height();
rcSubject.Normalize();
- m_pSubject->Move(rcSubject, true, false);
+ m_pSubject->Move(rcSubject, TRUE, FALSE);
m_pSubject->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcSubject));
CPDF_Rect rcDate = rcClient;
@@ -756,7 +756,7 @@ void CPWL_NoteItem::RePosChildWnd()
rcDate.left = PWL_MAX(rcDate.right - m_pDateTime->GetContentRect().Width() - 1.0f, rcSubject.right);
rcDate.bottom = rcDate.top - m_pDateTime->GetContentRect().Height();
rcDate.Normalize();
- m_pDateTime->Move(rcDate, true, false);
+ m_pDateTime->Move(rcDate, TRUE, FALSE);
m_pDateTime->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcDate));
CPDF_Rect rcContents = rcClient;
@@ -765,7 +765,7 @@ void CPWL_NoteItem::RePosChildWnd()
rcContents.top = rcDate.bottom - POPUP_ITEM_HEAD_BOTTOM;
rcContents.bottom += POPUP_ITEM_BOTTOMWIDTH;
rcContents.Normalize();
- m_pContents->Move(rcContents, true, false);
+ m_pContents->Move(rcContents, TRUE, FALSE);
m_pContents->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcContents));
}
@@ -1038,7 +1038,7 @@ FX_FLOAT CPWL_NoteItem::GetItemHeight(FX_FLOAT fLimitWidth)
if (!m_bSizeChanged)
return m_fOldItemHeight;
- m_bSizeChanged = false;
+ m_bSizeChanged = FALSE;
ASSERT(m_pSubject != NULL);
ASSERT(m_pDateTime != NULL);
@@ -1066,26 +1066,26 @@ FX_FLOAT CPWL_NoteItem::GetItemRightMargin()
return POPUP_ITEM_SIDEMARGIN;
}
-bool CPWL_NoteItem::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag)
+FX_BOOL CPWL_NoteItem::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag)
{
if (!m_pContents->WndHitTest(m_pContents->ParentToChild(point)))
{
- SetNoteFocus(false);
+ SetNoteFocus(FALSE);
}
CPWL_Wnd::OnLButtonDown(point,nFlag);
- return true;
+ return TRUE;
}
-bool CPWL_NoteItem::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_NoteItem::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
if (!m_pContents->WndHitTest(m_pContents->ParentToChild(point)))
{
- SetNoteFocus(false);
+ SetNoteFocus(FALSE);
PopupNoteItemMenu(point);
- return true;
+ return TRUE;
}
return CPWL_Wnd::OnRButtonUp(point,nFlag);
@@ -1096,7 +1096,7 @@ void CPWL_NoteItem::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
switch (msg)
{
case PNM_NOTEEDITCHANGED:
- m_bSizeChanged = true;
+ m_bSizeChanged = TRUE;
if (CPWL_Wnd* pParent = GetParentWindow())
{
@@ -1107,7 +1107,7 @@ void CPWL_NoteItem::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
if (PWL_CARET_INFO * pInfo = (PWL_CARET_INFO*)wParam)
{
PWL_CARET_INFO newInfo = *pInfo;
- newInfo.bVisible = true;
+ newInfo.bVisible = TRUE;
newInfo.ptHead = ChildToParent(pInfo->ptHead);
newInfo.ptFoot = ChildToParent(pInfo->ptFoot);
@@ -1118,7 +1118,7 @@ void CPWL_NoteItem::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intp
}
return;
case PNM_NOTERESET:
- m_bSizeChanged = true;
+ m_bSizeChanged = TRUE;
m_pContents->OnNotify(this, PNM_NOTERESET, 0, 0);
return;
@@ -1178,18 +1178,18 @@ void CPWL_NoteItem::OnContentsValidate()
}
}
-void CPWL_NoteItem::SetNoteFocus(bool bLast)
+void CPWL_NoteItem::SetNoteFocus(FX_BOOL bLast)
{
m_pContents->SetEditFocus(bLast);
}
-void CPWL_NoteItem::EnableModify(bool bEnabled)
+void CPWL_NoteItem::EnableModify(FX_BOOL bEnabled)
{
m_pContents->EnableModify(bEnabled);
m_bAllowModify = bEnabled;
}
-void CPWL_NoteItem::EnableRead(bool bEnabled)
+void CPWL_NoteItem::EnableRead(FX_BOOL bEnabled)
{
m_pContents->EnableRead(bEnabled);
}
@@ -1205,9 +1205,9 @@ CPWL_Note::CPWL_Note(IPopup_Note* pPopupNote, IPWL_NoteNotify* pNoteNotify, IPWL
m_pContentsBar(NULL),
m_pOptions(NULL),
m_pNoteNotify(pNoteNotify),
- m_bResizing(false),
+ m_bResizing(FALSE),
m_rcCaption(0,0,0,0),
- m_bEnalbleNotify(true),
+ m_bEnalbleNotify(TRUE),
m_pPopupNote(pPopupNote)
{
}
@@ -1221,7 +1221,7 @@ IPWL_NoteItem* CPWL_Note::Reply()
return CreateNoteItem();
}
-void CPWL_Note::EnableNotify(bool bEnabled)
+void CPWL_Note::EnableNotify(FX_BOOL bEnabled)
{
m_bEnalbleNotify = bEnabled;
}
@@ -1243,19 +1243,19 @@ void CPWL_Note::RePosChildWnd()
}
}
-bool CPWL_Note::ResetScrollBar()
+FX_BOOL CPWL_Note::ResetScrollBar()
{
- bool bScrollChanged = false;
+ FX_BOOL bScrollChanged = FALSE;
if (ScrollBarShouldVisible())
{
if (!m_pContentsBar->IsVisible())
{
- m_pContentsBar->SetVisible(true);
+ m_pContentsBar->SetVisible(TRUE);
if (m_pContentsBar->IsVisible())
{
m_pContentsBar->InvalidateRect(NULL);
- bScrollChanged = true;
+ bScrollChanged = TRUE;
}
}
}
@@ -1263,10 +1263,10 @@ bool CPWL_Note::ResetScrollBar()
{
if (m_pContentsBar->IsVisible())
{
- m_pContentsBar->SetVisible(false);
+ m_pContentsBar->SetVisible(FALSE);
m_pContentsBar->InvalidateRect(NULL);
- bScrollChanged = true;
+ bScrollChanged = TRUE;
}
}
@@ -1277,7 +1277,7 @@ bool CPWL_Note::ResetScrollBar()
rcContents.right = rcNote.right - 3.0f;
if (m_pContentsBar->IsVisible())
rcContents.right -= PWL_SCROLLBAR_WIDTH;
- m_pContents->Move(rcContents, true, true);
+ m_pContents->Move(rcContents, TRUE, TRUE);
m_pContents->SetScrollPos(CPDF_Point(0.0f,0.0f));
m_pContents->InvalidateRect(NULL);
}
@@ -1285,7 +1285,7 @@ bool CPWL_Note::ResetScrollBar()
return bScrollChanged;
}
-bool CPWL_Note::ScrollBarShouldVisible()
+FX_BOOL CPWL_Note::ScrollBarShouldVisible()
{
CPDF_Rect rcContentsFact = m_pContents->GetScrollArea();
CPDF_Rect rcContentsClient = m_pContents->GetClientRect();
@@ -1305,7 +1305,7 @@ void CPWL_Note::RePosNoteChildren()
{
if (m_bResizing) return;
- m_bResizing = true;
+ m_bResizing = TRUE;
if (IsValid())
{
@@ -1327,7 +1327,7 @@ void CPWL_Note::RePosNoteChildren()
rcIcon.right = rcIcon.left + 14.0f;
rcIcon.bottom = rcIcon.top - 14.0f;
rcIcon.Normalize();
- m_pIcon->Move(rcIcon, true, false);
+ m_pIcon->Move(rcIcon, TRUE, FALSE);
m_pIcon->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcIcon));
CPDF_Rect rcCloseBox = rcClient;
@@ -1336,7 +1336,7 @@ void CPWL_Note::RePosNoteChildren()
rcCloseBox.left = rcCloseBox.right - 14.0f;
rcCloseBox.bottom = rcCloseBox.top - 14.0f;
rcCloseBox.Normalize();
- m_pCloseBox->Move(rcCloseBox, true, false);
+ m_pCloseBox->Move(rcCloseBox, TRUE, FALSE);
m_pCloseBox->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcCloseBox));
CPDF_Rect rcDate = rcClient;
@@ -1345,7 +1345,7 @@ void CPWL_Note::RePosNoteChildren()
rcDate.top = rcClient.top - 2.0f;
rcDate.bottom = rcDate.top - m_pDateTime->GetContentRect().Height();
rcDate.Normalize();
- m_pDateTime->Move(rcDate, true, false);
+ m_pDateTime->Move(rcDate, TRUE, FALSE);
m_pDateTime->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcDate));
CPDF_Rect rcSubject = rcClient;
@@ -1354,7 +1354,7 @@ void CPWL_Note::RePosNoteChildren()
rcSubject.right = PWL_MIN(rcSubject.left + m_pSubject->GetContentRect().Width() + 1.0f, rcDate.left - 1.0f);
rcSubject.bottom = rcSubject.top - m_pSubject->GetContentRect().Height();
rcSubject.Normalize();
- m_pSubject->Move(rcSubject, true, false);
+ m_pSubject->Move(rcSubject, TRUE, FALSE);
m_pSubject->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcSubject));
CPDF_Rect rcOptions = rcClient;
@@ -1362,7 +1362,7 @@ void CPWL_Note::RePosNoteChildren()
rcOptions.top = rcSubject.bottom - 4.0f;
rcOptions.bottom = rcOptions.top - m_pOptions->GetContentRect().Height();
rcOptions.Normalize();
- m_pOptions->Move(rcOptions, true, false);
+ m_pOptions->Move(rcOptions, TRUE, FALSE);
m_pOptions->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcOptions));
CPDF_Rect rcAuthor = rcClient;
@@ -1371,21 +1371,21 @@ void CPWL_Note::RePosNoteChildren()
rcAuthor.right = PWL_MIN(rcSubject.left + m_pAuthor->GetContentRect().Width() + 1.0f, rcOptions.left - 1.0f);
rcAuthor.bottom = rcAuthor.top - m_pAuthor->GetContentRect().Height();
rcAuthor.Normalize();
- m_pAuthor->Move(rcAuthor, true, false);
+ m_pAuthor->Move(rcAuthor, TRUE, FALSE);
m_pAuthor->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcAuthor));
CPDF_Rect rcLBBox = rcClient;
rcLBBox.top = rcLBBox.bottom + 7.0f;
rcLBBox.right = rcLBBox.left + 7.0f;
rcLBBox.Normalize();
- m_pLBBox->Move(rcLBBox, true, false);
+ m_pLBBox->Move(rcLBBox, TRUE, FALSE);
m_pLBBox->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcLBBox));
CPDF_Rect rcRBBox = rcClient;
rcRBBox.top = rcRBBox.bottom + 7.0f;
rcRBBox.left = rcRBBox.right - 7.0f;
rcRBBox.Normalize();
- m_pRBBox->Move(rcRBBox, true, false);
+ m_pRBBox->Move(rcRBBox, TRUE, FALSE);
m_pRBBox->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcRBBox));
CPDF_Rect rcContents = rcClient;
@@ -1396,20 +1396,20 @@ void CPWL_Note::RePosNoteChildren()
rcContents.right -= PWL_SCROLLBAR_WIDTH;
rcContents.bottom += 14.0f;
rcContents.Normalize();
- m_pContents->Move(rcContents, false, false);
+ m_pContents->Move(rcContents, FALSE, FALSE);
m_pContents->SetVisible(CPWL_Utils::ContainsRect(rcClient, rcContents));
CPDF_Rect rcContentsBar = rcContents;
rcContentsBar.right = rcClient.right - 3.0f;
rcContentsBar.left = rcContentsBar.right - PWL_SCROLLBAR_WIDTH;
rcContentsBar.Normalize();
- m_pContentsBar->Move(rcContentsBar, true, false);
+ m_pContentsBar->Move(rcContentsBar, TRUE, FALSE);
m_rcCaption = rcClient;
m_rcCaption.bottom = rcContents.top;
}
- m_bResizing = false;
+ m_bResizing = FALSE;
}
//0-normal / 1-caption / 2-leftbottom corner / 3-rightbottom corner / 4-close / 5-options
@@ -1507,7 +1507,7 @@ void CPWL_Note::CreateChildWnd(const PWL_CREATEPARAM & cp)
scp.sBackgroundColor = CPWL_Color(COLORTYPE_RGB, 240/255.0f, 240/255.0f, 240/255.0f);
scp.dwFlags = PWS_CHILD | PWS_VISIBLE | PWS_BACKGROUND;
m_pContentsBar->Create(scp);
- m_pContentsBar->SetNotifyForever(true);
+ m_pContentsBar->SetNotifyForever(TRUE);
}
void CPWL_Note::SetSubjectName(const CFX_WideString& sName)
@@ -1538,7 +1538,7 @@ CFX_WideString CPWL_Note::GetAuthorName() const
return L"";
}
-bool CPWL_Note::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Note::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
{
CPDF_Point ptScroll = m_pContents->GetScrollPos();
CPDF_Rect rcScroll = m_pContents->GetScrollArea();
@@ -1566,11 +1566,11 @@ bool CPWL_Note::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nF
m_pContents->OnNotify(this, PNM_SCROLLWINDOW, SBT_VSCROLL, (intptr_t)&ptNew.y);
m_pContentsBar->OnNotify(this, PNM_SETSCROLLPOS, SBT_VSCROLL, (intptr_t)&ptNew.y);
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
void CPWL_Note::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
@@ -1591,7 +1591,7 @@ void CPWL_Note::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t
if (FXSYS_memcmp(&m_OldScrollInfo, &sInfo, sizeof(PWL_SCROLL_INFO)) != 0)
{
- bool bScrollChanged = false;
+ FX_BOOL bScrollChanged = FALSE;
if (lParam < 3) //·ÀÖ¹ËÀÑ­»· mantis:15759
{
@@ -1704,7 +1704,7 @@ void CPWL_Note::SetBkColor(const CPWL_Color& color)
m_pRBBox->SetTextColor(sTextColor);
}
-bool CPWL_Note::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag)
+FX_BOOL CPWL_Note::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag)
{
if (m_pOptions->WndHitTest(m_pOptions->ParentToChild(point)))
{
@@ -1717,14 +1717,14 @@ bool CPWL_Note::OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag)
KillFocus();
pNotify->OnPopupMenu(x, y);
- return true;
+ return TRUE;
}
}
return CPWL_Wnd::OnLButtonDown(point,nFlag);
}
-bool CPWL_Note::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Note::OnRButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
return CPWL_Wnd::OnRButtonUp(point,nFlag);
}
@@ -1748,12 +1748,12 @@ void CPWL_Note::SetIconType(int32_t nType)
m_pIcon->SetIconType(nType);
}
-void CPWL_Note::EnableModify(bool bEnabled)
+void CPWL_Note::EnableModify(FX_BOOL bEnabled)
{
m_pContents->EnableModify(bEnabled);
}
-void CPWL_Note::EnableRead(bool bEnabled)
+void CPWL_Note::EnableRead(FX_BOOL bEnabled)
{
m_pContents->EnableRead(bEnabled);
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp b/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
index 4287bc2753..6d61705222 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
@@ -47,7 +47,7 @@ void PWL_FLOATRANGE::Set(FX_FLOAT min,FX_FLOAT max)
}
}
-bool PWL_FLOATRANGE::In(FX_FLOAT x) const
+FX_BOOL PWL_FLOATRANGE::In(FX_FLOAT x) const
{
return (IsFloatBigger(x,fMin) || IsFloatEqual(x, fMin)) &&
(IsFloatSmaller(x, fMax) || IsFloatEqual(x, fMax));
@@ -99,14 +99,14 @@ void PWL_SCROLL_PRIVATEDATA::SetBigStep(FX_FLOAT step)
fBigStep = step;
}
-bool PWL_SCROLL_PRIVATEDATA::SetPos(FX_FLOAT pos)
+FX_BOOL PWL_SCROLL_PRIVATEDATA::SetPos(FX_FLOAT pos)
{
if (ScrollRange.In(pos))
{
fScrollPos = pos;
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void PWL_SCROLL_PRIVATEDATA::AddSmall()
@@ -140,7 +140,7 @@ CPWL_SBButton::CPWL_SBButton(PWL_SCROLLBAR_TYPE eScrollBarType,PWL_SBBUTTON_TYPE
m_eScrollBarType = eScrollBarType;
m_eSBButtonType = eButtonType;
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
}
CPWL_SBButton::~CPWL_SBButton()
@@ -359,7 +359,7 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* p
rcDraw = CPWL_Utils::DeflateRect(rectWnd,1.0f);
if (IsEnabled())
- CPWL_Utils::DrawShadow(pDevice, pUser2Device, true, false, rcDraw, nTransparancy, 80, 220);
+ CPWL_Utils::DrawShadow(pDevice, pUser2Device, TRUE, FALSE, rcDraw, nTransparancy, 80, 220);
else
CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rcDraw, ArgbEncode(255,255,255,255));
@@ -402,7 +402,7 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* p
//draw background
rcDraw = CPWL_Utils::DeflateRect(rectWnd,1.0f);
if (IsEnabled())
- CPWL_Utils::DrawShadow(pDevice, pUser2Device, true, false, rcDraw, nTransparancy, 80, 220);
+ CPWL_Utils::DrawShadow(pDevice, pUser2Device, TRUE, FALSE, rcDraw, nTransparancy, 80, 220);
else
CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rcDraw, ArgbEncode(255,255,255,255));
@@ -565,33 +565,33 @@ void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* p
}
}
-bool CPWL_SBButton::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_SBButton::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point,nFlag);
if (CPWL_Wnd * pParent = GetParentWindow())
pParent->OnNotify(this,PNM_LBUTTONDOWN,0,(intptr_t)&point);
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
SetCapture();
- return true;
+ return TRUE;
}
-bool CPWL_SBButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_SBButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point,nFlag);
if (CPWL_Wnd * pParent = GetParentWindow())
pParent->OnNotify(this,PNM_LBUTTONUP,0,(intptr_t)&point);
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
ReleaseCapture();
- return true;
+ return TRUE;
}
-bool CPWL_SBButton::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_SBButton::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnMouseMove(point,nFlag);
@@ -603,12 +603,12 @@ bool CPWL_SBButton::OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag)
if (m_bMouseDown && (m_eSBButtonType == PSBT_MIN || m_eSBButtonType == PSBT_MAX))
{
if (!pParent->OnNotify(this,PNM_LBUTTONDOWN,nFlags,(intptr_t)&point))
- return false;
+ return FALSE;
}
*/
}
- return true;
+ return TRUE;
}
/* ------------------------------- CPWL_ScrollBar ---------------------------------- */
@@ -618,9 +618,9 @@ CPWL_ScrollBar::CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType):
m_pMinButton(NULL),
m_pMaxButton(NULL),
m_pPosButton(NULL),
- m_bMouseDown(false),
- m_bMinOrMax(false),
- m_bNotifyForever(true)
+ m_bMouseDown(FALSE),
+ m_bMinOrMax(FALSE),
+ m_bNotifyForever(TRUE)
{
}
@@ -665,7 +665,7 @@ void CPWL_ScrollBar::RePosChildWnd()
rcMaxButton = CPDF_Rect(rcClient.right - fBWidth,rcClient.bottom,
rcClient.right,rcClient.top);
}
- else SetVisible(false);
+ else SetVisible(FALSE);
}
break;
case SBT_VSCROLL:
@@ -687,16 +687,16 @@ void CPWL_ScrollBar::RePosChildWnd()
rcMaxButton = CPDF_Rect(rcClient.left,rcClient.bottom,
rcClient.right,rcClient.bottom + fBWidth);
}
- else SetVisible(false);
+ else SetVisible(FALSE);
}
break;
}
if (m_pMinButton)
- m_pMinButton->Move(rcMinButton, true, false);
+ m_pMinButton->Move(rcMinButton, TRUE, FALSE);
if (m_pMaxButton)
- m_pMaxButton->Move(rcMaxButton, true, false);
- MovePosButton(false);
+ m_pMaxButton->Move(rcMaxButton, TRUE, FALSE);
+ MovePosButton(FALSE);
}
void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
@@ -708,7 +708,7 @@ void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream)
CFX_ByteTextBuf sButton;
sButton << "q\n";
- sButton << "0 w\n" << CPWL_Utils::GetColorAppStream(GetBackgroundColor(),true);
+ sButton << "0 w\n" << CPWL_Utils::GetColorAppStream(GetBackgroundColor(),TRUE);
sButton << rectWnd.left << " " << rectWnd.bottom << " "
<< rectWnd.right - rectWnd.left << " " << rectWnd.top - rectWnd.bottom << " re b Q\n";
@@ -734,7 +734,7 @@ void CPWL_ScrollBar::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix*
}
}
-bool CPWL_ScrollBar::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_ScrollBar::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonDown(point,nFlag);
@@ -777,22 +777,22 @@ bool CPWL_ScrollBar::OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag)
if (rcMinArea.Contains(point.x,point.y))
{
m_sData.SubBig();
- MovePosButton(true);
+ MovePosButton(TRUE);
NotifyScrollWindow();
}
if (rcMaxArea.Contains(point.x,point.y))
{
m_sData.AddBig();
- MovePosButton(true);
+ MovePosButton(TRUE);
NotifyScrollWindow();
}
}
- return true;
+ return TRUE;
}
-bool CPWL_ScrollBar::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_ScrollBar::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
CPWL_Wnd::OnLButtonUp(point,nFlag);
@@ -806,9 +806,9 @@ bool CPWL_ScrollBar::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
}
EndTimer();
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
- return true;
+ return TRUE;
}
void CPWL_ScrollBar::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t lParam)
@@ -922,7 +922,7 @@ void CPWL_ScrollBar::CreateButtons(const PWL_CREATEPARAM & cp)
if (!m_pPosButton)
{
m_pPosButton = new CPWL_SBButton(m_sbType,PSBT_POS);
- m_pPosButton->SetVisible(false);
+ m_pPosButton->SetVisible(FALSE);
m_pPosButton->Create(scp);
}
}
@@ -943,12 +943,12 @@ void CPWL_ScrollBar::SetScrollRange(FX_FLOAT fMin,FX_FLOAT fMax,FX_FLOAT fClient
if (IsFloatSmaller(m_sData.ScrollRange.GetWidth(), 0.0f))
{
- m_pPosButton->SetVisible(false);
+ m_pPosButton->SetVisible(FALSE);
}
else
{
- m_pPosButton->SetVisible(true);
- MovePosButton(true);
+ m_pPosButton->SetVisible(TRUE);
+ MovePosButton(TRUE);
}
}
}
@@ -960,7 +960,7 @@ void CPWL_ScrollBar::SetScrollPos(FX_FLOAT fPos)
m_sData.SetPos(fPos);
if (!IsFloatEqual(m_sData.fScrollPos, fOldPos))
- MovePosButton(true);
+ MovePosButton(TRUE);
}
void CPWL_ScrollBar::SetScrollStep(FX_FLOAT fBigStep,FX_FLOAT fSmallStep)
@@ -969,7 +969,7 @@ void CPWL_ScrollBar::SetScrollStep(FX_FLOAT fBigStep,FX_FLOAT fSmallStep)
m_sData.SetSmallStep(fSmallStep);
}
-void CPWL_ScrollBar::MovePosButton(bool bRefresh)
+void CPWL_ScrollBar::MovePosButton(FX_BOOL bRefresh)
{
ASSERT (m_pPosButton != NULL);
ASSERT (m_pMinButton != NULL);
@@ -1031,17 +1031,17 @@ void CPWL_ScrollBar::MovePosButton(bool bRefresh)
break;
}
- m_pPosButton->Move(rcPosButton,true,bRefresh);
+ m_pPosButton->Move(rcPosButton,TRUE,bRefresh);
}
}
void CPWL_ScrollBar::OnMinButtonLBDown(const CPDF_Point & point)
{
m_sData.SubSmall();
- MovePosButton(true);
+ MovePosButton(TRUE);
NotifyScrollWindow();
- m_bMinOrMax = true;
+ m_bMinOrMax = TRUE;
EndTimer();
BeginTimer(100);
@@ -1058,10 +1058,10 @@ void CPWL_ScrollBar::OnMinButtonMouseMove(const CPDF_Point & point)
void CPWL_ScrollBar::OnMaxButtonLBDown(const CPDF_Point & point)
{
m_sData.AddSmall();
- MovePosButton(true);
+ MovePosButton(TRUE);
NotifyScrollWindow();
- m_bMinOrMax = false;
+ m_bMinOrMax = FALSE;
EndTimer();
BeginTimer(100);
@@ -1077,7 +1077,7 @@ void CPWL_ScrollBar::OnMaxButtonMouseMove(const CPDF_Point & point)
void CPWL_ScrollBar::OnPosButtonLBDown(const CPDF_Point & point)
{
- m_bMouseDown = true;
+ m_bMouseDown = TRUE;
if (m_pPosButton)
{
@@ -1104,7 +1104,7 @@ void CPWL_ScrollBar::OnPosButtonLBUp(const CPDF_Point & point)
if (!m_bNotifyForever)
NotifyScrollWindow();
}
- m_bMouseDown = false;
+ m_bMouseDown = FALSE;
}
void CPWL_ScrollBar::OnPosButtonMouseMove(const CPDF_Point & point)
@@ -1163,7 +1163,7 @@ void CPWL_ScrollBar::OnPosButtonMouseMove(const CPDF_Point & point)
if (!IsFloatEqual(fOldScrollPos, m_sData.fScrollPos))
{
- MovePosButton(true);
+ MovePosButton(TRUE);
if (m_bNotifyForever)
NotifyScrollWindow();
@@ -1297,7 +1297,7 @@ void CPWL_ScrollBar::TimerProc()
if (FXSYS_memcmp(&m_sData, &sTemp, sizeof(PWL_SCROLL_PRIVATEDATA)) != 0)
{
- MovePosButton(true);
+ MovePosButton(TRUE);
NotifyScrollWindow();
}
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
index 23be71a29d..76b2bd333a 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
@@ -70,9 +70,9 @@ CPWL_Signature::CPWL_Signature() :
m_pText(NULL),
m_pDescription(NULL),
m_pImage(NULL),
- m_bTextExist(true),
- m_bImageExist(false),
- m_bFlagExist(true)
+ m_bTextExist(TRUE),
+ m_bImageExist(FALSE),
+ m_bFlagExist(TRUE)
{
}
@@ -80,21 +80,21 @@ CPWL_Signature::~CPWL_Signature()
{
}
-void CPWL_Signature::SetTextFlag(bool bTextExist)
+void CPWL_Signature::SetTextFlag(FX_BOOL bTextExist)
{
m_bTextExist = bTextExist;
RePosChildWnd();
}
-void CPWL_Signature::SetImageFlag(bool bImageExist)
+void CPWL_Signature::SetImageFlag(FX_BOOL bImageExist)
{
m_bImageExist = bImageExist;
RePosChildWnd();
}
-void CPWL_Signature::SetFoxitFlag(bool bFlagExist)
+void CPWL_Signature::SetFoxitFlag(FX_BOOL bFlagExist)
{
m_bFlagExist = bFlagExist;
}
@@ -135,7 +135,7 @@ void CPWL_Signature::RePosChildWnd()
CPDF_Rect rcText = rcClient;
CPDF_Rect rcDescription = rcClient;
- bool bTextVisible = m_bTextExist && m_pText->GetText().GetLength() > 0;
+ FX_BOOL bTextVisible = m_bTextExist && m_pText->GetText().GetLength() > 0;
if ((bTextVisible || m_bImageExist) &&
m_pDescription->GetText().GetLength() > 0)
@@ -155,9 +155,9 @@ void CPWL_Signature::RePosChildWnd()
m_pText->SetVisible(bTextVisible);
m_pImage->SetVisible(m_bImageExist);
- m_pText->Move(rcText, true, false);
- m_pImage->Move(rcText, true, false);
- m_pDescription->Move(rcDescription, true, false);
+ m_pText->Move(rcText, TRUE, FALSE);
+ m_pImage->Move(rcText, TRUE, FALSE);
+ m_pDescription->Move(rcDescription, TRUE, FALSE);
}
void CPWL_Signature::CreateChildWnd(const PWL_CREATEPARAM & cp)
diff --git a/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp b/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
index 7bb38c4bfe..90fa8f880d 100644
--- a/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
@@ -32,7 +32,7 @@ CPDF_Rect CPWL_PushButton::GetFocusRect() const
/* --------------------------- CPWL_CheckBox ---------------------------- */
-CPWL_CheckBox::CPWL_CheckBox() : m_bChecked(false)
+CPWL_CheckBox::CPWL_CheckBox() : m_bChecked(FALSE)
{
}
@@ -45,33 +45,33 @@ CFX_ByteString CPWL_CheckBox::GetClassName() const
return "CPWL_CheckBox";
}
-void CPWL_CheckBox::SetCheck(bool bCheck)
+void CPWL_CheckBox::SetCheck(FX_BOOL bCheck)
{
m_bChecked = bCheck;
}
-bool CPWL_CheckBox::IsChecked() const
+FX_BOOL CPWL_CheckBox::IsChecked() const
{
return m_bChecked;
}
-bool CPWL_CheckBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_CheckBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
- if (IsReadOnly()) return false;
+ if (IsReadOnly()) return FALSE;
SetCheck(!IsChecked());
- return true;
+ return TRUE;
}
-bool CPWL_CheckBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_CheckBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
SetCheck(!IsChecked());
- return true;
+ return TRUE;
}
/* --------------------------- CPWL_RadioButton ---------------------------- */
-CPWL_RadioButton::CPWL_RadioButton() : m_bChecked(false)
+CPWL_RadioButton::CPWL_RadioButton() : m_bChecked(FALSE)
{
}
@@ -84,27 +84,27 @@ CFX_ByteString CPWL_RadioButton::GetClassName() const
return "CPWL_RadioButton";
}
-bool CPWL_RadioButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_RadioButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
- if (IsReadOnly()) return false;
+ if (IsReadOnly()) return FALSE;
- SetCheck(true);
- return true;
+ SetCheck(TRUE);
+ return TRUE;
}
-void CPWL_RadioButton::SetCheck(bool bCheck)
+void CPWL_RadioButton::SetCheck(FX_BOOL bCheck)
{
m_bChecked = bCheck;
}
-bool CPWL_RadioButton::IsChecked() const
+FX_BOOL CPWL_RadioButton::IsChecked() const
{
return m_bChecked;
}
-bool CPWL_RadioButton::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+FX_BOOL CPWL_RadioButton::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
- SetCheck(true);
- return true;
+ SetCheck(TRUE);
+ return TRUE;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Utils.cpp b/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
index 4e4ac94238..b9ba7661af 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Utils.cpp
@@ -87,13 +87,13 @@ CPDF_Rect CPWL_Utils::OffsetRect(const CPDF_Rect & rect,FX_FLOAT x,FX_FLOAT y)
rect.right + x,rect.top + y);
}
-bool CPWL_Utils::ContainsRect(const CPDF_Rect& rcParent, const CPDF_Rect& rcChild)
+FX_BOOL CPWL_Utils::ContainsRect(const CPDF_Rect& rcParent, const CPDF_Rect& rcChild)
{
return rcChild.left >= rcParent.left && rcChild.bottom >= rcParent.bottom &&
rcChild.right <= rcParent.right && rcChild.top <= rcParent.top;
}
-bool CPWL_Utils::IntersectRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2)
+FX_BOOL CPWL_Utils::IntersectRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2)
{
FX_FLOAT left = rect1.left > rect2.left ? rect1.left : rect2.left;
FX_FLOAT right = rect1.right < rect2.right ? rect1.right : rect2.right;
@@ -420,7 +420,7 @@ CFX_ByteString CPWL_Utils::GetRectFillAppStream(const CPDF_Rect & rect,const CPW
{
CFX_ByteTextBuf sAppStream;
- CFX_ByteString sColor = GetColorAppStream(color,true);
+ CFX_ByteString sColor = GetColorAppStream(color,TRUE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << sColor;
@@ -435,7 +435,7 @@ CFX_ByteString CPWL_Utils::GetCircleFillAppStream(const CPDF_Rect & rect,const C
{
CFX_ByteTextBuf sAppStream;
- CFX_ByteString sColor = GetColorAppStream(color,true);
+ CFX_ByteString sColor = GetColorAppStream(color,TRUE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << sColor << CPWL_Utils::GetAP_Circle(rect) << "f\nQ\n";
@@ -458,7 +458,7 @@ CPDF_Rect CPWL_Utils::GetCenterSquare(const CPDF_Rect & rect)
}
CFX_ByteString CPWL_Utils::GetEditAppStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange * pRange,
- bool bContinuous, FX_WORD SubWord)
+ FX_BOOL bContinuous, FX_WORD SubWord)
{
return IFX_Edit::GetEditAppearanceStream(pEdit,ptOffset,pRange,bContinuous,SubWord);
}
@@ -498,7 +498,7 @@ static CFX_ByteString GetWordSpellCheckAppearanceStream(IFX_Edit_Iterator* pIter
FX_FLOAT fY = 0.0f;
FX_FLOAT fStep = 0.0f;
- bool bBreak = false;
+ FX_BOOL bBreak = FALSE;
if (pIterator)
{
@@ -538,7 +538,7 @@ static CFX_ByteString GetWordSpellCheckAppearanceStream(IFX_Edit_Iterator* pIter
fEndX = word.ptWord.x + word.fWidth;
}
- bBreak = true;
+ bBreak = TRUE;
}
else
{
@@ -569,7 +569,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
{
pIterator->SetAt(pRange->BeginPos);
- bool bLatinWord = false;
+ FX_BOOL bLatinWord = FALSE;
CPVT_WordPlace wpWordStart;
CFX_ByteString sWord;
@@ -587,7 +587,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
if (!bLatinWord)
{
wpWordStart = place;
- bLatinWord = true;
+ bLatinWord = TRUE;
}
sWord += (char)word.Word;
@@ -602,7 +602,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
sRet << GetWordSpellCheckAppearanceStream(pIterator,ptOffset,CPVT_WordRange(wpWordStart,oldplace));
pIterator->SetAt(place);
}
- bLatinWord = false;
+ bLatinWord = FALSE;
}
sWord.Empty();
@@ -614,7 +614,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
{
if (!pSpellCheck->CheckWord(sWord))
sRet << GetWordSpellCheckAppearanceStream(pIterator,ptOffset,CPVT_WordRange(wpWordStart,oldplace));
- bLatinWord = false;
+ bLatinWord = FALSE;
sWord.Empty();
}
}
@@ -625,7 +625,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
if (!pSpellCheck->CheckWord(sWord))
sRet << GetWordSpellCheckAppearanceStream(pIterator,ptOffset,CPVT_WordRange(wpWordStart,oldplace));
- bLatinWord = false;
+ bLatinWord = FALSE;
sWord.Empty();
}
}
@@ -636,7 +636,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream(IFX_Edit* pEdit, IPWL_SpellChe
CFX_ByteString CPWL_Utils::GetTextAppStream(const CPDF_Rect & rcBBox,IFX_Edit_FontMap * pFontMap,
const CFX_WideString & sText, int32_t nAlignmentH, int32_t nAlignmentV,
- FX_FLOAT fFontSize, bool bMultiLine, bool bAutoReturn, const CPWL_Color & crText)
+ FX_FLOAT fFontSize, FX_BOOL bMultiLine, FX_BOOL bAutoReturn, const CPWL_Color & crText)
{
CFX_ByteTextBuf sRet;
@@ -649,7 +649,7 @@ CFX_ByteString CPWL_Utils::GetTextAppStream(const CPDF_Rect & rcBBox,IFX_Edit_Fo
pEdit->SetMultiLine(bMultiLine);
pEdit->SetAutoReturn(bAutoReturn);
if (IsFloatZero(fFontSize))
- pEdit->SetAutoFontSize(true);
+ pEdit->SetAutoFontSize(TRUE);
else
pEdit->SetFontSize(fFontSize);
@@ -683,10 +683,10 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CPDF_Rect & rcBBox,
pEdit->SetFontMap(pFontMap);
pEdit->SetAlignmentH(1);
pEdit->SetAlignmentV(1);
- pEdit->SetMultiLine(false);
- pEdit->SetAutoReturn(false);
+ pEdit->SetMultiLine(FALSE);
+ pEdit->SetAutoReturn(FALSE);
if (IsFloatZero(fFontSize))
- pEdit->SetAutoFontSize(true);
+ pEdit->SetAutoFontSize(TRUE);
else
pEdit->SetFontSize(fFontSize);
@@ -892,7 +892,7 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CPDF_Rect & rcBBox,
if (!rcIcon.IsEmpty())
{
- Icon.Move(rcIcon, false, false);
+ Icon.Move(rcIcon, FALSE, FALSE);
sTemp << Icon.GetImageAppStream();
}
@@ -923,7 +923,7 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CPDF_Rect & rcBBox,
return "";
}
-CFX_ByteString CPWL_Utils::GetColorAppStream(const CPWL_Color & color,const bool & bFillOrStroke)
+CFX_ByteString CPWL_Utils::GetColorAppStream(const CPWL_Color & color,const FX_BOOL & bFillOrStroke)
{
CFX_ByteTextBuf sColorStream;
@@ -967,7 +967,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
{
default:
case PBS_SOLID:
- sColor = CPWL_Utils::GetColorAppStream(color,true);
+ sColor = CPWL_Utils::GetColorAppStream(color,TRUE);
if (sColor.GetLength() > 0)
{
sAppStream << sColor;
@@ -978,7 +978,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
}
break;
case PBS_DASH:
- sColor = CPWL_Utils::GetColorAppStream(color,false);
+ sColor = CPWL_Utils::GetColorAppStream(color,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << sColor;
@@ -992,7 +992,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
break;
case PBS_BEVELED:
case PBS_INSET:
- sColor = CPWL_Utils::GetColorAppStream(crLeftTop,true);
+ sColor = CPWL_Utils::GetColorAppStream(crLeftTop,TRUE);
if (sColor.GetLength() > 0)
{
sAppStream << sColor;
@@ -1004,7 +1004,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
sAppStream << fLeft + fHalfWidth * 2 << " " << fBottom + fHalfWidth * 2 << " l f\n";
}
- sColor = CPWL_Utils::GetColorAppStream(crRightBottom,true);
+ sColor = CPWL_Utils::GetColorAppStream(crRightBottom,TRUE);
if (sColor.GetLength() > 0)
{
sAppStream << sColor;
@@ -1016,7 +1016,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
sAppStream << fRight - fHalfWidth * 2 << " " << fTop - fHalfWidth * 2 << " l f\n";
}
- sColor = CPWL_Utils::GetColorAppStream(color,true);
+ sColor = CPWL_Utils::GetColorAppStream(color,TRUE);
if (sColor.GetLength() > 0)
{
sAppStream << sColor;
@@ -1026,7 +1026,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CPDF_Rect & rect, FX_FLOAT f
}
break;
case PBS_UNDERLINED:
- sColor = CPWL_Utils::GetColorAppStream(color,false);
+ sColor = CPWL_Utils::GetColorAppStream(color,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << sColor;
@@ -1065,7 +1065,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
case PBS_SOLID:
case PBS_UNDERLINED:
{
- sColor = CPWL_Utils::GetColorAppStream(color,false);
+ sColor = CPWL_Utils::GetColorAppStream(color,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fWidth << " w\n" << sColor
@@ -1076,7 +1076,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
break;
case PBS_DASH:
{
- sColor = CPWL_Utils::GetColorAppStream(color,false);
+ sColor = CPWL_Utils::GetColorAppStream(color,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fWidth << " w\n"
@@ -1090,7 +1090,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
{
FX_FLOAT fHalfWidth = fWidth / 2.0f;
- sColor = CPWL_Utils::GetColorAppStream(color,false);
+ sColor = CPWL_Utils::GetColorAppStream(color,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fHalfWidth << " w\n"
@@ -1098,7 +1098,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
<< " S\nQ\n";
}
- sColor = CPWL_Utils::GetColorAppStream(crLeftTop,false);
+ sColor = CPWL_Utils::GetColorAppStream(crLeftTop,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fHalfWidth << " w\n"
@@ -1106,7 +1106,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
<< " S\nQ\n";
}
- sColor = CPWL_Utils::GetColorAppStream(crRightBottom,false);
+ sColor = CPWL_Utils::GetColorAppStream(crRightBottom,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fHalfWidth << " w\n"
@@ -1119,7 +1119,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
{
FX_FLOAT fHalfWidth = fWidth / 2.0f;
- sColor = CPWL_Utils::GetColorAppStream(color,false);
+ sColor = CPWL_Utils::GetColorAppStream(color,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fHalfWidth << " w\n"
@@ -1127,7 +1127,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
<< " S\nQ\n";
}
- sColor = CPWL_Utils::GetColorAppStream(crLeftTop,false);
+ sColor = CPWL_Utils::GetColorAppStream(crLeftTop,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fHalfWidth << " w\n"
@@ -1135,7 +1135,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream(const CPDF_Rect & rect, FX_F
<< " S\nQ\n";
}
- sColor = CPWL_Utils::GetColorAppStream(crRightBottom,false);
+ sColor = CPWL_Utils::GetColorAppStream(crRightBottom,FALSE);
if (sColor.GetLength() > 0)
{
sAppStream << "q\n" << fHalfWidth << " w\n"
@@ -1208,42 +1208,42 @@ CPWL_Color CPWL_Utils::DevideColor(const CPWL_Color & sColor,FX_FLOAT fColorDevi
CFX_ByteString CPWL_Utils::GetAppStream_Check(const CPDF_Rect & rcBBox, const CPWL_Color & crText)
{
CFX_ByteTextBuf sAP;
- sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,true) << CPWL_Utils::GetAP_Check(rcBBox) << "f\nQ\n";
+ sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,TRUE) << CPWL_Utils::GetAP_Check(rcBBox) << "f\nQ\n";
return sAP.GetByteString();
}
CFX_ByteString CPWL_Utils::GetAppStream_Circle(const CPDF_Rect & rcBBox, const CPWL_Color & crText)
{
CFX_ByteTextBuf sAP;
- sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,true) << CPWL_Utils::GetAP_Circle(rcBBox) << "f\nQ\n";
+ sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,TRUE) << CPWL_Utils::GetAP_Circle(rcBBox) << "f\nQ\n";
return sAP.GetByteString();
}
CFX_ByteString CPWL_Utils::GetAppStream_Cross(const CPDF_Rect & rcBBox, const CPWL_Color & crText)
{
CFX_ByteTextBuf sAP;
- sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,false) << CPWL_Utils::GetAP_Cross(rcBBox) << "S\nQ\n";
+ sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,FALSE) << CPWL_Utils::GetAP_Cross(rcBBox) << "S\nQ\n";
return sAP.GetByteString();
}
CFX_ByteString CPWL_Utils::GetAppStream_Diamond(const CPDF_Rect & rcBBox, const CPWL_Color & crText)
{
CFX_ByteTextBuf sAP;
- sAP << "q\n1 w\n" << CPWL_Utils::GetColorAppStream(crText,true) << CPWL_Utils::GetAP_Diamond(rcBBox) << "f\nQ\n";
+ sAP << "q\n1 w\n" << CPWL_Utils::GetColorAppStream(crText,TRUE) << CPWL_Utils::GetAP_Diamond(rcBBox) << "f\nQ\n";
return sAP.GetByteString();
}
CFX_ByteString CPWL_Utils::GetAppStream_Square(const CPDF_Rect & rcBBox, const CPWL_Color & crText)
{
CFX_ByteTextBuf sAP;
- sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,true) << CPWL_Utils::GetAP_Square(rcBBox) << "f\nQ\n";
+ sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,TRUE) << CPWL_Utils::GetAP_Square(rcBBox) << "f\nQ\n";
return sAP.GetByteString();
}
CFX_ByteString CPWL_Utils::GetAppStream_Star(const CPDF_Rect & rcBBox, const CPWL_Color & crText)
{
CFX_ByteTextBuf sAP;
- sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,true) << CPWL_Utils::GetAP_Star(rcBBox) << "f\nQ\n";
+ sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText,TRUE) << CPWL_Utils::GetAP_Star(rcBBox) << "f\nQ\n";
return sAP.GetByteString();
}
@@ -1299,7 +1299,7 @@ CFX_ByteString CPWL_Utils::GetDropButtonAppStream(const CPDF_Rect & rcBBox)
if (!rcBBox.IsEmpty())
{
- sAppStream << "q\n" << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_RGB,220.0f/255.0f,220.0f/255.0f,220.0f/255.0f),true);
+ sAppStream << "q\n" << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_RGB,220.0f/255.0f,220.0f/255.0f,220.0f/255.0f),TRUE);
sAppStream << rcBBox.left << " " << rcBBox.bottom << " "
<< rcBBox.right - rcBBox.left << " " << rcBBox.top - rcBBox.bottom << " re f\n";
sAppStream << "Q\n";
@@ -1474,7 +1474,7 @@ void CPWL_Utils::DrawFillRect(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Devi
}
void CPWL_Utils::DrawShadow(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
- bool bVertical, bool bHorizontal, CPDF_Rect rect,
+ FX_BOOL bVertical, FX_BOOL bHorizontal, CPDF_Rect rect,
int32_t nTransparancy, int32_t nStartGray, int32_t nEndGray)
{
FX_FLOAT fStepGray = 1.0f;
@@ -1638,7 +1638,7 @@ static void AddSpellCheckObj(CFX_PathData & PathData, IFX_Edit* pEdit, const CPV
FX_FLOAT fY = 0.0f;
FX_FLOAT fStep = 0.0f;
- bool bBreak = false;
+ FX_BOOL bBreak = FALSE;
if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator())
{
@@ -1678,7 +1678,7 @@ static void AddSpellCheckObj(CFX_PathData & PathData, IFX_Edit* pEdit, const CPV
fEndX = word.ptWord.x + word.fWidth;
}
- bBreak = true;
+ bBreak = TRUE;
}
else
{
@@ -1700,7 +1700,7 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUse
const FX_COLORREF crSpell = ArgbEncode(255,255,0,0);
//for spellcheck
- bool bLatinWord = false;
+ FX_BOOL bLatinWord = FALSE;
CPVT_WordPlace wpWordStart;
CFX_ByteString sLatinWord;
@@ -1744,7 +1744,7 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUse
if (!bLatinWord)
{
wpWordStart = place;
- bLatinWord = true;
+ bLatinWord = TRUE;
}
sLatinWord += (char)word.Word;
@@ -1761,7 +1761,7 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUse
pIterator->SetAt(place);
}
}
- bLatinWord = false;
+ bLatinWord = FALSE;
}
sLatinWord.Empty();
@@ -1781,7 +1781,7 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUse
pIterator->SetAt(place);
}
}
- bLatinWord = false;
+ bLatinWord = FALSE;
}
sLatinWord.Empty();
@@ -1806,12 +1806,12 @@ void CPWL_Utils::DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUse
pDevice->RestoreState();
}
-bool CPWL_Utils::IsBlackOrWhite(const CPWL_Color& color)
+FX_BOOL CPWL_Utils::IsBlackOrWhite(const CPWL_Color& color)
{
switch (color.nColorType)
{
case COLORTYPE_TRANSPARENT:
- return false;
+ return FALSE;
case COLORTYPE_GRAY:
return color.fColor1 < 0.5f;
case COLORTYPE_RGB:
@@ -1820,7 +1820,7 @@ bool CPWL_Utils::IsBlackOrWhite(const CPWL_Color& color)
return color.fColor1 + color.fColor2 + color.fColor3 + color.fColor4 > 2.0f;
}
- return true;
+ return TRUE;
}
CPWL_Color CPWL_Utils::GetReverseColor(const CPWL_Color& color)
@@ -1851,8 +1851,8 @@ CPWL_Color CPWL_Utils::GetReverseColor(const CPWL_Color& color)
CFX_ByteString CPWL_Utils::GetIconAppStream(int32_t nType, const CPDF_Rect& rect, const CPWL_Color& crFill,
const CPWL_Color& crStroke)
{
- CFX_ByteString sAppStream = CPWL_Utils::GetColorAppStream(crStroke, false);
- sAppStream += CPWL_Utils::GetColorAppStream(crFill, true);
+ CFX_ByteString sAppStream = CPWL_Utils::GetColorAppStream(crStroke, FALSE);
+ sAppStream += CPWL_Utils::GetColorAppStream(crFill, TRUE);
CFX_ByteString sPath;
CFX_PathData path;
diff --git a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
index f214fb30a2..433b3c6846 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
@@ -123,40 +123,40 @@ public:
m_pMainKeyboardWnd = NULL;
}
- bool IsWndCreated(const CPWL_Wnd * pWnd) const
+ FX_BOOL IsWndCreated(const CPWL_Wnd * pWnd) const
{
return m_pCreatedWnd == pWnd;
}
- bool IsMainCaptureMouse(const CPWL_Wnd * pWnd) const
+ FX_BOOL IsMainCaptureMouse(const CPWL_Wnd * pWnd) const
{
return pWnd == m_pMainMouseWnd;
}
- bool IsWndCaptureMouse(const CPWL_Wnd * pWnd) const
+ FX_BOOL IsWndCaptureMouse(const CPWL_Wnd * pWnd) const
{
if (pWnd)
for( int32_t i=0,sz=m_aMousePath.GetSize(); i<sz; i++)
if (m_aMousePath.GetAt(i) == pWnd)
- return true;
+ return TRUE;
- return false;
+ return FALSE;
}
- bool IsMainCaptureKeyboard(const CPWL_Wnd * pWnd) const
+ FX_BOOL IsMainCaptureKeyboard(const CPWL_Wnd * pWnd) const
{
return pWnd == m_pMainKeyboardWnd;
}
- bool IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const
+ FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const
{
if (pWnd)
for( int32_t i=0,sz=m_aKeyboardPath.GetSize(); i<sz; i++)
if (m_aKeyboardPath.GetAt(i) == pWnd)
- return true;
+ return TRUE;
- return false;
+ return FALSE;
}
void SetFocus(CPWL_Wnd * pWnd)
@@ -225,16 +225,16 @@ CPWL_Wnd::CPWL_Wnd() :
m_pVScrollBar(NULL),
m_rcWindow(),
m_rcClip(),
- m_bCreated(false),
- m_bVisible(false),
- m_bNotifying(false),
- m_bEnabled(true)
+ m_bCreated(FALSE),
+ m_bVisible(FALSE),
+ m_bNotifying(FALSE),
+ m_bEnabled(TRUE)
{
}
CPWL_Wnd::~CPWL_Wnd()
{
- ASSERT(m_bCreated == false);
+ ASSERT(m_bCreated == FALSE);
}
CFX_ByteString CPWL_Wnd::GetClassName() const
@@ -272,7 +272,7 @@ void CPWL_Wnd::Create(const PWL_CREATEPARAM & cp)
OnCreated();
RePosChildWnd();
- m_bCreated = true;
+ m_bCreated = TRUE;
}
}
@@ -308,7 +308,7 @@ void CPWL_Wnd::Destroy()
if (m_sPrivateParam.pParentWnd)
m_sPrivateParam.pParentWnd->OnNotify(this, PNM_REMOVECHILD);
- m_bCreated = false;
+ m_bCreated = FALSE;
}
DestroyMsgControl();
@@ -318,7 +318,7 @@ void CPWL_Wnd::Destroy()
m_pVScrollBar = NULL;
}
-void CPWL_Wnd::Move(const CPDF_Rect & rcNew, bool bReset,bool bRefresh)
+void CPWL_Wnd::Move(const CPDF_Rect & rcNew, FX_BOOL bReset,FX_BOOL bRefresh)
{
if (IsValid())
{
@@ -494,7 +494,7 @@ void CPWL_Wnd::InvalidateRect(CPDF_Rect* pRect)
}
#define PWL_IMPLEMENT_KEY_METHOD(key_method_name)\
-bool CPWL_Wnd::key_method_name(FX_WORD nChar, FX_DWORD nFlag)\
+FX_BOOL CPWL_Wnd::key_method_name(FX_WORD nChar, FX_DWORD nFlag)\
{\
if (IsValid() && IsVisible() && IsEnabled())\
{\
@@ -512,11 +512,11 @@ bool CPWL_Wnd::key_method_name(FX_WORD nChar, FX_DWORD nFlag)\
}\
}\
}\
- return false;\
+ return FALSE;\
}
#define PWL_IMPLEMENT_MOUSE_METHOD(mouse_method_name)\
-bool CPWL_Wnd::mouse_method_name(const CPDF_Point & point, FX_DWORD nFlag)\
+FX_BOOL CPWL_Wnd::mouse_method_name(const CPDF_Point & point, FX_DWORD nFlag)\
{\
if (IsValid() && IsVisible() && IsEnabled())\
{\
@@ -550,7 +550,7 @@ bool CPWL_Wnd::mouse_method_name(const CPDF_Point & point, FX_DWORD nFlag)\
SetCursor();\
}\
}\
- return false;\
+ return FALSE;\
}
PWL_IMPLEMENT_KEY_METHOD(OnKeyDown)
@@ -567,7 +567,7 @@ PWL_IMPLEMENT_MOUSE_METHOD(OnRButtonDown)
PWL_IMPLEMENT_MOUSE_METHOD(OnRButtonUp)
PWL_IMPLEMENT_MOUSE_METHOD(OnMouseMove)
-bool CPWL_Wnd::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
+FX_BOOL CPWL_Wnd::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFlag)
{
if (IsValid() && IsVisible() && IsEnabled())
{
@@ -586,7 +586,7 @@ bool CPWL_Wnd::OnMouseWheel(short zDelta, const CPDF_Point & point, FX_DWORD nFl
}
}
}
- return false;
+ return FALSE;
}
void CPWL_Wnd::AddChild(CPWL_Wnd * pWnd)
@@ -624,7 +624,7 @@ void CPWL_Wnd::OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam, intptr_t
}
}
-bool CPWL_Wnd::IsValid() const
+FX_BOOL CPWL_Wnd::IsValid() const
{
return m_bCreated;
}
@@ -677,7 +677,7 @@ CPDF_Rect CPWL_Wnd::GetWindowCenterSquare() const
return CPWL_Utils::GetCenterSquare(CPWL_Utils::DeflateRect(GetWindowRect(),0.1f));
}
-bool CPWL_Wnd::HasFlag(FX_DWORD dwFlags) const
+FX_BOOL CPWL_Wnd::HasFlag(FX_DWORD dwFlags) const
{
return (m_sPrivateParam.dwFlags & dwFlags) != 0;
}
@@ -865,12 +865,12 @@ void CPWL_Wnd::OnKillFocus()
{
}
-bool CPWL_Wnd::WndHitTest(const CPDF_Point & point) const
+FX_BOOL CPWL_Wnd::WndHitTest(const CPDF_Point & point) const
{
return IsValid() && IsVisible() && GetWindowRect().Contains(point.x,point.y);
}
-bool CPWL_Wnd::ClientHitTest(const CPDF_Point & point) const
+FX_BOOL CPWL_Wnd::ClientHitTest(const CPDF_Point & point) const
{
return IsValid() && IsVisible() && GetClientRect().Contains(point.x,point.y);
}
@@ -883,7 +883,7 @@ const CPWL_Wnd* CPWL_Wnd::GetRootWnd() const
return this;
}
-void CPWL_Wnd::SetVisible(bool bVisible)
+void CPWL_Wnd::SetVisible(FX_BOOL bVisible)
{
if (IsValid())
{
@@ -915,7 +915,7 @@ CPDF_Rect CPWL_Wnd::GetClipRect() const
return m_rcClip;
}
-bool CPWL_Wnd::IsReadOnly() const
+FX_BOOL CPWL_Wnd::IsReadOnly() const
{
return HasFlag(PWS_READONLY);
}
@@ -931,7 +931,7 @@ void CPWL_Wnd::RePosChildWnd()
rcContent.right-1.0f,
rcContent.top);
- if (pVSB) pVSB->Move(rcVScroll,true,false);
+ if (pVSB) pVSB->Move(rcVScroll,TRUE,FALSE);
}
void CPWL_Wnd::CreateChildWnd(const PWL_CREATEPARAM & cp)
@@ -968,33 +968,33 @@ CPWL_MsgControl* CPWL_Wnd::GetMsgControl() const
return m_sPrivateParam.pMsgControl;
}
-bool CPWL_Wnd::IsCaptureMouse() const
+FX_BOOL CPWL_Wnd::IsCaptureMouse() const
{
return IsWndCaptureMouse(this);
}
-bool CPWL_Wnd::IsWndCaptureMouse(const CPWL_Wnd * pWnd) const
+FX_BOOL CPWL_Wnd::IsWndCaptureMouse(const CPWL_Wnd * pWnd) const
{
if (CPWL_MsgControl * pCtrl = GetMsgControl())
return pCtrl->IsWndCaptureMouse(pWnd);
- return false;
+ return FALSE;
}
-bool CPWL_Wnd::IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const
+FX_BOOL CPWL_Wnd::IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const
{
if (CPWL_MsgControl * pCtrl = GetMsgControl())
return pCtrl->IsWndCaptureKeyboard(pWnd);
- return false;
+ return FALSE;
}
-bool CPWL_Wnd::IsFocused() const
+FX_BOOL CPWL_Wnd::IsFocused() const
{
if (CPWL_MsgControl * pCtrl = GetMsgControl())
return pCtrl->IsMainCaptureKeyboard(this);
- return false;
+ return FALSE;
}
CPDF_Rect CPWL_Wnd::GetFocusRect() const
@@ -1217,7 +1217,7 @@ const CPWL_Wnd* CPWL_Wnd::GetFocused() const
return NULL;
}
-void CPWL_Wnd::EnableWindow(bool bEnable)
+void CPWL_Wnd::EnableWindow(FX_BOOL bEnable)
{
if (m_bEnabled != bEnable)
{
@@ -1238,7 +1238,7 @@ void CPWL_Wnd::EnableWindow(bool bEnable)
}
}
-bool CPWL_Wnd::IsEnabled()
+FX_BOOL CPWL_Wnd::IsEnabled()
{
return m_bEnabled;
}
@@ -1251,42 +1251,42 @@ void CPWL_Wnd::OnDisabled()
{
}
-bool CPWL_Wnd::IsCTRLpressed(FX_DWORD nFlag) const
+FX_BOOL CPWL_Wnd::IsCTRLpressed(FX_DWORD nFlag) const
{
if (IFX_SystemHandler* pSystemHandler = GetSystemHandler())
{
return pSystemHandler->IsCTRLKeyDown(nFlag);
}
- return false;
+ return FALSE;
}
-bool CPWL_Wnd::IsSHIFTpressed(FX_DWORD nFlag) const
+FX_BOOL CPWL_Wnd::IsSHIFTpressed(FX_DWORD nFlag) const
{
if (IFX_SystemHandler* pSystemHandler = GetSystemHandler())
{
return pSystemHandler->IsSHIFTKeyDown(nFlag);
}
- return false;
+ return FALSE;
}
-bool CPWL_Wnd::IsALTpressed(FX_DWORD nFlag) const
+FX_BOOL CPWL_Wnd::IsALTpressed(FX_DWORD nFlag) const
{
if (IFX_SystemHandler* pSystemHandler = GetSystemHandler())
{
return pSystemHandler->IsALTKeyDown(nFlag);
}
- return false;
+ return FALSE;
}
-bool CPWL_Wnd::IsINSERTpressed(FX_DWORD nFlag) const
+FX_BOOL CPWL_Wnd::IsINSERTpressed(FX_DWORD nFlag) const
{
if (IFX_SystemHandler* pSystemHandler = GetSystemHandler())
{
return pSystemHandler->IsINSERTKeyDown(nFlag);
}
- return false;
+ return FALSE;
}