void CXFA_FFBarcode::UpdateWidgetProperty() { CXFA_FFTextEdit::UpdateWidgetProperty(); CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; CFX_WideString wsType = GetDataAcc()->GetBarcodeType(); const XFA_BARCODETYPEENUMINFO* pBarcodeTypeInfo = XFA_GetBarcodeTypeByName(wsType.AsStringC()); if (!pBarcodeTypeInfo) return; pBarCodeWidget->SetType(pBarcodeTypeInfo->eBCType); CXFA_WidgetAcc* pAcc = GetDataAcc(); int32_t intVal; FX_CHAR charVal; bool boolVal; FX_FLOAT floatVal; if (pAcc->GetBarcodeAttribute_CharEncoding(intVal)) { pBarCodeWidget->SetCharEncoding((BC_CHAR_ENCODING)intVal); } if (pAcc->GetBarcodeAttribute_Checksum(boolVal)) { pBarCodeWidget->SetCalChecksum(boolVal); } if (pAcc->GetBarcodeAttribute_DataLength(intVal)) { pBarCodeWidget->SetDataLength(intVal); } if (pAcc->GetBarcodeAttribute_StartChar(charVal)) { pBarCodeWidget->SetStartChar(charVal); } if (pAcc->GetBarcodeAttribute_EndChar(charVal)) { pBarCodeWidget->SetEndChar(charVal); } if (pAcc->GetBarcodeAttribute_ECLevel(intVal)) { pBarCodeWidget->SetErrorCorrectionLevel(intVal); } if (pAcc->GetBarcodeAttribute_ModuleWidth(intVal)) { pBarCodeWidget->SetModuleWidth(intVal); } if (pAcc->GetBarcodeAttribute_ModuleHeight(intVal)) { pBarCodeWidget->SetModuleHeight(intVal); } if (pAcc->GetBarcodeAttribute_PrintChecksum(boolVal)) { pBarCodeWidget->SetPrintChecksum(boolVal); } if (pAcc->GetBarcodeAttribute_TextLocation(intVal)) { pBarCodeWidget->SetTextLocation((BC_TEXT_LOC)intVal); } if (pAcc->GetBarcodeAttribute_Truncate(boolVal)) { pBarCodeWidget->SetTruncated(boolVal); } if (pAcc->GetBarcodeAttribute_WideNarrowRatio(floatVal)) { pBarCodeWidget->SetWideNarrowRatio((int32_t)floatVal); } if (pBarcodeTypeInfo->eName == XFA_BARCODETYPE_code3Of9 || pBarcodeTypeInfo->eName == XFA_BARCODETYPE_ean8 || pBarcodeTypeInfo->eName == XFA_BARCODETYPE_ean13 || pBarcodeTypeInfo->eName == XFA_BARCODETYPE_upcA) { pBarCodeWidget->SetPrintChecksum(true); } }