summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_widgetacc.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-16 14:07:17 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-16 14:07:17 +0000
commit9d47de6b27b167db46b6aba38352fc42a8b6adae (patch)
tree5e29b94aa126a890cf9c2741b505c4dce9dae42e /xfa/fxfa/cxfa_widgetacc.cpp
parent0bf9aef229ae2c4f2f16ab753d6d2e9e6d718a44 (diff)
downloadpdfium-9d47de6b27b167db46b6aba38352fc42a8b6adae.tar.xz
Convert TryEnum to return an optional
This CL converts CJX_Node::TryEnum to return a pdfium::Optional instead of a bool with an out parameter. Change-Id: Icc1b063ce51656cc5e467aba358eb9e7d6754fea Reviewed-on: https://pdfium-review.googlesource.com/18512 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_widgetacc.cpp')
-rw-r--r--xfa/fxfa/cxfa_widgetacc.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp
index a7d28cb5aa..a579646fd9 100644
--- a/xfa/fxfa/cxfa_widgetacc.cpp
+++ b/xfa/fxfa/cxfa_widgetacc.cpp
@@ -1275,11 +1275,10 @@ bool CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, float& fCalcHeight) {
XFA_VERSION version = GetDoc()->GetXFADoc()->GetCurVersionMode();
bool bCanSplitNoContent = false;
- XFA_ATTRIBUTEENUM eLayoutMode;
- GetNode()
- ->GetNodeItem(XFA_NODEITEM_Parent)
- ->JSNode()
- ->TryEnum(XFA_Attribute::Layout, eLayoutMode, true);
+ XFA_ATTRIBUTEENUM eLayoutMode = GetNode()
+ ->GetNodeItem(XFA_NODEITEM_Parent)
+ ->JSNode()
+ ->GetEnum(XFA_Attribute::Layout);
if ((eLayoutMode == XFA_ATTRIBUTEENUM_Position ||
eLayoutMode == XFA_ATTRIBUTEENUM_Tb ||
eLayoutMode == XFA_ATTRIBUTEENUM_Row ||