summaryrefslogtreecommitdiff
path: root/fpdfsdk/fsdk_baseform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/fsdk_baseform.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp
index 141e1f5f82..6a01813494 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: {