Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1141)

Unified Diff: xfa/fxfa/app/xfa_ffcheckbutton.cpp

Issue 2017863002: Fix MSVC C4800 build warnings. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: put C4800 back Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/fwl_formimp.cpp ('k') | xfa/fxfa/app/xfa_ffchoicelist.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_ffcheckbutton.cpp
diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.cpp b/xfa/fxfa/app/xfa_ffcheckbutton.cpp
index 80a4e92bda9478325579f694c6ffe2ec903eed81..9e174a286e1db62b9bc7c1e0aed0e712724de292 100644
--- a/xfa/fxfa/app/xfa_ffcheckbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffcheckbutton.cpp
@@ -239,12 +239,9 @@ void CXFA_FFCheckButton::RenderWidget(CFX_Graphics* pGS,
FX_BOOL CXFA_FFCheckButton::OnLButtonUp(uint32_t dwFlags,
FX_FLOAT fx,
FX_FLOAT fy) {
- if (!m_pNormalWidget) {
- return FALSE;
- }
- if (!IsButtonDown()) {
+ if (!m_pNormalWidget || !IsButtonDown())
return FALSE;
- }
+
SetButtonDown(FALSE);
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::LeftButtonUp;
@@ -256,21 +253,22 @@ FX_BOOL CXFA_FFCheckButton::OnLButtonUp(uint32_t dwFlags,
TranslateFWLMessage(&ms);
return TRUE;
}
+
XFA_CHECKSTATE CXFA_FFCheckButton::FWLState2XFAState() {
- XFA_CHECKSTATE eCheckState = XFA_CHECKSTATE_Off;
uint32_t dwState = m_pNormalWidget->GetStates();
- if (dwState & FWL_STATE_CKB_Checked) {
- eCheckState = XFA_CHECKSTATE_On;
- } else if (dwState & FWL_STATE_CKB_Neutral) {
- eCheckState = XFA_CHECKSTATE_Neutral;
- }
- return eCheckState;
+ if (dwState & FWL_STATE_CKB_Checked)
+ return XFA_CHECKSTATE_On;
+ if (dwState & FWL_STATE_CKB_Neutral)
+ return XFA_CHECKSTATE_Neutral;
+ return XFA_CHECKSTATE_Off;
}
+
FX_BOOL CXFA_FFCheckButton::CommitData() {
XFA_CHECKSTATE eCheckState = FWLState2XFAState();
- m_pDataAcc->SetCheckState(eCheckState, TRUE);
+ m_pDataAcc->SetCheckState(eCheckState, true);
return TRUE;
}
+
FX_BOOL CXFA_FFCheckButton::IsDataChanged() {
XFA_CHECKSTATE eCheckState = FWLState2XFAState();
return m_pDataAcc->GetCheckState() != eCheckState;
« no previous file with comments | « xfa/fwl/core/fwl_formimp.cpp ('k') | xfa/fxfa/app/xfa_ffchoicelist.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698