summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index 9613383879..5dd680ab8c 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -1226,10 +1226,10 @@ bool CXFA_WidgetData::GetBarcodeAttribute_ModuleHeight(int32_t* val) {
}
bool CXFA_WidgetData::GetBarcodeAttribute_PrintChecksum(bool* val) {
- bool bPrintCheckDigit;
- if (GetUIChild()->JSNode()->TryBoolean(XFA_Attribute::PrintCheckDigit,
- bPrintCheckDigit, true)) {
- *val = bPrintCheckDigit;
+ pdfium::Optional<bool> printCheckDigit =
+ GetUIChild()->JSNode()->TryBoolean(XFA_Attribute::PrintCheckDigit, true);
+ if (printCheckDigit) {
+ *val = *printCheckDigit;
return true;
}
return false;
@@ -1264,12 +1264,12 @@ bool CXFA_WidgetData::GetBarcodeAttribute_TextLocation(int32_t* val) {
}
bool CXFA_WidgetData::GetBarcodeAttribute_Truncate(bool* val) {
- bool bTruncate;
- if (!GetUIChild()->JSNode()->TryBoolean(XFA_Attribute::Truncate, bTruncate,
- true))
+ pdfium::Optional<bool> truncate =
+ GetUIChild()->JSNode()->TryBoolean(XFA_Attribute::Truncate, true);
+ if (!truncate)
return false;
- *val = bTruncate;
+ *val = *truncate;
return true;
}