From b415ffb47de6e58603db2a01027aa879c0126b24 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 7 Nov 2017 20:06:01 +0000 Subject: Rename CXFA_Edge to CXFA_EdgeData This CL renames CXFA_Edge to CXFA_EdgeData to make it clear it's part of the data hierarchy. Change-Id: Id67526cafe1927803c36159b106656c32e770d6b Reviewed-on: https://pdfium-review.googlesource.com/17979 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_boxdata.cpp | 16 ++++++++-------- xfa/fxfa/parser/cxfa_boxdata.h | 4 ++-- xfa/fxfa/parser/cxfa_edge.h | 19 ------------------- xfa/fxfa/parser/cxfa_edgedata.h | 19 +++++++++++++++++++ xfa/fxfa/parser/cxfa_line.cpp | 4 ++-- xfa/fxfa/parser/cxfa_line.h | 4 ++-- 6 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 xfa/fxfa/parser/cxfa_edge.h create mode 100644 xfa/fxfa/parser/cxfa_edgedata.h (limited to 'xfa/fxfa/parser') diff --git a/xfa/fxfa/parser/cxfa_boxdata.cpp b/xfa/fxfa/parser/cxfa_boxdata.cpp index 51fadffd79..607a1571dc 100644 --- a/xfa/fxfa/parser/cxfa_boxdata.cpp +++ b/xfa/fxfa/parser/cxfa_boxdata.cpp @@ -33,10 +33,10 @@ void GetStrokesInternal(CXFA_Node* pNode, (*strokes)[j] = (*strokes)[2]; } j++; - CXFA_Edge edge = - CXFA_Edge(pNode->JSNode()->GetProperty(i, XFA_Element::Edge, i == 0)); - if (edge || i == 0) { - (*strokes)[j] = edge; + CXFA_EdgeData edgeData = CXFA_EdgeData( + pNode->JSNode()->GetProperty(i, XFA_Element::Edge, i == 0)); + if (edgeData || i == 0) { + (*strokes)[j] = edgeData; } else if (!bNull) { if (i == 1 || i == 2) (*strokes)[j] = (*strokes)[1]; @@ -93,10 +93,10 @@ int32_t CXFA_BoxData::CountEdges() const { return m_pNode->CountChildren(XFA_Element::Edge, false); } -CXFA_Edge CXFA_BoxData::GetEdge(int32_t nIndex) const { - return CXFA_Edge(m_pNode ? m_pNode->JSNode()->GetProperty( - nIndex, XFA_Element::Edge, nIndex == 0) - : nullptr); +CXFA_EdgeData CXFA_BoxData::GetEdgeData(int32_t nIndex) const { + return CXFA_EdgeData(m_pNode ? m_pNode->JSNode()->GetProperty( + nIndex, XFA_Element::Edge, nIndex == 0) + : nullptr); } void CXFA_BoxData::GetStrokes(std::vector* strokes) const { diff --git a/xfa/fxfa/parser/cxfa_boxdata.h b/xfa/fxfa/parser/cxfa_boxdata.h index b664479a28..384d4c1e00 100644 --- a/xfa/fxfa/parser/cxfa_boxdata.h +++ b/xfa/fxfa/parser/cxfa_boxdata.h @@ -11,7 +11,7 @@ #include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_data.h" -#include "xfa/fxfa/parser/cxfa_edge.h" +#include "xfa/fxfa/parser/cxfa_edgedata.h" #include "xfa/fxfa/parser/cxfa_fill.h" #include "xfa/fxfa/parser/cxfa_margin.h" @@ -29,7 +29,7 @@ class CXFA_BoxData : public CXFA_Data { int32_t GetHand() const; int32_t GetPresence() const; int32_t CountEdges() const; - CXFA_Edge GetEdge(int32_t nIndex = 0) const; + CXFA_EdgeData GetEdgeData(int32_t nIndex = 0) const; void GetStrokes(std::vector* strokes) const; bool IsCircular() const; bool GetStartAngle(float& fStartAngle) const; diff --git a/xfa/fxfa/parser/cxfa_edge.h b/xfa/fxfa/parser/cxfa_edge.h deleted file mode 100644 index 96e725f4c6..0000000000 --- a/xfa/fxfa/parser/cxfa_edge.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_FXFA_PARSER_CXFA_EDGE_H_ -#define XFA_FXFA_PARSER_CXFA_EDGE_H_ - -#include "xfa/fxfa/parser/cxfa_stroke.h" - -class CXFA_Node; - -class CXFA_Edge : public CXFA_Stroke { - public: - explicit CXFA_Edge(CXFA_Node* pNode) : CXFA_Stroke(pNode) {} -}; - -#endif // XFA_FXFA_PARSER_CXFA_EDGE_H_ diff --git a/xfa/fxfa/parser/cxfa_edgedata.h b/xfa/fxfa/parser/cxfa_edgedata.h new file mode 100644 index 0000000000..5e9ebf3db5 --- /dev/null +++ b/xfa/fxfa/parser/cxfa_edgedata.h @@ -0,0 +1,19 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef XFA_FXFA_PARSER_CXFA_EDGEDATA_H_ +#define XFA_FXFA_PARSER_CXFA_EDGEDATA_H_ + +#include "xfa/fxfa/parser/cxfa_stroke.h" + +class CXFA_Node; + +class CXFA_EdgeData : public CXFA_Stroke { + public: + explicit CXFA_EdgeData(CXFA_Node* pNode) : CXFA_Stroke(pNode) {} +}; + +#endif // XFA_FXFA_PARSER_CXFA_EDGEDATA_H_ diff --git a/xfa/fxfa/parser/cxfa_line.cpp b/xfa/fxfa/parser/cxfa_line.cpp index 85f38a2822..5216bd4622 100644 --- a/xfa/fxfa/parser/cxfa_line.cpp +++ b/xfa/fxfa/parser/cxfa_line.cpp @@ -17,6 +17,6 @@ bool CXFA_Line::GetSlope() { XFA_ATTRIBUTEENUM_Slash; } -CXFA_Edge CXFA_Line::GetEdge() { - return CXFA_Edge(m_pNode->GetChild(0, XFA_Element::Edge, false)); +CXFA_EdgeData CXFA_Line::GetEdgeData() { + return CXFA_EdgeData(m_pNode->GetChild(0, XFA_Element::Edge, false)); } diff --git a/xfa/fxfa/parser/cxfa_line.h b/xfa/fxfa/parser/cxfa_line.h index f014cc0618..b167e39810 100644 --- a/xfa/fxfa/parser/cxfa_line.h +++ b/xfa/fxfa/parser/cxfa_line.h @@ -9,7 +9,7 @@ #include "core/fxcrt/fx_system.h" #include "xfa/fxfa/parser/cxfa_data.h" -#include "xfa/fxfa/parser/cxfa_edge.h" +#include "xfa/fxfa/parser/cxfa_edgedata.h" class CXFA_Node; @@ -19,7 +19,7 @@ class CXFA_Line : public CXFA_Data { int32_t GetHand(); bool GetSlope(); - CXFA_Edge GetEdge(); + CXFA_EdgeData GetEdgeData(); }; #endif // XFA_FXFA_PARSER_CXFA_LINE_H_ -- cgit v1.2.3