summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_linear.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_linear.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_linear.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/xfa/fxfa/parser/cxfa_linear.cpp b/xfa/fxfa/parser/cxfa_linear.cpp
index 5ca27916ae..f5b605dcb8 100644
--- a/xfa/fxfa/parser/cxfa_linear.cpp
+++ b/xfa/fxfa/parser/cxfa_linear.cpp
@@ -8,6 +8,7 @@
#include "fxjs/xfa/cjx_linear.h"
#include "third_party/base/ptr_util.h"
+#include "xfa/fxfa/parser/cxfa_color.h"
namespace {
@@ -38,3 +39,13 @@ CXFA_Linear::CXFA_Linear(CXFA_Document* doc, XFA_PacketType packet)
pdfium::MakeUnique<CJX_Linear>(this)) {}
CXFA_Linear::~CXFA_Linear() {}
+
+XFA_AttributeEnum CXFA_Linear::GetType() {
+ return JSObject()
+ ->TryEnum(XFA_Attribute::Type, true)
+ .value_or(XFA_AttributeEnum::ToRight);
+}
+
+CXFA_Color* CXFA_Linear::GetColorIfExists() {
+ return GetChild<CXFA_Color>(0, XFA_Element::Color, false);
+}