diff options
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/fxfa/parser/cxfa_nodehelper.cpp | 19 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_nodehelper.h | 10 |
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, |