From 23aa2b0f8a3202337a40e8dcf3d8340bfd42e004 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 2 Nov 2017 19:11:57 +0000 Subject: Remove default values from CJX_Node::SetCData This CL removes the default values from SetCData and inlines at the call sites. Change-Id: I664338a8c7fec2ee9ec0c9ed9f892e57ea1ced43 Reviewed-on: https://pdfium-review.googlesource.com/17534 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- fxjs/cjx_node.cpp | 10 ++++++---- fxjs/cjx_node.h | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'fxjs') 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 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, -- cgit v1.2.3