summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-27 14:32:33 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-27 14:32:33 -0700
commit478ed62770e0dc0fe2d859e73496fa8c7f854694 (patch)
tree808e8576d0420f4bca099f5b265cca8ec09cd46e /xfa
parente93dbd6c18b8b58e5d6b4813052fafbc323e9692 (diff)
downloadpdfium-478ed62770e0dc0fe2d859e73496fa8c7f854694.tar.xz
Fix some FX_BOOL / int noise in fxfa
Review-Url: https://codereview.chromium.org/2457673003
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/app/xfa_ffdocview.cpp2
-rw-r--r--xfa/fxfa/app/xfa_fftextedit.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffwidgethandler.cpp2
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp2
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp2
6 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index efda0430d3..f82cc5eafb 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -536,7 +536,7 @@ void CXFA_FFDocView::UnlockUpdate() {
m_iLock--;
}
FX_BOOL CXFA_FFDocView::IsUpdateLocked() {
- return m_iLock;
+ return m_iLock > 0;
}
void CXFA_FFDocView::ClearInvalidateList() {
m_mapPageInvalidate.clear();
diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp
index 9f3c94ba7e..eb2a55898d 100644
--- a/xfa/fxfa/app/xfa_fftextedit.cpp
+++ b/xfa/fxfa/app/xfa_fftextedit.cpp
@@ -325,7 +325,7 @@ FX_BOOL CXFA_FFTextEdit::Paste(const CFX_WideString& wsPaste) {
}
FX_BOOL CXFA_FFTextEdit::SelectAll() {
int32_t nCount = ((CFWL_Edit*)m_pNormalWidget)->GetTextLength();
- return ((CFWL_Edit*)m_pNormalWidget)->AddSelRange(0, nCount);
+ return ((CFWL_Edit*)m_pNormalWidget)->AddSelRange(0, nCount) >= 0;
}
FX_BOOL CXFA_FFTextEdit::Delete() {
return ((CFWL_Edit*)m_pNormalWidget)->Delete();
diff --git a/xfa/fxfa/app/xfa_ffwidgethandler.cpp b/xfa/fxfa/app/xfa_ffwidgethandler.cpp
index 3df2d2a473..854b1ac384 100644
--- a/xfa/fxfa/app/xfa_ffwidgethandler.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgethandler.cpp
@@ -211,7 +211,7 @@ FX_BOOL CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc,
}
CXFA_NodeArray eventArray;
return pWidgetAcc->GetEventByActivity(gs_EventActivity[eEventType],
- eventArray);
+ eventArray) > 0;
}
int32_t CXFA_FFWidgetHandler::ProcessEvent(CXFA_WidgetAcc* pWidgetAcc,
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 0c7acffa9e..8a4aadb753 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -1276,7 +1276,7 @@ FX_BOOL CXFA_TextLayout::DrawString(CFX_RenderDevice* pFxDevice,
}
pDevice->RestoreState();
FX_Free(pCharPos);
- return iPieceLines;
+ return iPieceLines > 0;
}
void CXFA_TextLayout::UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom) {
fHeight -= fBottom;
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index b5ba3f7fd9..8a7849f873 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -4653,7 +4653,7 @@ void CXFA_FM2JSContext::Uuid(CFXJSE_Value* pThis,
FX_GUID_CreateV4(&guid);
CFX_ByteString bsUId;
- FX_GUID_ToString(&guid, bsUId, iNum);
+ FX_GUID_ToString(&guid, bsUId, !!iNum);
args.GetReturnValue()->SetString(bsUId.AsStringC());
}
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 9c209b23b7..402ab0e37e 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -3811,7 +3811,7 @@ FX_BOOL CXFA_Node::TryBoolean(XFA_ATTRIBUTE eAttr,
void* pValue = nullptr;
if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, bUseDefault, pValue))
return FALSE;
- bValue = (FX_BOOL)(uintptr_t)pValue;
+ bValue = !!pValue;
return TRUE;
}