diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-01-04 14:43:27 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-04 20:19:41 +0000 |
commit | c560a8c11a6f8ee239e570db8c022ae0fd2a4db5 (patch) | |
tree | 0c16389f7e5c5e29c57a9c7f77dd062fa07d8640 /xfa/fxfa/parser/cxfa_layoutpagemgr.cpp | |
parent | df0a749452d933e4f434e2a33112667f1880db34 (diff) | |
download | pdfium-c560a8c11a6f8ee239e570db8c022ae0fd2a4db5.tar.xz |
Convert usages of pdfium::Optional to Optional
Change-Id: I29769f78eaad10c6a8b79e27524336c4f330377e
Reviewed-on: https://pdfium-review.googlesource.com/22258
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_layoutpagemgr.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_layoutpagemgr.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp index b511cf8d3d..61caae762f 100644 --- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp +++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp @@ -153,7 +153,7 @@ CXFA_Node* ResolveBreakTarget(CXFA_Node* pPageSetRoot, bool bTargetAllFind = true; while (iSplitIndex != -1) { WideString wsExpr; - pdfium::Optional<size_t> iSplitNextIndex = 0; + Optional<size_t> iSplitNextIndex = 0; if (!bTargetAllFind) { iSplitNextIndex = wsTargetAll.Find(' ', iSplitIndex); if (!iSplitNextIndex.has_value()) @@ -1151,7 +1151,7 @@ bool CXFA_LayoutPageMgr::FindPageAreaFromPageSet_Ordered( CXFA_Node* pOccurNode = pPageSet->GetFirstChildByClass<CXFA_Occur>(XFA_Element::Occur); if (pOccurNode) { - pdfium::Optional<int32_t> ret = + Optional<int32_t> ret = pOccurNode->JSObject()->TryInteger(XFA_Attribute::Max, false); if (ret) iMax = *ret; @@ -1324,7 +1324,7 @@ bool CXFA_LayoutPageMgr::MatchPageAreaOddOrEven(CXFA_Node* pPageArea) { if (m_ePageSetMode != XFA_AttributeEnum::DuplexPaginated) return true; - pdfium::Optional<XFA_AttributeEnum> ret = + Optional<XFA_AttributeEnum> ret = pPageArea->JSObject()->TryEnum(XFA_Attribute::OddOrEven, true); if (!ret || *ret == XFA_AttributeEnum::Any) return true; @@ -1354,7 +1354,7 @@ CXFA_Node* CXFA_LayoutPageMgr::GetNextAvailPageArea( CXFA_Node* pOccurNode = m_pCurPageArea->GetFirstChildByClass<CXFA_Occur>(XFA_Element::Occur); if (pOccurNode) { - pdfium::Optional<int32_t> ret = + Optional<int32_t> ret = pOccurNode->JSObject()->TryInteger(XFA_Attribute::Max, false); if (ret) iMax = *ret; @@ -1460,7 +1460,7 @@ int32_t CXFA_LayoutPageMgr::CreateMinPageRecord(CXFA_Node* pPageArea, return 0; int32_t iMin = 0; - pdfium::Optional<int32_t> ret; + Optional<int32_t> ret; CXFA_Node* pOccurNode = pPageArea->GetFirstChildByClass<CXFA_Occur>(XFA_Element::Occur); if (pOccurNode) { @@ -1507,7 +1507,7 @@ void CXFA_LayoutPageMgr::CreateMinPageSetRecord(CXFA_Node* pPageSet, if (!pOccurNode) return; - pdfium::Optional<int32_t> iMin = + Optional<int32_t> iMin = pOccurNode->JSObject()->TryInteger(XFA_Attribute::Min, false); if (!iMin || iCurSetCount >= *iMin) return; @@ -1572,7 +1572,7 @@ bool CXFA_LayoutPageMgr::GetNextAvailContentHeight(float fChildHeight) { CXFA_Node* pOccurNode = pPageNode->GetFirstChildByClass<CXFA_Occur>(XFA_Element::Occur); int32_t iMax = 0; - pdfium::Optional<int32_t> ret; + Optional<int32_t> ret; if (pOccurNode) { ret = pOccurNode->JSObject()->TryInteger(XFA_Attribute::Max, false); if (ret) |