summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/parser/cxfa_fill.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_font.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp34
3 files changed, 25 insertions, 15 deletions
diff --git a/xfa/fxfa/parser/cxfa_fill.cpp b/xfa/fxfa/parser/cxfa_fill.cpp
index 4cce86fd43..96290bc821 100644
--- a/xfa/fxfa/parser/cxfa_fill.cpp
+++ b/xfa/fxfa/parser/cxfa_fill.cpp
@@ -69,7 +69,7 @@ int32_t CXFA_Fill::GetStipple(FX_ARGB& stippleColor) {
CXFA_Node* pNode =
m_pNode->JSNode()->GetProperty(0, XFA_Element::Stipple, true);
int32_t eAttr = 50;
- pNode->JSNode()->TryInteger(XFA_ATTRIBUTE_Rate, eAttr);
+ pNode->JSNode()->TryInteger(XFA_ATTRIBUTE_Rate, eAttr, true);
if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {
WideStringView wsColor;
pColor->JSNode()->TryCData(XFA_ATTRIBUTE_Value, wsColor, false);
diff --git a/xfa/fxfa/parser/cxfa_font.cpp b/xfa/fxfa/parser/cxfa_font.cpp
index 0e24064ae8..4fc0a57092 100644
--- a/xfa/fxfa/parser/cxfa_font.cpp
+++ b/xfa/fxfa/parser/cxfa_font.cpp
@@ -46,13 +46,13 @@ float CXFA_Font::GetLetterSpacing() {
int32_t CXFA_Font::GetLineThrough() {
int32_t iValue = 0;
- m_pNode->JSNode()->TryInteger(XFA_ATTRIBUTE_LineThrough, iValue);
+ m_pNode->JSNode()->TryInteger(XFA_ATTRIBUTE_LineThrough, iValue, true);
return iValue;
}
int32_t CXFA_Font::GetUnderline() {
int32_t iValue = 0;
- m_pNode->JSNode()->TryInteger(XFA_ATTRIBUTE_Underline, iValue);
+ m_pNode->JSNode()->TryInteger(XFA_ATTRIBUTE_Underline, iValue, true);
return iValue;
}
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index f6e0f7d55b..a0ac520981 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -1403,23 +1403,33 @@ int32_t CXFA_WidgetData::GetMaxChars(XFA_Element& eType) {
}
bool CXFA_WidgetData::GetFracDigits(int32_t& iFracDigits) {
- if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value)) {
- if (CXFA_Node* pChild = pNode->GetChild(0, XFA_Element::Decimal))
- return pChild->JSNode()->TryInteger(XFA_ATTRIBUTE_FracDigits,
- iFracDigits);
- }
iFracDigits = -1;
- return false;
+
+ CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value);
+ if (!pNode)
+ return false;
+
+ CXFA_Node* pChild = pNode->GetChild(0, XFA_Element::Decimal);
+ if (!pChild)
+ return false;
+
+ return pChild->JSNode()->TryInteger(XFA_ATTRIBUTE_FracDigits, iFracDigits,
+ true);
}
bool CXFA_WidgetData::GetLeadDigits(int32_t& iLeadDigits) {
- if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value)) {
- if (CXFA_Node* pChild = pNode->GetChild(0, XFA_Element::Decimal))
- return pChild->JSNode()->TryInteger(XFA_ATTRIBUTE_LeadDigits,
- iLeadDigits);
- }
iLeadDigits = -1;
- return false;
+
+ CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value);
+ if (!pNode)
+ return false;
+
+ CXFA_Node* pChild = pNode->GetChild(0, XFA_Element::Decimal);
+ if (!pChild)
+ return false;
+
+ return pChild->JSNode()->TryInteger(XFA_ATTRIBUTE_LeadDigits, iLeadDigits,
+ true);
}
bool CXFA_WidgetData::SetValue(const WideString& wsValue,