summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fxjs/cjx_node.cpp10
-rw-r--r--fxjs/cjx_node.h4
-rw-r--r--xfa/fxfa/cxfa_ffwidgethandler.cpp6
-rw-r--r--xfa/fxfa/cxfa_widgetacc.cpp5
-rw-r--r--xfa/fxfa/parser/cxfa_binditems.cpp3
-rw-r--r--xfa/fxfa/parser/cxfa_exdata.cpp3
-rw-r--r--xfa/fxfa/parser/cxfa_fill.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_image.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.cpp78
-rw-r--r--xfa/fxfa/parser/cxfa_stroke.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_validate.cpp3
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp37
12 files changed, 97 insertions, 62 deletions
diff --git a/fxjs/cjx_node.cpp b/fxjs/cjx_node.cpp
index c6e60933f0..1724881c55 100644
--- a/fxjs/cjx_node.cpp
+++ b/fxjs/cjx_node.cpp
@@ -218,7 +218,7 @@ bool CJX_Node::SetAttribute(XFA_ATTRIBUTE eAttr,
bNotify);
} break;
case XFA_ATTRIBUTETYPE_Cdata:
- return SetCData(pAttr->eName, WideString(wsValue), bNotify);
+ return SetCData(pAttr->eName, WideString(wsValue), bNotify, false);
case XFA_ATTRIBUTETYPE_Boolean:
return SetBoolean(pAttr->eName, wsValue != L"0", bNotify);
case XFA_ATTRIBUTETYPE_Integer:
@@ -752,7 +752,7 @@ void CJX_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) {
WideStringView wsContentType = GetCData(XFA_ATTRIBUTE_ContentType);
if (!wsContentType.IsEmpty()) {
pFakeRoot->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType,
- WideString(wsContentType));
+ WideString(wsContentType), false, false);
}
std::unique_ptr<CFX_XMLNode> pFakeXMLRoot(pFakeRoot->GetXMLMappingNode());
@@ -3333,7 +3333,8 @@ bool CJX_Node::SetScriptContent(const WideString& wsContent,
CXFA_Node* pChildValue = pValue->GetNodeItem(XFA_NODEITEM_FirstChild);
ASSERT(pChildValue);
- pChildValue->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, L"text/xml");
+ pChildValue->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, L"text/xml",
+ false, false);
pChildValue->JSNode()->SetScriptContent(wsContent, wsContent, bNotify,
bScriptModify, false);
CXFA_Node* pBind = GetXFANode()->GetBindData();
@@ -3375,7 +3376,8 @@ bool CJX_Node::SetScriptContent(const WideString& wsContent,
while (iAddNodes-- > 0) {
pValueNodes =
pBind->CreateSamePacketNode(XFA_Element::DataValue);
- pValueNodes->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"value");
+ pValueNodes->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"value",
+ false, false);
pValueNodes->CreateXMLMappingNode();
pBind->InsertChild(pValueNodes);
}
diff --git a/fxjs/cjx_node.h b/fxjs/cjx_node.h
index df360011a4..7df789df50 100644
--- a/fxjs/cjx_node.h
+++ b/fxjs/cjx_node.h
@@ -88,8 +88,8 @@ class CJX_Node : public CJX_Object {
bool TryCData(XFA_ATTRIBUTE eAttr, WideString& wsValue, bool bUseDefault);
bool SetCData(XFA_ATTRIBUTE eAttr,
const WideString& wsValue,
- bool bNotify = false,
- bool bScriptModify = false);
+ bool bNotify,
+ bool bScriptModify);
WideStringView GetCData(XFA_ATTRIBUTE eAttr);
bool TryContent(WideString& wsContent,
diff --git a/xfa/fxfa/cxfa_ffwidgethandler.cpp b/xfa/fxfa/cxfa_ffwidgethandler.cpp
index e7221f9d4a..37d1adab08 100644
--- a/xfa/fxfa/cxfa_ffwidgethandler.cpp
+++ b/xfa/fxfa/cxfa_ffwidgethandler.cpp
@@ -332,7 +332,8 @@ CXFA_Node* CXFA_FFWidgetHandler::CreatePushButton(CXFA_Node* pParent,
CXFA_Node* pFill = CreateCopyNode(XFA_Element::Fill, pBorder);
CXFA_Node* pColor = CreateCopyNode(XFA_Element::Color, pFill);
- pColor->JSNode()->SetCData(XFA_ATTRIBUTE_Value, L"212, 208, 200", false);
+ pColor->JSNode()->SetCData(XFA_ATTRIBUTE_Value, L"212, 208, 200", false,
+ false);
CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField);
pBind->JSNode()->SetEnum(XFA_ATTRIBUTE_Match, XFA_ATTRIBUTEENUM_None);
@@ -506,7 +507,8 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateTemplateNode(XFA_Element eElement,
CXFA_Node* CXFA_FFWidgetHandler::CreateFontNode(CXFA_Node* pParent) const {
CXFA_Node* pFont = CreateCopyNode(XFA_Element::Font, pParent);
- pFont->JSNode()->SetCData(XFA_ATTRIBUTE_Typeface, L"Myriad Pro", false);
+ pFont->JSNode()->SetCData(XFA_ATTRIBUTE_Typeface, L"Myriad Pro", false,
+ false);
return pFont;
}
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp
index af29535dce..ffc645bd03 100644
--- a/xfa/fxfa/cxfa_widgetacc.cpp
+++ b/xfa/fxfa/cxfa_widgetacc.cpp
@@ -263,10 +263,11 @@ void CXFA_WidgetAcc::SetImageEdit(const WideString& wsContentType,
image.SetTransferEncoding(XFA_ATTRIBUTEENUM_Base64);
return;
}
- pBind->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
+ pBind->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType, false,
+ false);
CXFA_Node* pHrefNode = pBind->GetNodeItem(XFA_NODEITEM_FirstChild);
if (pHrefNode) {
- pHrefNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsHref);
+ pHrefNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsHref, false, false);
} else {
CFX_XMLNode* pXMLNode = pBind->GetXMLMappingNode();
ASSERT(pXMLNode && pXMLNode->GetType() == FX_XMLNODE_Element);
diff --git a/xfa/fxfa/parser/cxfa_binditems.cpp b/xfa/fxfa/parser/cxfa_binditems.cpp
index c9d224050f..578ed4664f 100644
--- a/xfa/fxfa/parser/cxfa_binditems.cpp
+++ b/xfa/fxfa/parser/cxfa_binditems.cpp
@@ -23,5 +23,6 @@ void CXFA_BindItems::GetRef(WideStringView& wsRef) {
}
bool CXFA_BindItems::SetConnection(const WideString& wsConnection) {
- return m_pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Connection, wsConnection);
+ return m_pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Connection, wsConnection,
+ false, false);
}
diff --git a/xfa/fxfa/parser/cxfa_exdata.cpp b/xfa/fxfa/parser/cxfa_exdata.cpp
index 89a6c34f5f..17c2f263a5 100644
--- a/xfa/fxfa/parser/cxfa_exdata.cpp
+++ b/xfa/fxfa/parser/cxfa_exdata.cpp
@@ -11,5 +11,6 @@
CXFA_ExData::CXFA_ExData(CXFA_Node* pNode) : CXFA_Data(pNode) {}
bool CXFA_ExData::SetContentType(const WideString& wsContentType) {
- return m_pNode->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
+ return m_pNode->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType,
+ false, false);
}
diff --git a/xfa/fxfa/parser/cxfa_fill.cpp b/xfa/fxfa/parser/cxfa_fill.cpp
index 96290bc821..8938a1935e 100644
--- a/xfa/fxfa/parser/cxfa_fill.cpp
+++ b/xfa/fxfa/parser/cxfa_fill.cpp
@@ -26,7 +26,7 @@ void CXFA_Fill::SetColor(FX_ARGB color) {
int b;
std::tie(a, r, g, b) = ArgbDecode(color);
wsColor.Format(L"%d,%d,%d", r, g, b);
- pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsColor);
+ pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsColor, false, false);
}
FX_ARGB CXFA_Fill::GetColor(bool bText) {
diff --git a/xfa/fxfa/parser/cxfa_image.cpp b/xfa/fxfa/parser/cxfa_image.cpp
index b0afca0d68..08a10884f4 100644
--- a/xfa/fxfa/parser/cxfa_image.cpp
+++ b/xfa/fxfa/parser/cxfa_image.cpp
@@ -37,12 +37,14 @@ bool CXFA_Image::GetContent(WideString& wsText) {
}
bool CXFA_Image::SetContentType(const WideString& wsContentType) {
- return m_pNode->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
+ return m_pNode->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType,
+ false, false);
}
bool CXFA_Image::SetHref(const WideString& wsHref) {
if (m_bDefValue)
- return m_pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Href, wsHref);
+ return m_pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Href, wsHref, false,
+ false);
return m_pNode->JSNode()->SetAttribute(XFA_ATTRIBUTE_Href,
wsHref.AsStringView(), false);
}
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp
index c129214a50..7758ef2ab9 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp
@@ -353,11 +353,13 @@ void CXFA_SimpleParser::ConstructXFANode(CXFA_Node* pXFANode,
CFX_XMLElement* child = static_cast<CFX_XMLElement*>(pXMLChild);
WideString wsNodeStr = child->GetLocalTagName();
- pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsNodeStr);
+ pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsNodeStr, false,
+ false);
WideString wsChildValue;
XFA_GetPlainTextFromRichText(child, wsChildValue);
if (!wsChildValue.IsEmpty())
- pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsChildValue);
+ pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsChildValue,
+ false, false);
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLChild);
@@ -458,14 +460,16 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP(
return nullptr;
m_pRootNode = pXFARootNode;
- pXFARootNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"xfa");
+ pXFARootNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"xfa", false, false);
CFX_XMLElement* pElement = static_cast<CFX_XMLElement*>(pXMLDocumentNode);
for (auto it : pElement->GetAttributes()) {
if (it.first == L"uuid")
- pXFARootNode->JSNode()->SetCData(XFA_ATTRIBUTE_Uuid, it.second);
+ pXFARootNode->JSNode()->SetCData(XFA_ATTRIBUTE_Uuid, it.second, false,
+ false);
else if (it.first == L"timeStamp")
- pXFARootNode->JSNode()->SetCData(XFA_ATTRIBUTE_TimeStamp, it.second);
+ pXFARootNode->JSNode()->SetCData(XFA_ATTRIBUTE_TimeStamp, it.second,
+ false, false);
}
CFX_XMLNode* pXMLConfigDOMRoot = nullptr;
@@ -584,7 +588,8 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Config(
return nullptr;
pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name,
- XFA_GetPacketByIndex(XFA_PACKET_Config)->pName);
+ XFA_GetPacketByIndex(XFA_PACKET_Config)->pName,
+ false, false);
if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, true))
return nullptr;
@@ -607,7 +612,8 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_TemplateForm(
return nullptr;
pNode->JSNode()->SetCData(
- XFA_ATTRIBUTE_Name, XFA_GetPacketByIndex(XFA_PACKET_Template)->pName);
+ XFA_ATTRIBUTE_Name, XFA_GetPacketByIndex(XFA_PACKET_Template)->pName,
+ false, false);
if (m_bDocumentParser) {
CFX_XMLElement* pXMLDocumentElement =
static_cast<CFX_XMLElement*>(pXMLDocumentNode);
@@ -649,7 +655,8 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_TemplateForm(
return nullptr;
pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name,
- XFA_GetPacketByIndex(XFA_PACKET_Form)->pName);
+ XFA_GetPacketByIndex(XFA_PACKET_Form)->pName,
+ false, false);
pNode->JSNode()->SetAttribute(XFA_ATTRIBUTE_Checksum,
wsChecksum.AsStringView(), false);
CXFA_Node* pTemplateRoot =
@@ -685,7 +692,8 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Data(
return nullptr;
pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name,
- XFA_GetPacketByIndex(XFA_PACKET_Datasets)->pName);
+ XFA_GetPacketByIndex(XFA_PACKET_Datasets)->pName,
+ false, false);
if (!DataLoader(pNode, pDatasetsXMLNode, false))
return nullptr;
@@ -726,7 +734,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Data(
}
WideString wsLocalName =
static_cast<CFX_XMLElement*>(pDataXMLNode)->GetLocalTagName();
- pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsLocalName);
+ pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsLocalName, false, false);
if (!DataLoader(pNode, pDataXMLNode, true))
return nullptr;
@@ -753,8 +761,8 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_LocaleConnectionSourceSet(
return nullptr;
pNode->JSNode()->SetCData(
- XFA_ATTRIBUTE_Name,
- XFA_GetPacketByIndex(XFA_PACKET_LocaleSet)->pName);
+ XFA_ATTRIBUTE_Name, XFA_GetPacketByIndex(XFA_PACKET_LocaleSet)->pName,
+ false, false);
if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, true))
return nullptr;
}
@@ -770,7 +778,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_LocaleConnectionSourceSet(
pNode->JSNode()->SetCData(
XFA_ATTRIBUTE_Name,
- XFA_GetPacketByIndex(XFA_PACKET_ConnectionSet)->pName);
+ XFA_GetPacketByIndex(XFA_PACKET_ConnectionSet)->pName, false, false);
if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, true))
return nullptr;
}
@@ -785,8 +793,8 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_LocaleConnectionSourceSet(
return nullptr;
pNode->JSNode()->SetCData(
- XFA_ATTRIBUTE_Name,
- XFA_GetPacketByIndex(XFA_PACKET_SourceSet)->pName);
+ XFA_ATTRIBUTE_Name, XFA_GetPacketByIndex(XFA_PACKET_SourceSet)->pName,
+ false, false);
if (!NormalLoader(pNode, pXMLDocumentNode, ePacketID, true))
return nullptr;
}
@@ -811,7 +819,8 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Xdc(
return nullptr;
pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name,
- XFA_GetPacketByIndex(XFA_PACKET_Xdc)->pName);
+ XFA_GetPacketByIndex(XFA_PACKET_Xdc)->pName, false,
+ false);
pNode->SetXMLMappingNode(pXMLDocumentNode);
return pNode;
}
@@ -826,7 +835,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_User(
WideString wsName =
static_cast<CFX_XMLElement*>(pXMLDocumentNode)->GetLocalTagName();
- pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsName);
+ pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsName, false, false);
if (!UserPacketLoader(pNode, pXMLDocumentNode))
return nullptr;
@@ -980,10 +989,11 @@ void CXFA_SimpleParser::ParseContentNode(CXFA_Node* pXFANode,
CXFA_Node* pContentRawDataNode =
m_pFactory->CreateNode(ePacketID, element);
ASSERT(pContentRawDataNode);
- pContentRawDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsValue);
+ pContentRawDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsValue,
+ false, false);
pXFANode->InsertChild(pContentRawDataNode);
} else {
- pXFANode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsValue);
+ pXFANode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsValue, false, false);
}
}
}
@@ -1049,8 +1059,8 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
if (!pXFAChild)
return;
- pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Name,
- pXMLElement->GetLocalTagName());
+ pXFAChild->JSNode()->SetCData(
+ XFA_ATTRIBUTE_Name, pXMLElement->GetLocalTagName(), false, false);
bool bNeedValue = true;
for (auto it : pXMLElement->GetAttributes()) {
@@ -1075,10 +1085,12 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
if (!pXFAMetaData)
return;
- pXFAMetaData->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsName);
+ pXFAMetaData->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsName, false,
+ false);
pXFAMetaData->JSNode()->SetCData(XFA_ATTRIBUTE_QualifiedName,
- it.first);
- pXFAMetaData->JSNode()->SetCData(XFA_ATTRIBUTE_Value, it.second);
+ it.first, false, false);
+ pXFAMetaData->JSNode()->SetCData(XFA_ATTRIBUTE_Value, it.second,
+ false, false);
pXFAMetaData->JSNode()->SetEnum(XFA_ATTRIBUTE_Contains,
XFA_ATTRIBUTEENUM_MetaData);
pXFAChild->InsertChild(pXFAMetaData);
@@ -1112,7 +1124,8 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode,
if (!pXFAChild)
return;
- pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsText);
+ pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsText, false,
+ false);
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLText);
pXFAChild->SetFlag(XFA_NodeFlag_Initialized, false);
@@ -1162,8 +1175,9 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
if (!pXFAChild)
return;
- pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"");
- pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsCurValue);
+ pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"", false, false);
+ pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsCurValue, false,
+ false);
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLCurValueNode);
pXFAChild->SetFlag(XFA_NodeFlag_Initialized, false);
@@ -1179,7 +1193,8 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
WideString wsNodeStr =
static_cast<CFX_XMLElement*>(pXMLChild)->GetLocalTagName();
- pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsNodeStr);
+ pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsNodeStr, false,
+ false);
ParseDataValue(pXFAChild, pXMLChild, ePacketID);
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLChild);
@@ -1198,8 +1213,9 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
if (!pXFAChild)
return;
- pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"");
- pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsCurValue);
+ pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"", false, false);
+ pXFAChild->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsCurValue, false,
+ false);
pXFANode->InsertChild(pXFAChild);
pXFAChild->SetXMLMappingNode(pXMLCurValueNode);
pXFAChild->SetFlag(XFA_NodeFlag_Initialized, false);
@@ -1210,7 +1226,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode,
pXMLCurValueNode = nullptr;
}
WideString wsNodeValue = wsValueTextBuf.MakeString();
- pXFANode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsNodeValue);
+ pXFANode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsNodeValue, false, false);
}
void CXFA_SimpleParser::ParseInstruction(CXFA_Node* pXFANode,
diff --git a/xfa/fxfa/parser/cxfa_stroke.cpp b/xfa/fxfa/parser/cxfa_stroke.cpp
index 062e2e8da0..b83fc79119 100644
--- a/xfa/fxfa/parser/cxfa_stroke.cpp
+++ b/xfa/fxfa/parser/cxfa_stroke.cpp
@@ -70,7 +70,7 @@ void CXFA_Stroke::SetColor(FX_ARGB argb) {
int b;
std::tie(a, r, g, b) = ArgbDecode(argb);
wsColor.Format(L"%d,%d,%d", r, g, b);
- pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsColor);
+ pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsColor, false, false);
}
int32_t CXFA_Stroke::GetJoinType() const {
diff --git a/xfa/fxfa/parser/cxfa_validate.cpp b/xfa/fxfa/parser/cxfa_validate.cpp
index 0df92d310c..60837161d7 100644
--- a/xfa/fxfa/parser/cxfa_validate.cpp
+++ b/xfa/fxfa/parser/cxfa_validate.cpp
@@ -100,7 +100,8 @@ void CXFA_Validate::SetMessageText(WideString& wsMessage,
}
CXFA_Node* pTextNode = pNode->CreateSamePacketNode(XFA_Element::Text);
pNode->InsertChild(pTextNode);
- pTextNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsMessageType, false);
+ pTextNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsMessageType, false,
+ false);
pTextNode->JSNode()->SetContent(wsMessage, wsMessage, false, false, true);
}
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index a259432dfb..ee9e78f0e3 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -101,13 +101,15 @@ bool FormValueNode_SetChildContent(CXFA_Node* pValueNode,
pContentRawDataNode = pChildNode->CreateSamePacketNode(element);
pChildNode->InsertChild(pContentRawDataNode);
}
- pContentRawDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsContent);
+ pContentRawDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsContent,
+ false, false);
break;
}
case XFA_ObjectType::NodeC:
case XFA_ObjectType::TextNode:
case XFA_ObjectType::NodeV: {
- pChildNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsContent);
+ pChildNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsContent, false,
+ false);
break;
}
default:
@@ -150,7 +152,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
pWidgetData->GetFormatDataValue(wsValue, wsFormattedValue);
pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue, false,
false);
- pDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
+ pDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType,
+ false, false);
if (!wsHref.IsEmpty())
pXMLDataElement->SetString(L"href", wsHref);
@@ -165,10 +168,12 @@ void CreateDataBinding(CXFA_Node* pFormNode,
for (const auto& text : wsSelTextArray) {
CXFA_Node* pValue =
pDataNode->CreateSamePacketNode(XFA_Element::DataValue);
- pValue->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"value");
+ pValue->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"value", false,
+ false);
pValue->CreateXMLMappingNode();
pDataNode->InsertChild(pValue);
- pValue->JSNode()->SetCData(XFA_ATTRIBUTE_Value, text);
+ pValue->JSNode()->SetCData(XFA_ATTRIBUTE_Value, text, false,
+ false);
}
} else {
CFX_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode();
@@ -222,7 +227,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
wsFormattedValue = wsValue;
pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue,
false, false);
- pFormNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsContent);
+ pFormNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsContent, false,
+ false);
break;
}
}
@@ -301,7 +307,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
pXMLDataElement->GetString(L"xfa:contentType");
if (!wsContentType.IsEmpty()) {
pDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType,
- wsContentType);
+ wsContentType, false, false);
image.SetContentType(wsContentType);
}
@@ -548,7 +554,8 @@ CXFA_Node* CloneOrMergeInstanceManager(CXFA_Document* pDocument,
pDocument->CreateNode(XFA_XDPPACKET_Form, XFA_Element::InstanceManager);
wsInstMgrNodeName =
L"_" + pTemplateNode->JSNode()->GetCData(XFA_ATTRIBUTE_Name);
- pNewNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsInstMgrNodeName);
+ pNewNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsInstMgrNodeName, false,
+ false);
pFormParent->InsertChild(pNewNode, nullptr);
pNewNode->SetTemplateNode(pTemplateNode);
return pNewNode;
@@ -1024,7 +1031,7 @@ CXFA_Node* MaybeCreateDataNode(CXFA_Document* pDocument,
if (!pParentDDNode) {
CXFA_Node* pDataNode =
pDocument->CreateNode(XFA_XDPPACKET_Datasets, eNodeType);
- pDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsName);
+ pDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsName, false, false);
pDataNode->CreateXMLMappingNode();
pDataParent->InsertChild(pDataNode);
pDataNode->SetFlag(XFA_NodeFlag_Initialized, false);
@@ -1054,7 +1061,7 @@ CXFA_Node* MaybeCreateDataNode(CXFA_Document* pDocument,
CXFA_Node* pDataNode =
pDocument->CreateNode(XFA_XDPPACKET_Datasets, eNodeType);
- pDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsName);
+ pDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsName, false, false);
pDataNode->CreateXMLMappingNode();
if (eNodeType == XFA_Element::DataValue &&
pDDNode->JSNode()->GetEnum(XFA_ATTRIBUTE_Contains) ==
@@ -1378,7 +1385,8 @@ void CXFA_Document::DoDataMerge() {
pDatasetsXMLNode->SetString(L"xmlns:xfa",
L"http://www.xfa.org/schema/xfa-data/1.0/");
pDatasetsRoot = CreateNode(XFA_XDPPACKET_Datasets, XFA_Element::DataModel);
- pDatasetsRoot->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"datasets");
+ pDatasetsRoot->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"datasets", false,
+ false);
m_pRootNode->GetXMLMappingNode()->InsertChildNode(pDatasetsXMLNode);
m_pRootNode->InsertChild(pDatasetsRoot);
pDatasetsRoot->SetXMLMappingNode(pDatasetsXMLNode);
@@ -1412,7 +1420,7 @@ void CXFA_Document::DoDataMerge() {
if (!pDataRoot) {
CFX_XMLElement* pDataRootXMLNode = new CFX_XMLElement(L"xfa:data");
pDataRoot = CreateNode(XFA_XDPPACKET_Datasets, XFA_Element::DataGroup);
- pDataRoot->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"data");
+ pDataRoot->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"data", false, false);
pDataRoot->SetXMLMappingNode(pDataRootXMLNode);
pDatasetsRoot->InsertChild(pDataRoot);
}
@@ -1441,7 +1449,7 @@ void CXFA_Document::DoDataMerge() {
bEmptyForm = true;
pFormRoot = CreateNode(XFA_XDPPACKET_Form, XFA_Element::Form);
ASSERT(pFormRoot);
- pFormRoot->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"form");
+ pFormRoot->JSNode()->SetCData(XFA_ATTRIBUTE_Name, L"form", false, false);
m_pRootNode->InsertChild(pFormRoot, nullptr);
} else {
CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFANode>
@@ -1463,7 +1471,8 @@ void CXFA_Document::DoDataMerge() {
new CFX_XMLElement(wsDataTopLevelName);
pDataTopLevel = CreateNode(XFA_XDPPACKET_Datasets, XFA_Element::DataGroup);
- pDataTopLevel->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsDataTopLevelName);
+ pDataTopLevel->JSNode()->SetCData(XFA_ATTRIBUTE_Name, wsDataTopLevelName,
+ false, false);
pDataTopLevel->SetXMLMappingNode(pDataTopLevelXMLNode);
CXFA_Node* pBeforeNode = pDataRoot->GetNodeItem(XFA_NODEITEM_FirstChild);
pDataRoot->InsertChild(pDataTopLevel, pBeforeNode);