summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/fsdk_baseform.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-23 13:26:26 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-23 13:26:26 -0700
commit320b2313d19869333ed453af546e61a9fc2b81c9 (patch)
tree25f2eb8a0991ac485ca6354f0d3caf7fd775e732 /fpdfsdk/include/fsdk_baseform.h
parent065e9321b84fc0490f3da9099e8840c65e06868d (diff)
downloadpdfium-320b2313d19869333ed453af546e61a9fc2b81c9.tar.xz
FX_BOOL considered harmful, part 2.
Fully automatic change, execpt for cleanup in fx_system.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1254703002 .
Diffstat (limited to 'fpdfsdk/include/fsdk_baseform.h')
-rw-r--r--fpdfsdk/include/fsdk_baseform.h106
1 files changed, 53 insertions, 53 deletions
diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h
index edbd5e4efc..6b974c5535 100644
--- a/fpdfsdk/include/fsdk_baseform.h
+++ b/fpdfsdk/include/fsdk_baseform.h
@@ -35,28 +35,28 @@ typedef struct _PDFSDK_FieldAction
{
_PDFSDK_FieldAction()
{
- bModifier = FALSE;
- bShift = FALSE;
+ bModifier = false;
+ bShift = false;
nCommitKey = 0;
- bKeyDown = FALSE;
+ bKeyDown = false;
nSelEnd = nSelStart = 0;
- bWillCommit = FALSE;
- bFieldFull = FALSE;
- bRC = TRUE;
+ bWillCommit = false;
+ bFieldFull = false;
+ bRC = true;
}
- FX_BOOL bModifier; //in
- FX_BOOL bShift; //in
+ bool bModifier; //in
+ bool bShift; //in
int nCommitKey; //in
CFX_WideString sChange; //in[out]
CFX_WideString sChangeEx; //in
- FX_BOOL bKeyDown; //in
+ bool bKeyDown; //in
int nSelEnd; //in[out]
int nSelStart; //in[out]
CFX_WideString sValue; //in[out]
- FX_BOOL bWillCommit; //in
- FX_BOOL bFieldFull; //in
- FX_BOOL bRC; //in[out]
+ bool bWillCommit; //in
+ bool bFieldFull; //in
+ bool bRC; //in[out]
}PDFSDK_FieldAction;
class CPDFSDK_Widget : public CPDFSDK_Annot
{
@@ -80,9 +80,9 @@ public:
int GetFieldFlags() const;
int GetRotate() const;
- FX_BOOL GetFillColor(FX_COLORREF& color) const;
- FX_BOOL GetBorderColor(FX_COLORREF& color) const;
- FX_BOOL GetTextColor(FX_COLORREF& color) const;
+ bool GetFillColor(FX_COLORREF& color) const;
+ bool GetBorderColor(FX_COLORREF& color) const;
+ bool GetTextColor(FX_COLORREF& color) const;
FX_FLOAT GetFontSize() const;
int GetSelectedIndex(int nIndex) const;
@@ -90,9 +90,9 @@ public:
CFX_WideString GetDefaultValue() const;
CFX_WideString GetOptionLabel(int nIndex) const;
int CountOptions() const;
- FX_BOOL IsOptionSelected(int nIndex) const;
+ bool IsOptionSelected(int nIndex) const;
int GetTopVisibleIndex() const;
- FX_BOOL IsChecked() const;
+ bool IsChecked() const;
/*
BF_ALIGN_LEFT
BF_ALIGN_MIDDL
@@ -103,20 +103,20 @@ public:
CFX_WideString GetAlternateName() const;
//Set Properties.
- void SetCheck(FX_BOOL bChecked, FX_BOOL bNotify);
- void SetValue(const CFX_WideString& sValue, FX_BOOL bNotify);
+ void SetCheck(bool bChecked, bool bNotify);
+ void SetValue(const CFX_WideString& sValue, bool bNotify);
void SetDefaultValue(const CFX_WideString& sValue);
- void SetOptionSelection(int index, FX_BOOL bSelected, FX_BOOL bNotify);
- void ClearSelection(FX_BOOL bNotify);
+ void SetOptionSelection(int index, bool bSelected, bool bNotify);
+ void ClearSelection(bool bNotify);
void SetTopVisibleIndex(int index);
- void ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged);
- void ResetFieldAppearance(FX_BOOL bValueChanged);
+ void ResetAppearance(const FX_WCHAR* sValue, bool bValueChanged);
+ void ResetFieldAppearance(bool bValueChanged);
void UpdateField();
- CFX_WideString OnFormat(FX_BOOL& bFormated);
+ CFX_WideString OnFormat(bool& bFormated);
//Message.
- FX_BOOL OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldAction& data,
+ bool OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldAction& data,
CPDFSDK_PageView* pPageView);
CPDFSDK_InterForm* GetInterForm() const {return m_pInterForm;}
@@ -128,7 +128,7 @@ public:
void SetAppModified();
void ClearAppModified();
- FX_BOOL IsAppModified() const;
+ bool IsAppModified() const;
int32_t GetAppearanceAge() const;
int32_t GetValueAge() const;
@@ -155,14 +155,14 @@ private:
void AddImageToAppearance(const CFX_ByteString& sAPType, CPDF_Stream* pImage);
void RemoveAppearance(const CFX_ByteString& sAPType);
public:
- FX_BOOL IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode);
+ bool IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode);
void DrawAppearance(CFX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device,
CPDF_Annot::AppearanceMode mode, const CPDF_RenderOptions* pOptions);
public:
- FX_BOOL HitTest(FX_FLOAT pageX, FX_FLOAT pageY);
+ bool HitTest(FX_FLOAT pageX, FX_FLOAT pageY);
private:
CPDFSDK_InterForm* m_pInterForm;
- FX_BOOL m_bAppModified;
+ bool m_bAppModified;
int32_t m_nAppAge;
int32_t m_nValueAge;
};
@@ -176,9 +176,9 @@ public:
CPDF_InterForm* GetInterForm() const { return m_pInterForm; }
CPDFSDK_Document* GetDocument() const { return m_pDocument; }
- FX_BOOL HighlightWidgets();
+ bool HighlightWidgets();
- CPDFSDK_Widget* GetSibling(CPDFSDK_Widget* pWidget, FX_BOOL bNext) const;
+ CPDFSDK_Widget* GetSibling(CPDFSDK_Widget* pWidget, bool bNext) const;
CPDFSDK_Widget* GetWidget(CPDF_FormControl* pControl) const;
void GetWidgets(const CFX_WideString& sFieldName, CFX_PtrArray& widgets);
void GetWidgets(CPDF_FormField* pField, CFX_PtrArray& widgets);
@@ -186,33 +186,33 @@ public:
void AddMap(CPDF_FormControl* pControl, CPDFSDK_Widget* pWidget);
void RemoveMap(CPDF_FormControl* pControl);
- void EnableCalculate(FX_BOOL bEnabled);
- FX_BOOL IsCalculateEnabled() const;
+ void EnableCalculate(bool bEnabled);
+ bool IsCalculateEnabled() const;
#ifdef _WIN32
CPDF_Stream* LoadImageFromFile(const CFX_WideString& sFile);
#endif
- void OnKeyStrokeCommit(CPDF_FormField* pFormField, CFX_WideString& csValue, FX_BOOL& bRC);
- void OnValidate(CPDF_FormField* pFormField, CFX_WideString& csValue, FX_BOOL& bRC);
+ void OnKeyStrokeCommit(CPDF_FormField* pFormField, CFX_WideString& csValue, bool& bRC);
+ void OnValidate(CPDF_FormField* pFormField, CFX_WideString& csValue, bool& bRC);
void OnCalculate(CPDF_FormField* pFormField = NULL);
- CFX_WideString OnFormat(CPDF_FormField* pFormField, FX_BOOL& bFormated);
+ CFX_WideString OnFormat(CPDF_FormField* pFormField, bool& bFormated);
- void ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, FX_BOOL bValueChanged);
+ void ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, bool bValueChanged);
void UpdateField(CPDF_FormField* pFormField);
- FX_BOOL DoAction_Hide(const CPDF_Action& action);
- FX_BOOL DoAction_SubmitForm(const CPDF_Action& action);
- FX_BOOL DoAction_ResetForm(const CPDF_Action& action);
- FX_BOOL DoAction_ImportData(const CPDF_Action& action);
+ bool DoAction_Hide(const CPDF_Action& action);
+ bool DoAction_SubmitForm(const CPDF_Action& action);
+ bool DoAction_ResetForm(const CPDF_Action& action);
+ bool DoAction_ImportData(const CPDF_Action& action);
void GetFieldFromObjects(const CFX_PtrArray& objects, CFX_PtrArray& fields);
- FX_BOOL IsValidField(CPDF_Dictionary* pFieldDict);
- FX_BOOL SubmitFields(const CFX_WideString& csDestination, const CFX_PtrArray& fields,
- FX_BOOL bIncludeOrExclude, FX_BOOL bUrlEncoded);
- FX_BOOL SubmitForm(const CFX_WideString& sDestination, FX_BOOL bUrlEncoded);
- FX_BOOL ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf);
- FX_BOOL ExportFieldsToFDFTextBuf(const CFX_PtrArray& fields,FX_BOOL bIncludeOrExclude, CFX_ByteTextBuf& textBuf);
+ bool IsValidField(CPDF_Dictionary* pFieldDict);
+ bool SubmitFields(const CFX_WideString& csDestination, const CFX_PtrArray& fields,
+ bool bIncludeOrExclude, bool bUrlEncoded);
+ bool SubmitForm(const CFX_WideString& sDestination, bool bUrlEncoded);
+ bool ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf);
+ bool ExportFieldsToFDFTextBuf(const CFX_PtrArray& fields,bool bIncludeOrExclude, CFX_ByteTextBuf& textBuf);
CFX_WideString GetTemporaryFileName(const CFX_WideString& sFileExt);
private:
@@ -226,8 +226,8 @@ private:
virtual int BeforeFormImportData(const CPDF_InterForm* pForm);
virtual int AfterFormImportData(const CPDF_InterForm* pForm);
- FX_BOOL FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_WideString csTxtFile);
- FX_BOOL FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize);
+ bool FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_WideString csTxtFile);
+ bool FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize);
int GetPageIndexByAnnotDict(CPDF_Document* pDocument, CPDF_Dictionary* pAnnotDict) const;
void DoFDFBuffer(CFX_ByteString sBuffer);
@@ -236,11 +236,11 @@ private:
CPDFSDK_Document* m_pDocument;
CPDF_InterForm* m_pInterForm;
CPDFSDK_WidgetMap m_Map;
- FX_BOOL m_bCalculate;
- FX_BOOL m_bBusy;
+ bool m_bCalculate;
+ bool m_bBusy;
public:
- FX_BOOL IsNeedHighLight(int nFieldType);
+ bool IsNeedHighLight(int nFieldType);
void RemoveAllHighLight();
void SetHighlightAlpha(uint8_t alpha) {m_iHighlightAlpha = alpha;}
uint8_t GetHighlightAlpha() {return m_iHighlightAlpha;}
@@ -249,7 +249,7 @@ public:
private:
FX_COLORREF m_aHighlightColor[6];
uint8_t m_iHighlightAlpha;
- FX_BOOL m_bNeedHightlight[6];
+ bool m_bNeedHightlight[6];
};
#define BAI_STRUCTURE 0