Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1936)

Unified Diff: xfa/fxfa/parser/cxfa_box.cpp

Issue 2089443002: Convert XFA_ELEMENT to an enum class (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: More unknown checks Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/parser/cxfa_box.h ('k') | xfa/fxfa/parser/cxfa_calculate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/cxfa_box.cpp
diff --git a/xfa/fxfa/parser/cxfa_box.cpp b/xfa/fxfa/parser/cxfa_box.cpp
index fc572017506597191a3e79fc4cef35064bb037b5..cb5cf7f6b9a3652ab03385cb464b3fe5bddbe1f6 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);
}
« no previous file with comments | « xfa/fxfa/parser/cxfa_box.h ('k') | xfa/fxfa/parser/cxfa_calculate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698