From 8eb2722e764fff0a39d0d1dc0c59473aa938b31f Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 14 Dec 2017 21:04:13 +0000 Subject: Add type information to CJX_Object::GetProperty This CL adds a type template to the CJX_Object::GetProperty method so we can have the correct types returned. Change-Id: Ieda8ec4bd31d26a1e71af30f08b48eb826f5993d Reviewed-on: https://pdfium-review.googlesource.com/21250 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- fxjs/xfa/cjx_object.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'fxjs/xfa/cjx_object.cpp') diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp index fcf77d434d..304b861dcf 100644 --- a/fxjs/xfa/cjx_object.cpp +++ b/fxjs/xfa/cjx_object.cpp @@ -619,7 +619,8 @@ bool CJX_Object::SetContent(const WideString& wsContent, switch (ToNode(GetXFAObject())->GetObjectType()) { case XFA_ObjectType::ContainerNode: { if (XFA_FieldIsMultiListBox(ToNode(GetXFAObject()))) { - CXFA_Node* pValue = GetProperty(0, XFA_Element::Value, true); + CXFA_Value* pValue = + GetProperty(0, XFA_Element::Value, true); if (!pValue) break; @@ -703,7 +704,8 @@ bool CJX_Object::SetContent(const WideString& wsContent, if (ToNode(GetXFAObject())->GetElementType() == XFA_Element::ExclGroup) { pNode = ToNode(GetXFAObject()); } else { - CXFA_Node* pValue = GetProperty(0, XFA_Element::Value, true); + CXFA_Value* pValue = + GetProperty(0, XFA_Element::Value, true); if (!pValue) break; @@ -898,9 +900,9 @@ pdfium::Optional CJX_Object::TryNamespace() { return {static_cast(pXMLNode)->GetNamespaceURI()}; } -CXFA_Node* CJX_Object::GetProperty(int32_t index, - XFA_Element eProperty, - bool bCreateProperty) { +CXFA_Node* CJX_Object::GetPropertyInternal(int32_t index, + XFA_Element eProperty, + bool bCreateProperty) { if (index < 0 || index >= ToNode(GetXFAObject())->PropertyOccuranceCount(eProperty)) { return nullptr; -- cgit v1.2.3