summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-01-04 14:43:27 -0500
committerChromium commit bot <commit-bot@chromium.org>2018-01-04 20:19:41 +0000
commitc560a8c11a6f8ee239e570db8c022ae0fd2a4db5 (patch)
tree0c16389f7e5c5e29c57a9c7f77dd062fa07d8640 /xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
parentdf0a749452d933e4f434e2a33112667f1880db34 (diff)
downloadpdfium-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_itemlayoutprocessor.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
index 61863d13b4..bd21cdcf11 100644
--- a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
@@ -92,14 +92,14 @@ CFX_SizeF CalculateContainerSpecifiedSize(CXFA_Node* pFormNode,
CFX_SizeF containerSize;
if (eType == XFA_Element::Subform || eType == XFA_Element::ExclGroup) {
- pdfium::Optional<CXFA_Measurement> wValue =
+ Optional<CXFA_Measurement> wValue =
pFormNode->JSObject()->TryMeasure(XFA_Attribute::W, false);
if (wValue && wValue->GetValue() > XFA_LAYOUT_FLOAT_PERCISION) {
containerSize.width = wValue->ToUnit(XFA_Unit::Pt);
*bContainerWidthAutoSize = false;
}
- pdfium::Optional<CXFA_Measurement> hValue =
+ Optional<CXFA_Measurement> hValue =
pFormNode->JSObject()->TryMeasure(XFA_Attribute::H, false);
if (hValue && hValue->GetValue() > XFA_LAYOUT_FLOAT_PERCISION) {
containerSize.height = hValue->ToUnit(XFA_Unit::Pt);
@@ -108,14 +108,14 @@ CFX_SizeF CalculateContainerSpecifiedSize(CXFA_Node* pFormNode,
}
if (*bContainerWidthAutoSize && eType == XFA_Element::Subform) {
- pdfium::Optional<CXFA_Measurement> maxW =
+ Optional<CXFA_Measurement> maxW =
pFormNode->JSObject()->TryMeasure(XFA_Attribute::MaxW, false);
if (maxW && maxW->GetValue() > XFA_LAYOUT_FLOAT_PERCISION) {
containerSize.width = maxW->ToUnit(XFA_Unit::Pt);
*bContainerWidthAutoSize = false;
}
- pdfium::Optional<CXFA_Measurement> maxH =
+ Optional<CXFA_Measurement> maxH =
pFormNode->JSObject()->TryMeasure(XFA_Attribute::MaxH, false);
if (maxH && maxH->GetValue() > XFA_LAYOUT_FLOAT_PERCISION) {
containerSize.height = maxH->ToUnit(XFA_Unit::Pt);
@@ -138,12 +138,12 @@ CFX_SizeF CalculateContainerComponentSizeFromContentSize(
if (bContainerWidthAutoSize) {
componentSize.width = fContentCalculatedWidth;
if (pMarginNode) {
- pdfium::Optional<CXFA_Measurement> leftInset =
+ Optional<CXFA_Measurement> leftInset =
pMarginNode->JSObject()->TryMeasure(XFA_Attribute::LeftInset, false);
if (leftInset)
componentSize.width += leftInset->ToUnit(XFA_Unit::Pt);
- pdfium::Optional<CXFA_Measurement> rightInset =
+ Optional<CXFA_Measurement> rightInset =
pMarginNode->JSObject()->TryMeasure(XFA_Attribute::RightInset, false);
if (rightInset)
componentSize.width += rightInset->ToUnit(XFA_Unit::Pt);
@@ -153,12 +153,12 @@ CFX_SizeF CalculateContainerComponentSizeFromContentSize(
if (bContainerHeightAutoSize) {
componentSize.height = fContentCalculatedHeight;
if (pMarginNode) {
- pdfium::Optional<CXFA_Measurement> topInset =
+ Optional<CXFA_Measurement> topInset =
pMarginNode->JSObject()->TryMeasure(XFA_Attribute::TopInset, false);
if (topInset)
componentSize.height += topInset->ToUnit(XFA_Unit::Pt);
- pdfium::Optional<CXFA_Measurement> bottomInset =
+ Optional<CXFA_Measurement> bottomInset =
pMarginNode->JSObject()->TryMeasure(XFA_Attribute::BottomInset,
false);
if (bottomInset)
@@ -504,7 +504,7 @@ float InsertPendingItems(CXFA_ItemLayoutProcessor* pProcessor,
XFA_AttributeEnum GetLayout(CXFA_Node* pFormNode, bool* bRootForceTb) {
*bRootForceTb = false;
- pdfium::Optional<XFA_AttributeEnum> layoutMode =
+ Optional<XFA_AttributeEnum> layoutMode =
pFormNode->JSObject()->TryEnum(XFA_Attribute::Layout, false);
if (layoutMode)
return *layoutMode;
@@ -537,7 +537,7 @@ bool ExistContainerKeep(CXFA_Node* pCurNode, bool bPreFind) {
if (!bPreFind)
eKeepType = XFA_Attribute::Next;
- pdfium::Optional<XFA_AttributeEnum> previous =
+ Optional<XFA_AttributeEnum> previous =
pKeep->JSObject()->TryEnum(eKeepType, false);
if (previous) {
if (*previous == XFA_AttributeEnum::ContentArea ||
@@ -555,7 +555,7 @@ bool ExistContainerKeep(CXFA_Node* pCurNode, bool bPreFind) {
if (!bPreFind)
eKeepType = XFA_Attribute::Previous;
- pdfium::Optional<XFA_AttributeEnum> next =
+ Optional<XFA_AttributeEnum> next =
pKeep->JSObject()->TryEnum(eKeepType, false);
if (!next)
return false;