summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_fontdata.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-16 13:44:38 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-16 13:44:38 +0000
commit0bf9aef229ae2c4f2f16ab753d6d2e9e6d718a44 (patch)
tree2ed1f71183096853a7d552276047a67b473a9721 /xfa/fxfa/parser/cxfa_fontdata.cpp
parentb066704a22ba4f242567f508c12bf2545cbed9e1 (diff)
downloadpdfium-0bf9aef229ae2c4f2f16ab753d6d2e9e6d718a44.tar.xz
Convert TryInteger to return an optional
This Cl changes CJX_Node::TryInteger to return a pdfium::Optional<int32_t> instead of a boolean with an out param. Change-Id: I4675e08d3b132041f7d87e4639efa1d555089dc2 Reviewed-on: https://pdfium-review.googlesource.com/18511 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_fontdata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_fontdata.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/cxfa_fontdata.cpp b/xfa/fxfa/parser/cxfa_fontdata.cpp
index afe73538c8..f5600f24df 100644
--- a/xfa/fxfa/parser/cxfa_fontdata.cpp
+++ b/xfa/fxfa/parser/cxfa_fontdata.cpp
@@ -43,15 +43,11 @@ float CXFA_FontData::GetLetterSpacing() {
}
int32_t CXFA_FontData::GetLineThrough() {
- int32_t iValue = 0;
- m_pNode->JSNode()->TryInteger(XFA_Attribute::LineThrough, iValue, true);
- return iValue;
+ return m_pNode->JSNode()->GetInteger(XFA_Attribute::LineThrough);
}
int32_t CXFA_FontData::GetUnderline() {
- int32_t iValue = 0;
- m_pNode->JSNode()->TryInteger(XFA_Attribute::Underline, iValue, true);
- return iValue;
+ return m_pNode->JSNode()->GetInteger(XFA_Attribute::Underline);
}
int32_t CXFA_FontData::GetUnderlinePeriod() {