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

Unified Diff: fpdfsdk/fsdk_baseform.cpp

Issue 1800793002: Modify xfa code to avoid c4800 warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 9 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 | « fpdfsdk/fpdfxfa/fpdfxfa_util.cpp ('k') | fpdfsdk/include/fpdfxfa/fpdfxfa_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fsdk_baseform.cpp
diff --git a/fpdfsdk/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp
index 141e1f5f82644eb7e9326861375e6d9adb0dceeb..6a01813494226a3c47ae89aaaee1cf4b716bea66 100644
--- a/fpdfsdk/fsdk_baseform.cpp
+++ b/fpdfsdk/fsdk_baseform.cpp
@@ -350,19 +350,19 @@ void CPDFSDK_Widget::SynchronizeXFAValue(IXFA_DocView* pXFADocView,
case FIELDTYPE_CHECKBOX: {
if (CXFA_WidgetAcc* pWidgetAcc =
pXFAWidgetHandler->GetDataAcc(hWidget)) {
- FX_BOOL bChecked = pWidgetAcc->GetCheckState() == XFA_CHECKSTATE_On;
-
- pFormField->CheckControl(pFormField->GetControlIndex(pFormControl),
- bChecked, TRUE);
+ pFormField->CheckControl(
+ pFormField->GetControlIndex(pFormControl),
+ pWidgetAcc->GetCheckState() == XFA_CHECKSTATE_On, true);
}
} break;
case FIELDTYPE_RADIOBUTTON: {
+ // TODO(weili): Check whether we need to handle checkbox and radio
+ // button differently, otherwise, merge these two cases.
if (CXFA_WidgetAcc* pWidgetAcc =
pXFAWidgetHandler->GetDataAcc(hWidget)) {
- FX_BOOL bChecked = pWidgetAcc->GetCheckState() == XFA_CHECKSTATE_On;
-
- pFormField->CheckControl(pFormField->GetControlIndex(pFormControl),
- bChecked, TRUE);
+ pFormField->CheckControl(
+ pFormField->GetControlIndex(pFormControl),
+ pWidgetAcc->GetCheckState() == XFA_CHECKSTATE_On, true);
}
} break;
case FIELDTYPE_TEXTFIELD: {
« no previous file with comments | « fpdfsdk/fpdfxfa/fpdfxfa_util.cpp ('k') | fpdfsdk/include/fpdfxfa/fpdfxfa_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698