summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-02 18:18:18 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-02 18:18:18 +0000
commitea708c02877df7038c5f2300b037dd0eedff6f54 (patch)
treee1a4e0139f6889e436d1eb9e31ee56906a152380
parent019c1c61b7bf3f3573ce158c9735f3c1b1db7c68 (diff)
downloadpdfium-ea708c02877df7038c5f2300b037dd0eedff6f54.tar.xz
Remove default values from CJX_Node::SetAttributeValue
This CL removes the default parameters from SetAttributeValue and inlines into the call sites as needed. Change-Id: Ibb4e4747141a49c2367743421254c251aff71eeb Reviewed-on: https://pdfium-review.googlesource.com/17490 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
-rw-r--r--fxjs/cjx_node.cpp2
-rw-r--r--fxjs/cjx_node.h4
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp21
3 files changed, 17 insertions, 10 deletions
diff --git a/fxjs/cjx_node.cpp b/fxjs/cjx_node.cpp
index 4cebf44cd7..59ddab5db0 100644
--- a/fxjs/cjx_node.cpp
+++ b/fxjs/cjx_node.cpp
@@ -3396,7 +3396,7 @@ bool CJX_Node::SetScriptContent(const WideString& wsContent,
pValueNode; pValueNode = pValueNode->GetNodeItem(
XFA_NODEITEM_NextSibling)) {
pValueNode->JSNode()->SetAttributeValue(
- wsSaveTextArray[i], wsSaveTextArray[i], false);
+ wsSaveTextArray[i], wsSaveTextArray[i], false, false);
i++;
}
}
diff --git a/fxjs/cjx_node.h b/fxjs/cjx_node.h
index 442e0d57e3..1b8ad5c079 100644
--- a/fxjs/cjx_node.h
+++ b/fxjs/cjx_node.h
@@ -65,8 +65,8 @@ class CJX_Node : public CJX_Object {
bool GetAttribute(XFA_ATTRIBUTE eAttr, WideString& wsValue, bool bUseDefault);
bool SetAttributeValue(const WideString& wsValue,
const WideString& wsXMLValue,
- bool bNotify = false,
- bool bScriptModify = false);
+ bool bNotify,
+ bool bScriptModify);
bool RemoveAttribute(const WideStringView& wsAttr);
CXFA_Node* GetProperty(int32_t index,
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index 87fa5fe6bf..be052ebce5 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -147,7 +147,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
static_cast<CFX_XMLElement*>(pDataNode->GetXMLMappingNode());
ASSERT(pXMLDataElement);
pWidgetData->GetFormatDataValue(wsValue, wsFormattedValue);
- pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue);
+ pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue, false,
+ false);
pDataNode->JSNode()->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
if (!wsHref.IsEmpty())
pXMLDataElement->SetString(L"href", wsHref);
@@ -176,7 +177,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
}
} else if (!wsValue.IsEmpty()) {
pWidgetData->GetFormatDataValue(wsValue, wsFormattedValue);
- pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue);
+ pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue,
+ false, false);
}
break;
case XFA_Element::CheckButton:
@@ -185,7 +187,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
break;
pWidgetData->GetFormatDataValue(wsValue, wsFormattedValue);
- pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue);
+ pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue, false,
+ false);
break;
case XFA_Element::ExclGroup: {
CXFA_Node* pChecked = nullptr;
@@ -216,7 +219,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
(wsContent == wsValue)) {
pChecked = pChild;
wsFormattedValue = wsValue;
- pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue);
+ pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue,
+ false, false);
pFormNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsContent);
break;
}
@@ -256,7 +260,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
pWidgetData->NormalizeNumStr(wsValue, wsOutput);
wsValue = wsOutput;
pWidgetData->GetFormatDataValue(wsValue, wsFormattedValue);
- pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue);
+ pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue, false,
+ false);
CXFA_Node* pValue =
pFormNode->JSNode()->GetProperty(0, XFA_Element::Value);
FormValueNode_SetChildContent(pValue, wsValue, XFA_Element::Float);
@@ -268,7 +273,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
break;
pWidgetData->GetFormatDataValue(wsValue, wsFormattedValue);
- pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue);
+ pDataNode->JSNode()->SetAttributeValue(wsValue, wsFormattedValue, false,
+ false);
break;
}
return;
@@ -278,7 +284,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
pDataNode->JSNode()->TryContent(wsXMLValue);
WideString wsNormalizeValue;
pWidgetData->GetNormalizeDataValue(wsXMLValue, wsNormalizeValue);
- pDataNode->JSNode()->SetAttributeValue(wsNormalizeValue, wsXMLValue);
+ pDataNode->JSNode()->SetAttributeValue(wsNormalizeValue, wsXMLValue, false,
+ false);
switch (eUIType) {
case XFA_Element::ImageEdit: {
FormValueNode_SetChildContent(defValue.GetNode(), wsNormalizeValue,