summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-11 17:00:48 -0800
committerWei Li <weili@chromium.org>2016-03-11 17:00:48 -0800
commit97da97662417085774f75c26e535c6fbe70266ae (patch)
tree9654be693dfb20b49be80911fa8089ff319757f3 /fpdfsdk/src/fsdk_baseform.cpp
parent55265016faac358266af280db6c62afa34ce2891 (diff)
downloadpdfium-97da97662417085774f75c26e535c6fbe70266ae.tar.xz
Re-enable MSVC warning 4800 for compiling with chromium_code
Mainly change the code to avoid the warnings; in a few cases we have to use explicit casts. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1783023002 .
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 8541193bda..89d27726e8 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -663,7 +663,7 @@ int CPDFSDK_Widget::GetTopVisibleIndex() const {
return pFormField->GetTopVisibleIndex();
}
-FX_BOOL CPDFSDK_Widget::IsChecked() const {
+bool CPDFSDK_Widget::IsChecked() const {
#ifdef PDF_ENABLE_XFA
if (IXFA_WidgetHandler* pXFAWidgetHandler = GetXFAWidgetHandler()) {
if (IXFA_Widget* hWidget = GetMixXFAWidget()) {
@@ -686,7 +686,7 @@ int CPDFSDK_Widget::GetMaxLen() const {
return pFormField->GetMaxLen();
}
-void CPDFSDK_Widget::SetCheck(FX_BOOL bChecked, FX_BOOL bNotify) {
+void CPDFSDK_Widget::SetCheck(bool bChecked, bool bNotify) {
CPDF_FormControl* pFormCtrl = GetFormControl();
CPDF_FormField* pFormField = pFormCtrl->GetField();
pFormField->CheckControl(pFormField->GetControlIndex(pFormCtrl), bChecked,
@@ -2373,7 +2373,7 @@ FX_BOOL CPDFSDK_InterForm::DoAction_Hide(const CPDF_Action& action) {
ASSERT(pControl);
if (CPDFSDK_Widget* pWidget = GetWidget(pControl)) {
- int nFlags = pWidget->GetFlags();
+ FX_DWORD nFlags = pWidget->GetFlags();
nFlags &= ~ANNOTFLAG_INVISIBLE;
nFlags &= ~ANNOTFLAG_NOVIEW;
if (bHide)
@@ -2406,7 +2406,7 @@ FX_BOOL CPDFSDK_InterForm::DoAction_SubmitForm(const CPDF_Action& action) {
if (m_pInterForm->CheckRequiredFields(&fields, bIncludeOrExclude))
return FALSE;
- return SubmitFields(sDestination, fields, bIncludeOrExclude, FALSE);
+ return SubmitFields(sDestination, fields, bIncludeOrExclude, false);
}
}
if (m_pInterForm->CheckRequiredFields(nullptr, true))
@@ -2418,8 +2418,8 @@ FX_BOOL CPDFSDK_InterForm::DoAction_SubmitForm(const CPDF_Action& action) {
FX_BOOL CPDFSDK_InterForm::SubmitFields(
const CFX_WideString& csDestination,
const std::vector<CPDF_FormField*>& fields,
- FX_BOOL bIncludeOrExclude,
- FX_BOOL bUrlEncoded) {
+ bool bIncludeOrExclude,
+ bool bUrlEncoded) {
CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
CFX_ByteTextBuf textBuf;
@@ -2483,7 +2483,7 @@ FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf,
FX_BOOL CPDFSDK_InterForm::ExportFieldsToFDFTextBuf(
const std::vector<CPDF_FormField*>& fields,
- FX_BOOL bIncludeOrExclude,
+ bool bIncludeOrExclude,
CFX_ByteTextBuf& textBuf) {
std::unique_ptr<CFDF_Document> pFDF(m_pInterForm->ExportToFDF(
m_pDocument->GetPath(), fields, bIncludeOrExclude));