From 019c1c61b7bf3f3573ce158c9735f3c1b1db7c68 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 2 Nov 2017 18:17:08 +0000 Subject: Remove default params from CJX_Node::SetScriptContent This CL removes the default values and adds them to the call sites as needed. Change-Id: I7c9654a7b6320f1c81a129808b3afa3eed9d4159 Reviewed-on: https://pdfium-review.googlesource.com/17471 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- fxjs/cjx_node.cpp | 11 ++++++----- fxjs/cjx_node.h | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/fxjs/cjx_node.cpp b/fxjs/cjx_node.cpp index e9c3fbf371..4cebf44cd7 100644 --- a/fxjs/cjx_node.cpp +++ b/fxjs/cjx_node.cpp @@ -1441,7 +1441,7 @@ void CJX_Node::Script_Som_DefaultValue(CFXJSE_Value* pValue, if (pContainerWidgetData) { pContainerWidgetData->GetFormatDataValue(wsNewValue, wsFormatValue); } - SetScriptContent(wsNewValue, wsFormatValue, true, true); + SetScriptContent(wsNewValue, wsFormatValue, true, true, true); } else { WideString content = GetScriptContent(true); if (content.IsEmpty() && eType != XFA_Element::Text && @@ -1490,7 +1490,7 @@ void CJX_Node::Script_Boolean_Value(CFXJSE_Value* pValue, if (pContainerWidgetData) { pContainerWidgetData->GetFormatDataValue(wsNewValue, wsFormatValue); } - SetScriptContent(wsNewValue, wsFormatValue, true, true); + SetScriptContent(wsNewValue, wsFormatValue, true, true, true); } else { WideString wsValue = GetScriptContent(true); pValue->SetBoolean(wsValue == L"1"); @@ -1617,7 +1617,7 @@ void CJX_Node::Script_Draw_DefaultValue(CFXJSE_Value* pValue, if (uiType == XFA_Element::Text) { WideString wsNewValue = pValue->ToWideString(); WideString wsFormatValue(wsNewValue); - SetScriptContent(wsNewValue, wsFormatValue, true, true); + SetScriptContent(wsNewValue, wsFormatValue, true, true, true); } } } else { @@ -1663,7 +1663,7 @@ void CJX_Node::Script_Field_DefaultValue(CFXJSE_Value* pValue, if (pContainerWidgetData) { pContainerWidgetData->GetFormatDataValue(wsNewText, wsFormatText); } - SetScriptContent(wsNewText, wsFormatText, true, true); + SetScriptContent(wsNewText, wsFormatText, true, true, true); } else { WideString content = GetScriptContent(true); if (content.IsEmpty()) { @@ -3879,7 +3879,8 @@ void CJX_Node::MoveBufferMapData(CXFA_Node* pDstModule, void* pKey) { if (pWidgetData) { pWidgetData->GetFormatDataValue(wsValue, wsFormatValue); } - pDstModule->JSNode()->SetScriptContent(wsValue, wsFormatValue, true, true); + pDstModule->JSNode()->SetScriptContent(wsValue, wsFormatValue, true, true, + true); } } diff --git a/fxjs/cjx_node.h b/fxjs/cjx_node.h index ca94a8fff0..442e0d57e3 100644 --- a/fxjs/cjx_node.h +++ b/fxjs/cjx_node.h @@ -440,9 +440,9 @@ class CJX_Node : public CJX_Object { bool SetScriptContent(const WideString& wsContent, const WideString& wsXMLValue, - bool bNotify = true, - bool bScriptModify = false, - bool bSyncData = true); + bool bNotify, + bool bScriptModify, + bool bSyncData); WideString GetScriptContent(bool bScriptModify = false); XFA_MAPMODULEDATA* CreateMapModuleData(); -- cgit v1.2.3