summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_node.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-16 14:19:47 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-16 14:19:47 +0000
commitce7ccd5f638eff42c6c79da682061fa2c39b028f (patch)
treec150e99f3c7ffb4e2d611e33aba743b43d718ac9 /xfa/fxfa/parser/cxfa_node.cpp
parent8873a4dffed0ae3ccd961ada58c588f92b210bf2 (diff)
downloadpdfium-ce7ccd5f638eff42c6c79da682061fa2c39b028f.tar.xz
Convert CJX_Node::TryMeasure to pdfium::Optional
This CL converts TryMeasure to return a pdfium::Optional instead of a bool with an out parameter. Change-Id: I6e92e53aa0eaa7a6b855253061acca8a59db49fd Reviewed-on: https://pdfium-review.googlesource.com/18550 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 465529e777..6ec3b98f7b 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -631,8 +631,9 @@ XFA_ATTRIBUTEENUM CXFA_Node::GetIntact() {
}
XFA_VERSION version = m_pDocument->GetCurVersionMode();
if (eParLayout == XFA_ATTRIBUTEENUM_Tb && version < XFA_VERSION_208) {
- CXFA_Measurement measureH;
- if (JSNode()->TryMeasure(XFA_Attribute::H, measureH, false))
+ pdfium::Optional<CXFA_Measurement> measureH =
+ JSNode()->TryMeasure(XFA_Attribute::H, false);
+ if (measureH)
return XFA_ATTRIBUTEENUM_ContentArea;
}
return XFA_ATTRIBUTEENUM_None;