summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-16 21:18:29 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-16 21:18:29 +0000
commitdf4e68c5eb293c9929c7d66e59d08afc21b04c86 (patch)
tree2f2109d48a095ac336b4bfaa08562d884e96ec75 /xfa/fxfa/parser
parentd5e282648a08a0b68c30edce51fafeeb5d76db7b (diff)
downloadpdfium-df4e68c5eb293c9929c7d66e59d08afc21b04c86.tar.xz
Remove optional argument from ResolveNodes_GetParent().
Conformity with standards. Change-Id: Ia718700526477fd1826eb4900ab333ebf4c8a517 Reviewed-on: https://pdfium-review.googlesource.com/40353 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_nodehelper.cpp19
-rw-r--r--xfa/fxfa/parser/cxfa_nodehelper.h10
2 files changed, 13 insertions, 16 deletions
diff --git a/xfa/fxfa/parser/cxfa_nodehelper.cpp b/xfa/fxfa/parser/cxfa_nodehelper.cpp
index e4fb8660f9..7f2e72a289 100644
--- a/xfa/fxfa/parser/cxfa_nodehelper.cpp
+++ b/xfa/fxfa/parser/cxfa_nodehelper.cpp
@@ -183,7 +183,7 @@ CXFA_Node* CXFA_NodeHelper::ResolveNodes_GetParent(CXFA_Node* pNode,
CXFA_Node* parent;
CXFA_Node* node = pNode;
while (true) {
- parent = ResolveNodes_GetParent(node);
+ parent = ResolveNodes_GetParent(node, XFA_LOGIC_NoTransparent);
if (!parent) {
break;
}
@@ -228,15 +228,14 @@ int32_t CXFA_NodeHelper::GetIndex(CXFA_Node* pNode,
}
WideString CXFA_NodeHelper::GetNameExpression(CXFA_Node* refNode,
- bool bIsAllPath,
- XFA_LOGIC_TYPE eLogicType) {
+ bool bIsAllPath) {
WideString wsName;
if (bIsAllPath) {
- wsName = GetNameExpression(refNode, false, eLogicType);
+ wsName = GetNameExpression(refNode, false);
CXFA_Node* parent =
ResolveNodes_GetParent(refNode, XFA_LOGIC_NoTransparent);
while (parent) {
- WideString wsParent = GetNameExpression(parent, false, eLogicType);
+ WideString wsParent = GetNameExpression(parent, false);
wsParent += L".";
wsParent += wsName;
wsName = std::move(wsParent);
@@ -250,13 +249,15 @@ WideString CXFA_NodeHelper::GetNameExpression(CXFA_Node* refNode,
if (refNode->IsUnnamed() ||
(bIsProperty && refNode->GetElementType() != XFA_Element::PageSet)) {
ws = refNode->GetClassName();
- return WideString::Format(L"#%ls[%d]", ws.c_str(),
- GetIndex(refNode, eLogicType, bIsProperty, true));
+ return WideString::Format(
+ L"#%ls[%d]", ws.c_str(),
+ GetIndex(refNode, XFA_LOGIC_Transparent, bIsProperty, true));
}
ws = refNode->JSObject()->GetCData(XFA_Attribute::Name);
ws.Replace(L".", L"\\.");
- return WideString::Format(L"%ls[%d]", ws.c_str(),
- GetIndex(refNode, eLogicType, bIsProperty, false));
+ return WideString::Format(
+ L"%ls[%d]", ws.c_str(),
+ GetIndex(refNode, XFA_LOGIC_Transparent, bIsProperty, false));
}
bool CXFA_NodeHelper::NodeIsTransparent(CXFA_Node* refNode) {
diff --git a/xfa/fxfa/parser/cxfa_nodehelper.h b/xfa/fxfa/parser/cxfa_nodehelper.h
index 49e537ccaa..ccf60ac3d6 100644
--- a/xfa/fxfa/parser/cxfa_nodehelper.h
+++ b/xfa/fxfa/parser/cxfa_nodehelper.h
@@ -26,9 +26,8 @@ class CXFA_NodeHelper {
CXFA_Node* ResolveNodes_GetOneChild(CXFA_Node* parent,
const wchar_t* pwsName,
bool bIsClassName);
- CXFA_Node* ResolveNodes_GetParent(
- CXFA_Node* pNode,
- XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent);
+ CXFA_Node* ResolveNodes_GetParent(CXFA_Node* pNode,
+ XFA_LOGIC_TYPE eLogicType);
int32_t NodeAcc_TraverseSiblings(CXFA_Node* parent,
uint32_t dNameHash,
@@ -48,10 +47,7 @@ class CXFA_NodeHelper {
XFA_LOGIC_TYPE eLogicType,
bool bIsProperty,
bool bIsClassIndex);
- WideString GetNameExpression(
- CXFA_Node* refNode,
- bool bIsAllPath,
- XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent);
+ WideString GetNameExpression(CXFA_Node* refNode, bool bIsAllPath);
bool NodeIsTransparent(CXFA_Node* refNode);
bool ResolveNodes_CreateNode(WideString wsName,
WideString wsCondition,