summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_captiondata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_captiondata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_captiondata.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/cxfa_captiondata.cpp b/xfa/fxfa/parser/cxfa_captiondata.cpp
index c898a763ac..db7ca9d875 100644
--- a/xfa/fxfa/parser/cxfa_captiondata.cpp
+++ b/xfa/fxfa/parser/cxfa_captiondata.cpp
@@ -12,15 +12,15 @@
CXFA_CaptionData::CXFA_CaptionData(CXFA_Node* pNode) : CXFA_DataData(pNode) {}
int32_t CXFA_CaptionData::GetPresence() {
- XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_Visible;
- m_pNode->JSNode()->TryEnum(XFA_Attribute::Presence, eAttr, true);
- return eAttr;
+ return m_pNode->JSNode()
+ ->TryEnum(XFA_Attribute::Presence, true)
+ .value_or(XFA_ATTRIBUTEENUM_Visible);
}
int32_t CXFA_CaptionData::GetPlacementType() {
- XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_Left;
- m_pNode->JSNode()->TryEnum(XFA_Attribute::Placement, eAttr, true);
- return eAttr;
+ return m_pNode->JSNode()
+ ->TryEnum(XFA_Attribute::Placement, true)
+ .value_or(XFA_ATTRIBUTEENUM_Left);
}
float CXFA_CaptionData::GetReserve() {