Simplify interface to CJX_Object::SetCData(). All public callers to CJX_Object::SetCData() pass in the same values for the 2 boolean paramters. So rename SetCData() to SetCDataImpl(), mark SetCDataImpl() as protected, and add a new public SetCData() with fewer parameters. Change-Id: Iee36247d3437fc5073703f95438fb7c026b6697c Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/74071 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/xfa/cjx_node.cpp b/fxjs/xfa/cjx_node.cpp index 0efb693..1af69d9 100644 --- a/fxjs/xfa/cjx_node.cpp +++ b/fxjs/xfa/cjx_node.cpp
@@ -290,7 +290,7 @@ WideString wsContentType = GetCData(XFA_Attribute::ContentType); if (!wsContentType.IsEmpty()) { pFakeRoot->JSObject()->SetCData(XFA_Attribute::ContentType, - WideString(wsContentType), false, false); + WideString(wsContentType)); } CFX_XMLNode* pFakeXMLRoot = pFakeRoot->GetXMLMappingNode();
diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp index fac1c1e..a97c973 100644 --- a/fxjs/xfa/cjx_object.cpp +++ b/fxjs/xfa/cjx_object.cpp
@@ -240,7 +240,7 @@ break; } case XFA_AttributeType::CData: - SetCData(eAttr, WideString(wsValue), bNotify, false); + SetCDataImpl(eAttr, WideString(wsValue), bNotify, false); break; case XFA_AttributeType::Boolean: SetBoolean(eAttr, !wsValue.EqualsASCII("0"), bNotify); @@ -447,10 +447,14 @@ return TryCData(eAttr, true).value_or(WideString()); } -void CJX_Object::SetCData(XFA_Attribute eAttr, - const WideString& wsValue, - bool bNotify, - bool bScriptModify) { +void CJX_Object::SetCData(XFA_Attribute eAttr, const WideString& wsValue) { + return SetCDataImpl(eAttr, wsValue, false, false); +} + +void CJX_Object::SetCDataImpl(XFA_Attribute eAttr, + const WideString& wsValue, + bool bNotify, + bool bScriptModify) { CXFA_Node* xfaObj = GetXFANode(); void* pKey = GetMapKey_Element(xfaObj->GetElementType(), eAttr); OnChanging(eAttr, bNotify); @@ -562,7 +566,7 @@ CXFA_Node* pChildValue = pValue->GetFirstChild(); pChildValue->JSObject()->SetCData(XFA_Attribute::ContentType, - L"text/xml", false, false); + L"text/xml"); pChildValue->JSObject()->SetContent(wsContent, wsContent, bNotify, bScriptModify, false); @@ -584,8 +588,8 @@ while (iAddNodes-- > 0) { CXFA_Node* pValueNodes = pBind->CreateSamePacketNode(XFA_Element::DataValue); - pValueNodes->JSObject()->SetCData(XFA_Attribute::Name, L"value", - false, false); + pValueNodes->JSObject()->SetCData(XFA_Attribute::Name, + L"value"); pValueNodes->CreateXMLMappingNode(); pBind->InsertChildAndNotify(pValueNodes, nullptr); }
diff --git a/fxjs/xfa/cjx_object.h b/fxjs/xfa/cjx_object.h index 0dd4b32..9fccd50 100644 --- a/fxjs/xfa/cjx_object.h +++ b/fxjs/xfa/cjx_object.h
@@ -201,10 +201,7 @@ int32_t GetInteger(XFA_Attribute eAttr) const; Optional<WideString> TryCData(XFA_Attribute eAttr, bool bUseDefault) const; - void SetCData(XFA_Attribute eAttr, - const WideString& wsValue, - bool bNotify, - bool bScriptModify); + void SetCData(XFA_Attribute eAttr, const WideString& wsValue); WideString GetCData(XFA_Attribute eAttr) const; Optional<XFA_AttributeValue> TryEnum(XFA_Attribute eAttr, @@ -238,6 +235,10 @@ protected: explicit CJX_Object(CXFA_Object* obj); + void SetCDataImpl(XFA_Attribute eAttr, + const WideString& wsValue, + bool bNotify, + bool bScriptModify); void DefineMethods(pdfium::span<const CJX_MethodSpec> methods); void MoveBufferMapData(CXFA_Object* pSrcModule, CXFA_Object* pDstModule); void SetMapModuleString(void* pKey, WideStringView wsValue);
diff --git a/fxjs/xfa/cjx_subform.cpp b/fxjs/xfa/cjx_subform.cpp index d8d2050..37fe01c 100644 --- a/fxjs/xfa/cjx_subform.cpp +++ b/fxjs/xfa/cjx_subform.cpp
@@ -91,7 +91,7 @@ bool bSetting, XFA_Attribute eAttribute) { if (bSetting) { - SetCData(XFA_Attribute::Locale, pValue->ToWideString(), true, true); + SetCDataImpl(XFA_Attribute::Locale, pValue->ToWideString(), true, true); return; }
diff --git a/xfa/fxfa/parser/cxfa_color.cpp b/xfa/fxfa/parser/cxfa_color.cpp index 297c281..ef77b7f 100644 --- a/xfa/fxfa/parser/cxfa_color.cpp +++ b/xfa/fxfa/parser/cxfa_color.cpp
@@ -56,5 +56,5 @@ int b; std::tie(a, r, g, b) = ArgbDecode(color); JSObject()->SetCData(XFA_Attribute::Value, - WideString::Format(L"%d,%d,%d", r, g, b), false, false); + WideString::Format(L"%d,%d,%d", r, g, b)); }
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp index bbdfb43..514949e 100644 --- a/xfa/fxfa/parser/cxfa_document.cpp +++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -117,15 +117,14 @@ pContentRawDataNode = pChildNode->CreateSamePacketNode(element); pChildNode->InsertChildAndNotify(pContentRawDataNode, nullptr); } - pContentRawDataNode->JSObject()->SetCData(XFA_Attribute::Value, wsContent, - false, false); + pContentRawDataNode->JSObject()->SetCData(XFA_Attribute::Value, + wsContent); break; } case XFA_ObjectType::NodeC: case XFA_ObjectType::TextNode: case XFA_ObjectType::NodeV: { - pChildNode->JSObject()->SetCData(XFA_Attribute::Value, wsContent, false, - false); + pChildNode->JSObject()->SetCData(XFA_Attribute::Value, wsContent); break; } default: @@ -223,8 +222,7 @@ pDocument->CreateNode(XFA_PacketType::Form, XFA_Element::InstanceManager); wsInstMgrNodeName = L"_" + pTemplateNode->JSObject()->GetCData(XFA_Attribute::Name); - pNewNode->JSObject()->SetCData(XFA_Attribute::Name, wsInstMgrNodeName, false, - false); + pNewNode->JSObject()->SetCData(XFA_Attribute::Name, wsInstMgrNodeName); pFormParent->InsertChildAndNotify(pNewNode, nullptr); pNewNode->SetTemplateNode(pTemplateNode); return pNewNode; @@ -515,7 +513,7 @@ pDataNode->JSObject()->SetAttributeValue( wsValue, pFormNode->GetFormatDataValue(wsValue), false, false); pDataNode->JSObject()->SetCData(XFA_Attribute::ContentType, - wsContentType, false, false); + wsContentType); if (!wsHref.IsEmpty()) pXMLDataElement->SetAttribute(L"href", wsHref); @@ -530,12 +528,10 @@ for (const auto& text : wsSelTextArray) { CXFA_Node* pValue = pDataNode->CreateSamePacketNode(XFA_Element::DataValue); - pValue->JSObject()->SetCData(XFA_Attribute::Name, L"value", false, - false); + pValue->JSObject()->SetCData(XFA_Attribute::Name, L"value"); pValue->CreateXMLMappingNode(); pDataNode->InsertChildAndNotify(pValue, nullptr); - pValue->JSObject()->SetCData(XFA_Attribute::Value, text, false, - false); + pValue->JSObject()->SetCData(XFA_Attribute::Value, text); } } else { CFX_XMLElement* pElement = @@ -585,8 +581,7 @@ pChecked = pChild; pDataNode->JSObject()->SetAttributeValue(wsValue, wsValue, false, false); - pFormNode->JSObject()->SetCData(XFA_Attribute::Value, wsContent, - false, false); + pFormNode->JSObject()->SetCData(XFA_Attribute::Value, wsContent); break; } } @@ -660,7 +655,7 @@ pXMLDataElement->GetAttribute(L"xfa:contentType"); if (!wsContentType.IsEmpty()) { pDataNode->JSObject()->SetCData(XFA_Attribute::ContentType, - wsContentType, false, false); + wsContentType); image->SetContentType(wsContentType); } @@ -734,7 +729,7 @@ if (!pParentDDNode) { CXFA_Node* pDataNode = pDocument->CreateNode(XFA_PacketType::Datasets, eNodeType); - pDataNode->JSObject()->SetCData(XFA_Attribute::Name, wsName, false, false); + pDataNode->JSObject()->SetCData(XFA_Attribute::Name, wsName); pDataNode->CreateXMLMappingNode(); pDataParent->InsertChildAndNotify(pDataNode, nullptr); pDataNode->SetFlag(XFA_NodeFlag_Initialized); @@ -765,7 +760,7 @@ CXFA_Node* pDataNode = pDocument->CreateNode(XFA_PacketType::Datasets, eNodeType); - pDataNode->JSObject()->SetCData(XFA_Attribute::Name, wsName, false, false); + pDataNode->JSObject()->SetCData(XFA_Attribute::Name, wsName); pDataNode->CreateXMLMappingNode(); if (eNodeType == XFA_Element::DataValue && pDDNode->JSObject()->GetEnum(XFA_Attribute::Contains) == @@ -1652,8 +1647,7 @@ 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, - false); + pDatasetsRoot->JSObject()->SetCData(XFA_Attribute::Name, L"datasets"); m_pRootNode->GetXMLMappingNode()->AppendLastChild(pDatasetsXMLNode); m_pRootNode->InsertChildAndNotify(pDatasetsRoot, nullptr); @@ -1692,7 +1686,7 @@ if (!pDataRoot) { pDataRoot = CreateNode(XFA_PacketType::Datasets, XFA_Element::DataGroup); - pDataRoot->JSObject()->SetCData(XFA_Attribute::Name, L"data", false, false); + pDataRoot->JSObject()->SetCData(XFA_Attribute::Name, L"data"); auto* elem = notify_->GetFFDoc()->GetXMLDocument()->CreateNode<CFX_XMLElement>( @@ -1728,7 +1722,7 @@ pFormRoot = static_cast<CXFA_Form*>( CreateNode(XFA_PacketType::Form, XFA_Element::Form)); ASSERT(pFormRoot); - pFormRoot->JSObject()->SetCData(XFA_Attribute::Name, L"form", false, false); + pFormRoot->JSObject()->SetCData(XFA_Attribute::Name, L"form"); m_pRootNode->InsertChildAndNotify(pFormRoot, nullptr); } else { CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFANode> @@ -1749,8 +1743,8 @@ pDataTopLevel = static_cast<CXFA_DataGroup*>( CreateNode(XFA_PacketType::Datasets, XFA_Element::DataGroup)); - pDataTopLevel->JSObject()->SetCData(XFA_Attribute::Name, wsDataTopLevelName, - false, false); + pDataTopLevel->JSObject()->SetCData(XFA_Attribute::Name, + wsDataTopLevelName); auto* elem = notify_->GetFFDoc()->GetXMLDocument()->CreateNode<CFX_XMLElement>(
diff --git a/xfa/fxfa/parser/cxfa_document_builder.cpp b/xfa/fxfa/parser/cxfa_document_builder.cpp index e78b4ca..421371d 100644 --- a/xfa/fxfa/parser/cxfa_document_builder.cpp +++ b/xfa/fxfa/parser/cxfa_document_builder.cpp
@@ -269,12 +269,10 @@ CFX_XMLElement* child = static_cast<CFX_XMLElement*>(pXMLChild); WideString wsNodeStr = child->GetLocalTagName(); - pXFAChild->JSObject()->SetCData(XFA_Attribute::Name, wsNodeStr, false, - false); + pXFAChild->JSObject()->SetCData(XFA_Attribute::Name, wsNodeStr); WideString wsChildValue = GetPlainTextFromRichText(child); if (!wsChildValue.IsEmpty()) - pXFAChild->JSObject()->SetCData(XFA_Attribute::Value, wsChildValue, - false, false); + pXFAChild->JSObject()->SetCData(XFA_Attribute::Value, wsChildValue); pXFANode->InsertChildAndNotify(pXFAChild, nullptr); pXFAChild->SetXMLMappingNode(pXMLChild); @@ -340,16 +338,13 @@ return nullptr; root_node_ = pXFARootNode; - pXFARootNode->JSObject()->SetCData(XFA_Attribute::Name, L"xfa", false, false); + pXFARootNode->JSObject()->SetCData(XFA_Attribute::Name, L"xfa"); for (auto it : ToXMLElement(pXMLDocumentNode)->GetAttributes()) { - if (it.first.EqualsASCII("uuid")) { - pXFARootNode->JSObject()->SetCData(XFA_Attribute::Uuid, it.second, false, - false); - } else if (it.first.EqualsASCII("timeStamp")) { - pXFARootNode->JSObject()->SetCData(XFA_Attribute::TimeStamp, it.second, - false, false); - } + if (it.first.EqualsASCII("uuid")) + pXFARootNode->JSObject()->SetCData(XFA_Attribute::Uuid, it.second); + else if (it.first.EqualsASCII("timeStamp")) + pXFARootNode->JSObject()->SetCData(XFA_Attribute::TimeStamp, it.second); } CFX_XMLNode* pXMLConfigDOMRoot = nullptr; @@ -460,7 +455,7 @@ if (!pNode) return nullptr; - pNode->JSObject()->SetCData(XFA_Attribute::Name, packet.name, false, false); + pNode->JSObject()->SetCData(XFA_Attribute::Name, packet.name); if (!NormalLoader(pNode, pXMLDocumentNode, XFA_PacketType::Config, true)) return nullptr; @@ -479,7 +474,7 @@ if (!pNode) return nullptr; - pNode->JSObject()->SetCData(XFA_Attribute::Name, packet.name, false, false); + pNode->JSObject()->SetCData(XFA_Attribute::Name, packet.name); CFX_XMLElement* pXMLDocumentElement = ToXMLElement(pXMLDocumentNode); WideString wsNamespaceURI = pXMLDocumentElement->GetNamespaceURI(); @@ -506,7 +501,7 @@ if (!pNode) return nullptr; - pNode->JSObject()->SetCData(XFA_Attribute::Name, packet.name, false, false); + pNode->JSObject()->SetCData(XFA_Attribute::Name, packet.name); CXFA_Template* pTemplateRoot = root_node_->GetFirstChildByClass<CXFA_Template>(XFA_Element::Template); CXFA_Subform* pTemplateChosen = @@ -537,7 +532,7 @@ if (!pNode) return nullptr; - pNode->JSObject()->SetCData(XFA_Attribute::Name, packet.name, false, false); + pNode->JSObject()->SetCData(XFA_Attribute::Name, packet.name); if (!DataLoader(pNode, pDatasetsXMLNode, false)) return nullptr; @@ -570,7 +565,7 @@ return nullptr; WideString wsLocalName = ToXMLElement(pDataXMLNode)->GetLocalTagName(); - pNode->JSObject()->SetCData(XFA_Attribute::Name, wsLocalName, false, false); + pNode->JSObject()->SetCData(XFA_Attribute::Name, wsLocalName); if (!DataLoader(pNode, pDataXMLNode, true)) return nullptr; @@ -590,7 +585,7 @@ if (!pNode) return nullptr; - pNode->JSObject()->SetCData(XFA_Attribute::Name, packet.name, false, false); + pNode->JSObject()->SetCData(XFA_Attribute::Name, packet.name); if (!NormalLoader(pNode, pXMLDocumentNode, packet_type, true)) return nullptr; @@ -609,7 +604,7 @@ if (!pNode) return nullptr; - pNode->JSObject()->SetCData(XFA_Attribute::Name, packet.name, false, false); + pNode->JSObject()->SetCData(XFA_Attribute::Name, packet.name); pNode->SetXMLMappingNode(pXMLDocumentNode); return pNode; } @@ -622,7 +617,7 @@ return nullptr; WideString wsName = ToXMLElement(pXMLDocumentNode)->GetLocalTagName(); - pNode->JSObject()->SetCData(XFA_Attribute::Name, wsName, false, false); + pNode->JSObject()->SetCData(XFA_Attribute::Name, wsName); pNode->SetXMLMappingNode(pXMLDocumentNode); return pNode; } @@ -768,12 +763,10 @@ CXFA_Node* pContentRawDataNode = node_factory_->CreateNode(ePacketID, element); ASSERT(pContentRawDataNode); - pContentRawDataNode->JSObject()->SetCData(XFA_Attribute::Value, wsValue, - false, false); + pContentRawDataNode->JSObject()->SetCData(XFA_Attribute::Value, wsValue); pXFANode->InsertChildAndNotify(pContentRawDataNode, nullptr); } else { - pXFANode->JSObject()->SetCData(XFA_Attribute::Value, wsValue, false, - false); + pXFANode->JSObject()->SetCData(XFA_Attribute::Value, wsValue); } } } @@ -833,8 +826,8 @@ if (!pXFAChild) return; - pXFAChild->JSObject()->SetCData( - XFA_Attribute::Name, pXMLElement->GetLocalTagName(), false, false); + pXFAChild->JSObject()->SetCData(XFA_Attribute::Name, + pXMLElement->GetLocalTagName()); bool bNeedValue = true; for (auto it : pXMLElement->GetAttributes()) { @@ -858,12 +851,10 @@ if (!pXFAMetaData) return; - pXFAMetaData->JSObject()->SetCData(XFA_Attribute::Name, wsName, false, - false); + pXFAMetaData->JSObject()->SetCData(XFA_Attribute::Name, wsName); pXFAMetaData->JSObject()->SetCData(XFA_Attribute::QualifiedName, - it.first, false, false); - pXFAMetaData->JSObject()->SetCData(XFA_Attribute::Value, it.second, - false, false); + it.first); + pXFAMetaData->JSObject()->SetCData(XFA_Attribute::Value, it.second); pXFAMetaData->JSObject()->SetEnum( XFA_Attribute::Contains, XFA_AttributeValue::MetaData, false); pXFAChild->InsertChildAndNotify(pXFAMetaData, nullptr); @@ -896,8 +887,7 @@ if (!pXFAChild) return; - pXFAChild->JSObject()->SetCData(XFA_Attribute::Value, wsText, false, - false); + pXFAChild->JSObject()->SetCData(XFA_Attribute::Value, wsText); pXFANode->InsertChildAndNotify(pXFAChild, nullptr); pXFAChild->SetXMLMappingNode(pXMLText); pXFAChild->SetFlag(XFA_NodeFlag_Initialized); @@ -946,10 +936,8 @@ if (!pXFAChild) return; - pXFAChild->JSObject()->SetCData(XFA_Attribute::Name, WideString(), - false, false); - pXFAChild->JSObject()->SetCData(XFA_Attribute::Value, wsCurValue, false, - false); + pXFAChild->JSObject()->SetCData(XFA_Attribute::Name, WideString()); + pXFAChild->JSObject()->SetCData(XFA_Attribute::Value, wsCurValue); pXFANode->InsertChildAndNotify(pXFAChild, nullptr); pXFAChild->SetXMLMappingNode(pXMLCurValueNode); pXFAChild->SetFlag(XFA_NodeFlag_Initialized); @@ -964,8 +952,7 @@ return; WideString wsNodeStr = ToXMLElement(pXMLChild)->GetLocalTagName(); - pXFAChild->JSObject()->SetCData(XFA_Attribute::Name, wsNodeStr, false, - false); + pXFAChild->JSObject()->SetCData(XFA_Attribute::Name, wsNodeStr); ParseDataValue(pXFAChild, pXMLChild, ePacketID); pXFANode->InsertChildAndNotify(pXFAChild, nullptr); pXFAChild->SetXMLMappingNode(pXMLChild); @@ -984,10 +971,8 @@ if (!pXFAChild) return; - pXFAChild->JSObject()->SetCData(XFA_Attribute::Name, WideString(), - false, false); - pXFAChild->JSObject()->SetCData(XFA_Attribute::Value, wsCurValue, false, - false); + pXFAChild->JSObject()->SetCData(XFA_Attribute::Name, WideString()); + pXFAChild->JSObject()->SetCData(XFA_Attribute::Value, wsCurValue); pXFANode->InsertChildAndNotify(pXFAChild, nullptr); pXFAChild->SetXMLMappingNode(pXMLCurValueNode); pXFAChild->SetFlag(XFA_NodeFlag_Initialized); @@ -998,8 +983,7 @@ pXMLCurValueNode = nullptr; } WideString wsNodeValue = wsValueTextBuf.MakeString(); - pXFANode->JSObject()->SetCData(XFA_Attribute::Value, wsNodeValue, false, - false); + pXFANode->JSObject()->SetCData(XFA_Attribute::Value, wsNodeValue); } void CXFA_DocumentBuilder::ParseInstruction(CXFA_Node* pXFANode,
diff --git a/xfa/fxfa/parser/cxfa_exdata.cpp b/xfa/fxfa/parser/cxfa_exdata.cpp index 95d66e2..7a58810 100644 --- a/xfa/fxfa/parser/cxfa_exdata.cpp +++ b/xfa/fxfa/parser/cxfa_exdata.cpp
@@ -41,5 +41,5 @@ CXFA_ExData::~CXFA_ExData() = default; void CXFA_ExData::SetContentType(const WideString& wsContentType) { - JSObject()->SetCData(XFA_Attribute::ContentType, wsContentType, false, false); + JSObject()->SetCData(XFA_Attribute::ContentType, wsContentType); }
diff --git a/xfa/fxfa/parser/cxfa_image.cpp b/xfa/fxfa/parser/cxfa_image.cpp index 9c3e0f9..ca9e79a 100644 --- a/xfa/fxfa/parser/cxfa_image.cpp +++ b/xfa/fxfa/parser/cxfa_image.cpp
@@ -62,11 +62,11 @@ } void CXFA_Image::SetContentType(const WideString& wsContentType) { - JSObject()->SetCData(XFA_Attribute::ContentType, wsContentType, false, false); + JSObject()->SetCData(XFA_Attribute::ContentType, wsContentType); } void CXFA_Image::SetHref(const WideString& wsHref) { - JSObject()->SetCData(XFA_Attribute::Href, wsHref, false, false); + JSObject()->SetCData(XFA_Attribute::Href, wsHref); } void CXFA_Image::SetTransferEncoding(XFA_AttributeValue iTransferEncoding) {
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 641687b..5ef4e5a 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -3123,11 +3123,10 @@ image->SetTransferEncoding(XFA_AttributeValue::Base64); return; } - pBind->JSObject()->SetCData(XFA_Attribute::ContentType, wsContentType, false, - false); + pBind->JSObject()->SetCData(XFA_Attribute::ContentType, wsContentType); CXFA_Node* pHrefNode = pBind->GetFirstChild(); if (pHrefNode) { - pHrefNode->JSObject()->SetCData(XFA_Attribute::Value, wsHref, false, false); + pHrefNode->JSObject()->SetCData(XFA_Attribute::Value, wsHref); return; } CFX_XMLElement* pElement = ToXMLElement(pBind->GetXMLMappingNode());
diff --git a/xfa/fxfa/parser/cxfa_stroke.cpp b/xfa/fxfa/parser/cxfa_stroke.cpp index 50637db..e4766c3 100644 --- a/xfa/fxfa/parser/cxfa_stroke.cpp +++ b/xfa/fxfa/parser/cxfa_stroke.cpp
@@ -130,8 +130,7 @@ int b; std::tie(a, r, g, b) = ArgbDecode(argb); pNode->JSObject()->SetCData(XFA_Attribute::Value, - WideString::Format(L"%d,%d,%d", r, g, b), false, - false); + WideString::Format(L"%d,%d,%d", r, g, b)); } XFA_AttributeValue CXFA_Stroke::GetJoinType() {
diff --git a/xfa/fxfa/parser/cxfa_validate.cpp b/xfa/fxfa/parser/cxfa_validate.cpp index 29f46db..4834cb3 100644 --- a/xfa/fxfa/parser/cxfa_validate.cpp +++ b/xfa/fxfa/parser/cxfa_validate.cpp
@@ -140,8 +140,7 @@ CXFA_Node* pTextNode = pNode->CreateSamePacketNode(XFA_Element::Text); pNode->InsertChildAndNotify(pTextNode, nullptr); - pTextNode->JSObject()->SetCData(XFA_Attribute::Name, wsMessageType, false, - false); + pTextNode->JSObject()->SetCData(XFA_Attribute::Name, wsMessageType); pTextNode->JSObject()->SetContent(wsMessage, wsMessage, false, false, true); }