From e93dbd6c18b8b58e5d6b4813052fafbc323e9692 Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 27 Oct 2016 13:10:24 -0700 Subject: Fix some FX_BOOL / int noise in XFA barcodes Review-Url: https://codereview.chromium.org/2447163007 --- xfa/fxfa/app/xfa_ffbarcode.cpp | 4 ++-- xfa/fxfa/parser/cxfa_widgetdata.cpp | 6 +++--- xfa/fxfa/parser/cxfa_widgetdata.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa') diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp index ce9b0454c9..6a5478049b 100644 --- a/xfa/fxfa/app/xfa_ffbarcode.cpp +++ b/xfa/fxfa/app/xfa_ffbarcode.cpp @@ -179,8 +179,8 @@ void CXFA_FFBarcode::UpdateWidgetProperty() { if (pAcc->GetBarcodeAttribute_CharEncoding(intVal)) { pBarCodeWidget->SetCharEncoding((BC_CHAR_ENCODING)intVal); } - if (pAcc->GetBarcodeAttribute_Checksum(intVal)) { - pBarCodeWidget->SetCalChecksum(intVal); + if (pAcc->GetBarcodeAttribute_Checksum(boolVal)) { + pBarCodeWidget->SetCalChecksum(boolVal); } if (pAcc->GetBarcodeAttribute_DataLength(intVal)) { pBarCodeWidget->SetDataLength(intVal); diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index a5a7807ac8..ce07faf60f 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -1260,16 +1260,16 @@ FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_CharEncoding(int32_t& val) { return FALSE; } -FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_Checksum(int32_t& val) { +FX_BOOL CXFA_WidgetData::GetBarcodeAttribute_Checksum(FX_BOOL& val) { CXFA_Node* pUIChild = GetUIChild(); XFA_ATTRIBUTEENUM eChecksum; if (pUIChild->TryEnum(XFA_ATTRIBUTE_Checksum, eChecksum)) { switch (eChecksum) { case XFA_ATTRIBUTEENUM_None: - val = 0; + val = false; return TRUE; case XFA_ATTRIBUTEENUM_Auto: - val = 1; + val = true; return TRUE; case XFA_ATTRIBUTEENUM_1mod10: break; diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h index f718b6ee59..ed217ada3d 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.h +++ b/xfa/fxfa/parser/cxfa_widgetdata.h @@ -138,7 +138,7 @@ class CXFA_WidgetData : public CXFA_Data { void NormalizeNumStr(const CFX_WideString& wsValue, CFX_WideString& wsOutput); CFX_WideString GetBarcodeType(); FX_BOOL GetBarcodeAttribute_CharEncoding(int32_t& val); - FX_BOOL GetBarcodeAttribute_Checksum(int32_t& val); + FX_BOOL GetBarcodeAttribute_Checksum(FX_BOOL& val); FX_BOOL GetBarcodeAttribute_DataLength(int32_t& val); FX_BOOL GetBarcodeAttribute_StartChar(FX_CHAR& val); FX_BOOL GetBarcodeAttribute_EndChar(FX_CHAR& val); -- cgit v1.2.3