summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-02 18:15:50 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-02 18:15:50 +0000
commit69cb91483879db27fd95e85d3d4ee7dc7093e126 (patch)
tree9bbb0d9d0d98640922f2e9e737c0d9eedb19af2d /fxjs
parent77fe069bd19ea8207664293f631c63dab330f825 (diff)
downloadpdfium-69cb91483879db27fd95e85d3d4ee7dc7093e126.tar.xz
Remove default value from CJX_Node::GetAttribute
This CL moves the default value to CJX_Node::GetAttribute to the call sites and removes the default. Change-Id: I2b875e3c612b91ca67af106e271b040cc51c56ef Reviewed-on: https://pdfium-review.googlesource.com/17470 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cjx_node.cpp8
-rw-r--r--fxjs/cjx_node.h6
2 files changed, 6 insertions, 8 deletions
diff --git a/fxjs/cjx_node.cpp b/fxjs/cjx_node.cpp
index 3fd08772e2..e9c3fbf371 100644
--- a/fxjs/cjx_node.cpp
+++ b/fxjs/cjx_node.cpp
@@ -526,7 +526,7 @@ void CJX_Node::Script_TreeClass_All(CFXJSE_Value* pValue,
uint32_t dwFlag = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_ALL;
WideString wsName;
- GetAttribute(XFA_ATTRIBUTE_Name, wsName);
+ GetAttribute(XFA_ATTRIBUTE_Name, wsName, true);
WideString wsExpression = wsName + L"[*]";
Script_Som_ResolveNodeList(pValue, wsExpression, dwFlag);
}
@@ -665,7 +665,7 @@ void CJX_Node::Script_NodeClass_GetAttribute(CFXJSE_Arguments* pArguments) {
WideString wsExpression =
WideString::FromUTF8(pArguments->GetUTF8String(0).AsStringView());
WideString wsValue;
- GetAttribute(wsExpression.AsStringView(), wsValue);
+ GetAttribute(wsExpression.AsStringView(), wsValue, true);
CFXJSE_Value* pValue = pArguments->GetReturnValue();
if (pValue)
pValue->SetString(wsValue.UTF8Encode().AsStringView());
@@ -1279,7 +1279,7 @@ void CJX_Node::Script_Attribute_String(CFXJSE_Value* pValue,
}
} else {
WideString wsValue;
- GetAttribute(eAttribute, wsValue);
+ GetAttribute(eAttribute, wsValue, true);
pValue->SetString(wsValue.UTF8Encode().AsStringView());
}
}
@@ -1293,7 +1293,7 @@ void CJX_Node::Script_Attribute_StringRead(CFXJSE_Value* pValue,
}
WideString wsValue;
- GetAttribute(eAttribute, wsValue);
+ GetAttribute(eAttribute, wsValue, true);
pValue->SetString(wsValue.UTF8Encode().AsStringView());
}
diff --git a/fxjs/cjx_node.h b/fxjs/cjx_node.h
index 47fb0d62f0..ca94a8fff0 100644
--- a/fxjs/cjx_node.h
+++ b/fxjs/cjx_node.h
@@ -61,10 +61,8 @@ class CJX_Node : public CJX_Object {
bool bNotify);
bool GetAttribute(const WideStringView& wsAttr,
WideString& wsValue,
- bool bUseDefault = true);
- bool GetAttribute(XFA_ATTRIBUTE eAttr,
- WideString& wsValue,
- bool bUseDefault = true);
+ bool bUseDefault);
+ bool GetAttribute(XFA_ATTRIBUTE eAttr, WideString& wsValue, bool bUseDefault);
bool SetAttributeValue(const WideString& wsValue,
const WideString& wsXMLValue,
bool bNotify = false,