From 4f88617ad2a4d352af87b95c2f7293d12e7bd2c8 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 3 Jan 2018 16:21:33 -0500 Subject: Fold CXFA_LineData into CXFA_Line This CL merges the CXFA_LineData wrapper into CXFA_Line. Change-Id: If5299797a615d2c0abb661e72a9e036e69f96385 Reviewed-on: https://pdfium-review.googlesource.com/22112 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_line.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'xfa/fxfa/parser/cxfa_line.cpp') diff --git a/xfa/fxfa/parser/cxfa_line.cpp b/xfa/fxfa/parser/cxfa_line.cpp index cc7b6ee071..d4159c3f72 100644 --- a/xfa/fxfa/parser/cxfa_line.cpp +++ b/xfa/fxfa/parser/cxfa_line.cpp @@ -8,6 +8,8 @@ #include "fxjs/xfa/cjx_line.h" #include "third_party/base/ptr_util.h" +#include "xfa/fxfa/parser/cxfa_edge.h" +#include "xfa/fxfa/parser/cxfa_node.h" namespace { @@ -39,3 +41,15 @@ CXFA_Line::CXFA_Line(CXFA_Document* doc, XFA_PacketType packet) pdfium::MakeUnique(this)) {} CXFA_Line::~CXFA_Line() {} + +XFA_AttributeEnum CXFA_Line::GetHand() { + return JSObject()->GetEnum(XFA_Attribute::Hand); +} + +bool CXFA_Line::GetSlope() { + return JSObject()->GetEnum(XFA_Attribute::Slope) == XFA_AttributeEnum::Slash; +} + +CXFA_Edge* CXFA_Line::GetEdge() { + return GetChild(0, XFA_Element::Edge, false); +} -- cgit v1.2.3