summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_box.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-21 14:15:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-21 14:15:26 -0700
commit56a8b1944d555ed65dda97164b702a9a657485ca (patch)
tree0bfead2fa031b2c162a5992d29a11f872cf77135 /xfa/fxfa/parser/cxfa_box.cpp
parentbb8b63d6b762393e6e7460351375d596bdabef0c (diff)
downloadpdfium-56a8b1944d555ed65dda97164b702a9a657485ca.tar.xz
Convert XFA_ELEMENT to an enum class
This CL changes XFA_ELEMENT From an enum to an enum class. The type name was updated to XFA_Element. Review-Url: https://codereview.chromium.org/2089443002
Diffstat (limited to 'xfa/fxfa/parser/cxfa_box.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_box.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/cxfa_box.cpp b/xfa/fxfa/parser/cxfa_box.cpp
index fc57201750..cb5cf7f6b9 100644
--- a/xfa/fxfa/parser/cxfa_box.cpp
+++ b/xfa/fxfa/parser/cxfa_box.cpp
@@ -22,7 +22,7 @@ void GetStrokesInternal(CXFA_Node* pNode,
int32_t i, j;
for (i = 0, j = 0; i < 4; i++) {
CXFA_Corner corner =
- CXFA_Corner(pNode->GetProperty(i, XFA_ELEMENT_Corner, i == 0));
+ CXFA_Corner(pNode->GetProperty(i, XFA_Element::Corner, i == 0));
if (corner || i == 0)
strokes.SetAt(j, corner);
else if (bNULL)
@@ -35,7 +35,8 @@ void GetStrokesInternal(CXFA_Node* pNode,
strokes.SetAt(j, strokes[2]);
j++;
- CXFA_Edge edge = CXFA_Edge(pNode->GetProperty(i, XFA_ELEMENT_Edge, i == 0));
+ CXFA_Edge edge =
+ CXFA_Edge(pNode->GetProperty(i, XFA_Element::Edge, i == 0));
if (edge || i == 0)
strokes.SetAt(j, edge);
else if (bNULL)
@@ -94,12 +95,12 @@ int32_t CXFA_Box::GetPresence() const {
int32_t CXFA_Box::CountEdges() const {
if (!m_pNode)
return 0;
- return m_pNode->CountChildren(XFA_ELEMENT_Edge);
+ return m_pNode->CountChildren(XFA_Element::Edge);
}
CXFA_Edge CXFA_Box::GetEdge(int32_t nIndex) const {
return CXFA_Edge(
- m_pNode ? m_pNode->GetProperty(nIndex, XFA_ELEMENT_Edge, nIndex == 0)
+ m_pNode ? m_pNode->GetProperty(nIndex, XFA_Element::Edge, nIndex == 0)
: nullptr);
}
@@ -143,12 +144,12 @@ CXFA_Fill CXFA_Box::GetFill(FX_BOOL bModified) const {
if (!m_pNode)
return CXFA_Fill(nullptr);
- CXFA_Node* pFillNode = m_pNode->GetProperty(0, XFA_ELEMENT_Fill, bModified);
+ CXFA_Node* pFillNode = m_pNode->GetProperty(0, XFA_Element::Fill, bModified);
return CXFA_Fill(pFillNode);
}
CXFA_Margin CXFA_Box::GetMargin() const {
- return CXFA_Margin(m_pNode ? m_pNode->GetChild(0, XFA_ELEMENT_Margin)
+ return CXFA_Margin(m_pNode ? m_pNode->GetChild(0, XFA_Element::Margin)
: nullptr);
}