summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-12-14 21:04:13 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-14 21:04:13 +0000
commit8eb2722e764fff0a39d0d1dc0c59473aa938b31f (patch)
tree0141be0ac4398c1c57b5ab2ed1ca0a77b1f11dc2 /xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
parentdf4f30eaaa469c3703118f89579d506209a49237 (diff)
downloadpdfium-8eb2722e764fff0a39d0d1dc0c59473aa938b31f.tar.xz
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 <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/xfa_document_datamerger_imp.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index 6b7488c4a7..551f9df3fa 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -60,7 +60,7 @@ CXFA_Node* FormValueNode_CreateChild(CXFA_Node* pValueNode, XFA_Element iType) {
if (!pChildNode) {
if (iType == XFA_Element::Unknown)
return nullptr;
- pChildNode = pValueNode->JSObject()->GetProperty(0, iType, true);
+ pChildNode = pValueNode->JSObject()->GetProperty<CXFA_Node>(0, iType, true);
}
return pChildNode;
}
@@ -132,8 +132,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
CXFA_WidgetData* pWidgetData = pFormNode->GetWidgetData();
ASSERT(pWidgetData);
XFA_Element eUIType = pWidgetData->GetUIType();
- auto* defValue = static_cast<CXFA_Value*>(
- pFormNode->JSObject()->GetProperty(0, XFA_Element::Value, true));
+ auto* defValue = pFormNode->JSObject()->GetProperty<CXFA_Value>(
+ 0, XFA_Element::Value, true);
if (!bDataToForm) {
WideString wsValue;
switch (eUIType) {
@@ -240,8 +240,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
if (pChild->GetElementType() != XFA_Element::Field)
continue;
- CXFA_Node* pValue =
- pChild->JSObject()->GetProperty(0, XFA_Element::Value, true);
+ CXFA_Value* pValue = pChild->JSObject()->GetProperty<CXFA_Value>(
+ 0, XFA_Element::Value, true);
CXFA_Items* pItems =
pChild->GetChild<CXFA_Items>(0, XFA_Element::Items, false);
CXFA_Node* pText =
@@ -265,8 +265,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
wsValue = pWidgetData->NormalizeNumStr(wsValue);
pDataNode->JSObject()->SetAttributeValue(
wsValue, pWidgetData->GetFormatDataValue(wsValue), false, false);
- CXFA_Node* pValue =
- pFormNode->JSObject()->GetProperty(0, XFA_Element::Value, true);
+ CXFA_Value* pValue = pFormNode->JSObject()->GetProperty<CXFA_Value>(
+ 0, XFA_Element::Value, true);
FormValueNode_SetChildContent(pValue, wsValue, XFA_Element::Float);
break;
}