summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_document.cpp
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2018-04-16 21:24:57 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-16 21:24:57 +0000
commit8b0cf76f00c6e89e8bb7bf4bcf2189b27baac31c (patch)
treeec18d4aa800ccd9d32f113f8ec41d89948479ab3 /xfa/fxfa/parser/cxfa_document.cpp
parent262b496f25be27978abe7d98f20978820ecaeec8 (diff)
downloadpdfium-8b0cf76f00c6e89e8bb7bf4bcf2189b27baac31c.tar.xz
Merge CFX_XMLElement and CFX_XMLAttributeNode
CFX_XMLElement is the only subclass of CFX_XMLAttributeNode. This CL merges the two classes together. The {Set|Get}String method has been renamed to {Set|Get}Attribute to make it clearer what you're retrieving. Change-Id: I158c961d4d8c5f563d937a3e7a35321a33622562 Reviewed-on: https://pdfium-review.googlesource.com/30710 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_document.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_document.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp
index cdfb7b45a6..713e15c4fa 100644
--- a/xfa/fxfa/parser/cxfa_document.cpp
+++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -514,7 +514,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
pDataNode->JSObject()->SetCData(XFA_Attribute::ContentType,
wsContentType, false, false);
if (!wsHref.IsEmpty())
- pXMLDataElement->SetString(L"href", wsHref);
+ pXMLDataElement->SetAttribute(L"href", wsHref);
break;
}
@@ -537,8 +537,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
} else {
CFX_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode();
ASSERT(pXMLNode->GetType() == FX_XMLNODE_Element);
- static_cast<CFX_XMLElement*>(pXMLNode)->SetString(L"xfa:dataNode",
- L"dataGroup");
+ static_cast<CFX_XMLElement*>(pXMLNode)->SetAttribute(
+ L"xfa:dataNode", L"dataGroup");
}
} else if (!wsValue.IsEmpty()) {
pDataNode->JSObject()->SetAttributeValue(
@@ -657,14 +657,14 @@ void CreateDataBinding(CXFA_Node* pFormNode,
ASSERT(pXMLDataElement);
WideString wsContentType =
- pXMLDataElement->GetString(L"xfa:contentType");
+ pXMLDataElement->GetAttribute(L"xfa:contentType");
if (!wsContentType.IsEmpty()) {
pDataNode->JSObject()->SetCData(XFA_Attribute::ContentType,
wsContentType, false, false);
image->SetContentType(wsContentType);
}
- WideString wsHref = pXMLDataElement->GetString(L"href");
+ WideString wsHref = pXMLDataElement->GetAttribute(L"href");
if (!wsHref.IsEmpty())
image->SetHref(wsHref);
}
@@ -1625,8 +1625,8 @@ void CXFA_Document::DoDataMerge() {
if (!pDatasetsRoot) {
// Ownership will be passed in the AppendChild below to the XML tree.
auto pDatasetsXMLNode = pdfium::MakeUnique<CFX_XMLElement>(L"xfa:datasets");
- pDatasetsXMLNode->SetString(L"xmlns:xfa",
- L"http://www.xfa.org/schema/xfa-data/1.0/");
+ pDatasetsXMLNode->SetAttribute(L"xmlns:xfa",
+ L"http://www.xfa.org/schema/xfa-data/1.0/");
pDatasetsRoot =
CreateNode(XFA_PacketType::Datasets, XFA_Element::DataModel);
pDatasetsRoot->JSObject()->SetCData(XFA_Attribute::Name, L"datasets", false,